From df3598cd28addbeea131fdaacb00c2acd9fae95e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 26 Apr 2022 18:46:55 +0200 Subject: [PATCH 001/751] Create a draft of FiniteDrinfeldModule --- src/sage/modules/all.py | 1 + src/sage/modules/finite_drinfeld_module.py | 175 +++++++++++++++++++++ 2 files changed, 176 insertions(+) create mode 100644 src/sage/modules/finite_drinfeld_module.py diff --git a/src/sage/modules/all.py b/src/sage/modules/all.py index a90258d7ec8..a6ca79ddf69 100644 --- a/src/sage/modules/all.py +++ b/src/sage/modules/all.py @@ -29,3 +29,4 @@ lazy_import('sage.modules.multi_filtered_vector_space', 'MultiFilteredVectorSpace') lazy_import('sage.modules.free_quadratic_module_integer_symmetric', 'IntegralLattice') lazy_import('sage.modules.torsion_quadratic_module', 'TorsionQuadraticForm') +lazy_import('sage.modules.finite_drinfeld_module', 'FiniteDrinfeldModule') diff --git a/src/sage/modules/finite_drinfeld_module.py b/src/sage/modules/finite_drinfeld_module.py new file mode 100644 index 00000000000..e6eb1f7aba1 --- /dev/null +++ b/src/sage/modules/finite_drinfeld_module.py @@ -0,0 +1,175 @@ +r""" + + + + +EXAMPLES:: + + + +AUTHORS: + +- Antoine Leudière (2022-04-26): initial version + +""" + +#***************************************************************************** +# Copyright (C) 2022 Antoine Leudière +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# http://www.gnu.org/licenses/ +#***************************************************************************** + +from sage.categories.action import Action +from sage.categories.homset import Hom +from sage.rings.morphism import RingHomomorphism_im_gens +from sage.rings.polynomial.ore_polynomial_element import OrePolynomial +from sage.rings.polynomial.ore_polynomial_ring import OrePolynomialRing +from sage.rings.polynomial.polynomial_ring import PolynomialRing_dense_finite_field +from sage.misc.latex import latex + + +class FiniteDrinfeldModule(RingHomomorphism_im_gens): + + def __init__(self, polring, gen): + # VERIFICATIONS + # Check `polring` is an Fq[X]: + # See docstrings of `PolynomialRing_dense_finite_field` and + # `is_PolynomialRing`. + isinstance(polring, PolynomialRing_dense_finite_field) + # Check `gen` is an Ore polynomial: + if not isinstance(gen, OrePolynomial): + raise TypeError('The generator must be an Ore polynomial') + # Now we can define those for convenience: + FqX = polring + Ltau = gen.parent() + Fq = FqX.base_ring() + L = Ltau.base_ring() + # Check the Ore polynomial ring is an L{tau} with L a finite + # field extension of Fq: + _check_base_fields(Fq, L) + if not Ltau.twisting_derivation() is None: + raise ValueError('The Ore polynomial ring should have no ' \ + 'derivation') + # Check the frobenius is x -> x^q: + if Ltau.twisting_morphism().power() != Fq.degree(): + raise ValueError('The twisting morphism of the Ore polynomial ' \ + 'ring must be the Frobenius endomorphism of the base ' \ + 'field of the polynomial ring') + # The generator is not constant: + if gen.is_constant(): + raise ValueError('The generator must not be constant') + # ACTUAL WORK + super().__init__(Hom(FqX, Ltau), gen) + + ########### + # Methods # + ########### + + def change_ring(self, R): + # VERIFICATIONS + if not R.is_field() and R.is_finite(): + raise TypeError('Argument must be a finite field') + if not self.ore_polring().base_ring().is_subring(R): + raise ValueError('The new field must be a finite field ' \ + 'extension of the base field of the Ore polynomial ring.') + _check_base_fields(self.polring().base_ring(), R) + # ACTUAL WORK + new_frobenius = R.frobenius_endomorphism(self.frobenius().power()) + new_ore_polring = OrePolynomialRing(R, new_frobenius, + names=self.ore_polring().variable_names()) + return FiniteDrinfeldModule(self.polring(), new_ore_polring(self.gen())) + + def rank(self): + return self.gen().degree() + + ########################## + # Special Sage functions # + ########################## + + def _get_action_(self, extension): + return FiniteDrinfeldModuleAction(self, extension) + + def _latex_(self): + return f'\\text{{Finite{{ }}{latex(self.polring())}-Drinfeld{{ }}' \ + f'module{{ }}defined{{ }}over{{ }}}}' \ + f'{latex(self.ore_polring().base_ring())}\\text{{{{ }}' \ + f'by{{ }}}}\n' \ + f'\\begin{{align}}\n' \ + f' {latex(self.polring())}\n' \ + f' &\\to {latex(self.ore_polring())} \\\\\n' \ + f' {latex(self.polring().gen())}\n' \ + f' &\\mapsto {latex(self.gen())}\n' \ + f'\\end{{align}}' + + def _repr_(self): + return f'Finite Drinfeld module from {self.polring()} over ' \ + f'{self.ore_polring().base_ring()} defined by {self.gen()}.' + + ########### + # Getters # + ########### + + def frobenius(self): + return self.ore_polring().twisting_morphism() + + def gen(self): + [gen] = self.im_gens() + return gen + + def ore_polring(self): + return self.codomain() + + def polring(self): + return self.domain() + +class FiniteDrinfeldModuleAction(Action): + + def __init__(self, finite_drinfeld_module, extension): + # VERIFICATIONS + if not isinstance(finite_drinfeld_module, FiniteDrinfeldModule): + raise TypeError('First argument must be a FiniteDrinfeldModule') + if not (extension.is_field() and extension.is_finite() and + finite_drinfeld_module.polring().base_ring().is_subring(extension)): + raise ValueError('The extension must be a finite field ' \ + 'extension of the base field of the Ore polynomial ring') + # WORK + self.__finite_drinfeld_module = finite_drinfeld_module + super().__init__(finite_drinfeld_module.polring(), extension) + + ########### + # Methods # + ########### + + def extension(self): + return self.codomain() + + def finite_drinfeld_module(self): + return self.__finite_drinfeld_module + + ########################## + # Special Sage functions # + ########################## + + def _latex_(self): + phi = self.finite_drinfeld_module() + return f'\\text{{Drinfeld{{ }}module{{ }}action{{ }}' \ + f'on{{ }}}}{latex(self.extension())}\\text{{{{ }}' \ + f'induced{{ }}by{{ }}}}{latex(phi)}' + + def _repr_(self): + return f'Action on {self.domain()} induced by the ' \ + f'{self.finite_drinfeld_module()}' + + def _act_(self, g, x): + return self.finite_drinfeld_module().change_ring(self.extension())(g)(x) + + +def _check_base_fields(Fq, L): + if not (L.is_field() and L.is_finite() and Fq.is_subring(L)): + raise ValueError(f'The base field of the Ore polynomial ring must ' \ + 'be a finite field extension of the base field of the ' \ + 'polynomial ring') From 84c7b5b652ab828a68e492af31831fc25ed4b52a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 26 Apr 2022 20:58:53 +0200 Subject: [PATCH 002/751] Create draft for finite Drinfeld module doctest --- src/sage/modules/finite_drinfeld_module.py | 120 +++++++++++++++++++-- 1 file changed, 111 insertions(+), 9 deletions(-) diff --git a/src/sage/modules/finite_drinfeld_module.py b/src/sage/modules/finite_drinfeld_module.py index e6eb1f7aba1..8170da59e7b 100644 --- a/src/sage/modules/finite_drinfeld_module.py +++ b/src/sage/modules/finite_drinfeld_module.py @@ -1,16 +1,26 @@ r""" - +This module provides classes for finite Drinfeld modules +(`FiniteDrinfeldModule`) and their module action on the algebraic +closure of `\Fq` (`FiniteDrinfeldModuleAction`). - - -EXAMPLES:: +AUTHORS: - +- Antoine Leudière (2022-04): initial version -AUTHORS: +Let `\tau` be the `\Fq`-linear Frobenius endomorphism of `\Fqbar` +defined by `x \mapsto x^q`. Let `L\{\tau\}` be the ring of Ore +polynomials in `\tau` with coefficients in L. Fix an element `\omega` in +`L` (global parameter). A finite Drinfeld module is an `\Fq`-algebra +morphism `\phi: \Fq[X] \to L\{\tau\]` such that: + - the constant coefficient of `\phi(X)` is `\omega`, + - there exists at least one `a \in \Fq[X]` such that `\phi(a)` has a + non zero `\tau`-degree. -- Antoine Leudière (2022-04-26): initial version +As an `\Fq[X]`-algebra morphism, a finite Drinfeld module is only +determined by the image of `X`. +Crucially, the Drinfeld module `\phi` gives rise to the `\Fq[X]`-module +law on `\Fqbar` defined by `(a, x) = \phi(a)(x)`. """ #***************************************************************************** @@ -25,14 +35,106 @@ from sage.categories.action import Action from sage.categories.homset import Hom +from sage.misc.latex import latex from sage.rings.morphism import RingHomomorphism_im_gens from sage.rings.polynomial.ore_polynomial_element import OrePolynomial from sage.rings.polynomial.ore_polynomial_ring import OrePolynomialRing from sage.rings.polynomial.polynomial_ring import PolynomialRing_dense_finite_field -from sage.misc.latex import latex class FiniteDrinfeldModule(RingHomomorphism_im_gens): + r""" + Class for finite Drinfeld modules. + + INPUT: + + - ``polring`` -- the base polynomial ring + - ``gen`` -- the image of `X` + + EXAMPLES: + + .. RUBRIC:: Basics + + First, create base objects:: + + sage: Fq = GF(7^2) + sage: FqX. = Fq[] + sage: L = Fq.extension(3) + sage: frobenius = L.frobenius_endomorphism(2) + sage: Ltau. = OrePolynomialRing(L, frobenius) + + Then we instanciate the Drinfeld module:: + + sage: phi_X = 1 + t^2 + sage: phi = FiniteDrinfeldModule(FqX, phi_X) + sage: phi + Finite Drinfeld module from Univariate Polynomial Ring in X over Finite Field in z2 of size 7^2 over Finite Field in z6 of size 7^6 generated by t^2 + 1. + + There are getters for the base objects:: + + sage: phi.polring() + Univariate Polynomial Ring in X over Finite Field in z2 of size 7^2 + sage: phi.ore_polring() + Ore Polynomial Ring in t over Finite Field in z6 of size 7^6 twisted by z6 |--> z6^(7^2) + sage: phi.gen() + t^2 + 1 + + And the class inherits `RingHomomorphism_im_gens`, so that one can + use:: + + sage: phi.domain() + Univariate Polynomial Ring in X over Finite Field in z2 of size 7^2 + sage: phi.codomain() + Ore Polynomial Ring in t over Finite Field in z6 of size 7^6 twisted by z6 |--> z6^(7^2) + sage: phi.im_gens() + [t^2 + 1] + + The rank of the Drinfeld module is retrieved with:: + + sage: phi.rank() + 2 + + .. RUBRIC:: The module law induced by a Drinfeld module + + The most important feature of Drinfeld modules is that they induce + an `\Fq[X]`-module law on the algebraic closure `\Fqbar` of `\Fq`. + We implement this action for any finite field extension `M` of `L`. + The `_get_action_` method returns an `Action` object:: + + sage: M = L.extension(2) + sage: action = phi._get_action_(M) + sage: action + Action on Finite Field in z12 of size 7^12 induced by the Finite Drinfeld module from Univariate Polynomial Ring in X over Finite Field in z2 of size 7^2 over Finite Field in z6 of size 7^6 + generated by t^2 + 1. + sage: x = M.gen() + sage: g = X^3 + X + 5 + sage: action(g, x) + ... + 6*z12^11 + 5*z12^9 + 5*z12^8 + 2*z12^7 + 6*z12^6 + z12^5 + 6*z12^4 + 2*z12^3 + 3*z12^2 + 5*z12 + 4 + + Furthermore, it can be useful to embed a Drinfeld module into a + larger Ore polynomial ring:: + + sage: M = L.extension(2) + sage: psi = phi.change_ring(M); psi + Finite Drinfeld module from Univariate Polynomial Ring in X over Finite Field in z2 of size 7^2 over Finite Field in z12 of size 7^12 generated by t^2 + 1. + + .. NOTE:: + + The general definition of a Drinfeld module is out of the scope + of this implementation. + + :: + + You can see all available methods of `RingHomomorphism_im_gens` + with `dir(sage.rings.morphism.RingHomomorphism_im_gens)`. Same + for `Action`. + + .. SEEALSO:: + :mod:`sage.categories.action.Action` + :mod:`sage.rings.polynomial.ore_polynomial_element` + :mod:`sage.rings.polynomial.ore_polynomial_ring` + """ def __init__(self, polring, gen): # VERIFICATIONS @@ -107,7 +209,7 @@ def _latex_(self): def _repr_(self): return f'Finite Drinfeld module from {self.polring()} over ' \ - f'{self.ore_polring().base_ring()} defined by {self.gen()}.' + f'{self.ore_polring().base_ring()} generated by {self.gen()}.' ########### # Getters # From 2723f99dbcb6005d7446e47ca3ea8d20f1f09b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Wed, 27 Apr 2022 14:46:56 +0200 Subject: [PATCH 003/751] Fix FiniteDrinfeldModule action in all.py --- src/sage/modules/all.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sage/modules/all.py b/src/sage/modules/all.py index a6ca79ddf69..ab41fbcf564 100644 --- a/src/sage/modules/all.py +++ b/src/sage/modules/all.py @@ -30,3 +30,4 @@ lazy_import('sage.modules.free_quadratic_module_integer_symmetric', 'IntegralLattice') lazy_import('sage.modules.torsion_quadratic_module', 'TorsionQuadraticForm') lazy_import('sage.modules.finite_drinfeld_module', 'FiniteDrinfeldModule') +lazy_import('sage.modules.finite_drinfeld_module', 'FiniteDrinfeldModuleAction') From 8bef6ba375e8b60448764395d46c72144c9a66a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 5 May 2022 12:58:48 +0200 Subject: [PATCH 004/751] Refactor _latex_ method in FiniteDrinfeldModule --- src/sage/modules/finite_drinfeld_module.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sage/modules/finite_drinfeld_module.py b/src/sage/modules/finite_drinfeld_module.py index 8170da59e7b..5212bb808ff 100644 --- a/src/sage/modules/finite_drinfeld_module.py +++ b/src/sage/modules/finite_drinfeld_module.py @@ -197,15 +197,15 @@ def _get_action_(self, extension): def _latex_(self): return f'\\text{{Finite{{ }}{latex(self.polring())}-Drinfeld{{ }}' \ - f'module{{ }}defined{{ }}over{{ }}}}' \ - f'{latex(self.ore_polring().base_ring())}\\text{{{{ }}' \ - f'by{{ }}}}\n' \ + f'module{{ }}defined{{ }}by{{ }}}}\n' \ f'\\begin{{align}}\n' \ f' {latex(self.polring())}\n' \ f' &\\to {latex(self.ore_polring())} \\\\\n' \ f' {latex(self.polring().gen())}\n' \ f' &\\mapsto {latex(self.gen())}\n' \ - f'\\end{{align}}' + f'\\end{{align}}\n' \ + f'\\text{{with{{ }}characteristic{{ }}}} ' \ + f'{latex(self.characteristic())}' def _repr_(self): return f'Finite Drinfeld module from {self.polring()} over ' \ From f0a9f630a6f7be1215f883cbb9d07f893ca27cb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 6 May 2022 17:48:53 +0200 Subject: [PATCH 005/751] Refactor FiniteDrinfeldModuleAction --- src/sage/modules/finite_drinfeld_module.py | 31 +++++++++------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/src/sage/modules/finite_drinfeld_module.py b/src/sage/modules/finite_drinfeld_module.py index 5212bb808ff..68ee9630579 100644 --- a/src/sage/modules/finite_drinfeld_module.py +++ b/src/sage/modules/finite_drinfeld_module.py @@ -192,8 +192,8 @@ def rank(self): # Special Sage functions # ########################## - def _get_action_(self, extension): - return FiniteDrinfeldModuleAction(self, extension) + def _get_action_(self): + return FiniteDrinfeldModuleAction(self) def _latex_(self): return f'\\text{{Finite{{ }}{latex(self.polring())}-Drinfeld{{ }}' \ @@ -230,25 +230,19 @@ def polring(self): class FiniteDrinfeldModuleAction(Action): - def __init__(self, finite_drinfeld_module, extension): - # VERIFICATIONS + def __init__(self, finite_drinfeld_module): + # Verifications if not isinstance(finite_drinfeld_module, FiniteDrinfeldModule): raise TypeError('First argument must be a FiniteDrinfeldModule') - if not (extension.is_field() and extension.is_finite() and - finite_drinfeld_module.polring().base_ring().is_subring(extension)): - raise ValueError('The extension must be a finite field ' \ - 'extension of the base field of the Ore polynomial ring') - # WORK + # Work self.__finite_drinfeld_module = finite_drinfeld_module - super().__init__(finite_drinfeld_module.polring(), extension) + super().__init__(finite_drinfeld_module.polring(), + finite_drinfeld_module.ore_polring().base_ring()) ########### # Methods # ########### - def extension(self): - return self.codomain() - def finite_drinfeld_module(self): return self.__finite_drinfeld_module @@ -257,17 +251,16 @@ def finite_drinfeld_module(self): ########################## def _latex_(self): - phi = self.finite_drinfeld_module() - return f'\\text{{Drinfeld{{ }}module{{ }}action{{ }}' \ - f'on{{ }}}}{latex(self.extension())}\\text{{{{ }}' \ - f'induced{{ }}by{{ }}}}{latex(phi)}' + return f'\\text{{Action{{ }}on{{ }}}}' \ + f'{latex(self.extension())}\\text{{{{ }}' \ + f'induced{{ }}by{{ }}}}{self.finite_drinfeld_module()}' def _repr_(self): - return f'Action on {self.domain()} induced by the ' \ + return f'Action on {self.domain()} induced by ' \ f'{self.finite_drinfeld_module()}' def _act_(self, g, x): - return self.finite_drinfeld_module().change_ring(self.extension())(g)(x) + return self.finite_drinfeld_module()(g)(x) def _check_base_fields(Fq, L): From 86348fff6bdd0aec5a414ed07925291cb4e13041 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 5 May 2022 12:52:52 +0200 Subject: [PATCH 006/751] Add various getters for FiniteDrinfeldModule This commit is a bit dirty, apologies. There are new getters (see below), and the commit includes some refactoring of the doctests. The added getters are: - characteristic, - constant_term, - delta (rank two specific), - g (rank two specific), - height, - j (rank two specific). --- src/sage/modules/finite_drinfeld_module.py | 135 ++++++++++++++------- 1 file changed, 88 insertions(+), 47 deletions(-) diff --git a/src/sage/modules/finite_drinfeld_module.py b/src/sage/modules/finite_drinfeld_module.py index 68ee9630579..3f8f9b20a8c 100644 --- a/src/sage/modules/finite_drinfeld_module.py +++ b/src/sage/modules/finite_drinfeld_module.py @@ -36,6 +36,7 @@ from sage.categories.action import Action from sage.categories.homset import Hom from sage.misc.latex import latex +from sage.rings.integer import Integer from sage.rings.morphism import RingHomomorphism_im_gens from sage.rings.polynomial.ore_polynomial_element import OrePolynomial from sage.rings.polynomial.ore_polynomial_ring import OrePolynomialRing @@ -57,68 +58,75 @@ class FiniteDrinfeldModule(RingHomomorphism_im_gens): First, create base objects:: - sage: Fq = GF(7^2) + sage: Fq. = GF(3^2) sage: FqX. = Fq[] - sage: L = Fq.extension(3) - sage: frobenius = L.frobenius_endomorphism(2) - sage: Ltau. = OrePolynomialRing(L, frobenius) + sage: p = X^3 + (z2 + 2)*X^2 + (6*z2 + 1)*X + 3*z2 + 5 + sage: L = Fq.extension(6) + sage: Ltau. = OrePolynomialRing(L, L.frobenius_endomorphism(2)) + sage: omega = p.roots(L, multiplicities=False)[0] + sage: phi_X = omega + t + t^2 Then we instanciate the Drinfeld module:: - sage: phi_X = 1 + t^2 - sage: phi = FiniteDrinfeldModule(FqX, phi_X) + sage: phi = FiniteDrinfeldModule(FqX, phi_X, p) sage: phi - Finite Drinfeld module from Univariate Polynomial Ring in X over Finite Field in z2 of size 7^2 over Finite Field in z6 of size 7^6 generated by t^2 + 1. + Finite Drinfeld module: + Polring: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + Ore polring: Ore Polynomial Ring in t over Finite Field in z12 of size 3^12 twisted by z12 |--> z12^(3^2) + Generator: t^2 + t + z12^11 + z12^10 + z12^9 + 2*z12^5 + 2*z12^4 + z12^3 + 2*z12 + Characteristic: X^3 + (z2 + 2)*X^2 + X + 2 There are getters for the base objects:: sage: phi.polring() - Univariate Polynomial Ring in X over Finite Field in z2 of size 7^2 + Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 sage: phi.ore_polring() - Ore Polynomial Ring in t over Finite Field in z6 of size 7^6 twisted by z6 |--> z6^(7^2) + Ore Polynomial Ring in t over Finite Field in z12 of size 3^12 twisted by z12 |--> z12^(3^2) sage: phi.gen() - t^2 + 1 + t^2 + t + z12^11 + z12^10 + z12^9 + 2*z12^5 + 2*z12^4 + z12^3 + 2*z12 And the class inherits `RingHomomorphism_im_gens`, so that one can use:: sage: phi.domain() - Univariate Polynomial Ring in X over Finite Field in z2 of size 7^2 + Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 sage: phi.codomain() - Ore Polynomial Ring in t over Finite Field in z6 of size 7^6 twisted by z6 |--> z6^(7^2) + Ore Polynomial Ring in t over Finite Field in z12 of size 3^12 twisted by z12 |--> z12^(3^2) sage: phi.im_gens() - [t^2 + 1] + [t^2 + t + z12^11 + z12^10 + z12^9 + 2*z12^5 + 2*z12^4 + z12^3 + 2*z12] - The rank of the Drinfeld module is retrieved with:: + We can retrieve basic quantities: sage: phi.rank() 2 + sage: phi.j() + 1 .. RUBRIC:: The module law induced by a Drinfeld module The most important feature of Drinfeld modules is that they induce - an `\Fq[X]`-module law on the algebraic closure `\Fqbar` of `\Fq`. - We implement this action for any finite field extension `M` of `L`. - The `_get_action_` method returns an `Action` object:: + an `\Fq[X]`-module law on any subextension of the algebraic closure + `\Fqbar` of `\Fq`. For this, we created the class + `FiniteDrinfeldModuleAction`, which inherits `Action`. For the sake + of simplicity, `phi` will only act on the base field (`L`) of its + Ore polynomial ring. If you want to act on a bigger field, you can + use the method `change_ring`. sage: M = L.extension(2) - sage: action = phi._get_action_(M) - sage: action + sage: phi_M = phi.change_ring(M) # todo: not tested + sage: action = phi._get_action_() # todo: not tested + sage: action # todo: not tested Action on Finite Field in z12 of size 7^12 induced by the Finite Drinfeld module from Univariate Polynomial Ring in X over Finite Field in z2 of size 7^2 over Finite Field in z6 of size 7^6 generated by t^2 + 1. - sage: x = M.gen() - sage: g = X^3 + X + 5 - sage: action(g, x) + + The calculation of the action is simple: + + sage: x = M.gen() # todo: not tested + sage: g = X^3 + X + 5 # todo: not tested + sage: action(g, x) # todo: not tested ... 6*z12^11 + 5*z12^9 + 5*z12^8 + 2*z12^7 + 6*z12^6 + z12^5 + 6*z12^4 + 2*z12^3 + 3*z12^2 + 5*z12 + 4 - Furthermore, it can be useful to embed a Drinfeld module into a - larger Ore polynomial ring:: - - sage: M = L.extension(2) - sage: psi = phi.change_ring(M); psi - Finite Drinfeld module from Univariate Polynomial Ring in X over Finite Field in z2 of size 7^2 over Finite Field in z12 of size 7^12 generated by t^2 + 1. - .. NOTE:: The general definition of a Drinfeld module is out of the scope @@ -136,35 +144,37 @@ class FiniteDrinfeldModule(RingHomomorphism_im_gens): :mod:`sage.rings.polynomial.ore_polynomial_ring` """ - def __init__(self, polring, gen): - # VERIFICATIONS - # Check `polring` is an Fq[X]: - # See docstrings of `PolynomialRing_dense_finite_field` and - # `is_PolynomialRing`. - isinstance(polring, PolynomialRing_dense_finite_field) - # Check `gen` is an Ore polynomial: + def __init__(self, polring, gen, characteristic): + # Verifications + if not isinstance(polring, PolynomialRing_dense_finite_field): + raise TypeError('First argument must be a polynomial ring') + if not characteristic in polring: + raise TypeError('The characteristic must be in the polynomial ' \ + 'ring') + if not characteristic.is_prime(): + raise ValueError('The characteristic must be irreducible') if not isinstance(gen, OrePolynomial): raise TypeError('The generator must be an Ore polynomial') - # Now we can define those for convenience: + # We define those for convenience before continuing FqX = polring Ltau = gen.parent() Fq = FqX.base_ring() L = Ltau.base_ring() - # Check the Ore polynomial ring is an L{tau} with L a finite - # field extension of Fq: _check_base_fields(Fq, L) if not Ltau.twisting_derivation() is None: raise ValueError('The Ore polynomial ring should have no ' \ 'derivation') - # Check the frobenius is x -> x^q: if Ltau.twisting_morphism().power() != Fq.degree(): raise ValueError('The twisting morphism of the Ore polynomial ' \ 'ring must be the Frobenius endomorphism of the base ' \ 'field of the polynomial ring') - # The generator is not constant: + if characteristic(gen[0]) != 0: + raise ValueError('The constant coefficient of the generator ' \ + 'must be a root of the characteristic') if gen.is_constant(): raise ValueError('The generator must not be constant') - # ACTUAL WORK + # Finally + self.__characteristic = characteristic super().__init__(Hom(FqX, Ltau), gen) ########### @@ -183,7 +193,30 @@ def change_ring(self, R): new_frobenius = R.frobenius_endomorphism(self.frobenius().power()) new_ore_polring = OrePolynomialRing(R, new_frobenius, names=self.ore_polring().variable_names()) - return FiniteDrinfeldModule(self.polring(), new_ore_polring(self.gen())) + return FiniteDrinfeldModule(self.polring(), + new_ore_polring(self.gen()), self.characteristic()) + + def delta(self): + if self.rank() != 2: + raise ValueError('The rank must equal 2') + return self.gen()[2] + + def g(self): + if self.rank() != 2: + raise ValueError('The rank must equal 2') + return self.gen()[1] + + def height(self): + return Integer(1) + + def j(self): + if self.rank() != 2: + raise ValueError('The j-invariant is only defined for rank 2 ' \ + 'Drinfeld modules') + g = self.gen()[1] + delta = self.gen()[2] + q = self.polring().base_ring().order() + return (g**(q+1)) / delta def rank(self): return self.gen().degree() @@ -196,8 +229,7 @@ def _get_action_(self): return FiniteDrinfeldModuleAction(self) def _latex_(self): - return f'\\text{{Finite{{ }}{latex(self.polring())}-Drinfeld{{ }}' \ - f'module{{ }}defined{{ }}by{{ }}}}\n' \ + return f'\\text{{Finite{{ }}Drinfeld{{ }}module{{ }}defined{{ }}by{{ }}}}\n' \ f'\\begin{{align}}\n' \ f' {latex(self.polring())}\n' \ f' &\\to {latex(self.ore_polring())} \\\\\n' \ @@ -208,13 +240,22 @@ def _latex_(self): f'{latex(self.characteristic())}' def _repr_(self): - return f'Finite Drinfeld module from {self.polring()} over ' \ - f'{self.ore_polring().base_ring()} generated by {self.gen()}.' + return f'Finite Drinfeld module:\n' \ + f' Polring: {self.polring()}\n' \ + f' Ore polring: {self.ore_polring()}\n' \ + f' Generator: {self.gen()}\n' \ + f' Characteristic: {self.characteristic()}' ########### # Getters # ########### + def characteristic(self): + return self.__characteristic + + def constant_term(self): + return self.gen()[0] + def frobenius(self): return self.ore_polring().twisting_morphism() From 2c24562b74fdcb23c8844d727a15d8c217ff0ec5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 6 May 2022 17:43:31 +0200 Subject: [PATCH 007/751] Add methods to deal with complex multiplication in FiniteDrinfeldModule The added methods are: - frobenius_trace, - frobenius_norm, - invert (required by frobenius_norm), - is_ordinary, - is_supersingular, - characteristic_polynomial. --- src/sage/modules/finite_drinfeld_module.py | 69 +++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) diff --git a/src/sage/modules/finite_drinfeld_module.py b/src/sage/modules/finite_drinfeld_module.py index 3f8f9b20a8c..5bc6280d694 100644 --- a/src/sage/modules/finite_drinfeld_module.py +++ b/src/sage/modules/finite_drinfeld_module.py @@ -35,12 +35,15 @@ from sage.categories.action import Action from sage.categories.homset import Hom +from sage.matrix.constructor import Matrix from sage.misc.latex import latex +from sage.modules.free_module_element import vector from sage.rings.integer import Integer from sage.rings.morphism import RingHomomorphism_im_gens from sage.rings.polynomial.ore_polynomial_element import OrePolynomial from sage.rings.polynomial.ore_polynomial_ring import OrePolynomialRing from sage.rings.polynomial.polynomial_ring import PolynomialRing_dense_finite_field +from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing class FiniteDrinfeldModule(RingHomomorphism_im_gens): @@ -51,6 +54,10 @@ class FiniteDrinfeldModule(RingHomomorphism_im_gens): - ``polring`` -- the base polynomial ring - ``gen`` -- the image of `X` + - ``characteristic`` -- the Fq[X]-characteristic of the Drinfeld + module, i.e. an irreducible polynomial in `polring` that defines a + subextension of L (the base field of the Ore polynomial ring) and + for which the constant coefficient of `gen` is a root. EXAMPLES: @@ -173,10 +180,20 @@ def __init__(self, polring, gen, characteristic): 'must be a root of the characteristic') if gen.is_constant(): raise ValueError('The generator must not be constant') - # Finally + # Work self.__characteristic = characteristic super().__init__(Hom(FqX, Ltau), gen) + ################# + # Private utils # + ################# + + def _Fq(self): + return self.polring().base_ring() + + def _L(self): + return self.ore_polring().base_ring() + ########### # Methods # ########### @@ -196,11 +213,30 @@ def change_ring(self, R): return FiniteDrinfeldModule(self.polring(), new_ore_polring(self.gen()), self.characteristic()) + def characteristic_polynomial(self): + FqXT = PolynomialRing(self.polring(), 'T') + return FqXT([self.frobenius_norm(), self.frobenius_trace(), 1]) + def delta(self): if self.rank() != 2: raise ValueError('The rank must equal 2') return self.gen()[2] + def frobenius_norm(self): + # Notations from Schost-Musleh: + n = self._L().over(self._Fq()).degree_over(self._Fq()) + d = self.characteristic().degree() + m = n // d + norm = self._L().over(self._Fq())(self.delta()).norm() + return ((-1)**n) * (self.characteristic()**m) / norm + + def frobenius_trace(self): + # Notations from Schost-Musleh: + n = self._L().over(self._Fq()).degree_over(self._Fq()) + B = self.frobenius_norm() + t = self.ore_polring().gen() + return self.invert(t**n + (self(B) // t**n)) + def g(self): if self.rank() != 2: raise ValueError('The rank must equal 2') @@ -209,6 +245,37 @@ def g(self): def height(self): return Integer(1) + def invert(self, image): + """ + Given an Ore polynomial `image` of the form `phi(c)`, find c. + """ + if not image in self.ore_polring(): + raise TypeError('The tested image should be in the Ore ' \ + 'polynomial ring') + if image in self._L(): # Only works if `image` is in the image of self + return self._Fq()(image) + r = self.rank() + X = self.polring().gen() + k = image.degree() // r + m_lines = [[0 for _ in range(k+1)] for _ in range(k+1)] + for i in range(k+1): + phi_X_i = self(X**i) + for j in range(i+1): + m_lines[j][i] = phi_X_i[r*j] + m = Matrix(m_lines) + v = vector([list(image)[r*j] for j in range(k+1)]) + pre_image = self.polring()(list((m**(-1)) * v)) + if self(pre_image) == image: + return pre_image + else: + return None + + def is_supersingular(self): + return self.characteristic().divides(self.frobenius_trace()) + + def is_ordinary(self): + return not self.is_supersingular() + def j(self): if self.rank() != 2: raise ValueError('The j-invariant is only defined for rank 2 ' \ From 0499221177f9c76783cd672cb65ae52242a57c42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 10 May 2022 10:46:36 +0200 Subject: [PATCH 008/751] Add methods to deal with isogenies in FiniteDrinfeldModule The added methods are: - is_morphism, - is_endomorphism, - is_automorphism, - is_isogeny, - velu. --- src/sage/modules/finite_drinfeld_module.py | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/src/sage/modules/finite_drinfeld_module.py b/src/sage/modules/finite_drinfeld_module.py index 5bc6280d694..86d4d3253da 100644 --- a/src/sage/modules/finite_drinfeld_module.py +++ b/src/sage/modules/finite_drinfeld_module.py @@ -276,6 +276,30 @@ def is_supersingular(self): def is_ordinary(self): return not self.is_supersingular() + def is_morphism(self, candidate): + return candidate == 0 and self.is_isogeny(candidate) + + def is_isogeny(self, candidate): + if not candidate in self.ore_polring(): + raise TypeError('The candidate must be in the Ore polynomial ' \ + 'ring') + if candidate == 0: + return False + elif candidate in self.ore_polring().base_ring(): + return True + else: + return self.characteristic().degree().divides(candidate.valuation()) \ + and candidate.right_divides(candidate * self.gen()) + + def is_endomorphism(self, candidate): + return candidate == 0 or self == self.velu(candidate) + + def is_automorphism(self, candidate): + if not candidate in self.ore_polring(): + raise TypeError('The candidate must be in the Ore polynomial ' \ + 'ring') + return candidate != 0 and candidate in self._Fq() + def j(self): if self.rank() != 2: raise ValueError('The j-invariant is only defined for rank 2 ' \ @@ -288,6 +312,26 @@ def j(self): def rank(self): return self.gen().degree() + def velu(self, candidate): + if not candidate in self.ore_polring(): + raise TypeError('The candidate must be in the Ore polynomial ' \ + 'ring') + # There are two main ways to give the result. The first way is + # to return the Drinfeld module generated by the right-quotient + # of `candidate * self(X)` right-divided by `candidate`. The + # second way is to recursively find the coefficients (see + # arXiv:2203.06970, Eq. 1.1). For now, the former is + # implemented, as it is very easy to write. + if candidate == 0: + return None + if not self.characteristic().degree().divides(candidate.valuation()): + return None + q, r = (candidate * self.gen()).right_quo_rem(candidate) + if r != 0: + return None + else: + return FiniteDrinfeldModule(self.polring(), q, self.characteristic()) + ########################## # Special Sage functions # ########################## From 3609c915438fd89da5686cc310be848b587f672a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 10 May 2022 14:38:36 +0200 Subject: [PATCH 009/751] Move FiniteDrinfeldModule to sage.rings.function_field --- src/sage/modules/all.py | 2 -- src/sage/rings/function_field/all.py | 5 +++++ .../function_field}/finite_drinfeld_module.py | 0 3 files changed, 5 insertions(+), 2 deletions(-) rename src/sage/{modules => rings/function_field}/finite_drinfeld_module.py (100%) diff --git a/src/sage/modules/all.py b/src/sage/modules/all.py index ab41fbcf564..a90258d7ec8 100644 --- a/src/sage/modules/all.py +++ b/src/sage/modules/all.py @@ -29,5 +29,3 @@ lazy_import('sage.modules.multi_filtered_vector_space', 'MultiFilteredVectorSpace') lazy_import('sage.modules.free_quadratic_module_integer_symmetric', 'IntegralLattice') lazy_import('sage.modules.torsion_quadratic_module', 'TorsionQuadraticForm') -lazy_import('sage.modules.finite_drinfeld_module', 'FiniteDrinfeldModule') -lazy_import('sage.modules.finite_drinfeld_module', 'FiniteDrinfeldModuleAction') diff --git a/src/sage/rings/function_field/all.py b/src/sage/rings/function_field/all.py index b6bba3369c3..449d6f3f7a1 100644 --- a/src/sage/rings/function_field/all.py +++ b/src/sage/rings/function_field/all.py @@ -1 +1,6 @@ from .constructor import FunctionField + +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.rings.function_field.finite_drinfeld_module', 'FiniteDrinfeldModule') +lazy_import('sage.rings.function_field.finite_drinfeld_module', 'FiniteDrinfeldModuleAction') diff --git a/src/sage/modules/finite_drinfeld_module.py b/src/sage/rings/function_field/finite_drinfeld_module.py similarity index 100% rename from src/sage/modules/finite_drinfeld_module.py rename to src/sage/rings/function_field/finite_drinfeld_module.py From e3fc37f4ab6d0ea5034970751686d891429c6d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 12 May 2022 15:52:45 +0200 Subject: [PATCH 010/751] Fix method is_morphism in FiniteDrinfeldModule --- src/sage/rings/function_field/finite_drinfeld_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/function_field/finite_drinfeld_module.py b/src/sage/rings/function_field/finite_drinfeld_module.py index 86d4d3253da..b287725d460 100644 --- a/src/sage/rings/function_field/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/finite_drinfeld_module.py @@ -277,7 +277,7 @@ def is_ordinary(self): return not self.is_supersingular() def is_morphism(self, candidate): - return candidate == 0 and self.is_isogeny(candidate) + return candidate == 0 or self.is_isogeny(candidate) def is_isogeny(self, candidate): if not candidate in self.ore_polring(): From 0515d9b19b550ec27326bf978c9a0e8e555f4e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 12 May 2022 16:32:01 +0200 Subject: [PATCH 011/751] Add blank line before FiniteDrinfeldModuleAction (PEP8) --- src/sage/rings/function_field/finite_drinfeld_module.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sage/rings/function_field/finite_drinfeld_module.py b/src/sage/rings/function_field/finite_drinfeld_module.py index b287725d460..4f9f21995b5 100644 --- a/src/sage/rings/function_field/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/finite_drinfeld_module.py @@ -380,6 +380,7 @@ def ore_polring(self): def polring(self): return self.domain() + class FiniteDrinfeldModuleAction(Action): def __init__(self, finite_drinfeld_module): From 8c848d901a85e52e2a05fe0f13a16a25199db812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Wed, 11 May 2022 18:11:50 +0200 Subject: [PATCH 012/751] Refactor doctest in FiniteDrinfeldModule --- .../function_field/finite_drinfeld_module.py | 233 ++++++++++++++---- 1 file changed, 185 insertions(+), 48 deletions(-) diff --git a/src/sage/rings/function_field/finite_drinfeld_module.py b/src/sage/rings/function_field/finite_drinfeld_module.py index 4f9f21995b5..37e8e694803 100644 --- a/src/sage/rings/function_field/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/finite_drinfeld_module.py @@ -53,27 +53,31 @@ class FiniteDrinfeldModule(RingHomomorphism_im_gens): INPUT: - ``polring`` -- the base polynomial ring - - ``gen`` -- the image of `X` + - ``gen`` -- the generator of the Drinfeld module, i.e. the image of `X` in + the Ore polynomial ring - ``characteristic`` -- the Fq[X]-characteristic of the Drinfeld - module, i.e. an irreducible polynomial in `polring` that defines a - subextension of L (the base field of the Ore polynomial ring) and - for which the constant coefficient of `gen` is a root. + module, i.e. the minimal polynomial in `polring` of the constant term of + the generator EXAMPLES: - - .. RUBRIC:: Basics - First, create base objects:: + .. RUBRIC:: Instantiation - sage: Fq. = GF(3^2) + We must first create the base objects:: + + sage: Fq = GF(3^2) + sage: z2 = Fq.gen() sage: FqX. = Fq[] sage: p = X^3 + (z2 + 2)*X^2 + (6*z2 + 1)*X + 3*z2 + 5 sage: L = Fq.extension(6) - sage: Ltau. = OrePolynomialRing(L, L.frobenius_endomorphism(2)) + sage: frob = L.frobenius_endomorphism(2) + sage: Ltau. = OrePolynomialRing(L, frob) sage: omega = p.roots(L, multiplicities=False)[0] sage: phi_X = omega + t + t^2 - Then we instanciate the Drinfeld module:: + Notice that we have freedom on choosing the polynomial `p`, but not + `omega`. It is generally more useful this way. Then we instantiate the + Drinfeld module:: sage: phi = FiniteDrinfeldModule(FqX, phi_X, p) sage: phi @@ -83,67 +87,200 @@ class FiniteDrinfeldModule(RingHomomorphism_im_gens): Generator: t^2 + t + z12^11 + z12^10 + z12^9 + 2*z12^5 + 2*z12^4 + z12^3 + 2*z12 Characteristic: X^3 + (z2 + 2)*X^2 + X + 2 - There are getters for the base objects:: + .. RUBRIC:: Getters + + With getters, we can retrieve many basic objects associated to a Drinfeld + module. + + First, we can retrieve the polynomial ring, the Ore polynomial ring, and + the generator. Note that the class inherits `RingHomomorphism_im_gens`, so + that `domain`, `codomain` and `im_gens` are available:: sage: phi.polring() Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + sage: phi.domain() is phi.polring() + True sage: phi.ore_polring() Ore Polynomial Ring in t over Finite Field in z12 of size 3^12 twisted by z12 |--> z12^(3^2) + sage: phi.codomain() is phi.ore_polring() + True sage: phi.gen() t^2 + t + z12^11 + z12^10 + z12^9 + 2*z12^5 + 2*z12^4 + z12^3 + 2*z12 + sage: phi.im_gens()[0] is phi.gen() + True + + We can retrieve `omega`, the constant term of the generator, and ensure + that it is a root of `p`, the characteristic:: + + sage: phi.constant_term() + z12^11 + z12^10 + z12^9 + 2*z12^5 + 2*z12^4 + z12^3 + 2*z12 + sage: phi.constant_term() == omega + True + sage: phi.characteristic() + X^3 + (z2 + 2)*X^2 + X + 2 + sage: phi.characteristic() == p + True + sage: phi.characteristic()(phi.constant_term()) + 0 + + We can retrieve the rank and the height (note that the height is always one + here):: - And the class inherits `RingHomomorphism_im_gens`, so that one can - use:: + sage: phi.rank() + 2 + sage: phi.height() + 1 - sage: phi.domain() - Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - sage: phi.codomain() - Ore Polynomial Ring in t over Finite Field in z12 of size 3^12 twisted by z12 |--> z12^(3^2) - sage: phi.im_gens() - [t^2 + t + z12^11 + z12^10 + z12^9 + 2*z12^5 + 2*z12^4 + z12^3 + 2*z12] + And finally we can retrieve some rank-two specifics:: - We can retrieve basic quantities: + sage: phi.j() # j-invariant + 1 + sage: phi.g() # Standard notation + 1 + sage: phi.delta() # Standard notation + 1 + sage: phi(X) == phi.constant_term() + phi.g()*t + phi.delta()*t^2 + True - sage: phi.rank() - 2 - sage: phi.j() + .. RUBRIC:: Evaluation of the Drinfeld module + + By definition, a Drinfeld module is a ring morphism from an polynomial ring + to an Ore polynomial ring. We can compute the images under this morphism + using the standard `phi(...)` notation:: + + sage: phi(X) + t^2 + t + z12^11 + z12^10 + z12^9 + 2*z12^5 + 2*z12^4 + z12^3 + 2*z12 + sage: phi(X) == phi.gen() + True + sage: phi(1) 1 + sage: phi(z2) == z2 + True + sage: phi(X^2 + 1) + t^4 + 2*t^3 + (2*z12^11 + 2*z12^10 + z12^9 + z12^6 + z12^5 + 2*z12^4 + z12^3 + 2*z12^2 + z12 + 2)*t^2 + (2*z12^8 + z12^7 + 2*z12^6 + z12^5 + z12^4 + z12 + 1)*t + 2*z12^11 + 2*z12^10 + z12^8 + z12^7 + 2*z12^6 + 2*z12^5 + z12^4 + 2*z12 .. RUBRIC:: The module law induced by a Drinfeld module - The most important feature of Drinfeld modules is that they induce - an `\Fq[X]`-module law on any subextension of the algebraic closure - `\Fqbar` of `\Fq`. For this, we created the class - `FiniteDrinfeldModuleAction`, which inherits `Action`. For the sake - of simplicity, `phi` will only act on the base field (`L`) of its - Ore polynomial ring. If you want to act on a bigger field, you can - use the method `change_ring`. - - sage: M = L.extension(2) - sage: phi_M = phi.change_ring(M) # todo: not tested - sage: action = phi._get_action_() # todo: not tested - sage: action # todo: not tested - Action on Finite Field in z12 of size 7^12 induced by the Finite Drinfeld module from Univariate Polynomial Ring in X over Finite Field in z2 of size 7^2 over Finite Field in z6 of size 7^6 - generated by t^2 + 1. + The most important feature of Drinfeld modules is that they endow any + subextension of `Fqbar` with an `Fq[X]`-module law. This action is + represented by the class `FiniteDrinfeldModuleAction`, which inherits + `Action`. For the sake of simplicity, `phi` will only act on the base field + (`L`) of its Ore polynomial ring. If you want to act on a bigger field, you + can define a new Drinfeld module using the method `change_ring`. + + sage: action = phi._get_action_() + sage: action + Action on Finite Field in z12 of size 3^12 induced by Finite Drinfeld module: + Polring: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + Ore polring: Ore Polynomial Ring in t over Finite Field in z12 of size 3^12 twisted by z12 |--> z12^(3^2) + Generator: t^2 + t + z12^11 + z12^10 + z12^9 + 2*z12^5 + 2*z12^4 + z12^3 + 2*z12 + Characteristic: X^3 + (z2 + 2)*X^2 + X + 2 - The calculation of the action is simple: + The calculation of the action is simple. Careful, the evaluation of Ore + polynomial is, at the moment, experimental:: - sage: x = M.gen() # todo: not tested - sage: g = X^3 + X + 5 # todo: not tested - sage: action(g, x) # todo: not tested + sage: x = L.gen() + 1 + sage: g = X^3 + X + 5 + sage: action(g, x) ... - 6*z12^11 + 5*z12^9 + 5*z12^8 + 2*z12^7 + 6*z12^6 + z12^5 + 6*z12^4 + 2*z12^3 + 3*z12^2 + 5*z12 + 4 + z12^11 + z12^10 + 2*z12^9 + z12^7 + z12^6 + z12^4 + 2*z12^2 + z12 + 1 + + To change ring, use:: + + sage: M = L.extension(5) + sage: psi = phi.change_ring(M) + sage: psi + Finite Drinfeld module: + Polring: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + Ore polring: Ore Polynomial Ring in t over Finite Field in z60 of size 3^60 twisted by z60 |--> z60^(3^2) + Generator: t^2 + t + 2*z60^59 + z60^57 + 2*z60^56 + 2*z60^54 + 2*z60^53 + 2*z60^52 + z60^51 + z60^50 + 2*z60^48 + z60^47 + z60^46 + 2*z60^45 + 2*z60^44 + 2*z60^42 + 2*z60^41 + z60^40 + z60^39 + z60^38 + z60^37 + 2*z60^34 + z60^33 + z60^31 + 2*z60^29 + z60^27 + z60^26 + z60^25 + 2*z60^24 + z60^22 + 2*z60^21 + z60^19 + 2*z60^17 + 2*z60^16 + 2*z60^15 + z60^14 + z60^12 + z60^11 + 2*z60^10 + z60^8 + z60^7 + 2*z60^6 + 2*z60^5 + 2*z60 + 1 + Characteristic: X^3 + (z2 + 2)*X^2 + X + 2 + + .. RUBRIC:: Morphisms and isogenies + + Being given an Ore polynomial `m`, we can decide if `m` is a morphism or + isogeny of Drinfeld module whose domain is `phi`:: + + sage: m = phi(X) + sage: phi.is_morphism(m) + True + sage: phi.is_isogeny(m) + True + sage: phi.is_endomorphism(m) + True + sage: phi.is_automorphism(m) + False + sage: m = 0 + sage: phi.is_endomorphism(m) + True + sage: phi.is_automorphism(m) + False + sage: phi.is_isogeny(m) + False + sage: m = t^6 + sage: phi.is_endomorphism(m) + True + sage: phi.is_automorphism(m) + False + + We implemented the Vélu formula for Drinfeld modules, in the sense that + given `m`, we can compute (if it exists) the unique Drinfeld module `psi` + such that `m` is an isogeny from `phi` to `psi`:: + + sage: m = phi(X^2 + 1) + sage: phi.velu(m) + Finite Drinfeld module: + Polring: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + Ore polring: Ore Polynomial Ring in t over Finite Field in z12 of size 3^12 twisted by z12 |--> z12^(3^2) + Generator: t^2 + t + z12^11 + z12^10 + z12^9 + 2*z12^5 + 2*z12^4 + z12^3 + 2*z12 + Characteristic: X^3 + (z2 + 2)*X^2 + X + 2 + sage: phi.velu(m) == phi + True + sage: z12 = L.gen() + sage: m = (z12^7 + z12^6 + 2*z12^4)*t^3 + sage: phi.is_isogeny(m) + True + sage: phi.is_endomorphism(m) + False + sage: phi.velu(m) + Finite Drinfeld module: + Polring: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + Ore polring: Ore Polynomial Ring in t over Finite Field in z12 of size 3^12 twisted by z12 |--> z12^(3^2) + Generator: (2*z12^10 + z12^9 + 2*z12^7 + 2*z12^6 + z12^3 + 2*z12^2 + 2)*t^2 + (2*z12^9 + z12^7 + 2*z12^5 + z12 + 1)*t + z12^11 + z12^10 + z12^9 + 2*z12^5 + 2*z12^4 + z12^3 + 2*z12 + Characteristic: X^3 + (z2 + 2)*X^2 + X + 2 + sage: phi.velu(m) == phi + False + + .. RUBRIC:: Complex multiplication of Drinfeld modules + + There are various methods to manipulate the complex multiplication theory + of Drinfeld modules. We can compute the Frobenius norm, Frobenius trace and + characteristic polynomial:: + + sage: phi.frobenius_norm() + X^6 + (2*z2 + 1)*X^5 + (2*z2 + 1)*X^4 + (2*z2 + 2)*X^3 + z2*X^2 + X + 1 + sage: phi.frobenius_trace() + 2*X^3 + (2*z2 + 1)*X^2 + 2*X + z2 + 2 + sage: phi.characteristic_polynomial() + T^2 + (2*X^3 + (2*z2 + 1)*X^2 + 2*X + z2 + 2)*T + X^6 + (2*z2 + 1)*X^5 + (2*z2 + 1)*X^4 + (2*z2 + 2)*X^3 + z2*X^2 + X + 1 + + With those methods, it is easy to decide if a Drinfeld module is ordinary + or supersingular:: + + sage: phi.is_ordinary() + True + sage: phi.is_supersingular() + False - .. NOTE:: + .. NOTE:: - The general definition of a Drinfeld module is out of the scope - of this implementation. + The general definition of a Drinfeld module is out of the scope of this + implementation. :: - You can see all available methods of `RingHomomorphism_im_gens` - with `dir(sage.rings.morphism.RingHomomorphism_im_gens)`. Same - for `Action`. + You can see all available methods of `RingHomomorphism_im_gens` with + `dir(sage.rings.morphism.RingHomomorphism_im_gens)`. Same for `Action`. .. SEEALSO:: :mod:`sage.categories.action.Action` From 7c96d1f73f6d0ee9054eff247ade1a597381a449 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 12 May 2022 18:08:02 +0200 Subject: [PATCH 013/751] Alphabetically order methods in sage.rings.function_field.finite_drinfeld_module.py --- .../function_field/finite_drinfeld_module.py | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/sage/rings/function_field/finite_drinfeld_module.py b/src/sage/rings/function_field/finite_drinfeld_module.py index 37e8e694803..0c75d78f3f1 100644 --- a/src/sage/rings/function_field/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/finite_drinfeld_module.py @@ -407,14 +407,14 @@ def invert(self, image): else: return None - def is_supersingular(self): - return self.characteristic().divides(self.frobenius_trace()) - - def is_ordinary(self): - return not self.is_supersingular() + def is_automorphism(self, candidate): + if not candidate in self.ore_polring(): + raise TypeError('The candidate must be in the Ore polynomial ' \ + 'ring') + return candidate != 0 and candidate in self._Fq() - def is_morphism(self, candidate): - return candidate == 0 or self.is_isogeny(candidate) + def is_endomorphism(self, candidate): + return candidate == 0 or self == self.velu(candidate) def is_isogeny(self, candidate): if not candidate in self.ore_polring(): @@ -428,14 +428,14 @@ def is_isogeny(self, candidate): return self.characteristic().degree().divides(candidate.valuation()) \ and candidate.right_divides(candidate * self.gen()) - def is_endomorphism(self, candidate): - return candidate == 0 or self == self.velu(candidate) + def is_morphism(self, candidate): + return candidate == 0 or self.is_isogeny(candidate) - def is_automorphism(self, candidate): - if not candidate in self.ore_polring(): - raise TypeError('The candidate must be in the Ore polynomial ' \ - 'ring') - return candidate != 0 and candidate in self._Fq() + def is_ordinary(self): + return not self.is_supersingular() + + def is_supersingular(self): + return self.characteristic().divides(self.frobenius_trace()) def j(self): if self.rank() != 2: @@ -540,6 +540,9 @@ def finite_drinfeld_module(self): # Special Sage functions # ########################## + def _act_(self, g, x): + return self.finite_drinfeld_module()(g)(x) + def _latex_(self): return f'\\text{{Action{{ }}on{{ }}}}' \ f'{latex(self.extension())}\\text{{{{ }}' \ @@ -549,9 +552,6 @@ def _repr_(self): return f'Action on {self.domain()} induced by ' \ f'{self.finite_drinfeld_module()}' - def _act_(self, g, x): - return self.finite_drinfeld_module()(g)(x) - def _check_base_fields(Fq, L): if not (L.is_field() and L.is_finite() and Fq.is_subring(L)): From 1a7891f0bbbd8486a511407df223a436df3b08f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 13 May 2022 18:00:37 +0200 Subject: [PATCH 014/751] Create class FiniteDrinfeldModule_rank_two Rank two finite Drinfeld modules have specific enough properties to have their own class. Therefore, we created the class `FiniteDrinfeldModule_rank_two`. The following methods were moved from `FiniteDrinfeldModule` to `FiniteDrinfeldModule_rank_two`: - characteristic_polynomial, - delta, - frobenius_norm, - frobenius_trace, - g, - is_ordinary, - is_supersingular. Before this change, those methods were regular methods of just `FiniteDrinfeldModule`; an exception was raised when the rank of the Drinfeld module was not two. Furthermore, the methods `_latex_` and `_repr_` were slightly changed. --- src/sage/rings/function_field/all.py | 2 + .../function_field/finite_drinfeld_module.py | 108 +++++++++++------- 2 files changed, 66 insertions(+), 44 deletions(-) diff --git a/src/sage/rings/function_field/all.py b/src/sage/rings/function_field/all.py index 449d6f3f7a1..3b3f7bfc8bd 100644 --- a/src/sage/rings/function_field/all.py +++ b/src/sage/rings/function_field/all.py @@ -3,4 +3,6 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.rings.function_field.finite_drinfeld_module', 'FiniteDrinfeldModule') +lazy_import('sage.rings.function_field.finite_drinfeld_module', + 'FiniteDrinfeldModule_rank_two') lazy_import('sage.rings.function_field.finite_drinfeld_module', 'FiniteDrinfeldModuleAction') diff --git a/src/sage/rings/function_field/finite_drinfeld_module.py b/src/sage/rings/function_field/finite_drinfeld_module.py index 0c75d78f3f1..a9be93f93d4 100644 --- a/src/sage/rings/function_field/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/finite_drinfeld_module.py @@ -350,35 +350,6 @@ def change_ring(self, R): return FiniteDrinfeldModule(self.polring(), new_ore_polring(self.gen()), self.characteristic()) - def characteristic_polynomial(self): - FqXT = PolynomialRing(self.polring(), 'T') - return FqXT([self.frobenius_norm(), self.frobenius_trace(), 1]) - - def delta(self): - if self.rank() != 2: - raise ValueError('The rank must equal 2') - return self.gen()[2] - - def frobenius_norm(self): - # Notations from Schost-Musleh: - n = self._L().over(self._Fq()).degree_over(self._Fq()) - d = self.characteristic().degree() - m = n // d - norm = self._L().over(self._Fq())(self.delta()).norm() - return ((-1)**n) * (self.characteristic()**m) / norm - - def frobenius_trace(self): - # Notations from Schost-Musleh: - n = self._L().over(self._Fq()).degree_over(self._Fq()) - B = self.frobenius_norm() - t = self.ore_polring().gen() - return self.invert(t**n + (self(B) // t**n)) - - def g(self): - if self.rank() != 2: - raise ValueError('The rank must equal 2') - return self.gen()[1] - def height(self): return Integer(1) @@ -431,21 +402,6 @@ def is_isogeny(self, candidate): def is_morphism(self, candidate): return candidate == 0 or self.is_isogeny(candidate) - def is_ordinary(self): - return not self.is_supersingular() - - def is_supersingular(self): - return self.characteristic().divides(self.frobenius_trace()) - - def j(self): - if self.rank() != 2: - raise ValueError('The j-invariant is only defined for rank 2 ' \ - 'Drinfeld modules') - g = self.gen()[1] - delta = self.gen()[2] - q = self.polring().base_ring().order() - return (g**(q+1)) / delta - def rank(self): return self.gen().degree() @@ -518,6 +474,70 @@ def polring(self): return self.domain() +class FiniteDrinfeldModule_rank_two(FiniteDrinfeldModule): + + def __init__(self, polring, gen, characteristic): + if not isinstance(gen, OrePolynomial): + raise TypeError('The generator must be an Ore polynomial') + if gen.degree() != 2: + raise ValueError('The degree of the generator must be 2') + super().__init__(polring, gen, characteristic) + + ########### + # Methods # + ########### + + def characteristic_polynomial(self): + FqXT = PolynomialRing(self.polring(), 'T') + return FqXT([self.frobenius_norm(), self.frobenius_trace(), 1]) + + def frobenius_norm(self): + # Notations from Schost-Musleh: + n = self._L().over(self._Fq()).degree_over(self._Fq()) + d = self.characteristic().degree() + m = n // d + norm = self._L().over(self._Fq())(self.delta()).norm() + return ((-1)**n) * (self.characteristic()**m) / norm + + def frobenius_trace(self): + # Notations from Schost-Musleh: + n = self._L().over(self._Fq()).degree_over(self._Fq()) + B = self.frobenius_norm() + t = self.ore_polring().gen() + return self.invert(t**n + (self(B) // t**n)) + + def is_ordinary(self): + return not self.is_supersingular() + + def is_supersingular(self): + return self.characteristic().divides(self.frobenius_trace()) + + ########################## + # Special Sage functions # + ########################## + + def _repr_(self): + super_repr = super()._repr_() + return f'Rank two f{super_repr[1:]}' + + def _latex_(self): + super_latex = super()._latex_() + return f'{super_latex[:6]}Rank{{ }}two{{ }}f{super_latex[7:]}' + + ########### + # Getters # + ########### + + def delta(self): + return self.gen()[2] + + def g(self): + return self.gen()[1] + + def j(self): + return (self.g()**(q+1)) / self.delta() + + class FiniteDrinfeldModuleAction(Action): def __init__(self, finite_drinfeld_module): From 9bcadf21f86e8e4e6fda8e151ecb33db7acd6552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 9 Jun 2022 13:27:28 +0200 Subject: [PATCH 015/751] Fix j-invariant method for FiniteDrinfeldModule_rank_two --- src/sage/rings/function_field/finite_drinfeld_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/function_field/finite_drinfeld_module.py b/src/sage/rings/function_field/finite_drinfeld_module.py index a9be93f93d4..cf5b2ded53c 100644 --- a/src/sage/rings/function_field/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/finite_drinfeld_module.py @@ -535,7 +535,7 @@ def g(self): return self.gen()[1] def j(self): - return (self.g()**(q+1)) / self.delta() + return (self.g()**(self._Fq().order()+1)) / self.delta() class FiniteDrinfeldModuleAction(Action): From 343506477529fab41fd6188b1e23bbcf59ca684f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 16 Jun 2022 11:48:10 +0200 Subject: [PATCH 016/751] Delete class FiniteDrinfeldModule_rank_two --- .../function_field/finite_drinfeld_module.py | 95 ++++++++----------- 1 file changed, 41 insertions(+), 54 deletions(-) diff --git a/src/sage/rings/function_field/finite_drinfeld_module.py b/src/sage/rings/function_field/finite_drinfeld_module.py index cf5b2ded53c..481defdf284 100644 --- a/src/sage/rings/function_field/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/finite_drinfeld_module.py @@ -331,6 +331,11 @@ def _Fq(self): def _L(self): return self.ore_polring().base_ring() + def _test_rank_two(self): + if self.rank() != 2: + raise NotImplementedError('this method is only available for ' \ + 'rank two Drinfeld modules') + ########### # Methods # ########### @@ -425,6 +430,38 @@ def velu(self, candidate): else: return FiniteDrinfeldModule(self.polring(), q, self.characteristic()) + # Rank two methods + + def characteristic_polynomial(self): + self._test_rank_two() + FqXT = PolynomialRing(self.polring(), 'T') + return FqXT([self.frobenius_norm(), self.frobenius_trace(), 1]) + + def frobenius_norm(self): + self._test_rank_two() + # Notations from Schost-Musleh: + n = self._L().over(self._Fq()).degree_over(self._Fq()) + d = self.characteristic().degree() + m = n // d + norm = self._L().over(self._Fq())(self.delta()).norm() + return ((-1)**n) * (self.characteristic()**m) / norm + + def frobenius_trace(self): + self._test_rank_two() + # Notations from Schost-Musleh: + n = self._L().over(self._Fq()).degree_over(self._Fq()) + B = self.frobenius_norm() + t = self.ore_polring().gen() + return self.invert(t**n + (self(B) // t**n)) + + def is_ordinary(self): + self._test_rank_two() + return not self.is_supersingular() + + def is_supersingular(self): + self._test_rank_two() + return self.characteristic().divides(self.frobenius_trace()) + ########################## # Special Sage functions # ########################## @@ -473,68 +510,18 @@ def ore_polring(self): def polring(self): return self.domain() - -class FiniteDrinfeldModule_rank_two(FiniteDrinfeldModule): - - def __init__(self, polring, gen, characteristic): - if not isinstance(gen, OrePolynomial): - raise TypeError('The generator must be an Ore polynomial') - if gen.degree() != 2: - raise ValueError('The degree of the generator must be 2') - super().__init__(polring, gen, characteristic) - - ########### - # Methods # - ########### - - def characteristic_polynomial(self): - FqXT = PolynomialRing(self.polring(), 'T') - return FqXT([self.frobenius_norm(), self.frobenius_trace(), 1]) - - def frobenius_norm(self): - # Notations from Schost-Musleh: - n = self._L().over(self._Fq()).degree_over(self._Fq()) - d = self.characteristic().degree() - m = n // d - norm = self._L().over(self._Fq())(self.delta()).norm() - return ((-1)**n) * (self.characteristic()**m) / norm - - def frobenius_trace(self): - # Notations from Schost-Musleh: - n = self._L().over(self._Fq()).degree_over(self._Fq()) - B = self.frobenius_norm() - t = self.ore_polring().gen() - return self.invert(t**n + (self(B) // t**n)) - - def is_ordinary(self): - return not self.is_supersingular() - - def is_supersingular(self): - return self.characteristic().divides(self.frobenius_trace()) - - ########################## - # Special Sage functions # - ########################## - - def _repr_(self): - super_repr = super()._repr_() - return f'Rank two f{super_repr[1:]}' - - def _latex_(self): - super_latex = super()._latex_() - return f'{super_latex[:6]}Rank{{ }}two{{ }}f{super_latex[7:]}' - - ########### - # Getters # - ########### + # Rank two methods def delta(self): + self._test_rank_two() return self.gen()[2] def g(self): + self._test_rank_two() return self.gen()[1] def j(self): + self._test_rank_two() return (self.g()**(self._Fq().order()+1)) / self.delta() From a32d290ec526a52c48ed34dd8464f0a070b96c29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 16 Jun 2022 15:22:36 +0200 Subject: [PATCH 017/751] Make FiniteDrinfeldModule inherit CategoryObject --- .../function_field/finite_drinfeld_module.py | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/sage/rings/function_field/finite_drinfeld_module.py b/src/sage/rings/function_field/finite_drinfeld_module.py index 481defdf284..dba6444eb97 100644 --- a/src/sage/rings/function_field/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/finite_drinfeld_module.py @@ -44,9 +44,10 @@ from sage.rings.polynomial.ore_polynomial_ring import OrePolynomialRing from sage.rings.polynomial.polynomial_ring import PolynomialRing_dense_finite_field from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing +from sage.structure.category_object import CategoryObject -class FiniteDrinfeldModule(RingHomomorphism_im_gens): +class FiniteDrinfeldModule(CategoryObject): r""" Class for finite Drinfeld modules. @@ -318,8 +319,12 @@ def __init__(self, polring, gen, characteristic): if gen.is_constant(): raise ValueError('The generator must not be constant') # Work - self.__characteristic = characteristic - super().__init__(Hom(FqX, Ltau), gen) + self._characteristic = characteristic + self._morphism = Hom(FqX, Ltau)(gen) + self._polring = FqX + self._ore_polring = Ltau + self._gen = gen + super().__init__() ################# # Private utils # @@ -340,6 +345,9 @@ def _test_rank_two(self): # Methods # ########### + def __call__(self, a): + return self._morphism(a) + def change_ring(self, R): # VERIFICATIONS if not R.is_field() and R.is_finite(): @@ -492,7 +500,7 @@ def _repr_(self): ########### def characteristic(self): - return self.__characteristic + return self._characteristic def constant_term(self): return self.gen()[0] @@ -501,14 +509,16 @@ def frobenius(self): return self.ore_polring().twisting_morphism() def gen(self): - [gen] = self.im_gens() - return gen + return self._gen + + def morphism(self): + return self._morphism def ore_polring(self): - return self.codomain() + return self._ore_polring def polring(self): - return self.domain() + return self._polring # Rank two methods @@ -524,9 +534,7 @@ def j(self): self._test_rank_two() return (self.g()**(self._Fq().order()+1)) / self.delta() - class FiniteDrinfeldModuleAction(Action): - def __init__(self, finite_drinfeld_module): # Verifications if not isinstance(finite_drinfeld_module, FiniteDrinfeldModule): From 135506941bfa1ad703abe0bd899c9a75f7e65fdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 16 Jun 2022 15:22:56 +0200 Subject: [PATCH 018/751] Fix FiniteDrinfeldModule characteristic polynomial --- src/sage/rings/function_field/finite_drinfeld_module.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sage/rings/function_field/finite_drinfeld_module.py b/src/sage/rings/function_field/finite_drinfeld_module.py index dba6444eb97..31d6e2e3558 100644 --- a/src/sage/rings/function_field/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/finite_drinfeld_module.py @@ -35,6 +35,7 @@ from sage.categories.action import Action from sage.categories.homset import Hom +from sage.categories.drinfeld_modules import DrinfeldModules from sage.matrix.constructor import Matrix from sage.misc.latex import latex from sage.modules.free_module_element import vector @@ -319,12 +320,12 @@ def __init__(self, polring, gen, characteristic): if gen.is_constant(): raise ValueError('The generator must not be constant') # Work + super().__init__(category=DrinfeldModules(FqX, gen.parent())) self._characteristic = characteristic self._morphism = Hom(FqX, Ltau)(gen) self._polring = FqX self._ore_polring = Ltau self._gen = gen - super().__init__() ################# # Private utils # @@ -443,7 +444,7 @@ def velu(self, candidate): def characteristic_polynomial(self): self._test_rank_two() FqXT = PolynomialRing(self.polring(), 'T') - return FqXT([self.frobenius_norm(), self.frobenius_trace(), 1]) + return FqXT([self.frobenius_norm(), -self.frobenius_trace(), 1]) def frobenius_norm(self): self._test_rank_two() From 927c47c3a1583dd4dbe9bded6af4a869d2e30b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 16 Jun 2022 16:21:06 +0200 Subject: [PATCH 019/751] Create category DrinfeldModules --- src/sage/categories/drinfeld_modules.py | 62 +++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 src/sage/categories/drinfeld_modules.py diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py new file mode 100644 index 00000000000..14ca0fe1b3a --- /dev/null +++ b/src/sage/categories/drinfeld_modules.py @@ -0,0 +1,62 @@ +r""" +Drinfeld modules +""" +#***************************************************************************** +# Copyright (C) 2022 Xavier Caruso +# Antoine Leudière +# +# Distributed under the terms of the GNU General Public License (GPL) +# http://www.gnu.org/licenses/ +#****************************************************************************** + +from sage.categories.category import CategoryWithParameters + +# from sage.misc.cachefunc import cached_method +# from sage.categories.basic import Fields + +class DrinfeldModules(CategoryWithParameters): + r""" + The category of Drinfeld modules. + + EXAMPLES: + + We create the category of function fields:: + + sage: C = FunctionFields() + sage: C + Category of function fields + + TESTS:: + + sage: TestSuite(FunctionFields()).run() + """ + + def __init__(self, domain, codomain): + r""" + """ + self._domain = domain + self._codomain = codomain + + def _call_(self, phi_X): + r""" + Constructs an object in this category from the data in ``x``, + or throws a TypeError. + """ + return FiniteDrinfeldModule(self._domain, self._codomain(x), characteristic) + + def super_categories(self): + return [] + + def _repr_(self): + return f'Category of Drinfeld modules:\n'\ + f' Domain: {self._domain}\n' \ + f' Codomain: {self._codomain}' + + def _make_named_class_key(self, name): + return self._domain.category() + + class ParentMethods: + pass + + class ElementMethods: + pass From 2537cb3691639719f54ce3935bc03610028f542f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 16 Jun 2022 16:51:16 +0200 Subject: [PATCH 020/751] Define category DrinfeldModules with gamma --- src/sage/categories/drinfeld_modules.py | 28 ++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 14ca0fe1b3a..bc0f15ea313 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -10,6 +10,9 @@ #****************************************************************************** from sage.categories.category import CategoryWithParameters +from sage.misc.functional import log +from sage.rings.polynomial.polynomial_ring import PolynomialRing_general +from sage.rings.polynomial.ore_polynomial_ring import OrePolynomialRing # from sage.misc.cachefunc import cached_method # from sage.categories.basic import Fields @@ -31,11 +34,30 @@ class DrinfeldModules(CategoryWithParameters): sage: TestSuite(FunctionFields()).run() """ - def __init__(self, domain, codomain): + def __init__(self, gamma, name='t'): r""" """ - self._domain = domain - self._codomain = codomain + self._gamma = gamma + self._domain = FqX = gamma.domain() + K = gamma.codomain() + if not isinstance(FqX, PolynomialRing_general): + raise NotImplementedError('domain must be a polynomial ring') + Fq = FqX.base_ring() + if not Fq.is_field() or not Fq.is_finite() : + raise TypeError('the base ring of the domain must be a finite field') + d = log(Fq.cardinality(), Fq.characteristic()) + tau = K.frobenius_endomorphism(d) + self._codomain = OrePolynomialRing(K, tau, names=name) + # Create characteristic + if K.is_finite(): + f = gamma * FqX.coerce_map_from(Fq) + E = K.over(f) + self._characteristic = E(gamma(FqX.gen())).minpoly() + + def characteristic(self): + if not K.is_finite(): + raise NotImplementedError + return self._characteristic def _call_(self, phi_X): r""" From 445efbe2739fe13640041c2397f506c1d4d13eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 16 Jun 2022 16:51:30 +0200 Subject: [PATCH 021/751] Change DrinfeldModules _repr_ --- src/sage/categories/drinfeld_modules.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index bc0f15ea313..7a5f057bbc6 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -70,9 +70,7 @@ def super_categories(self): return [] def _repr_(self): - return f'Category of Drinfeld modules:\n'\ - f' Domain: {self._domain}\n' \ - f' Codomain: {self._codomain}' + return f'Category of Drinfeld modules defined by {self._gamma}' def _make_named_class_key(self, name): return self._domain.category() From d032810e44b1a6bd29d97b9bd600481808765c72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 16 Jun 2022 17:33:32 +0200 Subject: [PATCH 022/751] BACKUP COMMIT --- src/sage/categories/drinfeld_modules.py | 23 +++++- .../function_field/finite_drinfeld_module.py | 75 +++++++++---------- 2 files changed, 55 insertions(+), 43 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 7a5f057bbc6..e35b95a18a3 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -49,22 +49,27 @@ def __init__(self, gamma, name='t'): tau = K.frobenius_endomorphism(d) self._codomain = OrePolynomialRing(K, tau, names=name) # Create characteristic + self._characteristic = None if K.is_finite(): f = gamma * FqX.coerce_map_from(Fq) E = K.over(f) self._characteristic = E(gamma(FqX.gen())).minpoly() def characteristic(self): - if not K.is_finite(): + if self._characteristic is None: raise NotImplementedError return self._characteristic - def _call_(self, phi_X): + def _call_(self, gen): r""" Constructs an object in this category from the data in ``x``, or throws a TypeError. """ - return FiniteDrinfeldModule(self._domain, self._codomain(x), characteristic) + from sage.rings.function_field.finite_drinfeld_module import FiniteDrinfeldModule + gen = self._codomain(gen) + if self.characteristic()(gen[0]) != 0: + raise ValueError('incorrect characteristic') + return FiniteDrinfeldModule(self._domain, gen) def super_categories(self): return [] @@ -75,8 +80,18 @@ def _repr_(self): def _make_named_class_key(self, name): return self._domain.category() + def domain(self): + return self._domain + + def codomain(self): + return self._codomain + + def gamma(self): + return self._gamma + class ParentMethods: - pass + def characteristic(self): + return self.category().characteristic() class ElementMethods: pass diff --git a/src/sage/rings/function_field/finite_drinfeld_module.py b/src/sage/rings/function_field/finite_drinfeld_module.py index 31d6e2e3558..6eb18fde0c2 100644 --- a/src/sage/rings/function_field/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/finite_drinfeld_module.py @@ -46,6 +46,7 @@ from sage.rings.polynomial.polynomial_ring import PolynomialRing_dense_finite_field from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.structure.category_object import CategoryObject +from sage.structure.sequence import Sequence class FiniteDrinfeldModule(CategoryObject): @@ -290,42 +291,34 @@ class FiniteDrinfeldModule(CategoryObject): :mod:`sage.rings.polynomial.ore_polynomial_ring` """ - def __init__(self, polring, gen, characteristic): - # Verifications - if not isinstance(polring, PolynomialRing_dense_finite_field): - raise TypeError('First argument must be a polynomial ring') - if not characteristic in polring: - raise TypeError('The characteristic must be in the polynomial ' \ - 'ring') - if not characteristic.is_prime(): - raise ValueError('The characteristic must be irreducible') - if not isinstance(gen, OrePolynomial): - raise TypeError('The generator must be an Ore polynomial') - # We define those for convenience before continuing - FqX = polring - Ltau = gen.parent() - Fq = FqX.base_ring() - L = Ltau.base_ring() - _check_base_fields(Fq, L) - if not Ltau.twisting_derivation() is None: - raise ValueError('The Ore polynomial ring should have no ' \ - 'derivation') - if Ltau.twisting_morphism().power() != Fq.degree(): - raise ValueError('The twisting morphism of the Ore polynomial ' \ - 'ring must be the Frobenius endomorphism of the base ' \ - 'field of the polynomial ring') - if characteristic(gen[0]) != 0: - raise ValueError('The constant coefficient of the generator ' \ - 'must be a root of the characteristic') - if gen.is_constant(): - raise ValueError('The generator must not be constant') + def __init__(self, polring, gen, name='t'): + Fq = polring.base_ring() + if isinstance(gen, OrePolynomial): + Ltau = gen.parent() + L = Ltau.base_ring() + name = Ltau.variable_name() + elif isinstance(gen, (list, tuple)): + Ltau = None + L = Sequence(gen).universe() + else: + raise TypeError('generator must be an Ore polynomial or a list of coefficients') + if not L.has_coerce_map_from(Fq): + raise TypeError('base ring of polring must coerce to base ring ' \ + 'of Ore polynomial ring') + gamma = Hom(polring, L)(gen[0]) + category = DrinfeldModules(gamma, name=name) + if Ltau is not None and Ltau is not category.codomain(): + raise ValueError(f'generator must lie in {category.codomain()}') + Ltau = category.codomain() + self._gen = Ltau(gen) + if self._gen.degree() <= 0: + raise ValueError('generator must have positive degree') # Work - super().__init__(category=DrinfeldModules(FqX, gen.parent())) - self._characteristic = characteristic - self._morphism = Hom(FqX, Ltau)(gen) - self._polring = FqX + super().__init__(category=category) + self._morphism = Hom(polring, Ltau)(self._gen) + self._polring = polring self._ore_polring = Ltau - self._gen = gen + self._ore_variable = Ltau.gen() ################# # Private utils # @@ -346,6 +339,11 @@ def _test_rank_two(self): # Methods # ########### + def __eq__(self, other): + if not isinstance(other, FiniteDrinfeldModule): + return False + return self.category() is other.category() and self.gen() == other.gen() + def __call__(self, a): return self._morphism(a) @@ -493,16 +491,12 @@ def _repr_(self): return f'Finite Drinfeld module:\n' \ f' Polring: {self.polring()}\n' \ f' Ore polring: {self.ore_polring()}\n' \ - f' Generator: {self.gen()}\n' \ - f' Characteristic: {self.characteristic()}' + f' Generator: {self.gen()}' \ ########### # Getters # ########### - def characteristic(self): - return self._characteristic - def constant_term(self): return self.gen()[0] @@ -518,6 +512,9 @@ def morphism(self): def ore_polring(self): return self._ore_polring + def ore_variable(self): + return self._ore_variable + def polring(self): return self._polring From 94bad90cd43c800227f5cbdf62595ee67a02c61c Mon Sep 17 00:00:00 2001 From: Xavier Caruso Date: Tue, 21 Jun 2022 12:33:46 +0200 Subject: [PATCH 023/751] characteristic polynomial of Frobenius in all rank --- .../rings/function_field/finite_drinfeld_module.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/sage/rings/function_field/finite_drinfeld_module.py b/src/sage/rings/function_field/finite_drinfeld_module.py index 6eb18fde0c2..55c48eb0772 100644 --- a/src/sage/rings/function_field/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/finite_drinfeld_module.py @@ -290,7 +290,6 @@ class FiniteDrinfeldModule(CategoryObject): :mod:`sage.rings.polynomial.ore_polynomial_element` :mod:`sage.rings.polynomial.ore_polynomial_ring` """ - def __init__(self, polring, gen, name='t'): Fq = polring.base_ring() if isinstance(gen, OrePolynomial): @@ -435,7 +434,14 @@ def velu(self, candidate): if r != 0: return None else: - return FiniteDrinfeldModule(self.polring(), q, self.characteristic()) + return FiniteDrinfeldModule(self.polring(), q) + + def frobenius_charpoly(self, var='x'): + # Does not work when Fq is not a prime field... + chi = self._gen.reduced_charpoly() + A = self._polring + S = PolynomialRing(A, name=var) + return -chi(A.gen(), S.gen()) # Rank two methods From 3b47737b087305806a6d07d5f2da595f0183fef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Wed, 22 Jun 2022 13:29:11 +0200 Subject: [PATCH 024/751] Change FiniteDrinfeldModule to DrinfeldModule --- src/sage/rings/function_field/all.py | 6 ++-- ..._drinfeld_module.py => drinfeld_module.py} | 36 +++++++++---------- 2 files changed, 20 insertions(+), 22 deletions(-) rename src/sage/rings/function_field/{finite_drinfeld_module.py => drinfeld_module.py} (95%) diff --git a/src/sage/rings/function_field/all.py b/src/sage/rings/function_field/all.py index 3b3f7bfc8bd..86d2372ff67 100644 --- a/src/sage/rings/function_field/all.py +++ b/src/sage/rings/function_field/all.py @@ -2,7 +2,5 @@ from sage.misc.lazy_import import lazy_import -lazy_import('sage.rings.function_field.finite_drinfeld_module', 'FiniteDrinfeldModule') -lazy_import('sage.rings.function_field.finite_drinfeld_module', - 'FiniteDrinfeldModule_rank_two') -lazy_import('sage.rings.function_field.finite_drinfeld_module', 'FiniteDrinfeldModuleAction') +lazy_import('sage.rings.function_field.drinfeld_module', 'DrinfeldModule') +lazy_import('sage.rings.function_field.drinfeld_module', 'DrinfeldModuleAction') diff --git a/src/sage/rings/function_field/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_module.py similarity index 95% rename from src/sage/rings/function_field/finite_drinfeld_module.py rename to src/sage/rings/function_field/drinfeld_module.py index 6eb18fde0c2..9e11f8c6ad6 100644 --- a/src/sage/rings/function_field/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_module.py @@ -1,7 +1,7 @@ r""" This module provides classes for finite Drinfeld modules -(`FiniteDrinfeldModule`) and their module action on the algebraic -closure of `\Fq` (`FiniteDrinfeldModuleAction`). +(`DrinfeldModule`) and their module action on the algebraic +closure of `\Fq` (`DrinfeldModuleAction`). AUTHORS: @@ -49,7 +49,7 @@ from sage.structure.sequence import Sequence -class FiniteDrinfeldModule(CategoryObject): +class DrinfeldModule(CategoryObject): r""" Class for finite Drinfeld modules. @@ -82,9 +82,9 @@ class FiniteDrinfeldModule(CategoryObject): `omega`. It is generally more useful this way. Then we instantiate the Drinfeld module:: - sage: phi = FiniteDrinfeldModule(FqX, phi_X, p) + sage: phi = DrinfeldModule(FqX, phi_X, p) sage: phi - Finite Drinfeld module: + Drinfeld module: Polring: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 Ore polring: Ore Polynomial Ring in t over Finite Field in z12 of size 3^12 twisted by z12 |--> z12^(3^2) Generator: t^2 + t + z12^11 + z12^10 + z12^9 + 2*z12^5 + 2*z12^4 + z12^3 + 2*z12 @@ -166,14 +166,14 @@ class FiniteDrinfeldModule(CategoryObject): The most important feature of Drinfeld modules is that they endow any subextension of `Fqbar` with an `Fq[X]`-module law. This action is - represented by the class `FiniteDrinfeldModuleAction`, which inherits + represented by the class `DrinfeldModuleAction`, which inherits `Action`. For the sake of simplicity, `phi` will only act on the base field (`L`) of its Ore polynomial ring. If you want to act on a bigger field, you can define a new Drinfeld module using the method `change_ring`. sage: action = phi._get_action_() sage: action - Action on Finite Field in z12 of size 3^12 induced by Finite Drinfeld module: + Action on Finite Field in z12 of size 3^12 induced by Drinfeld module: Polring: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 Ore polring: Ore Polynomial Ring in t over Finite Field in z12 of size 3^12 twisted by z12 |--> z12^(3^2) Generator: t^2 + t + z12^11 + z12^10 + z12^9 + 2*z12^5 + 2*z12^4 + z12^3 + 2*z12 @@ -193,7 +193,7 @@ class FiniteDrinfeldModule(CategoryObject): sage: M = L.extension(5) sage: psi = phi.change_ring(M) sage: psi - Finite Drinfeld module: + Drinfeld module: Polring: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 Ore polring: Ore Polynomial Ring in t over Finite Field in z60 of size 3^60 twisted by z60 |--> z60^(3^2) Generator: t^2 + t + 2*z60^59 + z60^57 + 2*z60^56 + 2*z60^54 + 2*z60^53 + 2*z60^52 + z60^51 + z60^50 + 2*z60^48 + z60^47 + z60^46 + 2*z60^45 + 2*z60^44 + 2*z60^42 + 2*z60^41 + z60^40 + z60^39 + z60^38 + z60^37 + 2*z60^34 + z60^33 + z60^31 + 2*z60^29 + z60^27 + z60^26 + z60^25 + 2*z60^24 + z60^22 + 2*z60^21 + z60^19 + 2*z60^17 + 2*z60^16 + 2*z60^15 + z60^14 + z60^12 + z60^11 + 2*z60^10 + z60^8 + z60^7 + 2*z60^6 + 2*z60^5 + 2*z60 + 1 @@ -232,7 +232,7 @@ class FiniteDrinfeldModule(CategoryObject): sage: m = phi(X^2 + 1) sage: phi.velu(m) - Finite Drinfeld module: + Drinfeld module: Polring: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 Ore polring: Ore Polynomial Ring in t over Finite Field in z12 of size 3^12 twisted by z12 |--> z12^(3^2) Generator: t^2 + t + z12^11 + z12^10 + z12^9 + 2*z12^5 + 2*z12^4 + z12^3 + 2*z12 @@ -246,7 +246,7 @@ class FiniteDrinfeldModule(CategoryObject): sage: phi.is_endomorphism(m) False sage: phi.velu(m) - Finite Drinfeld module: + Drinfeld module: Polring: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 Ore polring: Ore Polynomial Ring in t over Finite Field in z12 of size 3^12 twisted by z12 |--> z12^(3^2) Generator: (2*z12^10 + z12^9 + 2*z12^7 + 2*z12^6 + z12^3 + 2*z12^2 + 2)*t^2 + (2*z12^9 + z12^7 + 2*z12^5 + z12 + 1)*t + z12^11 + z12^10 + z12^9 + 2*z12^5 + 2*z12^4 + z12^3 + 2*z12 @@ -340,7 +340,7 @@ def _test_rank_two(self): ########### def __eq__(self, other): - if not isinstance(other, FiniteDrinfeldModule): + if not isinstance(other, DrinfeldModule): return False return self.category() is other.category() and self.gen() == other.gen() @@ -359,7 +359,7 @@ def change_ring(self, R): new_frobenius = R.frobenius_endomorphism(self.frobenius().power()) new_ore_polring = OrePolynomialRing(R, new_frobenius, names=self.ore_polring().variable_names()) - return FiniteDrinfeldModule(self.polring(), + return DrinfeldModule(self.polring(), new_ore_polring(self.gen()), self.characteristic()) def height(self): @@ -435,7 +435,7 @@ def velu(self, candidate): if r != 0: return None else: - return FiniteDrinfeldModule(self.polring(), q, self.characteristic()) + return DrinfeldModule(self.polring(), q, self.characteristic()) # Rank two methods @@ -474,7 +474,7 @@ def is_supersingular(self): ########################## def _get_action_(self): - return FiniteDrinfeldModuleAction(self) + return DrinfeldModuleAction(self) def _latex_(self): return f'\\text{{Finite{{ }}Drinfeld{{ }}module{{ }}defined{{ }}by{{ }}}}\n' \ @@ -488,7 +488,7 @@ def _latex_(self): f'{latex(self.characteristic())}' def _repr_(self): - return f'Finite Drinfeld module:\n' \ + return f'Drinfeld module:\n' \ f' Polring: {self.polring()}\n' \ f' Ore polring: {self.ore_polring()}\n' \ f' Generator: {self.gen()}' \ @@ -532,11 +532,11 @@ def j(self): self._test_rank_two() return (self.g()**(self._Fq().order()+1)) / self.delta() -class FiniteDrinfeldModuleAction(Action): +class DrinfeldModuleAction(Action): def __init__(self, finite_drinfeld_module): # Verifications - if not isinstance(finite_drinfeld_module, FiniteDrinfeldModule): - raise TypeError('First argument must be a FiniteDrinfeldModule') + if not isinstance(finite_drinfeld_module, DrinfeldModule): + raise TypeError('First argument must be a DrinfeldModule') # Work self.__finite_drinfeld_module = finite_drinfeld_module super().__init__(finite_drinfeld_module.polring(), From 45be70180e9cc59760943399dd9758b81ac47217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Wed, 22 Jun 2022 13:37:39 +0200 Subject: [PATCH 025/751] Clean DrinfeldModules category - Comment constructor - Check that codomain of input morphism is a field - Delete various useless docstrings (they will be written later, at a more final stage of development) - Change gamma to morphism - Various small enhancements --- src/sage/categories/drinfeld_modules.py | 51 +++++++++---------------- 1 file changed, 19 insertions(+), 32 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index e35b95a18a3..a989f86fbc4 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -18,42 +18,31 @@ # from sage.categories.basic import Fields class DrinfeldModules(CategoryWithParameters): - r""" - The category of Drinfeld modules. - EXAMPLES: - - We create the category of function fields:: - - sage: C = FunctionFields() - sage: C - Category of function fields - - TESTS:: - - sage: TestSuite(FunctionFields()).run() - """ - - def __init__(self, gamma, name='t'): - r""" - """ - self._gamma = gamma - self._domain = FqX = gamma.domain() - K = gamma.codomain() + def __init__(self, morphism, name='t'): + self._morphism = morphism + self._domain = morphism.domain() + # Check domain is Fq[X] + FqX = self._domain if not isinstance(FqX, PolynomialRing_general): raise NotImplementedError('domain must be a polynomial ring') Fq = FqX.base_ring() if not Fq.is_field() or not Fq.is_finite() : raise TypeError('the base ring of the domain must be a finite field') + # Check domain is field + K = morphism.codomain() + if not K.is_field(): + raise TypeError('the codomain must be a field') + # Build K{t} d = log(Fq.cardinality(), Fq.characteristic()) tau = K.frobenius_endomorphism(d) self._codomain = OrePolynomialRing(K, tau, names=name) # Create characteristic self._characteristic = None if K.is_finite(): - f = gamma * FqX.coerce_map_from(Fq) + f = morphism * FqX.coerce_map_from(Fq) E = K.over(f) - self._characteristic = E(gamma(FqX.gen())).minpoly() + self._characteristic = E(morphism(FqX.gen())).minpoly() def characteristic(self): if self._characteristic is None: @@ -61,21 +50,19 @@ def characteristic(self): return self._characteristic def _call_(self, gen): - r""" - Constructs an object in this category from the data in ``x``, - or throws a TypeError. - """ - from sage.rings.function_field.finite_drinfeld_module import FiniteDrinfeldModule + # Avoid circular import + from sage.rings.function_field.drinfeld_module import DrinfeldModule + # If gen is not in the codomain, an exception is raised gen = self._codomain(gen) if self.characteristic()(gen[0]) != 0: raise ValueError('incorrect characteristic') - return FiniteDrinfeldModule(self._domain, gen) + return DrinfeldModule(self._domain, gen) def super_categories(self): return [] def _repr_(self): - return f'Category of Drinfeld modules defined by {self._gamma}' + return f'Category of Drinfeld modules defined by {self._morphism}' def _make_named_class_key(self, name): return self._domain.category() @@ -86,8 +73,8 @@ def domain(self): def codomain(self): return self._codomain - def gamma(self): - return self._gamma + def morphism(self): + return self._morphism class ParentMethods: def characteristic(self): From 0ccdf26500825e2b778258831466f16939ac74dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Wed, 22 Jun 2022 14:13:50 +0200 Subject: [PATCH 026/751] Clean DrinfeldModule constructor Change some variables' name and comment. This includes changing some variables' name in the constructor of the category DrinfeldModules, as to be consistent with the constructor of DrinfeldModule. --- src/sage/categories/drinfeld_modules.py | 10 ++-- .../rings/function_field/drinfeld_module.py | 59 +++++++++++++------ 2 files changed, 46 insertions(+), 23 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index a989f86fbc4..7a169c31a11 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -23,12 +23,14 @@ def __init__(self, morphism, name='t'): self._morphism = morphism self._domain = morphism.domain() # Check domain is Fq[X] - FqX = self._domain - if not isinstance(FqX, PolynomialRing_general): + functions_ring = self._domain # functions_ring + if not isinstance(functions_ring, PolynomialRing_general): raise NotImplementedError('domain must be a polynomial ring') - Fq = FqX.base_ring() - if not Fq.is_field() or not Fq.is_finite() : + functions_ring_base = functions_ring.base_ring() + if not functions_ring_base.is_field() or not functions_ring_base.is_finite() : raise TypeError('the base ring of the domain must be a finite field') + Fq = functions_ring_base + FqX = functions_ring # Check domain is field K = morphism.codomain() if not K.is_field(): diff --git a/src/sage/rings/function_field/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_module.py index 9e11f8c6ad6..adec664c9a5 100644 --- a/src/sage/rings/function_field/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_module.py @@ -291,34 +291,55 @@ class DrinfeldModule(CategoryObject): :mod:`sage.rings.polynomial.ore_polynomial_ring` """ - def __init__(self, polring, gen, name='t'): - Fq = polring.base_ring() + def __init__(self, functions_ring, gen, name='t'): + + # Check all possible input types + # `gen` is an Ore polynomial: if isinstance(gen, OrePolynomial): - Ltau = gen.parent() - L = Ltau.base_ring() - name = Ltau.variable_name() + ore_polring = gen.parent() + ore_polring_base = ore_polring.base_ring() + name = ore_polring.variable_name() + # `gen` is a list of coefficients (functions_ring = Fq[X]): elif isinstance(gen, (list, tuple)): - Ltau = None - L = Sequence(gen).universe() + ore_polring = None + ore_polring_base = Sequence(gen).universe() + # `gen` is a list of list of coefficients (multiple gens): + elif isinstance(gen, (list, tuple)) \ + and all(isinstance(x, (list, tuple)) for x in gen): + ore_polring = None + all_coeffs = [] + for coeffs in gen: + all_coeffs += coeffs + ore_polring_base = Sequence(all_coeffs).universe() else: - raise TypeError('generator must be an Ore polynomial or a list of coefficients') - if not L.has_coerce_map_from(Fq): - raise TypeError('base ring of polring must coerce to base ring ' \ - 'of Ore polynomial ring') - gamma = Hom(polring, L)(gen[0]) + raise TypeError('generator must be a list of coefficients, a list' \ + 'of list of coefficients, or an Ore polynomial') + + # Build the morphism that defines the category + functions_ring_base = functions_ring.base_ring() + if not ore_polring_base.has_coerce_map_from(functions_ring_base): + raise TypeError('base ring of functions_ring must coerce to base ' \ + 'ring of Ore polynomial ring') + gamma = Hom(functions_ring, ore_polring_base)(gen[0]) + + # Mathematical integrity of the data is delegated to the category category = DrinfeldModules(gamma, name=name) - if Ltau is not None and Ltau is not category.codomain(): + # Check gen as Ore polynomial + if ore_polring is not None and ore_polring is not category.codomain(): raise ValueError(f'generator must lie in {category.codomain()}') - Ltau = category.codomain() - self._gen = Ltau(gen) + # Sanity cast + ore_polring = category.codomain() + # Be sure to have a generator that is an Ore polynomial + self._gen = ore_polring(gen) if self._gen.degree() <= 0: raise ValueError('generator must have positive degree') + # Work super().__init__(category=category) - self._morphism = Hom(polring, Ltau)(self._gen) - self._polring = polring - self._ore_polring = Ltau - self._ore_variable = Ltau.gen() + self._morphism = Hom(functions_ring, ore_polring)(self._gen) + self.functions_ring = functions_ring + self._ore_polring = ore_polring + self._ore_variable = ore_polring.gen() ################# # Private utils # From 92b9e68c04a9f39180236428099bd4a9d22b84b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Wed, 22 Jun 2022 14:37:38 +0200 Subject: [PATCH 027/751] Change polring to functions_ring in DrinfeldModule --- .../rings/function_field/drinfeld_module.py | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_module.py index adec664c9a5..f525aa1bb52 100644 --- a/src/sage/rings/function_field/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_module.py @@ -337,7 +337,7 @@ def __init__(self, functions_ring, gen, name='t'): # Work super().__init__(category=category) self._morphism = Hom(functions_ring, ore_polring)(self._gen) - self.functions_ring = functions_ring + self._functions_ring = functions_ring self._ore_polring = ore_polring self._ore_variable = ore_polring.gen() @@ -346,7 +346,7 @@ def __init__(self, functions_ring, gen, name='t'): ################# def _Fq(self): - return self.polring().base_ring() + return self.functions_ring().base_ring() def _L(self): return self.ore_polring().base_ring() @@ -375,12 +375,12 @@ def change_ring(self, R): if not self.ore_polring().base_ring().is_subring(R): raise ValueError('The new field must be a finite field ' \ 'extension of the base field of the Ore polynomial ring.') - _check_base_fields(self.polring().base_ring(), R) + _check_base_fields(self.functions_ring().base_ring(), R) # ACTUAL WORK new_frobenius = R.frobenius_endomorphism(self.frobenius().power()) new_ore_polring = OrePolynomialRing(R, new_frobenius, names=self.ore_polring().variable_names()) - return DrinfeldModule(self.polring(), + return DrinfeldModule(self.functions_ring(), new_ore_polring(self.gen()), self.characteristic()) def height(self): @@ -396,7 +396,7 @@ def invert(self, image): if image in self._L(): # Only works if `image` is in the image of self return self._Fq()(image) r = self.rank() - X = self.polring().gen() + X = self.functions_ring().gen() k = image.degree() // r m_lines = [[0 for _ in range(k+1)] for _ in range(k+1)] for i in range(k+1): @@ -405,7 +405,7 @@ def invert(self, image): m_lines[j][i] = phi_X_i[r*j] m = Matrix(m_lines) v = vector([list(image)[r*j] for j in range(k+1)]) - pre_image = self.polring()(list((m**(-1)) * v)) + pre_image = self.functions_ring()(list((m**(-1)) * v)) if self(pre_image) == image: return pre_image else: @@ -456,13 +456,13 @@ def velu(self, candidate): if r != 0: return None else: - return DrinfeldModule(self.polring(), q, self.characteristic()) + return DrinfeldModule(self.functions_ring(), q, self.characteristic()) # Rank two methods def characteristic_polynomial(self): self._test_rank_two() - FqXT = PolynomialRing(self.polring(), 'T') + FqXT = PolynomialRing(self.functions_ring(), 'T') return FqXT([self.frobenius_norm(), -self.frobenius_trace(), 1]) def frobenius_norm(self): @@ -500,9 +500,9 @@ def _get_action_(self): def _latex_(self): return f'\\text{{Finite{{ }}Drinfeld{{ }}module{{ }}defined{{ }}by{{ }}}}\n' \ f'\\begin{{align}}\n' \ - f' {latex(self.polring())}\n' \ + f' {latex(self.functions_ring())}\n' \ f' &\\to {latex(self.ore_polring())} \\\\\n' \ - f' {latex(self.polring().gen())}\n' \ + f' {latex(self.functions_ring().gen())}\n' \ f' &\\mapsto {latex(self.gen())}\n' \ f'\\end{{align}}\n' \ f'\\text{{with{{ }}characteristic{{ }}}} ' \ @@ -510,7 +510,7 @@ def _latex_(self): def _repr_(self): return f'Drinfeld module:\n' \ - f' Polring: {self.polring()}\n' \ + f' Polring: {self.functions_ring()}\n' \ f' Ore polring: {self.ore_polring()}\n' \ f' Generator: {self.gen()}' \ @@ -536,8 +536,8 @@ def ore_polring(self): def ore_variable(self): return self._ore_variable - def polring(self): - return self._polring + def functions_ring(self): + return self._functions_ring # Rank two methods From 2b01218c051d92d84f0b85b25e73c479b2e8ec7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Wed, 22 Jun 2022 19:20:19 +0200 Subject: [PATCH 028/751] Create morphisms for DrinfeldModule --- src/sage/categories/drinfeld_modules.py | 8 ++++++ .../rings/function_field/drinfeld_module.py | 25 +++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 7a169c31a11..8cf93536c72 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -14,6 +14,8 @@ from sage.rings.polynomial.polynomial_ring import PolynomialRing_general from sage.rings.polynomial.ore_polynomial_ring import OrePolynomialRing +from sage.categories.homsets import Homsets + # from sage.misc.cachefunc import cached_method # from sage.categories.basic import Fields @@ -69,6 +71,12 @@ def _repr_(self): def _make_named_class_key(self, name): return self._domain.category() + def Homsets(self): + return Homsets() + + def Endsets(self): + return Homsets() + def domain(self): return self._domain diff --git a/src/sage/rings/function_field/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_module.py index f525aa1bb52..bb2cb5a8c42 100644 --- a/src/sage/rings/function_field/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_module.py @@ -34,8 +34,9 @@ #***************************************************************************** from sage.categories.action import Action -from sage.categories.homset import Hom from sage.categories.drinfeld_modules import DrinfeldModules +from sage.categories.homset import Hom +from sage.categories.homset import Homset from sage.matrix.constructor import Matrix from sage.misc.latex import latex from sage.modules.free_module_element import vector @@ -48,7 +49,6 @@ from sage.structure.category_object import CategoryObject from sage.structure.sequence import Sequence - class DrinfeldModule(CategoryObject): r""" Class for finite Drinfeld modules. @@ -458,6 +458,12 @@ def velu(self, candidate): else: return DrinfeldModule(self.functions_ring(), q, self.characteristic()) + def End(self): + return DrinfeldModuleHomset(self, self) + + def Hom(self, other): + return DrinfeldModuleHomset(self, other) + # Rank two methods def characteristic_polynomial(self): @@ -553,6 +559,21 @@ def j(self): self._test_rank_two() return (self.g()**(self._Fq().order()+1)) / self.delta() +class DrinfeldModuleHomset(Homset): + + def __init__(self, X, Y, base=None, check=True): + if X.category() != Y.category() \ + and not isinstance(X.category(), DrinfeldModules): + raise TypeError('Drinfeld modules must be in the same category') + super().__init__(X, Y, category=Homsets(), base=base, check=check) + + def __contains__(self, candidate): + phi = self.domain() + psi = self.codomain() + if candidate not in phi.ore_polring(): + raise TypeError('morphism must be in the Ore polynomial ring') + return candidate * phi.gen() == psi.gen() * candidate + class DrinfeldModuleAction(Action): def __init__(self, finite_drinfeld_module): # Verifications From b823a5721884dd04c0d50557bb2d31b30af47d6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Wed, 22 Jun 2022 19:27:05 +0200 Subject: [PATCH 029/751] Remove is_morphism, etc, methods of DrinfeldModule --- .../rings/function_field/drinfeld_module.py | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_module.py index bb2cb5a8c42..40a920d6456 100644 --- a/src/sage/rings/function_field/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_module.py @@ -411,30 +411,6 @@ def invert(self, image): else: return None - def is_automorphism(self, candidate): - if not candidate in self.ore_polring(): - raise TypeError('The candidate must be in the Ore polynomial ' \ - 'ring') - return candidate != 0 and candidate in self._Fq() - - def is_endomorphism(self, candidate): - return candidate == 0 or self == self.velu(candidate) - - def is_isogeny(self, candidate): - if not candidate in self.ore_polring(): - raise TypeError('The candidate must be in the Ore polynomial ' \ - 'ring') - if candidate == 0: - return False - elif candidate in self.ore_polring().base_ring(): - return True - else: - return self.characteristic().degree().divides(candidate.valuation()) \ - and candidate.right_divides(candidate * self.gen()) - - def is_morphism(self, candidate): - return candidate == 0 or self.is_isogeny(candidate) - def rank(self): return self.gen().degree() From c01845237b3ea2b1f9a07edc3df2bad283a75b75 Mon Sep 17 00:00:00 2001 From: Xavier Caruso Date: Thu, 23 Jun 2022 11:59:57 +0200 Subject: [PATCH 030/751] refactor code + classcall_private --- src/sage/rings/function_field/all.py | 7 +- .../{ => drinfeld_modules}/drinfeld_module.py | 258 ++++++------------ 2 files changed, 86 insertions(+), 179 deletions(-) rename src/sage/rings/function_field/{ => drinfeld_modules}/drinfeld_module.py (79%) diff --git a/src/sage/rings/function_field/all.py b/src/sage/rings/function_field/all.py index 86d2372ff67..6904f3ef4fb 100644 --- a/src/sage/rings/function_field/all.py +++ b/src/sage/rings/function_field/all.py @@ -1,6 +1 @@ -from .constructor import FunctionField - -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.rings.function_field.drinfeld_module', 'DrinfeldModule') -lazy_import('sage.rings.function_field.drinfeld_module', 'DrinfeldModuleAction') +from .drinfeld_modules.all import * diff --git a/src/sage/rings/function_field/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py similarity index 79% rename from src/sage/rings/function_field/drinfeld_module.py rename to src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 43a6a7763ca..ddfbec4961e 100644 --- a/src/sage/rings/function_field/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -33,23 +33,20 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from sage.categories.action import Action -from sage.categories.drinfeld_modules import DrinfeldModules -from sage.categories.homset import Hom -from sage.categories.homset import Homset -from sage.matrix.constructor import Matrix -from sage.misc.latex import latex -from sage.modules.free_module_element import vector from sage.rings.integer import Integer -from sage.rings.morphism import RingHomomorphism_im_gens +from sage.structure.unique_representation import UniqueRepresentation +from sage.structure.category_object import CategoryObject + +from sage.categories.drinfeld_modules import DrinfeldModules from sage.rings.polynomial.ore_polynomial_element import OrePolynomial from sage.rings.polynomial.ore_polynomial_ring import OrePolynomialRing -from sage.rings.polynomial.polynomial_ring import PolynomialRing_dense_finite_field -from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing -from sage.structure.category_object import CategoryObject + +from sage.misc.latex import latex from sage.structure.sequence import Sequence +from sage.matrix.constructor import Matrix +from sage.modules.free_module_element import vector -class DrinfeldModule(CategoryObject): +class DrinfeldModule(UniqueRepresentation, CategoryObject): r""" Class for finite Drinfeld modules. @@ -290,7 +287,8 @@ class DrinfeldModule(CategoryObject): :mod:`sage.rings.polynomial.ore_polynomial_element` :mod:`sage.rings.polynomial.ore_polynomial_ring` """ - def __init__(self, functions_ring, gen, name='t'): + @staticmethod + def __classcall_private__(cls, functions_ring, gen, name='t'): # Check all possible input types # `gen` is an Ore polynomial: if isinstance(gen, OrePolynomial): @@ -318,9 +316,9 @@ def __init__(self, functions_ring, gen, name='t'): if not ore_polring_base.has_coerce_map_from(functions_ring_base): raise TypeError('base ring of functions_ring must coerce to base ' \ 'ring of Ore polynomial ring') - gamma = Hom(functions_ring, ore_polring_base)(gen[0]) + gamma = functions_ring.hom([ore_polring_base(gen[0])]) - # Mathematical integrity of the data is delegated to the category + # Mathematical integrity of the data is delegated to the category category = DrinfeldModules(gamma, name=name) # Check gen as Ore polynomial if ore_polring is not None and ore_polring is not category.codomain(): @@ -328,32 +326,84 @@ def __init__(self, functions_ring, gen, name='t'): # Sanity cast ore_polring = category.codomain() # Be sure to have a generator that is an Ore polynomial - self._gen = ore_polring(gen) - if self._gen.degree() <= 0: + gen = ore_polring(gen) + if gen.degree() <= 0: raise ValueError('generator must have positive degree') - # Work - super().__init__(category=category) - self._morphism = Hom(functions_ring, ore_polring)(self._gen) - self._functions_ring = functions_ring - self._ore_polring = ore_polring - self._ore_variable = ore_polring.gen() + # Instantiate the appropriate class + if ore_polring_base.is_finite(): + from sage.rings.function_field.drinfeld_modules.finite_drinfeld_module import FiniteDrinfeldModule + return FiniteDrinfeldModule(gen, category) + else: + return cls.__classcall__(cls, gen, category) + + def __init__(self, gen, category): + CategoryObject.__init__(self, category=category) + self._functions_ring = category.domain() + self._Fq = self._functions_ring.base_ring() + self._ore_polring = gen.parent() + self._L = self._ore_polring.base_ring() + self._gen = gen + self._morphism = self._functions_ring.hom([gen]) ################# # Private utils # ################# - def _Fq(self): - return self.functions_ring().base_ring() - - def _L(self): - return self.ore_polring().base_ring() - def _test_rank_two(self): if self.rank() != 2: raise NotImplementedError('this method is only available for ' \ 'rank two Drinfeld modules') + ########################## + # Special Sage functions # + ########################## + + def _get_action_(self): + from sage.rings.function_fields.drinfeld_modules.action import DrinfeldModuleAction + return DrinfeldModuleAction(self) + + def _latex_(self): + return f'\\text{{Finite{{ }}Drinfeld{{ }}module{{ }}defined{{ }}by{{ }}}}\n' \ + f'\\begin{{align}}\n' \ + f' {latex(self.functions_ring())}\n' \ + f' &\\to {latex(self.ore_polring())} \\\\\n' \ + f' {latex(self.functions_ring().gen())}\n' \ + f' &\\mapsto {latex(self.gen())}\n' \ + f'\\end{{align}}\n' \ + f'\\text{{with{{ }}characteristic{{ }}}} ' \ + f'{latex(self.characteristic())}' + + def _repr_(self): + return "Drinfeld module defined by %s |--> %s over %s" % (self._functions_ring.gen(), self._gen, self._L) + + + ########### + # Getters # + ########### + + def constant_term(self): + return self.gen()[0] + + def frobenius(self): + return self.ore_polring().twisting_morphism() + + def gen(self): + return self._gen + + def morphism(self): + return self._morphism + + def ore_polring(self): + return self._ore_polring + + def ore_variable(self): + return self._ore_polring.gen() + + def functions_ring(self): + return self._functions_ring + + ########### # Methods # ########### @@ -373,7 +423,7 @@ def change_ring(self, R): if not self.ore_polring().base_ring().is_subring(R): raise ValueError('The new field must be a finite field ' \ 'extension of the base field of the Ore polynomial ring.') - _check_base_fields(self.functions_ring().base_ring(), R) + _check_base_fields(self._Fq, R) # ACTUAL WORK new_frobenius = R.frobenius_endomorphism(self.frobenius().power()) new_ore_polring = OrePolynomialRing(R, new_frobenius, @@ -391,8 +441,8 @@ def invert(self, image): if not image in self.ore_polring(): raise TypeError('The tested image should be in the Ore ' \ 'polynomial ring') - if image in self._L(): # Only works if `image` is in the image of self - return self._Fq()(image) + if image in self._L: # Only works if `image` is in the image of self + return self._Fq(image) r = self.rank() X = self.functions_ring().gen() k = image.degree() // r @@ -432,102 +482,12 @@ def velu(self, candidate): else: return FiniteDrinfeldModule(self.polring(), q) - def frobenius_charpoly(self, var='x'): - # Does not work when Fq is not a prime field... - chi = self._gen.reduced_charpoly() - A = self._polring - S = PolynomialRing(A, name=var) - return -chi(A.gen(), S.gen()) - - def End(self): - return DrinfeldModuleHomset(self, self) - - def Hom(self, other): + def _Hom_(self, other): + from sage.rings.function_fields.drinfeld_modules.morphism import DrinfeldModuleHomset return DrinfeldModuleHomset(self, other) # Rank two methods - def characteristic_polynomial(self): - self._test_rank_two() - FqXT = PolynomialRing(self.functions_ring(), 'T') - return FqXT([self.frobenius_norm(), -self.frobenius_trace(), 1]) - - def frobenius_norm(self): - self._test_rank_two() - # Notations from Schost-Musleh: - n = self._L().over(self._Fq()).degree_over(self._Fq()) - d = self.characteristic().degree() - m = n // d - norm = self._L().over(self._Fq())(self.delta()).norm() - return ((-1)**n) * (self.characteristic()**m) / norm - - def frobenius_trace(self): - self._test_rank_two() - # Notations from Schost-Musleh: - n = self._L().over(self._Fq()).degree_over(self._Fq()) - B = self.frobenius_norm() - t = self.ore_polring().gen() - return self.invert(t**n + (self(B) // t**n)) - - def is_ordinary(self): - self._test_rank_two() - return not self.is_supersingular() - - def is_supersingular(self): - self._test_rank_two() - return self.characteristic().divides(self.frobenius_trace()) - - ########################## - # Special Sage functions # - ########################## - - def _get_action_(self): - return DrinfeldModuleAction(self) - - def _latex_(self): - return f'\\text{{Finite{{ }}Drinfeld{{ }}module{{ }}defined{{ }}by{{ }}}}\n' \ - f'\\begin{{align}}\n' \ - f' {latex(self.functions_ring())}\n' \ - f' &\\to {latex(self.ore_polring())} \\\\\n' \ - f' {latex(self.functions_ring().gen())}\n' \ - f' &\\mapsto {latex(self.gen())}\n' \ - f'\\end{{align}}\n' \ - f'\\text{{with{{ }}characteristic{{ }}}} ' \ - f'{latex(self.characteristic())}' - - def _repr_(self): - return f'Drinfeld module:\n' \ - f' Polring: {self.functions_ring()}\n' \ - f' Ore polring: {self.ore_polring()}\n' \ - f' Generator: {self.gen()}' \ - - ########### - # Getters # - ########### - - def constant_term(self): - return self.gen()[0] - - def frobenius(self): - return self.ore_polring().twisting_morphism() - - def gen(self): - return self._gen - - def morphism(self): - return self._morphism - - def ore_polring(self): - return self._ore_polring - - def ore_variable(self): - return self._ore_variable - - def functions_ring(self): - return self._functions_ring - - # Rank two methods - def delta(self): self._test_rank_two() return self.gen()[2] @@ -538,55 +498,7 @@ def g(self): def j(self): self._test_rank_two() - return (self.g()**(self._Fq().order()+1)) / self.delta() - -class DrinfeldModuleHomset(Homset): - - def __init__(self, X, Y, base=None, check=True): - if X.category() != Y.category() \ - and not isinstance(X.category(), DrinfeldModules): - raise TypeError('Drinfeld modules must be in the same category') - super().__init__(X, Y, category=Homsets(), base=base, check=check) - - def __contains__(self, candidate): - phi = self.domain() - psi = self.codomain() - if candidate not in phi.ore_polring(): - raise TypeError('morphism must be in the Ore polynomial ring') - return candidate * phi.gen() == psi.gen() * candidate - -class DrinfeldModuleAction(Action): - def __init__(self, finite_drinfeld_module): - # Verifications - if not isinstance(finite_drinfeld_module, DrinfeldModule): - raise TypeError('First argument must be a DrinfeldModule') - # Work - self.__finite_drinfeld_module = finite_drinfeld_module - super().__init__(finite_drinfeld_module.polring(), - finite_drinfeld_module.ore_polring().base_ring()) - - ########### - # Methods # - ########### - - def finite_drinfeld_module(self): - return self.__finite_drinfeld_module - - ########################## - # Special Sage functions # - ########################## - - def _act_(self, g, x): - return self.finite_drinfeld_module()(g)(x) - - def _latex_(self): - return f'\\text{{Action{{ }}on{{ }}}}' \ - f'{latex(self.extension())}\\text{{{{ }}' \ - f'induced{{ }}by{{ }}}}{self.finite_drinfeld_module()}' - - def _repr_(self): - return f'Action on {self.domain()} induced by ' \ - f'{self.finite_drinfeld_module()}' + return (self.g()**(self._Fq.order()+1)) / self.delta() def _check_base_fields(Fq, L): From b26c8138ca4cf610880efb25e19ac0037825e9c8 Mon Sep 17 00:00:00 2001 From: Xavier Caruso Date: Thu, 23 Jun 2022 12:00:24 +0200 Subject: [PATCH 031/751] with all files --- .../drinfeld_modules/__init__.py | 0 .../function_field/drinfeld_modules/action.py | 37 +++++++++++++++++ .../function_field/drinfeld_modules/all.py | 3 ++ .../finite_drinfeld_module.py | 40 +++++++++++++++++++ .../drinfeld_modules/morphism.py | 15 +++++++ 5 files changed, 95 insertions(+) create mode 100644 src/sage/rings/function_field/drinfeld_modules/__init__.py create mode 100644 src/sage/rings/function_field/drinfeld_modules/action.py create mode 100644 src/sage/rings/function_field/drinfeld_modules/all.py create mode 100644 src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py create mode 100644 src/sage/rings/function_field/drinfeld_modules/morphism.py diff --git a/src/sage/rings/function_field/drinfeld_modules/__init__.py b/src/sage/rings/function_field/drinfeld_modules/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py new file mode 100644 index 00000000000..06ed070c7f5 --- /dev/null +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -0,0 +1,37 @@ +from sage.categories.action import Action + +from sage.rings.function_field.drinfeld_modules.drinfeld_module import DrinfeldModule + + +class DrinfeldModuleAction(Action): + def __init__(self, finite_drinfeld_module): + # Verifications + if not isinstance(finite_drinfeld_module, DrinfeldModule): + raise TypeError('First argument must be a DrinfeldModule') + # Work + self.__finite_drinfeld_module = finite_drinfeld_module + super().__init__(finite_drinfeld_module.polring(), + finite_drinfeld_module.ore_polring().base_ring()) + + ########### + # Methods # + ########### + + def finite_drinfeld_module(self): + return self.__finite_drinfeld_module + + ########################## + # Special Sage functions # + ########################## + + def _act_(self, g, x): + return self.finite_drinfeld_module()(g)(x) + + def _latex_(self): + return f'\\text{{Action{{ }}on{{ }}}}' \ + f'{latex(self.extension())}\\text{{{{ }}' \ + f'induced{{ }}by{{ }}}}{self.finite_drinfeld_module()}' + + def _repr_(self): + return f'Action on {self.domain()} induced by ' \ + f'{self.finite_drinfeld_module()}' diff --git a/src/sage/rings/function_field/drinfeld_modules/all.py b/src/sage/rings/function_field/drinfeld_modules/all.py new file mode 100644 index 00000000000..71d56f75a35 --- /dev/null +++ b/src/sage/rings/function_field/drinfeld_modules/all.py @@ -0,0 +1,3 @@ +from sage.misc.lazy_import import lazy_import + +lazy_import('sage.rings.function_field.drinfeld_modules.drinfeld_module', 'DrinfeldModule') diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py new file mode 100644 index 00000000000..b4fb43079c0 --- /dev/null +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -0,0 +1,40 @@ +from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing +from sage.rings.function_field.drinfeld_modules.drinfeld_module import DrinfeldModule + +class FiniteDrinfeldModule(DrinfeldModule): + def frobenius_charpoly(self, var='x'): + # Does not work when Fq is not a prime field... + chi = self._gen.reduced_charpoly() + A = self._polring + S = PolynomialRing(A, name=var) + return -chi(A.gen(), S.gen()) + + def characteristic_polynomial(self): + self._test_rank_two() + FqXT = PolynomialRing(self.functions_ring(), 'T') + return FqXT([self.frobenius_norm(), -self.frobenius_trace(), 1]) + + def frobenius_norm(self): + self._test_rank_two() + # Notations from Schost-Musleh: + n = self._L.over(self._Fq).degree_over(self._Fq) + d = self.characteristic().degree() + m = n // d + norm = self._L.over(self._Fq)(self.delta()).norm() + return ((-1)**n) * (self.characteristic()**m) / norm + + def frobenius_trace(self): + self._test_rank_two() + # Notations from Schost-Musleh: + n = self._L.over(self._Fq).degree_over(self._Fq) + B = self.frobenius_norm() + t = self.ore_polring().gen() + return self.invert(t**n + (self(B) // t**n)) + + def is_ordinary(self): + self._test_rank_two() + return not self.is_supersingular() + + def is_supersingular(self): + self._test_rank_two() + return self.characteristic().divides(self.frobenius_trace()) diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py new file mode 100644 index 00000000000..a9d128646f0 --- /dev/null +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -0,0 +1,15 @@ +from sage.categories.homset import Homset, Hom + +class DrinfeldModuleHomset(Homset): + def __init__(self, X, Y, base=None, check=True): + if X.category() != Y.category() \ + and not isinstance(X.category(), DrinfeldModules): + raise NotImplementedError('Drinfeld modules must be in the same category') + Homset.__init__(self, X, Y, base=base, check=check) + + def __contains__(self, candidate): + phi = self.domain() + psi = self.codomain() + if candidate not in phi.ore_polring(): + raise TypeError('morphism must be in the Ore polynomial ring') + return candidate * phi.gen() == psi.gen() * candidate From 22e4f83972f3e1f37c5f934a2cb851307834ced0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 23 Jun 2022 18:09:05 +0200 Subject: [PATCH 032/751] Rename morphism.py to homset.py --- .../function_field/drinfeld_modules/{morphism.py => homset.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/sage/rings/function_field/drinfeld_modules/{morphism.py => homset.py} (100%) diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/homset.py similarity index 100% rename from src/sage/rings/function_field/drinfeld_modules/morphism.py rename to src/sage/rings/function_field/drinfeld_modules/homset.py From a9848aec0fa50d13cfa47adb3729a22d7f543406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 23 Jun 2022 21:03:26 +0200 Subject: [PATCH 033/751] Fix DrinfeldModuleHomset import in DrinfeldModule --- .../rings/function_field/drinfeld_modules/drinfeld_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index ddfbec4961e..498e14d118e 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -483,7 +483,7 @@ def velu(self, candidate): return FiniteDrinfeldModule(self.polring(), q) def _Hom_(self, other): - from sage.rings.function_fields.drinfeld_modules.morphism import DrinfeldModuleHomset + from sage.rings.function_field.drinfeld_modules.homset import DrinfeldModuleHomset return DrinfeldModuleHomset(self, other) # Rank two methods From 1bbad0c8d10a11bfcf006cd61bd64a29dee3aa58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Wed, 29 Jun 2022 19:51:29 +0200 Subject: [PATCH 034/751] Create DrinfeldModuleMorphism Comments: - `DrinfeldModuleMorphism` inherits `Element` and not `Morphism`, as the latter requires the domain to be a parent. - `DrinfeldModuleHomset` was modified to integrate `DrinfeldModuleMorphism`. The method `__contains__` only tests the parents. - The method `_Hom_` of `DrinfeldModule` is fixed and one can use `Hom(phi, psi)`. - The method `base` for the category `DrinfeldModules` was implemented. It returns the base ring of the Ore pol. ring; this may change. --- src/sage/categories/drinfeld_modules.py | 3 + .../drinfeld_modules/drinfeld_module.py | 6 +- .../finite_drinfeld_module.py | 1 + .../function_field/drinfeld_modules/homset.py | 43 ++++++++++---- .../drinfeld_modules/morphism.py | 58 +++++++++++++++++++ 5 files changed, 95 insertions(+), 16 deletions(-) create mode 100644 src/sage/rings/function_field/drinfeld_modules/morphism.py diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 8cf93536c72..dcb0e985efc 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -48,6 +48,9 @@ def __init__(self, morphism, name='t'): E = K.over(f) self._characteristic = E(morphism(FqX.gen())).minpoly() + def base(self): + return self.codomain().base_ring() + def characteristic(self): if self._characteristic is None: raise NotImplementedError diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 498e14d118e..aaa997ebd94 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -377,7 +377,6 @@ def _latex_(self): def _repr_(self): return "Drinfeld module defined by %s |--> %s over %s" % (self._functions_ring.gen(), self._gen, self._L) - ########### # Getters # ########### @@ -403,7 +402,6 @@ def ore_variable(self): def functions_ring(self): return self._functions_ring - ########### # Methods # ########### @@ -482,9 +480,9 @@ def velu(self, candidate): else: return FiniteDrinfeldModule(self.polring(), q) - def _Hom_(self, other): + def _Hom_(self, other, category): from sage.rings.function_field.drinfeld_modules.homset import DrinfeldModuleHomset - return DrinfeldModuleHomset(self, other) + return DrinfeldModuleHomset(self, other, category) # Rank two methods diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index b4fb43079c0..5cd98685031 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -2,6 +2,7 @@ from sage.rings.function_field.drinfeld_modules.drinfeld_module import DrinfeldModule class FiniteDrinfeldModule(DrinfeldModule): + def frobenius_charpoly(self, var='x'): # Does not work when Fq is not a prime field... chi = self._gen.reduced_charpoly() diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index a9d128646f0..a7176994572 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -1,15 +1,34 @@ +from sage.structure.parent import Parent +from sage.categories.drinfeld_modules import DrinfeldModules +from sage.rings.function_field.drinfeld_modules.morphism import DrinfeldModuleMorphism from sage.categories.homset import Homset, Hom class DrinfeldModuleHomset(Homset): - def __init__(self, X, Y, base=None, check=True): - if X.category() != Y.category() \ - and not isinstance(X.category(), DrinfeldModules): - raise NotImplementedError('Drinfeld modules must be in the same category') - Homset.__init__(self, X, Y, base=base, check=check) - - def __contains__(self, candidate): - phi = self.domain() - psi = self.codomain() - if candidate not in phi.ore_polring(): - raise TypeError('morphism must be in the Ore polynomial ring') - return candidate * phi.gen() == psi.gen() * candidate + + Element = DrinfeldModuleMorphism + __contains__ = Parent.__contains__ + + def __init__(self, X, Y, category=None, check=True): + if category is None: + category = X.category() + if check: + if X.category() != Y.category() \ + or not isinstance(X.category(), DrinfeldModules): + raise NotImplementedError('Drinfeld modules must be in the same category') + if category != X.category(): + raise NotImplementedError('category should be DrinfeldModules') + base = category.base() + Homset.__init__(self, X, Y, category=category, base=base, check=check) + + def __contains__(self, x): + try: + x = self(x) + return True + except (AttributeError, ValueError, TypeError): + return False + + def _element_constructor_(self, *args, **kwds): + return self.element_class(self, *args, **kwds) + + def _repr_(self): + return 'Our homset' diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py new file mode 100644 index 00000000000..a8da28b6d80 --- /dev/null +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -0,0 +1,58 @@ +#***************************************************************************** +# Copyright (C) 2022 Antoine Leudière +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# http://www.gnu.org/licenses/ +#***************************************************************************** + +# from sage.categories.morphism import Morphism +from sage.structure.element import Element +from sage.rings.polynomial.ore_polynomial_element import OrePolynomial +from sage.rings.polynomial.ore_polynomial_ring import OrePolynomialRing +from sage.categories.drinfeld_modules import DrinfeldModules + + +class DrinfeldModuleMorphism(Element): + + def __init__(self, parent, x): + super().__init__(parent) + domain = parent.domain() + codomain = parent.codomain() + if x.parent() is parent: + ore_polynomial = x.ore_polynomial() + else: + ore_polynomial = domain.ore_polring()(x) + # Test well-definition of the morphism + if domain.gen() * ore_polynomial != ore_polynomial * codomain.gen(): + raise ValueError('the Ore polynomial does not define a morphism') + # Instantiation + self._domain = domain + self._codomain = codomain + self._ore_polynomial = ore_polynomial + + def _repr_(self): + return f'Drinfeld Module morphism:\n' \ + f' From: {self._domain}\n' \ + f' To: {self._codomain}\n' \ + f' Defn: {self._ore_polynomial}' + + def codomain(self): + return self._codomain + + def domain(self): + return self._domain + + def ore_polynomial(self): + return self._ore_polynomial + + def is_zero(self): + return self._ore_polynomial.is_zero() + + def is_isogeny(self): + return not self.is_zero() + + def ore_polynomial(self): + return self._ore_polynomial From 578ccaac3e98db2284e67deb21e55db798b7e238 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 4 Aug 2022 11:29:32 +0200 Subject: [PATCH 035/751] Rename method functions_ring to function_ring in DrinfeldModule --- .../drinfeld_modules/drinfeld_module.py | 34 +++++++++---------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index aaa997ebd94..5a615cc125d 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -288,14 +288,14 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): :mod:`sage.rings.polynomial.ore_polynomial_ring` """ @staticmethod - def __classcall_private__(cls, functions_ring, gen, name='t'): + def __classcall_private__(cls, function_ring, gen, name='t'): # Check all possible input types # `gen` is an Ore polynomial: if isinstance(gen, OrePolynomial): ore_polring = gen.parent() ore_polring_base = ore_polring.base_ring() name = ore_polring.variable_name() - # `gen` is a list of coefficients (functions_ring = Fq[X]): + # `gen` is a list of coefficients (function_ring = Fq[X]): elif isinstance(gen, (list, tuple)): ore_polring = None ore_polring_base = Sequence(gen).universe() @@ -312,11 +312,11 @@ def __classcall_private__(cls, functions_ring, gen, name='t'): 'of list of coefficients, or an Ore polynomial') # Build the morphism that defines the category - functions_ring_base = functions_ring.base_ring() - if not ore_polring_base.has_coerce_map_from(functions_ring_base): - raise TypeError('base ring of functions_ring must coerce to base ' \ + function_ring_base = function_ring.base_ring() + if not ore_polring_base.has_coerce_map_from(function_ring_base): + raise TypeError('base ring of function_ring must coerce to base ' \ 'ring of Ore polynomial ring') - gamma = functions_ring.hom([ore_polring_base(gen[0])]) + gamma = function_ring.hom([ore_polring_base(gen[0])]) # Mathematical integrity of the data is delegated to the category category = DrinfeldModules(gamma, name=name) @@ -339,12 +339,12 @@ def __classcall_private__(cls, functions_ring, gen, name='t'): def __init__(self, gen, category): CategoryObject.__init__(self, category=category) - self._functions_ring = category.domain() - self._Fq = self._functions_ring.base_ring() + self._function_ring = category.domain() + self._Fq = self._function_ring.base_ring() self._ore_polring = gen.parent() self._L = self._ore_polring.base_ring() self._gen = gen - self._morphism = self._functions_ring.hom([gen]) + self._morphism = self._function_ring.hom([gen]) ################# # Private utils # @@ -366,16 +366,16 @@ def _get_action_(self): def _latex_(self): return f'\\text{{Finite{{ }}Drinfeld{{ }}module{{ }}defined{{ }}by{{ }}}}\n' \ f'\\begin{{align}}\n' \ - f' {latex(self.functions_ring())}\n' \ + f' {latex(self.function_ring())}\n' \ f' &\\to {latex(self.ore_polring())} \\\\\n' \ - f' {latex(self.functions_ring().gen())}\n' \ + f' {latex(self.function_ring().gen())}\n' \ f' &\\mapsto {latex(self.gen())}\n' \ f'\\end{{align}}\n' \ f'\\text{{with{{ }}characteristic{{ }}}} ' \ f'{latex(self.characteristic())}' def _repr_(self): - return "Drinfeld module defined by %s |--> %s over %s" % (self._functions_ring.gen(), self._gen, self._L) + return "Drinfeld module defined by %s |--> %s over %s" % (self._function_ring.gen(), self._gen, self._L) ########### # Getters # @@ -399,8 +399,8 @@ def ore_polring(self): def ore_variable(self): return self._ore_polring.gen() - def functions_ring(self): - return self._functions_ring + def function_ring(self): + return self._function_ring ########### # Methods # @@ -426,7 +426,7 @@ def change_ring(self, R): new_frobenius = R.frobenius_endomorphism(self.frobenius().power()) new_ore_polring = OrePolynomialRing(R, new_frobenius, names=self.ore_polring().variable_names()) - return DrinfeldModule(self.functions_ring(), + return DrinfeldModule(self.function_ring(), new_ore_polring(self.gen()), self.characteristic()) def height(self): @@ -442,7 +442,7 @@ def invert(self, image): if image in self._L: # Only works if `image` is in the image of self return self._Fq(image) r = self.rank() - X = self.functions_ring().gen() + X = self.function_ring().gen() k = image.degree() // r m_lines = [[0 for _ in range(k+1)] for _ in range(k+1)] for i in range(k+1): @@ -451,7 +451,7 @@ def invert(self, image): m_lines[j][i] = phi_X_i[r*j] m = Matrix(m_lines) v = vector([list(image)[r*j] for j in range(k+1)]) - pre_image = self.functions_ring()(list((m**(-1)) * v)) + pre_image = self.function_ring()(list((m**(-1)) * v)) if self(pre_image) == image: return pre_image else: From b2e597830b6e25adaddbe7de6fa247eb9e4d5ea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 4 Aug 2022 11:38:08 +0200 Subject: [PATCH 036/751] Fix frobenius_charpoly method in FiniteDrinfeldModule Refactor frobenius_charpoly --- .../drinfeld_modules/finite_drinfeld_module.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 5cd98685031..2d229625795 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -3,17 +3,13 @@ class FiniteDrinfeldModule(DrinfeldModule): - def frobenius_charpoly(self, var='x'): + def frobenius_charpoly(self, var='T'): + A = self._function_ring # Fq[X] + S = PolynomialRing(A, name=var) # Fq[X][T] # Does not work when Fq is not a prime field... - chi = self._gen.reduced_charpoly() - A = self._polring - S = PolynomialRing(A, name=var) - return -chi(A.gen(), S.gen()) - - def characteristic_polynomial(self): - self._test_rank_two() - FqXT = PolynomialRing(self.functions_ring(), 'T') - return FqXT([self.frobenius_norm(), -self.frobenius_trace(), 1]) + # chi = self._gen.reduced_charpoly() + # return -chi(A.gen(), S.gen()) + return S([self.frobenius_norm(), -self.frobenius_trace(), 1]) def frobenius_norm(self): self._test_rank_two() From 72f16428bbbc209cd0dac6aa9edb8946533d3dda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 4 Aug 2022 14:24:15 +0200 Subject: [PATCH 037/751] Remove __eq__ method in DrinfeldModule This was useless as the class inherits UniqueRepresentation. --- .../rings/function_field/drinfeld_modules/drinfeld_module.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 5a615cc125d..8ab1b4c5227 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -406,11 +406,6 @@ def function_ring(self): # Methods # ########### - def __eq__(self, other): - if not isinstance(other, DrinfeldModule): - return False - return self.category() is other.category() and self.gen() == other.gen() - def __call__(self, a): return self._morphism(a) From 8f9c18ad0b2f96c78aaa18f2b812b8f4b8730598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 4 Aug 2022 14:43:05 +0200 Subject: [PATCH 038/751] Refactor characteristic method in DrinfeldModules The characteristic is computed as a minpoly. It is cast to the polring. Also, some minor cosmetic changes that should be somewhere else. Refactor _latex_ for DrinfeldModule --- src/sage/categories/drinfeld_modules.py | 22 ++++++++++--------- .../drinfeld_modules/drinfeld_module.py | 13 ++++------- 2 files changed, 16 insertions(+), 19 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index dcb0e985efc..a64c59ea693 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -22,19 +22,21 @@ class DrinfeldModules(CategoryWithParameters): def __init__(self, morphism, name='t'): + gamma = morphism self._morphism = morphism - self._domain = morphism.domain() + self._domain = gamma.domain() # Check domain is Fq[X] - functions_ring = self._domain # functions_ring - if not isinstance(functions_ring, PolynomialRing_general): + function_ring = self._domain + if not isinstance(function_ring, PolynomialRing_general): raise NotImplementedError('domain must be a polynomial ring') - functions_ring_base = functions_ring.base_ring() - if not functions_ring_base.is_field() or not functions_ring_base.is_finite() : + function_ring_base = function_ring.base_ring() + if not function_ring_base.is_field() or not function_ring_base.is_finite() : raise TypeError('the base ring of the domain must be a finite field') - Fq = functions_ring_base - FqX = functions_ring + Fq = function_ring_base + FqX = function_ring + X = FqX.gen() # Check domain is field - K = morphism.codomain() + K = gamma.codomain() if not K.is_field(): raise TypeError('the codomain must be a field') # Build K{t} @@ -44,9 +46,9 @@ def __init__(self, morphism, name='t'): # Create characteristic self._characteristic = None if K.is_finite(): - f = morphism * FqX.coerce_map_from(Fq) + f = gamma * FqX.coerce_map_from(Fq) # Fq -> K E = K.over(f) - self._characteristic = E(morphism(FqX.gen())).minpoly() + self._characteristic = FqX(E(gamma(X)).minpoly()) def base(self): return self.codomain().base_ring() diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 8ab1b4c5227..e46c3657894 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -364,15 +364,10 @@ def _get_action_(self): return DrinfeldModuleAction(self) def _latex_(self): - return f'\\text{{Finite{{ }}Drinfeld{{ }}module{{ }}defined{{ }}by{{ }}}}\n' \ - f'\\begin{{align}}\n' \ - f' {latex(self.function_ring())}\n' \ - f' &\\to {latex(self.ore_polring())} \\\\\n' \ - f' {latex(self.function_ring().gen())}\n' \ - f' &\\mapsto {latex(self.gen())}\n' \ - f'\\end{{align}}\n' \ - f'\\text{{with{{ }}characteristic{{ }}}} ' \ - f'{latex(self.characteristic())}' + return f'\\text{{Drinfeld{{ }}module{{ }}defined{{ }}by{{ }}}} ' \ + f'{latex(self._function_ring.gen())} '\ + f'\\mapsto {latex(self._gen)}' \ + f'\\text{{{{ }}over{{ }}}}{latex(self._L)}' def _repr_(self): return "Drinfeld module defined by %s |--> %s over %s" % (self._function_ring.gen(), self._gen, self._L) From 1c81b5ba55fd963edf3d8d54aaafd6c5a63018f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 4 Aug 2022 15:05:55 +0200 Subject: [PATCH 039/751] Remove a constructor in DrinfeldModule Remove the constructor with a list of lists of coefficients, as it bloats the code but is not useful as long as the function ring can only be a polring. --- .../drinfeld_modules/drinfeld_module.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index e46c3657894..5654dd7bec2 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -299,17 +299,9 @@ def __classcall_private__(cls, function_ring, gen, name='t'): elif isinstance(gen, (list, tuple)): ore_polring = None ore_polring_base = Sequence(gen).universe() - # `gen` is a list of list of coefficients (multiple gens): - elif isinstance(gen, (list, tuple)) \ - and all(isinstance(x, (list, tuple)) for x in gen): - ore_polring = None - all_coeffs = [] - for coeffs in gen: - all_coeffs += coeffs - ore_polring_base = Sequence(all_coeffs).universe() else: - raise TypeError('generator must be a list of coefficients, a list' \ - 'of list of coefficients, or an Ore polynomial') + raise TypeError('generator must be a list of coefficients '\ + 'or an Ore polynomial') # Build the morphism that defines the category function_ring_base = function_ring.base_ring() From 3fe93dabbee77523861d975ea03aa3de165d1835 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 4 Aug 2022 15:24:05 +0200 Subject: [PATCH 040/751] Change _L to _base_ring in DrinfeldModule --- .../drinfeld_modules/drinfeld_module.py | 16 ++++++++++------ .../drinfeld_modules/finite_drinfeld_module.py | 6 +++--- .../function_field/drinfeld_modules/homset.py | 3 --- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 5654dd7bec2..f193ec1c178 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -331,12 +331,12 @@ def __classcall_private__(cls, function_ring, gen, name='t'): def __init__(self, gen, category): CategoryObject.__init__(self, category=category) + self._base_ring = category.base() self._function_ring = category.domain() - self._Fq = self._function_ring.base_ring() - self._ore_polring = gen.parent() - self._L = self._ore_polring.base_ring() self._gen = gen self._morphism = self._function_ring.hom([gen]) + self._ore_polring = gen.parent() + self._Fq = self._function_ring.base_ring() ################# # Private utils # @@ -359,15 +359,19 @@ def _latex_(self): return f'\\text{{Drinfeld{{ }}module{{ }}defined{{ }}by{{ }}}} ' \ f'{latex(self._function_ring.gen())} '\ f'\\mapsto {latex(self._gen)}' \ - f'\\text{{{{ }}over{{ }}}}{latex(self._L)}' + f'\\text{{{{ }}over{{ }}}}{latex(self._base_ring)}' def _repr_(self): - return "Drinfeld module defined by %s |--> %s over %s" % (self._function_ring.gen(), self._gen, self._L) + return f'Drinfeld module defined by {self._function_ring.gen()} ' \ + f'|--> {self._gen} over {self._base_ring}' ########### # Getters # ########### + def base_ring(self): + return self._base_ring + def constant_term(self): return self.gen()[0] @@ -421,7 +425,7 @@ def invert(self, image): if not image in self.ore_polring(): raise TypeError('The tested image should be in the Ore ' \ 'polynomial ring') - if image in self._L: # Only works if `image` is in the image of self + if image in self._base_ring: # Only works if `image` is in the image of self return self._Fq(image) r = self.rank() X = self.function_ring().gen() diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 2d229625795..ca5f83b20ee 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -14,16 +14,16 @@ def frobenius_charpoly(self, var='T'): def frobenius_norm(self): self._test_rank_two() # Notations from Schost-Musleh: - n = self._L.over(self._Fq).degree_over(self._Fq) + n = self._base_ring.over(self._Fq).degree_over(self._Fq) d = self.characteristic().degree() m = n // d - norm = self._L.over(self._Fq)(self.delta()).norm() + norm = self._base_ring.over(self._Fq)(self.delta()).norm() return ((-1)**n) * (self.characteristic()**m) / norm def frobenius_trace(self): self._test_rank_two() # Notations from Schost-Musleh: - n = self._L.over(self._Fq).degree_over(self._Fq) + n = self._base_ring.over(self._Fq).degree_over(self._Fq) B = self.frobenius_norm() t = self.ore_polring().gen() return self.invert(t**n + (self(B) // t**n)) diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index a7176994572..d4ccf4880c8 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -29,6 +29,3 @@ def __contains__(self, x): def _element_constructor_(self, *args, **kwds): return self.element_class(self, *args, **kwds) - - def _repr_(self): - return 'Our homset' From 01a42cce1c21207955db5a874235276713eaafe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 4 Aug 2022 15:35:46 +0200 Subject: [PATCH 041/751] Fix velu method in DrinfeldModule --- .../rings/function_field/drinfeld_modules/drinfeld_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index f193ec1c178..eb4636d9dff 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -464,7 +464,7 @@ def velu(self, candidate): if r != 0: return None else: - return FiniteDrinfeldModule(self.polring(), q) + return DrinfeldModule(self._function_ring, q) def _Hom_(self, other, category): from sage.rings.function_field.drinfeld_modules.homset import DrinfeldModuleHomset From c8049b0a4b538028f4db1421e9e4ec75e3bd2cff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 4 Aug 2022 15:40:26 +0200 Subject: [PATCH 042/751] Remove duplicate code in DrinfeldModuleMorphism --- src/sage/rings/function_field/drinfeld_modules/morphism.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index a8da28b6d80..0adb5fa18e3 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -53,6 +53,3 @@ def is_zero(self): def is_isogeny(self): return not self.is_zero() - - def ore_polynomial(self): - return self._ore_polynomial From aeeea81d5ca73a08be2ea0b37ffe079dee2ef97a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 4 Aug 2022 16:02:00 +0200 Subject: [PATCH 043/751] Create frobenius_endomorphism method in FiniteDrinfeldModule --- .../drinfeld_modules/finite_drinfeld_module.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index ca5f83b20ee..d6d55fa4706 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -3,6 +3,13 @@ class FiniteDrinfeldModule(DrinfeldModule): + def frobenius_endomorphism(self): + t = self.ore_variable() + L = self._base_ring + Fq = self._function_ring.base_ring() + deg = L.over(Fq).degree(Fq) + return self._Hom_(self, category=self.category())(t**deg) + def frobenius_charpoly(self, var='T'): A = self._function_ring # Fq[X] S = PolynomialRing(A, name=var) # Fq[X][T] From 055e46ca33d556027615139187fc8c2d39f3bddd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 4 Aug 2022 16:41:54 +0200 Subject: [PATCH 044/751] Comment out frobenius method in DrinfeldModule --- .../rings/function_field/drinfeld_modules/drinfeld_module.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index eb4636d9dff..87f240472ac 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -375,8 +375,8 @@ def base_ring(self): def constant_term(self): return self.gen()[0] - def frobenius(self): - return self.ore_polring().twisting_morphism() + # def frobenius(self): + # return self.ore_polring().twisting_morphism() def gen(self): return self._gen From f8fdad5022fabf4328607e9252de0556aa2c2a24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 4 Aug 2022 18:01:50 +0200 Subject: [PATCH 045/751] Write first draft of DrinfeldModule docstring --- .../drinfeld_modules/drinfeld_module.py | 566 +++++++++--------- 1 file changed, 275 insertions(+), 291 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 87f240472ac..eebb64d5b8c 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -1,26 +1,10 @@ r""" -This module provides classes for finite Drinfeld modules -(`DrinfeldModule`) and their module action on the algebraic -closure of `\Fq` (`DrinfeldModuleAction`). +Drinfeld modules AUTHORS: -- Antoine Leudière (2022-04): initial version - -Let `\tau` be the `\Fq`-linear Frobenius endomorphism of `\Fqbar` -defined by `x \mapsto x^q`. Let `L\{\tau\}` be the ring of Ore -polynomials in `\tau` with coefficients in L. Fix an element `\omega` in -`L` (global parameter). A finite Drinfeld module is an `\Fq`-algebra -morphism `\phi: \Fq[X] \to L\{\tau\]` such that: - - the constant coefficient of `\phi(X)` is `\omega`, - - there exists at least one `a \in \Fq[X]` such that `\phi(a)` has a - non zero `\tau`-degree. - -As an `\Fq[X]`-algebra morphism, a finite Drinfeld module is only -determined by the image of `X`. - -Crucially, the Drinfeld module `\phi` gives rise to the `\Fq[X]`-module -law on `\Fqbar` defined by `(a, x) = \phi(a)(x)`. +- Antoine Leudière (2022-04) +- Xavier Caruso (2022-06) """ #***************************************************************************** @@ -47,246 +31,6 @@ from sage.modules.free_module_element import vector class DrinfeldModule(UniqueRepresentation, CategoryObject): - r""" - Class for finite Drinfeld modules. - - INPUT: - - - ``polring`` -- the base polynomial ring - - ``gen`` -- the generator of the Drinfeld module, i.e. the image of `X` in - the Ore polynomial ring - - ``characteristic`` -- the Fq[X]-characteristic of the Drinfeld - module, i.e. the minimal polynomial in `polring` of the constant term of - the generator - - EXAMPLES: - - .. RUBRIC:: Instantiation - - We must first create the base objects:: - - sage: Fq = GF(3^2) - sage: z2 = Fq.gen() - sage: FqX. = Fq[] - sage: p = X^3 + (z2 + 2)*X^2 + (6*z2 + 1)*X + 3*z2 + 5 - sage: L = Fq.extension(6) - sage: frob = L.frobenius_endomorphism(2) - sage: Ltau. = OrePolynomialRing(L, frob) - sage: omega = p.roots(L, multiplicities=False)[0] - sage: phi_X = omega + t + t^2 - - Notice that we have freedom on choosing the polynomial `p`, but not - `omega`. It is generally more useful this way. Then we instantiate the - Drinfeld module:: - - sage: phi = DrinfeldModule(FqX, phi_X, p) - sage: phi - Drinfeld module: - Polring: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - Ore polring: Ore Polynomial Ring in t over Finite Field in z12 of size 3^12 twisted by z12 |--> z12^(3^2) - Generator: t^2 + t + z12^11 + z12^10 + z12^9 + 2*z12^5 + 2*z12^4 + z12^3 + 2*z12 - Characteristic: X^3 + (z2 + 2)*X^2 + X + 2 - - .. RUBRIC:: Getters - - With getters, we can retrieve many basic objects associated to a Drinfeld - module. - - First, we can retrieve the polynomial ring, the Ore polynomial ring, and - the generator. Note that the class inherits `RingHomomorphism_im_gens`, so - that `domain`, `codomain` and `im_gens` are available:: - - sage: phi.polring() - Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - sage: phi.domain() is phi.polring() - True - sage: phi.ore_polring() - Ore Polynomial Ring in t over Finite Field in z12 of size 3^12 twisted by z12 |--> z12^(3^2) - sage: phi.codomain() is phi.ore_polring() - True - sage: phi.gen() - t^2 + t + z12^11 + z12^10 + z12^9 + 2*z12^5 + 2*z12^4 + z12^3 + 2*z12 - sage: phi.im_gens()[0] is phi.gen() - True - - We can retrieve `omega`, the constant term of the generator, and ensure - that it is a root of `p`, the characteristic:: - - sage: phi.constant_term() - z12^11 + z12^10 + z12^9 + 2*z12^5 + 2*z12^4 + z12^3 + 2*z12 - sage: phi.constant_term() == omega - True - sage: phi.characteristic() - X^3 + (z2 + 2)*X^2 + X + 2 - sage: phi.characteristic() == p - True - sage: phi.characteristic()(phi.constant_term()) - 0 - - We can retrieve the rank and the height (note that the height is always one - here):: - - sage: phi.rank() - 2 - sage: phi.height() - 1 - - And finally we can retrieve some rank-two specifics:: - - sage: phi.j() # j-invariant - 1 - sage: phi.g() # Standard notation - 1 - sage: phi.delta() # Standard notation - 1 - sage: phi(X) == phi.constant_term() + phi.g()*t + phi.delta()*t^2 - True - - .. RUBRIC:: Evaluation of the Drinfeld module - - By definition, a Drinfeld module is a ring morphism from an polynomial ring - to an Ore polynomial ring. We can compute the images under this morphism - using the standard `phi(...)` notation:: - - sage: phi(X) - t^2 + t + z12^11 + z12^10 + z12^9 + 2*z12^5 + 2*z12^4 + z12^3 + 2*z12 - sage: phi(X) == phi.gen() - True - sage: phi(1) - 1 - sage: phi(z2) == z2 - True - sage: phi(X^2 + 1) - t^4 + 2*t^3 + (2*z12^11 + 2*z12^10 + z12^9 + z12^6 + z12^5 + 2*z12^4 + z12^3 + 2*z12^2 + z12 + 2)*t^2 + (2*z12^8 + z12^7 + 2*z12^6 + z12^5 + z12^4 + z12 + 1)*t + 2*z12^11 + 2*z12^10 + z12^8 + z12^7 + 2*z12^6 + 2*z12^5 + z12^4 + 2*z12 - - .. RUBRIC:: The module law induced by a Drinfeld module - - The most important feature of Drinfeld modules is that they endow any - subextension of `Fqbar` with an `Fq[X]`-module law. This action is - represented by the class `DrinfeldModuleAction`, which inherits - `Action`. For the sake of simplicity, `phi` will only act on the base field - (`L`) of its Ore polynomial ring. If you want to act on a bigger field, you - can define a new Drinfeld module using the method `change_ring`. - - sage: action = phi._get_action_() - sage: action - Action on Finite Field in z12 of size 3^12 induced by Drinfeld module: - Polring: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - Ore polring: Ore Polynomial Ring in t over Finite Field in z12 of size 3^12 twisted by z12 |--> z12^(3^2) - Generator: t^2 + t + z12^11 + z12^10 + z12^9 + 2*z12^5 + 2*z12^4 + z12^3 + 2*z12 - Characteristic: X^3 + (z2 + 2)*X^2 + X + 2 - - The calculation of the action is simple. Careful, the evaluation of Ore - polynomial is, at the moment, experimental:: - - sage: x = L.gen() + 1 - sage: g = X^3 + X + 5 - sage: action(g, x) - ... - z12^11 + z12^10 + 2*z12^9 + z12^7 + z12^6 + z12^4 + 2*z12^2 + z12 + 1 - - To change ring, use:: - - sage: M = L.extension(5) - sage: psi = phi.change_ring(M) - sage: psi - Drinfeld module: - Polring: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - Ore polring: Ore Polynomial Ring in t over Finite Field in z60 of size 3^60 twisted by z60 |--> z60^(3^2) - Generator: t^2 + t + 2*z60^59 + z60^57 + 2*z60^56 + 2*z60^54 + 2*z60^53 + 2*z60^52 + z60^51 + z60^50 + 2*z60^48 + z60^47 + z60^46 + 2*z60^45 + 2*z60^44 + 2*z60^42 + 2*z60^41 + z60^40 + z60^39 + z60^38 + z60^37 + 2*z60^34 + z60^33 + z60^31 + 2*z60^29 + z60^27 + z60^26 + z60^25 + 2*z60^24 + z60^22 + 2*z60^21 + z60^19 + 2*z60^17 + 2*z60^16 + 2*z60^15 + z60^14 + z60^12 + z60^11 + 2*z60^10 + z60^8 + z60^7 + 2*z60^6 + 2*z60^5 + 2*z60 + 1 - Characteristic: X^3 + (z2 + 2)*X^2 + X + 2 - - .. RUBRIC:: Morphisms and isogenies - - Being given an Ore polynomial `m`, we can decide if `m` is a morphism or - isogeny of Drinfeld module whose domain is `phi`:: - - sage: m = phi(X) - sage: phi.is_morphism(m) - True - sage: phi.is_isogeny(m) - True - sage: phi.is_endomorphism(m) - True - sage: phi.is_automorphism(m) - False - sage: m = 0 - sage: phi.is_endomorphism(m) - True - sage: phi.is_automorphism(m) - False - sage: phi.is_isogeny(m) - False - sage: m = t^6 - sage: phi.is_endomorphism(m) - True - sage: phi.is_automorphism(m) - False - - We implemented the Vélu formula for Drinfeld modules, in the sense that - given `m`, we can compute (if it exists) the unique Drinfeld module `psi` - such that `m` is an isogeny from `phi` to `psi`:: - - sage: m = phi(X^2 + 1) - sage: phi.velu(m) - Drinfeld module: - Polring: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - Ore polring: Ore Polynomial Ring in t over Finite Field in z12 of size 3^12 twisted by z12 |--> z12^(3^2) - Generator: t^2 + t + z12^11 + z12^10 + z12^9 + 2*z12^5 + 2*z12^4 + z12^3 + 2*z12 - Characteristic: X^3 + (z2 + 2)*X^2 + X + 2 - sage: phi.velu(m) == phi - True - sage: z12 = L.gen() - sage: m = (z12^7 + z12^6 + 2*z12^4)*t^3 - sage: phi.is_isogeny(m) - True - sage: phi.is_endomorphism(m) - False - sage: phi.velu(m) - Drinfeld module: - Polring: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - Ore polring: Ore Polynomial Ring in t over Finite Field in z12 of size 3^12 twisted by z12 |--> z12^(3^2) - Generator: (2*z12^10 + z12^9 + 2*z12^7 + 2*z12^6 + z12^3 + 2*z12^2 + 2)*t^2 + (2*z12^9 + z12^7 + 2*z12^5 + z12 + 1)*t + z12^11 + z12^10 + z12^9 + 2*z12^5 + 2*z12^4 + z12^3 + 2*z12 - Characteristic: X^3 + (z2 + 2)*X^2 + X + 2 - sage: phi.velu(m) == phi - False - - .. RUBRIC:: Complex multiplication of Drinfeld modules - - There are various methods to manipulate the complex multiplication theory - of Drinfeld modules. We can compute the Frobenius norm, Frobenius trace and - characteristic polynomial:: - - sage: phi.frobenius_norm() - X^6 + (2*z2 + 1)*X^5 + (2*z2 + 1)*X^4 + (2*z2 + 2)*X^3 + z2*X^2 + X + 1 - sage: phi.frobenius_trace() - 2*X^3 + (2*z2 + 1)*X^2 + 2*X + z2 + 2 - sage: phi.characteristic_polynomial() - T^2 + (2*X^3 + (2*z2 + 1)*X^2 + 2*X + z2 + 2)*T + X^6 + (2*z2 + 1)*X^5 + (2*z2 + 1)*X^4 + (2*z2 + 2)*X^3 + z2*X^2 + X + 1 - - With those methods, it is easy to decide if a Drinfeld module is ordinary - or supersingular:: - - sage: phi.is_ordinary() - True - sage: phi.is_supersingular() - False - - .. NOTE:: - - The general definition of a Drinfeld module is out of the scope of this - implementation. - - :: - - You can see all available methods of `RingHomomorphism_im_gens` with - `dir(sage.rings.morphism.RingHomomorphism_im_gens)`. Same for `Action`. - - .. SEEALSO:: - :mod:`sage.categories.action.Action` - :mod:`sage.rings.polynomial.ore_polynomial_element` - :mod:`sage.rings.polynomial.ore_polynomial_ring` - """ @staticmethod def __classcall_private__(cls, function_ring, gen, name='t'): # Check all possible input types @@ -304,9 +48,8 @@ def __classcall_private__(cls, function_ring, gen, name='t'): 'or an Ore polynomial') # Build the morphism that defines the category - function_ring_base = function_ring.base_ring() - if not ore_polring_base.has_coerce_map_from(function_ring_base): - raise TypeError('base ring of function_ring must coerce to base ' \ + if not ore_polring_base.has_coerce_map_from(function_ring.base_ring()): + raise TypeError('base ring of function ring must coerce to base ' \ 'ring of Ore polynomial ring') gamma = function_ring.hom([ore_polring_base(gen[0])]) @@ -343,9 +86,11 @@ def __init__(self, gen, category): ################# def _test_rank_two(self): + r""" + Raise ``NotImplementedError`` if the rank is not two. + """ if self.rank() != 2: - raise NotImplementedError('this method is only available for ' \ - 'rank two Drinfeld modules') + raise NotImplementedError('the rank must be 2') ########################## # Special Sage functions # @@ -370,27 +115,105 @@ def _repr_(self): ########### def base_ring(self): + r""" + Return the base ring of the Drinfeld module. + + This is always a field. This is the base field of the codomain + (Ore polynomial ring) of the morphism that defines the Drinfeld + module. + + A Drinfeld module is said to be finite if the base ring is + finite. + + OUTPUT: + + - a field + """ return self._base_ring def constant_term(self): + r""" + Return the constant term of the generator (`\phi_X`). + + The `A`-characteristic of the base field (see + :meth:`sage.categories.drinfeld_modules.DrinfeldModules.characteristic`) + is the minimal polynomial of this constant term, over the base + ring of the function ring. Equivalently, the constant term is + the image, by the morphism (`\gamma`) that defines the category, + of the generator (`X`) of the polynomial ring. + + OUTPUT: + + - an element in the base ring + """ return self.gen()[0] # def frobenius(self): # return self.ore_polring().twisting_morphism() def gen(self): + r""" + Return the generator (`\phi_X`) of the Drinfeld module. + + This method makes sense because, in our case, the function ring is + a polynomial ring; it is generated by one element, whose image + characterizes the morphism that defines the Drinfeld module. + + OUTPUT: + + - an Ore polynomial + """ return self._gen def morphism(self): + r""" + Return the morphism object that defines the Drinfeld module. + + OUTPUT: + + - a ring morphism, from the function ring to the Ore polynomial + ring + """ return self._morphism def ore_polring(self): + r""" + Return the Ore polynomial ring of the Drinfeld module. + + If the Drinfeld module is defined by a morphism `A \to + K\{\tau\}`, we return the codomain `K\{\tau\}`. + + OUTPUT: + + - an Ore polynomial ring + """ return self._ore_polring def ore_variable(self): + r""" + Return the Ore variable. + + This is generator of the Ore polynomial ring. + + OUTPUT: + + - an Ore polynomial + """ return self._ore_polring.gen() def function_ring(self): + r""" + Return the function ring of the Drinfeld module. + + If the Drinfeld module is defined by a morphism `A \to + K\{\tau\}`, we return the domain `A`. + + In our case, this is a polynomial ring. + + OUTPUT: + + - a polynomial ring + """ return self._function_ring ########### @@ -398,17 +221,52 @@ def function_ring(self): ########### def __call__(self, a): + r""" + Return the image of ``a`` by the morphism that defines the + Drinfeld module, i.e. `\phi_a` if the Drinfeld module is denoted + `phi`. + + INPUT: + + - ``a`` -- the element in the function ring whose image is to + compute + + OUTPUT: + + - an element of the base ring + """ + return self._morphism(a) - def change_ring(self, R): - # VERIFICATIONS + def change_ring(self, new_field): + r""" + If ``new_field`` is a field extension of the base ring, return a + new Drinfeld module that extends ``self`` to the base ring + ``new_field``. + + Let `f` be the morphism that defines ``self``, let `i` be the + inclusion of ``self.ore_polring()`` into the Ore pol. ring whose + base is ``new_field``. The morphism that defines the new + Drinfeld module is the composition `i \circ f`. + + INPUT: + + - ``new_field`` -- the field extension of the base ring that + serves as base ring for the new Drinfeld module + + OUTPUT: + + - a Drinfeld module + """ + # TODO: Remove _check_base_field + R = new_field if not R.is_field() and R.is_finite(): raise TypeError('Argument must be a finite field') if not self.ore_polring().base_ring().is_subring(R): raise ValueError('The new field must be a finite field ' \ 'extension of the base field of the Ore polynomial ring.') _check_base_fields(self._Fq, R) - # ACTUAL WORK + new_frobenius = R.frobenius_endomorphism(self.frobenius().power()) new_ore_polring = OrePolynomialRing(R, new_frobenius, names=self.ore_polring().variable_names()) @@ -416,71 +274,197 @@ def change_ring(self, R): new_ore_polring(self.gen()), self.characteristic()) def height(self): - return Integer(1) + r""" + Return the height of the Drinfeld module. - def invert(self, image): + When the function ring is a polynomial ring, the height is 1. + + OUTPUT: + + - an integer """ - Given an Ore polynomial `image` of the form `phi(c)`, find c. + return Integer(1) + + def invert(self, ore_pol): + r""" + Find the inverse of ``ore_pol`` by the morphism that defines the + Drinfeld module. If ``ore_pol`` is not in the image of the + morphism, return ``None``. + + Said otherwise, return `a` if ``ore_pol`` is `phi_a`, otherwise + return ``None``. + + INPUT: + + - ``ore_pol`` -- the Ore polynomial whose preimage we want to + compute + + OUTPUT: + + - a polynomial + + ALGORITHM: + TODO + TODO + TODO + TODO + TODO + TODO + TODO + TODO + TODO """ - if not image in self.ore_polring(): - raise TypeError('The tested image should be in the Ore ' \ - 'polynomial ring') - if image in self._base_ring: # Only works if `image` is in the image of self - return self._Fq(image) + if not ore_pol in self.ore_polring(): + raise TypeError('ore_pol must be an Ore polynomial ring') + if ore_pol in self._base_ring: + return self._Fq(ore_pol) r = self.rank() X = self.function_ring().gen() - k = image.degree() // r + k = ore_pol.degree() // r m_lines = [[0 for _ in range(k+1)] for _ in range(k+1)] for i in range(k+1): phi_X_i = self(X**i) for j in range(i+1): m_lines[j][i] = phi_X_i[r*j] m = Matrix(m_lines) - v = vector([list(image)[r*j] for j in range(k+1)]) + v = vector([list(ore_pol)[r*j] for j in range(k+1)]) pre_image = self.function_ring()(list((m**(-1)) * v)) - if self(pre_image) == image: + if self(pre_image) == ore_pol: return pre_image else: return None def rank(self): + r""" + Return the rank of the Drinfeld module. + + When the function ring is a polynomial ring, the rank is the + degree of the generator. + + OUTPUT: + + - an integer + """ return self.gen().degree() def velu(self, candidate): + r""" + Return a new Drinfeld module such that ``candidate`` is an + isogeny to this module with domain ``self``. If no such isogeny + exists, return ``None``. + + If the candidate is zero, return ``None``, as an isogeny is + required to be non zero. + + INPUT: + + - ``candidate`` -- an Ore polynomial that defines the isogeny + with domain ``self`` and codomain the output of the method + + OUTPUT: + + - a Drinfeld module + + ALGORITHM: + + We write the Ore Euclidean division `\phi_X = + \mathrm{candidate}*q + r`, and return + The candidate is an isogeny if only if: + + 1. The degree of the characteristic devides the height + of the candidate. (The height of an Ore polynomial + `P(t)` is the maximum `n` such that `t^n` right-divides + `P(t)`.) + + 2. The candidate right-divides the generator, which can + be tested with Euclidean division. + + We test if the candidate is an isogeny, and, if it is, we + return the quotient of the Euclidean division. + + Height and Euclidean division of Ore polynomials are + implemented as methods of class + :class:`sage.rings.polynomial.ore_polynomial_element.OrePolynomial`. + + Another possible algorithm is to recursively solve a system, + see :arxiv:`2203.06970`, eq. 1.1. + """ if not candidate in self.ore_polring(): - raise TypeError('The candidate must be in the Ore polynomial ' \ - 'ring') - # There are two main ways to give the result. The first way is - # to return the Drinfeld module generated by the right-quotient - # of `candidate * self(X)` right-divided by `candidate`. The - # second way is to recursively find the coefficients (see - # arXiv:2203.06970, Eq. 1.1). For now, the former is - # implemented, as it is very easy to write. + raise TypeError('candidate must be an Ore polynomial') if candidate == 0: return None if not self.characteristic().degree().divides(candidate.valuation()): return None - q, r = (candidate * self.gen()).right_quo_rem(candidate) - if r != 0: - return None - else: - return DrinfeldModule(self._function_ring, q) + quo, rem = (candidate * self.gen()).right_quo_rem(candidate) + return None if rem != 0 else DrinfeldModule(self._function_ring, quo) def _Hom_(self, other, category): + r""" + Return ``DrinfeldModuleHomset(self, other, category)``. + + Validity of the input is checked at the instantiation of + ``DrinfeldModuleHomset``. ``self`` and ``other`` only need be in + the same category. + + INPUT: + + - ``other`` -- the codomain of the homset + - ``category`` -- the category in which we consider the + morphisms, usually `self.category()` + + OUTPUT: + + - an homset + """ from sage.rings.function_field.drinfeld_modules.homset import DrinfeldModuleHomset return DrinfeldModuleHomset(self, other, category) # Rank two methods def delta(self): + r""" + If the rank is two, return `\Delta` such that the generator is + `phi_X = \gamma(X) + g\tau + \Delta\tau^2`; if the rank is not + two, raise an exception. + + OUTPUT: + + - an element in the base ring if the rank is two; an + exception is raised otherwise + """ self._test_rank_two() return self.gen()[2] def g(self): + r""" + If the rank is two, return `g` such that the generator is `phi_X + = \gamma(X) + g\tau + \Delta\tau^2`; if the rank is not two, + raise an exception. + + OUTPUT: + + - an element in the base ring if the rank is two; an + exception is raised otherwise + """ self._test_rank_two() return self.gen()[1] def j(self): + r""" + If the rank is two, return the j-invariant of the Drinfeld + module; if the rank is not two, raise an exception. + + Write the generator `\phi_X = \gamma(X) + g\tau + \Delta\tau^2`. + The j-invariant is defined by `\frac{g^{q+1}}{\Delta}`, `q` + being the order of the base field of the polynomial ring. In our + case, this base field is always finite, as we force the function + ring to be of the form `\Fq[X]`. + + OUTPUT: + + - an element in the base ring if the rank is two; an + exception is raised otherwise + """ self._test_rank_two() return (self.g()**(self._Fq.order()+1)) / self.delta() From a1b47cecc7879d42fe15ca963c4f50947d499aa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 4 Aug 2022 19:24:56 +0200 Subject: [PATCH 046/751] Add Drinfeld modules to the reference I just added the entry to the section *Function fields*. --- src/doc/en/reference/function_fields/index.rst | 1 + .../drinfeld_modules/drinfeld_module.py | 11 +++++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/doc/en/reference/function_fields/index.rst b/src/doc/en/reference/function_fields/index.rst index 50c04560a33..bc2350116ad 100644 --- a/src/doc/en/reference/function_fields/index.rst +++ b/src/doc/en/reference/function_fields/index.rst @@ -21,6 +21,7 @@ algebraic closure of `\QQ`. sage/rings/function_field/maps sage/rings/function_field/extensions sage/rings/function_field/constructor + sage/rings/function_field/drinfeld_modules/drinfeld_module A basic reference for the theory of algebraic function fields is [Stich2009]_. diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index eebb64d5b8c..7725343d6c5 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -118,9 +118,8 @@ def base_ring(self): r""" Return the base ring of the Drinfeld module. - This is always a field. This is the base field of the codomain - (Ore polynomial ring) of the morphism that defines the Drinfeld - module. + This is the base field of Ore polynomial ring. In particular, the base + ring is always a field. A Drinfeld module is said to be finite if the base ring is finite. @@ -181,7 +180,7 @@ def ore_polring(self): Return the Ore polynomial ring of the Drinfeld module. If the Drinfeld module is defined by a morphism `A \to - K\{\tau\}`, we return the codomain `K\{\tau\}`. + K\{\tau\}`, this is the codomain `K\{\tau\}`. OUTPUT: @@ -206,9 +205,9 @@ def function_ring(self): Return the function ring of the Drinfeld module. If the Drinfeld module is defined by a morphism `A \to - K\{\tau\}`, we return the domain `A`. + K\{\tau\}`, this is the domain `A`. - In our case, this is a polynomial ring. + In our case, the function ring is a polynomial ring. OUTPUT: From cac6471f62d233c462b4b17f3e1cb2fb990fe7e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 5 Aug 2022 18:26:33 +0200 Subject: [PATCH 047/751] Fix constructor of DrinfeldModuleMorphism The constructor wrongfully raised TypeError when the input already was a morphism. See my comment inside the definition of the constructor. --- .../function_field/drinfeld_modules/morphism.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 0adb5fa18e3..7af3ad0230b 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -21,17 +21,18 @@ def __init__(self, parent, x): super().__init__(parent) domain = parent.domain() codomain = parent.codomain() - if x.parent() is parent: - ore_polynomial = x.ore_polynomial() - else: - ore_polynomial = domain.ore_polring()(x) - # Test well-definition of the morphism - if domain.gen() * ore_polynomial != ore_polynomial * codomain.gen(): + # NOTE: it used to be x.parent() is parent, but this was False. + # DrinfeldModuleHomset inherits Homset, which does NOT inherit + # UniqueRepresentation + if x.parent() == parent: # x is a DrinfeldModuleMorphism + ore_pol = x.ore_polynomial() + else: # x is an Ore polynomial + ore_pol = domain.ore_polring()(x) + if ore_pol * domain.gen() != codomain.gen() * ore_pol: raise ValueError('the Ore polynomial does not define a morphism') - # Instantiation self._domain = domain self._codomain = codomain - self._ore_polynomial = ore_polynomial + self._ore_polynomial = ore_pol def _repr_(self): return f'Drinfeld Module morphism:\n' \ From d4eddc8346f69058d3b9f958e2ea24e8c9a659b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 5 Aug 2022 19:12:39 +0200 Subject: [PATCH 048/751] _Minor change --- .../rings/function_field/drinfeld_modules/drinfeld_module.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 7725343d6c5..1485e0b4278 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -227,8 +227,7 @@ def __call__(self, a): INPUT: - - ``a`` -- the element in the function ring whose image is to - compute + - ``a`` -- an element in the function ring OUTPUT: From 4d9e5a096f73e7d78195e36e1b64f4a592a6e26a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 5 Aug 2022 18:51:18 +0200 Subject: [PATCH 049/751] Create __eq__ method in DrinfeldModuleMorphism As the class does not inherit UniqueRepresentation or something similar, this is necessary. --- .../rings/function_field/drinfeld_modules/morphism.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 7af3ad0230b..4eeb5adf214 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -34,6 +34,15 @@ def __init__(self, parent, x): self._codomain = codomain self._ore_polynomial = ore_pol + # NOTE: Should I inherit UniqueRepresentation to avoid this? + def __eq__(self, other): + try: + if self.parent() == other.parent(): + return self.defining_ore_polynomial() == other.defining_ore_polynomial() + except AttributeError: + return False + return False + def _repr_(self): return f'Drinfeld Module morphism:\n' \ f' From: {self._domain}\n' \ @@ -46,7 +55,7 @@ def codomain(self): def domain(self): return self._domain - def ore_polynomial(self): + def defining_ore_polynomial(self): return self._ore_polynomial def is_zero(self): From fbddd9c5b1bb2ad5a2787693bcddd084169c9edc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 5 Aug 2022 19:13:03 +0200 Subject: [PATCH 050/751] Create is_finite method in DrinfeldModule --- .../drinfeld_modules/drinfeld_module.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 1485e0b4278..97c50353847 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -332,6 +332,18 @@ def invert(self, ore_pol): else: return None + def is_finite(self): + r""" + Return ``True`` if the Drinfeld module is finite, return + ``False`` otherwise. + + OUTPUT: + + - ``True`` or ``False`` + """ + from sage.rings.function_field.drinfeld_modules.finite_drinfeld_module import FiniteDrinfeldModule + return isinstance(self, FiniteDrinfeldModule) + def rank(self): r""" Return the rank of the Drinfeld module. From 9ef98d313cc78827c8dfd88a4323e8098ef3e945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 8 Aug 2022 22:42:56 +0100 Subject: [PATCH 051/751] Create is_isomorphism method in DrinfeldModuleMorphism --- src/sage/rings/function_field/drinfeld_modules/morphism.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 4eeb5adf214..5bfe179adfb 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -63,3 +63,6 @@ def is_zero(self): def is_isogeny(self): return not self.is_zero() + + def is_isomorphism(self): + return self.is_isogeny() and self._ore_polynomial.degree() == 0 From f4bb02d7d13ce42a0849c82e0c07241f65cb9b72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 5 Aug 2022 19:13:28 +0200 Subject: [PATCH 052/751] Refactor _repr_ method in DrinfeldModuleHomset Simply change the output. --- src/sage/rings/function_field/drinfeld_modules/homset.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index d4ccf4880c8..4dddb310049 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -20,6 +20,10 @@ def __init__(self, X, Y, category=None, check=True): base = category.base() Homset.__init__(self, X, Y, category=category, base=base, check=check) + def _repr_(self): + return f'Set of Drinfeld module morphisms from ' \ + f'{self.domain().gen()} to {self.codomain().gen()}' + def __contains__(self, x): try: x = self(x) From a21e5260e793600dbb61aabd5a58ed036c8a8d55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 5 Aug 2022 19:32:32 +0200 Subject: [PATCH 053/751] Remove _check_base_fields function from drinfeld_module.py --- .../drinfeld_modules/drinfeld_module.py | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 97c50353847..337f507fbaa 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -147,9 +147,6 @@ def constant_term(self): """ return self.gen()[0] - # def frobenius(self): - # return self.ore_polring().twisting_morphism() - def gen(self): r""" Return the generator (`\phi_X`) of the Drinfeld module. @@ -256,16 +253,18 @@ def change_ring(self, new_field): - a Drinfeld module """ - # TODO: Remove _check_base_field R = new_field if not R.is_field() and R.is_finite(): raise TypeError('Argument must be a finite field') if not self.ore_polring().base_ring().is_subring(R): raise ValueError('The new field must be a finite field ' \ 'extension of the base field of the Ore polynomial ring.') - _check_base_fields(self._Fq, R) + if not (R.is_field() and R.is_finite() and self._Fq.is_subring(R)): + raise ValueError(f'the new base ring must be an extension of the ' \ + 'old base ring') - new_frobenius = R.frobenius_endomorphism(self.frobenius().power()) + frobenius = self.ore_polring().twisting_morphism() + new_frobenius = R.frobenius_endomorphism(frobenius.power()) new_ore_polring = OrePolynomialRing(R, new_frobenius, names=self.ore_polring().variable_names()) return DrinfeldModule(self.function_ring(), @@ -477,10 +476,3 @@ def j(self): """ self._test_rank_two() return (self.g()**(self._Fq.order()+1)) / self.delta() - - -def _check_base_fields(Fq, L): - if not (L.is_field() and L.is_finite() and Fq.is_subring(L)): - raise ValueError(f'The base field of the Ore polynomial ring must ' \ - 'be a finite field extension of the base field of the ' \ - 'polynomial ring') From a7c48a41addcc77880d4eaa90d8817f1758cc6ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 5 Aug 2022 19:32:55 +0200 Subject: [PATCH 054/751] Fix __eq__ method in DrinfeldModuleMorphism I had previously introduced a bug by changing method `ore_polynomial` to `defining_ore_polynomial`. This is fixed. --- src/sage/rings/function_field/drinfeld_modules/morphism.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 5bfe179adfb..4a7e4f175f7 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -38,7 +38,7 @@ def __init__(self, parent, x): def __eq__(self, other): try: if self.parent() == other.parent(): - return self.defining_ore_polynomial() == other.defining_ore_polynomial() + return self.ore_polynomial() == other.ore_polynomial() except AttributeError: return False return False @@ -55,7 +55,7 @@ def codomain(self): def domain(self): return self._domain - def defining_ore_polynomial(self): + def ore_polynomial(self): return self._ore_polynomial def is_zero(self): From a77f850a0da081228f32377b74f7d43cb9742cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Sun, 7 Aug 2022 19:00:26 +0200 Subject: [PATCH 055/751] Refactor exception messages in DrinfeldModule This mostly consisted in simplifying formulations and removing uppercases and stops. --- .../drinfeld_modules/drinfeld_module.py | 22 ++++++++----------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 337f507fbaa..52fceff9613 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -44,8 +44,9 @@ def __classcall_private__(cls, function_ring, gen, name='t'): ore_polring = None ore_polring_base = Sequence(gen).universe() else: - raise TypeError('generator must be a list of coefficients '\ - 'or an Ore polynomial') + + raise TypeError('generator must be list of coefficients or an ' \ + 'Ore polynomial') # Build the morphism that defines the category if not ore_polring_base.has_coerce_map_from(function_ring.base_ring()): @@ -254,15 +255,10 @@ def change_ring(self, new_field): - a Drinfeld module """ R = new_field - if not R.is_field() and R.is_finite(): - raise TypeError('Argument must be a finite field') - if not self.ore_polring().base_ring().is_subring(R): - raise ValueError('The new field must be a finite field ' \ - 'extension of the base field of the Ore polynomial ring.') - if not (R.is_field() and R.is_finite() and self._Fq.is_subring(R)): - raise ValueError(f'the new base ring must be an extension of the ' \ - 'old base ring') - + if not (R.is_field() and R.is_finite() and self._Fq.is_subring(R)) \ + and self.ore_polring().base_ring().is_subring(R): + raise ValueError('new base field must be a finite extension of ' \ + 'the base ring') frobenius = self.ore_polring().twisting_morphism() new_frobenius = R.frobenius_endomorphism(frobenius.power()) new_ore_polring = OrePolynomialRing(R, new_frobenius, @@ -312,7 +308,7 @@ def invert(self, ore_pol): TODO """ if not ore_pol in self.ore_polring(): - raise TypeError('ore_pol must be an Ore polynomial ring') + raise TypeError('input must be an Ore polynomial') if ore_pol in self._base_ring: return self._Fq(ore_pol) r = self.rank() @@ -399,7 +395,7 @@ def velu(self, candidate): see :arxiv:`2203.06970`, eq. 1.1. """ if not candidate in self.ore_polring(): - raise TypeError('candidate must be an Ore polynomial') + raise TypeError('input must be an Ore polynomial') if candidate == 0: return None if not self.characteristic().degree().divides(candidate.valuation()): From a60bede03b545fd0d9c3e36c645511c0eb382b40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 5 Aug 2022 19:35:30 +0200 Subject: [PATCH 056/751] Rewrite DrinfeldModule docstring --- .../drinfeld_modules/drinfeld_module.py | 293 +++++++++++++++++- 1 file changed, 289 insertions(+), 4 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 52fceff9613..38ff6f64f6e 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -1,6 +1,12 @@ r""" Drinfeld modules +This module provides the class +:class:`sage.rings.function_fields.drinfeld_module.drinfeld_module.DrinfeldModule`. +For *finite* Drinfeld modules and their theory of complex multiplication, see +class +:class:`sage.rings.function_fields.drinfeld_module.finite_drinfeld_module.DrinfeldModule`. + AUTHORS: - Antoine Leudière (2022-04) @@ -31,6 +37,287 @@ from sage.modules.free_module_element import vector class DrinfeldModule(UniqueRepresentation, CategoryObject): + r""" + Let `q` be the order of a finite field `\Fq`. Let `K` be a field + equiped a ring morphism `\gamma: \Fq[X] \to K` --- the field `K` is + said to be an *`\Fq[X]`-field*, and the monic polynomial that + generates `\Ker(\gamma)` is called the *`\Fq[X]`-characteristic of + the `\Fq[X]`-field `K`* (this `\Fq[X]`-characteristic plays the role in + `\Fq[X]` of the standard characteristic, in `\ZZ`, of a finite + field). Let `K\{\tau\}` be the ring of Ore polynomials with + coefficients in `K` and Frobenius variable `\tau: x \mapsto x^q`. A + *Drinfeld `\Fq[X]`-module over the `\Fq[X]`-field `K`* is a ring + morphism `\phi: \Fq[X] \to K\{\tau\}` such that: + + 1. The image of `\phi` has non-constant Ore polynomials. + 2. For every `a \in \Fq[X]`, the constant coefficient of the + Ore polynomial `\phi(a)` is `\gamma(a)`. + + For `a \in \Fq[X]`, `\phi(a)` is denoted `\phi_a`. + + We say that `K` is the *base ring of `\phi`*, `\Fq[X]` is the + *function ring of*, *K\{\tau\}* is the *Ore polynomial ring*, + `t` is the *Ore variable*. The *generator of `\phi`* is `\phi_X`, + its *constant coefficient* is the constant coefficient of `\phi_X`. + + The Drinfeld module `\phi` is uniquely determined by the image + `\phi_X` of `X`. This Ore polynomial is an input of the class + constructor. + + Classical references on Drinfeld modules include [Gos1998]_, + [Rosen2002]_, [VS06]_ and [Gek1998]_. + + .. NOTE:: + + Drinfeld modules are defined in a larger setting, in which + `\Fq[X]` is replaced by a more general ring: the ring of + functions in `k` that are regular outside `\infty`, where `k` is + a function field whose constant field is `\Fq` and with + transcendance degree `1`, and `\infty` is a fixed place of `k`. + This is out of the scope of this implementation. + + .. RUBRIC:: Construction + + A Drinfeld module object (class + :class:`sage.rings.function_fields.drinfeld_module.drinfeld_module.DrinfeldModule`) + is constructed as follows:: + + sage: Fq. = GF(3^2) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: phi = DrinfeldModule(FqX, [K.gen(), 1, 1]) + sage: phi + Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 + + In this example, we used a list of coefficients (``[K.gen(), 1, + 1]``) to represent the Ore polynomial `\phi_X = z + t + t^2`, `K + = \Fq(z)`. We can also use regular Ore polynomials:: + + sage: ore_polring = phi.ore_polring() + sage: t = phi.ore_variable() # Equals ore_polring.gen() + sage: psi_X = K.gen() + t^3 + sage: psi = DrinfeldModule(FqX, psi_X) + sage: psi + Drinfeld module defined by X |--> t^3 + z over Finite Field in z of size 3^12 + + Note that ``phi`` and ``psi`` are *finite* Drinfeld modules, in the + sense that `K` is finite. This is not mandatory:: + + sage: K_infinite = Frac(FqX) + sage: phi_infinite = DrinfeldModule(FqX, [K_infinite.gen(), 1, 1]) + sage: phi_infinite + Drinfeld module defined by X |--> t^2 + t + X over Fraction Field of Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + sage: phi_infinite.is_finite() + False + + Drinfeld modules have their own category (see class + :class:`sage.categories.drinfeld_modules.DrinfeldModules`):: + + sage: phi.category() + Category of Drinfeld modules defined by Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + To: Finite Field in z of size 3^12 + Defn: X |--> z + sage: phi.category() is psi.category() + True + sage: phi.category() is phi_infinite.category() + False + + This category holds crucial information, like the + `\Fq[X]`-characteristic of `K`:: + + sage: char = phi.category().characteristic() + + .. NOTE:: + + As the output of + :meth:`sage.rings.function_fields.drinfeld_module.finite_drinfeld_module.DrinfeldModule.category` + suggests, the morphism `\gamma` uniquely determines the category of a Drinfeld + module. + + .. RUBRIC:: More general `K` + + The field `K` does not need be generated, over `\Fq`, by `\gamma(X)` + --- `K` can be an extension of `\Fq(\gamma(X))`. In the following + example, `K` is still a degree six extension of `\Fq`, but `\gamma` + is a projection over `\Fq[X]/p(X)`, with `p(X) = X^3 + (z_2 + 2)X^2 + + (6*z_2 + 1)X + 3z_2 + 5`:: + + sage: p = X^2 + z2 + 2 # Prime polynomial + sage: p_root = z^10 + 2*z^9 + z^8 + z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z # Root of p + sage: phi_inter = DrinfeldModule(FqX, [p_root, 1, 1]) + sage: phi_inter + Drinfeld module defined by X |--> t^2 + t + z^10 + 2*z^9 + z^8 + z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z over Finite Field in z of size 3^12 + + We can check that the morphisms `\gamma` are not the same for + ``phi`` and ``phi_inter``, and that the `\gamma` associated to + `\phi` is surjective, while the other one is not:: + + sage: phi_inter.category().morphism() + Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + To: Finite Field in z of size 3^12 + Defn: X |--> z^10 + 2*z^9 + z^8 + z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z + sage: phi.category().morphism() + Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + To: Finite Field in z of size 3^12 + Defn: X |--> z + + .. RUBRIC:: Basic methods + + For a polynomial `a \in \Fq[X]`, compute `\phi_a` by calling `phi`:: + + sage: phi(X) # phi_X + t^2 + t + z + sage: phi(X^3 + X + 1) # phi_X^3 +X + 1 + t^6 + (z^11 + z^9 + 2*z^6 + 2*z^4 + 2*z + 1)*t^4 + (2*z^11 + 2*z^10 + z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^3)*t^3 + (2*z^11 + z^10 + z^9 + 2*z^7 + 2*z^6 + z^5 + z^4 + 2*z^3 + 2*z + 2)*t^2 + (2*z^11 + 2*z^8 + 2*z^6 + z^5 + z^4 + 2*z^2)*t + z^3 + z + 1 + sage: phi(1) # phi_1 + 1 + + We can retrieve basic properties:: + + sage: phi.base_ring() # K + Finite Field in z of size 3^12 + sage: phi.ore_polring() # K{t} + Ore Polynomial Ring in t over Finite Field in z of size 3^12 twisted by z |--> z^(3^2) + sage: phi.ore_variable() # t + t + sage: phi.function_ring() # Fq[X] + Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + sage: phi.gen() # phi_X + t^2 + t + z + sage: phi.gen() == phi(X) + True + sage: phi.constant_coefficient() # Constant coefficient of phi_X + z + sage: phi.morphism() # The Drinfeld module as a morphism + Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + To: Ore Polynomial Ring in t over Finite Field in z of size 3^12 twisted by z |--> z^(3^2) + Defn: X |--> t^2 + t + z + + We can compute the rank and height:: + + sage: phi.rank() + 2 + sage: phi.height() + 1 + + And there are some rank-two specifics:: + + sage: phi.j() # j-invariant + 1 + sage: phi.g() # write phi_X = z + g*t + Delta*t^2 + 1 + sage: phi.delta() # Write phi_X = z + g*t + Delta*t^2 + 1 + + .. RUBRIC:: Morphisms, isogenies + + A *morphism of Drinfeld modules `\phi \to \psi`* is an Ore + polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for + every $a \in \Fq[X]`. In our case, this is equivalent to verifying + `f \phi_X = \psi_X f`. An *isogeny* is a non-zero morphism. + + Use the ``in`` syntax to test if an Ore polynomial defines an + isogeny:: + + sage: phi(X) in Hom(phi, phi) + True + sage: t^6 in Hom(phi, phi) + True + sage: t^5 + 2*t^3 + 1 in Hom(phi, phi) + False + sage: 1 in Hom(phi, psi) + False + sage: 1 in Hom(phi, phi) + True + sage: 0 in Hom(phi, psi) + True + + To create a SageMath object representing the morphism, call the + homset ``hom``:: + + sage: hom = Hom(phi, phi) + sage: frob = hom(t^6) + sage: identity_morphism = hom(1) + sage: zero_morphism = hom(0) + sage: frob + Drinfeld Module morphism: + From: Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 + To: Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 + Defn: t^6 + sage: identity_morphism + Drinfeld Module morphism: + From: Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 + To: Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 + Defn: 1 + sage: zero_morphism + Drinfeld Module morphism: + From: Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 + To: Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 + Defn: 0 + + We can retrieve the underlying Ore polynomial with the method + :meth:`sage.rings.function_fields.drinfeld_module.finite_drinfeld_module.DrinfeldModule.ore_polynomial`:: + + sage: frob.ore_polynomial() + t^6 + + And we can easily check if a morphism defines an isogeny or an + isomorphism (i.e. an isogeny whose underlying Ore polynomial has + degree `0`):: + + sage: frob.is_isogeny() + True + sage: identity_morphism.is_isogeny() + True + sage: zero_morphism.is_isogeny() + False + sage: frob.is_isomorphism() + False + sage: identity_morphism.is_isomorphism() + True + sage: zero_morphism.is_isomorphism() + False + + .. RUBRIC:: The Vélu formula + + Let ``ore_pol`` be a non-zero Ore polynomial ``ore_pol``. For + Drinfeld module, it is easy to decide --- and find as the case may + be --- if there exists a Drinfeld module ``new_drin_mod``, such that + ``ore_pol`` is an isogeny from ``self`` to ``new_drin_mod``. If this + Drinfeld module exists, it is unique. + + sage: ore_pol = (2*z^6 + z^3 + 2*z^2 + z + 2)*t + z^11 + 2*z^10 + 2*z^9 + 2*z^8 + z^7 + 2*z^6 + z^5 + z^3 + z^2 + z + sage: new_drin_mod = phi.velu(ore_pol) + sage: new_drin_mod + Drinfeld module defined by X |--> (2*z^11 + 2*z^9 + z^6 + 2*z^5 + 2*z^4 + 2*z^2 + 1)*t^2 + (2*z^11 + 2*z^10 + 2*z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z)*t + z over Finite Field in z of size 3^12 + sage: ore_pol in Hom(phi, new_drin_mod) + True + sage: ore_pol * phi(X) == new_drin_mod(X) * ore_pol + True + + .. RUBRIC:: Other methods + + It is possible to change the base ring:: + + sage: L = K.extension(2) + sage: phi_rebased = phi.change_ring(L) + sage: Ltau = phi_rebased.ore_polring() + sage: Ltau(phi(X)) == phi_rebased(X) + True + + Given an Ore polynomial that equals `\phi(a)` for some `a \in + \Fq[X]`, we can retrieve `a` (as a morphism, a Drinfeld + module is injective, see [Gos1998]_, cor. 4.5.2.):: + + sage: a = FqX.random_element() + sage: phi.invert(phi(a)) == a + True + """ + @staticmethod def __classcall_private__(cls, function_ring, gen, name='t'): # Check all possible input types @@ -131,9 +418,9 @@ def base_ring(self): """ return self._base_ring - def constant_term(self): + def constant_coefficient(self): r""" - Return the constant term of the generator (`\phi_X`). + Return the constant coefficient of the generator (`\phi_X`). The `A`-characteristic of the base field (see :meth:`sage.categories.drinfeld_modules.DrinfeldModules.characteristic`) @@ -375,12 +662,10 @@ def velu(self, candidate): We write the Ore Euclidean division `\phi_X = \mathrm{candidate}*q + r`, and return The candidate is an isogeny if only if: - 1. The degree of the characteristic devides the height of the candidate. (The height of an Ore polynomial `P(t)` is the maximum `n` such that `t^n` right-divides `P(t)`.) - 2. The candidate right-divides the generator, which can be tested with Euclidean division. From a29334556c55b6ed88f433f61004d31f2fc09188 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Sun, 7 Aug 2022 19:40:30 +0200 Subject: [PATCH 057/751] Add classic Drinfeld module references to bib. master file --- src/doc/en/reference/references/index.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/doc/en/reference/references/index.rst b/src/doc/en/reference/references/index.rst index 35725366e97..f83df6e7228 100644 --- a/src/doc/en/reference/references/index.rst +++ b/src/doc/en/reference/references/index.rst @@ -2497,6 +2497,9 @@ REFERENCES: TR-737-05, (2005). ftp://ftp.cs.princeton.edu/reports/2005/737.pdf +.. [Gek1991] \E.-U. Gekeler. On finite Drinfeld modules. Journal of + algebra, 1(141):187–203, 1991. + .. [GG2012] Jim Geelen and Bert Gerards, Characterizing graphic matroids by a system of linear equations, submitted, 2012. Preprint: @@ -2656,6 +2659,9 @@ REFERENCES: .. [Gos1972] Bill Gosper, "Continued Fraction Arithmetic" https://perl.plover.com/classes/cftalk/INFO/gosper.txt +.. [Gos1998] \D. Goss. Basic structures of function field arithmetic. Springer, + 1998. + .. [Gor1980] Daniel Gorenstein, Finite Groups (New York: Chelsea Publishing, 1980) @@ -4452,6 +4458,11 @@ REFERENCES: Int. Math. Res. Not. (2015). :doi:`10.1093/imrn/rnv194`, :arxiv:`1408.0320`. +.. [MS2019] \Y. Musleh and É. Schost. Computing the characteristic polynomial + of a finite rank two Drinfeld module. In Proceedings of the 2019 + ACM on International Symposium on Symbolic and Algebraic + Computation, pages 307–314. ACM, 2019. + .. [MSSY2001] Mateescu, A., Salomaa, A., Salomaa, K. and Yu, S., *A sharpening of the Parikh mapping*. Theoret. Informatics Appl. 35 (2001) 551-564. @@ -5028,6 +5039,8 @@ REFERENCES: .. [Ros2002] Rosenfeld, Vladimir Raphael, 2002: Enumerating De Bruijn Sequences. *Communications in Math. and in Computer Chem.* +.. [Rosen2002] \M. Rosen. Number theory in function fields. Springer, 2022. + .. [Rot2001] Gunter Rote, *Division-Free Algorithms for the Determinant and the Pfaffian: Algebraic and Combinatorial Approaches*, H. Alt (Ed.): Computational Discrete @@ -5853,6 +5866,9 @@ REFERENCES: .. [Voi2012] \J. Voight. Identifying the matrix ring: algorithms for quaternion algebras and quadratic forms, to appear. +.. [VS06] \G.D. Villa Salvador. Topics in the Theory of Algebraic Function + Fields. Birkhäuser, 2006. + .. [VW1994] Leonard Van Wyk. *Graph groups are biautomatic*. J. Pure Appl. Alg. **94** (1994). no. 3, 341-352. From 50b0501c4ea31ff0287c16951223fa4f64f2d10f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Wed, 10 Aug 2022 10:30:19 +0100 Subject: [PATCH 058/751] Check input morphism in DrinfeldModules constructor Check that the input `morphism` in DrinfeldModules constructor is indeed a morphism. --- src/sage/categories/drinfeld_modules.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index a64c59ea693..c46e328ec75 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -11,6 +11,7 @@ from sage.categories.category import CategoryWithParameters from sage.misc.functional import log +from sage.rings.morphism import RingHomomorphism from sage.rings.polynomial.polynomial_ring import PolynomialRing_general from sage.rings.polynomial.ore_polynomial_ring import OrePolynomialRing @@ -23,6 +24,9 @@ class DrinfeldModules(CategoryWithParameters): def __init__(self, morphism, name='t'): gamma = morphism + # Check input is a ring Morphism + if not isinstance(gamma, RingHomomorphism): + raise TypeError('input must be a Ring morphism') self._morphism = morphism self._domain = gamma.domain() # Check domain is Fq[X] From 73aa69be1623ddc8ad59689cde0abcbdfa388d66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Wed, 10 Aug 2022 10:58:39 +0100 Subject: [PATCH 059/751] Check input in DrinfeldModule constructor Check that arg `function_ring` is an Fq[X]. This was not done, even though methods of `PolynomialRing` were used. Code is not great, see my comment in the code. --- .../drinfeld_modules/drinfeld_module.py | 29 ++++++++++++++----- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 38ff6f64f6e..1bc6fb79551 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -30,6 +30,7 @@ from sage.categories.drinfeld_modules import DrinfeldModules from sage.rings.polynomial.ore_polynomial_element import OrePolynomial from sage.rings.polynomial.ore_polynomial_ring import OrePolynomialRing +from sage.rings.polynomial.polynomial_ring import PolynomialRing_general from sage.misc.latex import latex from sage.structure.sequence import Sequence @@ -320,7 +321,23 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): @staticmethod def __classcall_private__(cls, function_ring, gen, name='t'): - # Check all possible input types + + # FIXME: function_ring must be checked before calling base_ring + # on it. But then it is checked twice: firstly here, secondly in + # the category. Another problem is that those lines are + # duplicate. As a general comment, there are sanity checks both + # here and in the category constructor, which is not ideal. + # Check domain is Fq[X] + if not isinstance(function_ring, PolynomialRing_general): + raise NotImplementedError('domain must be a polynomial ring') + function_ring_base = function_ring.base_ring() + if not function_ring_base.is_field() or not function_ring_base.is_finite() : + raise TypeError('the base ring of the domain must be a finite field') + Fq = function_ring_base + FqX = function_ring + X = FqX.gen() + + # Check all possible input types for gen # `gen` is an Ore polynomial: if isinstance(gen, OrePolynomial): ore_polring = gen.parent() @@ -331,7 +348,6 @@ def __classcall_private__(cls, function_ring, gen, name='t'): ore_polring = None ore_polring_base = Sequence(gen).universe() else: - raise TypeError('generator must be list of coefficients or an ' \ 'Ore polynomial') @@ -341,15 +357,14 @@ def __classcall_private__(cls, function_ring, gen, name='t'): 'ring of Ore polynomial ring') gamma = function_ring.hom([ore_polring_base(gen[0])]) - # Mathematical integrity of the data is delegated to the category + # Other checks in the category definition category = DrinfeldModules(gamma, name=name) + # Check gen as Ore polynomial if ore_polring is not None and ore_polring is not category.codomain(): raise ValueError(f'generator must lie in {category.codomain()}') - # Sanity cast - ore_polring = category.codomain() - # Be sure to have a generator that is an Ore polynomial - gen = ore_polring(gen) + ore_polring = category.codomain() # Sanity cast + gen = ore_polring(gen) # Sanity cast if gen.degree() <= 0: raise ValueError('generator must have positive degree') From f8b7030df0953fb52ee0b06c37be37edca5f16ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Wed, 10 Aug 2022 11:01:50 +0100 Subject: [PATCH 060/751] Add a note in DrinfeldModule docstring Add a note in DrinfeldModule docstring on the situation in which the user gives, as an input of the constructor, a list of integer coefficients for the generator. --- .../function_field/drinfeld_modules/drinfeld_module.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 1bc6fb79551..8123f4781a6 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -101,6 +101,12 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: psi Drinfeld module defined by X |--> t^3 + z over Finite Field in z of size 3^12 + .. NOTE:: + + If the Ore polynomial has coefficients in the integers, the + constructor does not try to guess if the user wants to see the + coefficients as elements of Fq, or an extension like `K`. + Note that ``phi`` and ``psi`` are *finite* Drinfeld modules, in the sense that `K` is finite. This is not mandatory:: From db42b9935d8e514aa1a1443d0c6729b8750d710a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Wed, 10 Aug 2022 11:27:46 +0100 Subject: [PATCH 061/751] Change _domain and _codomain names in DrinfeldModules Those names were misleading, as there was a conflict with names in DrinfeldModule class. I replaced `domain` by `function_ring`, `codomain` by `ore_polring`, and did the necessary replacements in this module and other ones. I did *not* tested every module in `sage.rings.function_field.drinfeld_modules`; surely there are bugs. --- src/sage/categories/drinfeld_modules.py | 51 ++++++++++--------- .../drinfeld_modules/drinfeld_module.py | 12 ++--- 2 files changed, 34 insertions(+), 29 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index c46e328ec75..a81bb68e42e 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -28,9 +28,9 @@ def __init__(self, morphism, name='t'): if not isinstance(gamma, RingHomomorphism): raise TypeError('input must be a Ring morphism') self._morphism = morphism - self._domain = gamma.domain() + self._function_ring = gamma.domain() # Check domain is Fq[X] - function_ring = self._domain + function_ring = self._function_ring if not isinstance(function_ring, PolynomialRing_general): raise NotImplementedError('domain must be a polynomial ring') function_ring_base = function_ring.base_ring() @@ -39,14 +39,14 @@ def __init__(self, morphism, name='t'): Fq = function_ring_base FqX = function_ring X = FqX.gen() - # Check domain is field + # Check codomain of gamma is field K = gamma.codomain() if not K.is_field(): - raise TypeError('the codomain must be a field') + raise TypeError('the codomain of the morphism must be a field') # Build K{t} d = log(Fq.cardinality(), Fq.characteristic()) tau = K.frobenius_endomorphism(d) - self._codomain = OrePolynomialRing(K, tau, names=name) + self._ore_polring = OrePolynomialRing(K, tau, names=name) # Create characteristic self._characteristic = None if K.is_finite(): @@ -55,30 +55,43 @@ def __init__(self, morphism, name='t'): self._characteristic = FqX(E(gamma(X)).minpoly()) def base(self): - return self.codomain().base_ring() + return self._ore_polring.base_ring() def characteristic(self): if self._characteristic is None: raise NotImplementedError return self._characteristic + def function_ring(self): + return self._function_ring + + def morphism(self): + return self._morphism + + def ore_polring(self): + return self._ore_polring + + # Sage methods + def _call_(self, gen): # Avoid circular import - from sage.rings.function_field.drinfeld_module import DrinfeldModule + from sage.rings.function_field.drinfeld_modules.drinfeld_module import DrinfeldModule # If gen is not in the codomain, an exception is raised - gen = self._codomain(gen) + gen = self._ore_polring(gen) if self.characteristic()(gen[0]) != 0: - raise ValueError('incorrect characteristic') - return DrinfeldModule(self._domain, gen) - - def super_categories(self): - return [] + raise ValueError('constant coefficient is not a root of the characteristic') + return DrinfeldModule(self._function_ring, gen) def _repr_(self): return f'Category of Drinfeld modules defined by {self._morphism}' + # Sage requires those: + def _make_named_class_key(self, name): - return self._domain.category() + return self._function_ring.category() + + def super_categories(self): + return [] def Homsets(self): return Homsets() @@ -86,16 +99,8 @@ def Homsets(self): def Endsets(self): return Homsets() - def domain(self): - return self._domain - - def codomain(self): - return self._codomain - - def morphism(self): - return self._morphism - class ParentMethods: + def characteristic(self): return self.category().characteristic() diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 8123f4781a6..de14a38df7d 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -367,9 +367,9 @@ def __classcall_private__(cls, function_ring, gen, name='t'): category = DrinfeldModules(gamma, name=name) # Check gen as Ore polynomial - if ore_polring is not None and ore_polring is not category.codomain(): - raise ValueError(f'generator must lie in {category.codomain()}') - ore_polring = category.codomain() # Sanity cast + if ore_polring not in (None, category.ore_polring()): + raise ValueError(f'generator must lie in {category.ore_polring()}') + ore_polring = category.ore_polring() # Sanity cast gen = ore_polring(gen) # Sanity cast if gen.degree() <= 0: raise ValueError('generator must have positive degree') @@ -384,11 +384,11 @@ def __classcall_private__(cls, function_ring, gen, name='t'): def __init__(self, gen, category): CategoryObject.__init__(self, category=category) self._base_ring = category.base() - self._function_ring = category.domain() + self._function_ring = category.function_ring() self._gen = gen - self._morphism = self._function_ring.hom([gen]) + self._morphism = category._function_ring.hom([gen]) self._ore_polring = gen.parent() - self._Fq = self._function_ring.base_ring() + self._Fq = self._function_ring.base_ring() # Must be last ################# # Private utils # From 96776b71af5144fc6ee5ae869ce69c5e4cf22263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Wed, 10 Aug 2022 11:30:58 +0100 Subject: [PATCH 062/751] Fix change_ring method in DrinfeldModule class The import and the call of the DrinfeldModule constructor were wrong. --- .../function_field/drinfeld_modules/drinfeld_module.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index de14a38df7d..22e08e23e89 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -567,12 +567,11 @@ def change_ring(self, new_field): and self.ore_polring().base_ring().is_subring(R): raise ValueError('new base field must be a finite extension of ' \ 'the base ring') - frobenius = self.ore_polring().twisting_morphism() + frobenius = self._ore_polring.twisting_morphism() new_frobenius = R.frobenius_endomorphism(frobenius.power()) new_ore_polring = OrePolynomialRing(R, new_frobenius, - names=self.ore_polring().variable_names()) - return DrinfeldModule(self.function_ring(), - new_ore_polring(self.gen()), self.characteristic()) + names=self._ore_polring.variable_names()) + return DrinfeldModule(self._function_ring, new_ore_polring(self._gen)) def height(self): r""" From 5a640835045f561d74dcedc449cd94cf9bf5daea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 12 Aug 2022 22:18:43 +0200 Subject: [PATCH 063/751] Add polcast flag to build Drinfeld modules This flag makes sure OrePolynomialRing does not build a regular polynomial ring when the twisting morphism is the identity. See ticket 34001 : https://trac.sagemath.org/ticket/34001. --- src/sage/categories/drinfeld_modules.py | 3 ++- .../rings/function_field/drinfeld_modules/drinfeld_module.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index a81bb68e42e..c7d3ced6d59 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -46,7 +46,8 @@ def __init__(self, morphism, name='t'): # Build K{t} d = log(Fq.cardinality(), Fq.characteristic()) tau = K.frobenius_endomorphism(d) - self._ore_polring = OrePolynomialRing(K, tau, names=name) + self._ore_polring = OrePolynomialRing(K, tau, names=name, + polcast=False) # Create characteristic self._characteristic = None if K.is_finite(): diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 22e08e23e89..37774759af7 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -570,7 +570,7 @@ def change_ring(self, new_field): frobenius = self._ore_polring.twisting_morphism() new_frobenius = R.frobenius_endomorphism(frobenius.power()) new_ore_polring = OrePolynomialRing(R, new_frobenius, - names=self._ore_polring.variable_names()) + names=self._ore_polring.variable_names(), polcast=False) return DrinfeldModule(self._function_ring, new_ore_polring(self._gen)) def height(self): From 750d797641ec0cc00436737eabc1ba9a29f13977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Sat, 13 Aug 2022 11:35:44 +0200 Subject: [PATCH 064/751] (minor) Fix comment in DrinfeldModule constructor --- .../rings/function_field/drinfeld_modules/drinfeld_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 37774759af7..b23656ab29c 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -370,7 +370,7 @@ def __classcall_private__(cls, function_ring, gen, name='t'): if ore_polring not in (None, category.ore_polring()): raise ValueError(f'generator must lie in {category.ore_polring()}') ore_polring = category.ore_polring() # Sanity cast - gen = ore_polring(gen) # Sanity cast + gen = ore_polring(gen) if gen.degree() <= 0: raise ValueError('generator must have positive degree') From ab02ba1ff7e97555284c458897895bb5e06bea91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Sat, 13 Aug 2022 11:36:10 +0200 Subject: [PATCH 065/751] Add name flag to change_ring method in DrinfeldModule This is to allow choosing the Ore variable name of the new Drinfeld module. --- .../drinfeld_modules/drinfeld_module.py | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index b23656ab29c..c4486cd4f40 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -542,7 +542,7 @@ def __call__(self, a): return self._morphism(a) - def change_ring(self, new_field): + def change_ring(self, new_field, name=None): r""" If ``new_field`` is a field extension of the base ring, return a new Drinfeld module that extends ``self`` to the base ring @@ -562,16 +562,11 @@ def change_ring(self, new_field): - a Drinfeld module """ - R = new_field - if not (R.is_field() and R.is_finite() and self._Fq.is_subring(R)) \ - and self.ore_polring().base_ring().is_subring(R): - raise ValueError('new base field must be a finite extension of ' \ - 'the base ring') - frobenius = self._ore_polring.twisting_morphism() - new_frobenius = R.frobenius_endomorphism(frobenius.power()) - new_ore_polring = OrePolynomialRing(R, new_frobenius, - names=self._ore_polring.variable_names(), polcast=False) - return DrinfeldModule(self._function_ring, new_ore_polring(self._gen)) + coeffs = self._gen.coefficients() + new_coeffs = list(map(new_field, coeffs)) + if name == None: + name = self._ore_polring.variable_name() + return DrinfeldModule(self._function_ring, new_coeffs, name=name) def height(self): r""" From 4c9b81dfc492384b07d5fdf1eab4eeac08c2c7e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 12 Aug 2022 23:23:51 +0200 Subject: [PATCH 066/751] Add examples in DrinfeldModule doc and rewrite docstrings EXAMPLES: fields were added to each method. Some now have TESTS:: fields, but not all of them. Unfortunately this commit is not very clean. It also includes: - some cosmectif refactoring of the velu method; - deletion of methods g and delta (thanks David, see https://trac.sagemath.org/ticket/33713#comment:80); - changing name of method _test_rank_two to _check_rank_two. --- .../drinfeld_modules/drinfeld_module.py | 571 ++++++++++++++---- .../finite_drinfeld_module.py | 8 +- 2 files changed, 473 insertions(+), 106 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index c4486cd4f40..266119365fa 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -77,6 +77,13 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): transcendance degree `1`, and `\infty` is a fixed place of `k`. This is out of the scope of this implementation. + INPUT: + + - ``function_ring`` -- the polynomial ring `\Fq[X]` + - ``gen`` -- the generator `\phi_X`, as a list of coefficients or an + Ore polynomial + - ``name`` (optional) the name of the Ore variable + .. RUBRIC:: Construction A Drinfeld module object (class @@ -116,6 +123,8 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): Drinfeld module defined by X |--> t^2 + t + X over Fraction Field of Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 sage: phi_infinite.is_finite() False + sage: phi.is_finite() + True Drinfeld modules have their own category (see class :class:`sage.categories.drinfeld_modules.DrinfeldModules`):: @@ -144,11 +153,12 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): .. RUBRIC:: More general `K` - The field `K` does not need be generated, over `\Fq`, by `\gamma(X)` - --- `K` can be an extension of `\Fq(\gamma(X))`. In the following - example, `K` is still a degree six extension of `\Fq`, but `\gamma` - is a projection over `\Fq[X]/p(X)`, with `p(X) = X^3 + (z_2 + 2)X^2 + - (6*z_2 + 1)X + 3z_2 + 5`:: + The field `K` does not need be generated by the constant coefficient + (i.e. generated, as an extension of `\Fq`, by the image + `\gamma(X)`). In the following example, `K` is still a + degree six extension of `\Fq`, but `\gamma` is a projection over + `\Fq[X]/p(X)`, with `p(X) = X^3 + (z_2 + 2)X^2 + (6*z_2 + 1)X + 3z_2 + + 5`:: sage: p = X^2 + z2 + 2 # Prime polynomial sage: p_root = z^10 + 2*z^9 + z^8 + z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z # Root of p @@ -211,14 +221,10 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: phi.height() 1 - And there are some rank-two specifics:: + As well as the j-invariant if the rank is two:: sage: phi.j() # j-invariant 1 - sage: phi.g() # write phi_X = z + g*t + Delta*t^2 - 1 - sage: phi.delta() # Write phi_X = z + g*t + Delta*t^2 - 1 .. RUBRIC:: Morphisms, isogenies @@ -293,17 +299,17 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): Let ``ore_pol`` be a non-zero Ore polynomial ``ore_pol``. For Drinfeld module, it is easy to decide --- and find as the case may - be --- if there exists a Drinfeld module ``new_drin_mod``, such that - ``ore_pol`` is an isogeny from ``self`` to ``new_drin_mod``. If this + be --- if there exists a Drinfeld module ``psi``, such that + ``ore_pol`` is an isogeny from ``self`` to ``psi``. If this Drinfeld module exists, it is unique. sage: ore_pol = (2*z^6 + z^3 + 2*z^2 + z + 2)*t + z^11 + 2*z^10 + 2*z^9 + 2*z^8 + z^7 + 2*z^6 + z^5 + z^3 + z^2 + z - sage: new_drin_mod = phi.velu(ore_pol) - sage: new_drin_mod + sage: psi = phi.velu(ore_pol) + sage: psi Drinfeld module defined by X |--> (2*z^11 + 2*z^9 + z^6 + 2*z^5 + 2*z^4 + 2*z^2 + 1)*t^2 + (2*z^11 + 2*z^10 + 2*z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z)*t + z over Finite Field in z of size 3^12 - sage: ore_pol in Hom(phi, new_drin_mod) + sage: ore_pol in Hom(phi, psi) True - sage: ore_pol * phi(X) == new_drin_mod(X) * ore_pol + sage: ore_pol * phi(X) == psi(X) * ore_pol True .. RUBRIC:: Other methods @@ -390,17 +396,6 @@ def __init__(self, gen, category): self._ore_polring = gen.parent() self._Fq = self._function_ring.base_ring() # Must be last - ################# - # Private utils # - ################# - - def _test_rank_two(self): - r""" - Raise ``NotImplementedError`` if the rank is not two. - """ - if self.rank() != 2: - raise NotImplementedError('the rank must be 2') - ########################## # Special Sage functions # ########################## @@ -436,6 +431,51 @@ def base_ring(self): OUTPUT: - a field + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi.base_ring() + Finite Field in z12 of size 5^12 + + This is always true:: + + sage: phi.base_ring() is phi.ore_polring().base_ring() + True + sage: phi.base_ring() is K + True + + Note that in the above example, the base ring does is not + generated by the constant coefficient (i.e. generated, as an + extension of `\Fq`, by the image `\gamma(X)`). The base + ring may also be the same as ``Fq``:: + + sage: psi = DrinfeldModule(FqX, [Fq(1), Fq.gen()]) + sage: psi.base_ring() + Finite Field in z2 of size 5^2 + sage: psi.base_ring() is Fq + True + + In which case the Ore polynomial ring is isomorphic to a regular + polynomial ring:: + + sage: psi.ore_polring() + Ore Polynomial Ring in t over Finite Field in z2 of size 5^2 twisted by Identity + sage: psi.ore_polring().twisting_morphism() + Identity endomorphism of Finite Field in z2 of size 5^2 + + TESTS:: + + sage: psi.ore_polring().twisting_morphism().is_identity() + True + + sage: psi.base_ring() is psi.function_ring().base_ring() + True + """ return self._base_ring @@ -453,6 +493,47 @@ def constant_coefficient(self): OUTPUT: - an element in the base ring + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi.constant_coefficient() == p_root + True + + The constant coefficient is the image of ``X`` by the + morphism that defines the category of ``phi``:: + + sage: cat = phi.category() + sage: gamma = cat.morphism() + sage: gamma(X) == phi.constant_coefficient() + True + + Two Drinfeld modules in the same category have the same constant + coefficient:: + + sage: t = phi.ore_variable() + sage: psi = cat(phi.constant_coefficient() + t^3) + sage: psi + Drinfeld module defined by X |--> t^3 + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 + + Reciprocally, it is impossible to create two Drinfeld modules in + this category if they don't share the same constant + coefficient:: + + sage: rho = cat(phi.constant_coefficient() + 1 + t^3) + Traceback (most recent call last): + ... + ValueError: constant coefficient is not a root of the characteristic + + One cal also retrieve the constant coefficient using + ``phi(X)[0]`:: + + sage: phi.constant_coefficient() == phi(X)[0] + True """ return self.gen()[0] @@ -467,6 +548,16 @@ def gen(self): OUTPUT: - an Ore polynomial + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi.gen() == phi(X) + True """ return self._gen @@ -478,7 +569,45 @@ def morphism(self): - a ring morphism, from the function ring to the Ore polynomial ring - """ + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi.morphism() + Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + To: Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 twisted by z12 |--> z12^(5^2) + Defn: X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: from sage.rings.morphism import RingHomomorphism + sage: isinstance(phi.morphism(), RingHomomorphism) + True + + Actually, the ``DrinfeldModule`` method ``__call__`` simply + class the ``__call__`` method of this morphism:: + + sage: phi.morphism()(X) == phi(X) + True + sage: a = FqX.random_element() + sage: phi.morphism()(a) == phi(a) + True + + And many methods of the Drinfeld module have a counterpart in + the morphism object:: + + sage: m = phi.morphism() + sage: m.domain() is phi.function_ring() + True + sage: m.codomain() is phi.ore_polring() + True + sage: m.im_gens() + [z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12] + sage: phi(X) == m.im_gens()[0] + True + """ return self._morphism def ore_polring(self): @@ -491,6 +620,37 @@ def ore_polring(self): OUTPUT: - an Ore polynomial ring + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: ore_polring = phi.ore_polring() + sage: ore_polring + Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 twisted by z12 |--> z12^(5^2) + + The Ore polynomial ring can also be retrieved from the category + of the Drinfeld module:: + + sage: ore_polring is phi.category().ore_polring() + True + + The generator of the Drinfeld module is in the Ore polynomial + ring:: + + sage: phi(X) in ore_polring + True + + The Ore variable is just the generator of the Ore polynomial + ring:: + + sage: ore_polring.gen() + t + sage: phi.ore_variable() is ore_polring.gen() + True """ return self._ore_polring @@ -503,6 +663,30 @@ def ore_variable(self): OUTPUT: - an Ore polynomial + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi.ore_variable() + t + sage: phi.ore_variable() is phi.ore_polring().gen() + True + + We can use the Ore variable to instanciate new Drinfeld + modules...:: + + sage: t = phi.ore_variable() + sage: psi_X = phi.constant_coefficient() + 3*t + 2*t^4 + sage: psi = DrinfeldModule(FqX, psi_X) + + ...or morphisms and isogenies:: + + sage: t^6 in End(phi) # Frobenius endomorphism + True """ return self._ore_polring.gen() @@ -518,6 +702,16 @@ def function_ring(self): OUTPUT: - a polynomial ring + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi.function_ring() is FqX + True """ return self._function_ring @@ -561,6 +755,52 @@ def change_ring(self, new_field, name=None): OUTPUT: - a Drinfeld module + + EXAMPLES: + + The new ring can be an extension of the base ring:: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, p_root^3, 2]) + sage: K2 = K.extension(2) + sage: phi_2 = phi.change_ring(K2) + sage: phi_2 + Drinfeld module defined by X |--> 2*t^2 + (3*z24^23 + 2*z24^22 + 2*z24^20 + z24^19 + 4*z24^18 + 3*z24^17 + 4*z24^15 + 2*z24^13 + 4*z24^12 + 4*z24^11 + 3*z24^10 + 3*z24^9 + 4*z24^8 + 4*z24^6 + 3*z24^5 + 4*z24^4 + 4*z24^3 + 2*z24)*t + 2*z24^23 + 2*z24^22 + z24^21 + 2*z24^20 + z24^19 + 2*z24^18 + 3*z24^17 + 2*z24^16 + 4*z24^12 + 3*z24^11 + 4*z24^10 + z24^9 + z24^8 + 3*z24^7 + 2*z24^6 + z24^4 + 4*z24^3 + 3*z24^2 + 3*z24 + 2 over Finite Field in z24 of size 5^24 + + And we can check various things:: + + sage: phi.change_ring(K2).change_ring(K) is phi + True + sage: phi_2.base_ring() is K2 + True + + Naturally, the category has changed:: + + sage: phi_2.category() + Category of Drinfeld modules defined by Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + To: Finite Field in z24 of size 5^24 + Defn: X |--> 2*z24^23 + 2*z24^22 + z24^21 + 2*z24^20 + z24^19 + 2*z24^18 + 3*z24^17 + 2*z24^16 + 4*z24^12 + 3*z24^11 + 4*z24^10 + z24^9 + z24^8 + 3*z24^7 + 2*z24^6 + z24^4 + 4*z24^3 + 3*z24^2 + 3*z24 + 2 + + We can also change the base ring to a subfield, even though some things + do not work as expected:: + + sage: K0 = Fq.extension(2) + sage: phi_0 = phi.change_ring(K0) + sage: phi_0.base_ring() is K0 + True + sage: phi.change_ring(K0).change_ring(K) # known bug + Traceback (most recent call last) + ... + TypeError: no coercion defined + + Furthermore:: + + sage: phi.change_ring(K) is phi + True """ coeffs = self._gen.coefficients() new_coeffs = list(map(new_field, coeffs)) @@ -572,11 +812,21 @@ def height(self): r""" Return the height of the Drinfeld module. - When the function ring is a polynomial ring, the height is 1. + In our case, the height is always 1. OUTPUT: - an integer + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi.height() == 1 + True """ return Integer(1) @@ -597,17 +847,54 @@ def invert(self, ore_pol): OUTPUT: - a polynomial - + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: a = FqX.random_element() + sage: phi.invert(phi(a)) == a + True + sage: phi.invert(phi(X)) == X + True + sage: phi.invert(phi(Fq.gen())) == Fq.gen() + True + + When the input is not in the image of the Drinfeld module, the + method returns None:: + + sage: t = phi.ore_variable() + sage: phi.invert(t + 1) is None + True + sage: phi.invert(t^3 + t^2 + 1) is None + True + ALGORITHM: - TODO - TODO - TODO - TODO - TODO - TODO - TODO - TODO - TODO + + See [MS2019]_, 3.2.5. + + TESTS:: + + sage: a = FqX.random_element() + sage: cat = phi.category() + sage: phi_r1 = cat.random_element(1) + sage: phi_r1.invert(phi_r1(a)) == a + True + sage: phi_r2 = cat.random_element(2) + sage: phi_r2.invert(phi_r2(a)) == a + True + sage: phi_r3 = cat.random_element(3) + sage: phi_r3.invert(phi_r3(a)) == a + True + sage: phi_r4 = cat.random_element(4) + sage: phi_r4.invert(phi_r4(a)) == a + True + sage: phi_r5 = cat.random_element(5) + sage: phi_r5.invert(phi_r5(a)) == a + True """ if not ore_pol in self.ore_polring(): raise TypeError('input must be an Ore polynomial') @@ -637,10 +924,73 @@ def is_finite(self): OUTPUT: - ``True`` or ``False`` + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi.is_finite() + True + sage: L = Frac(FqX) + sage: psi = DrinfeldModule(FqX, [L(2), L(1)]) + sage: psi.is_finite() + False """ from sage.rings.function_field.drinfeld_modules.finite_drinfeld_module import FiniteDrinfeldModule return isinstance(self, FiniteDrinfeldModule) + def j(self): + r""" + Return the j-invariant of the Drinfeld module. + + Only the rank two case has been implemented. An + NotImplementedError is raised if the rank is not two. + + Assume the rank is two. Write the generator `\phi_X = \gamma(X) + + g\tau + \Delta\tau^2`. The j-invariant is defined by + `\frac{g^{q+1}}{\Delta}`, `q` being the order of the base field + of the polynomial ring. In our case, this base field is always + finite, as we force the function ring to be of the form + `\Fq[X]`. + + OUTPUT: + + - an element in the base ring if the rank is two; an + exception is raised otherwise + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi.j() + z12^10 + 4*z12^9 + 3*z12^8 + 2*z12^7 + 3*z12^6 + z12^5 + z12^3 + 4*z12^2 + z12 + 2 + sage: psi = DrinfeldModule(FqX, [p_root, 1, 1]) + sage: psi.j() + 1 + sage: rho = DrinfeldModule(FqX, [p_root, 0, 1]) + sage: rho.j() + 0 + + The rank must be two:: + + sage: theta = DrinfeldModule(FqX, [p_root, 1, 0]) + sage: theta.j() + Traceback (most recent call last): + ... + NotImplementedError: the rank must be 2 + """ + self._check_rank_two() + g = self._gen[1] + delta = self._gen[2] + q = self._Fq.order() + return (g**(q+1)) / delta + def rank(self): r""" Return the rank of the Drinfeld module. @@ -651,22 +1001,37 @@ def rank(self): OUTPUT: - an integer + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi.rank() + 2 + sage: psi = DrinfeldModule(FqX, [p_root, 2]) + sage: psi.rank() + 1 + sage: rho = DrinfeldModule(FqX, [p_root, 0, 0, 0, 1]) + sage: rho.rank() + 4 """ return self.gen().degree() - def velu(self, candidate): + def velu(self, isog): r""" - Return a new Drinfeld module such that ``candidate`` is an + Return a new Drinfeld module such that ``isog`` is an isogeny to this module with domain ``self``. If no such isogeny exists, return ``None``. - If the candidate is zero, return ``None``, as an isogeny is + If the input is zero, return ``None``, as an isogeny is required to be non zero. INPUT: - - ``candidate`` -- an Ore polynomial that defines the isogeny - with domain ``self`` and codomain the output of the method + - ``isog`` -- the Ore polynomial that defines the isogeny OUTPUT: @@ -674,17 +1039,15 @@ def velu(self, candidate): ALGORITHM: - We write the Ore Euclidean division `\phi_X = - \mathrm{candidate}*q + r`, and return - The candidate is an isogeny if only if: + The input defines an isogeny if only if: 1. The degree of the characteristic devides the height - of the candidate. (The height of an Ore polynomial + of the input. (The height of an Ore polynomial `P(t)` is the maximum `n` such that `t^n` right-divides `P(t)`.) - 2. The candidate right-divides the generator, which can + 2. The input right-divides the generator, which can be tested with Euclidean division. - We test if the candidate is an isogeny, and, if it is, we + We test if the input is an isogeny, and, if it is, we return the quotient of the Euclidean division. Height and Euclidean division of Ore polynomials are @@ -693,14 +1056,43 @@ def velu(self, candidate): Another possible algorithm is to recursively solve a system, see :arxiv:`2203.06970`, eq. 1.1. + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: t = phi.ore_variable() + sage: isog = t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 + sage: psi = phi.velu(isog) + sage: psi + Drinfeld module defined by X |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 + sage: isog in Hom(phi, psi) + True + + This method works for endomorphisms as well:: + + sage: phi.velu(phi(X)) is phi + True + sage: phi.velu(t^6) is phi + True + + The following inputs do not define isogenies, and the method + returns None:: + + sage: phi.velu(0) + sage: phi.velu(t) + sage: phi.velu(t^3 + t + 2) """ - if not candidate in self.ore_polring(): + if not isog in self.ore_polring(): raise TypeError('input must be an Ore polynomial') - if candidate == 0: + if isog == 0: return None - if not self.characteristic().degree().divides(candidate.valuation()): + if not self.characteristic().degree().divides(isog.valuation()): return None - quo, rem = (candidate * self.gen()).right_quo_rem(candidate) + quo, rem = (isog * self.gen()).right_quo_rem(isog) return None if rem != 0 else DrinfeldModule(self._function_ring, quo) def _Hom_(self, other, category): @@ -720,55 +1112,30 @@ def _Hom_(self, other, category): OUTPUT: - an homset + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: t = phi.ore_variable() + sage: isog = t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 + sage: psi = phi.velu(isog) + sage: hom = phi._Hom_(psi, category=phi.category()) + sage: hom is Hom(phi, psi) # known bug + True + sage: from sage.rings.function_field.drinfeld_modules.homset import DrinfeldModuleHomset + sage: isinstance(hom, DrinfeldModuleHomset) + True """ from sage.rings.function_field.drinfeld_modules.homset import DrinfeldModuleHomset return DrinfeldModuleHomset(self, other, category) - # Rank two methods - - def delta(self): - r""" - If the rank is two, return `\Delta` such that the generator is - `phi_X = \gamma(X) + g\tau + \Delta\tau^2`; if the rank is not - two, raise an exception. - - OUTPUT: - - - an element in the base ring if the rank is two; an - exception is raised otherwise - """ - self._test_rank_two() - return self.gen()[2] - - def g(self): - r""" - If the rank is two, return `g` such that the generator is `phi_X - = \gamma(X) + g\tau + \Delta\tau^2`; if the rank is not two, - raise an exception. - - OUTPUT: - - - an element in the base ring if the rank is two; an - exception is raised otherwise - """ - self._test_rank_two() - return self.gen()[1] - - def j(self): - r""" - If the rank is two, return the j-invariant of the Drinfeld - module; if the rank is not two, raise an exception. - - Write the generator `\phi_X = \gamma(X) + g\tau + \Delta\tau^2`. - The j-invariant is defined by `\frac{g^{q+1}}{\Delta}`, `q` - being the order of the base field of the polynomial ring. In our - case, this base field is always finite, as we force the function - ring to be of the form `\Fq[X]`. - - OUTPUT: - - - an element in the base ring if the rank is two; an - exception is raised otherwise - """ - self._test_rank_two() - return (self.g()**(self._Fq.order()+1)) / self.delta() + def _check_rank_two(self): + r""" + Raise ``NotImplementedError`` if the rank is not two. + """ + if self.rank() != 2: + raise NotImplementedError('the rank must be 2') diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index d6d55fa4706..4fa9c15eea2 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -19,7 +19,7 @@ def frobenius_charpoly(self, var='T'): return S([self.frobenius_norm(), -self.frobenius_trace(), 1]) def frobenius_norm(self): - self._test_rank_two() + self._check_rank_two() # Notations from Schost-Musleh: n = self._base_ring.over(self._Fq).degree_over(self._Fq) d = self.characteristic().degree() @@ -28,7 +28,7 @@ def frobenius_norm(self): return ((-1)**n) * (self.characteristic()**m) / norm def frobenius_trace(self): - self._test_rank_two() + self._check_rank_two() # Notations from Schost-Musleh: n = self._base_ring.over(self._Fq).degree_over(self._Fq) B = self.frobenius_norm() @@ -36,9 +36,9 @@ def frobenius_trace(self): return self.invert(t**n + (self(B) // t**n)) def is_ordinary(self): - self._test_rank_two() + self._check_rank_two() return not self.is_supersingular() def is_supersingular(self): - self._test_rank_two() + self._check_rank_two() return self.characteristic().divides(self.frobenius_trace()) From ec1d6bd1c598177f1bea4cc59a570143067a97fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Sat, 13 Aug 2022 15:38:27 +0200 Subject: [PATCH 067/751] Refactor invert method in DrinfeldModule Handle the case when the degree of the input is not a multiple of the rank, and change notations inside the method definition. --- .../drinfeld_modules/drinfeld_module.py | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 266119365fa..0aaaf206627 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -896,21 +896,26 @@ def invert(self, ore_pol): sage: phi_r5.invert(phi_r5(a)) == a True """ - if not ore_pol in self.ore_polring(): + deg = ore_pol.degree() + r = self.rank() + if not ore_pol in self._ore_polring: raise TypeError('input must be an Ore polynomial') if ore_pol in self._base_ring: return self._Fq(ore_pol) - r = self.rank() - X = self.function_ring().gen() - k = ore_pol.degree() // r - m_lines = [[0 for _ in range(k+1)] for _ in range(k+1)] + if deg % r != 0: + return None + + k = deg // r + X = self._function_ring.gen() + mat_lines = [[0 for _ in range(k+1)] for _ in range(k+1)] for i in range(k+1): phi_X_i = self(X**i) for j in range(i+1): - m_lines[j][i] = phi_X_i[r*j] - m = Matrix(m_lines) - v = vector([list(ore_pol)[r*j] for j in range(k+1)]) - pre_image = self.function_ring()(list((m**(-1)) * v)) + mat_lines[j][i] = phi_X_i[r*j] + mat = Matrix(mat_lines) + vec = vector([list(ore_pol)[r*j] for j in range(k+1)]) + pre_image = self._function_ring(list((mat**(-1)) * vec)) + if self(pre_image) == ore_pol: return pre_image else: From dca2f7964e11e9999196a90dcfcb7dce590c5aa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 16 Aug 2022 17:19:20 +0200 Subject: [PATCH 068/751] Create method random_element in DrinfeldModules --- src/sage/categories/drinfeld_modules.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index c7d3ced6d59..12d32cb230b 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -11,6 +11,7 @@ from sage.categories.category import CategoryWithParameters from sage.misc.functional import log +from sage.rings.integer import Integer from sage.rings.morphism import RingHomomorphism from sage.rings.polynomial.polynomial_ring import PolynomialRing_general from sage.rings.polynomial.ore_polynomial_ring import OrePolynomialRing @@ -72,6 +73,25 @@ def morphism(self): def ore_polring(self): return self._ore_polring + def random_element(self, rank): + + if not isinstance(rank, Integer): + raise TypeError('rank must be a positive integer') + if rank <= 0: + raise ValueError('rank must be a positive integer') + + K = self.base() + coeffs = [self._constant_coefficient] + for _ in range(rank-1): + coeffs.append(K.random_element()) + dom_coeff = 0 + while dom_coeff == 0: + dom_coeff = K.random_element() + coeffs.append(dom_coeff) + + return self(coeffs) + + # Sage methods def _call_(self, gen): From ad98d81dba0cfe02572d3369ad2e6a27a1df0d25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 16 Aug 2022 17:19:56 +0200 Subject: [PATCH 069/751] Create method constant_coefficient in DrinfeldModules --- src/sage/categories/drinfeld_modules.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 12d32cb230b..229afc0a36c 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -49,6 +49,8 @@ def __init__(self, morphism, name='t'): tau = K.frobenius_endomorphism(d) self._ore_polring = OrePolynomialRing(K, tau, names=name, polcast=False) + # Create constant coefficient + self._constant_coefficient = gamma(X) # Create characteristic self._characteristic = None if K.is_finite(): @@ -64,6 +66,9 @@ def characteristic(self): raise NotImplementedError return self._characteristic + def constant_coefficient(self): + return self._constant_coefficient + def function_ring(self): return self._function_ring From 20e2eadfb1460fdf3cafff08ab7ae7bc4c7973d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 16 Aug 2022 17:20:08 +0200 Subject: [PATCH 070/751] Refactor _repr_ method in DrinfeldModuleHomset The previous version was really hard to parse. However, I don't know if the current version is standard. --- src/sage/rings/function_field/drinfeld_modules/homset.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index 4dddb310049..aa295646e42 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -21,8 +21,9 @@ def __init__(self, X, Y, category=None, check=True): Homset.__init__(self, X, Y, category=category, base=base, check=check) def _repr_(self): - return f'Set of Drinfeld module morphisms from ' \ - f'{self.domain().gen()} to {self.codomain().gen()}' + return f'Set of Drinfeld module morphisms:\n' \ + f' From: {self.domain()}\n' \ + f' To: {self.codomain()}' def __contains__(self, x): try: From d61a0cf2e8330f8d8bacb6c7c3bf52bd2c5a6988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 16 Aug 2022 18:57:38 +0200 Subject: [PATCH 071/751] Apply David's suggestions (ticket 33713 comment 80) See https://trac.sagemath.org/ticket/33713#comment:80. --- .../drinfeld_modules/drinfeld_module.py | 41 +++++++++---------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 0aaaf206627..cf7ccec125c 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -73,9 +73,9 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): Drinfeld modules are defined in a larger setting, in which `\Fq[X]` is replaced by a more general ring: the ring of functions in `k` that are regular outside `\infty`, where `k` is - a function field whose constant field is `\Fq` and with - transcendance degree `1`, and `\infty` is a fixed place of `k`. - This is out of the scope of this implementation. + a function field over `\Fq` with transcendance degree `1` and + `\infty` is a fixed place of `k`. This is out of the scope of + this implementation. INPUT: @@ -230,7 +230,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): A *morphism of Drinfeld modules `\phi \to \psi`* is an Ore polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for - every $a \in \Fq[X]`. In our case, this is equivalent to verifying + every `a \in \Fq[X]`. In our case, this is equivalent to verifying `f \phi_X = \psi_X f`. An *isogeny* is a non-zero morphism. Use the ``in`` syntax to test if an Ore polynomial defines an @@ -322,7 +322,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: Ltau(phi(X)) == phi_rebased(X) True - Given an Ore polynomial that equals `\phi(a)` for some `a \in + Given an Ore polynomial that equals `\phi_a` for some `a \in \Fq[X]`, we can retrieve `a` (as a morphism, a Drinfeld module is injective, see [Gos1998]_, cor. 4.5.2.):: @@ -360,8 +360,8 @@ def __classcall_private__(cls, function_ring, gen, name='t'): ore_polring = None ore_polring_base = Sequence(gen).universe() else: - raise TypeError('generator must be list of coefficients or an ' \ - 'Ore polynomial') + raise TypeError('generator must be a list of coefficients '\ + 'or an Ore polynomial') # Build the morphism that defines the category if not ore_polring_base.has_coerce_map_from(function_ring.base_ring()): @@ -738,14 +738,12 @@ def __call__(self, a): def change_ring(self, new_field, name=None): r""" - If ``new_field`` is a field extension of the base ring, return a - new Drinfeld module that extends ``self`` to the base ring - ``new_field``. + Return a Drinfeld module defined like ``self``, but with base + ring ``new_field``. - Let `f` be the morphism that defines ``self``, let `i` be the - inclusion of ``self.ore_polring()`` into the Ore pol. ring whose - base is ``new_field``. The morphism that defines the new - Drinfeld module is the composition `i \circ f`. + The new base can either be a field extension of the base ring, + or field that has a coercion map from the field of definitions + of the coefficients of the generator. INPUT: @@ -832,8 +830,8 @@ def height(self): def invert(self, ore_pol): r""" - Find the inverse of ``ore_pol`` by the morphism that defines the - Drinfeld module. If ``ore_pol`` is not in the image of the + Return the inverse ``ore_pol`` by the morphism that defines the + Drinfeld module; if ``ore_pol`` is not in the image of the morphism, return ``None``. Said otherwise, return `a` if ``ore_pol`` is `phi_a`, otherwise @@ -923,7 +921,7 @@ def invert(self, ore_pol): def is_finite(self): r""" - Return ``True`` if the Drinfeld module is finite, return + Return ``True`` if the Drinfeld module is finite; return ``False`` otherwise. OUTPUT: @@ -949,10 +947,9 @@ def is_finite(self): def j(self): r""" - Return the j-invariant of the Drinfeld module. - - Only the rank two case has been implemented. An - NotImplementedError is raised if the rank is not two. + Return the j-invariant of the Drinfeld module; only the rank two + case has been implemented, a NotImplementedError is raised if + the rank is not two. Assume the rank is two. Write the generator `\phi_X = \gamma(X) + g\tau + \Delta\tau^2`. The j-invariant is defined by @@ -1028,7 +1025,7 @@ def rank(self): def velu(self, isog): r""" Return a new Drinfeld module such that ``isog`` is an - isogeny to this module with domain ``self``. If no such isogeny + isogeny to this module with domain ``self``; if no such isogeny exists, return ``None``. If the input is zero, return ``None``, as an isogeny is From f8e34f2d2ccea453f0cc98ca0fe6d154b352c10d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Wed, 17 Aug 2022 13:15:59 +0200 Subject: [PATCH 072/751] Make DrinfeldModuleMorphism inherit UniqueRepresentation Thanks Travis for the help. Not too confident about the code here, but preliminary tests pass. --- .../function_field/drinfeld_modules/homset.py | 5 +++- .../drinfeld_modules/morphism.py | 30 +++++++++---------- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index aa295646e42..595a8836df2 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -33,4 +33,7 @@ def __contains__(self, x): return False def _element_constructor_(self, *args, **kwds): - return self.element_class(self, *args, **kwds) + # NOTE: This used to be self.element_class(self, ...), but this + # would call __init__ instead of __classcall_private__. This + # seems to work, but I don't know what I'm doing. + return DrinfeldModuleMorphism(self, *args, **kwds) diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 4a7e4f175f7..c1d6b29404e 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -8,17 +8,22 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -# from sage.categories.morphism import Morphism +from sage.misc.inherit_comparison import InheritComparisonClasscallMetaclass from sage.structure.element import Element +from sage.structure.unique_representation import UniqueRepresentation from sage.rings.polynomial.ore_polynomial_element import OrePolynomial from sage.rings.polynomial.ore_polynomial_ring import OrePolynomialRing from sage.categories.drinfeld_modules import DrinfeldModules -class DrinfeldModuleMorphism(Element): +class DrinfeldModuleMorphism(UniqueRepresentation, Element, + metaclass=InheritComparisonClasscallMetaclass): - def __init__(self, parent, x): - super().__init__(parent) + @staticmethod + def __classcall_private__(cls, parent, x): + from sage.rings.function_field.drinfeld_modules.homset import DrinfeldModuleHomset + if not isinstance(parent, DrinfeldModuleHomset): + raise TypeError('parent should be a DrinfeldModuleHomset') domain = parent.domain() codomain = parent.codomain() # NOTE: it used to be x.parent() is parent, but this was False. @@ -30,18 +35,13 @@ def __init__(self, parent, x): ore_pol = domain.ore_polring()(x) if ore_pol * domain.gen() != codomain.gen() * ore_pol: raise ValueError('the Ore polynomial does not define a morphism') - self._domain = domain - self._codomain = codomain - self._ore_polynomial = ore_pol + return cls.__classcall__(cls, parent, ore_pol) - # NOTE: Should I inherit UniqueRepresentation to avoid this? - def __eq__(self, other): - try: - if self.parent() == other.parent(): - return self.ore_polynomial() == other.ore_polynomial() - except AttributeError: - return False - return False + def __init__(self, parent, ore_pol): + Element.__init__(Element(parent), parent) + self._domain = parent.domain() + self._codomain = parent.codomain() + self._ore_polynomial = ore_pol def _repr_(self): return f'Drinfeld Module morphism:\n' \ From e9b8913dd4abfcb3adbe2aa47df27fa534a00eef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Wed, 17 Aug 2022 13:47:35 +0200 Subject: [PATCH 073/751] Create _latex_ method in DrinfeldModuleMorphism --- .../rings/function_field/drinfeld_modules/morphism.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index c1d6b29404e..3e764661cb1 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -9,6 +9,7 @@ #***************************************************************************** from sage.misc.inherit_comparison import InheritComparisonClasscallMetaclass +from sage.misc.latex import latex from sage.structure.element import Element from sage.structure.unique_representation import UniqueRepresentation from sage.rings.polynomial.ore_polynomial_element import OrePolynomial @@ -43,6 +44,14 @@ def __init__(self, parent, ore_pol): self._codomain = parent.codomain() self._ore_polynomial = ore_pol + def _latex_(self): + return f'\\begin{{array}}{{l}}\n' \ + f'\\text{{Drinfeld{{ }}module{{ }}morphism:}}\\\\\n' \ + f'\\text{{{{ }}{{ }}From:{{ }}}}{latex(self._domain)}}}\\\\\n' \ + f'\\text{{{{ }}{{ }}To:{{ }}}}{{ }}{{ }}{latex(self._codomain)}\\\\\n' \ + f'\\text{{{{ }}{{ }}Defn:{{ }}}}{latex(self._ore_polynomial)}\n' \ + f'\\end{{array}}' + def _repr_(self): return f'Drinfeld Module morphism:\n' \ f' From: {self._domain}\n' \ From 6e4595b0a4b0a1343a18a6dcecd38912ec08fc22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Wed, 17 Aug 2022 14:30:47 +0200 Subject: [PATCH 074/751] (fix) Remove delta() in FiniteDrinfeldModule --- .../function_field/drinfeld_modules/finite_drinfeld_module.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 4fa9c15eea2..92b93509661 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -24,7 +24,8 @@ def frobenius_norm(self): n = self._base_ring.over(self._Fq).degree_over(self._Fq) d = self.characteristic().degree() m = n // d - norm = self._base_ring.over(self._Fq)(self.delta()).norm() + delta = self._gen[2] + norm = self._base_ring.over(self._Fq)(delta).norm() return ((-1)**n) * (self.characteristic()**m) / norm def frobenius_trace(self): From 6e5cd2d42441cabcb2a65fb7b7afd3c041bbbaca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Wed, 17 Aug 2022 14:25:02 +0200 Subject: [PATCH 075/751] Write docstrings for DrinfeldModuleMorphism Docstrings for: - the module; - the class; - the methods. Also, I reordered the methods in the class definition, to comply with the SageMath source. --- .../drinfeld_modules/morphism.py | 247 +++++++++++++++++- 1 file changed, 244 insertions(+), 3 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 3e764661cb1..02de4a781cb 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -1,3 +1,13 @@ +r""" +Drinfeld module morphisms + +This module provides the class +:class:`sage.rings.function_fields.drinfeld_module.morphism.DrinfeldModuleMorphism`. + +AUTHORS: +- Antoine Leudière (2022-04) +""" + #***************************************************************************** # Copyright (C) 2022 Antoine Leudière # @@ -19,6 +29,78 @@ class DrinfeldModuleMorphism(UniqueRepresentation, Element, metaclass=InheritComparisonClasscallMetaclass): + r""" + Let `\phi,\psi` be two Drinfeld modules defined over the + `\Fq[X]`-field `K`. A *morphism of Drinfeld modules `\phi \to \psi`* + is an Ore polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a + f` for every `a \in \Fq[X]`. In our case, this is equivalent to + verifying `f \phi_X = \psi_X f`. An *isogeny* is a non-zero + morphism. + + A Drinfeld module morphism is represented by instances of the class + `DrinfeldModuleMorphism`. + + To create a morphism object, do not explicitely use + `DrinfeldModuleMorphism`, but rather call the parent homset with the + defining Ore polynomial:: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: t = phi.ore_variable() + sage: ore_pol = t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 + sage: psi = phi.velu(ore_pol) + sage: morphism = Hom(phi, psi)(ore_pol) + sage: morphism + Drinfeld Module morphism: + From: Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 + To: Drinfeld module defined by X |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 + Defn: t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 + + We can get basic data on the morphism:: + + sage: morphism.domain() + Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 + sage: morphism.domain() is phi + True + + sage: morphism.codomain() + Drinfeld module defined by X |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 + sage: morphism.codomain() is psi + True + + sage: morphism.ore_polynomial() + t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 + sage: morphism.ore_polynomial() is ore_pol + True + + We can check various properties:: + + sage: morphism.is_zero() + False + sage: morphism.is_isogeny() + True + sage: morphism.is_endomorphism() + False + sage: morphism.is_isomorphism() + False + + .. NOTE:: + + For the sake of completness, we explain how the user can + directly instanciate the class:: + + sage: from sage.rings.function_field.drinfeld_modules.morphism import DrinfeldModuleMorphism + sage: DrinfeldModuleMorphism(Hom(phi, psi), ore_pol) + Drinfeld Module morphism: + From: Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 + To: Drinfeld module defined by X |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 + Defn: t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 + sage: DrinfeldModuleMorphism(Hom(phi, psi), ore_pol) is morphism + True + """ @staticmethod def __classcall_private__(cls, parent, x): @@ -59,19 +141,178 @@ def _repr_(self): f' Defn: {self._ore_polynomial}' def codomain(self): + r""" + Return the codomain of the morphism. + + EXAMPLES: + + sage: Fq = GF(2) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) + sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) + sage: t = phi.ore_variable() + sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) + sage: morphism.codomain() + Drinfeld module defined by X |--> t^2 + (z6^4 + z6^2 + 1)*t + z6 over Finite Field in z6 of size 2^6 + sage: morphism.codomain() is psi + True + """ return self._codomain def domain(self): - return self._domain + r""" + Return the codomain of the morphism. - def ore_polynomial(self): - return self._ore_polynomial + EXAMPLES: + + sage: Fq = GF(2) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) + sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) + sage: t = phi.ore_variable() + sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) + sage: morphism.domain() + Drinfeld module defined by X |--> t^2 + t + z6 over Finite Field in z6 of size 2^6 + sage: morphism.domain() is phi + True + """ + return self._domain def is_zero(self): + r""" + Return the codomain of the morphism. + + EXAMPLES: + + sage: Fq = GF(2) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) + sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) + sage: t = phi.ore_variable() + sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) + sage: morphism.is_zero() + False + + sage: zero_morphism = End(phi)(0) + sage: zero_morphism.is_zero() + True + """ return self._ore_polynomial.is_zero() + def is_endomorphism(self): + r""" + Return True if the morphism is an endomorphism; return False + otherwise. + + EXAMPLES: + + sage: Fq = GF(2) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) + sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) + sage: t = phi.ore_variable() + sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) + sage: morphism.is_endomorphism() + False + + sage: zero_morphism = End(phi)(0) + sage: zero_morphism.is_endomorphism() + True + + sage: identity_morphism = End(phi)(1) + sage: identity_morphism.is_endomorphism() + True + + sage: frobenius_endomorphism = phi.frobenius_endomorphism() + sage: frobenius_endomorphism.is_endomorphism() + True + """ + return self._domain is self._codomain + def is_isogeny(self): + r""" + Return True if the morphism is an isogeny; return False + otherwise. + + EXAMPLES: + + sage: Fq = GF(2) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) + sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) + sage: t = phi.ore_variable() + sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) + sage: morphism.is_isogeny() + True + + sage: zero_morphism = End(phi)(0) + sage: zero_morphism.is_isogeny() + False + + sage: identity_morphism = End(phi)(1) + sage: identity_morphism.is_isogeny() + True + + sage: frobenius_endomorphism = phi.frobenius_endomorphism() + sage: frobenius_endomorphism.is_isogeny() + True + """ return not self.is_zero() def is_isomorphism(self): + r""" + Return True if the morphism is an isomorphism; return False + otherwise. + + EXAMPLES: + + sage: Fq = GF(2) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) + sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) + sage: t = phi.ore_variable() + sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) + sage: morphism.is_isomorphism() + False + + sage: zero_morphism = End(phi)(0) + sage: zero_morphism.is_isomorphism() + False + + sage: identity_morphism = End(phi)(1) + sage: identity_morphism.is_isomorphism() + True + + sage: frobenius_endomorphism = phi.frobenius_endomorphism() + sage: frobenius_endomorphism.is_isomorphism() + False + """ return self.is_isogeny() and self._ore_polynomial.degree() == 0 + + def ore_polynomial(self): + r""" + Return the Ore polynomial that defines the morphism. + + EXAMPLES: + + sage: Fq = GF(2) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) + sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) + sage: t = phi.ore_variable() + sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) + sage: ore_pol = morphism.ore_polynomial() + sage: ore_pol + t + z6^5 + z6^2 + 1 + + sage: ore_pol * phi(X) == psi(X) * ore_pol + True + """ + return self._ore_polynomial From 5decb91d4789727ac795d6c0fafc331fe8fdd8de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 18 Aug 2022 11:47:05 +0200 Subject: [PATCH 076/751] Define __init__ and self._frobenius_trace/norm for FiniteDrinfeldModule I wanted to cache the Frobenius trace and norm, as to compute them only once. For this, I needed to add self._frobenius_norm = None self._frobenius_trace = None in __init__. However, __init__ did not exist (we simply did not need it), so I created it. If there is any better way to set self._frobenius_norm and self._frobenius_trace at init, please tell me. --- .../finite_drinfeld_module.py | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 92b93509661..050b48d1fa3 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -3,6 +3,16 @@ class FiniteDrinfeldModule(DrinfeldModule): + def __init__(self, gen, category): + + # NOTE: There used to be no __init__ here (which was fine). I + # added one to ensure that FiniteDrinfeldModule would always + # have _frobenius_norm and _frobenius_trace attributes. + + super().__init__(gen, category) + self._frobenius_norm = None + self._frobenius_trace = None + def frobenius_endomorphism(self): t = self.ore_variable() L = self._base_ring @@ -21,20 +31,24 @@ def frobenius_charpoly(self, var='T'): def frobenius_norm(self): self._check_rank_two() # Notations from Schost-Musleh: - n = self._base_ring.over(self._Fq).degree_over(self._Fq) - d = self.characteristic().degree() - m = n // d - delta = self._gen[2] - norm = self._base_ring.over(self._Fq)(delta).norm() - return ((-1)**n) * (self.characteristic()**m) / norm + if self._frobenius_norm is None: + n = self._base_ring.over(self._Fq).degree_over(self._Fq) + d = self.characteristic().degree() + m = n // d + delta = self._gen[2] + norm = self._base_ring.over(self._Fq)(delta).norm() + self._frobenius_norm = ((-1)**n) * (self.characteristic()**m) / norm + return self._frobenius_norm def frobenius_trace(self): self._check_rank_two() # Notations from Schost-Musleh: - n = self._base_ring.over(self._Fq).degree_over(self._Fq) - B = self.frobenius_norm() - t = self.ore_polring().gen() - return self.invert(t**n + (self(B) // t**n)) + if self._frobenius_trace is None: + n = self._base_ring.over(self._Fq).degree_over(self._Fq) + B = self.frobenius_norm() + t = self.ore_polring().gen() + self._frobenius_trace = self.invert(t**n + (self(B) // t**n)) + return self._frobenius_trace def is_ordinary(self): self._check_rank_two() From daf9b8a45624b8d7ff0ec9a54a20d8b96eaf0661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 18 Aug 2022 11:50:54 +0200 Subject: [PATCH 077/751] (minor) Add small enhancements to DrinfeldModule doc --- .../rings/function_field/drinfeld_modules/drinfeld_module.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index cf7ccec125c..254a30f05a6 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -39,6 +39,8 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): r""" + This class handles Drinfeld modules. + Let `q` be the order of a finite field `\Fq`. Let `K` be a field equiped a ring morphism `\gamma: \Fq[X] \to K` --- the field `K` is said to be an *`\Fq[X]`-field*, and the monic polynomial that @@ -872,7 +874,8 @@ def invert(self, ore_pol): ALGORITHM: - See [MS2019]_, 3.2.5. + The algorithm relies on the inversion of a linear algebra + system. See [MS2019]_, 3.2.5 for details. TESTS:: From f16c65afdf4ca6ee7e7a5664f66fc85cc60c2c46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 18 Aug 2022 11:52:38 +0200 Subject: [PATCH 078/751] Write docstrings for FiniteDrinfeldModule --- .../finite_drinfeld_module.py | 343 ++++++++++++++++++ 1 file changed, 343 insertions(+) diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 050b48d1fa3..68921a0f508 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -1,7 +1,103 @@ +r""" +Finite Drinfeld modules + +This module provides the class +:class:`sage.rings.function_fields.drinfeld_module.finite_drinfeld_module.FiniteDrinfeldModule`, +which inherits +:class:`sage.rings.function_fields.drinfeld_module.drinfeld_module.DrinfeldModule`. + +AUTHORS: + +- Antoine Leudière (2022-04) +""" + +#***************************************************************************** +# Copyright (C) 2022 Antoine Leudière +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# http://www.gnu.org/licenses/ +#***************************************************************************** + from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.function_field.drinfeld_modules.drinfeld_module import DrinfeldModule class FiniteDrinfeldModule(DrinfeldModule): + r""" + This class handles finite Drinfeld modules. + + A *finite Drinfeld module* is a Drinfeld module whose base ring is + finite. For general definitions and help on Drinfeld modules, see + class + :class:`sage.rings.function_fields.drinfeld_module.drinfeld_module.DrinfeldModule`. + In this specific documentation, we only present the specifics of + ``FiniteDrinfeldModle``. + + The user does not ever need to directly call + ``FiniteDrinfeldModule``, as it is the (meta)class + ``DrinfeldModule`` that is reponsible for instanciating + ``DrinfeldModule`` or ``FiniteDrinfeldModule`` depending on its + input:: + + sage: Fq = GF(343) + sage: FqX. = Fq[] + sage: K. = Fq.extension(2) + sage: phi = DrinfeldModule(FqX, [z6, 0, 5]) + sage: isinstance(phi, DrinfeldModule) + True + sage: from sage.rings.function_field.drinfeld_modules.finite_drinfeld_module import FiniteDrinfeldModule + sage: isinstance(phi, FiniteDrinfeldModule) + True + + But, the user should never use ``FiniteDrinfeldModule`` to test if a + Drinfeld module is finite, but rather the ``is_finite`` method:: + + sage: phi.is_finite() + True + + .. RUBRIC:: Complex multiplication of rank two finite Drinfeld modules + + We can handle some aspects of the theory of complex multiplication + of finite Drinfeld modules. Apart from the method + ``frobenius_endomorphism``, we only handle rank two Drinfeld + modules. + + First of all, it is easy to create the Frobenius endomorphism:: + + sage: frobenius_endomorphism = phi.frobenius_endomorphism() + sage: frobenius_endomorphism + Drinfeld Module morphism: + From: Drinfeld module defined by X |--> 5*t^2 + z6 over Finite Field in z6 of size 7^6 + To: Drinfeld module defined by X |--> 5*t^2 + z6 over Finite Field in z6 of size 7^6 + Defn: t^2 + + Its characteristic polynomial can be computed:: + + sage: chi = phi.frobenius_charpoly() + sage: chi + T^2 + (X + 2*z3^2 + 2*z3 + 1)*T + 2*X^2 + (z3^2 + z3 + 4)*X + 2*z3 + sage: frob_pol = frobenius_endomorphism.ore_polynomial() + sage: chi(frob_pol, phi(X)) + 0 + + This makes it possible to compute the Frobenius trace and norm:: + + sage: phi.frobenius_trace() + 6*X + 5*z3^2 + 5*z3 + 6 + sage: phi.frobenius_trace() == -chi[1] + True + sage: phi.frobenius_norm() + 2*X^2 + (z3^2 + z3 + 4)*X + 2*z3 + + And to decide if a Drinfeld module is ordinary or supersingular:: + + sage: phi.is_ordinary() + True + sage: phi.is_supersingular() + False + """ def __init__(self, gen, category): @@ -14,6 +110,34 @@ def __init__(self, gen, category): self._frobenius_trace = None def frobenius_endomorphism(self): + r""" + Return the Frobenius endomorphism, as an instance of + ``DrinfeldModuleMorphism``, of the Drinfeld module, if the rank + is two; raise a NotImplementedError otherwise.. + + Let `q` be the order of the base field of the function ring. The + *Frobenius endomorphism* is defined as the endomorphism whose + defining Ore polynomial is `t^q`. + + OUTPUT: + + - a Drinfeld module morphism + + EXAMPLES: + + sage: Fq = GF(343) + sage: FqX. = Fq[] + sage: K. = Fq.extension(2) + sage: phi = DrinfeldModule(FqX, [1, 0, z6]) + sage: phi.frobenius_endomorphism() + Drinfeld Module morphism: + From: Drinfeld module defined by X |--> z6*t^2 + 1 over Finite Field in z6 of size 7^6 + To: Drinfeld module defined by X |--> z6*t^2 + 1 over Finite Field in z6 of size 7^6 + Defn: t^2 + sage: from sage.rings.function_field.drinfeld_modules.morphism import DrinfeldModuleMorphism + sage: isinstance(phi.frobenius_endomorphism(), DrinfeldModuleMorphism) + True + """ t = self.ore_variable() L = self._base_ring Fq = self._function_ring.base_ring() @@ -21,6 +145,74 @@ def frobenius_endomorphism(self): return self._Hom_(self, category=self.category())(t**deg) def frobenius_charpoly(self, var='T'): + r""" + Return the characteristic polynomial of the Frobenius + endomorphism, if the rank is two; raise a NotImplementedError + otherwise. + + Let `\Fq` be the base field of the function ring. The + *characteristic polynomial `\chi` of the Frobenius endomorphism* is + defined in [Gek1991]_. An important feature of this polynomial + is that it is a monic bivariate polynomial in `T` with + coefficients in `\Fq[X]`. Write `\chi = T^2 - A(X)T + B(X)`, let + `t^n` be the Ore polynomial that defines the Frobenius + endomorphism of `\phi`; by definition, `n` is the degree of the + base ring over `\Fq`. We have `\chi(t^n)(\phi(X)) = t^{2n} - + \phi_A t^n + \phi_B = 0`, with `\deg(A) \leq \frac{n}{2}` and + `\deg(B) = n`. + + Note that the *Frobenius trace* is defined as `A(X)` and the + *Frobenius norm` is defined as `B(X)`. + + INPUT: + + - ``var`` -- (optional) the name of the second variable + + OUTPUT: + + - a polynomial in `\Fq[X][T]` + + EXAMPLES: + + sage: Fq = GF(343) + sage: FqX. = Fq[] + sage: K. = Fq.extension(2) + sage: phi = DrinfeldModule(FqX, [1, 0, z6]) + sage: chi = phi.frobenius_charpoly() + sage: chi + T^2 + ((3*z3^2 + z3 + 4)*X + 4*z3^2 + 6*z3 + 3)*T + (5*z3^2 + 2*z3)*X^2 + (4*z3^2 + 3*z3)*X + 5*z3^2 + 2*z3 + + sage: frob_pol = phi.frobenius_endomorphism().ore_polynomial() + sage: chi(frob_pol, phi(X)) + 0 + + sage: A = phi.frobenius_trace() + sage: A + (4*z3^2 + 6*z3 + 3)*X + 3*z3^2 + z3 + 4 + sage: B = phi.frobenius_norm() + sage: B + (5*z3^2 + 2*z3)*X^2 + (4*z3^2 + 3*z3)*X + 5*z3^2 + 2*z3 + + sage: n = 2 # Degree of the base ring over `\Fq` + sage: A.degree() <= n/2 + True + sage: B.degree() == n + True + + ALGORITHM: + + We compute the Frobenius norm, and with it the Frobenius + trace. This gives the Frobenius characteristic polynomial. + See [SM2019]_, Section 4. + + See docstrings of methods + :meth:`sage.rings.function_fields.drinfeld_module.finite_drinfeld_module.FiniteDrinfeldModule.frobenius_norm` + and + :meth:`sage.rings.function_fields.drinfeld_module.finite_drinfeld_module.FiniteDrinfeldModule.frobenius_trace` + for furthere details on the computation of the norm and of + the trace. + """ + self._check_rank_two() A = self._function_ring # Fq[X] S = PolynomialRing(A, name=var) # Fq[X][T] # Does not work when Fq is not a prime field... @@ -29,6 +221,43 @@ def frobenius_charpoly(self, var='T'): return S([self.frobenius_norm(), -self.frobenius_trace(), 1]) def frobenius_norm(self): + r""" + Return Frobenius norm of the Drinfeld module, if the rank is + two; raise a NotImplementedError otherwise. + + Write `\chi = T^2 - A(X)T + B(X) \in \Fq[X][T]` to be the + characteristic polynomial of the Frobenius endomorphism. The + *Frobenius norm* is defined as the polynomial `B(X) \in \Fq[X]`. + + Let `n` be the degree of the base ring over `\Fq`. Then the + Frobenius norm has degree `n`. + + OUTPUT: + + - a polynomial in `\Fq[X]` + + EXAMPLES: + + sage: Fq = GF(343) + sage: FqX. = Fq[] + sage: K. = Fq.extension(2) + sage: phi = DrinfeldModule(FqX, [1, 0, z6]) + sage: B = phi.frobenius_norm() + sage: B + (5*z3^2 + 2*z3)*X^2 + (4*z3^2 + 3*z3)*X + 5*z3^2 + 2*z3 + + sage: n = 2 # Degree of the base ring over `\Fq` + sage: B.degree() == n + True + + sage: B == phi.frobenius_charpoly()[0] + True + + ALGORITHM: + + The Frobenius norm is computed using the formula, by + Gekeler, given in [SM2019]_, Section 4, Proposition 3. + """ self._check_rank_two() # Notations from Schost-Musleh: if self._frobenius_norm is None: @@ -41,6 +270,52 @@ def frobenius_norm(self): return self._frobenius_norm def frobenius_trace(self): + r""" + Return Frobenius norm of the Drinfeld module, if the rank is + two; raise a NotImplementedError otherwise. + + Write `\chi = T^2 - A(X)T + B(X) \in \Fq[X][T]` to be the + characteristic polynomial of the Frobenius endomorphism. The + *Frobenius norm* is defined as the polynomial `B(X) \in \Fq[X]`. + + Let `n` be the degree of the base ring over `\Fq`. Then the + Frobenius trace has degree `\leq \frac{n}{2}`. + + OUTPUT: + + - a polynomial in `\Fq[X]` + + ALGORITHM: + + Let `A(X)` denote the Frobenius trace and `B(X)` denote the + Frobenius norm. We begin by computing `B(X)`, see docstring + of method + :meth:`sage.rings.function_fields.drinfeld_module.finite_drinfeld_module.FiniteDrinfeldModule.frobenius_norm` + for details. The characteristic polynomial of the Frobenius + yields `t^{2n} - \phi_A t^n + \phi_B = 0`, where `t^n` is + the Frobenius endomorphism. As `\phi_B` is now known, we can + compute `\phi_A = (t^{2n} + \phi_B) / t^n`. We get `A(X)` by + inverting this quantity, using the method + :meth:`sage.rings.function_fields.drinfeld_module.drinfeld_module.DrinfeldModule.invert`, + see its docstring for details. + + EXAMPLES: + + sage: Fq = GF(343) + sage: FqX. = Fq[] + sage: K. = Fq.extension(2) + sage: phi = DrinfeldModule(FqX, [1, 0, z6]) + sage: A = phi.frobenius_trace() + sage: A + (4*z3^2 + 6*z3 + 3)*X + 3*z3^2 + z3 + 4 + + sage: n = 2 # Degree of the base ring over `\Fq` + sage: A.degree() <= n/2 + True + + sage: A == -phi.frobenius_charpoly()[1] + True + """ self._check_rank_two() # Notations from Schost-Musleh: if self._frobenius_trace is None: @@ -51,9 +326,77 @@ def frobenius_trace(self): return self._frobenius_trace def is_ordinary(self): + r""" + Return True if the Drinfeld module is ordinary, return False + otherwise; raise a NotImplementedError if the rank is not two. + + A rank two finite Drinfeld module is *ordinary* if and only if + the `\Fq[X]-characteristic of the base ring does not devide the + Frobenius trace. A *supersingular* rank two finite Drinfeld + module is a Drinfeld module that is not ordinary. + + OUTPUT: + + - a boolean + + EXAMPLES: + + sage: Fq = GF(343) + sage: FqX. = Fq[] + sage: K. = Fq.extension(2) + sage: phi = DrinfeldModule(FqX, [1, 0, z6]) + sage: phi.is_ordinary() + False + sage: phi_p = phi(phi.characteristic()) + sage: phi_p # Purely inseparable + z6*t^2 + + ALGORITHM: + + Compute the Frobenius trace and test if the `\Fq[X]` + characteristic divides it. + + We could also test if the image of the + `\Fq[X]`-characteristic under the Drinfeld module is purely + inseparable; see [Gek1991]_, Proposition 4.1. + """ self._check_rank_two() return not self.is_supersingular() def is_supersingular(self): + r""" + Return True if the Drinfeld module is supersingular, return False + otherwise; raise a NotImplementedError if the rank is not two. + + A rank two finite Drinfeld module is *supersingular* if and only + if the `\Fq[X]-characteristic of the base ring devides the + Frobenius trace. An *ordinary* rank two finite Drinfeld module + is a Drinfeld module that is not supersingular. + + OUTPUT: + + - a boolean + + EXAMPLES: + + sage: Fq = GF(343) + sage: FqX. = Fq[] + sage: K. = Fq.extension(2) + sage: phi = DrinfeldModule(FqX, [1, 0, z6]) + sage: phi.is_supersingular() + True + sage: phi_p = phi(phi.characteristic()) + sage: phi_p # Purely inseparable + z6*t^2 + + ALGORITHM: + + Compute the Frobenius trace and test if the `\Fq[X]` + characteristic divides it. + + We could also test if the image of the + `\Fq[X]`-characteristic under the Drinfeld module is purely + inseparable; see [Gek1991]_, Proposition 4.1. + """ self._check_rank_two() return self.characteristic().divides(self.frobenius_trace()) From a1e569d665a9272bf116f5d632a5038015f2cd16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 18 Aug 2022 15:36:48 +0200 Subject: [PATCH 079/751] Refactor exception messages for Drinfeld modules Simplify and shorten messages. --- src/sage/categories/drinfeld_modules.py | 10 +++++----- .../function_field/drinfeld_modules/action.py | 2 +- .../drinfeld_modules/drinfeld_module.py | 17 +++++++++-------- .../function_field/drinfeld_modules/morphism.py | 2 +- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 229afc0a36c..b4cd81bf3ef 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -27,23 +27,23 @@ def __init__(self, morphism, name='t'): gamma = morphism # Check input is a ring Morphism if not isinstance(gamma, RingHomomorphism): - raise TypeError('input must be a Ring morphism') + raise TypeError('category input must be a Ring morphism') self._morphism = morphism self._function_ring = gamma.domain() # Check domain is Fq[X] function_ring = self._function_ring if not isinstance(function_ring, PolynomialRing_general): - raise NotImplementedError('domain must be a polynomial ring') + raise NotImplementedError('function ring must be a polynomial ring') function_ring_base = function_ring.base_ring() if not function_ring_base.is_field() or not function_ring_base.is_finite() : - raise TypeError('the base ring of the domain must be a finite field') + raise TypeError('function ring base must be a finite field') Fq = function_ring_base FqX = function_ring X = FqX.gen() # Check codomain of gamma is field K = gamma.codomain() if not K.is_field(): - raise TypeError('the codomain of the morphism must be a field') + raise TypeError('base must be a field') # Build K{t} d = log(Fq.cardinality(), Fq.characteristic()) tau = K.frobenius_endomorphism(d) @@ -105,7 +105,7 @@ def _call_(self, gen): # If gen is not in the codomain, an exception is raised gen = self._ore_polring(gen) if self.characteristic()(gen[0]) != 0: - raise ValueError('constant coefficient is not a root of the characteristic') + raise ValueError('constant coefficient must be a root of the characteristic') return DrinfeldModule(self._function_ring, gen) def _repr_(self): diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index 06ed070c7f5..82f1ee0d207 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -7,7 +7,7 @@ class DrinfeldModuleAction(Action): def __init__(self, finite_drinfeld_module): # Verifications if not isinstance(finite_drinfeld_module, DrinfeldModule): - raise TypeError('First argument must be a DrinfeldModule') + raise TypeError('input must be a DrinfeldModule') # Work self.__finite_drinfeld_module = finite_drinfeld_module super().__init__(finite_drinfeld_module.polring(), diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 254a30f05a6..9f63a8a321f 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -343,10 +343,10 @@ def __classcall_private__(cls, function_ring, gen, name='t'): # here and in the category constructor, which is not ideal. # Check domain is Fq[X] if not isinstance(function_ring, PolynomialRing_general): - raise NotImplementedError('domain must be a polynomial ring') + raise NotImplementedError('function ring must be a polynomial ring') function_ring_base = function_ring.base_ring() if not function_ring_base.is_field() or not function_ring_base.is_finite() : - raise TypeError('the base ring of the domain must be a finite field') + raise TypeError('function ring base must be a finite field') Fq = function_ring_base FqX = function_ring X = FqX.gen() @@ -362,13 +362,14 @@ def __classcall_private__(cls, function_ring, gen, name='t'): ore_polring = None ore_polring_base = Sequence(gen).universe() else: - raise TypeError('generator must be a list of coefficients '\ - 'or an Ore polynomial') + raise TypeError('generator must be list of coefficients or Ore ' \ + 'polynomial') + # The coefficients are in a base ring that has coercion from Fq: + if not (hasattr(ore_polring_base, 'has_coerce_map_from') and \ + ore_polring_base.has_coerce_map_from(function_ring.base_ring())): + raise ValueError('function ring base must coerce to base ring') # Build the morphism that defines the category - if not ore_polring_base.has_coerce_map_from(function_ring.base_ring()): - raise TypeError('base ring of function ring must coerce to base ' \ - 'ring of Ore polynomial ring') gamma = function_ring.hom([ore_polring_base(gen[0])]) # Other checks in the category definition @@ -1143,4 +1144,4 @@ def _check_rank_two(self): Raise ``NotImplementedError`` if the rank is not two. """ if self.rank() != 2: - raise NotImplementedError('the rank must be 2') + raise NotImplementedError('rank must be 2') diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 02de4a781cb..b7792a5a907 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -117,7 +117,7 @@ def __classcall_private__(cls, parent, x): else: # x is an Ore polynomial ore_pol = domain.ore_polring()(x) if ore_pol * domain.gen() != codomain.gen() * ore_pol: - raise ValueError('the Ore polynomial does not define a morphism') + raise ValueError('Ore polynomial does not define a morphism') return cls.__classcall__(cls, parent, ore_pol) def __init__(self, parent, ore_pol): From 5e6f4c72d724b7364a2b168ef6a1a909fc598b4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 18 Aug 2022 15:39:45 +0200 Subject: [PATCH 080/751] Refactor invert method in DrinfeldModule Raise an exception when the input is not in the image of the Drinfeld module, instead of returning None. --- .../rings/function_field/drinfeld_modules/drinfeld_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 9f63a8a321f..d6d60540781 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -905,7 +905,7 @@ def invert(self, ore_pol): if ore_pol in self._base_ring: return self._Fq(ore_pol) if deg % r != 0: - return None + raise ValueError('input must be in the image of the Drinfeld module') k = deg // r X = self._function_ring.gen() From 880ab6714dea3070600e48d6b122347efad50b12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 18 Aug 2022 15:40:38 +0200 Subject: [PATCH 081/751] Proofread docstrings in DrinfeldModule No fundamental change, only rephrasing and enhancements. --- .../drinfeld_modules/drinfeld_module.py | 363 +++++++++++------- 1 file changed, 228 insertions(+), 135 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index d6d60540781..f3b69307931 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -41,25 +41,26 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): r""" This class handles Drinfeld modules. - Let `q` be the order of a finite field `\Fq`. Let `K` be a field + Let `\Fq` be a finite field with order `q`. Let `K` be a field equiped a ring morphism `\gamma: \Fq[X] \to K` --- the field `K` is said to be an *`\Fq[X]`-field*, and the monic polynomial that generates `\Ker(\gamma)` is called the *`\Fq[X]`-characteristic of - the `\Fq[X]`-field `K`* (this `\Fq[X]`-characteristic plays the role in - `\Fq[X]` of the standard characteristic, in `\ZZ`, of a finite - field). Let `K\{\tau\}` be the ring of Ore polynomials with - coefficients in `K` and Frobenius variable `\tau: x \mapsto x^q`. A - *Drinfeld `\Fq[X]`-module over the `\Fq[X]`-field `K`* is a ring - morphism `\phi: \Fq[X] \to K\{\tau\}` such that: + the `\Fq[X]`-field `K`* (this characteristic plays the role of the + characteristic of a function field). Let `K\{\tau\}` be the ring of + Ore polynomials with coefficients in `K` and Frobenius + variable `\tau: x \mapsto x^q`. A *Drinfeld `\Fq[X]`-module over the + `\Fq[X]`-field `K`* is a ring morphism `\phi: \Fq[X] \to K\{\tau\}` + such that: - 1. The image of `\phi` has non-constant Ore polynomials. - 2. For every `a \in \Fq[X]`, the constant coefficient of the - Ore polynomial `\phi(a)` is `\gamma(a)`. + 1. The image of `\phi` contains non-constant Ore polynomials. + 2. For every `a \in \Fq[X]`, the constant coefficient `\phi(a)` + is `\gamma(a)`. For `a \in \Fq[X]`, `\phi(a)` is denoted `\phi_a`. - We say that `K` is the *base ring of `\phi`*, `\Fq[X]` is the - *function ring of*, *K\{\tau\}* is the *Ore polynomial ring*, + We say that `\Fq[X]` is the *function ring of `\phi`*; `K` is the + *base ring of `\phi`*, or simply its base or base field; `\Fq[X]` is + the *function ring of*; *K\{\tau\}* is the *Ore polynomial ring*; `t` is the *Ore variable*. The *generator of `\phi`* is `\phi_X`, its *constant coefficient* is the constant coefficient of `\phi_X`. @@ -86,7 +87,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): Ore polynomial - ``name`` (optional) the name of the Ore variable - .. RUBRIC:: Construction + .. RUBRIC:: Construction and input A Drinfeld module object (class :class:`sage.rings.function_fields.drinfeld_module.drinfeld_module.DrinfeldModule`) @@ -95,39 +96,142 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: Fq. = GF(3^2) sage: FqX. = Fq[] sage: K. = Fq.extension(6) - sage: phi = DrinfeldModule(FqX, [K.gen(), 1, 1]) + sage: phi = DrinfeldModule(FqX, [z, 1, 1]) sage: phi Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 - In this example, we used a list of coefficients (``[K.gen(), 1, - 1]``) to represent the Ore polynomial `\phi_X = z + t + t^2`, `K - = \Fq(z)`. We can also use regular Ore polynomials:: + In this example, we used a list of coefficients (``[z, 1, 1]``) to + represent the generator `\phi_X = z + t + t^2`, `K = \Fq(z)`. One can + also use regular Ore polynomials:: sage: ore_polring = phi.ore_polring() - sage: t = phi.ore_variable() # Equals ore_polring.gen() - sage: psi_X = K.gen() + t^3 + sage: t = phi.ore_variable() # Is ore_polring.gen() + sage: psi_X = z + t^3 sage: psi = DrinfeldModule(FqX, psi_X) sage: psi Drinfeld module defined by X |--> t^3 + z over Finite Field in z of size 3^12 + sage: psi(X) == psi_X + True + + Naturally, the input is checked, and exceptions are raised when the + input is invalid. + + The generator must have positive degree:: + + sage: DrinfeldModule(FqX, [z]) + Traceback (most recent call last): + ... + ValueError: generator must have positive degree + + The coefficients of the generator must live in some field `K` that + is the codomain of a morphism `\gamma` with domain `\Fq[X]`:: + + sage: DrinfeldModule(FqX, [z, QQ(1)]) + Traceback (most recent call last): + ... + ValueError: function ring base must coerce to base ring + + sage: DrinfeldModule(FqX, [1, QQ(1)]) + Traceback (most recent call last): + ... + ValueError: function ring base must coerce to base ring + + If the coefficients are regular integers, an exception is raised. + One needs to manually cast them to the field of their choice:: + + sage: DrinfeldModule(FqX, [1, 1, 1]) + Traceback (most recent call last): + ... + ValueError: function ring base must coerce to base ring + + sage: DrinfeldModule(FqX, [K(1), 1, 1]) + Drinfeld module defined by X |--> t^2 + t + 1 over Finite Field in z of size 3^12 + + sage: DrinfeldModule(FqX, [Fq(1), 1, 1]) + Drinfeld module defined by X |--> t^2 + t + 1 over Finite Field in z2 of size 3^2 + + The function ring must be an `\Fq[X]`:: + + sage: DrinfeldModule(K, [z, 1, 1]) + Traceback (most recent call last): + ... + NotImplementedError: function ring must be a polynomial ring + + sage: FqXY. = FqX[] + sage: DrinfeldModule(FqXY, [z, 1, 1]) + Traceback (most recent call last): + ... + TypeError: function ring base must be a finite field + + If you already defined a category of Drinfeld modules, you must + ensure that the constant coefficient is a root of the + `\Fq[X]-characteristic of the category base:: + + sage: cat = phi.category() + sage: cat([1, 1, K(1)]) + Traceback (most recent call last): + ... + ValueError: constant coefficient must be a root of the characteristic .. NOTE:: - If the Ore polynomial has coefficients in the integers, the - constructor does not try to guess if the user wants to see the - coefficients as elements of Fq, or an extension like `K`. + The reader may think that it is odd to build a Drinfeld module + without specifying the `\Fq[X]`-characteristic of the base (or, + more generally, its parent category). Indeed, the + `\Fq[X]`-characteristic plays the role of the characteristic of + a function field, and thus preexists Drinfeld modules. The base + field `K` should rather be seen as an `\Fq[X]`-field, i.e. the + field `K` equiped with a morphism `\gamma: \Fq[X] \to K`, + instead of just a field. + + However, as the characteristic may be deduced from the constant + coefficient of the Drinfeld module, we chose to ommit the + characteristic in the input of the class in order to have + concise definitions. + + .. RUBRIC:: Possible base rings + + The morphism `\gamma` does not need be surjective like in the above + examples. This is equivalent to say that the constant coefficient of + the Drinfeld module may be different to the generator of `K` over + `\Fq`. In the following example, `K` is still a degree six extension + of `\Fq`, but `\gamma` is a projection over a degree two extension + with modulus `X^3 + (z_2 + 2)X^2 + (6*z_2 + 1)X + 3z_2 + 5`:: + + sage: p = X^2 + z2 + 2 + sage: p_root = z^10 + 2*z^9 + z^8 + z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z + sage: rho = DrinfeldModule(FqX, [p_root, 1, 1]) + sage: rho + Drinfeld module defined by X |--> t^2 + t + z^10 + 2*z^9 + z^8 + z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z over Finite Field in z of size 3^12 + + Then one can check that the morphisms `\gamma` are not the same for + ``phi`` and ``rho``, and that the `\gamma` associated to `\phi` is + surjective, while the other one is not:: + + sage: rho.category().morphism() + Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + To: Finite Field in z of size 3^12 + Defn: X |--> z^10 + 2*z^9 + z^8 + z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z + sage: phi.category().morphism() + Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + To: Finite Field in z of size 3^12 + Defn: X |--> z Note that ``phi`` and ``psi`` are *finite* Drinfeld modules, in the - sense that `K` is finite. This is not mandatory:: + sense that `K` is finite. But `K` can be infinite:: - sage: K_infinite = Frac(FqX) - sage: phi_infinite = DrinfeldModule(FqX, [K_infinite.gen(), 1, 1]) - sage: phi_infinite + sage: sigma = DrinfeldModule(FqX, [Frac(FqX).gen(), 1, 1]) + sage: sigma Drinfeld module defined by X |--> t^2 + t + X over Fraction Field of Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - sage: phi_infinite.is_finite() + sage: sigma.is_finite() False sage: phi.is_finite() True + .. RUBRIC:: The category of Drinfeld modules + Drinfeld modules have their own category (see class :class:`sage.categories.drinfeld_modules.DrinfeldModules`):: @@ -138,7 +242,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): Defn: X |--> z sage: phi.category() is psi.category() True - sage: phi.category() is phi_infinite.category() + sage: phi.category() is sigma.category() False This category holds crucial information, like the @@ -146,42 +250,10 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: char = phi.category().characteristic() - .. NOTE:: - - As the output of - :meth:`sage.rings.function_fields.drinfeld_module.finite_drinfeld_module.DrinfeldModule.category` - suggests, the morphism `\gamma` uniquely determines the category of a Drinfeld - module. - - .. RUBRIC:: More general `K` - - The field `K` does not need be generated by the constant coefficient - (i.e. generated, as an extension of `\Fq`, by the image - `\gamma(X)`). In the following example, `K` is still a - degree six extension of `\Fq`, but `\gamma` is a projection over - `\Fq[X]/p(X)`, with `p(X) = X^3 + (z_2 + 2)X^2 + (6*z_2 + 1)X + 3z_2 - + 5`:: - - sage: p = X^2 + z2 + 2 # Prime polynomial - sage: p_root = z^10 + 2*z^9 + z^8 + z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z # Root of p - sage: phi_inter = DrinfeldModule(FqX, [p_root, 1, 1]) - sage: phi_inter - Drinfeld module defined by X |--> t^2 + t + z^10 + 2*z^9 + z^8 + z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z over Finite Field in z of size 3^12 - - We can check that the morphisms `\gamma` are not the same for - ``phi`` and ``phi_inter``, and that the `\gamma` associated to - `\phi` is surjective, while the other one is not:: - - sage: phi_inter.category().morphism() - Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - To: Finite Field in z of size 3^12 - Defn: X |--> z^10 + 2*z^9 + z^8 + z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z - sage: phi.category().morphism() - Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - To: Finite Field in z of size 3^12 - Defn: X |--> z + As the output of + :meth:`sage.rings.function_fields.drinfeld_module.finite_drinfeld_module.DrinfeldModule.category` + suggests, the morphism `\gamma` uniquely determines the category of a Drinfeld + module. .. RUBRIC:: Basic methods @@ -194,29 +266,35 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: phi(1) # phi_1 1 - We can retrieve basic properties:: + One can retrieve basic properties:: sage: phi.base_ring() # K Finite Field in z of size 3^12 + sage: phi.ore_polring() # K{t} Ore Polynomial Ring in t over Finite Field in z of size 3^12 twisted by z |--> z^(3^2) + sage: phi.ore_variable() # t t + sage: phi.function_ring() # Fq[X] Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + sage: phi.gen() # phi_X t^2 + t + z sage: phi.gen() == phi(X) True + sage: phi.constant_coefficient() # Constant coefficient of phi_X z + sage: phi.morphism() # The Drinfeld module as a morphism Ring morphism: From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 To: Ore Polynomial Ring in t over Finite Field in z of size 3^12 twisted by z |--> z^(3^2) Defn: X |--> t^2 + t + z - We can compute the rank and height:: + One can compute the rank and height:: sage: phi.rank() 2 @@ -252,13 +330,13 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): True To create a SageMath object representing the morphism, call the - homset ``hom``:: + homset (``hom`` in the next example):: sage: hom = Hom(phi, phi) - sage: frob = hom(t^6) + sage: frobenius_endomorphism = hom(t^6) sage: identity_morphism = hom(1) sage: zero_morphism = hom(0) - sage: frob + sage: frobenius_endomorphism Drinfeld Module morphism: From: Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 To: Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 @@ -274,23 +352,23 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): To: Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 Defn: 0 - We can retrieve the underlying Ore polynomial with the method + One can retrieve the underlying Ore polynomial with the method :meth:`sage.rings.function_fields.drinfeld_module.finite_drinfeld_module.DrinfeldModule.ore_polynomial`:: - sage: frob.ore_polynomial() + sage: frobenius_endomorphism.ore_polynomial() t^6 - And we can easily check if a morphism defines an isogeny or an + And one can easily check if a morphism defines an isogeny or an isomorphism (i.e. an isogeny whose underlying Ore polynomial has degree `0`):: - sage: frob.is_isogeny() + sage: frobenius_endomorphism.is_isogeny() True sage: identity_morphism.is_isogeny() True sage: zero_morphism.is_isogeny() False - sage: frob.is_isomorphism() + sage: frobenius_endomorphism.is_isomorphism() False sage: identity_morphism.is_isomorphism() True @@ -300,10 +378,9 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): .. RUBRIC:: The Vélu formula Let ``ore_pol`` be a non-zero Ore polynomial ``ore_pol``. For - Drinfeld module, it is easy to decide --- and find as the case may - be --- if there exists a Drinfeld module ``psi``, such that - ``ore_pol`` is an isogeny from ``self`` to ``psi``. If this - Drinfeld module exists, it is unique. + Drinfeld module, it is easy to decide if there exists a Drinfeld + module ``psi`` such that ``ore_pol`` is an isogeny from ``self`` to + ``psi``. We can also find ``psi``, which is unique. sage: ore_pol = (2*z^6 + z^3 + 2*z^2 + z + 2)*t + z^11 + 2*z^10 + 2*z^9 + 2*z^8 + z^7 + 2*z^6 + z^5 + z^3 + z^2 + z sage: psi = phi.velu(ore_pol) @@ -314,6 +391,34 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: ore_pol * phi(X) == psi(X) * ore_pol True + .. RUBRIC:: The action of a Drinfeld module + + TODO + TODO + TODO + TODO + TODO + TODO + TODO + TODO + TODO + TODO + TODO + TODO + TODO + TODO + TODO + TODO + TODO + TODO + TODO + TODO + TODO + TODO + TODO + TODO + TODO + .. RUBRIC:: Other methods It is possible to change the base ring:: @@ -325,7 +430,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): True Given an Ore polynomial that equals `\phi_a` for some `a \in - \Fq[X]`, we can retrieve `a` (as a morphism, a Drinfeld + \Fq[X]`, one can retrieve `a` (as a morphism, a Drinfeld module is injective, see [Gos1998]_, cor. 4.5.2.):: sage: a = FqX.random_element() @@ -425,12 +530,9 @@ def base_ring(self): r""" Return the base ring of the Drinfeld module. - This is the base field of Ore polynomial ring. In particular, the base + This is the Ore polynomial ring base. In particular, the base ring is always a field. - A Drinfeld module is said to be finite if the base ring is - finite. - OUTPUT: - a field @@ -452,9 +554,8 @@ def base_ring(self): sage: phi.base_ring() is K True - Note that in the above example, the base ring does is not - generated by the constant coefficient (i.e. generated, as an - extension of `\Fq`, by the image `\gamma(X)`). The base + Note that in the above example, the constant coefficient + generates a strict sub-extension of `K/\Fq`. In fact, the base ring may also be the same as ``Fq``:: sage: psi = DrinfeldModule(FqX, [Fq(1), Fq.gen()]) @@ -463,13 +564,13 @@ def base_ring(self): sage: psi.base_ring() is Fq True - In which case the Ore polynomial ring is isomorphic to a regular + In this case the Ore polynomial ring is isomorphic to a regular polynomial ring:: - sage: psi.ore_polring() - Ore Polynomial Ring in t over Finite Field in z2 of size 5^2 twisted by Identity - sage: psi.ore_polring().twisting_morphism() - Identity endomorphism of Finite Field in z2 of size 5^2 + sage: psi.ore_polring() + Ore Polynomial Ring in t over Finite Field in z2 of size 5^2 twisted by Identity + sage: psi.ore_polring().twisting_morphism() + Identity endomorphism of Finite Field in z2 of size 5^2 TESTS:: @@ -486,12 +587,9 @@ def constant_coefficient(self): r""" Return the constant coefficient of the generator (`\phi_X`). - The `A`-characteristic of the base field (see - :meth:`sage.categories.drinfeld_modules.DrinfeldModules.characteristic`) - is the minimal polynomial of this constant term, over the base - ring of the function ring. Equivalently, the constant term is - the image, by the morphism (`\gamma`) that defines the category, - of the generator (`X`) of the polynomial ring. + From the definition of a Drinfeld module, the constant coefficient equals + `\gamma(X)`. Hence, it is a root of the `\Fq[X]`-characteristic + of the base ring. OUTPUT: @@ -507,16 +605,15 @@ def constant_coefficient(self): sage: phi.constant_coefficient() == p_root True - The constant coefficient is the image of ``X`` by the - morphism that defines the category of ``phi``:: + The constant coefficient equals `\gamma(X)`:: sage: cat = phi.category() sage: gamma = cat.morphism() sage: gamma(X) == phi.constant_coefficient() True - Two Drinfeld modules in the same category have the same constant - coefficient:: + Naturally, two Drinfeld modules in the same category have the + same constant coefficient:: sage: t = phi.ore_variable() sage: psi = cat(phi.constant_coefficient() + t^3) @@ -524,15 +621,15 @@ def constant_coefficient(self): Drinfeld module defined by X |--> t^3 + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 Reciprocally, it is impossible to create two Drinfeld modules in - this category if they don't share the same constant + this category if they do not share the same constant coefficient:: sage: rho = cat(phi.constant_coefficient() + 1 + t^3) Traceback (most recent call last): ... - ValueError: constant coefficient is not a root of the characteristic + ValueError: constant coefficient must be a root of the characteristic - One cal also retrieve the constant coefficient using + One can also retrieve the constant coefficient using ``phi(X)[0]`:: sage: phi.constant_coefficient() == phi(X)[0] @@ -542,11 +639,11 @@ def constant_coefficient(self): def gen(self): r""" - Return the generator (`\phi_X`) of the Drinfeld module. + Return the generator of the Drinfeld module, i.e. `\phi_X`. - This method makes sense because, in our case, the function ring is - a polynomial ring; it is generated by one element, whose image - characterizes the morphism that defines the Drinfeld module. + This method makes sense because, in our case, the function ring + `\Fq[X]`, which is `\Fq`-generated by a single element element, + whose image characterizes the Drinfeld module. OUTPUT: @@ -617,9 +714,6 @@ def ore_polring(self): r""" Return the Ore polynomial ring of the Drinfeld module. - If the Drinfeld module is defined by a morphism `A \to - K\{\tau\}`, this is the codomain `K\{\tau\}`. - OUTPUT: - an Ore polynomial ring @@ -661,7 +755,8 @@ def ore_variable(self): r""" Return the Ore variable. - This is generator of the Ore polynomial ring. + The Ore variable is defined as the generator of the Ore + polynomial ring. OUTPUT: @@ -679,7 +774,7 @@ def ore_variable(self): sage: phi.ore_variable() is phi.ore_polring().gen() True - We can use the Ore variable to instanciate new Drinfeld + One can use the Ore variable to instanciate new Drinfeld modules...:: sage: t = phi.ore_variable() @@ -697,10 +792,7 @@ def function_ring(self): r""" Return the function ring of the Drinfeld module. - If the Drinfeld module is defined by a morphism `A \to - K\{\tau\}`, this is the domain `A`. - - In our case, the function ring is a polynomial ring. + In our case, the function ring is an `\Fq[X]`. OUTPUT: @@ -741,8 +833,8 @@ def __call__(self, a): def change_ring(self, new_field, name=None): r""" - Return a Drinfeld module defined like ``self``, but with base - ring ``new_field``. + Return a Drinfeld module defined like the current one, but with + base ring ``new_field``. The new base can either be a field extension of the base ring, or field that has a coercion map from the field of definitions @@ -771,7 +863,7 @@ def change_ring(self, new_field, name=None): sage: phi_2 Drinfeld module defined by X |--> 2*t^2 + (3*z24^23 + 2*z24^22 + 2*z24^20 + z24^19 + 4*z24^18 + 3*z24^17 + 4*z24^15 + 2*z24^13 + 4*z24^12 + 4*z24^11 + 3*z24^10 + 3*z24^9 + 4*z24^8 + 4*z24^6 + 3*z24^5 + 4*z24^4 + 4*z24^3 + 2*z24)*t + 2*z24^23 + 2*z24^22 + z24^21 + 2*z24^20 + z24^19 + 2*z24^18 + 3*z24^17 + 2*z24^16 + 4*z24^12 + 3*z24^11 + 4*z24^10 + z24^9 + z24^8 + 3*z24^7 + 2*z24^6 + z24^4 + 4*z24^3 + 3*z24^2 + 3*z24 + 2 over Finite Field in z24 of size 5^24 - And we can check various things:: + And one can check various things:: sage: phi.change_ring(K2).change_ring(K) is phi True @@ -786,7 +878,7 @@ def change_ring(self, new_field, name=None): To: Finite Field in z24 of size 5^24 Defn: X |--> 2*z24^23 + 2*z24^22 + z24^21 + 2*z24^20 + z24^19 + 2*z24^18 + 3*z24^17 + 2*z24^16 + 4*z24^12 + 3*z24^11 + 4*z24^10 + z24^9 + z24^8 + 3*z24^7 + 2*z24^6 + z24^4 + 4*z24^3 + 3*z24^2 + 3*z24 + 2 - We can also change the base ring to a subfield, even though some things + One can also change the base ring to a subfield, even though some things do not work as expected:: sage: K0 = Fq.extension(2) @@ -833,12 +925,9 @@ def height(self): def invert(self, ore_pol): r""" - Return the inverse ``ore_pol`` by the morphism that defines the - Drinfeld module; if ``ore_pol`` is not in the image of the - morphism, return ``None``. - - Said otherwise, return `a` if ``ore_pol`` is `phi_a`, otherwise - return ``None``. + Return the pre-image of the input under the Drinfeld module; + raise an exception if the input is not in the image of the + Drinfeld module. INPUT: @@ -864,14 +953,18 @@ def invert(self, ore_pol): sage: phi.invert(phi(Fq.gen())) == Fq.gen() True - When the input is not in the image of the Drinfeld module, the - method returns None:: + When the input is not in the image of the Drinfeld module, an + exception is raised:: sage: t = phi.ore_variable() - sage: phi.invert(t + 1) is None - True - sage: phi.invert(t^3 + t^2 + 1) is None - True + sage: phi.invert(t + 1) + Traceback (most recent call last): + ... + ValueError: input must be in the image of the Drinfeld module + sage: phi.invert(t^3 + t^2 + 1) + Traceback (most recent call last): + ... + ValueError: input must be in the image of the Drinfeld module ALGORITHM: @@ -930,7 +1023,7 @@ def is_finite(self): OUTPUT: - - ``True`` or ``False`` + - a boolean EXAMPLES: @@ -989,7 +1082,7 @@ def j(self): sage: theta.j() Traceback (most recent call last): ... - NotImplementedError: the rank must be 2 + NotImplementedError: rank must be 2 """ self._check_rank_two() g = self._gen[1] From 999a0aefcd1fb0abfb14c799428e71061feb04c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 18 Aug 2022 15:57:09 +0200 Subject: [PATCH 082/751] Fix function_fields imports --- .../drinfeld_modules/drinfeld_module.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index f3b69307931..1f12fb31717 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -2,10 +2,10 @@ Drinfeld modules This module provides the class -:class:`sage.rings.function_fields.drinfeld_module.drinfeld_module.DrinfeldModule`. +:class:`sage.rings.function_field.drinfeld_module.drinfeld_module.DrinfeldModule`. For *finite* Drinfeld modules and their theory of complex multiplication, see class -:class:`sage.rings.function_fields.drinfeld_module.finite_drinfeld_module.DrinfeldModule`. +:class:`sage.rings.function_field.drinfeld_module.finite_drinfeld_module.DrinfeldModule`. AUTHORS: @@ -90,7 +90,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): .. RUBRIC:: Construction and input A Drinfeld module object (class - :class:`sage.rings.function_fields.drinfeld_module.drinfeld_module.DrinfeldModule`) + :class:`sage.rings.function_field.drinfeld_module.drinfeld_module.DrinfeldModule`) is constructed as follows:: sage: Fq. = GF(3^2) @@ -251,7 +251,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: char = phi.category().characteristic() As the output of - :meth:`sage.rings.function_fields.drinfeld_module.finite_drinfeld_module.DrinfeldModule.category` + :meth:`sage.rings.function_field.drinfeld_module.finite_drinfeld_module.DrinfeldModule.category` suggests, the morphism `\gamma` uniquely determines the category of a Drinfeld module. @@ -353,7 +353,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): Defn: 0 One can retrieve the underlying Ore polynomial with the method - :meth:`sage.rings.function_fields.drinfeld_module.finite_drinfeld_module.DrinfeldModule.ore_polynomial`:: + :meth:`sage.rings.function_field.drinfeld_module.finite_drinfeld_module.DrinfeldModule.ore_polynomial`:: sage: frobenius_endomorphism.ore_polynomial() t^6 @@ -509,7 +509,7 @@ def __init__(self, gen, category): ########################## def _get_action_(self): - from sage.rings.function_fields.drinfeld_modules.action import DrinfeldModuleAction + from sage.rings.function_field.drinfeld_modules.action import DrinfeldModuleAction return DrinfeldModuleAction(self) def _latex_(self): From 942a9c8d95c0c59115ef55e533cd3f6ac999590c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 18 Aug 2022 17:17:21 +0200 Subject: [PATCH 083/751] Fix DrinfeldModuleAction This class was all broken since it had not been updated since the begining of the project, which itself had evolved a lot in the meantime. --- .../function_field/drinfeld_modules/action.py | 43 ++++++++----------- 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index 82f1ee0d207..bc263efd3eb 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -4,34 +4,29 @@ class DrinfeldModuleAction(Action): - def __init__(self, finite_drinfeld_module): - # Verifications - if not isinstance(finite_drinfeld_module, DrinfeldModule): - raise TypeError('input must be a DrinfeldModule') - # Work - self.__finite_drinfeld_module = finite_drinfeld_module - super().__init__(finite_drinfeld_module.polring(), - finite_drinfeld_module.ore_polring().base_ring()) - - ########### - # Methods # - ########### - - def finite_drinfeld_module(self): - return self.__finite_drinfeld_module - ########################## - # Special Sage functions # - ########################## + def __init__(self, drinfeld_module): + if not isinstance(drinfeld_module, DrinfeldModule): + raise TypeError('input must be a DrinfeldModule') + self._drinfeld_module = drinfeld_module + super().__init__(drinfeld_module.function_ring(), + drinfeld_module.base_ring()) - def _act_(self, g, x): - return self.finite_drinfeld_module()(g)(x) + def _act_(self, pol, x): + if pol not in self._drinfeld_module.function_ring(): + raise TypeError('first input must be in the function ring') + if x not in self._drinfeld_module.base_ring(): + raise TypeError('second input must be in the base ring') + return self._drinfeld_module(pol)(x) def _latex_(self): return f'\\text{{Action{{ }}on{{ }}}}' \ - f'{latex(self.extension())}\\text{{{{ }}' \ - f'induced{{ }}by{{ }}}}{self.finite_drinfeld_module()}' + f'{latex(self._drinfeld_module.base_ring())}\\text{{{{ }}' \ + f'induced{{ }}by{{ }}}}{self._drinfeld_module}' def _repr_(self): - return f'Action on {self.domain()} induced by ' \ - f'{self.finite_drinfeld_module()}' + return f'Action on {self._drinfeld_module.base_ring()} induced by ' \ + f'{self._drinfeld_module}' + + def drinfeld_module(self): + return self._drinfeld_module From 721f3072209d05e89fd3587b9bd0f2b4aee9f5c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 19 Aug 2022 15:16:21 +0200 Subject: [PATCH 084/751] Use super().__init__(...) for Drinfeld modules (esp. DrinfeldModuleMorphism) In commit f8e34f2d2ccea453f0cc98ca0fe6d154b352c10d, I made DrinfeldModuleMorphism inherit UniqueRepresentation, which made me refactor the __init__ method. It turns out that I was doing it wrong, and that, `my_morphism.parent()` would be `None`. I fixed that, and I wrote some tests to detect this in the future. I took the opportunity to use `super()` for other Drinfeld module stuff. --- .../drinfeld_modules/drinfeld_module.py | 2 +- .../rings/function_field/drinfeld_modules/homset.py | 2 +- .../rings/function_field/drinfeld_modules/morphism.py | 11 ++++++++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 1f12fb31717..ada0618edc4 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -496,7 +496,7 @@ def __classcall_private__(cls, function_ring, gen, name='t'): return cls.__classcall__(cls, gen, category) def __init__(self, gen, category): - CategoryObject.__init__(self, category=category) + super().__init__(category=category) self._base_ring = category.base() self._function_ring = category.function_ring() self._gen = gen diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index 595a8836df2..72f68d4461b 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -18,7 +18,7 @@ def __init__(self, X, Y, category=None, check=True): if category != X.category(): raise NotImplementedError('category should be DrinfeldModules') base = category.base() - Homset.__init__(self, X, Y, category=category, base=base, check=check) + super().__init__(X, Y, category=category, base=base, check=check) def _repr_(self): return f'Set of Drinfeld module morphisms:\n' \ diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index b7792a5a907..b6bae6da67c 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -87,6 +87,15 @@ class DrinfeldModuleMorphism(UniqueRepresentation, Element, sage: morphism.is_isomorphism() False + TESTS:: + + sage: morphism.parent() == Hom(phi, psi) + True + sage: phi.frobenius_endomorphism().parent() == End(phi) + True + sage: End(phi)(0).parent() == End(phi) + True + .. NOTE:: For the sake of completness, we explain how the user can @@ -121,7 +130,7 @@ def __classcall_private__(cls, parent, x): return cls.__classcall__(cls, parent, ore_pol) def __init__(self, parent, ore_pol): - Element.__init__(Element(parent), parent) + super().__init__(parent) self._domain = parent.domain() self._codomain = parent.codomain() self._ore_polynomial = ore_pol From 919cf5ed1360e5f65ade295ac4326d4066fb4a94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 19 Aug 2022 16:37:51 +0200 Subject: [PATCH 085/751] Create _latex_ method in DrinfeldModuleHomset --- src/sage/rings/function_field/drinfeld_modules/homset.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index 72f68d4461b..e4fd38e7177 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -20,6 +20,11 @@ def __init__(self, X, Y, category=None, check=True): base = category.base() super().__init__(X, Y, category=category, base=base, check=check) + def _latex_(self): + return f'\\text{{Set{{ }}of{{ }}Drinfeld{{ }}module{{ }}morphisms' \ + f'{{ }}from}}{latex(self.domain())}\\text{{{{ }}to{{ }}}}' \ + f'{self.codomain()}' + def _repr_(self): return f'Set of Drinfeld module morphisms:\n' \ f' From: {self.domain()}\n' \ From 70c215aec33c26379d45000b9d65a76645ab8af7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 19 Aug 2022 16:39:39 +0200 Subject: [PATCH 086/751] Write docstrings for DrinfeldModuleHomset --- .../function_field/drinfeld_modules/homset.py | 114 +++++++++++++++++- 1 file changed, 112 insertions(+), 2 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index e4fd38e7177..7229df993a1 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -1,9 +1,119 @@ -from sage.structure.parent import Parent +r""" +Set of morphisms between two Drinfeld modules + +This module provides the class +:class:`sage.rings.function_field.drinfeld_module.homset.DrinfeldModuleHomset`. + +AUTHORS: + +- Antoine Leudière (2022-04) +""" + +#***************************************************************************** +# Copyright (C) 2022 Antoine Leudière +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# http://www.gnu.org/licenses/ +#***************************************************************************** + from sage.categories.drinfeld_modules import DrinfeldModules -from sage.rings.function_field.drinfeld_modules.morphism import DrinfeldModuleMorphism from sage.categories.homset import Homset, Hom +from sage.misc.latex import latex +from sage.rings.function_field.drinfeld_modules.morphism import DrinfeldModuleMorphism +from sage.structure.parent import Parent class DrinfeldModuleHomset(Homset): + r""" + This class represents the set of morphisms between two Drinfeld + modules. + + INPUT: + + - ``X`` -- the domain + - ``Y`` -- the codomain + + EXAMPLES: + + sage: Fq = GF(27) + sage: FqX. = Fq[] + sage: K. = Fq.extension(2) + sage: phi = DrinfeldModule(FqX, [z6, z6, 2]) + sage: psi = DrinfeldModule(FqX, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) + sage: hom = Hom(phi, psi) + sage: hom + Set of Drinfeld module morphisms: + From: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 + To: Drinfeld module defined by X |--> 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 over Finite Field in z6 of size 3^6 + + sage: from sage.rings.function_field.drinfeld_modules.homset import DrinfeldModuleHomset + sage: isinstance(hom, DrinfeldModuleHomset) + True + + There is a simpler syntax for endomorphisms sets:: + + sage: end = End(phi) + sage: end + Set of Drinfeld module morphisms: + From: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 + To: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 + sage: end is Hom(phi, phi) + True + + + One can create morphism objects by calling the homset:: + + sage: t = phi.ore_variable() + sage: identity_morphism = end(1) + sage: identity_morphism + Drinfeld Module morphism: + From: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 + To: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 + Defn: 1 + + sage: frobenius_endomorphism = end(t^6) + sage: frobenius_endomorphism + Drinfeld Module morphism: + From: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 + To: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 + Defn: t^6 + + sage: isogeny = hom(t + 1) + sage: isogeny + Drinfeld Module morphism: + From: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 + To: Drinfeld module defined by X |--> 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 over Finite Field in z6 of size 3^6 + Defn: t + 1 + + And one can test if an Ore polynomial defines a morphism using the + ``in`` syntax:: + + sage: 1 in hom + False + sage: t^6 in hom + False + sage: t + 1 in hom + True + sage: 1 in end + True + sage: t^6 in end + True + sage: t + 1 in end + False + + This also works if the candidate is a morphism object:: + + sage: isogeny in hom + True + sage: end(0) in end + True + sage: identity_morphism in hom + False + sage: frobenius_endomorphism in hom + False + """ Element = DrinfeldModuleMorphism __contains__ = Parent.__contains__ From c9bfc054383b828e118fb79a4ee5cae60535d7d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 19 Aug 2022 16:37:06 +0200 Subject: [PATCH 087/751] (minor) Delete a blank line in DrinfeldModules --- src/sage/categories/drinfeld_modules.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index b4cd81bf3ef..5898e71ba5f 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -96,7 +96,6 @@ def random_element(self, rank): return self(coeffs) - # Sage methods def _call_(self, gen): From 394d0f5edd4941727f6420b8c76081bdad5269cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 19 Aug 2022 16:40:17 +0200 Subject: [PATCH 088/751] (minor) Change a sentence in DrinfeldModuleMorphism --- src/sage/rings/function_field/drinfeld_modules/morphism.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index b6bae6da67c..0f836451f84 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -99,7 +99,8 @@ class DrinfeldModuleMorphism(UniqueRepresentation, Element, .. NOTE:: For the sake of completness, we explain how the user can - directly instanciate the class:: + directly instanciate the class, even though this should never be + explicitely done:: sage: from sage.rings.function_field.drinfeld_modules.morphism import DrinfeldModuleMorphism sage: DrinfeldModuleMorphism(Hom(phi, psi), ore_pol) From 0f869f2345c2e071023dc5a7832b1776e1ed71be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 19 Aug 2022 17:03:27 +0200 Subject: [PATCH 089/751] (minor) Change first sentences of Drinfeld module classes --- .../rings/function_field/drinfeld_modules/drinfeld_module.py | 2 +- .../function_field/drinfeld_modules/finite_drinfeld_module.py | 2 +- src/sage/rings/function_field/drinfeld_modules/morphism.py | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index ada0618edc4..82d8e5f8837 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -39,7 +39,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): r""" - This class handles Drinfeld modules. + This class represents a Drinfeld module. Let `\Fq` be a finite field with order `q`. Let `K` be a field equiped a ring morphism `\gamma: \Fq[X] \to K` --- the field `K` is diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 68921a0f508..40563bd83d4 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -26,7 +26,7 @@ class FiniteDrinfeldModule(DrinfeldModule): r""" - This class handles finite Drinfeld modules. + This class represnets a finite Drinfeld module. A *finite Drinfeld module* is a Drinfeld module whose base ring is finite. For general definitions and help on Drinfeld modules, see diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 0f836451f84..80625539d7d 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -30,6 +30,8 @@ class DrinfeldModuleMorphism(UniqueRepresentation, Element, metaclass=InheritComparisonClasscallMetaclass): r""" + This class represents a Drinfeld module morphism. + Let `\phi,\psi` be two Drinfeld modules defined over the `\Fq[X]`-field `K`. A *morphism of Drinfeld modules `\phi \to \psi`* is an Ore polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a From 14f98aa4effbbea9a1e1f2e72aee31bc12988085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 19 Aug 2022 17:04:54 +0200 Subject: [PATCH 090/751] Change _get_action_ to action in DrinfeldModule See https://trac.sagemath.org/ticket/33713 for a discussion on this topic. Representations are very unusual in this context; this implementation seems more appropriate. I added documentation for this method in DrinfeldModule main docstring. NOTE: The commit is not very clean as I did some cleaning in the docstring too. --- .../drinfeld_modules/drinfeld_module.py | 66 ++++++++----------- 1 file changed, 27 insertions(+), 39 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 82d8e5f8837..217718e585f 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -393,41 +393,29 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): .. RUBRIC:: The action of a Drinfeld module - TODO - TODO - TODO - TODO - TODO - TODO - TODO - TODO - TODO - TODO - TODO - TODO - TODO - TODO - TODO - TODO - TODO - TODO - TODO - TODO - TODO - TODO - TODO - TODO - TODO - - .. RUBRIC:: Other methods - - It is possible to change the base ring:: - - sage: L = K.extension(2) - sage: phi_rebased = phi.change_ring(L) - sage: Ltau = phi_rebased.ore_polring() - sage: Ltau(phi(X)) == phi_rebased(X) - True + An `\Fq[X]`-Drinfeld module `\phi` notoriously makes any field + extension `L/K` a left `\Fq[X]`-module with the law defined by + `(P(X), a) \mapsto \phi_P(a)`, where `a \in L`. The method + :meth:`action` returns an ``Action`` object representing the + Drinfeld module action; in this implementation, `K = L`. + + sage: action = phi.action() + sage: action + Action on Finite Field in z of size 3^12 induced by Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 + + The action is computed as follows:: + + sage: P = X + 1 + sage: a = z + sage: action(P, a) + ... + z^9 + 2*z^8 + 2*z^7 + 2*z^6 + 2*z^3 + z^2 + sage: action(0, K.random_element()) + 0 + sage: action(FqX.random_element(), 0) + 0 + + .. RUBRIC:: Inversion of the Drinfeld module Given an Ore polynomial that equals `\phi_a` for some `a \in \Fq[X]`, one can retrieve `a` (as a morphism, a Drinfeld @@ -508,10 +496,6 @@ def __init__(self, gen, category): # Special Sage functions # ########################## - def _get_action_(self): - from sage.rings.function_field.drinfeld_modules.action import DrinfeldModuleAction - return DrinfeldModuleAction(self) - def _latex_(self): return f'\\text{{Drinfeld{{ }}module{{ }}defined{{ }}by{{ }}}} ' \ f'{latex(self._function_ring.gen())} '\ @@ -526,6 +510,10 @@ def _repr_(self): # Getters # ########### + def action(self): + from sage.rings.function_field.drinfeld_modules.action import DrinfeldModuleAction + return DrinfeldModuleAction(self) + def base_ring(self): r""" Return the base ring of the Drinfeld module. From b014a199f9c25b30234d672cc9ca8e2e9292ba25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 19 Aug 2022 17:19:56 +0200 Subject: [PATCH 091/751] Reorder methods in DrinfeldModule --- .../drinfeld_modules/drinfeld_module.py | 548 +++++++++--------- 1 file changed, 268 insertions(+), 280 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 217718e585f..c1c679d0257 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -492,9 +492,67 @@ def __init__(self, gen, category): self._ore_polring = gen.parent() self._Fq = self._function_ring.base_ring() # Must be last - ########################## - # Special Sage functions # - ########################## + def __call__(self, a): + r""" + Return the image of ``a`` by the morphism that defines the + Drinfeld module, i.e. `\phi_a` if the Drinfeld module is denoted + `phi`. + + INPUT: + + - ``a`` -- an element in the function ring + + OUTPUT: + + - an element of the base ring + """ + + return self._morphism(a) + + def _Hom_(self, other, category): + r""" + Return ``DrinfeldModuleHomset(self, other, category)``. + + Validity of the input is checked at the instantiation of + ``DrinfeldModuleHomset``. ``self`` and ``other`` only need be in + the same category. + + INPUT: + + - ``other`` -- the codomain of the homset + - ``category`` -- the category in which we consider the + morphisms, usually `self.category()` + + OUTPUT: + + - an homset + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: t = phi.ore_variable() + sage: isog = t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 + sage: psi = phi.velu(isog) + sage: hom = phi._Hom_(psi, category=phi.category()) + sage: hom is Hom(phi, psi) # known bug + True + sage: from sage.rings.function_field.drinfeld_modules.homset import DrinfeldModuleHomset + sage: isinstance(hom, DrinfeldModuleHomset) + True + """ + from sage.rings.function_field.drinfeld_modules.homset import DrinfeldModuleHomset + return DrinfeldModuleHomset(self, other, category) + + def _check_rank_two(self): + r""" + Raise ``NotImplementedError`` if the rank is not two. + """ + if self.rank() != 2: + raise NotImplementedError('rank must be 2') def _latex_(self): return f'\\text{{Drinfeld{{ }}module{{ }}defined{{ }}by{{ }}}} ' \ @@ -506,10 +564,6 @@ def _repr_(self): return f'Drinfeld module defined by {self._function_ring.gen()} ' \ f'|--> {self._gen} over {self._base_ring}' - ########### - # Getters # - ########### - def action(self): from sage.rings.function_field.drinfeld_modules.action import DrinfeldModuleAction return DrinfeldModuleAction(self) @@ -571,6 +625,76 @@ def base_ring(self): """ return self._base_ring + def change_ring(self, new_field, name=None): + r""" + Return a Drinfeld module defined like the current one, but with + base ring ``new_field``. + + The new base can either be a field extension of the base ring, + or field that has a coercion map from the field of definitions + of the coefficients of the generator. + + INPUT: + + - ``new_field`` -- the field extension of the base ring that + serves as base ring for the new Drinfeld module + + OUTPUT: + + - a Drinfeld module + + EXAMPLES: + + The new ring can be an extension of the base ring:: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, p_root^3, 2]) + sage: K2 = K.extension(2) + sage: phi_2 = phi.change_ring(K2) + sage: phi_2 + Drinfeld module defined by X |--> 2*t^2 + (3*z24^23 + 2*z24^22 + 2*z24^20 + z24^19 + 4*z24^18 + 3*z24^17 + 4*z24^15 + 2*z24^13 + 4*z24^12 + 4*z24^11 + 3*z24^10 + 3*z24^9 + 4*z24^8 + 4*z24^6 + 3*z24^5 + 4*z24^4 + 4*z24^3 + 2*z24)*t + 2*z24^23 + 2*z24^22 + z24^21 + 2*z24^20 + z24^19 + 2*z24^18 + 3*z24^17 + 2*z24^16 + 4*z24^12 + 3*z24^11 + 4*z24^10 + z24^9 + z24^8 + 3*z24^7 + 2*z24^6 + z24^4 + 4*z24^3 + 3*z24^2 + 3*z24 + 2 over Finite Field in z24 of size 5^24 + + And one can check various things:: + + sage: phi.change_ring(K2).change_ring(K) is phi + True + sage: phi_2.base_ring() is K2 + True + + Naturally, the category has changed:: + + sage: phi_2.category() + Category of Drinfeld modules defined by Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + To: Finite Field in z24 of size 5^24 + Defn: X |--> 2*z24^23 + 2*z24^22 + z24^21 + 2*z24^20 + z24^19 + 2*z24^18 + 3*z24^17 + 2*z24^16 + 4*z24^12 + 3*z24^11 + 4*z24^10 + z24^9 + z24^8 + 3*z24^7 + 2*z24^6 + z24^4 + 4*z24^3 + 3*z24^2 + 3*z24 + 2 + + One can also change the base ring to a subfield, even though some things + do not work as expected:: + + sage: K0 = Fq.extension(2) + sage: phi_0 = phi.change_ring(K0) + sage: phi_0.base_ring() is K0 + True + sage: phi.change_ring(K0).change_ring(K) # known bug + Traceback (most recent call last) + ... + TypeError: no coercion defined + + Furthermore:: + + sage: phi.change_ring(K) is phi + True + """ + coeffs = self._gen.coefficients() + new_coeffs = list(map(new_field, coeffs)) + if name == None: + name = self._ore_polring.variable_name() + return DrinfeldModule(self._function_ring, new_coeffs, name=name) + def constant_coefficient(self): r""" Return the constant coefficient of the generator (`\phi_X`). @@ -625,157 +749,6 @@ def constant_coefficient(self): """ return self.gen()[0] - def gen(self): - r""" - Return the generator of the Drinfeld module, i.e. `\phi_X`. - - This method makes sense because, in our case, the function ring - `\Fq[X]`, which is `\Fq`-generated by a single element element, - whose image characterizes the Drinfeld module. - - OUTPUT: - - - an Ore polynomial - - EXAMPLES: - - sage: Fq = GF(25) - sage: FqX. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: phi.gen() == phi(X) - True - """ - return self._gen - - def morphism(self): - r""" - Return the morphism object that defines the Drinfeld module. - - OUTPUT: - - - a ring morphism, from the function ring to the Ore polynomial - ring - - EXAMPLES: - - sage: Fq = GF(25) - sage: FqX. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: phi.morphism() - Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 - To: Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 twisted by z12 |--> z12^(5^2) - Defn: X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: from sage.rings.morphism import RingHomomorphism - sage: isinstance(phi.morphism(), RingHomomorphism) - True - - Actually, the ``DrinfeldModule`` method ``__call__`` simply - class the ``__call__`` method of this morphism:: - - sage: phi.morphism()(X) == phi(X) - True - sage: a = FqX.random_element() - sage: phi.morphism()(a) == phi(a) - True - - And many methods of the Drinfeld module have a counterpart in - the morphism object:: - - sage: m = phi.morphism() - sage: m.domain() is phi.function_ring() - True - sage: m.codomain() is phi.ore_polring() - True - sage: m.im_gens() - [z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12] - sage: phi(X) == m.im_gens()[0] - True - """ - return self._morphism - - def ore_polring(self): - r""" - Return the Ore polynomial ring of the Drinfeld module. - - OUTPUT: - - - an Ore polynomial ring - - EXAMPLES: - - sage: Fq = GF(25) - sage: FqX. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: ore_polring = phi.ore_polring() - sage: ore_polring - Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 twisted by z12 |--> z12^(5^2) - - The Ore polynomial ring can also be retrieved from the category - of the Drinfeld module:: - - sage: ore_polring is phi.category().ore_polring() - True - - The generator of the Drinfeld module is in the Ore polynomial - ring:: - - sage: phi(X) in ore_polring - True - - The Ore variable is just the generator of the Ore polynomial - ring:: - - sage: ore_polring.gen() - t - sage: phi.ore_variable() is ore_polring.gen() - True - """ - return self._ore_polring - - def ore_variable(self): - r""" - Return the Ore variable. - - The Ore variable is defined as the generator of the Ore - polynomial ring. - - OUTPUT: - - - an Ore polynomial - - EXAMPLES: - - sage: Fq = GF(25) - sage: FqX. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: phi.ore_variable() - t - sage: phi.ore_variable() is phi.ore_polring().gen() - True - - One can use the Ore variable to instanciate new Drinfeld - modules...:: - - sage: t = phi.ore_variable() - sage: psi_X = phi.constant_coefficient() + 3*t + 2*t^4 - sage: psi = DrinfeldModule(FqX, psi_X) - - ...or morphisms and isogenies:: - - sage: t^6 in End(phi) # Frobenius endomorphism - True - """ - return self._ore_polring.gen() - def function_ring(self): r""" Return the function ring of the Drinfeld module. @@ -798,96 +771,29 @@ def function_ring(self): """ return self._function_ring - ########### - # Methods # - ########### - - def __call__(self, a): - r""" - Return the image of ``a`` by the morphism that defines the - Drinfeld module, i.e. `\phi_a` if the Drinfeld module is denoted - `phi`. - - INPUT: - - - ``a`` -- an element in the function ring - - OUTPUT: - - - an element of the base ring - """ - - return self._morphism(a) - - def change_ring(self, new_field, name=None): + def gen(self): r""" - Return a Drinfeld module defined like the current one, but with - base ring ``new_field``. - - The new base can either be a field extension of the base ring, - or field that has a coercion map from the field of definitions - of the coefficients of the generator. - - INPUT: - - - ``new_field`` -- the field extension of the base ring that - serves as base ring for the new Drinfeld module + Return the generator of the Drinfeld module, i.e. `\phi_X`. + This method makes sense because, in our case, the function ring + `\Fq[X]`, which is `\Fq`-generated by a single element element, + whose image characterizes the Drinfeld module. + OUTPUT: - - a Drinfeld module + - an Ore polynomial EXAMPLES: - The new ring can be an extension of the base ring:: - sage: Fq = GF(25) sage: FqX. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, p_root^3, 2]) - sage: K2 = K.extension(2) - sage: phi_2 = phi.change_ring(K2) - sage: phi_2 - Drinfeld module defined by X |--> 2*t^2 + (3*z24^23 + 2*z24^22 + 2*z24^20 + z24^19 + 4*z24^18 + 3*z24^17 + 4*z24^15 + 2*z24^13 + 4*z24^12 + 4*z24^11 + 3*z24^10 + 3*z24^9 + 4*z24^8 + 4*z24^6 + 3*z24^5 + 4*z24^4 + 4*z24^3 + 2*z24)*t + 2*z24^23 + 2*z24^22 + z24^21 + 2*z24^20 + z24^19 + 2*z24^18 + 3*z24^17 + 2*z24^16 + 4*z24^12 + 3*z24^11 + 4*z24^10 + z24^9 + z24^8 + 3*z24^7 + 2*z24^6 + z24^4 + 4*z24^3 + 3*z24^2 + 3*z24 + 2 over Finite Field in z24 of size 5^24 - - And one can check various things:: - - sage: phi.change_ring(K2).change_ring(K) is phi - True - sage: phi_2.base_ring() is K2 - True - - Naturally, the category has changed:: - - sage: phi_2.category() - Category of Drinfeld modules defined by Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 - To: Finite Field in z24 of size 5^24 - Defn: X |--> 2*z24^23 + 2*z24^22 + z24^21 + 2*z24^20 + z24^19 + 2*z24^18 + 3*z24^17 + 2*z24^16 + 4*z24^12 + 3*z24^11 + 4*z24^10 + z24^9 + z24^8 + 3*z24^7 + 2*z24^6 + z24^4 + 4*z24^3 + 3*z24^2 + 3*z24 + 2 - - One can also change the base ring to a subfield, even though some things - do not work as expected:: - - sage: K0 = Fq.extension(2) - sage: phi_0 = phi.change_ring(K0) - sage: phi_0.base_ring() is K0 - True - sage: phi.change_ring(K0).change_ring(K) # known bug - Traceback (most recent call last) - ... - TypeError: no coercion defined - - Furthermore:: - - sage: phi.change_ring(K) is phi + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi.gen() == phi(X) True """ - coeffs = self._gen.coefficients() - new_coeffs = list(map(new_field, coeffs)) - if name == None: - name = self._ore_polring.variable_name() - return DrinfeldModule(self._function_ring, new_coeffs, name=name) + return self._gen def height(self): r""" @@ -1078,6 +984,133 @@ def j(self): q = self._Fq.order() return (g**(q+1)) / delta + def morphism(self): + r""" + Return the morphism object that defines the Drinfeld module. + + OUTPUT: + + - a ring morphism, from the function ring to the Ore polynomial + ring + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi.morphism() + Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + To: Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 twisted by z12 |--> z12^(5^2) + Defn: X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: from sage.rings.morphism import RingHomomorphism + sage: isinstance(phi.morphism(), RingHomomorphism) + True + + Actually, the ``DrinfeldModule`` method ``__call__`` simply + class the ``__call__`` method of this morphism:: + + sage: phi.morphism()(X) == phi(X) + True + sage: a = FqX.random_element() + sage: phi.morphism()(a) == phi(a) + True + + And many methods of the Drinfeld module have a counterpart in + the morphism object:: + + sage: m = phi.morphism() + sage: m.domain() is phi.function_ring() + True + sage: m.codomain() is phi.ore_polring() + True + sage: m.im_gens() + [z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12] + sage: phi(X) == m.im_gens()[0] + True + """ + return self._morphism + + def ore_polring(self): + r""" + Return the Ore polynomial ring of the Drinfeld module. + + OUTPUT: + + - an Ore polynomial ring + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: ore_polring = phi.ore_polring() + sage: ore_polring + Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 twisted by z12 |--> z12^(5^2) + + The Ore polynomial ring can also be retrieved from the category + of the Drinfeld module:: + + sage: ore_polring is phi.category().ore_polring() + True + + The generator of the Drinfeld module is in the Ore polynomial + ring:: + + sage: phi(X) in ore_polring + True + + The Ore variable is just the generator of the Ore polynomial + ring:: + + sage: ore_polring.gen() + t + sage: phi.ore_variable() is ore_polring.gen() + True + """ + return self._ore_polring + + def ore_variable(self): + r""" + Return the Ore variable. + + The Ore variable is defined as the generator of the Ore + polynomial ring. + + OUTPUT: + + - an Ore polynomial + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi.ore_variable() + t + sage: phi.ore_variable() is phi.ore_polring().gen() + True + + One can use the Ore variable to instanciate new Drinfeld + modules...:: + + sage: t = phi.ore_variable() + sage: psi_X = phi.constant_coefficient() + 3*t + 2*t^4 + sage: psi = DrinfeldModule(FqX, psi_X) + + ...or morphisms and isogenies:: + + sage: t^6 in End(phi) # Frobenius endomorphism + True + """ + return self._ore_polring.gen() + def rank(self): r""" Return the rank of the Drinfeld module. @@ -1181,48 +1214,3 @@ def velu(self, isog): return None quo, rem = (isog * self.gen()).right_quo_rem(isog) return None if rem != 0 else DrinfeldModule(self._function_ring, quo) - - def _Hom_(self, other, category): - r""" - Return ``DrinfeldModuleHomset(self, other, category)``. - - Validity of the input is checked at the instantiation of - ``DrinfeldModuleHomset``. ``self`` and ``other`` only need be in - the same category. - - INPUT: - - - ``other`` -- the codomain of the homset - - ``category`` -- the category in which we consider the - morphisms, usually `self.category()` - - OUTPUT: - - - an homset - - EXAMPLES: - - sage: Fq = GF(25) - sage: FqX. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: t = phi.ore_variable() - sage: isog = t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 - sage: psi = phi.velu(isog) - sage: hom = phi._Hom_(psi, category=phi.category()) - sage: hom is Hom(phi, psi) # known bug - True - sage: from sage.rings.function_field.drinfeld_modules.homset import DrinfeldModuleHomset - sage: isinstance(hom, DrinfeldModuleHomset) - True - """ - from sage.rings.function_field.drinfeld_modules.homset import DrinfeldModuleHomset - return DrinfeldModuleHomset(self, other, category) - - def _check_rank_two(self): - r""" - Raise ``NotImplementedError`` if the rank is not two. - """ - if self.rank() != 2: - raise NotImplementedError('rank must be 2') From 138902d263590c46d931ed79db753fd99b6b8beb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 22 Aug 2022 11:27:03 +0200 Subject: [PATCH 092/751] Write docstrings for DrinfeldModuleAction --- .../function_field/drinfeld_modules/action.py | 82 +++++++++++++++++++ 1 file changed, 82 insertions(+) diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index bc263efd3eb..1901a07d371 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -1,9 +1,78 @@ +r""" +The left-module action induced by a Drinfeld module + +This module provides the class +:class:`sage.rings.function_field.drinfeld_module.action.DrinfeldModuleAction`. + +AUTHORS: + +- Antoine Leudière (2022-04) +""" + +#***************************************************************************** +# Copyright (C) 2022 Antoine Leudière +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# http://www.gnu.org/licenses/ +#***************************************************************************** + from sage.categories.action import Action from sage.rings.function_field.drinfeld_modules.drinfeld_module import DrinfeldModule class DrinfeldModuleAction(Action): + r""" + This class represents the left `\Fq[X]`-module action induced by a + Drinfeld `\Fq[X]`-module defined over an `\Fq[X]`-field `K`. + + Let `L/K` be a field extension, let `x \in L`, let `P \in \Fq[X]`; + the action is defined as `(P, a) \mapsto \phi_P(a)`, where + `\phi_P(a)`. In this implementation, `L` is `K`. + + The action is instanciated as follows. Note that the user should + never explicitely instanciate the class `DrinfeldModuleAction`:: + + INPUT: a Drinfeld module + + EXAMPLES: + + sage: Fq. = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(2) + sage: phi = DrinfeldModule(FqX, [z, 0, 0, 1]) + sage: action = phi.action() + sage: action + Action on Finite Field in z of size 11^2 induced by Drinfeld module defined by X |--> t^3 + z over Finite Field in z of size 11^2 + + The action on elements is computed as follows:: + + sage: P = X + 1 + sage: a = z + sage: action(P, a) + ... + 4*z + 2 + sage: action(0, K.random_element()) + 0 + sage: action(FqX.random_element(), 0) + 0 + + To act on a field larger than `K`, one can change the ring of the + Drinfeld module, then create the action:: + + sage: extended_action = phi.change_ring(K.extension(2)).action() + sage: extended_action + Action on Finite Field in z4 of size 11^4 induced by Drinfeld module defined by X |--> t + 10*z4^3 + 4*z4^2 + 5*z4 + 5 over Finite Field in z4 of size 11^4 + + Finally, given a Drinfeld module action, it is easy to recover the + corresponding Drinfeld module:: + + sage: action.drinfeld_module() is phi + True + """ def __init__(self, drinfeld_module): if not isinstance(drinfeld_module, DrinfeldModule): @@ -29,4 +98,17 @@ def _repr_(self): f'{self._drinfeld_module}' def drinfeld_module(self): + r""" + Return the Drinfeld module associated to the action. + + OUTPUT: a Drinfeld module + + sage: Fq. = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(2) + sage: phi = DrinfeldModule(FqX, [z, 0, 0, 1]) + sage: action = phi.action() + sage: action.drinfeld_module() is phi + True + """ return self._drinfeld_module From de5e0380446a4c265026e23699357f2fac55b23e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 22 Aug 2022 13:53:55 +0200 Subject: [PATCH 093/751] Rename random_element method to random_object in DrinfeldModules See https://trac.sagemath.org/ticket/33713#comment:90. --- src/sage/categories/drinfeld_modules.py | 3 +-- .../function_field/drinfeld_modules/drinfeld_module.py | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 5898e71ba5f..8ae76b33e8b 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -78,8 +78,7 @@ def morphism(self): def ore_polring(self): return self._ore_polring - def random_element(self, rank): - + def random_object(self, rank): if not isinstance(rank, Integer): raise TypeError('rank must be a positive integer') if rank <= 0: diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index c1c679d0257..c4b0248c4e1 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -869,19 +869,19 @@ def invert(self, ore_pol): sage: a = FqX.random_element() sage: cat = phi.category() - sage: phi_r1 = cat.random_element(1) + sage: phi_r1 = cat.random_object(1) sage: phi_r1.invert(phi_r1(a)) == a True - sage: phi_r2 = cat.random_element(2) + sage: phi_r2 = cat.random_object(2) sage: phi_r2.invert(phi_r2(a)) == a True - sage: phi_r3 = cat.random_element(3) + sage: phi_r3 = cat.random_object(3) sage: phi_r3.invert(phi_r3(a)) == a True - sage: phi_r4 = cat.random_element(4) + sage: phi_r4 = cat.random_object(4) sage: phi_r4.invert(phi_r4(a)) == a True - sage: phi_r5 = cat.random_element(5) + sage: phi_r5 = cat.random_object(5) sage: phi_r5.invert(phi_r5(a)) == a True """ From e50a5caab8c6dcfacc1c1a96338f28782c677457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 22 Aug 2022 14:32:14 +0200 Subject: [PATCH 094/751] Handle some zero Fq[X]-characteristic special cases in DrinfeldModules The code is a simple two-liner `if` in `DrinfeldModules.__init__`. --- src/sage/categories/drinfeld_modules.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 8ae76b33e8b..1104c288375 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -57,6 +57,9 @@ def __init__(self, morphism, name='t'): f = gamma * FqX.coerce_map_from(Fq) # Fq -> K E = K.over(f) self._characteristic = FqX(E(gamma(X)).minpoly()) + elif FqX.is_subring(K): + self._characteristic = Integer(0) + def base(self): return self._ore_polring.base_ring() From f5aa48906702e0a42c01c63374072e5a9874861d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 22 Aug 2022 15:22:32 +0200 Subject: [PATCH 095/751] Create _base attribute in DrinfeldModules This is more in line with the rest of the code. --- src/sage/categories/drinfeld_modules.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 1104c288375..b53db6023b1 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -42,6 +42,7 @@ def __init__(self, morphism, name='t'): X = FqX.gen() # Check codomain of gamma is field K = gamma.codomain() + self._base = K if not K.is_field(): raise TypeError('base must be a field') # Build K{t} @@ -62,7 +63,7 @@ def __init__(self, morphism, name='t'): def base(self): - return self._ore_polring.base_ring() + return self._base def characteristic(self): if self._characteristic is None: @@ -87,7 +88,7 @@ def random_object(self, rank): if rank <= 0: raise ValueError('rank must be a positive integer') - K = self.base() + K = self._base coeffs = [self._constant_coefficient] for _ in range(rank-1): coeffs.append(K.random_element()) From 386efec427689989407aae7f788ad4f0d05b6cac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 22 Aug 2022 15:23:49 +0200 Subject: [PATCH 096/751] Write docstrings in DrinfeldModules I also did a bit of cleaning and refactoring there and there, but it is only cosmetic changes (order of methods, some comments, etc); nothing important or meaningful. --- src/sage/categories/drinfeld_modules.py | 371 ++++++++++++++++++++++-- 1 file changed, 340 insertions(+), 31 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index b53db6023b1..98ccb24152a 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -1,6 +1,15 @@ r""" -Drinfeld modules +Category of Drinfeld modules + +This module provides the class +:class:`sage.category.drinfeld_modules.DrinfeldModules`. + +AUTHORS: + +- Antoine Leudière (2022-04) +- Xavier Caruso (2022-06) """ + #***************************************************************************** # Copyright (C) 2022 Xavier Caruso # Antoine Leudière @@ -10,18 +19,134 @@ #****************************************************************************** from sage.categories.category import CategoryWithParameters +from sage.categories.homsets import Homsets from sage.misc.functional import log from sage.rings.integer import Integer from sage.rings.morphism import RingHomomorphism -from sage.rings.polynomial.polynomial_ring import PolynomialRing_general from sage.rings.polynomial.ore_polynomial_ring import OrePolynomialRing +from sage.rings.polynomial.polynomial_ring import PolynomialRing_general -from sage.categories.homsets import Homsets - -# from sage.misc.cachefunc import cached_method -# from sage.categories.basic import Fields class DrinfeldModules(CategoryWithParameters): + r""" + This class represents the category of Drinfeld modules on a given + `\Fq[X]`-field `K`. + + The `\Fq[X]`-field structure on `K` is given by a ring morphism + `\gamma: \Fq[X] \to K`. + + We say that `\Fq[X]` is the *function ring of the category*; `K` is the + *base of the category*, or simply its base ring or base field; `\Fq[X]` is + the *function ring of the category*; *K\{\tau\}* is the *Ore + polynomial ring of the category*; + `t` is the *Ore variable of the category*. The *constant coefficient + of the category* is `\gamma(X)`. + + INPUT: a ring morphism `\Fq[X] \to K` + + EXAMPLES: + + Generally, Drinfeld modules objects are created before their + category, and the category is retrieved as an attribute of the + Drinfeld module:: + + sage: Fq = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(4) + sage: p_root = z^3 + 7*z^2 + 6*z + 10 + sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: cat = phi.category() + sage: cat + Category of Drinfeld modules defined by Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field of size 11 + To: Finite Field in z of size 11^4 + Defn: X |--> z^3 + 7*z^2 + 6*z + 10 + + The output tells the user that the category is only defined by the + ring morphism `\gamma`. + + .. RUBRIC:: Properties of the category + + The defining morphism is retrieved using the method + :meth:`morphism`:: + + sage: cat.morphism() + Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field of size 11 + To: Finite Field in z of size 11^4 + Defn: X |--> z^3 + 7*z^2 + 6*z + 10 + + The so-called *constant coefficient* --- which is the same for all + Drinfeld modules in the category --- is simply the image of `X` by + this morphism: + + sage: cat.constant_coefficient() + z^3 + 7*z^2 + 6*z + 10 + sage: cat.morphism()(X) == cat.constant_coefficient() + True + + Similarly, the *`\Fq[X]`-characteristic* of the category is either + `0` or the unique monic polynomial in `\Fq[X]` that generates + `\mathrm{Ker}(\gamma)`:: + + sage: cat.characteristic() + X^2 + 7*X + 2 + sage: cat.morphism()(cat.characteristic()) + 0 + + Like for its Drinfeld modules, the *base* of the category is the + field `K`:: + + sage: cat.base() + Finite Field in z of size 11^4 + sage: cat.base() is K + True + + And the *function ring* is the polynomial ring `\Fq[X]`:: + + sage: cat.function_ring() + Univariate Polynomial Ring in X over Finite Field of size 11 + sage: cat.function_ring() is FqX + True + + And as expected, the *Ore polynomial ring* is that of + the Drinfeld modules in the category: + + sage: cat.ore_polring() + Ore Polynomial Ring in t over Finite Field in z of size 11^4 twisted by z |--> z^11 + sage: cat.ore_polring() is phi.ore_polring() + True + + .. RUBRIC:: Creating Drinfeld module objects from the category + + Calling the category with an Ore polynomial creates a Drinfeld + module object in the category whose generator is the input:: + + sage: psi = cat([p_root, 1]) + sage: psi + Drinfeld module defined by X |--> t + z^3 + 7*z^2 + 6*z + 10 over Finite Field in z of size 11^4 + sage: psi.category() is cat + True + + Of course, the constant coefficient of the input must be the same as + the category':: + + sage: cat([z, 1]) + Traceback (most recent call last): + ... + ValueError: constant coefficient must be a root of the characteristic + + It is also possible to create a random object in the category, with + a given rank:: + + sage: rho = cat.random_object(2) + sage: rho # random + Drinfeld module defined by X |--> (7*z^3 + 7*z^2 + 10*z + 2)*t^2 + (9*z^3 + 5*z^2 + 2*z + 7)*t + z^3 + 7*z^2 + 6*z + 10 over Finite Field in z of size 11^4 + sage: rho.rank() == 2 + True + sage: rho.category() is cat + True + """ def __init__(self, morphism, name='t'): gamma = morphism @@ -61,28 +186,234 @@ def __init__(self, morphism, name='t'): elif FqX.is_subring(K): self._characteristic = Integer(0) + def _call_(self, gen): + r""" + Return a Drinfeld module object, in the category, whose + generator is the input. + + INPUT: the generator of the Drinfeld module, given as an Ore + polynomial or a list of coefficients + + OUTPUT: a Drinfeld module in the category + + EXAMPLES: + + sage: Fq = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(4) + sage: p_root = z^3 + 7*z^2 + 6*z + 10 + sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: cat = phi.category() + sage: psi = cat([p_root, 0, 1]) + sage: psi + Drinfeld module defined by X |--> t^2 + z^3 + 7*z^2 + 6*z + 10 over Finite Field in z of size 11^4 + sage: t = phi.ore_variable() + sage: cat(t^3 + z^3 + 7*z^2 + 6*z + 10) is phi + True + """ + from sage.rings.function_field.drinfeld_modules.drinfeld_module import DrinfeldModule + # If gen is not in the Ore polring, an exception is raised + gen = self._ore_polring(gen) + if self.characteristic()(gen[0]) != 0: + raise ValueError('constant coefficient must be a root of the characteristic') + return DrinfeldModule(self._function_ring, gen) + + # Somehow required for the class definition + def _make_named_class_key(self, name): + return self._function_ring.category() + + def _repr_(self): + return f'Category of Drinfeld modules defined by {self._morphism}' + + # Somehow required for the class definition + def Homsets(self): + return Homsets() + + # Somehow required for the class definition + def Endsets(self): + return Homsets() def base(self): + r""" + Return the base of the category. + + OUTPUT: a ring + + EXAMPLES: + + sage: Fq = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(4) + sage: p_root = z^3 + 7*z^2 + 6*z + 10 + sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: cat = phi.category() + sage: cat.base() + Finite Field in z of size 11^4 + sage: cat.base() is K + True + """ return self._base def characteristic(self): + r""" + Return the `\Fq[X]`-characteristic of the category. + + OUTPUT: `0` or a monic prime polynomial in `\Fq[X]` + + EXAMPLES: + + sage: Fq = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(4) + sage: p_root = z^3 + 7*z^2 + 6*z + 10 + sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: cat = phi.category() + sage: cat.characteristic() + X^2 + 7*X + 2 + + sage: L = Frac(FqX) + sage: psi = DrinfeldModule(FqX, [L.gen(), 1]) + sage: psi + Drinfeld module defined by X |--> t + X over Fraction Field of Univariate Polynomial Ring in X over Finite Field of size 11 + sage: fox = psi.category() + sage: fox.characteristic() + 0 + """ if self._characteristic is None: raise NotImplementedError return self._characteristic def constant_coefficient(self): + r""" + Return the constant coefficient of the category. + + OUTPUT: an element in the base + + EXAMPLES: + + sage: Fq = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(4) + sage: p_root = z^3 + 7*z^2 + 6*z + 10 + sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: cat = phi.category() + sage: cat.constant_coefficient() + z^3 + 7*z^2 + 6*z + 10 + sage: cat.constant_coefficient() == cat.morphism()(X) + True + """ return self._constant_coefficient def function_ring(self): + r""" + Return the function ring of the category. + + OUTPUT: the ring `\Fq[X]` + + EXAMPLES: + + sage: Fq = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(4) + sage: p_root = z^3 + 7*z^2 + 6*z + 10 + sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: cat = phi.category() + sage: cat.function_ring() + Univariate Polynomial Ring in X over Finite Field of size 11 + sage: cat.function_ring() is FqX + True + """ return self._function_ring def morphism(self): + r""" + Return the morphism that defines the category. + + OUTPUT: a ring morphism + + EXAMPLES: + + sage: Fq = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(4) + sage: p_root = z^3 + 7*z^2 + 6*z + 10 + sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: cat = phi.category() + sage: gamma = cat.morphism() + sage: gamma + Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field of size 11 + To: Finite Field in z of size 11^4 + Defn: X |--> z^3 + 7*z^2 + 6*z + 10 + sage: gamma(X) == cat.constant_coefficient() + True + """ return self._morphism def ore_polring(self): + r""" + Return the Ore polynomial ring of the category. + + OUTPUT: the Ore polynomial ring `K\{\tau\}` + + EXAMPLES: + + sage: Fq = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(4) + sage: p_root = z^3 + 7*z^2 + 6*z + 10 + sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: cat = phi.category() + sage: cat.ore_polring() + Ore Polynomial Ring in t over Finite Field in z of size 11^4 twisted by z |--> z^11 + sage: cat.ore_polring() is phi.ore_polring() + True + """ return self._ore_polring + def ore_variable(self): + r""" + Return the Ore variable of the category. + + OUTPUT: the generator of the Ore polynomial ring + + EXAMPLES: + + sage: Fq = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(4) + sage: p_root = z^3 + 7*z^2 + 6*z + 10 + sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: cat = phi.category() + sage: cat.ore_variable() + t + sage: cat.ore_variable() is phi.ore_variable() + True + """ + return self._ore_polring.gen() + def random_object(self, rank): + r""" + Return a random Drinfeld module in the category, whose rank is + the input. + + INPUT: an integer, the rank of the Drinfeld module + + OUTPUT: a Drinfeld module in the category + + EXAMPLES: + + sage: Fq = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(4) + sage: p_root = z^3 + 7*z^2 + 6*z + 10 + sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: cat = phi.category() + sage: psi = cat.random_object(3) # random + Drinfeld module defined by X |--> (6*z^3 + 4*z^2 + 10*z + 9)*t^3 + (4*z^3 + 8*z^2 + 8*z)*t^2 + (10*z^3 + 3*z^2 + 6*z)*t + z^3 + 7*z^2 + 6*z + 10 over Finite Field in z of size 11^4 + sage: psi.rank() == 3 + True + """ if not isinstance(rank, Integer): raise TypeError('rank must be a positive integer') if rank <= 0: @@ -99,38 +430,16 @@ def random_object(self, rank): return self(coeffs) - # Sage methods - - def _call_(self, gen): - # Avoid circular import - from sage.rings.function_field.drinfeld_modules.drinfeld_module import DrinfeldModule - # If gen is not in the codomain, an exception is raised - gen = self._ore_polring(gen) - if self.characteristic()(gen[0]) != 0: - raise ValueError('constant coefficient must be a root of the characteristic') - return DrinfeldModule(self._function_ring, gen) - - def _repr_(self): - return f'Category of Drinfeld modules defined by {self._morphism}' - - # Sage requires those: - - def _make_named_class_key(self, name): - return self._function_ring.category() - + # Somehow required for the class definition def super_categories(self): return [] - def Homsets(self): - return Homsets() - - def Endsets(self): - return Homsets() - + # Somehow required for the class definition class ParentMethods: def characteristic(self): return self.category().characteristic() + # Somehow required for the class definition class ElementMethods: pass From e80ed4b20d381b60171dc22548a355e7869fc0f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 22 Aug 2022 16:08:14 +0200 Subject: [PATCH 097/751] Make OUTPUT: fields oneliners in Drinfeld modules classes See https://trac.sagemath.org/ticket/33713#comment:87. --- .../drinfeld_modules/drinfeld_module.py | 68 +++++-------------- .../finite_drinfeld_module.py | 24 ++----- 2 files changed, 24 insertions(+), 68 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index c4b0248c4e1..f1480b9fd5b 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -502,9 +502,7 @@ def __call__(self, a): - ``a`` -- an element in the function ring - OUTPUT: - - - an element of the base ring + OUTPUT: an element of the base ring """ return self._morphism(a) @@ -523,9 +521,7 @@ def _Hom_(self, other, category): - ``category`` -- the category in which we consider the morphisms, usually `self.category()` - OUTPUT: - - - an homset + OUTPUT: an homset EXAMPLES: @@ -575,9 +571,7 @@ def base_ring(self): This is the Ore polynomial ring base. In particular, the base ring is always a field. - OUTPUT: - - - a field + OUTPUT: a field EXAMPLES: @@ -639,9 +633,7 @@ def change_ring(self, new_field, name=None): - ``new_field`` -- the field extension of the base ring that serves as base ring for the new Drinfeld module - OUTPUT: - - - a Drinfeld module + OUTPUT: a Drinfeld module EXAMPLES: @@ -703,9 +695,7 @@ def constant_coefficient(self): `\gamma(X)`. Hence, it is a root of the `\Fq[X]`-characteristic of the base ring. - OUTPUT: - - - an element in the base ring + OUTPUT: an element in the base ring EXAMPLES: @@ -755,9 +745,7 @@ def function_ring(self): In our case, the function ring is an `\Fq[X]`. - OUTPUT: - - - a polynomial ring + OUTPUT: a polynomial ring EXAMPLES: @@ -779,9 +767,7 @@ def gen(self): `\Fq[X]`, which is `\Fq`-generated by a single element element, whose image characterizes the Drinfeld module. - OUTPUT: - - - an Ore polynomial + OUTPUT: an Ore polynomial EXAMPLES: @@ -801,9 +787,7 @@ def height(self): In our case, the height is always 1. - OUTPUT: - - - an integer + OUTPUT: an integer EXAMPLES: @@ -828,9 +812,7 @@ def invert(self, ore_pol): - ``ore_pol`` -- the Ore polynomial whose preimage we want to compute - OUTPUT: - - - a polynomial + OUTPUT: a polynomial EXAMPLES: @@ -915,9 +897,7 @@ def is_finite(self): Return ``True`` if the Drinfeld module is finite; return ``False`` otherwise. - OUTPUT: - - - a boolean + OUTPUT: a boolean EXAMPLES: @@ -949,10 +929,8 @@ def j(self): finite, as we force the function ring to be of the form `\Fq[X]`. - OUTPUT: - - - an element in the base ring if the rank is two; an - exception is raised otherwise + OUTPUT: an element in the base ring if the rank is two; an + exception is raised otherwise EXAMPLES: @@ -988,10 +966,8 @@ def morphism(self): r""" Return the morphism object that defines the Drinfeld module. - OUTPUT: - - - a ring morphism, from the function ring to the Ore polynomial - ring + OUTPUT: a ring morphism, from the function ring to the Ore + polynomial ring EXAMPLES: @@ -1037,9 +1013,7 @@ def ore_polring(self): r""" Return the Ore polynomial ring of the Drinfeld module. - OUTPUT: - - - an Ore polynomial ring + OUTPUT: an Ore polynomial ring EXAMPLES: @@ -1081,9 +1055,7 @@ def ore_variable(self): The Ore variable is defined as the generator of the Ore polynomial ring. - OUTPUT: - - - an Ore polynomial + OUTPUT: an Ore polynomial EXAMPLES: @@ -1118,9 +1090,7 @@ def rank(self): When the function ring is a polynomial ring, the rank is the degree of the generator. - OUTPUT: - - - an integer + OUTPUT: an integer EXAMPLES: @@ -1153,9 +1123,7 @@ def velu(self, isog): - ``isog`` -- the Ore polynomial that defines the isogeny - OUTPUT: - - - a Drinfeld module + OUTPUT: a Drinfeld module ALGORITHM: diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 40563bd83d4..04080461170 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -119,9 +119,7 @@ def frobenius_endomorphism(self): *Frobenius endomorphism* is defined as the endomorphism whose defining Ore polynomial is `t^q`. - OUTPUT: - - - a Drinfeld module morphism + OUTPUT: a Drinfeld module morphism EXAMPLES: @@ -168,9 +166,7 @@ def frobenius_charpoly(self, var='T'): - ``var`` -- (optional) the name of the second variable - OUTPUT: - - - a polynomial in `\Fq[X][T]` + OUTPUT: a polynomial in `\Fq[X][T]` EXAMPLES: @@ -232,9 +228,7 @@ def frobenius_norm(self): Let `n` be the degree of the base ring over `\Fq`. Then the Frobenius norm has degree `n`. - OUTPUT: - - - a polynomial in `\Fq[X]` + OUTPUT: a polynomial in `\Fq[X]` EXAMPLES: @@ -281,9 +275,7 @@ def frobenius_trace(self): Let `n` be the degree of the base ring over `\Fq`. Then the Frobenius trace has degree `\leq \frac{n}{2}`. - OUTPUT: - - - a polynomial in `\Fq[X]` + OUTPUT: a polynomial in `\Fq[X]` ALGORITHM: @@ -335,9 +327,7 @@ def is_ordinary(self): Frobenius trace. A *supersingular* rank two finite Drinfeld module is a Drinfeld module that is not ordinary. - OUTPUT: - - - a boolean + OUTPUT: a boolean EXAMPLES: @@ -373,9 +363,7 @@ def is_supersingular(self): Frobenius trace. An *ordinary* rank two finite Drinfeld module is a Drinfeld module that is not supersingular. - OUTPUT: - - - a boolean + OUTPUT: a boolean EXAMPLES: From 3962e10587ebd857759b8ee18e0d5a81bcccfc30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 22 Aug 2022 16:09:45 +0200 Subject: [PATCH 098/751] Raise an exception if invalid input for velu method in DrinfeldModule When the input Ore polynomial does not define an isogeny, raise ValueError. See https://trac.sagemath.org/ticket/33713#comment:88. --- .../drinfeld_modules/drinfeld_module.py | 47 ++++++++++++++----- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index f1480b9fd5b..11f30b7f02c 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -377,10 +377,10 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): .. RUBRIC:: The Vélu formula - Let ``ore_pol`` be a non-zero Ore polynomial ``ore_pol``. For - Drinfeld module, it is easy to decide if there exists a Drinfeld - module ``psi`` such that ``ore_pol`` is an isogeny from ``self`` to - ``psi``. We can also find ``psi``, which is unique. + Let ``ore_pol`` be a non-zero Ore polynomial. For Drinfeld module, + it is easy to decide if there exists a Drinfeld module ``psi`` such + that ``ore_pol`` is an isogeny from ``self`` to ``psi``. If so, we + find ``psi``:: sage: ore_pol = (2*z^6 + z^3 + 2*z^2 + z + 2)*t + z^11 + 2*z^10 + 2*z^9 + 2*z^8 + z^7 + 2*z^6 + z^5 + z^3 + z^2 + z sage: psi = phi.velu(ore_pol) @@ -391,6 +391,17 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: ore_pol * phi(X) == psi(X) * ore_pol True + If the input does not define an isogeny, an exception is raised: + + sage: phi.velu(0) + Traceback (most recent call last): + ... + ValueError: the input does not define an isogeny + sage: phi.velu(t) + Traceback (most recent call last): + ... + ValueError: the input does not define an isogeny + .. RUBRIC:: The action of a Drinfeld module An `\Fq[X]`-Drinfeld module `\phi` notoriously makes any field @@ -1112,12 +1123,9 @@ def rank(self): def velu(self, isog): r""" - Return a new Drinfeld module such that ``isog`` is an + Return a new Drinfeld module such that input is an isogeny to this module with domain ``self``; if no such isogeny - exists, return ``None``. - - If the input is zero, return ``None``, as an isogeny is - required to be non zero. + exists, raise an exception. INPUT: @@ -1171,14 +1179,27 @@ def velu(self, isog): returns None:: sage: phi.velu(0) + Traceback (most recent call last): + ... + ValueError: the input does not define an isogeny sage: phi.velu(t) + Traceback (most recent call last): + ... + ValueError: the input does not define an isogeny sage: phi.velu(t^3 + t + 2) + Traceback (most recent call last): + ... + ValueError: the input does not define an isogeny """ if not isog in self.ore_polring(): raise TypeError('input must be an Ore polynomial') + e = ValueError('the input does not define an isogeny') if isog == 0: - return None - if not self.characteristic().degree().divides(isog.valuation()): - return None + raise e quo, rem = (isog * self.gen()).right_quo_rem(isog) - return None if rem != 0 else DrinfeldModule(self._function_ring, quo) + char_deg = self.characteristic().degree() + if not char_deg.divides(isog.valuation()) \ + or rem != 0: + raise e + else: + return self.category()(quo) From 5f8c0050392027b4a49b90a3aad75306d621e1e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 22 Aug 2022 17:15:01 +0200 Subject: [PATCH 099/751] Add _latex_ and _repr_ docstrings in Drinfeld modules classes See https://trac.sagemath.org/ticket/33713#comment:88. --- src/sage/categories/drinfeld_modules.py | 46 +++++++++++++++++++ .../function_field/drinfeld_modules/action.py | 32 ++++++++++++- .../drinfeld_modules/drinfeld_module.py | 30 ++++++++++++ .../function_field/drinfeld_modules/homset.py | 34 ++++++++++++++ .../drinfeld_modules/morphism.py | 40 ++++++++++++++++ 5 files changed, 181 insertions(+), 1 deletion(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 98ccb24152a..e2f7951d669 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -21,6 +21,7 @@ from sage.categories.category import CategoryWithParameters from sage.categories.homsets import Homsets from sage.misc.functional import log +from sage.misc.latex import latex from sage.rings.integer import Integer from sage.rings.morphism import RingHomomorphism from sage.rings.polynomial.ore_polynomial_ring import OrePolynomialRing @@ -222,7 +223,52 @@ def _call_(self, gen): def _make_named_class_key(self, name): return self._function_ring.category() + def _latex_(self): + r""" + Return a latex representation of the category + + OUTPUT: a string + + EXAMPLE: + + sage: Fq = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(4) + sage: p_root = z^3 + 7*z^2 + 6*z + 10 + sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: cat = phi.category() + sage: latex(cat) + sage: latex(cat) + \text{Category{ }of{ }Drinfeld{ }modules{ }defined{ }by\begin{array}{l} + \text{\texttt{Ring{ }morphism:}}\\ + \text{\texttt{{ }{ }From:{ }Univariate{ }Polynomial{ }Ring{ }in{ }X{ }over{ }Finite{ }Field{ }of{ }size{ }11}}\\ + \text{\texttt{{ }{ }To:{ }{ }{ }Finite{ }Field{ }in{ }z{ }of{ }size{ }11{\char`\^}4}}\\ + \text{\texttt{{ }{ }Defn:{ }X{ }|{-}{-}>{ }z{\char`\^}3{ }+{ }7*z{\char`\^}2{ }+{ }6*z{ }+{ }10}} + \end{array} + """ + return f'\\text{{Category{{ }}of{{ }}Drinfeld{{ }}modules{{ }}' \ + f'defined{{ }}by{latex(self._morphism)}' + def _repr_(self): + r""" + Return a string representation of the category + + OUTPUT: a string + + EXAMPLE: + + sage: Fq = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(4) + sage: p_root = z^3 + 7*z^2 + 6*z + 10 + sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: cat = phi.category() + sage: cat + Category of Drinfeld modules defined by Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field of size 11 + To: Finite Field in z of size 11^4 + Defn: X |--> z^3 + 7*z^2 + 6*z + 10 + """ return f'Category of Drinfeld modules defined by {self._morphism}' # Somehow required for the class definition diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index 1901a07d371..62a81dc3364 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -20,7 +20,7 @@ #***************************************************************************** from sage.categories.action import Action - +from sage.misc.latex import latex from sage.rings.function_field.drinfeld_modules.drinfeld_module import DrinfeldModule @@ -89,11 +89,41 @@ def _act_(self, pol, x): return self._drinfeld_module(pol)(x) def _latex_(self): + r""" + Return a LaTeX representation of the action. + + OUTPUT: a string + + EXAMPLES: + + sage: Fq. = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(2) + sage: phi = DrinfeldModule(FqX, [z, 0, 0, 1]) + sage: action = phi.action() + sage: latex(action) + \text{Action{ }on{ }}\Bold{F}_{11^{2}}\text{{ }induced{ }by{ }}Drinfeld module defined by X |--> t^3 + z over Finite Field in z of size 11^2 + """ return f'\\text{{Action{{ }}on{{ }}}}' \ f'{latex(self._drinfeld_module.base_ring())}\\text{{{{ }}' \ f'induced{{ }}by{{ }}}}{self._drinfeld_module}' def _repr_(self): + r""" + Return a string representation of the action. + + OUTPUT: a string + + EXAMPLES: + + sage: Fq. = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(2) + sage: phi = DrinfeldModule(FqX, [z, 0, 0, 1]) + sage: action = phi.action() + sage: action + Action on Finite Field in z of size 11^2 induced by Drinfeld module defined by X |--> t^3 + z over Finite Field in z of size 11^2 + """ return f'Action on {self._drinfeld_module.base_ring()} induced by ' \ f'{self._drinfeld_module}' diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 11f30b7f02c..438d223f9e1 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -562,12 +562,42 @@ def _check_rank_two(self): raise NotImplementedError('rank must be 2') def _latex_(self): + r""" + Return a LaTeX representation of the Drinfeld module. + + OUTPUT: a string + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: latex(phi) + \text{Drinfeld{ }module{ }defined{ }by{ }} X \mapsto z_{12}^{5} t^{2} + z_{12}^{3} t + 2 z_{12}^{11} + 2 z_{12}^{10} + z_{12}^{9} + 3 z_{12}^{8} + z_{12}^{7} + 2 z_{12}^{5} + 2 z_{12}^{4} + 3 z_{12}^{3} + z_{12}^{2} + 2 z_{12}\text{{ }over{ }}\Bold{F}_{5^{12}} + """ return f'\\text{{Drinfeld{{ }}module{{ }}defined{{ }}by{{ }}}} ' \ f'{latex(self._function_ring.gen())} '\ f'\\mapsto {latex(self._gen)}' \ f'\\text{{{{ }}over{{ }}}}{latex(self._base_ring)}' def _repr_(self): + r""" + Return a string representation of the Drinfeld module. + + OUTPUT: a string + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi + Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 + """ return f'Drinfeld module defined by {self._function_ring.gen()} ' \ f'|--> {self._gen} over {self._base_ring}' diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index 7229df993a1..a5c2fd67df0 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -131,11 +131,45 @@ def __init__(self, X, Y, category=None, check=True): super().__init__(X, Y, category=category, base=base, check=check) def _latex_(self): + r""" + Return a LaTeX representation of the homset. + + OUTPUT: a string + + EXAMPLES: + + sage: Fq = GF(27) + sage: FqX. = Fq[] + sage: K. = Fq.extension(2) + sage: phi = DrinfeldModule(FqX, [z6, z6, 2]) + sage: psi = DrinfeldModule(FqX, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) + sage: hom = Hom(phi, psi) + sage: latex(hom) + \text{Set{ }of{ }Drinfeld{ }module{ }morphisms{ }from}\text{Drinfeld{ }module{ }defined{ }by{ }} X \mapsto 2 t^{2} + z_{6} t + z_{6}\text{{ }over{ }}\Bold{F}_{3^{6}}\text{{ }to{ }}Drinfeld module defined by X |--> 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 over Finite Field in z6 of size 3^6 + """ return f'\\text{{Set{{ }}of{{ }}Drinfeld{{ }}module{{ }}morphisms' \ f'{{ }}from}}{latex(self.domain())}\\text{{{{ }}to{{ }}}}' \ f'{self.codomain()}' def _repr_(self): + r""" + Return a string representation of the homset. + + OUTPUT: a string + + EXAMPLES: + + sage: Fq = GF(27) + sage: FqX. = Fq[] + sage: K. = Fq.extension(2) + sage: phi = DrinfeldModule(FqX, [z6, z6, 2]) + sage: psi = DrinfeldModule(FqX, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) + sage: hom = Hom(phi, psi) + sage: hom + Set of Drinfeld module morphisms: + From: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 + To: Drinfeld module defined by X |--> 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 over Finite Field in z6 of size 3^6 + """ return f'Set of Drinfeld module morphisms:\n' \ f' From: {self.domain()}\n' \ f' To: {self.codomain()}' diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 80625539d7d..61ad14914d1 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -139,6 +139,27 @@ def __init__(self, parent, ore_pol): self._ore_polynomial = ore_pol def _latex_(self): + r""" + Return a LaTeX representation of the morphism. + + OUTPUT: a string + + EXAMPLES: + sage: Fq = GF(2) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) + sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) + sage: t = phi.ore_variable() + sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) + sage: latex(morphism) + \begin{array}{l} + \text{Drinfeld{ }module{ }morphism:}\\ + \text{{ }{ }From:{ }}\text{Drinfeld{ }module{ }defined{ }by{ }} X \mapsto t^{2} + t + z_{6}\text{{ }over{ }}\Bold{F}_{2^{6}}}\\ + \text{{ }{ }To:{ }}{ }{ }\text{Drinfeld{ }module{ }defined{ }by{ }} X \mapsto t^{2} + \left(z_{6}^{4} + z_{6}^{2} + 1\right) t + z_{6}\text{{ }over{ }}\Bold{F}_{2^{6}}\\ + \text{{ }{ }Defn:{ }}t + z_{6}^{5} + z_{6}^{2} + 1 + \end{array} + """ return f'\\begin{{array}}{{l}}\n' \ f'\\text{{Drinfeld{{ }}module{{ }}morphism:}}\\\\\n' \ f'\\text{{{{ }}{{ }}From:{{ }}}}{latex(self._domain)}}}\\\\\n' \ @@ -147,6 +168,25 @@ def _latex_(self): f'\\end{{array}}' def _repr_(self): + r""" + Return a string representation of the morphism. + + OUTPUT: a string + + EXAMPLES: + sage: Fq = GF(2) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) + sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) + sage: t = phi.ore_variable() + sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) + sage: morphism + Drinfeld Module morphism: + From: Drinfeld module defined by X |--> t^2 + t + z6 over Finite Field in z6 of size 2^6 + To: Drinfeld module defined by X |--> t^2 + (z6^4 + z6^2 + 1)*t + z6 over Finite Field in z6 of size 2^6 + Defn: t + z6^5 + z6^2 + 1 + """ return f'Drinfeld Module morphism:\n' \ f' From: {self._domain}\n' \ f' To: {self._codomain}\n' \ From 83c728ebf5fb752f5e36cc2693ac1f1ff37636f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 22 Aug 2022 17:16:52 +0200 Subject: [PATCH 100/751] Rename j method to j_invariant in DrinfeldModule See https://trac.sagemath.org/ticket/33713#comment:90. --- .../drinfeld_modules/drinfeld_module.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 438d223f9e1..c3fac7893f6 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -303,7 +303,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): As well as the j-invariant if the rank is two:: - sage: phi.j() # j-invariant + sage: phi.j_invariant() # j-invariant 1 .. RUBRIC:: Morphisms, isogenies @@ -957,7 +957,7 @@ def is_finite(self): from sage.rings.function_field.drinfeld_modules.finite_drinfeld_module import FiniteDrinfeldModule return isinstance(self, FiniteDrinfeldModule) - def j(self): + def j_invariant(self): r""" Return the j-invariant of the Drinfeld module; only the rank two case has been implemented, a NotImplementedError is raised if @@ -980,19 +980,19 @@ def j(self): sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: phi.j() + sage: phi.j_invariant() z12^10 + 4*z12^9 + 3*z12^8 + 2*z12^7 + 3*z12^6 + z12^5 + z12^3 + 4*z12^2 + z12 + 2 sage: psi = DrinfeldModule(FqX, [p_root, 1, 1]) - sage: psi.j() + sage: psi.j_invariant() 1 sage: rho = DrinfeldModule(FqX, [p_root, 0, 1]) - sage: rho.j() + sage: rho.j_invariant() 0 The rank must be two:: sage: theta = DrinfeldModule(FqX, [p_root, 1, 0]) - sage: theta.j() + sage: theta.j_invariant() Traceback (most recent call last): ... NotImplementedError: rank must be 2 From 53088a9d7f981d6bd5dba9fa60405c975de583a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 22 Aug 2022 17:18:14 +0200 Subject: [PATCH 101/751] Add various docstrings in Drinfeld module classes Some methods were not properly documented; this is solved. --- .../function_field/drinfeld_modules/action.py | 27 ++++++ .../drinfeld_modules/drinfeld_module.py | 28 ++++++ .../function_field/drinfeld_modules/homset.py | 90 +++++++++++++++++++ 3 files changed, 145 insertions(+) diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index 62a81dc3364..be0b3ecd51c 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -82,6 +82,33 @@ def __init__(self, drinfeld_module): drinfeld_module.base_ring()) def _act_(self, pol, x): + r""" + Return ``pol * x``, where ``*`` is the action. + + INPUT: + + - ``pol`` -- a polynomial in the function ring of the Drinfeld + module + - ``x`` -- an element in the base ring of the Drinfeld module + + OUTPUT: an element in the base ring of the Drinfeld module. + + EXAMPLES: + + sage: Fq. = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(2) + sage: phi = DrinfeldModule(FqX, [z, 0, 0, 1]) + sage: action = phi.action() + sage: P = X + 1 + sage: a = z + sage: action(P, a) + 4*z + 2 + sage: action(0, K.random_element()) + 0 + sage: action(FqX.random_element(), 0) + 0 + """ if pol not in self._drinfeld_module.function_ring(): raise TypeError('first input must be in the function ring') if x not in self._drinfeld_module.base_ring(): diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index c3fac7893f6..2b82e8b8edd 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -602,6 +602,34 @@ def _repr_(self): f'|--> {self._gen} over {self._base_ring}' def action(self): + r""" + Return the action object that represents the action on the base that is + induced by the Drinfeld module. + + OUTPUT: a Drinfeld module action object + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: action = phi.action() + sage: action + Action on Finite Field in z12 of size 5^12 induced by Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 + + The action on elements is computed as follows:: + + sage: P = X^2 + X + 1 + sage: a = z12 + 1 + sage: action(P, a) + 3*z12^11 + 2*z12^10 + 3*z12^9 + 3*z12^7 + 4*z12^5 + z12^4 + z12^3 + 2*z12 + 1 + sage: action(0, a) + 0 + sage: action(P, 0) + 0 + """ from sage.rings.function_field.drinfeld_modules.action import DrinfeldModuleAction return DrinfeldModuleAction(self) diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index a5c2fd67df0..680defe2002 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -175,6 +175,57 @@ def _repr_(self): f' To: {self.codomain()}' def __contains__(self, x): + r""" + Implement the ``in`` operator for the homset; return ``True`` if + the input defines a morphism in the homset, return ``False`` + otherwise. + + INPUT: + + - ``x`` -- an Ore polynomial or a Drinfeld module morphism + + OUTPUT: a boolean + + EXAMPLES: + + In the next examples, the input is an Ore polynomial:: + + sage: Fq = GF(27) + sage: FqX. = Fq[] + sage: K. = Fq.extension(2) + sage: phi = DrinfeldModule(FqX, [z6, z6, 2]) + sage: psi = DrinfeldModule(FqX, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) + sage: hom = Hom(phi, psi) + sage: end = End(phi) + sage: t = phi.ore_variable() + + sage: 1 in hom + False + sage: t^6 in hom + False + sage: t + 1 in hom + True + sage: 1 in end + True + sage: t^6 in end + True + sage: t + 1 in end + False + + Whereas the input is now a Drinfeld module morphism:: + + sage: isogeny = hom(t + 1) + sage: isogeny in hom + True + sage: end(0) in end + True + sage: identity_morphism = end(1) + sage: identity_morphism in hom + False + sage: frobenius_endomorphism = phi.frobenius_endomorphism() + sage: frobenius_endomorphism in hom + False + """ try: x = self(x) return True @@ -182,6 +233,45 @@ def __contains__(self, x): return False def _element_constructor_(self, *args, **kwds): + r""" + Return a Drinfeld module morphism defined by the input, which is + an Ore polynomial. + + INPUT: an Ore polynomial + + OUTPUT: a Drinfeld module morphism + + EXAMPLES: + + sage: Fq = GF(27) + sage: FqX. = Fq[] + sage: K. = Fq.extension(2) + sage: phi = DrinfeldModule(FqX, [z6, z6, 2]) + sage: psi = DrinfeldModule(FqX, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) + sage: hom = Hom(phi, psi) + sage: end = End(phi) + sage: t = phi.ore_variable() + sage: identity_morphism = end(1) + sage: identity_morphism + Drinfeld Module morphism: + From: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 + To: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 + Defn: 1 + + sage: frobenius_endomorphism = end(t^6) + sage: frobenius_endomorphism + Drinfeld Module morphism: + From: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 + To: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 + Defn: t^6 + + sage: isogeny = hom(t + 1) + sage: isogeny + Drinfeld Module morphism: + From: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 + To: Drinfeld module defined by X |--> 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 over Finite Field in z6 of size 3^6 + Defn: t + 1 + """ # NOTE: This used to be self.element_class(self, ...), but this # would call __init__ instead of __classcall_private__. This # seems to work, but I don't know what I'm doing. From 261ab62cdd20badc99fbcb1ddf59bfcf56073ed0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 22 Aug 2022 17:19:09 +0200 Subject: [PATCH 102/751] Include final comments (87-90) from Ticket I added (almost all) suggestions from comments 87-91 from ticket https://trac.sagemath.org/ticket/33713. Some of the suggestions were already introduced in previous commits. --- .../function_field/drinfeld_modules/action.py | 2 + .../drinfeld_modules/drinfeld_module.py | 63 +++++++++++-------- .../function_field/drinfeld_modules/homset.py | 1 - 3 files changed, 39 insertions(+), 27 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index be0b3ecd51c..05999b7ea96 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -160,6 +160,8 @@ def drinfeld_module(self): OUTPUT: a Drinfeld module + EXAMPLES: + sage: Fq. = GF(11) sage: FqX. = Fq[] sage: K. = Fq.extension(2) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 2b82e8b8edd..5e2232398e1 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -60,9 +60,10 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): We say that `\Fq[X]` is the *function ring of `\phi`*; `K` is the *base ring of `\phi`*, or simply its base or base field; `\Fq[X]` is - the *function ring of*; *K\{\tau\}* is the *Ore polynomial ring*; - `t` is the *Ore variable*. The *generator of `\phi`* is `\phi_X`, - its *constant coefficient* is the constant coefficient of `\phi_X`. + the *function ring of `\phi`*; *K\{\tau\}* is the *Ore polynomial + ring of `\phi`*; `t` is the *Ore variable of `\phi`*. The *generator of `\phi`* is + `\phi_X`, its *constant coefficient* is the constant coefficient of + `\phi_X`. The Drinfeld module `\phi` is uniquely determined by the image `\phi_X` of `X`. This Ore polynomial is an input of the class @@ -89,9 +90,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): .. RUBRIC:: Construction and input - A Drinfeld module object (class - :class:`sage.rings.function_field.drinfeld_module.drinfeld_module.DrinfeldModule`) - is constructed as follows:: + A Drinfeld module object is constructed as follows:: sage: Fq. = GF(3^2) sage: FqX. = Fq[] @@ -105,7 +104,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): also use regular Ore polynomials:: sage: ore_polring = phi.ore_polring() - sage: t = phi.ore_variable() # Is ore_polring.gen() + sage: t = phi.ore_variable() # same as ore_polring.gen() sage: psi_X = z + t^3 sage: psi = DrinfeldModule(FqX, psi_X) sage: psi @@ -113,9 +112,6 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: psi(X) == psi_X True - Naturally, the input is checked, and exceptions are raised when the - input is invalid. - The generator must have positive degree:: sage: DrinfeldModule(FqX, [z]) @@ -230,6 +226,14 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: phi.is_finite() True + It is possible to change the base ring:: + + sage: L = K.extension(2) + sage: phi_rebased = phi.change_ring(L) + sage: Ltau = phi_rebased.ore_polring() + sage: Ltau(phi(X)) == phi_rebased(X) + True + .. RUBRIC:: The category of Drinfeld modules Drinfeld modules have their own category (see class @@ -313,8 +317,8 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): every `a \in \Fq[X]`. In our case, this is equivalent to verifying `f \phi_X = \psi_X f`. An *isogeny* is a non-zero morphism. - Use the ``in`` syntax to test if an Ore polynomial defines an - isogeny:: + Use the ``in`` syntax to test if an Ore polynomial defines a + morphism:: sage: phi(X) in Hom(phi, phi) True @@ -405,16 +409,17 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): .. RUBRIC:: The action of a Drinfeld module An `\Fq[X]`-Drinfeld module `\phi` notoriously makes any field - extension `L/K` a left `\Fq[X]`-module with the law defined by - `(P(X), a) \mapsto \phi_P(a)`, where `a \in L`. The method - :meth:`action` returns an ``Action`` object representing the - Drinfeld module action; in this implementation, `K = L`. + extension `L/K` a left `\Fq[X]`-module. Let `x \in L`, let `P \in + \Fq[X]`; the action is defined as `(P, a) \mapsto \phi_P(a)`, where + `\phi_P(a)`. The method :meth:`action` returns an ``Action`` object + representing the Drinfeld module action; in this implementation, `K + = L`. sage: action = phi.action() sage: action Action on Finite Field in z of size 3^12 induced by Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 - The action is computed as follows:: + The action on elements is computed as follows:: sage: P = X + 1 sage: a = z @@ -426,6 +431,13 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: action(FqX.random_element(), 0) 0 + To act on a field larger than `K`, one can change the ring of the + Drinfeld module, then create the action:: + + sage: extended_action = phi.change_ring(K.extension(5)).action() + sage: extended_action + Action on Finite Field in z60 of size 3^60 induced by Drinfeld module defined by X |--> t^2 + t + 2*z60^59 + z60^56 + 2*z60^55 + 2*z60^54 + 2*z60^53 + z60^49 + z60^48 + z60^47 + 2*z60^45 + z60^44 + 2*z60^41 + 2*z60^40 + 2*z60^39 + 2*z60^37 + 2*z60^36 + z60^34 + z60^33 + z60^32 + 2*z60^31 + 2*z60^30 + 2*z60^27 + 2*z60^25 + z60^23 + z60^22 + z60^21 + 2*z60^20 + z60^19 + z60^18 + z60^17 + z60^16 + z60^15 + 2*z60^14 + z60^12 + 2*z60^11 + 2*z60^10 + z60^8 + z60^6 + 2*z60^5 + z60^4 + z60^3 + z60 + 1 over Finite Field in z60 of size 3^60 + .. RUBRIC:: Inversion of the Drinfeld module Given an Ore polynomial that equals `\phi_a` for some `a \in @@ -480,7 +492,8 @@ def __classcall_private__(cls, function_ring, gen, name='t'): category = DrinfeldModules(gamma, name=name) # Check gen as Ore polynomial - if ore_polring not in (None, category.ore_polring()): + if ore_polring is not None and \ + ore_polring != category.ore_polring(): raise ValueError(f'generator must lie in {category.ore_polring()}') ore_polring = category.ore_polring() # Sanity cast gen = ore_polring(gen) @@ -491,8 +504,7 @@ def __classcall_private__(cls, function_ring, gen, name='t'): if ore_polring_base.is_finite(): from sage.rings.function_field.drinfeld_modules.finite_drinfeld_module import FiniteDrinfeldModule return FiniteDrinfeldModule(gen, category) - else: - return cls.__classcall__(cls, gen, category) + return cls.__classcall__(cls, gen, category) def __init__(self, gen, category): super().__init__(category=category) @@ -833,8 +845,8 @@ def gen(self): Return the generator of the Drinfeld module, i.e. `\phi_X`. This method makes sense because, in our case, the function ring - `\Fq[X]`, which is `\Fq`-generated by a single element element, - whose image characterizes the Drinfeld module. + `\Fq[X]`, which is `\Fq`-generated by a single element, whose + image characterizes the Drinfeld module. OUTPUT: an Ore polynomial @@ -872,7 +884,7 @@ def height(self): def invert(self, ore_pol): r""" - Return the pre-image of the input under the Drinfeld module; + Return the preimage of the input under the Drinfeld module; raise an exception if the input is not in the image of the Drinfeld module. @@ -963,8 +975,7 @@ def invert(self, ore_pol): def is_finite(self): r""" - Return ``True`` if the Drinfeld module is finite; return - ``False`` otherwise. + Return ``True`` whether the Drinfeld module is finite. OUTPUT: a boolean @@ -1194,7 +1205,7 @@ def velu(self, isog): ALGORITHM: The input defines an isogeny if only if: - 1. The degree of the characteristic devides the height + 1. The degree of the characteristic divides the height of the input. (The height of an Ore polynomial `P(t)` is the maximum `n` such that `t^n` right-divides `P(t)`.) diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index 680defe2002..8ec98e7562f 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -62,7 +62,6 @@ class DrinfeldModuleHomset(Homset): sage: end is Hom(phi, phi) True - One can create morphism objects by calling the homset:: sage: t = phi.ore_variable() From c6aaebdedd3a65cf0ba352bba0c713711ca3458d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 22 Aug 2022 19:38:39 +0200 Subject: [PATCH 103/751] Add coefficients methods in DrinfeldModule I created the DrinfeldModule methods: - coefficients, - coefficient, - __getitem__. The code is tested and I added documentation in the main docstring. See https://trac.sagemath.org/ticket/33713#comment:89. --- .../drinfeld_modules/drinfeld_module.py | 136 +++++++++++++++--- 1 file changed, 120 insertions(+), 16 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 5e2232398e1..0822d03fe44 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -259,16 +259,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): suggests, the morphism `\gamma` uniquely determines the category of a Drinfeld module. - .. RUBRIC:: Basic methods - - For a polynomial `a \in \Fq[X]`, compute `\phi_a` by calling `phi`:: - - sage: phi(X) # phi_X - t^2 + t + z - sage: phi(X^3 + X + 1) # phi_X^3 +X + 1 - t^6 + (z^11 + z^9 + 2*z^6 + 2*z^4 + 2*z + 1)*t^4 + (2*z^11 + 2*z^10 + z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^3)*t^3 + (2*z^11 + z^10 + z^9 + 2*z^7 + 2*z^6 + z^5 + z^4 + 2*z^3 + 2*z + 2)*t^2 + (2*z^11 + 2*z^8 + 2*z^6 + z^5 + z^4 + 2*z^2)*t + z^3 + z + 1 - sage: phi(1) # phi_1 - 1 + .. RUBRIC:: Getters and basic properties One can retrieve basic properties:: @@ -298,6 +289,8 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): To: Ore Polynomial Ring in t over Finite Field in z of size 3^12 twisted by z |--> z^(3^2) Defn: X |--> t^2 + t + z + .. RUBRIC:: Height, rank and j-invariant + One can compute the rank and height:: sage: phi.rank() @@ -310,6 +303,36 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: phi.j_invariant() # j-invariant 1 + .. RUBRIC:: The generator of a Drinfeld module + + For a polynomial `a \in \Fq[X]`, compute `\phi_a` by calling `phi`:: + + sage: phi(X) # phi_X + t^2 + t + z + sage: phi(X^3 + X + 1) # phi_X^3 +X + 1 + t^6 + (z^11 + z^9 + 2*z^6 + 2*z^4 + 2*z + 1)*t^4 + (2*z^11 + 2*z^10 + z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^3)*t^3 + (2*z^11 + z^10 + z^9 + 2*z^7 + 2*z^6 + z^5 + z^4 + 2*z^3 + 2*z + 2)*t^2 + (2*z^11 + 2*z^8 + 2*z^6 + z^5 + z^4 + 2*z^2)*t + z^3 + z + 1 + sage: phi(1) # phi_1 + 1 + + This is especially useful to quickly retrive `\phi_X`, the + generator. Furthermore, a Drinfeld `\Fq[X]`-module can be seen as an + Ore polynomial with positive degree and constant coefficient + `\gamma(X)`. This analogy is the motivation for the following + methods:: + + sage: phi.coefficients() + [z, 1, 1] + + sage: phi.coefficient(1) + 1 + sage: phi.coefficient(1) + 1 + + The ``[...]`` was introduced as a shortcut to ``phi(X)[...]``:: + + sage: phi[1] + 1 + .. RUBRIC:: Morphisms, isogenies A *morphism of Drinfeld modules `\phi \to \psi`* is an Ore @@ -530,6 +553,12 @@ def __call__(self, a): return self._morphism(a) + def __getitem__(self, n): + r""" + See method :meth:`coefficient`. + """ + return self.coefficient(n) + def _Hom_(self, other, category): r""" Return ``DrinfeldModuleHomset(self, other, category)``. @@ -812,13 +841,88 @@ def constant_coefficient(self): ... ValueError: constant coefficient must be a root of the characteristic - One can also retrieve the constant coefficient using - ``phi(X)[0]`:: + One can also retrieve the constant coefficient using ``phi[0]`:: + + sage: phi.constant_coefficient() == phi[0] + True + """ + return self[0] + + def coefficient(self, n): + r""" + Return the n-th coefficient of the generator. + + INPUT: + + - ``n`` -- a non-negative integer + + OUTPUT: an element in the base ring + + EXAMPLES: - sage: phi.constant_coefficient() == phi(X)[0] + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi.coefficient(0) + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi.coefficient(0) == p_root True + sage: phi.coefficient(1) + z12^3 + sage: phi.coefficient(2) + z12^5 + sage: phi.coefficient(5) + Traceback (most recent call last): + ... + ValueError: input must be >= 0 and <= rank + """ + if not isinstance(n, Integer) and not isinstance(n, int): + raise TypeError('input must be an integer') + if not 0 <= n <= self.rank(): + raise ValueError('input must be >= 0 and <= rank') + return self.coefficients(sparse=False)[n] + + def coefficients(self, sparse=True): + r""" + Return the coefficients of the generator, as a list. + + If the the flag ``sparse`` is ``True`` (default), only return the + non-zero coefficients; otherwise, return all of them. + + INPUT: + - ``sparse`` -- a boolean + + OUTPUT: a list of elements in the base ring + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi.coefficients() + [2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12, + z12^3, + z12^5] + + Careful, the method only returns the non-zero coefficients, + unless otherwise specified:: + + sage: rho = DrinfeldModule(FqX, [p_root, 0, 0, 0, 1]) + sage: rho.coefficients() + [2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12, + 1] + sage: rho.coefficients(sparse=False) + [2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12, + 0, + 0, + 0, + 1] """ - return self.gen()[0] + return self._gen.coefficients(sparse=sparse) def function_ring(self): r""" @@ -1037,8 +1141,8 @@ def j_invariant(self): NotImplementedError: rank must be 2 """ self._check_rank_two() - g = self._gen[1] - delta = self._gen[2] + g = self[1] + delta = self[2] q = self._Fq.order() return (g**(q+1)) / delta From 529f5ec6b7757a7451d0dfeeaf51a910a9650dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 23 Aug 2022 14:25:28 +0200 Subject: [PATCH 104/751] Use Fq[X] notation as little as possible in Drinfeld modules classes (comment 96) See https://trac.sagemath.org/ticket/33713#comment:96. The suggestion is to use as little notations like `\Fq[X]` as possible, as different people use different variables. What I did is that I kept the same notations in the main docstring of each class, as I consider notations to be global notations in these giant docstrings. However, I removed them in the method docstrings. I may have forgot some modifications. Also feel free to suggest enhancements on those changes, as they were quickly made. --- src/sage/categories/drinfeld_modules.py | 23 ++-- .../function_field/drinfeld_modules/action.py | 16 ++- .../drinfeld_modules/drinfeld_module.py | 122 ++++++++++-------- .../finite_drinfeld_module.py | 79 +++++++----- .../drinfeld_modules/morphism.py | 16 +-- 5 files changed, 142 insertions(+), 114 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index e2f7951d669..4a7c4e6b155 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -31,10 +31,11 @@ class DrinfeldModules(CategoryWithParameters): r""" This class represents the category of Drinfeld modules on a given - `\Fq[X]`-field `K`. + base. - The `\Fq[X]`-field structure on `K` is given by a ring morphism - `\gamma: \Fq[X] \to K`. + Let `\phi` be a Drinfeld module in the present category. We denote + its function ring `\Fq[X]` and its base ring `K`. The `\Fq[X]`-field + structure on `K` is given by a morphism `\gamma` We say that `\Fq[X]` is the *function ring of the category*; `K` is the *base of the category*, or simply its base ring or base field; `\Fq[X]` is @@ -43,7 +44,11 @@ class DrinfeldModules(CategoryWithParameters): `t` is the *Ore variable of the category*. The *constant coefficient of the category* is `\gamma(X)`. - INPUT: a ring morphism `\Fq[X] \to K` + .. NOTE:: + + These notations will be used throughout this docstring. + + INPUT: a ring morphism from the function ring to the base ring EXAMPLES: @@ -86,7 +91,7 @@ class DrinfeldModules(CategoryWithParameters): sage: cat.morphism()(X) == cat.constant_coefficient() True - Similarly, the *`\Fq[X]`-characteristic* of the category is either + Similarly, the *function ring-characteristic* of the category is either `0` or the unique monic polynomial in `\Fq[X]` that generates `\mathrm{Ker}(\gamma)`:: @@ -302,9 +307,9 @@ def base(self): def characteristic(self): r""" - Return the `\Fq[X]`-characteristic of the category. + Return the function ring-characteristic of the category. - OUTPUT: `0` or a monic prime polynomial in `\Fq[X]` + OUTPUT: `0` or a monic prime polynomial in the function ring EXAMPLES: @@ -400,7 +405,7 @@ def ore_polring(self): r""" Return the Ore polynomial ring of the category. - OUTPUT: the Ore polynomial ring `K\{\tau\}` + OUTPUT: an Ore polynomial ring EXAMPLES: @@ -421,7 +426,7 @@ def ore_variable(self): r""" Return the Ore variable of the category. - OUTPUT: the generator of the Ore polynomial ring + OUTPUT: an Ore polynomial EXAMPLES: diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index 05999b7ea96..535474c3f57 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -26,12 +26,15 @@ class DrinfeldModuleAction(Action): r""" - This class represents the left `\Fq[X]`-module action induced by a - Drinfeld `\Fq[X]`-module defined over an `\Fq[X]`-field `K`. - Let `L/K` be a field extension, let `x \in L`, let `P \in \Fq[X]`; - the action is defined as `(P, a) \mapsto \phi_P(a)`, where - `\phi_P(a)`. In this implementation, `L` is `K`. + This class represents the module action induced by a Drinfeld + module. + + Let `\phi` be a Drinfeld module with function ring `\Fq[X]` and base + ring `K`, whose `\Fq[X]`-field structure is given by a morphism + `\gamma`. Let `L/K` be a field extension, let `x \in L`, let `a` be + a function ring element; the action is defined as `(a, x) \mapsto + \phi_a(x)`. In this implementation, `L` is `K`. The action is instanciated as follows. Note that the user should never explicitely instanciate the class `DrinfeldModuleAction`:: @@ -87,8 +90,7 @@ def _act_(self, pol, x): INPUT: - - ``pol`` -- a polynomial in the function ring of the Drinfeld - module + - ``pol`` -- a function ring element - ``x`` -- an element in the base ring of the Drinfeld module OUTPUT: an element in the base ring of the Drinfeld module. diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 0822d03fe44..08b1309de86 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -45,25 +45,31 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): equiped a ring morphism `\gamma: \Fq[X] \to K` --- the field `K` is said to be an *`\Fq[X]`-field*, and the monic polynomial that generates `\Ker(\gamma)` is called the *`\Fq[X]`-characteristic of - the `\Fq[X]`-field `K`* (this characteristic plays the role of the - characteristic of a function field). Let `K\{\tau\}` be the ring of - Ore polynomials with coefficients in `K` and Frobenius - variable `\tau: x \mapsto x^q`. A *Drinfeld `\Fq[X]`-module over the - `\Fq[X]`-field `K`* is a ring morphism `\phi: \Fq[X] \to K\{\tau\}` - such that: + the `\Fq[X]`-field `K`*. This characteristic plays the role of the + characteristic of a function field. + + Let `K\{\tau\}` be the ring of Ore polynomials with coefficients in + `K` and Frobenius variable `\tau: x \mapsto x^q`. A *Drinfeld + `\Fq[X]`-module over the `\Fq[X]`-field `K`* is a ring morphism + `\phi: \Fq[X] \to K\{\tau\}` such that: 1. The image of `\phi` contains non-constant Ore polynomials. - 2. For every `a \in \Fq[X]`, the constant coefficient `\phi(a)` - is `\gamma(a)`. + 2. For every element `a` in the function ring, the constant + coefficient `\phi(a)` is `\gamma(a)`. + + For `a` in the function ring, `\phi(a)` is denoted `\phi_a`. + + .. NOTE:: - For `a \in \Fq[X]`, `\phi(a)` is denoted `\phi_a`. + These notations will be used throughout this docstring. We say that `\Fq[X]` is the *function ring of `\phi`*; `K` is the - *base ring of `\phi`*, or simply its base or base field; `\Fq[X]` is - the *function ring of `\phi`*; *K\{\tau\}* is the *Ore polynomial - ring of `\phi`*; `t` is the *Ore variable of `\phi`*. The *generator of `\phi`* is - `\phi_X`, its *constant coefficient* is the constant coefficient of - `\phi_X`. + *base ring of `\phi`*, or simply its base or base field; *K\{\tau\}* + is the *Ore polynomial ring of `\phi`*; `t` is the *Ore variable of + `\phi`*. The *generator of `\phi`* is `\phi_X`, its *constant + coefficient* is the constant coefficient of `\phi_X`. The + `\Fq[X]`-characteristic of the base ring `K` can also be referred to + as its *function ring-characteristic*. The Drinfeld module `\phi` is uniquely determined by the image `\phi_X` of `X`. This Ore polynomial is an input of the class @@ -74,16 +80,17 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): .. NOTE:: - Drinfeld modules are defined in a larger setting, in which - `\Fq[X]` is replaced by a more general ring: the ring of - functions in `k` that are regular outside `\infty`, where `k` is - a function field over `\Fq` with transcendance degree `1` and - `\infty` is a fixed place of `k`. This is out of the scope of - this implementation. + Drinfeld modules are defined in a larger setting, in which the + polynomial ring `\Fq[X]` is replaced by a more general function + ring: the ring of functions in `k` that are regular outside + `\infty`, where `k` is a function field over `\Fq` with + transcendance degree `1` and `\infty` is a fixed place of `k`. + This is out of the scope of this implementation. INPUT: - - ``function_ring`` -- the polynomial ring `\Fq[X]` + - ``function_ring`` -- the polynomial ring with coefficients in the finite + field `\Fq` - ``gen`` -- the generator `\phi_X`, as a list of coefficients or an Ore polynomial - ``name`` (optional) the name of the Ore variable @@ -119,8 +126,9 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): ... ValueError: generator must have positive degree - The coefficients of the generator must live in some field `K` that - is the codomain of a morphism `\gamma` with domain `\Fq[X]`:: + The coefficients of the generator must live in some base field `K` + that is the codomain of a morphism `\gamma: \Fq[X] \to K`, where + `\Fq[X]` is the function ring:: sage: DrinfeldModule(FqX, [z, QQ(1)]) Traceback (most recent call last): @@ -146,7 +154,8 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: DrinfeldModule(FqX, [Fq(1), 1, 1]) Drinfeld module defined by X |--> t^2 + t + 1 over Finite Field in z2 of size 3^2 - The function ring must be an `\Fq[X]`:: + The function ring must be an univariate polynomial ring whose + coefficients lie in a finite field:: sage: DrinfeldModule(K, [z, 1, 1]) Traceback (most recent call last): @@ -161,7 +170,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): If you already defined a category of Drinfeld modules, you must ensure that the constant coefficient is a root of the - `\Fq[X]-characteristic of the category base:: + function ring-characteristic of the category base:: sage: cat = phi.category() sage: cat([1, 1, K(1)]) @@ -250,7 +259,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): False This category holds crucial information, like the - `\Fq[X]`-characteristic of `K`:: + function ring-characteristic of the base:: sage: char = phi.category().characteristic() @@ -305,7 +314,8 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): .. RUBRIC:: The generator of a Drinfeld module - For a polynomial `a \in \Fq[X]`, compute `\phi_a` by calling `phi`:: + For a `a` in the function ring, `\phi_a` is computed by calling + `phi`:: sage: phi(X) # phi_X t^2 + t + z @@ -314,11 +324,11 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: phi(1) # phi_1 1 - This is especially useful to quickly retrive `\phi_X`, the - generator. Furthermore, a Drinfeld `\Fq[X]`-module can be seen as an - Ore polynomial with positive degree and constant coefficient - `\gamma(X)`. This analogy is the motivation for the following - methods:: + This is especially useful to quickly retrive `\phi_X`, the generator + of the Drinfeld module. Furthermore, a Drinfeld `\Fq[X]`-module can + be seen as an Ore polynomial with positive degree and constant + coefficient `\gamma(X)`. This analogy is the motivation for the + following methods:: sage: phi.coefficients() [z, 1, 1] @@ -337,8 +347,9 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): A *morphism of Drinfeld modules `\phi \to \psi`* is an Ore polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for - every `a \in \Fq[X]`. In our case, this is equivalent to verifying - `f \phi_X = \psi_X f`. An *isogeny* is a non-zero morphism. + every `a` in the function ring. In our specific case, this is + equivalent to verifying `f \phi_X = \psi_X f`. An *isogeny* is a + non-zero morphism. Use the ``in`` syntax to test if an Ore polynomial defines a morphism:: @@ -432,9 +443,9 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): .. RUBRIC:: The action of a Drinfeld module An `\Fq[X]`-Drinfeld module `\phi` notoriously makes any field - extension `L/K` a left `\Fq[X]`-module. Let `x \in L`, let `P \in - \Fq[X]`; the action is defined as `(P, a) \mapsto \phi_P(a)`, where - `\phi_P(a)`. The method :meth:`action` returns an ``Action`` object + extension `L/K` a left `\Fq[X]`-module. Let `x \in L`, let `a` be in + the function ring; the action is defined as `(a, x) \mapsto + \phi_a(x)`. The method :meth:`action` returns an ``Action`` object representing the Drinfeld module action; in this implementation, `K = L`. @@ -463,8 +474,8 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): .. RUBRIC:: Inversion of the Drinfeld module - Given an Ore polynomial that equals `\phi_a` for some `a \in - \Fq[X]`, one can retrieve `a` (as a morphism, a Drinfeld + Given an Ore polynomial that equals `\phi_a` for some function ring + elelement `a`, one can retrieve `a` (as a morphism, a Drinfeld module is injective, see [Gos1998]_, cor. 4.5.2.):: sage: a = FqX.random_element() @@ -799,12 +810,8 @@ def change_ring(self, new_field, name=None): def constant_coefficient(self): r""" - Return the constant coefficient of the generator (`\phi_X`). + Return the constant coefficient of the generator. - From the definition of a Drinfeld module, the constant coefficient equals - `\gamma(X)`. Hence, it is a root of the `\Fq[X]`-characteristic - of the base ring. - OUTPUT: an element in the base ring EXAMPLES: @@ -817,7 +824,9 @@ def constant_coefficient(self): sage: phi.constant_coefficient() == p_root True - The constant coefficient equals `\gamma(X)`:: + Let `\Fq[X]` be the function ring, and let `\gamma` the morphism + defining the `\Fq[X]`-field structure of the base ring. The + constant coefficient equals `\gamma(X)`:: sage: cat = phi.category() sage: gamma = cat.morphism() @@ -928,7 +937,8 @@ def function_ring(self): r""" Return the function ring of the Drinfeld module. - In our case, the function ring is an `\Fq[X]`. + In our case, the function ring is an univariate polynomial ring + whose coefficients lie in a finite field `\Fq`. OUTPUT: a polynomial ring @@ -946,11 +956,13 @@ def function_ring(self): def gen(self): r""" - Return the generator of the Drinfeld module, i.e. `\phi_X`. + Return the generator of the Drinfeld module. + + Let `\phi` denote the Drinfeld module, and `\Fq[X]` be the + function ring. This method returns `\phi_X`. - This method makes sense because, in our case, the function ring - `\Fq[X]`, which is `\Fq`-generated by a single element, whose - image characterizes the Drinfeld module. + This method makes sense the function ring is `\Fq`-generated by + a single element, whose image characterizes the Drinfeld module. OUTPUT: an Ore polynomial @@ -997,7 +1009,7 @@ def invert(self, ore_pol): - ``ore_pol`` -- the Ore polynomial whose preimage we want to compute - OUTPUT: a polynomial + OUTPUT: an element in the function ring EXAMPLES: @@ -1109,9 +1121,8 @@ def j_invariant(self): Assume the rank is two. Write the generator `\phi_X = \gamma(X) + g\tau + \Delta\tau^2`. The j-invariant is defined by `\frac{g^{q+1}}{\Delta}`, `q` being the order of the base field - of the polynomial ring. In our case, this base field is always - finite, as we force the function ring to be of the form - `\Fq[X]`. + of the function ring. In our case, this base field is always + finite. OUTPUT: an element in the base ring if the rank is two; an exception is raised otherwise @@ -1271,8 +1282,7 @@ def rank(self): r""" Return the rank of the Drinfeld module. - When the function ring is a polynomial ring, the rank is the - degree of the generator. + In our case, the rank is the degree of the generator. OUTPUT: an integer diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 04080461170..c7cd5c6d2f5 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -35,6 +35,8 @@ class FiniteDrinfeldModule(DrinfeldModule): In this specific documentation, we only present the specifics of ``FiniteDrinfeldModle``. + .. RUBRIC:: Construction: + The user does not ever need to directly call ``FiniteDrinfeldModule``, as it is the (meta)class ``DrinfeldModule`` that is reponsible for instanciating @@ -51,7 +53,7 @@ class FiniteDrinfeldModule(DrinfeldModule): sage: isinstance(phi, FiniteDrinfeldModule) True - But, the user should never use ``FiniteDrinfeldModule`` to test if a + The user should never use ``FiniteDrinfeldModule`` to test if a Drinfeld module is finite, but rather the ``is_finite`` method:: sage: phi.is_finite() @@ -149,15 +151,20 @@ def frobenius_charpoly(self, var='T'): otherwise. Let `\Fq` be the base field of the function ring. The - *characteristic polynomial `\chi` of the Frobenius endomorphism* is - defined in [Gek1991]_. An important feature of this polynomial - is that it is a monic bivariate polynomial in `T` with - coefficients in `\Fq[X]`. Write `\chi = T^2 - A(X)T + B(X)`, let - `t^n` be the Ore polynomial that defines the Frobenius - endomorphism of `\phi`; by definition, `n` is the degree of the - base ring over `\Fq`. We have `\chi(t^n)(\phi(X)) = t^{2n} - - \phi_A t^n + \phi_B = 0`, with `\deg(A) \leq \frac{n}{2}` and - `\deg(B) = n`. + *characteristic polynomial `\chi` of the Frobenius endomorphism* + is defined in [Gek1991]_. An important feature of this + polynomial is that it is a monic univariate polynomial with + coefficients in the function ring. As in our case the function + ring is a univariate polynomial ring, it is customary to see the + characteristic polynomial of the Frobenius endomorphism as a + bivariate polynomial. + + Let `\chi = T^2 - A(X)T + B(X)` be the characteristic polynomial + of the Frobenius endomorphism, let `t^n` be the Ore polynomial + that defines the Frobenius endomorphism of `\phi`; by + definition, `n` is the degree of the base ring over `\Fq`. We + have `\chi(t^n)(\phi(X)) = t^{2n} - \phi_A t^n + \phi_B = 0`, + with `\deg(A) \leq \frac{n}{2}` and `\deg(B) = n`. Note that the *Frobenius trace* is defined as `A(X)` and the *Frobenius norm` is defined as `B(X)`. @@ -166,7 +173,8 @@ def frobenius_charpoly(self, var='T'): - ``var`` -- (optional) the name of the second variable - OUTPUT: a polynomial in `\Fq[X][T]` + OUTPUT: an univariate polynomial with coefficients in the + function ring EXAMPLES: @@ -189,7 +197,7 @@ def frobenius_charpoly(self, var='T'): sage: B (5*z3^2 + 2*z3)*X^2 + (4*z3^2 + 3*z3)*X + 5*z3^2 + 2*z3 - sage: n = 2 # Degree of the base ring over `\Fq` + sage: n = 2 # Degree of the base ring over Fq sage: A.degree() <= n/2 True sage: B.degree() == n @@ -221,14 +229,15 @@ def frobenius_norm(self): Return Frobenius norm of the Drinfeld module, if the rank is two; raise a NotImplementedError otherwise. - Write `\chi = T^2 - A(X)T + B(X) \in \Fq[X][T]` to be the - characteristic polynomial of the Frobenius endomorphism. The - *Frobenius norm* is defined as the polynomial `B(X) \in \Fq[X]`. + Let `\Fq[X]` be the function ring, write `\chi = T^2 - A(X)T + + B(X) \in \Fq[X][T]` for the characteristic polynomial of the + Frobenius endomorphism. The *Frobenius norm* is defined as the + polynomial `B(X) \in \Fq[X]`. Let `n` be the degree of the base ring over `\Fq`. Then the Frobenius norm has degree `n`. - OUTPUT: a polynomial in `\Fq[X]` + OUTPUT: an element in the function ring EXAMPLES: @@ -240,7 +249,7 @@ def frobenius_norm(self): sage: B (5*z3^2 + 2*z3)*X^2 + (4*z3^2 + 3*z3)*X + 5*z3^2 + 2*z3 - sage: n = 2 # Degree of the base ring over `\Fq` + sage: n = 2 # Degree of the base ring over Fq sage: B.degree() == n True @@ -268,14 +277,15 @@ def frobenius_trace(self): Return Frobenius norm of the Drinfeld module, if the rank is two; raise a NotImplementedError otherwise. - Write `\chi = T^2 - A(X)T + B(X) \in \Fq[X][T]` to be the - characteristic polynomial of the Frobenius endomorphism. The - *Frobenius norm* is defined as the polynomial `B(X) \in \Fq[X]`. + Let `\Fq[X]` be the function ring, write `\chi = T^2 - A(X)T + + B(X) \in \Fq[X][T]` for the characteristic polynomial of the + Frobenius endomorphism. The *Frobenius norm* is defined as the + polynomial `B(X) \in \Fq[X]`. Let `n` be the degree of the base ring over `\Fq`. Then the Frobenius trace has degree `\leq \frac{n}{2}`. - OUTPUT: a polynomial in `\Fq[X]` + OUTPUT: an element in the function ring ALGORITHM: @@ -301,7 +311,7 @@ def frobenius_trace(self): sage: A (4*z3^2 + 6*z3 + 3)*X + 3*z3^2 + z3 + 4 - sage: n = 2 # Degree of the base ring over `\Fq` + sage: n = 2 # Degree of the base ring over Fq sage: A.degree() <= n/2 True @@ -319,14 +329,17 @@ def frobenius_trace(self): def is_ordinary(self): r""" - Return True if the Drinfeld module is ordinary, return False - otherwise; raise a NotImplementedError if the rank is not two. + Return ``True`` whether the Drinfeld module is ordinary; raise a + NotImplementedError if the rank is not two. A rank two finite Drinfeld module is *ordinary* if and only if the `\Fq[X]-characteristic of the base ring does not devide the Frobenius trace. A *supersingular* rank two finite Drinfeld module is a Drinfeld module that is not ordinary. + A rnak two Drinfeld module is *ordinary* if and only if it is + note supersingular; see :meth:`is_supersingular`. + OUTPUT: a boolean EXAMPLES: @@ -355,13 +368,13 @@ def is_ordinary(self): def is_supersingular(self): r""" - Return True if the Drinfeld module is supersingular, return False - otherwise; raise a NotImplementedError if the rank is not two. + Return ``True`` whether the Drinfeld module is supersingular; raise a + NotImplementedError if the rank is not two. A rank two finite Drinfeld module is *supersingular* if and only - if the `\Fq[X]-characteristic of the base ring devides the - Frobenius trace. An *ordinary* rank two finite Drinfeld module - is a Drinfeld module that is not supersingular. + if the function field-characteristic of the base ring devides + the Frobenius trace. An *ordinary* rank two finite Drinfeld + module is a Drinfeld module that is not supersingular. OUTPUT: a boolean @@ -379,11 +392,11 @@ def is_supersingular(self): ALGORITHM: - Compute the Frobenius trace and test if the `\Fq[X]` - characteristic divides it. + Compute the Frobenius trace and test if the function + ring-characteristic divides it. - We could also test if the image of the - `\Fq[X]`-characteristic under the Drinfeld module is purely + We could also test if the image of the function + ring-characteristic under the Drinfeld module is purely inseparable; see [Gek1991]_, Proposition 4.1. """ self._check_rank_two() diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 61ad14914d1..67f7d5a1aba 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -32,8 +32,9 @@ class DrinfeldModuleMorphism(UniqueRepresentation, Element, r""" This class represents a Drinfeld module morphism. - Let `\phi,\psi` be two Drinfeld modules defined over the - `\Fq[X]`-field `K`. A *morphism of Drinfeld modules `\phi \to \psi`* + Let `\phi, \psi` be two Drinfeld modules with function ring `\Fq[X]` + and base ring `K`, whose `\Fq[X]`-field structure is given by a + morphism `\gamma`. A *morphism of Drinfeld modules `\phi \to \psi`* is an Ore polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for every `a \in \Fq[X]`. In our case, this is equivalent to verifying `f \phi_X = \psi_X f`. An *isogeny* is a non-zero @@ -234,7 +235,7 @@ def domain(self): def is_zero(self): r""" - Return the codomain of the morphism. + Return ``True`` whethere the morphism is the zero morphism. EXAMPLES: @@ -256,8 +257,7 @@ def is_zero(self): def is_endomorphism(self): r""" - Return True if the morphism is an endomorphism; return False - otherwise. + Return ``True`` whether the morphism is an endomorphism. EXAMPLES: @@ -287,8 +287,7 @@ def is_endomorphism(self): def is_isogeny(self): r""" - Return True if the morphism is an isogeny; return False - otherwise. + Return ``True`` whether the morphism is an isogeny. EXAMPLES: @@ -318,8 +317,7 @@ def is_isogeny(self): def is_isomorphism(self): r""" - Return True if the morphism is an isomorphism; return False - otherwise. + Return ``True`` whether the morphism is an isomorphism. EXAMPLES: From 8b890f4639cdf841a9e54ecea43be942b381c6ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 23 Aug 2022 15:50:12 +0200 Subject: [PATCH 105/751] Change an exception text in DrinfeldModules --- .../function_field/drinfeld_modules/drinfeld_module.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 08b1309de86..e2641335987 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -133,12 +133,12 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: DrinfeldModule(FqX, [z, QQ(1)]) Traceback (most recent call last): ... - ValueError: function ring base must coerce to base ring + ValueError: function ring base must coerce into base ring sage: DrinfeldModule(FqX, [1, QQ(1)]) Traceback (most recent call last): ... - ValueError: function ring base must coerce to base ring + ValueError: function ring base must coerce into base ring If the coefficients are regular integers, an exception is raised. One needs to manually cast them to the field of their choice:: @@ -146,7 +146,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: DrinfeldModule(FqX, [1, 1, 1]) Traceback (most recent call last): ... - ValueError: function ring base must coerce to base ring + ValueError: function ring base must coerce into base ring sage: DrinfeldModule(FqX, [K(1), 1, 1]) Drinfeld module defined by X |--> t^2 + t + 1 over Finite Field in z of size 3^12 @@ -517,7 +517,7 @@ def __classcall_private__(cls, function_ring, gen, name='t'): # The coefficients are in a base ring that has coercion from Fq: if not (hasattr(ore_polring_base, 'has_coerce_map_from') and \ ore_polring_base.has_coerce_map_from(function_ring.base_ring())): - raise ValueError('function ring base must coerce to base ring') + raise ValueError('function ring base must coerce into base ring') # Build the morphism that defines the category gamma = function_ring.hom([ore_polring_base(gen[0])]) From 3f542d8d72e398e7e6110402a656243ee04dda9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 23 Aug 2022 15:51:05 +0200 Subject: [PATCH 106/751] Check morphism is non zero in DrinfeldModules This is equivalent to asking the constant coefficient to be non zero. Goss asks the function-ring characteristic to be either 0 or prime, hence this change. --- src/sage/categories/drinfeld_modules.py | 3 +++ .../function_field/drinfeld_modules/drinfeld_module.py | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 4a7c4e6b155..7117c3c2835 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -176,6 +176,9 @@ def __init__(self, morphism, name='t'): self._base = K if not K.is_field(): raise TypeError('base must be a field') + # Check morphism is non zero + if gamma(X).is_zero(): + raise ValueError('the morphism must be non zero') # Build K{t} d = log(Fq.cardinality(), Fq.characteristic()) tau = K.frobenius_endomorphism(d) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index e2641335987..ac6011e9006 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -126,6 +126,13 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): ... ValueError: generator must have positive degree + The constant coefficient mudt be non zero:: + + sage: DrinfeldModule(FqX, [K(0), K(1)]) + Traceback (most recent call last): + ... + ValueError: the morphism must be non zero + The coefficients of the generator must live in some base field `K` that is the codomain of a morphism `\gamma: \Fq[X] \to K`, where `\Fq[X]` is the function ring:: From fd9126ca9b005b7f5aaec033cd767769d57b6e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 23 Aug 2022 16:32:19 +0200 Subject: [PATCH 107/751] Add various TESTS: in Drinfeld modules classes --- src/sage/categories/drinfeld_modules.py | 38 +++++++++- .../drinfeld_modules/drinfeld_module.py | 69 ++++++++++++++++++- 2 files changed, 103 insertions(+), 4 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 7117c3c2835..ca4336b58d0 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -50,7 +50,7 @@ class DrinfeldModules(CategoryWithParameters): INPUT: a ring morphism from the function ring to the base ring - EXAMPLES: + .. RUBRIC:: Construction Generally, Drinfeld modules objects are created before their category, and the category is retrieved as an attribute of the @@ -152,13 +152,46 @@ class DrinfeldModules(CategoryWithParameters): True sage: rho.category() is cat True + + TESTS: + + sage: Fq = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(4) + sage: from sage.categories.drinfeld_modules import DrinfeldModules + sage: gamma = Hom(FqX, K)(0) + sage: cat = DrinfeldModules(gamma) + Traceback (most recent call last): + ... + ValueError: the morphism must be non zero + + sage: gamma = Hom(FqX, FqX)(1) + sage: cat = DrinfeldModules(gamma) + Traceback (most recent call last): + ... + TypeError: base must be a field + + sage: gamma = 'I hate Rostropovitch' + sage: cat = DrinfeldModules(gamma) # known bug (blankline) + + Traceback (most recent call last): + ... + TypeError: input must be a ring morphism + + sage: ZZT. = ZZ[] + sage: gamma = Hom(ZZT, K)(1) + sage: cat = DrinfeldModules(gamma) # known bug (blankline) + + Traceback (most recent call last): + ... + TypeError: function ring base must be a finite field """ def __init__(self, morphism, name='t'): gamma = morphism # Check input is a ring Morphism if not isinstance(gamma, RingHomomorphism): - raise TypeError('category input must be a Ring morphism') + raise TypeError('input must be a Ring morphism') self._morphism = morphism self._function_ring = gamma.domain() # Check domain is Fq[X] @@ -246,7 +279,6 @@ def _latex_(self): sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: latex(cat) - sage: latex(cat) \text{Category{ }of{ }Drinfeld{ }modules{ }defined{ }by\begin{array}{l} \text{\texttt{Ring{ }morphism:}}\\ \text{\texttt{{ }{ }From:{ }Univariate{ }Polynomial{ }Ring{ }in{ }X{ }over{ }Finite{ }Field{ }of{ }size{ }11}}\\ diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index ac6011e9006..b152eaf5f16 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -488,6 +488,21 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: a = FqX.random_element() sage: phi.invert(phi(a)) == a True + + TESTS: + + sage: Fq = K = GF(2) + sage: FqX. = Fq[] + sage: phi = DrinfeldModule(FqX, [1, 1]) + Traceback (most recent call last): + ... + ValueError: function ring base must coerce into base ring + + sage: Fq = K = GF(2) + sage: FqX. = Fq[] + sage: phi = DrinfeldModule(FqX, [K(1), 1]) + sage: isinstance(phi.ore_polring(), OrePolynomialRing) + True """ @staticmethod @@ -567,6 +582,31 @@ def __call__(self, a): - ``a`` -- an element in the function ring OUTPUT: an element of the base ring + + TESTS: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + + sage: a = X^3 + 4*X + 2 + sage: phi(a) == phi(X)^3 + 4*phi(X) + 2 + True + sage: phi(a)[0] == p_root^3 + 4*p_root + 2 + True + + sage: phi(0) + 0 + sage: phi(1) + 1 + sage: phi(X) == phi._gen + True + + sage: a = FqX.random_element(5) + sage: phi(a)[0] == phi.category().morphism()(a) + True """ return self._morphism(a) @@ -574,6 +614,33 @@ def __call__(self, a): def __getitem__(self, n): r""" See method :meth:`coefficient`. + + TESTS: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi[0] == p_root + True + sage: phi[1] == z12^3 + True + sage: phi[2] == z12^5 + True + sage: phi[3] + Traceback (most recent call last): + ... + ValueError: input must be >= 0 and <= rank + sage: phi[-1] + Traceback (most recent call last): + ... + ValueError: input must be >= 0 and <= rank + sage: phi['I hate Dream Theater'] # known bug (blankline) + + Traceback (most recent call last): + ... + TypeErro: input must be an integer """ return self.coefficient(n) @@ -800,7 +867,7 @@ def change_ring(self, new_field, name=None): sage: phi_0.base_ring() is K0 True sage: phi.change_ring(K0).change_ring(K) # known bug - Traceback (most recent call last) + Traceback (most recent call last): ... TypeError: no coercion defined From a9152b7874836e39df5fe0f70b5e0c7009afc3cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 29 Aug 2022 13:58:43 +0200 Subject: [PATCH 108/751] Change validity test in DrinfeldModules method __call__ Before, the constant coefficient of the input was tested to be a root of the characteristic. I changed this test to the following: we check that the constant coefficient is the image (gamma(X)) of the morphism (gamma) that defines the category. --- src/sage/categories/drinfeld_modules.py | 9 ++++++--- .../function_field/drinfeld_modules/drinfeld_module.py | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index ca4336b58d0..bb54c1d8c14 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -140,7 +140,7 @@ class DrinfeldModules(CategoryWithParameters): sage: cat([z, 1]) Traceback (most recent call last): ... - ValueError: constant coefficient must be a root of the characteristic + ValueError: constant coefficient must be the generator of the morphism that defines the category It is also possible to create a random object in the category, with a given rank:: @@ -256,8 +256,11 @@ def _call_(self, gen): from sage.rings.function_field.drinfeld_modules.drinfeld_module import DrinfeldModule # If gen is not in the Ore polring, an exception is raised gen = self._ore_polring(gen) - if self.characteristic()(gen[0]) != 0: - raise ValueError('constant coefficient must be a root of the characteristic') + X = self._function_ring.gen() + gamma = self._morphism + if gen[0] != gamma(X): + raise ValueError('constant coefficient must be the generator ' \ + 'of the morphism that defines the category') return DrinfeldModule(self._function_ring, gen) # Somehow required for the class definition diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index b152eaf5f16..ff54ef4b656 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -183,7 +183,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: cat([1, 1, K(1)]) Traceback (most recent call last): ... - ValueError: constant coefficient must be a root of the characteristic + ValueError: constant coefficient must be the generator of the morphism that defines the category .. NOTE:: @@ -922,7 +922,7 @@ def constant_coefficient(self): sage: rho = cat(phi.constant_coefficient() + 1 + t^3) Traceback (most recent call last): ... - ValueError: constant coefficient must be a root of the characteristic + ValueError: constant coefficient must be the generator of the morphism that defines the category One can also retrieve the constant coefficient using ``phi[0]`:: From 52cb56719bdf0fd54e50424e394cee48ed19f316 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 29 Aug 2022 14:12:39 +0200 Subject: [PATCH 109/751] Remove method __getitem__ in DrinfeldModule After introducing this method a few days ago, I realize that this syntax is a conflict with the more traditional syntax phi[a] for the a-torsion of phi. --- .../drinfeld_modules/drinfeld_module.py | 49 ++----------------- 1 file changed, 3 insertions(+), 46 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index ff54ef4b656..28d88faa6a4 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -345,11 +345,6 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: phi.coefficient(1) 1 - The ``[...]`` was introduced as a shortcut to ``phi(X)[...]``:: - - sage: phi[1] - 1 - .. RUBRIC:: Morphisms, isogenies A *morphism of Drinfeld modules `\phi \to \psi`* is an Ore @@ -611,39 +606,6 @@ def __call__(self, a): return self._morphism(a) - def __getitem__(self, n): - r""" - See method :meth:`coefficient`. - - TESTS: - - sage: Fq = GF(25) - sage: FqX. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: phi[0] == p_root - True - sage: phi[1] == z12^3 - True - sage: phi[2] == z12^5 - True - sage: phi[3] - Traceback (most recent call last): - ... - ValueError: input must be >= 0 and <= rank - sage: phi[-1] - Traceback (most recent call last): - ... - ValueError: input must be >= 0 and <= rank - sage: phi['I hate Dream Theater'] # known bug (blankline) - - Traceback (most recent call last): - ... - TypeErro: input must be an integer - """ - return self.coefficient(n) - def _Hom_(self, other, category): r""" Return ``DrinfeldModuleHomset(self, other, category)``. @@ -923,13 +885,8 @@ def constant_coefficient(self): Traceback (most recent call last): ... ValueError: constant coefficient must be the generator of the morphism that defines the category - - One can also retrieve the constant coefficient using ``phi[0]`:: - - sage: phi.constant_coefficient() == phi[0] - True """ - return self[0] + return self.coefficient(0) def coefficient(self, n): r""" @@ -1226,8 +1183,8 @@ def j_invariant(self): NotImplementedError: rank must be 2 """ self._check_rank_two() - g = self[1] - delta = self[2] + g = self.coefficient(1) + delta = self.coefficient(2) q = self._Fq.order() return (g**(q+1)) / delta From 0f3d19ce271008ba521496bdf3db633831ca093a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 29 Aug 2022 15:00:57 +0200 Subject: [PATCH 110/751] Proofread docs in Drinfeld module classes --- src/sage/categories/drinfeld_modules.py | 36 ++- .../function_field/drinfeld_modules/action.py | 19 +- .../drinfeld_modules/drinfeld_module.py | 281 ++++++++---------- .../finite_drinfeld_module.py | 45 ++- .../function_field/drinfeld_modules/homset.py | 7 +- .../drinfeld_modules/morphism.py | 22 +- 6 files changed, 191 insertions(+), 219 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index bb54c1d8c14..f9d854de1d4 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -37,16 +37,22 @@ class DrinfeldModules(CategoryWithParameters): its function ring `\Fq[X]` and its base ring `K`. The `\Fq[X]`-field structure on `K` is given by a morphism `\gamma` - We say that `\Fq[X]` is the *function ring of the category*; `K` is the - *base of the category*, or simply its base ring or base field; `\Fq[X]` is - the *function ring of the category*; *K\{\tau\}* is the *Ore - polynomial ring of the category*; - `t` is the *Ore variable of the category*. The *constant coefficient - of the category* is `\gamma(X)`. + .. NOTE:: + + These notations will be used throughout this documentation. + + We say that `\Fq[X]` is the *function ring of the category*; `K` is + the *base of the category* (or simply its *base ring* or *base + field*); `\Fq[X]` is the *function ring of the category*; + *K\{\tau\}* is the *Ore polynomial ring of the category*; `t` is the + *Ore variable of the category*. The *constant coefficient of the + category* is `\gamma(X)`. The `\Fq[X]`-characteristic of the base + ring `K` can also be referred to as its *function + ring-characteristic*. .. NOTE:: - These notations will be used throughout this docstring. + The base is always a field. INPUT: a ring morphism from the function ring to the base ring @@ -107,6 +113,8 @@ class DrinfeldModules(CategoryWithParameters): Finite Field in z of size 11^4 sage: cat.base() is K True + sage: cat.base() is phi.base_ring() + True And the *function ring* is the polynomial ring `\Fq[X]`:: @@ -114,6 +122,8 @@ class DrinfeldModules(CategoryWithParameters): Univariate Polynomial Ring in X over Finite Field of size 11 sage: cat.function_ring() is FqX True + sage: cat.function_ring() is phi.function_ring() + True And as expected, the *Ore polynomial ring* is that of the Drinfeld modules in the category: @@ -142,8 +152,8 @@ class DrinfeldModules(CategoryWithParameters): ... ValueError: constant coefficient must be the generator of the morphism that defines the category - It is also possible to create a random object in the category, with - a given rank:: + It is also possible to create a random object in the category. The + input is the desired rank:: sage: rho = cat.random_object(2) sage: rho # random @@ -230,8 +240,8 @@ def __init__(self, morphism, name='t'): def _call_(self, gen): r""" - Return a Drinfeld module object, in the category, whose - generator is the input. + Return a Drinfeld module object in the category whose generator + is the input. INPUT: the generator of the Drinfeld module, given as an Ore polynomial or a list of coefficients @@ -376,7 +386,7 @@ def constant_coefficient(self): r""" Return the constant coefficient of the category. - OUTPUT: an element in the base + OUTPUT: a base element EXAMPLES: @@ -397,7 +407,7 @@ def function_ring(self): r""" Return the function ring of the category. - OUTPUT: the ring `\Fq[X]` + OUTPUT: a univariate polynomial ring EXAMPLES: diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index 535474c3f57..0e5edfb74e6 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -26,7 +26,6 @@ class DrinfeldModuleAction(Action): r""" - This class represents the module action induced by a Drinfeld module. @@ -34,10 +33,14 @@ class DrinfeldModuleAction(Action): ring `K`, whose `\Fq[X]`-field structure is given by a morphism `\gamma`. Let `L/K` be a field extension, let `x \in L`, let `a` be a function ring element; the action is defined as `(a, x) \mapsto - \phi_a(x)`. In this implementation, `L` is `K`. + \phi_a(x)`. + + .. NOTE:: + + In this implementation, `L` is `K`. - The action is instanciated as follows. Note that the user should - never explicitely instanciate the class `DrinfeldModuleAction`:: + The action is instantiated as follows. Note that the user should + never explicitly instantiate the class `DrinfeldModuleAction`:: INPUT: a Drinfeld module @@ -86,14 +89,14 @@ def __init__(self, drinfeld_module): def _act_(self, pol, x): r""" - Return ``pol * x``, where ``*`` is the action. + Return the action of ``pol`` on ``x``. INPUT: - ``pol`` -- a function ring element - - ``x`` -- an element in the base ring of the Drinfeld module + - ``x`` -- a base ring element - OUTPUT: an element in the base ring of the Drinfeld module. + OUTPUT: an element in the base ring of the Drinfeld module EXAMPLES: @@ -158,7 +161,7 @@ def _repr_(self): def drinfeld_module(self): r""" - Return the Drinfeld module associated to the action. + Return the Drinfeld module defining to the action. OUTPUT: a Drinfeld module diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 28d88faa6a4..8e9df953a43 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -3,6 +3,7 @@ This module provides the class :class:`sage.rings.function_field.drinfeld_module.drinfeld_module.DrinfeldModule`. + For *finite* Drinfeld modules and their theory of complex multiplication, see class :class:`sage.rings.function_field.drinfeld_module.finite_drinfeld_module.DrinfeldModule`. @@ -23,35 +24,33 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from sage.rings.integer import Integer -from sage.structure.unique_representation import UniqueRepresentation -from sage.structure.category_object import CategoryObject - from sage.categories.drinfeld_modules import DrinfeldModules +from sage.matrix.constructor import Matrix +from sage.misc.latex import latex +from sage.modules.free_module_element import vector +from sage.rings.integer import Integer from sage.rings.polynomial.ore_polynomial_element import OrePolynomial from sage.rings.polynomial.ore_polynomial_ring import OrePolynomialRing from sage.rings.polynomial.polynomial_ring import PolynomialRing_general - -from sage.misc.latex import latex +from sage.structure.category_object import CategoryObject from sage.structure.sequence import Sequence -from sage.matrix.constructor import Matrix -from sage.modules.free_module_element import vector +from sage.structure.unique_representation import UniqueRepresentation + class DrinfeldModule(UniqueRepresentation, CategoryObject): r""" This class represents a Drinfeld module. - Let `\Fq` be a finite field with order `q`. Let `K` be a field - equiped a ring morphism `\gamma: \Fq[X] \to K` --- the field `K` is - said to be an *`\Fq[X]`-field*, and the monic polynomial that - generates `\Ker(\gamma)` is called the *`\Fq[X]`-characteristic of - the `\Fq[X]`-field `K`*. This characteristic plays the role of the - characteristic of a function field. + Let `\Fq` be a finite field with order `q` and let `K` be a field + equipped a ring morphism `\gamma: \Fq[X] \to K`. The field `K` is + called an *`\Fq[X]`-field*, and the monic generator of + `\Ker(\gamma)` is called the *`\Fq[X]`-characteristic of the + `\Fq[X]`-field `K`*. Let `K\{\tau\}` be the ring of Ore polynomials with coefficients in `K` and Frobenius variable `\tau: x \mapsto x^q`. A *Drinfeld - `\Fq[X]`-module over the `\Fq[X]`-field `K`* is a ring morphism - `\phi: \Fq[X] \to K\{\tau\}` such that: + `\Fq[X]`-module over the `\Fq[X]`-field `K`* is an `\Fq`-algebra + morphism `\phi: \Fq[X] \to K\{\tau\}` such that: 1. The image of `\phi` contains non-constant Ore polynomials. 2. For every element `a` in the function ring, the constant @@ -61,19 +60,22 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): .. NOTE:: - These notations will be used throughout this docstring. + These notations will be used throughout the documentation. We say that `\Fq[X]` is the *function ring of `\phi`*; `K` is the - *base ring of `\phi`*, or simply its base or base field; *K\{\tau\}* - is the *Ore polynomial ring of `\phi`*; `t` is the *Ore variable of - `\phi`*. The *generator of `\phi`* is `\phi_X`, its *constant - coefficient* is the constant coefficient of `\phi_X`. The - `\Fq[X]`-characteristic of the base ring `K` can also be referred to - as its *function ring-characteristic*. + *base ring of `\phi`* (or simply its *base* or *base field*); + *K\{\tau\}* is the *Ore polynomial ring of `\phi`*; `t` is the *Ore + variable of `\phi`*. Further, the *generator of `\phi`* is `\phi_X` + and its *constant coefficient* is the constant coefficient of + `\phi_X`. The `\Fq[X]`-characteristic of the base ring `K` can also + be referred to as its *function ring-characteristic*. + + .. NOTE:: + + The base ring is always a field. The Drinfeld module `\phi` is uniquely determined by the image - `\phi_X` of `X`. This Ore polynomial is an input of the class - constructor. + `\phi_X` of `X`, which is an input of the class. Classical references on Drinfeld modules include [Gos1998]_, [Rosen2002]_, [VS06]_ and [Gek1998]_. @@ -84,18 +86,18 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): polynomial ring `\Fq[X]` is replaced by a more general function ring: the ring of functions in `k` that are regular outside `\infty`, where `k` is a function field over `\Fq` with - transcendance degree `1` and `\infty` is a fixed place of `k`. + transcendence degree `1` and `\infty` is a fixed place of `k`. This is out of the scope of this implementation. INPUT: - - ``function_ring`` -- the polynomial ring with coefficients in the finite - field `\Fq` - - ``gen`` -- the generator `\phi_X`, as a list of coefficients or an - Ore polynomial - - ``name`` (optional) the name of the Ore variable + - ``function_ring`` -- a univariate polynomial ring whose base is a + finite field + - ``gen`` -- the generator of the Drinfeld module; as a list of + coefficients or an Ore polynomial + - ``name`` (optional) -- the name of the Ore variable - .. RUBRIC:: Construction and input + .. RUBRIC:: Construction A Drinfeld module object is constructed as follows:: @@ -126,16 +128,15 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): ... ValueError: generator must have positive degree - The constant coefficient mudt be non zero:: + The constant coefficient must be non zero:: sage: DrinfeldModule(FqX, [K(0), K(1)]) Traceback (most recent call last): ... ValueError: the morphism must be non zero - The coefficients of the generator must live in some base field `K` - that is the codomain of a morphism `\gamma: \Fq[X] \to K`, where - `\Fq[X]` is the function ring:: + The coefficients of the generator must lie in an `\Fq[X]`-field, + where `\Fq[X]` is the function ring of the Drinfeld module:: sage: DrinfeldModule(FqX, [z, QQ(1)]) Traceback (most recent call last): @@ -147,22 +148,8 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): ... ValueError: function ring base must coerce into base ring - If the coefficients are regular integers, an exception is raised. - One needs to manually cast them to the field of their choice:: - - sage: DrinfeldModule(FqX, [1, 1, 1]) - Traceback (most recent call last): - ... - ValueError: function ring base must coerce into base ring - - sage: DrinfeldModule(FqX, [K(1), 1, 1]) - Drinfeld module defined by X |--> t^2 + t + 1 over Finite Field in z of size 3^12 - - sage: DrinfeldModule(FqX, [Fq(1), 1, 1]) - Drinfeld module defined by X |--> t^2 + t + 1 over Finite Field in z2 of size 3^2 - The function ring must be an univariate polynomial ring whose - coefficients lie in a finite field:: + base is a finite field:: sage: DrinfeldModule(K, [z, 1, 1]) Traceback (most recent call last): @@ -175,9 +162,10 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): ... TypeError: function ring base must be a finite field - If you already defined a category of Drinfeld modules, you must - ensure that the constant coefficient is a root of the - function ring-characteristic of the category base:: + If you already defined a category of Drinfeld modules, and you + create a Drinfeld module through this category, you must + ensure that the constant coefficient is the generator of the algebra + morphism that defines the category:: sage: cat = phi.category() sage: cat([1, 1, K(1)]) @@ -193,13 +181,13 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): `\Fq[X]`-characteristic plays the role of the characteristic of a function field, and thus preexists Drinfeld modules. The base field `K` should rather be seen as an `\Fq[X]`-field, i.e. the - field `K` equiped with a morphism `\gamma: \Fq[X] \to K`, + field `K` equipped with a morphism `\gamma: \Fq[X] \to K`, instead of just a field. However, as the characteristic may be deduced from the constant - coefficient of the Drinfeld module, we chose to ommit the - characteristic in the input of the class in order to have - concise definitions. + coefficient of the Drinfeld module (it is its minimal polynomial + over the function ring), we chose to ommit the characteristic + in the input of the class in order to have concise definitions. .. RUBRIC:: Possible base rings @@ -216,9 +204,9 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: rho Drinfeld module defined by X |--> t^2 + t + z^10 + 2*z^9 + z^8 + z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z over Finite Field in z of size 3^12 - Then one can check that the morphisms `\gamma` are not the same for - ``phi`` and ``rho``, and that the `\gamma` associated to `\phi` is - surjective, while the other one is not:: + The morphisms `\gamma` are not the same for ``phi`` and ``rho``, and + that the `\gamma` associated to `\phi` is surjective, while the + other one is not:: sage: rho.category().morphism() Ring morphism: @@ -270,12 +258,33 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: char = phi.category().characteristic() - As the output of - :meth:`sage.rings.function_field.drinfeld_module.finite_drinfeld_module.DrinfeldModule.category` - suggests, the morphism `\gamma` uniquely determines the category of a Drinfeld - module. + As the output of :meth:`category` suggests, the morphism `\gamma` + uniquely determines the category. + + .. RUBRIC:: Basics - .. RUBRIC:: Getters and basic properties + Images under the Drinfeld module are computed by calling the object:: + + sage: phi(X) # phi_X + t^2 + t + z + sage: phi(X^3 + X + 1) # phi_X^3 +X + 1 + t^6 + (z^11 + z^9 + 2*z^6 + 2*z^4 + 2*z + 1)*t^4 + (2*z^11 + 2*z^10 + z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^3)*t^3 + (2*z^11 + z^10 + z^9 + 2*z^7 + 2*z^6 + z^5 + z^4 + 2*z^3 + 2*z + 2)*t^2 + (2*z^11 + 2*z^8 + 2*z^6 + z^5 + z^4 + 2*z^2)*t + z^3 + z + 1 + sage: phi(1) # phi_1 + 1 + + This is useful to quickly retrieve the generator of the Drinfeld + module. Furthermore, a Drinfeld `\Fq[X]`-module can be seen as an + Ore polynomial with positive degree and constant coefficient + `\gamma(X)`. This analogy is the motivation for the following + methods:: + + sage: phi.coefficients() + [z, 1, 1] + + sage: phi.coefficient(1) + 1 + sage: phi.coefficient(1) + 1 One can retrieve basic properties:: @@ -305,9 +314,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): To: Ore Polynomial Ring in t over Finite Field in z of size 3^12 twisted by z |--> z^(3^2) Defn: X |--> t^2 + t + z - .. RUBRIC:: Height, rank and j-invariant - - One can compute the rank and height:: + One can compute the rank and height (which is always `1`):: sage: phi.rank() 2 @@ -319,39 +326,12 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: phi.j_invariant() # j-invariant 1 - .. RUBRIC:: The generator of a Drinfeld module - - For a `a` in the function ring, `\phi_a` is computed by calling - `phi`:: - - sage: phi(X) # phi_X - t^2 + t + z - sage: phi(X^3 + X + 1) # phi_X^3 +X + 1 - t^6 + (z^11 + z^9 + 2*z^6 + 2*z^4 + 2*z + 1)*t^4 + (2*z^11 + 2*z^10 + z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^3)*t^3 + (2*z^11 + z^10 + z^9 + 2*z^7 + 2*z^6 + z^5 + z^4 + 2*z^3 + 2*z + 2)*t^2 + (2*z^11 + 2*z^8 + 2*z^6 + z^5 + z^4 + 2*z^2)*t + z^3 + z + 1 - sage: phi(1) # phi_1 - 1 - - This is especially useful to quickly retrive `\phi_X`, the generator - of the Drinfeld module. Furthermore, a Drinfeld `\Fq[X]`-module can - be seen as an Ore polynomial with positive degree and constant - coefficient `\gamma(X)`. This analogy is the motivation for the - following methods:: - - sage: phi.coefficients() - [z, 1, 1] - - sage: phi.coefficient(1) - 1 - sage: phi.coefficient(1) - 1 - .. RUBRIC:: Morphisms, isogenies A *morphism of Drinfeld modules `\phi \to \psi`* is an Ore polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for - every `a` in the function ring. In our specific case, this is - equivalent to verifying `f \phi_X = \psi_X f`. An *isogeny* is a - non-zero morphism. + every `a` in the function ring. In our case, this is equivalent to + `f \phi_X = \psi_X f`. An *isogeny* is a non-zero morphism. Use the ``in`` syntax to test if an Ore polynomial defines a morphism:: @@ -370,7 +350,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): True To create a SageMath object representing the morphism, call the - homset (``hom`` in the next example):: + homset (``hom``):: sage: hom = Hom(phi, phi) sage: frobenius_endomorphism = hom(t^6) @@ -392,15 +372,16 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): To: Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 Defn: 0 - One can retrieve the underlying Ore polynomial with the method - :meth:`sage.rings.function_field.drinfeld_module.finite_drinfeld_module.DrinfeldModule.ore_polynomial`:: + The underlying Ore polynomial is retrieved with the method + :meth:`ore_polynomial`:: sage: frobenius_endomorphism.ore_polynomial() t^6 + sage: identity_morphism.ore_polynomial() + 1 - And one can easily check if a morphism defines an isogeny or an - isomorphism (i.e. an isogeny whose underlying Ore polynomial has - degree `0`):: + It is easy to check if a morphism is an isogeny, endomorphism or + isomorphism:: sage: frobenius_endomorphism.is_isogeny() True @@ -417,10 +398,9 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): .. RUBRIC:: The Vélu formula - Let ``ore_pol`` be a non-zero Ore polynomial. For Drinfeld module, - it is easy to decide if there exists a Drinfeld module ``psi`` such - that ``ore_pol`` is an isogeny from ``self`` to ``psi``. If so, we - find ``psi``:: + Let ``ore_pol`` be a non-zero Ore polynomial. We can decide if there + exists a Drinfeld module ``psi`` such that ``ore_pol`` is an isogeny + from ``self`` to ``psi``. If so, we find ``psi``:: sage: ore_pol = (2*z^6 + z^3 + 2*z^2 + z + 2)*t + z^11 + 2*z^10 + 2*z^9 + 2*z^8 + z^7 + 2*z^6 + z^5 + z^3 + z^2 + z sage: psi = phi.velu(ore_pol) @@ -444,18 +424,21 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): .. RUBRIC:: The action of a Drinfeld module - An `\Fq[X]`-Drinfeld module `\phi` notoriously makes any field - extension `L/K` a left `\Fq[X]`-module. Let `x \in L`, let `a` be in - the function ring; the action is defined as `(a, x) \mapsto - \phi_a(x)`. The method :meth:`action` returns an ``Action`` object - representing the Drinfeld module action; in this implementation, `K - = L`. + The `\Fq[X]`-Drinfeld module `\phi` induces a special left + `\Fq[X]`-module structure on any field extension `L/K`. Let `x \in + L` and `a` be in the function ring; the action is defined as `(a, + x) \mapsto \phi_a(x)`. The method :meth:`action` returns an + ``Action`` object representing the Drinfeld module action. + + .. NOTE:: + + In this implementation, `L` is `L`. sage: action = phi.action() sage: action Action on Finite Field in z of size 3^12 induced by Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 - The action on elements is computed as follows:: + The action on elements is computed by calling the action object:: sage: P = X + 1 sage: a = z @@ -474,7 +457,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: extended_action Action on Finite Field in z60 of size 3^60 induced by Drinfeld module defined by X |--> t^2 + t + 2*z60^59 + z60^56 + 2*z60^55 + 2*z60^54 + 2*z60^53 + z60^49 + z60^48 + z60^47 + 2*z60^45 + z60^44 + 2*z60^41 + 2*z60^40 + 2*z60^39 + 2*z60^37 + 2*z60^36 + z60^34 + z60^33 + z60^32 + 2*z60^31 + 2*z60^30 + 2*z60^27 + 2*z60^25 + z60^23 + z60^22 + z60^21 + 2*z60^20 + z60^19 + z60^18 + z60^17 + z60^16 + z60^15 + 2*z60^14 + z60^12 + 2*z60^11 + 2*z60^10 + z60^8 + z60^6 + 2*z60^5 + z60^4 + z60^3 + z60 + 1 over Finite Field in z60 of size 3^60 - .. RUBRIC:: Inversion of the Drinfeld module + .. RUBRIC:: Inverting the Drinfeld module Given an Ore polynomial that equals `\phi_a` for some function ring elelement `a`, one can retrieve `a` (as a morphism, a Drinfeld @@ -569,14 +552,14 @@ def __init__(self, gen, category): def __call__(self, a): r""" Return the image of ``a`` by the morphism that defines the - Drinfeld module, i.e. `\phi_a` if the Drinfeld module is denoted + Drinfeld module; i.e. `\phi_a` if the Drinfeld module is denoted `phi`. INPUT: - - ``a`` -- an element in the function ring + - ``a`` -- a function ring element - OUTPUT: an element of the base ring + OUTPUT: a base ring element TESTS: @@ -603,7 +586,6 @@ def __call__(self, a): sage: phi(a)[0] == phi.category().morphism()(a) True """ - return self._morphism(a) def _Hom_(self, other, category): @@ -691,7 +673,9 @@ def _repr_(self): def action(self): r""" - Return the action object that represents the action on the base that is + Return the action object + (:class:`sage.rings.function_field.drinfeld_modules.action.Action`) + that represents the module action, on the base ring, that is induced by the Drinfeld module. OUTPUT: a Drinfeld module action object @@ -725,9 +709,6 @@ def base_ring(self): r""" Return the base ring of the Drinfeld module. - This is the Ore polynomial ring base. In particular, the base - ring is always a field. - OUTPUT: a field EXAMPLES: @@ -747,9 +728,13 @@ def base_ring(self): sage: phi.base_ring() is K True - Note that in the above example, the constant coefficient - generates a strict sub-extension of `K/\Fq`. In fact, the base - ring may also be the same as ``Fq``:: + The base ring can be infinite:: + + sage: sigma = DrinfeldModule(FqX, [Frac(FqX).gen(), 1]) + sage: sigma.base_ring() + Fraction Field of Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + + Or it can be ``Fq``:: sage: psi = DrinfeldModule(FqX, [Fq(1), Fq.gen()]) sage: psi.base_ring() @@ -778,12 +763,11 @@ def base_ring(self): def change_ring(self, new_field, name=None): r""" - Return a Drinfeld module defined like the current one, but with + Return a Drinfeld module defined like the current one, but whose base ring ``new_field``. - The new base can either be a field extension of the base ring, - or field that has a coercion map from the field of definitions - of the coefficients of the generator. + The new base is valid whether it has a coercion map from the + current base. INPUT: @@ -848,7 +832,7 @@ def constant_coefficient(self): r""" Return the constant coefficient of the generator. - OUTPUT: an element in the base ring + OUTPUT: a base ring element EXAMPLES: @@ -896,7 +880,7 @@ def coefficient(self, n): - ``n`` -- a non-negative integer - OUTPUT: an element in the base ring + OUTPUT: a base ring element EXAMPLES: @@ -928,13 +912,14 @@ def coefficients(self, sparse=True): r""" Return the coefficients of the generator, as a list. - If the the flag ``sparse`` is ``True`` (default), only return the + If the flag ``sparse`` is ``True`` (default), only return the non-zero coefficients; otherwise, return all of them. INPUT: + - ``sparse`` -- a boolean - OUTPUT: a list of elements in the base ring + OUTPUT: a list of base ring elements EXAMPLES: @@ -968,10 +953,7 @@ def function_ring(self): r""" Return the function ring of the Drinfeld module. - In our case, the function ring is an univariate polynomial ring - whose coefficients lie in a finite field `\Fq`. - - OUTPUT: a polynomial ring + OUTPUT: a univariate polynomial ring EXAMPLES: @@ -989,12 +971,6 @@ def gen(self): r""" Return the generator of the Drinfeld module. - Let `\phi` denote the Drinfeld module, and `\Fq[X]` be the - function ring. This method returns `\phi_X`. - - This method makes sense the function ring is `\Fq`-generated by - a single element, whose image characterizes the Drinfeld module. - OUTPUT: an Ore polynomial EXAMPLES: @@ -1040,7 +1016,7 @@ def invert(self, ore_pol): - ``ore_pol`` -- the Ore polynomial whose preimage we want to compute - OUTPUT: an element in the function ring + OUTPUT: a function ring element EXAMPLES: @@ -1145,9 +1121,8 @@ def is_finite(self): def j_invariant(self): r""" - Return the j-invariant of the Drinfeld module; only the rank two - case has been implemented, a NotImplementedError is raised if - the rank is not two. + Return the j-invariant of the Drinfeld module if the rank is + two; raise a NotImplementedError otherwise. Assume the rank is two. Write the generator `\phi_X = \gamma(X) + g\tau + \Delta\tau^2`. The j-invariant is defined by @@ -1155,8 +1130,7 @@ def j_invariant(self): of the function ring. In our case, this base field is always finite. - OUTPUT: an element in the base ring if the rank is two; an - exception is raised otherwise + OUTPUT: a base ring element EXAMPLES: @@ -1192,7 +1166,7 @@ def morphism(self): r""" Return the morphism object that defines the Drinfeld module. - OUTPUT: a ring morphism, from the function ring to the Ore + OUTPUT: a ring morphism from the function ring to the Ore polynomial ring EXAMPLES: @@ -1278,9 +1252,6 @@ def ore_variable(self): r""" Return the Ore variable. - The Ore variable is defined as the generator of the Ore - polynomial ring. - OUTPUT: an Ore polynomial EXAMPLES: diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index c7cd5c6d2f5..ce87148eb59 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -26,22 +26,20 @@ class FiniteDrinfeldModule(DrinfeldModule): r""" - This class represnets a finite Drinfeld module. + This class represents a finite Drinfeld module. A *finite Drinfeld module* is a Drinfeld module whose base ring is - finite. For general definitions and help on Drinfeld modules, see - class + finite. + + For general definitions and help on Drinfeld modules, see class :class:`sage.rings.function_fields.drinfeld_module.drinfeld_module.DrinfeldModule`. - In this specific documentation, we only present the specifics of - ``FiniteDrinfeldModle``. .. RUBRIC:: Construction: The user does not ever need to directly call - ``FiniteDrinfeldModule``, as it is the (meta)class - ``DrinfeldModule`` that is reponsible for instanciating - ``DrinfeldModule`` or ``FiniteDrinfeldModule`` depending on its - input:: + ``FiniteDrinfeldModule`` --- the metaclass ``DrinfeldModule`` is + responsible for instantiating ``DrinfeldModule`` or + ``FiniteDrinfeldModule`` depending on the input:: sage: Fq = GF(343) sage: FqX. = Fq[] @@ -113,9 +111,8 @@ def __init__(self, gen, category): def frobenius_endomorphism(self): r""" - Return the Frobenius endomorphism, as an instance of - ``DrinfeldModuleMorphism``, of the Drinfeld module, if the rank - is two; raise a NotImplementedError otherwise.. + Return the Frobenius endomorphism of the Drinfeld module as a + morphism object. Let `q` be the order of the base field of the function ring. The *Frobenius endomorphism* is defined as the endomorphism whose @@ -209,12 +206,9 @@ def frobenius_charpoly(self, var='T'): trace. This gives the Frobenius characteristic polynomial. See [SM2019]_, Section 4. - See docstrings of methods - :meth:`sage.rings.function_fields.drinfeld_module.finite_drinfeld_module.FiniteDrinfeldModule.frobenius_norm` - and - :meth:`sage.rings.function_fields.drinfeld_module.finite_drinfeld_module.FiniteDrinfeldModule.frobenius_trace` - for furthere details on the computation of the norm and of - the trace. + See docstrings of methods :meth:`frobenius_norm` and + :meth:`frobenius_trace` for furthere details on the + computation of the norm and of the trace. """ self._check_rank_two() A = self._function_ring # Fq[X] @@ -291,12 +285,11 @@ def frobenius_trace(self): Let `A(X)` denote the Frobenius trace and `B(X)` denote the Frobenius norm. We begin by computing `B(X)`, see docstring - of method - :meth:`sage.rings.function_fields.drinfeld_module.finite_drinfeld_module.FiniteDrinfeldModule.frobenius_norm` - for details. The characteristic polynomial of the Frobenius - yields `t^{2n} - \phi_A t^n + \phi_B = 0`, where `t^n` is - the Frobenius endomorphism. As `\phi_B` is now known, we can - compute `\phi_A = (t^{2n} + \phi_B) / t^n`. We get `A(X)` by + of method :meth:`frobenius_norm` for details. The + characteristic polynomial of the Frobenius yields `t^{2n} - + \phi_A t^n + \phi_B = 0`, where `t^n` is the Frobenius + endomorphism. As `\phi_B` is now known, we can compute + `\phi_A = (t^{2n} + \phi_B) / t^n`. We get `A(X)` by inverting this quantity, using the method :meth:`sage.rings.function_fields.drinfeld_module.drinfeld_module.DrinfeldModule.invert`, see its docstring for details. @@ -333,7 +326,7 @@ def is_ordinary(self): NotImplementedError if the rank is not two. A rank two finite Drinfeld module is *ordinary* if and only if - the `\Fq[X]-characteristic of the base ring does not devide the + the `\Fq[X]-characteristic of the base ring does not divide the Frobenius trace. A *supersingular* rank two finite Drinfeld module is a Drinfeld module that is not ordinary. @@ -372,7 +365,7 @@ def is_supersingular(self): NotImplementedError if the rank is not two. A rank two finite Drinfeld module is *supersingular* if and only - if the function field-characteristic of the base ring devides + if the function field-characteristic of the base ring divides the Frobenius trace. An *ordinary* rank two finite Drinfeld module is a Drinfeld module that is not supersingular. diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index 8ec98e7562f..b442ec9fe0d 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -176,8 +176,7 @@ def _repr_(self): def __contains__(self, x): r""" Implement the ``in`` operator for the homset; return ``True`` if - the input defines a morphism in the homset, return ``False`` - otherwise. + whether the input defines a morphism in the homset. INPUT: @@ -233,8 +232,8 @@ def __contains__(self, x): def _element_constructor_(self, *args, **kwds): r""" - Return a Drinfeld module morphism defined by the input, which is - an Ore polynomial. + Return the Drinfeld module morphism defined by the input Ore + polynomial. INPUT: an Ore polynomial diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 67f7d5a1aba..f5f274f51c2 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -36,16 +36,12 @@ class DrinfeldModuleMorphism(UniqueRepresentation, Element, and base ring `K`, whose `\Fq[X]`-field structure is given by a morphism `\gamma`. A *morphism of Drinfeld modules `\phi \to \psi`* is an Ore polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a - f` for every `a \in \Fq[X]`. In our case, this is equivalent to - verifying `f \phi_X = \psi_X f`. An *isogeny* is a non-zero - morphism. + f` for every `a \in \Fq[X]`. In our case, this is equivalent to `f + \phi_X = \psi_X f`. An *isogeny* is a non-zero morphism. - A Drinfeld module morphism is represented by instances of the class - `DrinfeldModuleMorphism`. - - To create a morphism object, do not explicitely use - `DrinfeldModuleMorphism`, but rather call the parent homset with the - defining Ore polynomial:: + To create a morphism object, the user should never explicitly + instantiate `DrinfeldModuleMorphism`, but rather call the parent + homset with the defining Ore polynomial:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -101,9 +97,9 @@ class DrinfeldModuleMorphism(UniqueRepresentation, Element, .. NOTE:: - For the sake of completness, we explain how the user can - directly instanciate the class, even though this should never be - explicitely done:: + For the sake of completeness, we explain how the user can + directly instantiate the class, even though this should never be + explicitly done:: sage: from sage.rings.function_field.drinfeld_modules.morphism import DrinfeldModuleMorphism sage: DrinfeldModuleMorphism(Hom(phi, psi), ore_pol) @@ -235,7 +231,7 @@ def domain(self): def is_zero(self): r""" - Return ``True`` whethere the morphism is the zero morphism. + Return ``True`` whether the morphism is the zero morphism. EXAMPLES: From ea4a843f7832515cd008587e5f1747624f8bee2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 29 Aug 2022 17:31:14 +0200 Subject: [PATCH 111/751] Lint Drinfeld modules code --- src/sage/categories/drinfeld_modules.py | 16 +++--- .../function_field/drinfeld_modules/action.py | 10 ++-- .../drinfeld_modules/drinfeld_module.py | 50 +++++++++---------- .../finite_drinfeld_module.py | 4 +- .../function_field/drinfeld_modules/homset.py | 16 +++--- .../drinfeld_modules/morphism.py | 22 ++++---- 6 files changed, 62 insertions(+), 56 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index f9d854de1d4..4d4f851fc31 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -207,9 +207,11 @@ def __init__(self, morphism, name='t'): # Check domain is Fq[X] function_ring = self._function_ring if not isinstance(function_ring, PolynomialRing_general): - raise NotImplementedError('function ring must be a polynomial ring') + raise NotImplementedError('function ring must be a polynomial ' + 'ring') function_ring_base = function_ring.base_ring() - if not function_ring_base.is_field() or not function_ring_base.is_finite() : + if not function_ring_base.is_field() \ + or not function_ring_base.is_finite(): raise TypeError('function ring base must be a finite field') Fq = function_ring_base FqX = function_ring @@ -226,7 +228,7 @@ def __init__(self, morphism, name='t'): d = log(Fq.cardinality(), Fq.characteristic()) tau = K.frobenius_endomorphism(d) self._ore_polring = OrePolynomialRing(K, tau, names=name, - polcast=False) + polcast=False) # Create constant coefficient self._constant_coefficient = gamma(X) # Create characteristic @@ -269,8 +271,8 @@ def _call_(self, gen): X = self._function_ring.gen() gamma = self._morphism if gen[0] != gamma(X): - raise ValueError('constant coefficient must be the generator ' \ - 'of the morphism that defines the category') + raise ValueError('constant coefficient must be the generator ' + 'of the morphism that defines the category') return DrinfeldModule(self._function_ring, gen) # Somehow required for the class definition @@ -300,7 +302,7 @@ def _latex_(self): \end{array} """ return f'\\text{{Category{{ }}of{{ }}Drinfeld{{ }}modules{{ }}' \ - f'defined{{ }}by{latex(self._morphism)}' + f'defined{{ }}by{latex(self._morphism)}' def _repr_(self): r""" @@ -380,7 +382,7 @@ def characteristic(self): """ if self._characteristic is None: raise NotImplementedError - return self._characteristic + return self._characteristic def constant_coefficient(self): r""" diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index 0e5edfb74e6..28b585cd5dc 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -1,5 +1,5 @@ r""" -The left-module action induced by a Drinfeld module +The module action induced by a Drinfeld module This module provides the class :class:`sage.rings.function_field.drinfeld_module.action.DrinfeldModuleAction`. @@ -85,7 +85,7 @@ def __init__(self, drinfeld_module): raise TypeError('input must be a DrinfeldModule') self._drinfeld_module = drinfeld_module super().__init__(drinfeld_module.function_ring(), - drinfeld_module.base_ring()) + drinfeld_module.base_ring()) def _act_(self, pol, x): r""" @@ -137,8 +137,8 @@ def _latex_(self): \text{Action{ }on{ }}\Bold{F}_{11^{2}}\text{{ }induced{ }by{ }}Drinfeld module defined by X |--> t^3 + z over Finite Field in z of size 11^2 """ return f'\\text{{Action{{ }}on{{ }}}}' \ - f'{latex(self._drinfeld_module.base_ring())}\\text{{{{ }}' \ - f'induced{{ }}by{{ }}}}{self._drinfeld_module}' + f'{latex(self._drinfeld_module.base_ring())}\\text{{{{ }}' \ + f'induced{{ }}by{{ }}}}{self._drinfeld_module}' def _repr_(self): r""" @@ -157,7 +157,7 @@ def _repr_(self): Action on Finite Field in z of size 11^2 induced by Drinfeld module defined by X |--> t^3 + z over Finite Field in z of size 11^2 """ return f'Action on {self._drinfeld_module.base_ring()} induced by ' \ - f'{self._drinfeld_module}' + f'{self._drinfeld_module}' def drinfeld_module(self): r""" diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 8e9df953a43..40bbfe4633a 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -30,7 +30,6 @@ from sage.modules.free_module_element import vector from sage.rings.integer import Integer from sage.rings.polynomial.ore_polynomial_element import OrePolynomial -from sage.rings.polynomial.ore_polynomial_ring import OrePolynomialRing from sage.rings.polynomial.polynomial_ring import PolynomialRing_general from sage.structure.category_object import CategoryObject from sage.structure.sequence import Sequence @@ -493,13 +492,12 @@ def __classcall_private__(cls, function_ring, gen, name='t'): # here and in the category constructor, which is not ideal. # Check domain is Fq[X] if not isinstance(function_ring, PolynomialRing_general): - raise NotImplementedError('function ring must be a polynomial ring') + raise NotImplementedError('function ring must be a polynomial ' + 'ring') function_ring_base = function_ring.base_ring() - if not function_ring_base.is_field() or not function_ring_base.is_finite() : + if not function_ring_base.is_field() \ + or not function_ring_base.is_finite(): raise TypeError('function ring base must be a finite field') - Fq = function_ring_base - FqX = function_ring - X = FqX.gen() # Check all possible input types for gen # `gen` is an Ore polynomial: @@ -512,11 +510,12 @@ def __classcall_private__(cls, function_ring, gen, name='t'): ore_polring = None ore_polring_base = Sequence(gen).universe() else: - raise TypeError('generator must be list of coefficients or Ore ' \ - 'polynomial') + raise TypeError('generator must be list of coefficients or Ore ' + 'polynomial') # The coefficients are in a base ring that has coercion from Fq: - if not (hasattr(ore_polring_base, 'has_coerce_map_from') and \ - ore_polring_base.has_coerce_map_from(function_ring.base_ring())): + if not (hasattr(ore_polring_base, 'has_coerce_map_from') + and ore_polring_base.has_coerce_map_from( + function_ring.base_ring())): raise ValueError('function ring base must coerce into base ring') # Build the morphism that defines the category @@ -625,11 +624,11 @@ def _Hom_(self, other, category): return DrinfeldModuleHomset(self, other, category) def _check_rank_two(self): - r""" - Raise ``NotImplementedError`` if the rank is not two. - """ - if self.rank() != 2: - raise NotImplementedError('rank must be 2') + r""" + Raise ``NotImplementedError`` if the rank is not two. + """ + if self.rank() != 2: + raise NotImplementedError('rank must be 2') def _latex_(self): r""" @@ -648,9 +647,9 @@ def _latex_(self): \text{Drinfeld{ }module{ }defined{ }by{ }} X \mapsto z_{12}^{5} t^{2} + z_{12}^{3} t + 2 z_{12}^{11} + 2 z_{12}^{10} + z_{12}^{9} + 3 z_{12}^{8} + z_{12}^{7} + 2 z_{12}^{5} + 2 z_{12}^{4} + 3 z_{12}^{3} + z_{12}^{2} + 2 z_{12}\text{{ }over{ }}\Bold{F}_{5^{12}} """ return f'\\text{{Drinfeld{{ }}module{{ }}defined{{ }}by{{ }}}} ' \ - f'{latex(self._function_ring.gen())} '\ - f'\\mapsto {latex(self._gen)}' \ - f'\\text{{{{ }}over{{ }}}}{latex(self._base_ring)}' + f'{latex(self._function_ring.gen())} '\ + f'\\mapsto {latex(self._gen)}' \ + f'\\text{{{{ }}over{{ }}}}{latex(self._base_ring)}' def _repr_(self): r""" @@ -669,7 +668,7 @@ def _repr_(self): Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 """ return f'Drinfeld module defined by {self._function_ring.gen()} ' \ - f'|--> {self._gen} over {self._base_ring}' + f'|--> {self._gen} over {self._base_ring}' def action(self): r""" @@ -708,7 +707,7 @@ def action(self): def base_ring(self): r""" Return the base ring of the Drinfeld module. - + OUTPUT: a field EXAMPLES: @@ -824,7 +823,7 @@ def change_ring(self, new_field, name=None): """ coeffs = self._gen.coefficients() new_coeffs = list(map(new_field, coeffs)) - if name == None: + if name is None: name = self._ore_polring.variable_name() return DrinfeldModule(self._function_ring, new_coeffs, name=name) @@ -1073,12 +1072,13 @@ def invert(self, ore_pol): """ deg = ore_pol.degree() r = self.rank() - if not ore_pol in self._ore_polring: + if ore_pol not in self._ore_polring: raise TypeError('input must be an Ore polynomial') if ore_pol in self._base_ring: return self._Fq(ore_pol) if deg % r != 0: - raise ValueError('input must be in the image of the Drinfeld module') + raise ValueError('input must be in the image of the Drinfeld ' + 'module') k = deg // r X = self._function_ring.gen() @@ -1319,7 +1319,7 @@ def velu(self, isog): OUTPUT: a Drinfeld module ALGORITHM: - + The input defines an isogeny if only if: 1. The degree of the characteristic divides the height of the input. (The height of an Ore polynomial @@ -1376,7 +1376,7 @@ def velu(self, isog): ... ValueError: the input does not define an isogeny """ - if not isog in self.ore_polring(): + if isog not in self.ore_polring(): raise TypeError('input must be an Ore polynomial') e = ValueError('the input does not define an isogeny') if isog == 0: diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index ce87148eb59..afb02c5eba6 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -24,6 +24,7 @@ from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.function_field.drinfeld_modules.drinfeld_module import DrinfeldModule + class FiniteDrinfeldModule(DrinfeldModule): r""" This class represents a finite Drinfeld module. @@ -263,7 +264,8 @@ def frobenius_norm(self): m = n // d delta = self._gen[2] norm = self._base_ring.over(self._Fq)(delta).norm() - self._frobenius_norm = ((-1)**n) * (self.characteristic()**m) / norm + char = self.characteristic() + self._frobenius_norm = ((-1)**n) * (char**m) / norm return self._frobenius_norm def frobenius_trace(self): diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index b442ec9fe0d..df176bfafa6 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -20,11 +20,12 @@ #***************************************************************************** from sage.categories.drinfeld_modules import DrinfeldModules -from sage.categories.homset import Homset, Hom +from sage.categories.homset import Homset from sage.misc.latex import latex from sage.rings.function_field.drinfeld_modules.morphism import DrinfeldModuleMorphism from sage.structure.parent import Parent + class DrinfeldModuleHomset(Homset): r""" This class represents the set of morphisms between two Drinfeld @@ -113,7 +114,7 @@ class DrinfeldModuleHomset(Homset): sage: frobenius_endomorphism in hom False """ - + Element = DrinfeldModuleMorphism __contains__ = Parent.__contains__ @@ -123,7 +124,8 @@ def __init__(self, X, Y, category=None, check=True): if check: if X.category() != Y.category() \ or not isinstance(X.category(), DrinfeldModules): - raise NotImplementedError('Drinfeld modules must be in the same category') + raise NotImplementedError('Drinfeld modules must be in the ' + 'same category') if category != X.category(): raise NotImplementedError('category should be DrinfeldModules') base = category.base() @@ -147,8 +149,8 @@ def _latex_(self): \text{Set{ }of{ }Drinfeld{ }module{ }morphisms{ }from}\text{Drinfeld{ }module{ }defined{ }by{ }} X \mapsto 2 t^{2} + z_{6} t + z_{6}\text{{ }over{ }}\Bold{F}_{3^{6}}\text{{ }to{ }}Drinfeld module defined by X |--> 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 over Finite Field in z6 of size 3^6 """ return f'\\text{{Set{{ }}of{{ }}Drinfeld{{ }}module{{ }}morphisms' \ - f'{{ }}from}}{latex(self.domain())}\\text{{{{ }}to{{ }}}}' \ - f'{self.codomain()}' + f'{{ }}from}}{latex(self.domain())}\\text{{{{ }}to{{ }}}}' \ + f'{self.codomain()}' def _repr_(self): r""" @@ -170,8 +172,8 @@ def _repr_(self): To: Drinfeld module defined by X |--> 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 over Finite Field in z6 of size 3^6 """ return f'Set of Drinfeld module morphisms:\n' \ - f' From: {self.domain()}\n' \ - f' To: {self.codomain()}' + f' From: {self.domain()}\n' \ + f' To: {self.codomain()}' def __contains__(self, x): r""" diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index f5f274f51c2..d8e8a7adc41 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -22,9 +22,6 @@ from sage.misc.latex import latex from sage.structure.element import Element from sage.structure.unique_representation import UniqueRepresentation -from sage.rings.polynomial.ore_polynomial_element import OrePolynomial -from sage.rings.polynomial.ore_polynomial_ring import OrePolynomialRing -from sage.categories.drinfeld_modules import DrinfeldModules class DrinfeldModuleMorphism(UniqueRepresentation, Element, @@ -158,11 +155,14 @@ def _latex_(self): \end{array} """ return f'\\begin{{array}}{{l}}\n' \ - f'\\text{{Drinfeld{{ }}module{{ }}morphism:}}\\\\\n' \ - f'\\text{{{{ }}{{ }}From:{{ }}}}{latex(self._domain)}}}\\\\\n' \ - f'\\text{{{{ }}{{ }}To:{{ }}}}{{ }}{{ }}{latex(self._codomain)}\\\\\n' \ - f'\\text{{{{ }}{{ }}Defn:{{ }}}}{latex(self._ore_polynomial)}\n' \ - f'\\end{{array}}' + f'\\text{{Drinfeld{{ }}module{{ }}morphism:}}\\\\\n' \ + f'\\text{{{{ }}{{ }}From:{{ }}}}'\ + f'{latex(self._domain)}}}\\\\\n' \ + f'\\text{{{{ }}{{ }}To:{{ }}}}{{ }}{{ }}' \ + f'{latex(self._codomain)}\\\\\n' \ + f'\\text{{{{ }}{{ }}Defn:{{ }}}}' \ + f'{latex(self._ore_polynomial)}\n' \ + f'\\end{{array}}' def _repr_(self): r""" @@ -185,9 +185,9 @@ def _repr_(self): Defn: t + z6^5 + z6^2 + 1 """ return f'Drinfeld Module morphism:\n' \ - f' From: {self._domain}\n' \ - f' To: {self._codomain}\n' \ - f' Defn: {self._ore_polynomial}' + f' From: {self._domain}\n' \ + f' To: {self._codomain}\n' \ + f' Defn: {self._ore_polynomial}' def codomain(self): r""" From 5d21c5432cb4386d126b3da1098c7dde40d47683 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 29 Aug 2022 17:34:43 +0200 Subject: [PATCH 112/751] Change sage.categories.drinfeld_modules title This is to comply with other modules in sage.categories. --- src/sage/categories/drinfeld_modules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 4d4f851fc31..a39228ce57c 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -1,5 +1,5 @@ r""" -Category of Drinfeld modules +Drinfeld modules over a base This module provides the class :class:`sage.category.drinfeld_modules.DrinfeldModules`. From 43c430f273a372e316a0061646f8bd4830837895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 29 Aug 2022 17:36:25 +0200 Subject: [PATCH 113/751] Refactor Drinfeld modules in reference Drinfeld modules now have their own directory (sage/src/doc/en/reference/drinfeld_modules), and they are indexed on the main entry point of the SageMath reference. --- src/doc/en/reference/drinfeld_modules/conf.py | 1 + .../en/reference/drinfeld_modules/index.rst | 42 +++++++++++++++++++ .../en/reference/function_fields/index.rst | 1 - src/doc/en/reference/index.rst | 1 + 4 files changed, 44 insertions(+), 1 deletion(-) create mode 120000 src/doc/en/reference/drinfeld_modules/conf.py create mode 100644 src/doc/en/reference/drinfeld_modules/index.rst diff --git a/src/doc/en/reference/drinfeld_modules/conf.py b/src/doc/en/reference/drinfeld_modules/conf.py new file mode 120000 index 00000000000..2bdf7e68470 --- /dev/null +++ b/src/doc/en/reference/drinfeld_modules/conf.py @@ -0,0 +1 @@ +../conf_sub.py \ No newline at end of file diff --git a/src/doc/en/reference/drinfeld_modules/index.rst b/src/doc/en/reference/drinfeld_modules/index.rst new file mode 100644 index 00000000000..316f50cb830 --- /dev/null +++ b/src/doc/en/reference/drinfeld_modules/index.rst @@ -0,0 +1,42 @@ +Drinfeld modules +==================================== + +Sage include facilities to manipulate Drinfeld modules and their morphisms. The +main entry point is the class +:class:`sage.rings.function_field.drinfeld_modules.drinfeld_module.DrinfeldModule`. + +Drinfeld modules +---------------- + +.. toctree:: + :maxdepth: 2 + + sage/rings/function_field/drinfeld_modules/drinfeld_module + sage/rings/function_field/drinfeld_modules/finite_drinfeld_module + +Morphisms and isogenies +----------------------- + +.. toctree:: + :maxdepth: 2 + + sage/rings/function_field/drinfeld_modules/morphism + sage/rings/function_field/drinfeld_modules/homset + +The module action induced by a Drinfeld module +---------------------------------------------- + +.. toctree:: + :maxdepth: 2 + + sage/rings/function_field/drinfeld_modules/action + +The category of Drinfeld modules +-------------------------------- + +.. toctree:: + :maxdepth: 2 + + sage/categories/drinfeld_modules + +.. include:: ../footer.txt diff --git a/src/doc/en/reference/function_fields/index.rst b/src/doc/en/reference/function_fields/index.rst index bc2350116ad..50c04560a33 100644 --- a/src/doc/en/reference/function_fields/index.rst +++ b/src/doc/en/reference/function_fields/index.rst @@ -21,7 +21,6 @@ algebraic closure of `\QQ`. sage/rings/function_field/maps sage/rings/function_field/extensions sage/rings/function_field/constructor - sage/rings/function_field/drinfeld_modules/drinfeld_module A basic reference for the theory of algebraic function fields is [Stich2009]_. diff --git a/src/doc/en/reference/index.rst b/src/doc/en/reference/index.rst index 065bccac955..88f1bd814dd 100644 --- a/src/doc/en/reference/index.rst +++ b/src/doc/en/reference/index.rst @@ -111,6 +111,7 @@ Number Fields, Function Fields, and Valuations * :doc:`Number Fields ` * :doc:`Function Fields ` * :doc:`Discrete Valuations ` +* :doc:`Drinfeld Modules ` Number Theory ------------- From cf503d8d2c10fdd187cc5090f2724723dc12a0a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 8 Sep 2022 13:37:38 +0200 Subject: [PATCH 114/751] Change _call_ to object in DrinfeldModules This is to emphasize that DrinfeldModules is not a parent. --- src/sage/categories/drinfeld_modules.py | 80 +++++++++---------- .../drinfeld_modules/drinfeld_module.py | 8 +- 2 files changed, 44 insertions(+), 44 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index a39228ce57c..d87436233a5 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -135,10 +135,10 @@ class DrinfeldModules(CategoryWithParameters): .. RUBRIC:: Creating Drinfeld module objects from the category - Calling the category with an Ore polynomial creates a Drinfeld - module object in the category whose generator is the input:: + Calling :meth:`object` with an Ore polynomial creates a Drinfeld module + object in the category whose generator is the input:: - sage: psi = cat([p_root, 1]) + sage: psi = cat.object([p_root, 1]) sage: psi Drinfeld module defined by X |--> t + z^3 + 7*z^2 + 6*z + 10 over Finite Field in z of size 11^4 sage: psi.category() is cat @@ -147,7 +147,7 @@ class DrinfeldModules(CategoryWithParameters): Of course, the constant coefficient of the input must be the same as the category':: - sage: cat([z, 1]) + sage: cat.object([z, 1]) Traceback (most recent call last): ... ValueError: constant coefficient must be the generator of the morphism that defines the category @@ -240,41 +240,6 @@ def __init__(self, morphism, name='t'): elif FqX.is_subring(K): self._characteristic = Integer(0) - def _call_(self, gen): - r""" - Return a Drinfeld module object in the category whose generator - is the input. - - INPUT: the generator of the Drinfeld module, given as an Ore - polynomial or a list of coefficients - - OUTPUT: a Drinfeld module in the category - - EXAMPLES: - - sage: Fq = GF(11) - sage: FqX. = Fq[] - sage: K. = Fq.extension(4) - sage: p_root = z^3 + 7*z^2 + 6*z + 10 - sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) - sage: cat = phi.category() - sage: psi = cat([p_root, 0, 1]) - sage: psi - Drinfeld module defined by X |--> t^2 + z^3 + 7*z^2 + 6*z + 10 over Finite Field in z of size 11^4 - sage: t = phi.ore_variable() - sage: cat(t^3 + z^3 + 7*z^2 + 6*z + 10) is phi - True - """ - from sage.rings.function_field.drinfeld_modules.drinfeld_module import DrinfeldModule - # If gen is not in the Ore polring, an exception is raised - gen = self._ore_polring(gen) - X = self._function_ring.gen() - gamma = self._morphism - if gen[0] != gamma(X): - raise ValueError('constant coefficient must be the generator ' - 'of the morphism that defines the category') - return DrinfeldModule(self._function_ring, gen) - # Somehow required for the class definition def _make_named_class_key(self, name): return self._function_ring.category() @@ -451,6 +416,41 @@ def morphism(self): """ return self._morphism + def object(self, gen): + r""" + Return a Drinfeld module object in the category whose generator + is the input. + + INPUT: the generator of the Drinfeld module, given as an Ore + polynomial or a list of coefficients + + OUTPUT: a Drinfeld module in the category + + EXAMPLES: + + sage: Fq = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(4) + sage: p_root = z^3 + 7*z^2 + 6*z + 10 + sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: cat = phi.category() + sage: psi = cat.object([p_root, 0, 1]) + sage: psi + Drinfeld module defined by X |--> t^2 + z^3 + 7*z^2 + 6*z + 10 over Finite Field in z of size 11^4 + sage: t = phi.ore_variable() + sage: cat.object(t^3 + z^3 + 7*z^2 + 6*z + 10) is phi + True + """ + from sage.rings.function_field.drinfeld_modules.drinfeld_module import DrinfeldModule + # If gen is not in the Ore polring, an exception is raised + gen = self._ore_polring(gen) + X = self._function_ring.gen() + gamma = self._morphism + if gen[0] != gamma(X): + raise ValueError('constant coefficient must be the generator ' + 'of the morphism that defines the category') + return DrinfeldModule(self._function_ring, gen) + def ore_polring(self): r""" Return the Ore polynomial ring of the category. @@ -529,7 +529,7 @@ def random_object(self, rank): dom_coeff = K.random_element() coeffs.append(dom_coeff) - return self(coeffs) + return self.object(coeffs) # Somehow required for the class definition def super_categories(self): diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 40bbfe4633a..4263bbd44f8 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -167,7 +167,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): morphism that defines the category:: sage: cat = phi.category() - sage: cat([1, 1, K(1)]) + sage: cat.object([1, 1, K(1)]) Traceback (most recent call last): ... ValueError: constant coefficient must be the generator of the morphism that defines the category @@ -856,7 +856,7 @@ def constant_coefficient(self): same constant coefficient:: sage: t = phi.ore_variable() - sage: psi = cat(phi.constant_coefficient() + t^3) + sage: psi = cat.object(phi.constant_coefficient() + t^3) sage: psi Drinfeld module defined by X |--> t^3 + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 @@ -864,7 +864,7 @@ def constant_coefficient(self): this category if they do not share the same constant coefficient:: - sage: rho = cat(phi.constant_coefficient() + 1 + t^3) + sage: rho = cat.object(phi.constant_coefficient() + 1 + t^3) Traceback (most recent call last): ... ValueError: constant coefficient must be the generator of the morphism that defines the category @@ -1387,4 +1387,4 @@ def velu(self, isog): or rem != 0: raise e else: - return self.category()(quo) + return self.category().object(quo) From f98c9686008acb0024d3be1bb562beaea42c4912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 8 Sep 2022 14:31:26 +0200 Subject: [PATCH 115/751] Change base for Drinfeld modules classes The so-called base of a Drinfeld module (or its category) was a field (the field of coefficients of the Ore polring). This was fundamentally misleading, as the good notion for the base is that of a morphism Fq[X] -> K. The base is now this morphism. Method change_ring was deleted. Doc is updated; tests pass. Some changes were made to other _repr_ and _latex_ methods. --- src/sage/categories/drinfeld_modules.py | 187 ++++---- .../function_field/drinfeld_modules/action.py | 42 +- .../drinfeld_modules/drinfeld_module.py | 398 +++++++----------- .../finite_drinfeld_module.py | 47 ++- .../function_field/drinfeld_modules/homset.py | 60 ++- .../drinfeld_modules/morphism.py | 67 +-- 6 files changed, 342 insertions(+), 459 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index d87436233a5..27480adb460 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -33,28 +33,26 @@ class DrinfeldModules(CategoryWithParameters): This class represents the category of Drinfeld modules on a given base. - Let `\phi` be a Drinfeld module in the present category. We denote - its function ring `\Fq[X]` and its base ring `K`. The `\Fq[X]`-field - structure on `K` is given by a morphism `\gamma` + The category is uniquely defined by its base, which is a ring + morphism from the function ring `\Fq[X]` to a field `K`. Note that + the base is a morphism, but not a field. The base is often denoted + `\gamma`, and we call `K` an *`\Fq[X]-field`*. + + The monic polynomial that generates the kernel of the base is called + the *`\Fq[X]`-characteristic of the `\Fq[X]`-field `K`*. .. NOTE:: These notations will be used throughout this documentation. - We say that `\Fq[X]` is the *function ring of the category*; `K` is - the *base of the category* (or simply its *base ring* or *base - field*); `\Fq[X]` is the *function ring of the category*; + We say that `\Fq[X]` is the *function ring of the category*; *K\{\tau\}* is the *Ore polynomial ring of the category*; `t` is the *Ore variable of the category*. The *constant coefficient of the - category* is `\gamma(X)`. The `\Fq[X]`-characteristic of the base - ring `K` can also be referred to as its *function - ring-characteristic*. - - .. NOTE:: - - The base is always a field. + category* is the image of `X` under the base. The + `\Fq[X]`-characteristic of the `\Fq[X]`-field `K` can also be + referred to as its *function ring-characteristic*. - INPUT: a ring morphism from the function ring to the base ring + INPUT: the base, a ring morphism .. RUBRIC:: Construction @@ -69,20 +67,20 @@ class DrinfeldModules(CategoryWithParameters): sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: cat - Category of Drinfeld modules defined by Ring morphism: + Category of Drinfeld modules defined over base Ring morphism: From: Univariate Polynomial Ring in X over Finite Field of size 11 To: Finite Field in z of size 11^4 Defn: X |--> z^3 + 7*z^2 + 6*z + 10 - The output tells the user that the category is only defined by the - ring morphism `\gamma`. + The output tells the user that the category is only defined by its + base. .. RUBRIC:: Properties of the category - The defining morphism is retrieved using the method + The base, which is a morphism, is retrieved using the method :meth:`morphism`:: - sage: cat.morphism() + sage: cat.base() Ring morphism: From: Univariate Polynomial Ring in X over Finite Field of size 11 To: Finite Field in z of size 11^4 @@ -94,44 +92,35 @@ class DrinfeldModules(CategoryWithParameters): sage: cat.constant_coefficient() z^3 + 7*z^2 + 6*z + 10 - sage: cat.morphism()(X) == cat.constant_coefficient() + sage: cat.base()(X) == cat.constant_coefficient() True Similarly, the *function ring-characteristic* of the category is either `0` or the unique monic polynomial in `\Fq[X]` that generates - `\mathrm{Ker}(\gamma)`:: + the kernel of the base:: sage: cat.characteristic() X^2 + 7*X + 2 - sage: cat.morphism()(cat.characteristic()) + sage: cat.base()(cat.characteristic()) 0 - Like for its Drinfeld modules, the *base* of the category is the - field `K`:: + The base, function ring and Ore polynomial ring are the + same for the category and its objects:: - sage: cat.base() - Finite Field in z of size 11^4 - sage: cat.base() is K + sage: cat.base() is phi.base() True - sage: cat.base() is phi.base_ring() - True - - And the *function ring* is the polynomial ring `\Fq[X]`:: + sage: cat.function_ring() is phi.function_ring() + True sage: cat.function_ring() Univariate Polynomial Ring in X over Finite Field of size 11 - sage: cat.function_ring() is FqX - True - sage: cat.function_ring() is phi.function_ring() + sage: cat.function_ring() is cat.base().domain() True - And as expected, the *Ore polynomial ring* is that of - the Drinfeld modules in the category: - - sage: cat.ore_polring() - Ore Polynomial Ring in t over Finite Field in z of size 11^4 twisted by z |--> z^11 sage: cat.ore_polring() is phi.ore_polring() True + sage: cat.ore_polring() + Ore Polynomial Ring in t over Finite Field in z of size 11^4 twisted by z |--> z^11 .. RUBRIC:: Creating Drinfeld module objects from the category @@ -140,7 +129,10 @@ class DrinfeldModules(CategoryWithParameters): sage: psi = cat.object([p_root, 1]) sage: psi - Drinfeld module defined by X |--> t + z^3 + 7*z^2 + 6*z + 10 over Finite Field in z of size 11^4 + Drinfeld module defined by X |--> t + z^3 + 7*z^2 + 6*z + 10 over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field of size 11 + To: Finite Field in z of size 11^4 + Defn: X |--> z^3 + 7*z^2 + 6*z + 10 sage: psi.category() is cat True @@ -169,42 +161,41 @@ class DrinfeldModules(CategoryWithParameters): sage: FqX. = Fq[] sage: K. = Fq.extension(4) sage: from sage.categories.drinfeld_modules import DrinfeldModules - sage: gamma = Hom(FqX, K)(0) - sage: cat = DrinfeldModules(gamma) + sage: base = Hom(FqX, K)(0) + sage: cat = DrinfeldModules(base) Traceback (most recent call last): ... - ValueError: the morphism must be non zero + ValueError: base must be a non zero morphism - sage: gamma = Hom(FqX, FqX)(1) - sage: cat = DrinfeldModules(gamma) + sage: base = Hom(FqX, FqX)(1) + sage: cat = DrinfeldModules(base) Traceback (most recent call last): ... - TypeError: base must be a field + TypeError: base codomain must be a field - sage: gamma = 'I hate Rostropovitch' - sage: cat = DrinfeldModules(gamma) # known bug (blankline) + sage: base = 'I hate Rostropovitch' + sage: cat = DrinfeldModules(base) # known bug (blankline) Traceback (most recent call last): ... TypeError: input must be a ring morphism sage: ZZT. = ZZ[] - sage: gamma = Hom(ZZT, K)(1) - sage: cat = DrinfeldModules(gamma) # known bug (blankline) + sage: base = Hom(ZZT, K)(1) + sage: cat = DrinfeldModules(base) # known bug (blankline) Traceback (most recent call last): ... TypeError: function ring base must be a finite field """ - def __init__(self, morphism, name='t'): - gamma = morphism + def __init__(self, base, name='t'): # Check input is a ring Morphism - if not isinstance(gamma, RingHomomorphism): + if not isinstance(base, RingHomomorphism): raise TypeError('input must be a Ring morphism') - self._morphism = morphism - self._function_ring = gamma.domain() - # Check domain is Fq[X] + self._base = base + self._function_ring = base.domain() + # Check domain of base is Fq[X] function_ring = self._function_ring if not isinstance(function_ring, PolynomialRing_general): raise NotImplementedError('function ring must be a polynomial ' @@ -216,27 +207,26 @@ def __init__(self, morphism, name='t'): Fq = function_ring_base FqX = function_ring X = FqX.gen() - # Check codomain of gamma is field - K = gamma.codomain() - self._base = K + # Check codomain of base is a field + K = base.codomain() if not K.is_field(): - raise TypeError('base must be a field') - # Check morphism is non zero - if gamma(X).is_zero(): - raise ValueError('the morphism must be non zero') + raise TypeError('base codomain must be a field') + # Check base is a non zero morphism + if base(X).is_zero(): + raise ValueError('base must be a non zero morphism') # Build K{t} d = log(Fq.cardinality(), Fq.characteristic()) tau = K.frobenius_endomorphism(d) self._ore_polring = OrePolynomialRing(K, tau, names=name, polcast=False) # Create constant coefficient - self._constant_coefficient = gamma(X) + self._constant_coefficient = base(X) # Create characteristic self._characteristic = None if K.is_finite(): - f = gamma * FqX.coerce_map_from(Fq) # Fq -> K + f = base * FqX.coerce_map_from(Fq) # Fq -> K E = K.over(f) - self._characteristic = FqX(E(gamma(X)).minpoly()) + self._characteristic = FqX(E(base(X)).minpoly()) elif FqX.is_subring(K): self._characteristic = Integer(0) @@ -259,7 +249,7 @@ def _latex_(self): sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: latex(cat) - \text{Category{ }of{ }Drinfeld{ }modules{ }defined{ }by\begin{array}{l} + \text{Category{ }of{ }Drinfeld{ }modules{ }defined{ }over{ }base{ }\begin{array}{l} \text{\texttt{Ring{ }morphism:}}\\ \text{\texttt{{ }{ }From:{ }Univariate{ }Polynomial{ }Ring{ }in{ }X{ }over{ }Finite{ }Field{ }of{ }size{ }11}}\\ \text{\texttt{{ }{ }To:{ }{ }{ }Finite{ }Field{ }in{ }z{ }of{ }size{ }11{\char`\^}4}}\\ @@ -267,7 +257,7 @@ def _latex_(self): \end{array} """ return f'\\text{{Category{{ }}of{{ }}Drinfeld{{ }}modules{{ }}' \ - f'defined{{ }}by{latex(self._morphism)}' + f'defined{{ }}over{{ }}base{{ }}{latex(self._base)}' def _repr_(self): r""" @@ -284,12 +274,12 @@ def _repr_(self): sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: cat - Category of Drinfeld modules defined by Ring morphism: + Category of Drinfeld modules defined over base Ring morphism: From: Univariate Polynomial Ring in X over Finite Field of size 11 To: Finite Field in z of size 11^4 Defn: X |--> z^3 + 7*z^2 + 6*z + 10 """ - return f'Category of Drinfeld modules defined by {self._morphism}' + return f'Category of Drinfeld modules defined over base {self._base}' # Somehow required for the class definition def Homsets(self): @@ -303,7 +293,7 @@ def base(self): r""" Return the base of the category. - OUTPUT: a ring + OUTPUT: a ring morphism EXAMPLES: @@ -313,9 +303,13 @@ def base(self): sage: p_root = z^3 + 7*z^2 + 6*z + 10 sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) sage: cat = phi.category() - sage: cat.base() - Finite Field in z of size 11^4 - sage: cat.base() is K + sage: base = cat.base() + sage: base + Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field of size 11 + To: Finite Field in z of size 11^4 + Defn: X |--> z^3 + 7*z^2 + 6*z + 10 + sage: base(X) == cat.constant_coefficient() True """ return self._base @@ -340,7 +334,10 @@ def characteristic(self): sage: L = Frac(FqX) sage: psi = DrinfeldModule(FqX, [L.gen(), 1]) sage: psi - Drinfeld module defined by X |--> t + X over Fraction Field of Univariate Polynomial Ring in X over Finite Field of size 11 + Drinfeld module defined by X |--> t + X over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field of size 11 + To: Fraction Field of Univariate Polynomial Ring in X over Finite Field of size 11 + Defn: X |--> X sage: fox = psi.category() sage: fox.characteristic() 0 @@ -353,7 +350,7 @@ def constant_coefficient(self): r""" Return the constant coefficient of the category. - OUTPUT: a base element + OUTPUT: an element in the base codomain EXAMPLES: @@ -365,7 +362,7 @@ def constant_coefficient(self): sage: cat = phi.category() sage: cat.constant_coefficient() z^3 + 7*z^2 + 6*z + 10 - sage: cat.constant_coefficient() == cat.morphism()(X) + sage: cat.constant_coefficient() == cat.base()(X) True """ return self._constant_coefficient @@ -391,31 +388,6 @@ def function_ring(self): """ return self._function_ring - def morphism(self): - r""" - Return the morphism that defines the category. - - OUTPUT: a ring morphism - - EXAMPLES: - - sage: Fq = GF(11) - sage: FqX. = Fq[] - sage: K. = Fq.extension(4) - sage: p_root = z^3 + 7*z^2 + 6*z + 10 - sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) - sage: cat = phi.category() - sage: gamma = cat.morphism() - sage: gamma - Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field of size 11 - To: Finite Field in z of size 11^4 - Defn: X |--> z^3 + 7*z^2 + 6*z + 10 - sage: gamma(X) == cat.constant_coefficient() - True - """ - return self._morphism - def object(self, gen): r""" Return a Drinfeld module object in the category whose generator @@ -436,7 +408,10 @@ def object(self, gen): sage: cat = phi.category() sage: psi = cat.object([p_root, 0, 1]) sage: psi - Drinfeld module defined by X |--> t^2 + z^3 + 7*z^2 + 6*z + 10 over Finite Field in z of size 11^4 + Drinfeld module defined by X |--> t^2 + z^3 + 7*z^2 + 6*z + 10 over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field of size 11 + To: Finite Field in z of size 11^4 + Defn: X |--> z^3 + 7*z^2 + 6*z + 10 sage: t = phi.ore_variable() sage: cat.object(t^3 + z^3 + 7*z^2 + 6*z + 10) is phi True @@ -445,8 +420,8 @@ def object(self, gen): # If gen is not in the Ore polring, an exception is raised gen = self._ore_polring(gen) X = self._function_ring.gen() - gamma = self._morphism - if gen[0] != gamma(X): + base = self._base + if gen[0] != base(X): raise ValueError('constant coefficient must be the generator ' 'of the morphism that defines the category') return DrinfeldModule(self._function_ring, gen) @@ -520,7 +495,7 @@ def random_object(self, rank): if rank <= 0: raise ValueError('rank must be a positive integer') - K = self._base + K = self._base.codomain() coeffs = [self._constant_coefficient] for _ in range(rank-1): coeffs.append(K.random_element()) diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index 28b585cd5dc..fbc1bbfe47b 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -52,7 +52,10 @@ class DrinfeldModuleAction(Action): sage: phi = DrinfeldModule(FqX, [z, 0, 0, 1]) sage: action = phi.action() sage: action - Action on Finite Field in z of size 11^2 induced by Drinfeld module defined by X |--> t^3 + z over Finite Field in z of size 11^2 + Action on Finite Field in z of size 11^2 induced by Drinfeld module defined by X |--> t^3 + z over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field of size 11 + To: Finite Field in z of size 11^2 + Defn: X |--> z The action on elements is computed as follows:: @@ -66,13 +69,6 @@ class DrinfeldModuleAction(Action): sage: action(FqX.random_element(), 0) 0 - To act on a field larger than `K`, one can change the ring of the - Drinfeld module, then create the action:: - - sage: extended_action = phi.change_ring(K.extension(2)).action() - sage: extended_action - Action on Finite Field in z4 of size 11^4 induced by Drinfeld module defined by X |--> t + 10*z4^3 + 4*z4^2 + 5*z4 + 5 over Finite Field in z4 of size 11^4 - Finally, given a Drinfeld module action, it is easy to recover the corresponding Drinfeld module:: @@ -84,8 +80,8 @@ def __init__(self, drinfeld_module): if not isinstance(drinfeld_module, DrinfeldModule): raise TypeError('input must be a DrinfeldModule') self._drinfeld_module = drinfeld_module - super().__init__(drinfeld_module.function_ring(), - drinfeld_module.base_ring()) + self._field = drinfeld_module.base().codomain() + super().__init__(drinfeld_module.function_ring(), self._field) def _act_(self, pol, x): r""" @@ -94,9 +90,9 @@ def _act_(self, pol, x): INPUT: - ``pol`` -- a function ring element - - ``x`` -- a base ring element + - ``x`` -- an element in the field acted upon - OUTPUT: an element in the base ring of the Drinfeld module + OUTPUT: an element in the base field of the Drinfeld module EXAMPLES: @@ -116,8 +112,8 @@ def _act_(self, pol, x): """ if pol not in self._drinfeld_module.function_ring(): raise TypeError('first input must be in the function ring') - if x not in self._drinfeld_module.base_ring(): - raise TypeError('second input must be in the base ring') + if x not in self._field: + raise TypeError('second input must be in the field acted upon') return self._drinfeld_module(pol)(x) def _latex_(self): @@ -134,11 +130,16 @@ def _latex_(self): sage: phi = DrinfeldModule(FqX, [z, 0, 0, 1]) sage: action = phi.action() sage: latex(action) - \text{Action{ }on{ }}\Bold{F}_{11^{2}}\text{{ }induced{ }by{ }}Drinfeld module defined by X |--> t^3 + z over Finite Field in z of size 11^2 + \text{Action{ }on{ }}\Bold{F}_{11^{2}}\text{{ }induced{ }by{ }}\text{Drinfeld{ }module{ }defined{ }by{ }} X \mapsto t^{3} + z\text{{ }over{ }base{ }}\begin{array}{l} + \text{\texttt{Ring{ }morphism:}}\\ + \text{\texttt{{ }{ }From:{ }Univariate{ }Polynomial{ }Ring{ }in{ }X{ }over{ }Finite{ }Field{ }of{ }size{ }11}}\\ + \text{\texttt{{ }{ }To:{ }{ }{ }Finite{ }Field{ }in{ }z{ }of{ }size{ }11{\char`\^}2}}\\ + \text{\texttt{{ }{ }Defn:{ }X{ }|{-}{-}>{ }z}} + \end{array} """ return f'\\text{{Action{{ }}on{{ }}}}' \ - f'{latex(self._drinfeld_module.base_ring())}\\text{{{{ }}' \ - f'induced{{ }}by{{ }}}}{self._drinfeld_module}' + f'{latex(self._field)}\\text{{{{ }}' \ + f'induced{{ }}by{{ }}}}{latex(self._drinfeld_module)}' def _repr_(self): r""" @@ -154,9 +155,12 @@ def _repr_(self): sage: phi = DrinfeldModule(FqX, [z, 0, 0, 1]) sage: action = phi.action() sage: action - Action on Finite Field in z of size 11^2 induced by Drinfeld module defined by X |--> t^3 + z over Finite Field in z of size 11^2 + Action on Finite Field in z of size 11^2 induced by Drinfeld module defined by X |--> t^3 + z over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field of size 11 + To: Finite Field in z of size 11^2 + Defn: X |--> z """ - return f'Action on {self._drinfeld_module.base_ring()} induced by ' \ + return f'Action on {self._field} induced by ' \ f'{self._drinfeld_module}' def drinfeld_module(self): diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 4263bbd44f8..63313a25d1b 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -40,15 +40,22 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): r""" This class represents a Drinfeld module. - Let `\Fq` be a finite field with order `q` and let `K` be a field - equipped a ring morphism `\gamma: \Fq[X] \to K`. The field `K` is - called an *`\Fq[X]`-field*, and the monic generator of - `\Ker(\gamma)` is called the *`\Fq[X]`-characteristic of the - `\Fq[X]`-field `K`*. + Let `\Fq[X]` be a polynomial ring with coefficients in a finite + field `\Fq` and let `K` be a field. We fix a ring morphism `\gamma: + \Fq[X] \to K`, which we call the *base* of the Drinfeld module. + We also call `K` an *`\Fq[X]`-field*. + + .. NOTE:: + + The base of the Drinfeld module is the base of the category of + the Drinfeld module. + + The monic polynomial that generates the kernel of the base is called + the *`\Fq[X]`-characteristic of the `\Fq[X]`-field `K`*. Let `K\{\tau\}` be the ring of Ore polynomials with coefficients in `K` and Frobenius variable `\tau: x \mapsto x^q`. A *Drinfeld - `\Fq[X]`-module over the `\Fq[X]`-field `K`* is an `\Fq`-algebra + `\Fq[X]`-module over the base `\gamma`* is an `\Fq`-algebra morphism `\phi: \Fq[X] \to K\{\tau\}` such that: 1. The image of `\phi` contains non-constant Ore polynomials. @@ -57,25 +64,16 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): For `a` in the function ring, `\phi(a)` is denoted `\phi_a`. - .. NOTE:: - - These notations will be used throughout the documentation. - - We say that `\Fq[X]` is the *function ring of `\phi`*; `K` is the - *base ring of `\phi`* (or simply its *base* or *base field*); - *K\{\tau\}* is the *Ore polynomial ring of `\phi`*; `t` is the *Ore - variable of `\phi`*. Further, the *generator of `\phi`* is `\phi_X` - and its *constant coefficient* is the constant coefficient of - `\phi_X`. The `\Fq[X]`-characteristic of the base ring `K` can also - be referred to as its *function ring-characteristic*. - - .. NOTE:: - - The base ring is always a field. - The Drinfeld module `\phi` is uniquely determined by the image `\phi_X` of `X`, which is an input of the class. + We say that `\Fq[X]` is the *function ring of `\phi`*; *K\{\tau\}* + is the *Ore polynomial ring of `\phi`*; `t` is the *Ore variable of + `\phi`*. Further, the *generator of `\phi`* is `\phi_X` and its + *constant coefficient* is the constant coefficient of `\phi_X`. The + `\Fq[X]`-characteristic of the `\Fq[X]`-field `K` can also be referred to as + its *function ring-characteristic*. + Classical references on Drinfeld modules include [Gos1998]_, [Rosen2002]_, [VS06]_ and [Gek1998]_. @@ -105,7 +103,10 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: K. = Fq.extension(6) sage: phi = DrinfeldModule(FqX, [z, 1, 1]) sage: phi - Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 + Drinfeld module defined by X |--> t^2 + t + z over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + To: Finite Field in z of size 3^12 + Defn: X |--> z In this example, we used a list of coefficients (``[z, 1, 1]``) to represent the generator `\phi_X = z + t + t^2`, `K = \Fq(z)`. One can @@ -116,7 +117,10 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: psi_X = z + t^3 sage: psi = DrinfeldModule(FqX, psi_X) sage: psi - Drinfeld module defined by X |--> t^3 + z over Finite Field in z of size 3^12 + Drinfeld module defined by X |--> t^3 + z over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + To: Finite Field in z of size 3^12 + Defn: X |--> z sage: psi(X) == psi_X True @@ -132,7 +136,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: DrinfeldModule(FqX, [K(0), K(1)]) Traceback (most recent call last): ... - ValueError: the morphism must be non zero + ValueError: base must be a non zero morphism The coefficients of the generator must lie in an `\Fq[X]`-field, where `\Fq[X]` is the function ring of the Drinfeld module:: @@ -140,12 +144,12 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: DrinfeldModule(FqX, [z, QQ(1)]) Traceback (most recent call last): ... - ValueError: function ring base must coerce into base ring + ValueError: function ring base must coerce into base codomain sage: DrinfeldModule(FqX, [1, QQ(1)]) Traceback (most recent call last): ... - ValueError: function ring base must coerce into base ring + ValueError: function ring base must coerce into base codomain The function ring must be an univariate polynomial ring whose base is a finite field:: @@ -175,44 +179,36 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): .. NOTE:: The reader may think that it is odd to build a Drinfeld module - without specifying the `\Fq[X]`-characteristic of the base (or, - more generally, its parent category). Indeed, the - `\Fq[X]`-characteristic plays the role of the characteristic of - a function field, and thus preexists Drinfeld modules. The base - field `K` should rather be seen as an `\Fq[X]`-field, i.e. the - field `K` equipped with a morphism `\gamma: \Fq[X] \to K`, - instead of just a field. - - However, as the characteristic may be deduced from the constant - coefficient of the Drinfeld module (it is its minimal polynomial - over the function ring), we chose to ommit the characteristic - in the input of the class in order to have concise definitions. - - .. RUBRIC:: Possible base rings - - The morphism `\gamma` does not need be surjective like in the above - examples. This is equivalent to say that the constant coefficient of - the Drinfeld module may be different to the generator of `K` over - `\Fq`. In the following example, `K` is still a degree six extension - of `\Fq`, but `\gamma` is a projection over a degree two extension - with modulus `X^3 + (z_2 + 2)X^2 + (6*z_2 + 1)X + 3z_2 + 5`:: + without explicitly specifying the base. However, the base can be + deduced from the generator, and we omit the base in the input + of the class for conciseness. + + .. RUBRIC:: Possible bases + + The base does not need be surjective like in the above examples. In + the following example, the base codomain is still a degree six + extension of `\Fq`, but the base is a projection over a degree two + extension with modulus `X^3 + (z_2 + 2)X^2 + (6*z_2 + 1)X + 3z_2 + + 5`:: sage: p = X^2 + z2 + 2 sage: p_root = z^10 + 2*z^9 + z^8 + z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z sage: rho = DrinfeldModule(FqX, [p_root, 1, 1]) sage: rho - Drinfeld module defined by X |--> t^2 + t + z^10 + 2*z^9 + z^8 + z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z over Finite Field in z of size 3^12 + Drinfeld module defined by X |--> t^2 + t + z^10 + 2*z^9 + z^8 + z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + To: Finite Field in z of size 3^12 + Defn: X |--> z^10 + 2*z^9 + z^8 + z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z - The morphisms `\gamma` are not the same for ``phi`` and ``rho``, and - that the `\gamma` associated to `\phi` is surjective, while the - other one is not:: + Drinfeld modules `\phi` and `\rho` have different based. That of + `\phi` is surjective while that of `\rho` is note:: - sage: rho.category().morphism() + sage: rho.category().base() Ring morphism: From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 To: Finite Field in z of size 3^12 Defn: X |--> z^10 + 2*z^9 + z^8 + z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z - sage: phi.category().morphism() + sage: phi.category().base() Ring morphism: From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 To: Finite Field in z of size 3^12 @@ -223,27 +219,22 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: sigma = DrinfeldModule(FqX, [Frac(FqX).gen(), 1, 1]) sage: sigma - Drinfeld module defined by X |--> t^2 + t + X over Fraction Field of Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + Drinfeld module defined by X |--> t^2 + t + X over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + To: Fraction Field of Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + Defn: X |--> X sage: sigma.is_finite() False sage: phi.is_finite() True - It is possible to change the base ring:: - - sage: L = K.extension(2) - sage: phi_rebased = phi.change_ring(L) - sage: Ltau = phi_rebased.ore_polring() - sage: Ltau(phi(X)) == phi_rebased(X) - True - .. RUBRIC:: The category of Drinfeld modules Drinfeld modules have their own category (see class :class:`sage.categories.drinfeld_modules.DrinfeldModules`):: sage: phi.category() - Category of Drinfeld modules defined by Ring morphism: + Category of Drinfeld modules defined over base Ring morphism: From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 To: Finite Field in z of size 3^12 Defn: X |--> z @@ -257,8 +248,8 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: char = phi.category().characteristic() - As the output of :meth:`category` suggests, the morphism `\gamma` - uniquely determines the category. + As the output of :meth:`category` suggests, the base uniquely + determines the category. .. RUBRIC:: Basics @@ -274,8 +265,8 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): This is useful to quickly retrieve the generator of the Drinfeld module. Furthermore, a Drinfeld `\Fq[X]`-module can be seen as an Ore polynomial with positive degree and constant coefficient - `\gamma(X)`. This analogy is the motivation for the following - methods:: + `\gamma(X)`, where `\gamma` is the base. This analogy is the + motivation for the following methods:: sage: phi.coefficients() [z, 1, 1] @@ -287,8 +278,11 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): One can retrieve basic properties:: - sage: phi.base_ring() # K - Finite Field in z of size 3^12 + sage: phi.base() + Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + To: Finite Field in z of size 3^12 + Defn: X |--> z sage: phi.ore_polring() # K{t} Ore Polynomial Ring in t over Finite Field in z of size 3^12 twisted by z |--> z^(3^2) @@ -357,19 +351,19 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: zero_morphism = hom(0) sage: frobenius_endomorphism Drinfeld Module morphism: - From: Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 - To: Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 - Defn: t^6 + From (gen): t^2 + t + z + To (gen): t^2 + t + z + Defn: t^6 sage: identity_morphism Drinfeld Module morphism: - From: Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 - To: Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 - Defn: 1 + From (gen): t^2 + t + z + To (gen): t^2 + t + z + Defn: 1 sage: zero_morphism Drinfeld Module morphism: - From: Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 - To: Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 - Defn: 0 + From (gen): t^2 + t + z + To (gen): t^2 + t + z + Defn: 0 The underlying Ore polynomial is retrieved with the method :meth:`ore_polynomial`:: @@ -404,7 +398,10 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: ore_pol = (2*z^6 + z^3 + 2*z^2 + z + 2)*t + z^11 + 2*z^10 + 2*z^9 + 2*z^8 + z^7 + 2*z^6 + z^5 + z^3 + z^2 + z sage: psi = phi.velu(ore_pol) sage: psi - Drinfeld module defined by X |--> (2*z^11 + 2*z^9 + z^6 + 2*z^5 + 2*z^4 + 2*z^2 + 1)*t^2 + (2*z^11 + 2*z^10 + 2*z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z)*t + z over Finite Field in z of size 3^12 + Drinfeld module defined by X |--> (2*z^11 + 2*z^9 + z^6 + 2*z^5 + 2*z^4 + 2*z^2 + 1)*t^2 + (2*z^11 + 2*z^10 + 2*z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z)*t + z over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + To: Finite Field in z of size 3^12 + Defn: X |--> z sage: ore_pol in Hom(phi, psi) True sage: ore_pol * phi(X) == psi(X) * ore_pol @@ -435,7 +432,10 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: action = phi.action() sage: action - Action on Finite Field in z of size 3^12 induced by Drinfeld module defined by X |--> t^2 + t + z over Finite Field in z of size 3^12 + Action on Finite Field in z of size 3^12 induced by Drinfeld module defined by X |--> t^2 + t + z over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + To: Finite Field in z of size 3^12 + Defn: X |--> z The action on elements is computed by calling the action object:: @@ -449,13 +449,6 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: action(FqX.random_element(), 0) 0 - To act on a field larger than `K`, one can change the ring of the - Drinfeld module, then create the action:: - - sage: extended_action = phi.change_ring(K.extension(5)).action() - sage: extended_action - Action on Finite Field in z60 of size 3^60 induced by Drinfeld module defined by X |--> t^2 + t + 2*z60^59 + z60^56 + 2*z60^55 + 2*z60^54 + 2*z60^53 + z60^49 + z60^48 + z60^47 + 2*z60^45 + z60^44 + 2*z60^41 + 2*z60^40 + 2*z60^39 + 2*z60^37 + 2*z60^36 + z60^34 + z60^33 + z60^32 + 2*z60^31 + 2*z60^30 + 2*z60^27 + 2*z60^25 + z60^23 + z60^22 + z60^21 + 2*z60^20 + z60^19 + z60^18 + z60^17 + z60^16 + z60^15 + 2*z60^14 + z60^12 + 2*z60^11 + 2*z60^10 + z60^8 + z60^6 + 2*z60^5 + z60^4 + z60^3 + z60 + 1 over Finite Field in z60 of size 3^60 - .. RUBRIC:: Inverting the Drinfeld module Given an Ore polynomial that equals `\phi_a` for some function ring @@ -473,7 +466,7 @@ class DrinfeldModule(UniqueRepresentation, CategoryObject): sage: phi = DrinfeldModule(FqX, [1, 1]) Traceback (most recent call last): ... - ValueError: function ring base must coerce into base ring + ValueError: function ring base must coerce into base codomain sage: Fq = K = GF(2) sage: FqX. = Fq[] @@ -516,13 +509,13 @@ def __classcall_private__(cls, function_ring, gen, name='t'): if not (hasattr(ore_polring_base, 'has_coerce_map_from') and ore_polring_base.has_coerce_map_from( function_ring.base_ring())): - raise ValueError('function ring base must coerce into base ring') + raise ValueError('function ring base must coerce into base codomain') # Build the morphism that defines the category - gamma = function_ring.hom([ore_polring_base(gen[0])]) + base = function_ring.hom([ore_polring_base(gen[0])]) # Other checks in the category definition - category = DrinfeldModules(gamma, name=name) + category = DrinfeldModules(base, name=name) # Check gen as Ore polynomial if ore_polring is not None and \ @@ -541,7 +534,7 @@ def __classcall_private__(cls, function_ring, gen, name='t'): def __init__(self, gen, category): super().__init__(category=category) - self._base_ring = category.base() + self._base = category.base() self._function_ring = category.function_ring() self._gen = gen self._morphism = category._function_ring.hom([gen]) @@ -558,7 +551,7 @@ def __call__(self, a): - ``a`` -- a function ring element - OUTPUT: a base ring element + OUTPUT: an element in the base codomain TESTS: @@ -582,7 +575,7 @@ def __call__(self, a): True sage: a = FqX.random_element(5) - sage: phi(a)[0] == phi.category().morphism()(a) + sage: phi(a)[0] == phi.category().base()(a) True """ return self._morphism(a) @@ -644,12 +637,17 @@ def _latex_(self): sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) sage: latex(phi) - \text{Drinfeld{ }module{ }defined{ }by{ }} X \mapsto z_{12}^{5} t^{2} + z_{12}^{3} t + 2 z_{12}^{11} + 2 z_{12}^{10} + z_{12}^{9} + 3 z_{12}^{8} + z_{12}^{7} + 2 z_{12}^{5} + 2 z_{12}^{4} + 3 z_{12}^{3} + z_{12}^{2} + 2 z_{12}\text{{ }over{ }}\Bold{F}_{5^{12}} + \text{Drinfeld{ }module{ }defined{ }by{ }} X \mapsto z_{12}^{5} t^{2} + z_{12}^{3} t + 2 z_{12}^{11} + 2 z_{12}^{10} + z_{12}^{9} + 3 z_{12}^{8} + z_{12}^{7} + 2 z_{12}^{5} + 2 z_{12}^{4} + 3 z_{12}^{3} + z_{12}^{2} + 2 z_{12}\text{{ }over{ }base{ }}\begin{array}{l} + \text{\texttt{Ring{ }morphism:}}\\ + \text{\texttt{{ }{ }From:{ }Univariate{ }Polynomial{ }Ring{ }in{ }X{ }over{ }Finite{ }Field{ }in{ }z2{ }of{ }size{ }5{\char`\^}2}}\\ + \text{\texttt{{ }{ }To:{ }{ }{ }Finite{ }Field{ }in{ }z12{ }of{ }size{ }5{\char`\^}12}}\\ + \text{\texttt{{ }{ }Defn:{ }X{ }|{-}{-}>{ }2*z12{\char`\^}11{ }+{ }2*z12{\char`\^}10{ }+{ }z12{\char`\^}9{ }+{ }3*z12{\char`\^}8{ }+{ }z12{\char`\^}7{ }+{ }2*z12{\char`\^}5{ }+{ }2*z12{\char`\^}4{ }+{ }3*z12{\char`\^}3{ }+{ }z12{\char`\^}2{ }+{ }2*z12}} + \end{array} """ return f'\\text{{Drinfeld{{ }}module{{ }}defined{{ }}by{{ }}}} ' \ f'{latex(self._function_ring.gen())} '\ f'\\mapsto {latex(self._gen)}' \ - f'\\text{{{{ }}over{{ }}}}{latex(self._base_ring)}' + f'\\text{{{{ }}over{{ }}base{{ }}}}{latex(self._base)}' def _repr_(self): r""" @@ -665,16 +663,19 @@ def _repr_(self): sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) sage: phi - Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 + Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + To: Finite Field in z12 of size 5^12 + Defn: X |--> 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 """ return f'Drinfeld module defined by {self._function_ring.gen()} ' \ - f'|--> {self._gen} over {self._base_ring}' + f'|--> {self._gen} over base {self._base}' def action(self): r""" Return the action object (:class:`sage.rings.function_field.drinfeld_modules.action.Action`) - that represents the module action, on the base ring, that is + that represents the module action, on the base codomain, that is induced by the Drinfeld module. OUTPUT: a Drinfeld module action object @@ -688,7 +689,10 @@ def action(self): sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) sage: action = phi.action() sage: action - Action on Finite Field in z12 of size 5^12 induced by Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 + Action on Finite Field in z12 of size 5^12 induced by Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + To: Finite Field in z12 of size 5^12 + Defn: X |--> 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 The action on elements is computed as follows:: @@ -704,11 +708,11 @@ def action(self): from sage.rings.function_field.drinfeld_modules.action import DrinfeldModuleAction return DrinfeldModuleAction(self) - def base_ring(self): + def base(self): r""" - Return the base ring of the Drinfeld module. + Return the base of the Drinfeld module. - OUTPUT: a field + OUTPUT: a ring morphism EXAMPLES: @@ -717,29 +721,29 @@ def base_ring(self): sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: phi.base_ring() - Finite Field in z12 of size 5^12 - - This is always true:: - - sage: phi.base_ring() is phi.ore_polring().base_ring() - True - sage: phi.base_ring() is K - True + sage: phi.base() + Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + To: Finite Field in z12 of size 5^12 + Defn: X |--> 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - The base ring can be infinite:: + The base codomain can be infinite:: sage: sigma = DrinfeldModule(FqX, [Frac(FqX).gen(), 1]) - sage: sigma.base_ring() - Fraction Field of Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + sage: sigma.base() + Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + To: Fraction Field of Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + Defn: X |--> X - Or it can be ``Fq``:: + And it can also be the base field of the function ring:: sage: psi = DrinfeldModule(FqX, [Fq(1), Fq.gen()]) - sage: psi.base_ring() - Finite Field in z2 of size 5^2 - sage: psi.base_ring() is Fq - True + sage: psi.base() + Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + To: Finite Field in z2 of size 5^2 + Defn: X |--> 1 In this case the Ore polynomial ring is isomorphic to a regular polynomial ring:: @@ -754,84 +758,17 @@ def base_ring(self): sage: psi.ore_polring().twisting_morphism().is_identity() True - sage: psi.base_ring() is psi.function_ring().base_ring() + sage: psi.base().codomain() is psi.function_ring().base_ring() True """ - return self._base_ring - - def change_ring(self, new_field, name=None): - r""" - Return a Drinfeld module defined like the current one, but whose - base ring ``new_field``. - - The new base is valid whether it has a coercion map from the - current base. - - INPUT: - - - ``new_field`` -- the field extension of the base ring that - serves as base ring for the new Drinfeld module - - OUTPUT: a Drinfeld module - - EXAMPLES: - - The new ring can be an extension of the base ring:: - - sage: Fq = GF(25) - sage: FqX. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, p_root^3, 2]) - sage: K2 = K.extension(2) - sage: phi_2 = phi.change_ring(K2) - sage: phi_2 - Drinfeld module defined by X |--> 2*t^2 + (3*z24^23 + 2*z24^22 + 2*z24^20 + z24^19 + 4*z24^18 + 3*z24^17 + 4*z24^15 + 2*z24^13 + 4*z24^12 + 4*z24^11 + 3*z24^10 + 3*z24^9 + 4*z24^8 + 4*z24^6 + 3*z24^5 + 4*z24^4 + 4*z24^3 + 2*z24)*t + 2*z24^23 + 2*z24^22 + z24^21 + 2*z24^20 + z24^19 + 2*z24^18 + 3*z24^17 + 2*z24^16 + 4*z24^12 + 3*z24^11 + 4*z24^10 + z24^9 + z24^8 + 3*z24^7 + 2*z24^6 + z24^4 + 4*z24^3 + 3*z24^2 + 3*z24 + 2 over Finite Field in z24 of size 5^24 - - And one can check various things:: - - sage: phi.change_ring(K2).change_ring(K) is phi - True - sage: phi_2.base_ring() is K2 - True - - Naturally, the category has changed:: - - sage: phi_2.category() - Category of Drinfeld modules defined by Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 - To: Finite Field in z24 of size 5^24 - Defn: X |--> 2*z24^23 + 2*z24^22 + z24^21 + 2*z24^20 + z24^19 + 2*z24^18 + 3*z24^17 + 2*z24^16 + 4*z24^12 + 3*z24^11 + 4*z24^10 + z24^9 + z24^8 + 3*z24^7 + 2*z24^6 + z24^4 + 4*z24^3 + 3*z24^2 + 3*z24 + 2 - - One can also change the base ring to a subfield, even though some things - do not work as expected:: - - sage: K0 = Fq.extension(2) - sage: phi_0 = phi.change_ring(K0) - sage: phi_0.base_ring() is K0 - True - sage: phi.change_ring(K0).change_ring(K) # known bug - Traceback (most recent call last): - ... - TypeError: no coercion defined - - Furthermore:: - - sage: phi.change_ring(K) is phi - True - """ - coeffs = self._gen.coefficients() - new_coeffs = list(map(new_field, coeffs)) - if name is None: - name = self._ore_polring.variable_name() - return DrinfeldModule(self._function_ring, new_coeffs, name=name) + return self._base def constant_coefficient(self): r""" Return the constant coefficient of the generator. - OUTPUT: a base ring element + OUTPUT: an element in the base codomain EXAMPLES: @@ -843,13 +780,13 @@ def constant_coefficient(self): sage: phi.constant_coefficient() == p_root True - Let `\Fq[X]` be the function ring, and let `\gamma` the morphism - defining the `\Fq[X]`-field structure of the base ring. The - constant coefficient equals `\gamma(X)`:: + Let `\Fq[X]` be the function ring, and let `\gamma` the base of + the Drinfeld module. The constant coefficient equals + `\gamma(X)`:: sage: cat = phi.category() - sage: gamma = cat.morphism() - sage: gamma(X) == phi.constant_coefficient() + sage: base = cat.base() + sage: base(X) == phi.constant_coefficient() True Naturally, two Drinfeld modules in the same category have the @@ -858,7 +795,10 @@ def constant_coefficient(self): sage: t = phi.ore_variable() sage: psi = cat.object(phi.constant_coefficient() + t^3) sage: psi - Drinfeld module defined by X |--> t^3 + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 + Drinfeld module defined by X |--> t^3 + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + To: Finite Field in z12 of size 5^12 + Defn: X |--> 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 Reciprocally, it is impossible to create two Drinfeld modules in this category if they do not share the same constant @@ -879,7 +819,7 @@ def coefficient(self, n): - ``n`` -- a non-negative integer - OUTPUT: a base ring element + OUTPUT: an element in the base codomain EXAMPLES: @@ -918,7 +858,7 @@ def coefficients(self, sparse=True): - ``sparse`` -- a boolean - OUTPUT: a list of base ring elements + OUTPUT: a list of elements in the base codomain EXAMPLES: @@ -1074,7 +1014,7 @@ def invert(self, ore_pol): r = self.rank() if ore_pol not in self._ore_polring: raise TypeError('input must be an Ore polynomial') - if ore_pol in self._base_ring: + if ore_pol in self._base.codomain(): return self._Fq(ore_pol) if deg % r != 0: raise ValueError('input must be in the image of the Drinfeld ' @@ -1124,13 +1064,12 @@ def j_invariant(self): Return the j-invariant of the Drinfeld module if the rank is two; raise a NotImplementedError otherwise. - Assume the rank is two. Write the generator `\phi_X = \gamma(X) - + g\tau + \Delta\tau^2`. The j-invariant is defined by + Assume the rank is two. Write the generator `\phi_X = \omega + + g\tau + \Delta\tau^2`. The j-invariant is defined by `\frac{g^{q+1}}{\Delta}`, `q` being the order of the base field - of the function ring. In our case, this base field is always - finite. + of the function ring. In our case, this field is always finite. - OUTPUT: a base ring element + OUTPUT: an element in the base codomain EXAMPLES: @@ -1163,50 +1102,6 @@ def j_invariant(self): return (g**(q+1)) / delta def morphism(self): - r""" - Return the morphism object that defines the Drinfeld module. - - OUTPUT: a ring morphism from the function ring to the Ore - polynomial ring - - EXAMPLES: - - sage: Fq = GF(25) - sage: FqX. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: phi.morphism() - Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 - To: Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 twisted by z12 |--> z12^(5^2) - Defn: X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: from sage.rings.morphism import RingHomomorphism - sage: isinstance(phi.morphism(), RingHomomorphism) - True - - Actually, the ``DrinfeldModule`` method ``__call__`` simply - class the ``__call__`` method of this morphism:: - - sage: phi.morphism()(X) == phi(X) - True - sage: a = FqX.random_element() - sage: phi.morphism()(a) == phi(a) - True - - And many methods of the Drinfeld module have a counterpart in - the morphism object:: - - sage: m = phi.morphism() - sage: m.domain() is phi.function_ring() - True - sage: m.codomain() is phi.ore_polring() - True - sage: m.im_gens() - [z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12] - sage: phi(X) == m.im_gens()[0] - True - """ return self._morphism def ore_polring(self): @@ -1349,7 +1244,10 @@ def velu(self, isog): sage: isog = t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 sage: psi = phi.velu(isog) sage: psi - Drinfeld module defined by X |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 + Drinfeld module defined by X |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + To: Finite Field in z12 of size 5^12 + Defn: X |--> 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: isog in Hom(phi, psi) True diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index afb02c5eba6..18003d62d3c 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -29,7 +29,7 @@ class FiniteDrinfeldModule(DrinfeldModule): r""" This class represents a finite Drinfeld module. - A *finite Drinfeld module* is a Drinfeld module whose base ring is + A *finite Drinfeld module* is a Drinfeld module whose base field is finite. For general definitions and help on Drinfeld modules, see class @@ -70,9 +70,9 @@ class FiniteDrinfeldModule(DrinfeldModule): sage: frobenius_endomorphism = phi.frobenius_endomorphism() sage: frobenius_endomorphism Drinfeld Module morphism: - From: Drinfeld module defined by X |--> 5*t^2 + z6 over Finite Field in z6 of size 7^6 - To: Drinfeld module defined by X |--> 5*t^2 + z6 over Finite Field in z6 of size 7^6 - Defn: t^2 + From (gen): 5*t^2 + z6 + To (gen): 5*t^2 + z6 + Defn: t^2 Its characteristic polynomial can be computed:: @@ -129,15 +129,15 @@ def frobenius_endomorphism(self): sage: phi = DrinfeldModule(FqX, [1, 0, z6]) sage: phi.frobenius_endomorphism() Drinfeld Module morphism: - From: Drinfeld module defined by X |--> z6*t^2 + 1 over Finite Field in z6 of size 7^6 - To: Drinfeld module defined by X |--> z6*t^2 + 1 over Finite Field in z6 of size 7^6 - Defn: t^2 + From (gen): z6*t^2 + 1 + To (gen): z6*t^2 + 1 + Defn: t^2 sage: from sage.rings.function_field.drinfeld_modules.morphism import DrinfeldModuleMorphism sage: isinstance(phi.frobenius_endomorphism(), DrinfeldModuleMorphism) True """ t = self.ore_variable() - L = self._base_ring + L = self._base.codomain() Fq = self._function_ring.base_ring() deg = L.over(Fq).degree(Fq) return self._Hom_(self, category=self.category())(t**deg) @@ -160,7 +160,7 @@ def frobenius_charpoly(self, var='T'): Let `\chi = T^2 - A(X)T + B(X)` be the characteristic polynomial of the Frobenius endomorphism, let `t^n` be the Ore polynomial that defines the Frobenius endomorphism of `\phi`; by - definition, `n` is the degree of the base ring over `\Fq`. We + definition, `n` is the degree over `\Fq` of the base codomain. We have `\chi(t^n)(\phi(X)) = t^{2n} - \phi_A t^n + \phi_B = 0`, with `\deg(A) \leq \frac{n}{2}` and `\deg(B) = n`. @@ -195,7 +195,7 @@ def frobenius_charpoly(self, var='T'): sage: B (5*z3^2 + 2*z3)*X^2 + (4*z3^2 + 3*z3)*X + 5*z3^2 + 2*z3 - sage: n = 2 # Degree of the base ring over Fq + sage: n = 2 # Degree over Fq of the base codomain sage: A.degree() <= n/2 True sage: B.degree() == n @@ -229,7 +229,7 @@ def frobenius_norm(self): Frobenius endomorphism. The *Frobenius norm* is defined as the polynomial `B(X) \in \Fq[X]`. - Let `n` be the degree of the base ring over `\Fq`. Then the + Let `n` be the degree over `\Fq` of the base codomain. Then the Frobenius norm has degree `n`. OUTPUT: an element in the function ring @@ -244,7 +244,7 @@ def frobenius_norm(self): sage: B (5*z3^2 + 2*z3)*X^2 + (4*z3^2 + 3*z3)*X + 5*z3^2 + 2*z3 - sage: n = 2 # Degree of the base ring over Fq + sage: n = 2 # Degree over Fq of the base codomain sage: B.degree() == n True @@ -257,13 +257,14 @@ def frobenius_norm(self): Gekeler, given in [SM2019]_, Section 4, Proposition 3. """ self._check_rank_two() + L = self._base.codomain().over(self._Fq) # Notations from Schost-Musleh: if self._frobenius_norm is None: - n = self._base_ring.over(self._Fq).degree_over(self._Fq) + n = L.degree_over(self._Fq) d = self.characteristic().degree() m = n // d delta = self._gen[2] - norm = self._base_ring.over(self._Fq)(delta).norm() + norm = L(delta).norm() char = self.characteristic() self._frobenius_norm = ((-1)**n) * (char**m) / norm return self._frobenius_norm @@ -278,7 +279,7 @@ def frobenius_trace(self): Frobenius endomorphism. The *Frobenius norm* is defined as the polynomial `B(X) \in \Fq[X]`. - Let `n` be the degree of the base ring over `\Fq`. Then the + Let `n` be the degree over `\Fq` of the base codomain. Then the Frobenius trace has degree `\leq \frac{n}{2}`. OUTPUT: an element in the function ring @@ -306,7 +307,7 @@ def frobenius_trace(self): sage: A (4*z3^2 + 6*z3 + 3)*X + 3*z3^2 + z3 + 4 - sage: n = 2 # Degree of the base ring over Fq + sage: n = 2 # Degree over Fq of the base codomain sage: A.degree() <= n/2 True @@ -316,7 +317,7 @@ def frobenius_trace(self): self._check_rank_two() # Notations from Schost-Musleh: if self._frobenius_trace is None: - n = self._base_ring.over(self._Fq).degree_over(self._Fq) + n = self._base.codomain().over(self._Fq).degree_over(self._Fq) B = self.frobenius_norm() t = self.ore_polring().gen() self._frobenius_trace = self.invert(t**n + (self(B) // t**n)) @@ -328,9 +329,9 @@ def is_ordinary(self): NotImplementedError if the rank is not two. A rank two finite Drinfeld module is *ordinary* if and only if - the `\Fq[X]-characteristic of the base ring does not divide the - Frobenius trace. A *supersingular* rank two finite Drinfeld - module is a Drinfeld module that is not ordinary. + the function field-characteristic does not divide the Frobenius + trace. A *supersingular* rank two finite Drinfeld module is a + Drinfeld module that is not ordinary. A rnak two Drinfeld module is *ordinary* if and only if it is note supersingular; see :meth:`is_supersingular`. @@ -367,9 +368,9 @@ def is_supersingular(self): NotImplementedError if the rank is not two. A rank two finite Drinfeld module is *supersingular* if and only - if the function field-characteristic of the base ring divides - the Frobenius trace. An *ordinary* rank two finite Drinfeld - module is a Drinfeld module that is not supersingular. + if the function field-characteristic divides the Frobenius + trace. An *ordinary* rank two finite Drinfeld module is a + Drinfeld module that is not supersingular. OUTPUT: a boolean diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index df176bfafa6..e70a06db2b3 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -45,9 +45,7 @@ class DrinfeldModuleHomset(Homset): sage: psi = DrinfeldModule(FqX, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) sage: hom = Hom(phi, psi) sage: hom - Set of Drinfeld module morphisms: - From: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 - To: Drinfeld module defined by X |--> 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 over Finite Field in z6 of size 3^6 + Set of Drinfeld module morphisms from (gen) 2*t^2 + z6*t + z6 to (gen) 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 sage: from sage.rings.function_field.drinfeld_modules.homset import DrinfeldModuleHomset sage: isinstance(hom, DrinfeldModuleHomset) @@ -57,9 +55,7 @@ class DrinfeldModuleHomset(Homset): sage: end = End(phi) sage: end - Set of Drinfeld module morphisms: - From: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 - To: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 + Set of Drinfeld module morphisms from (gen) 2*t^2 + z6*t + z6 to (gen) 2*t^2 + z6*t + z6 sage: end is Hom(phi, phi) True @@ -69,23 +65,23 @@ class DrinfeldModuleHomset(Homset): sage: identity_morphism = end(1) sage: identity_morphism Drinfeld Module morphism: - From: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 - To: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 - Defn: 1 + From (gen): 2*t^2 + z6*t + z6 + To (gen): 2*t^2 + z6*t + z6 + Defn: 1 sage: frobenius_endomorphism = end(t^6) sage: frobenius_endomorphism Drinfeld Module morphism: - From: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 - To: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 - Defn: t^6 + From (gen): 2*t^2 + z6*t + z6 + To (gen): 2*t^2 + z6*t + z6 + Defn: t^6 sage: isogeny = hom(t + 1) sage: isogeny Drinfeld Module morphism: - From: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 - To: Drinfeld module defined by X |--> 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 over Finite Field in z6 of size 3^6 - Defn: t + 1 + From (gen): 2*t^2 + z6*t + z6 + To (gen): 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 + Defn: t + 1 And one can test if an Ore polynomial defines a morphism using the ``in`` syntax:: @@ -146,11 +142,12 @@ def _latex_(self): sage: psi = DrinfeldModule(FqX, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) sage: hom = Hom(phi, psi) sage: latex(hom) - \text{Set{ }of{ }Drinfeld{ }module{ }morphisms{ }from}\text{Drinfeld{ }module{ }defined{ }by{ }} X \mapsto 2 t^{2} + z_{6} t + z_{6}\text{{ }over{ }}\Bold{F}_{3^{6}}\text{{ }to{ }}Drinfeld module defined by X |--> 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 over Finite Field in z6 of size 3^6 + \text{Set{ }of{ }Drinfeld{ }module{ }morphisms{ }from{ }(gen){ }}2 t^{2} + z_{6} t + z_{6}\text{{ }to{ }(gen){ }}2 t^{2} + \left(2 z_{6}^{5} + 2 z_{6}^{4} + 2 z_{6} + 1\right) t + z_{6} """ return f'\\text{{Set{{ }}of{{ }}Drinfeld{{ }}module{{ }}morphisms' \ - f'{{ }}from}}{latex(self.domain())}\\text{{{{ }}to{{ }}}}' \ - f'{self.codomain()}' + f'{{ }}from{{ }}(gen){{ }}}}{latex(self.domain().gen())}' \ + f'\\text{{{{ }}to{{ }}(gen){{ }}}}'\ + f'{latex(self.codomain().gen())}' def _repr_(self): r""" @@ -167,13 +164,10 @@ def _repr_(self): sage: psi = DrinfeldModule(FqX, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) sage: hom = Hom(phi, psi) sage: hom - Set of Drinfeld module morphisms: - From: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 - To: Drinfeld module defined by X |--> 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 over Finite Field in z6 of size 3^6 + Set of Drinfeld module morphisms from (gen) 2*t^2 + z6*t + z6 to (gen) 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 """ - return f'Set of Drinfeld module morphisms:\n' \ - f' From: {self.domain()}\n' \ - f' To: {self.codomain()}' + return f'Set of Drinfeld module morphisms from (gen) '\ + f'{self.domain().gen()} to (gen) {self.codomain().gen()}' def __contains__(self, x): r""" @@ -254,23 +248,23 @@ def _element_constructor_(self, *args, **kwds): sage: identity_morphism = end(1) sage: identity_morphism Drinfeld Module morphism: - From: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 - To: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 - Defn: 1 + From (gen): 2*t^2 + z6*t + z6 + To (gen): 2*t^2 + z6*t + z6 + Defn: 1 sage: frobenius_endomorphism = end(t^6) sage: frobenius_endomorphism Drinfeld Module morphism: - From: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 - To: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 - Defn: t^6 + From (gen): 2*t^2 + z6*t + z6 + To (gen): 2*t^2 + z6*t + z6 + Defn: t^6 sage: isogeny = hom(t + 1) sage: isogeny Drinfeld Module morphism: - From: Drinfeld module defined by X |--> 2*t^2 + z6*t + z6 over Finite Field in z6 of size 3^6 - To: Drinfeld module defined by X |--> 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 over Finite Field in z6 of size 3^6 - Defn: t + 1 + From (gen): 2*t^2 + z6*t + z6 + To (gen): 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 + Defn: t + 1 """ # NOTE: This used to be self.element_class(self, ...), but this # would call __init__ instead of __classcall_private__. This diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index d8e8a7adc41..503c9a8fd6b 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -29,12 +29,11 @@ class DrinfeldModuleMorphism(UniqueRepresentation, Element, r""" This class represents a Drinfeld module morphism. - Let `\phi, \psi` be two Drinfeld modules with function ring `\Fq[X]` - and base ring `K`, whose `\Fq[X]`-field structure is given by a - morphism `\gamma`. A *morphism of Drinfeld modules `\phi \to \psi`* - is an Ore polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a - f` for every `a \in \Fq[X]`. In our case, this is equivalent to `f - \phi_X = \psi_X f`. An *isogeny* is a non-zero morphism. + Let `\phi, \psi` be two Drinfeld modules with base `\Fq[X] \to K`. A + *morphism of Drinfeld modules `\phi \to \psi`* is an Ore polynomial + `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for every `a \in + \Fq[X]`. In our case, this is equivalent to `f \phi_X = \psi_X f`. + An *isogeny* is a non-zero morphism. To create a morphism object, the user should never explicitly instantiate `DrinfeldModuleMorphism`, but rather call the parent @@ -51,19 +50,25 @@ class DrinfeldModuleMorphism(UniqueRepresentation, Element, sage: morphism = Hom(phi, psi)(ore_pol) sage: morphism Drinfeld Module morphism: - From: Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 - To: Drinfeld module defined by X |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 - Defn: t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 + From (gen): z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + To (gen): (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + Defn: t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 We can get basic data on the morphism:: sage: morphism.domain() - Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 + Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + To: Finite Field in z12 of size 5^12 + Defn: X |--> 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: morphism.domain() is phi True sage: morphism.codomain() - Drinfeld module defined by X |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 + Drinfeld module defined by X |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + To: Finite Field in z12 of size 5^12 + Defn: X |--> 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: morphism.codomain() is psi True @@ -101,9 +106,9 @@ class DrinfeldModuleMorphism(UniqueRepresentation, Element, sage: from sage.rings.function_field.drinfeld_modules.morphism import DrinfeldModuleMorphism sage: DrinfeldModuleMorphism(Hom(phi, psi), ore_pol) Drinfeld Module morphism: - From: Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 - To: Drinfeld module defined by X |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 - Defn: t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 + From (gen): z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + To (gen): (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + Defn: t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 sage: DrinfeldModuleMorphism(Hom(phi, psi), ore_pol) is morphism True """ @@ -149,17 +154,17 @@ def _latex_(self): sage: latex(morphism) \begin{array}{l} \text{Drinfeld{ }module{ }morphism:}\\ - \text{{ }{ }From:{ }}\text{Drinfeld{ }module{ }defined{ }by{ }} X \mapsto t^{2} + t + z_{6}\text{{ }over{ }}\Bold{F}_{2^{6}}}\\ - \text{{ }{ }To:{ }}{ }{ }\text{Drinfeld{ }module{ }defined{ }by{ }} X \mapsto t^{2} + \left(z_{6}^{4} + z_{6}^{2} + 1\right) t + z_{6}\text{{ }over{ }}\Bold{F}_{2^{6}}\\ + \text{{ }{ }From (gen):{ }}t^{2} + t + z_{6}\\ + \text{{ }{ }To (gen):{ }}{ }{ }t^{2} + \left(z_{6}^{4} + z_{6}^{2} + 1\right) t + z_{6}\\ \text{{ }{ }Defn:{ }}t + z_{6}^{5} + z_{6}^{2} + 1 \end{array} """ return f'\\begin{{array}}{{l}}\n' \ f'\\text{{Drinfeld{{ }}module{{ }}morphism:}}\\\\\n' \ - f'\\text{{{{ }}{{ }}From:{{ }}}}'\ - f'{latex(self._domain)}}}\\\\\n' \ - f'\\text{{{{ }}{{ }}To:{{ }}}}{{ }}{{ }}' \ - f'{latex(self._codomain)}\\\\\n' \ + f'\\text{{{{ }}{{ }}From (gen):{{ }}}}'\ + f'{latex(self._domain.gen())}\\\\\n' \ + f'\\text{{{{ }}{{ }}To (gen):{{ }}}}{{ }}{{ }}' \ + f'{latex(self._codomain.gen())}\\\\\n' \ f'\\text{{{{ }}{{ }}Defn:{{ }}}}' \ f'{latex(self._ore_polynomial)}\n' \ f'\\end{{array}}' @@ -180,14 +185,14 @@ def _repr_(self): sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) sage: morphism Drinfeld Module morphism: - From: Drinfeld module defined by X |--> t^2 + t + z6 over Finite Field in z6 of size 2^6 - To: Drinfeld module defined by X |--> t^2 + (z6^4 + z6^2 + 1)*t + z6 over Finite Field in z6 of size 2^6 - Defn: t + z6^5 + z6^2 + 1 + From (gen): t^2 + t + z6 + To (gen): t^2 + (z6^4 + z6^2 + 1)*t + z6 + Defn: t + z6^5 + z6^2 + 1 """ return f'Drinfeld Module morphism:\n' \ - f' From: {self._domain}\n' \ - f' To: {self._codomain}\n' \ - f' Defn: {self._ore_polynomial}' + f' From (gen): {self._domain.gen()}\n' \ + f' To (gen): {self._codomain.gen()}\n' \ + f' Defn: {self._ore_polynomial}' def codomain(self): r""" @@ -203,7 +208,10 @@ def codomain(self): sage: t = phi.ore_variable() sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) sage: morphism.codomain() - Drinfeld module defined by X |--> t^2 + (z6^4 + z6^2 + 1)*t + z6 over Finite Field in z6 of size 2^6 + Drinfeld module defined by X |--> t^2 + (z6^4 + z6^2 + 1)*t + z6 over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field of size 2 (using GF2X) + To: Finite Field in z6 of size 2^6 + Defn: X |--> z6 sage: morphism.codomain() is psi True """ @@ -223,7 +231,10 @@ def domain(self): sage: t = phi.ore_variable() sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) sage: morphism.domain() - Drinfeld module defined by X |--> t^2 + t + z6 over Finite Field in z6 of size 2^6 + Drinfeld module defined by X |--> t^2 + t + z6 over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field of size 2 (using GF2X) + To: Finite Field in z6 of size 2^6 + Defn: X |--> z6 sage: morphism.domain() is phi True """ From cfad9600155f0c1ae0cc95c83cc86f9a3b464bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 8 Sep 2022 18:00:27 +0200 Subject: [PATCH 116/751] Use Parent instead of CategoryObject in DrinfeldModule --- .../function_field/drinfeld_modules/drinfeld_module.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 63313a25d1b..7a2fb2c3b8d 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -31,12 +31,12 @@ from sage.rings.integer import Integer from sage.rings.polynomial.ore_polynomial_element import OrePolynomial from sage.rings.polynomial.polynomial_ring import PolynomialRing_general -from sage.structure.category_object import CategoryObject +from sage.structure.parent import Parent from sage.structure.sequence import Sequence from sage.structure.unique_representation import UniqueRepresentation -class DrinfeldModule(UniqueRepresentation, CategoryObject): +class DrinfeldModule(Parent, UniqueRepresentation): r""" This class represents a Drinfeld module. @@ -533,13 +533,13 @@ def __classcall_private__(cls, function_ring, gen, name='t'): return cls.__classcall__(cls, gen, category) def __init__(self, gen, category): - super().__init__(category=category) self._base = category.base() self._function_ring = category.function_ring() self._gen = gen self._morphism = category._function_ring.hom([gen]) self._ore_polring = gen.parent() self._Fq = self._function_ring.base_ring() # Must be last + super().__init__(base=self._base, category=category) def __call__(self, a): r""" From dbcbaf74fc617f8605466fce3223abccc8874053 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 8 Sep 2022 18:00:49 +0200 Subject: [PATCH 117/751] Implement base_ring in DrinfeldModule Why? See docstring of the method. --- .../drinfeld_modules/drinfeld_module.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 7a2fb2c3b8d..bc6fc8e76ac 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -764,6 +764,18 @@ def base(self): """ return self._base + def base_ring(self): + r""" + Raise an exception. + + The base of a Drinfeld module is a ring morphism, not a ring. + + This method is implemented in CategoryObjects, of which + Parent inherits. It returns the base of the category. I + overloaded it to avoid confusion. + """ + raise TypeError('the base of a Drinfeld module is a morphism') + def constant_coefficient(self): r""" Return the constant coefficient of the generator. From 771f406ec3e9d4fb0317da89af4b3b0abc2bf788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 8 Sep 2022 19:08:15 +0200 Subject: [PATCH 118/751] Use Category_over_base instead of CategoryWithParameters for DrinfeldModules --- src/sage/categories/drinfeld_modules.py | 36 ++++--------------------- 1 file changed, 5 insertions(+), 31 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 27480adb460..5a85c3e31d3 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -18,8 +18,9 @@ # http://www.gnu.org/licenses/ #****************************************************************************** -from sage.categories.category import CategoryWithParameters +from sage.categories.category_types import Category_over_base from sage.categories.homsets import Homsets +from sage.misc.cachefunc import cached_method from sage.misc.functional import log from sage.misc.latex import latex from sage.rings.integer import Integer @@ -28,7 +29,7 @@ from sage.rings.polynomial.polynomial_ring import PolynomialRing_general -class DrinfeldModules(CategoryWithParameters): +class DrinfeldModules(Category_over_base): r""" This class represents the category of Drinfeld modules on a given base. @@ -229,10 +230,7 @@ def __init__(self, base, name='t'): self._characteristic = FqX(E(base(X)).minpoly()) elif FqX.is_subring(K): self._characteristic = Integer(0) - - # Somehow required for the class definition - def _make_named_class_key(self, name): - return self._function_ring.category() + super().__init__(base=base) def _latex_(self): r""" @@ -289,31 +287,6 @@ def Homsets(self): def Endsets(self): return Homsets() - def base(self): - r""" - Return the base of the category. - - OUTPUT: a ring morphism - - EXAMPLES: - - sage: Fq = GF(11) - sage: FqX. = Fq[] - sage: K. = Fq.extension(4) - sage: p_root = z^3 + 7*z^2 + 6*z + 10 - sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) - sage: cat = phi.category() - sage: base = cat.base() - sage: base - Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field of size 11 - To: Finite Field in z of size 11^4 - Defn: X |--> z^3 + 7*z^2 + 6*z + 10 - sage: base(X) == cat.constant_coefficient() - True - """ - return self._base - def characteristic(self): r""" Return the function ring-characteristic of the category. @@ -507,6 +480,7 @@ def random_object(self, rank): return self.object(coeffs) # Somehow required for the class definition + @cached_method def super_categories(self): return [] From 674faeb30a406932eb67c44a126b561a7cf03e3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 8 Sep 2022 19:27:39 +0200 Subject: [PATCH 119/751] Make DrinfeldModuleMorphism inherit Morphism As DrinfeldModule now inherits Parent, this is possible. --- .../drinfeld_modules/morphism.py | 82 +------------------ 1 file changed, 3 insertions(+), 79 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 503c9a8fd6b..391aa44855a 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -20,12 +20,12 @@ from sage.misc.inherit_comparison import InheritComparisonClasscallMetaclass from sage.misc.latex import latex -from sage.structure.element import Element +from sage.categories.morphism import Morphism from sage.structure.unique_representation import UniqueRepresentation -class DrinfeldModuleMorphism(UniqueRepresentation, Element, - metaclass=InheritComparisonClasscallMetaclass): +class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, + metaclass=InheritComparisonClasscallMetaclass): r""" This class represents a Drinfeld module morphism. @@ -194,52 +194,6 @@ def _repr_(self): f' To (gen): {self._codomain.gen()}\n' \ f' Defn: {self._ore_polynomial}' - def codomain(self): - r""" - Return the codomain of the morphism. - - EXAMPLES: - - sage: Fq = GF(2) - sage: FqX. = Fq[] - sage: K. = Fq.extension(6) - sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) - sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) - sage: t = phi.ore_variable() - sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) - sage: morphism.codomain() - Drinfeld module defined by X |--> t^2 + (z6^4 + z6^2 + 1)*t + z6 over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field of size 2 (using GF2X) - To: Finite Field in z6 of size 2^6 - Defn: X |--> z6 - sage: morphism.codomain() is psi - True - """ - return self._codomain - - def domain(self): - r""" - Return the codomain of the morphism. - - EXAMPLES: - - sage: Fq = GF(2) - sage: FqX. = Fq[] - sage: K. = Fq.extension(6) - sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) - sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) - sage: t = phi.ore_variable() - sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) - sage: morphism.domain() - Drinfeld module defined by X |--> t^2 + t + z6 over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field of size 2 (using GF2X) - To: Finite Field in z6 of size 2^6 - Defn: X |--> z6 - sage: morphism.domain() is phi - True - """ - return self._domain - def is_zero(self): r""" Return ``True`` whether the morphism is the zero morphism. @@ -262,36 +216,6 @@ def is_zero(self): """ return self._ore_polynomial.is_zero() - def is_endomorphism(self): - r""" - Return ``True`` whether the morphism is an endomorphism. - - EXAMPLES: - - sage: Fq = GF(2) - sage: FqX. = Fq[] - sage: K. = Fq.extension(6) - sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) - sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) - sage: t = phi.ore_variable() - sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) - sage: morphism.is_endomorphism() - False - - sage: zero_morphism = End(phi)(0) - sage: zero_morphism.is_endomorphism() - True - - sage: identity_morphism = End(phi)(1) - sage: identity_morphism.is_endomorphism() - True - - sage: frobenius_endomorphism = phi.frobenius_endomorphism() - sage: frobenius_endomorphism.is_endomorphism() - True - """ - return self._domain is self._codomain - def is_isogeny(self): r""" Return ``True`` whether the morphism is an isogeny. From d597953e9c51bd2474c263d7c0c49730511125f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 9 Sep 2022 10:52:01 +0200 Subject: [PATCH 120/751] Remove methods ore_variable from Drinfeld module classes --- src/sage/categories/drinfeld_modules.py | 32 ++------- .../drinfeld_modules/drinfeld_module.py | 65 ++++--------------- .../finite_drinfeld_module.py | 2 +- .../function_field/drinfeld_modules/homset.py | 6 +- .../drinfeld_modules/morphism.py | 14 ++-- 5 files changed, 27 insertions(+), 92 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 5a85c3e31d3..5ca42f87ce4 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -47,11 +47,10 @@ class DrinfeldModules(Category_over_base): These notations will be used throughout this documentation. We say that `\Fq[X]` is the *function ring of the category*; - *K\{\tau\}* is the *Ore polynomial ring of the category*; `t` is the - *Ore variable of the category*. The *constant coefficient of the - category* is the image of `X` under the base. The - `\Fq[X]`-characteristic of the `\Fq[X]`-field `K` can also be - referred to as its *function ring-characteristic*. + *K\{\tau\}* is the *Ore polynomial ring of the category*. The + *constant coefficient of the category* is the image of `X` under the + base. The `\Fq[X]`-characteristic of the `\Fq[X]`-field `K` can also + be referred to as its *function ring-characteristic*. INPUT: the base, a ring morphism @@ -385,7 +384,7 @@ def object(self, gen): From: Univariate Polynomial Ring in X over Finite Field of size 11 To: Finite Field in z of size 11^4 Defn: X |--> z^3 + 7*z^2 + 6*z + 10 - sage: t = phi.ore_variable() + sage: t = phi.ore_polring().gen() sage: cat.object(t^3 + z^3 + 7*z^2 + 6*z + 10) is phi True """ @@ -420,27 +419,6 @@ def ore_polring(self): """ return self._ore_polring - def ore_variable(self): - r""" - Return the Ore variable of the category. - - OUTPUT: an Ore polynomial - - EXAMPLES: - - sage: Fq = GF(11) - sage: FqX. = Fq[] - sage: K. = Fq.extension(4) - sage: p_root = z^3 + 7*z^2 + 6*z + 10 - sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) - sage: cat = phi.category() - sage: cat.ore_variable() - t - sage: cat.ore_variable() is phi.ore_variable() - True - """ - return self._ore_polring.gen() - def random_object(self, rank): r""" Return a random Drinfeld module in the category, whose rank is diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index bc6fc8e76ac..1740c3cdbfa 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -68,11 +68,11 @@ class DrinfeldModule(Parent, UniqueRepresentation): `\phi_X` of `X`, which is an input of the class. We say that `\Fq[X]` is the *function ring of `\phi`*; *K\{\tau\}* - is the *Ore polynomial ring of `\phi`*; `t` is the *Ore variable of - `\phi`*. Further, the *generator of `\phi`* is `\phi_X` and its - *constant coefficient* is the constant coefficient of `\phi_X`. The - `\Fq[X]`-characteristic of the `\Fq[X]`-field `K` can also be referred to as - its *function ring-characteristic*. + is the *Ore polynomial ring of `\phi`*. Further, the *generator of + `\phi`* is `\phi_X` and its *constant coefficient* is the constant + coefficient of `\phi_X`. The `\Fq[X]`-characteristic of the + `\Fq[X]`-field `K` can also be referred to as its *function + ring-characteristic*. Classical references on Drinfeld modules include [Gos1998]_, [Rosen2002]_, [VS06]_ and [Gek1998]_. @@ -92,7 +92,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): finite field - ``gen`` -- the generator of the Drinfeld module; as a list of coefficients or an Ore polynomial - - ``name`` (optional) -- the name of the Ore variable + - ``name`` (optional) -- the name of the Ore polynomial ring gen .. RUBRIC:: Construction @@ -113,7 +113,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): also use regular Ore polynomials:: sage: ore_polring = phi.ore_polring() - sage: t = phi.ore_variable() # same as ore_polring.gen() + sage: t = phi.ore_polring().gen() sage: psi_X = z + t^3 sage: psi = DrinfeldModule(FqX, psi_X) sage: psi @@ -287,9 +287,6 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: phi.ore_polring() # K{t} Ore Polynomial Ring in t over Finite Field in z of size 3^12 twisted by z |--> z^(3^2) - sage: phi.ore_variable() # t - t - sage: phi.function_ring() # Fq[X] Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 @@ -603,7 +600,7 @@ def _Hom_(self, other, category): sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: t = phi.ore_variable() + sage: t = phi.ore_polring().gen() sage: isog = t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 sage: psi = phi.velu(isog) sage: hom = phi._Hom_(psi, category=phi.category()) @@ -804,7 +801,7 @@ def constant_coefficient(self): Naturally, two Drinfeld modules in the same category have the same constant coefficient:: - sage: t = phi.ore_variable() + sage: t = phi.ore_polring().gen() sage: psi = cat.object(phi.constant_coefficient() + t^3) sage: psi Drinfeld module defined by X |--> t^3 + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Ring morphism: @@ -987,7 +984,7 @@ def invert(self, ore_pol): When the input is not in the image of the Drinfeld module, an exception is raised:: - sage: t = phi.ore_variable() + sage: t = phi.ore_polring().gen() sage: phi.invert(t + 1) Traceback (most recent call last): ... @@ -1144,49 +1141,9 @@ def ore_polring(self): sage: phi(X) in ore_polring True - - The Ore variable is just the generator of the Ore polynomial - ring:: - - sage: ore_polring.gen() - t - sage: phi.ore_variable() is ore_polring.gen() - True """ return self._ore_polring - def ore_variable(self): - r""" - Return the Ore variable. - - OUTPUT: an Ore polynomial - - EXAMPLES: - - sage: Fq = GF(25) - sage: FqX. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: phi.ore_variable() - t - sage: phi.ore_variable() is phi.ore_polring().gen() - True - - One can use the Ore variable to instanciate new Drinfeld - modules...:: - - sage: t = phi.ore_variable() - sage: psi_X = phi.constant_coefficient() + 3*t + 2*t^4 - sage: psi = DrinfeldModule(FqX, psi_X) - - ...or morphisms and isogenies:: - - sage: t^6 in End(phi) # Frobenius endomorphism - True - """ - return self._ore_polring.gen() - def rank(self): r""" Return the rank of the Drinfeld module. @@ -1252,7 +1209,7 @@ def velu(self, isog): sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: t = phi.ore_variable() + sage: t = phi.ore_polring().gen() sage: isog = t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 sage: psi = phi.velu(isog) sage: psi diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 18003d62d3c..6d02da7dff9 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -136,7 +136,7 @@ def frobenius_endomorphism(self): sage: isinstance(phi.frobenius_endomorphism(), DrinfeldModuleMorphism) True """ - t = self.ore_variable() + t = self.ore_polring().gen() L = self._base.codomain() Fq = self._function_ring.base_ring() deg = L.over(Fq).degree(Fq) diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index e70a06db2b3..43cd91849f7 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -61,7 +61,7 @@ class DrinfeldModuleHomset(Homset): One can create morphism objects by calling the homset:: - sage: t = phi.ore_variable() + sage: t = phi.ore_polring().gen() sage: identity_morphism = end(1) sage: identity_morphism Drinfeld Module morphism: @@ -191,7 +191,7 @@ def __contains__(self, x): sage: psi = DrinfeldModule(FqX, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) sage: hom = Hom(phi, psi) sage: end = End(phi) - sage: t = phi.ore_variable() + sage: t = phi.ore_polring().gen() sage: 1 in hom False @@ -244,7 +244,7 @@ def _element_constructor_(self, *args, **kwds): sage: psi = DrinfeldModule(FqX, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) sage: hom = Hom(phi, psi) sage: end = End(phi) - sage: t = phi.ore_variable() + sage: t = phi.ore_polring().gen() sage: identity_morphism = end(1) sage: identity_morphism Drinfeld Module morphism: diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 391aa44855a..1aa36eba277 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -44,7 +44,7 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: t = phi.ore_variable() + sage: t = phi.ore_polring().gen() sage: ore_pol = t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 sage: psi = phi.velu(ore_pol) sage: morphism = Hom(phi, psi)(ore_pol) @@ -149,7 +149,7 @@ def _latex_(self): sage: K. = Fq.extension(6) sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) - sage: t = phi.ore_variable() + sage: t = phi.ore_polring().gen() sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) sage: latex(morphism) \begin{array}{l} @@ -181,7 +181,7 @@ def _repr_(self): sage: K. = Fq.extension(6) sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) - sage: t = phi.ore_variable() + sage: t = phi.ore_polring().gen() sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) sage: morphism Drinfeld Module morphism: @@ -205,7 +205,7 @@ def is_zero(self): sage: K. = Fq.extension(6) sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) - sage: t = phi.ore_variable() + sage: t = phi.ore_polring().gen() sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) sage: morphism.is_zero() False @@ -227,7 +227,7 @@ def is_isogeny(self): sage: K. = Fq.extension(6) sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) - sage: t = phi.ore_variable() + sage: t = phi.ore_polring().gen() sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) sage: morphism.is_isogeny() True @@ -257,7 +257,7 @@ def is_isomorphism(self): sage: K. = Fq.extension(6) sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) - sage: t = phi.ore_variable() + sage: t = phi.ore_polring().gen() sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) sage: morphism.is_isomorphism() False @@ -287,7 +287,7 @@ def ore_polynomial(self): sage: K. = Fq.extension(6) sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) - sage: t = phi.ore_variable() + sage: t = phi.ore_polring().gen() sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) sage: ore_pol = morphism.ore_polynomial() sage: ore_pol From 2ca21832b445169e246edce63498f01e53f76a42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 9 Sep 2022 10:54:22 +0200 Subject: [PATCH 121/751] Remove `class ElementMethods` from DrinfeldModules This seems to change nothing. --- src/sage/categories/drinfeld_modules.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 5ca42f87ce4..c2fdf902cc7 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -467,7 +467,3 @@ class ParentMethods: def characteristic(self): return self.category().characteristic() - - # Somehow required for the class definition - class ElementMethods: - pass From 15efff9de6413a48c7f8bf000466c341485fb4d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 9 Sep 2022 10:58:23 +0200 Subject: [PATCH 122/751] (Fix) Add doc of morphism method in DrinfeldModule It was deleted by accident. --- .../drinfeld_modules/drinfeld_module.py | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 1740c3cdbfa..b3007bc171b 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -1111,6 +1111,50 @@ def j_invariant(self): return (g**(q+1)) / delta def morphism(self): + r""" + Return the morphism object that defines the Drinfeld module. + + OUTPUT: a ring morphism from the function ring to the Ore + polynomial ring + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi.morphism() + Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + To: Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 twisted by z12 |--> z12^(5^2) + Defn: X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: from sage.rings.morphism import RingHomomorphism + sage: isinstance(phi.morphism(), RingHomomorphism) + True + + Actually, the ``DrinfeldModule`` method ``__call__`` simply + class the ``__call__`` method of this morphism:: + + sage: phi.morphism()(X) == phi(X) + True + sage: a = FqX.random_element() + sage: phi.morphism()(a) == phi(a) + True + + And many methods of the Drinfeld module have a counterpart in + the morphism object:: + + sage: m = phi.morphism() + sage: m.domain() is phi.function_ring() + True + sage: m.codomain() is phi.ore_polring() + True + sage: m.im_gens() + [z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12] + sage: phi(X) == m.im_gens()[0] + True + """ return self._morphism def ore_polring(self): From 2e7745256a9c152d975b77de812bb31efed9414d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 9 Sep 2022 11:17:45 +0200 Subject: [PATCH 123/751] Enhance base and base ring distinctions in doc --- src/sage/categories/drinfeld_modules.py | 17 +++++++++++------ .../function_field/drinfeld_modules/action.py | 10 ++++------ .../drinfeld_modules/drinfeld_module.py | 8 +++++--- .../drinfeld_modules/finite_drinfeld_module.py | 13 +++++++------ .../function_field/drinfeld_modules/morphism.py | 10 +++++----- 5 files changed, 32 insertions(+), 26 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index c2fdf902cc7..a3e7f8d6c9d 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -34,10 +34,14 @@ class DrinfeldModules(Category_over_base): This class represents the category of Drinfeld modules on a given base. - The category is uniquely defined by its base, which is a ring - morphism from the function ring `\Fq[X]` to a field `K`. Note that - the base is a morphism, but not a field. The base is often denoted - `\gamma`, and we call `K` an *`\Fq[X]-field`*. + Let `\Fq[X]` be a polynomial ring with coefficients in a finite + field `\Fq` and let `K` be a field. We fix a ring morphism `\gamma: + \Fq[X] \to K`, which we call the *base* of the category (it is the + base of the Drinfeld modules in the category). + Please note that the base is not a ring; in particular, it is + not the field `K`. We also call `K` an *`\Fq[X]`-field*. + + The category is uniquely defined by its base. The monic polynomial that generates the kernel of the base is called the *`\Fq[X]`-characteristic of the `\Fq[X]`-field `K`*. @@ -50,7 +54,8 @@ class DrinfeldModules(Category_over_base): *K\{\tau\}* is the *Ore polynomial ring of the category*. The *constant coefficient of the category* is the image of `X` under the base. The `\Fq[X]`-characteristic of the `\Fq[X]`-field `K` can also - be referred to as its *function ring-characteristic*. + be referred to as its *function ring-characteristic*. Finally, `K` + is just refered to as the codomain base. INPUT: the base, a ring morphism @@ -288,7 +293,7 @@ def Endsets(self): def characteristic(self): r""" - Return the function ring-characteristic of the category. + Return the function ring-characteristic. OUTPUT: `0` or a monic prime polynomial in the function ring diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index fbc1bbfe47b..4b348bff6e2 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -29,11 +29,9 @@ class DrinfeldModuleAction(Action): This class represents the module action induced by a Drinfeld module. - Let `\phi` be a Drinfeld module with function ring `\Fq[X]` and base - ring `K`, whose `\Fq[X]`-field structure is given by a morphism - `\gamma`. Let `L/K` be a field extension, let `x \in L`, let `a` be - a function ring element; the action is defined as `(a, x) \mapsto - \phi_a(x)`. + Let `\phi` be a Drinfeld module with base `\gamma: \Fq[X] \to K`. + Let `L/K` be a field extension, let `x \in L`, let `a` be a function + ring element; the action is defined as `(a, x) \mapsto \phi_a(x)`. .. NOTE:: @@ -92,7 +90,7 @@ def _act_(self, pol, x): - ``pol`` -- a function ring element - ``x`` -- an element in the field acted upon - OUTPUT: an element in the base field of the Drinfeld module + OUTPUT: an element in the base codomain EXAMPLES: diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index b3007bc171b..c1e61416d1e 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -43,7 +43,8 @@ class DrinfeldModule(Parent, UniqueRepresentation): Let `\Fq[X]` be a polynomial ring with coefficients in a finite field `\Fq` and let `K` be a field. We fix a ring morphism `\gamma: \Fq[X] \to K`, which we call the *base* of the Drinfeld module. - We also call `K` an *`\Fq[X]`-field*. + Please note that the base is not a ring; in particular, it is + not the field `K`. We also call `K` an *`\Fq[X]`-field*. .. NOTE:: @@ -72,7 +73,8 @@ class DrinfeldModule(Parent, UniqueRepresentation): `\phi`* is `\phi_X` and its *constant coefficient* is the constant coefficient of `\phi_X`. The `\Fq[X]`-characteristic of the `\Fq[X]`-field `K` can also be referred to as its *function - ring-characteristic*. + ring-characteristic*. Finally, `K` is just refered to as the + codomain base. Classical references on Drinfeld modules include [Gos1998]_, [Rosen2002]_, [VS06]_ and [Gek1998]_. @@ -1075,7 +1077,7 @@ def j_invariant(self): Assume the rank is two. Write the generator `\phi_X = \omega + g\tau + \Delta\tau^2`. The j-invariant is defined by - `\frac{g^{q+1}}{\Delta}`, `q` being the order of the base field + `\frac{g^{q+1}}{\Delta}`, `q` being the order of the base ring of the function ring. In our case, this field is always finite. OUTPUT: an element in the base codomain diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 6d02da7dff9..3ccb00cd361 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -29,8 +29,9 @@ class FiniteDrinfeldModule(DrinfeldModule): r""" This class represents a finite Drinfeld module. - A *finite Drinfeld module* is a Drinfeld module whose base field is - finite. + A *finite Drinfeld module* is a Drinfeld module whose base, which is + a morphism, is surjective. This is equivalent to say that the base + codomain is a finite field. For general definitions and help on Drinfeld modules, see class :class:`sage.rings.function_fields.drinfeld_module.drinfeld_module.DrinfeldModule`. @@ -115,7 +116,7 @@ def frobenius_endomorphism(self): Return the Frobenius endomorphism of the Drinfeld module as a morphism object. - Let `q` be the order of the base field of the function ring. The + Let `q` be the order of the base ring of the function ring. The *Frobenius endomorphism* is defined as the endomorphism whose defining Ore polynomial is `t^q`. @@ -148,7 +149,7 @@ def frobenius_charpoly(self, var='T'): endomorphism, if the rank is two; raise a NotImplementedError otherwise. - Let `\Fq` be the base field of the function ring. The + Let `\Fq` be the base ring of the function ring. The *characteristic polynomial `\chi` of the Frobenius endomorphism* is defined in [Gek1991]_. An important feature of this polynomial is that it is a monic univariate polynomial with @@ -329,7 +330,7 @@ def is_ordinary(self): NotImplementedError if the rank is not two. A rank two finite Drinfeld module is *ordinary* if and only if - the function field-characteristic does not divide the Frobenius + the function ring-characteristic does not divide the Frobenius trace. A *supersingular* rank two finite Drinfeld module is a Drinfeld module that is not ordinary. @@ -368,7 +369,7 @@ def is_supersingular(self): NotImplementedError if the rank is not two. A rank two finite Drinfeld module is *supersingular* if and only - if the function field-characteristic divides the Frobenius + if the function ring-characteristic divides the Frobenius trace. An *ordinary* rank two finite Drinfeld module is a Drinfeld module that is not supersingular. diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 1aa36eba277..d80ff19643b 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -29,11 +29,11 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, r""" This class represents a Drinfeld module morphism. - Let `\phi, \psi` be two Drinfeld modules with base `\Fq[X] \to K`. A - *morphism of Drinfeld modules `\phi \to \psi`* is an Ore polynomial - `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for every `a \in - \Fq[X]`. In our case, this is equivalent to `f \phi_X = \psi_X f`. - An *isogeny* is a non-zero morphism. + Let `\phi, \psi` be two Drinfeld modules with base `\gamma: \Fq[X] + \to K`. A *morphism of Drinfeld modules `\phi \to \psi`* is an Ore + polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for + every `a \in \Fq[X]`. In our case, this is equivalent to `f \phi_X = + \psi_X f`. An *isogeny* is a non-zero morphism. To create a morphism object, the user should never explicitly instantiate `DrinfeldModuleMorphism`, but rather call the parent From 4412ad191092e9d5bab82d1ad73a669dc83d6f96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Fri, 9 Sep 2022 11:29:58 +0200 Subject: [PATCH 124/751] Move 'category methods' from DrinfeldModule to DrinfeldModules Methods of DrinfeldModule that are a getter to a property of the category (e.g. base or function_ring) are now declared in the `class ParentMethods` part of the category. --- src/sage/categories/drinfeld_modules.py | 186 ++++++++++++++++++ .../drinfeld_modules/drinfeld_module.py | 164 --------------- 2 files changed, 186 insertions(+), 164 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index a3e7f8d6c9d..485372a96ab 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -470,5 +470,191 @@ def super_categories(self): # Somehow required for the class definition class ParentMethods: + def base(self): + r""" + Return the base of the Drinfeld module. + + OUTPUT: a ring morphism + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi.base() + Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + To: Finite Field in z12 of size 5^12 + Defn: X |--> 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + + The base codomain can be infinite:: + + sage: sigma = DrinfeldModule(FqX, [Frac(FqX).gen(), 1]) + sage: sigma.base() + Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + To: Fraction Field of Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + Defn: X |--> X + + And it can also be the base field of the function ring:: + + sage: psi = DrinfeldModule(FqX, [Fq(1), Fq.gen()]) + sage: psi.base() + Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + To: Finite Field in z2 of size 5^2 + Defn: X |--> 1 + + In this case the Ore polynomial ring is isomorphic to a regular + polynomial ring:: + + sage: psi.ore_polring() + Ore Polynomial Ring in t over Finite Field in z2 of size 5^2 twisted by Identity + sage: psi.ore_polring().twisting_morphism() + Identity endomorphism of Finite Field in z2 of size 5^2 + + TESTS:: + + sage: psi.ore_polring().twisting_morphism().is_identity() + True + + sage: psi.base().codomain() is psi.function_ring().base_ring() + True + + """ + return self.category().base() + + def base_ring(self): + r""" + Raise an exception. + + The base of a Drinfeld module is a ring morphism, not a ring. + + This method is implemented in CategoryObjects, of which + Parent inherits. It returns the base of the category. I + overloaded it to avoid confusion. + """ + raise TypeError('the base of a Drinfeld module is a morphism') + def characteristic(self): + r""" + Return the function ring-characteristic. + + OUTPUT: a univariate polynomial ring + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi.characteristic() + X^2 + (4*z2 + 2)*X + 2 + sage: phi.characteristic()(phi.constant_coefficient()) + 0 + + sage: L = Frac(FqX) + sage: psi = DrinfeldModule(FqX, [L(1), 0, 0, L(1)]) + sage: psi.characteristic() + 0 + """ return self.category().characteristic() + + def function_ring(self): + r""" + Return the function ring of the Drinfeld module. + + OUTPUT: a univariate polynomial ring + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi.function_ring() is FqX + True + """ + return self.category().function_ring() + + def constant_coefficient(self): + r""" + Return the constant coefficient of the generator. + + OUTPUT: an element in the base codomain + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi.constant_coefficient() == p_root + True + + Let `\Fq[X]` be the function ring, and let `\gamma` the base of + the Drinfeld module. The constant coefficient equals + `\gamma(X)`:: + + sage: cat = phi.category() + sage: base = cat.base() + sage: base(X) == phi.constant_coefficient() + True + + Naturally, two Drinfeld modules in the same category have the + same constant coefficient:: + + sage: t = phi.ore_polring().gen() + sage: psi = cat.object(phi.constant_coefficient() + t^3) + sage: psi + Drinfeld module defined by X |--> t^3 + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + To: Finite Field in z12 of size 5^12 + Defn: X |--> 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + + Reciprocally, it is impossible to create two Drinfeld modules in + this category if they do not share the same constant + coefficient:: + + sage: rho = cat.object(phi.constant_coefficient() + 1 + t^3) + Traceback (most recent call last): + ... + ValueError: constant coefficient must be the generator of the morphism that defines the category + """ + return self.category().constant_coefficient() + + def ore_polring(self): + r""" + Return the Ore polynomial ring of the Drinfeld module. + + OUTPUT: an Ore polynomial ring + + EXAMPLES: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: ore_polring = phi.ore_polring() + sage: ore_polring + Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 twisted by z12 |--> z12^(5^2) + + The Ore polynomial ring can also be retrieved from the category + of the Drinfeld module:: + + sage: ore_polring is phi.category().ore_polring() + True + + The generator of the Drinfeld module is in the Ore polynomial + ring:: + + sage: phi(X) in ore_polring + True + """ + return self.category().ore_polring() diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index c1e61416d1e..29de3ba191b 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -707,121 +707,6 @@ def action(self): from sage.rings.function_field.drinfeld_modules.action import DrinfeldModuleAction return DrinfeldModuleAction(self) - def base(self): - r""" - Return the base of the Drinfeld module. - - OUTPUT: a ring morphism - - EXAMPLES: - - sage: Fq = GF(25) - sage: FqX. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: phi.base() - Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 - To: Finite Field in z12 of size 5^12 - Defn: X |--> 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - - The base codomain can be infinite:: - - sage: sigma = DrinfeldModule(FqX, [Frac(FqX).gen(), 1]) - sage: sigma.base() - Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 - To: Fraction Field of Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 - Defn: X |--> X - - And it can also be the base field of the function ring:: - - sage: psi = DrinfeldModule(FqX, [Fq(1), Fq.gen()]) - sage: psi.base() - Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 - To: Finite Field in z2 of size 5^2 - Defn: X |--> 1 - - In this case the Ore polynomial ring is isomorphic to a regular - polynomial ring:: - - sage: psi.ore_polring() - Ore Polynomial Ring in t over Finite Field in z2 of size 5^2 twisted by Identity - sage: psi.ore_polring().twisting_morphism() - Identity endomorphism of Finite Field in z2 of size 5^2 - - TESTS:: - - sage: psi.ore_polring().twisting_morphism().is_identity() - True - - sage: psi.base().codomain() is psi.function_ring().base_ring() - True - - """ - return self._base - - def base_ring(self): - r""" - Raise an exception. - - The base of a Drinfeld module is a ring morphism, not a ring. - - This method is implemented in CategoryObjects, of which - Parent inherits. It returns the base of the category. I - overloaded it to avoid confusion. - """ - raise TypeError('the base of a Drinfeld module is a morphism') - - def constant_coefficient(self): - r""" - Return the constant coefficient of the generator. - - OUTPUT: an element in the base codomain - - EXAMPLES: - - sage: Fq = GF(25) - sage: FqX. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: phi.constant_coefficient() == p_root - True - - Let `\Fq[X]` be the function ring, and let `\gamma` the base of - the Drinfeld module. The constant coefficient equals - `\gamma(X)`:: - - sage: cat = phi.category() - sage: base = cat.base() - sage: base(X) == phi.constant_coefficient() - True - - Naturally, two Drinfeld modules in the same category have the - same constant coefficient:: - - sage: t = phi.ore_polring().gen() - sage: psi = cat.object(phi.constant_coefficient() + t^3) - sage: psi - Drinfeld module defined by X |--> t^3 + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 - To: Finite Field in z12 of size 5^12 - Defn: X |--> 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - - Reciprocally, it is impossible to create two Drinfeld modules in - this category if they do not share the same constant - coefficient:: - - sage: rho = cat.object(phi.constant_coefficient() + 1 + t^3) - Traceback (most recent call last): - ... - ValueError: constant coefficient must be the generator of the morphism that defines the category - """ - return self.coefficient(0) - def coefficient(self, n): r""" Return the n-th coefficient of the generator. @@ -899,24 +784,6 @@ def coefficients(self, sparse=True): """ return self._gen.coefficients(sparse=sparse) - def function_ring(self): - r""" - Return the function ring of the Drinfeld module. - - OUTPUT: a univariate polynomial ring - - EXAMPLES: - - sage: Fq = GF(25) - sage: FqX. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: phi.function_ring() is FqX - True - """ - return self._function_ring - def gen(self): r""" Return the generator of the Drinfeld module. @@ -1159,37 +1026,6 @@ class the ``__call__`` method of this morphism:: """ return self._morphism - def ore_polring(self): - r""" - Return the Ore polynomial ring of the Drinfeld module. - - OUTPUT: an Ore polynomial ring - - EXAMPLES: - - sage: Fq = GF(25) - sage: FqX. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: ore_polring = phi.ore_polring() - sage: ore_polring - Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 twisted by z12 |--> z12^(5^2) - - The Ore polynomial ring can also be retrieved from the category - of the Drinfeld module:: - - sage: ore_polring is phi.category().ore_polring() - True - - The generator of the Drinfeld module is in the Ore polynomial - ring:: - - sage: phi(X) in ore_polring - True - """ - return self._ore_polring - def rank(self): r""" Return the rank of the Drinfeld module. From 52e6d06336bc0802624670c4a4c6f43c6e24961b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 20 Sep 2022 13:37:40 +0200 Subject: [PATCH 125/751] (minor) Change a comment in a doctstring --- .../function_field/drinfeld_modules/finite_drinfeld_module.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 3ccb00cd361..82e2d304048 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -383,8 +383,7 @@ def is_supersingular(self): sage: phi = DrinfeldModule(FqX, [1, 0, z6]) sage: phi.is_supersingular() True - sage: phi_p = phi(phi.characteristic()) - sage: phi_p # Purely inseparable + sage: phi(phi.characteristic()) # Purely inseparable z6*t^2 ALGORITHM: From d6174065977780a9fdaa8d7de4131f1c52e421c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 20 Sep 2022 13:31:59 +0200 Subject: [PATCH 126/751] Add a better error message in DrinfeldModules when the characteristic is not implemented --- src/sage/categories/drinfeld_modules.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 485372a96ab..61d0482af48 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -320,7 +320,8 @@ def characteristic(self): 0 """ if self._characteristic is None: - raise NotImplementedError + raise NotImplementedError('function ring characteristic not' \ + 'implemented in this case') return self._characteristic def constant_coefficient(self): From 1eab9ee6a594ee1f50148325cbdc23632d1ffc1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 20 Sep 2022 13:33:31 +0200 Subject: [PATCH 127/751] Fix height method The height used to return always 1. This was a mistake (despite being the generic case) that is now corrected. For example, in rank two, a Drinfeld module is supersingular if and only if its height is 2. --- .../drinfeld_modules/drinfeld_module.py | 49 +++++++++++++++++-- 1 file changed, 45 insertions(+), 4 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 29de3ba191b..31aff8ced91 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -306,7 +306,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): To: Ore Polynomial Ring in t over Finite Field in z of size 3^12 twisted by z |--> z^(3^2) Defn: X |--> t^2 + t + z - One can compute the rank and height (which is always `1`):: + One can compute the rank and height:: sage: phi.rank() 2 @@ -804,9 +804,23 @@ def gen(self): def height(self): r""" - Return the height of the Drinfeld module. + Return the height of the Drinfeld module if the function field + characteristic is a prime ideal; raise ValueError otherwise. - In our case, the height is always 1. + The height of a Drinfeld module is defined when the function + field characteristic is a prime ideal. In our case, this ideal + is even generated by a monic polynomial `\mathfrak{p}` in the + function field. Write `\phi_\mathfrak{p} = a_s \tau^s + \dots + + \tau^{r*\deg(\mathfrak{p})}`. The *height* of the Drinfeld + module is the well-defined positive integer `h = + \frac{s}{\deg(\mathfrak{p})}`. + + .. NOTE:: + + See [Gos1998]_, Definition 4.5.8 for the general definition. + + A rank two Drinfeld module is supersingular if and only if its + height equals its rank. OUTPUT: an integer @@ -819,8 +833,35 @@ def height(self): sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) sage: phi.height() == 1 True + sage: phi.is_ordinary() + True + + sage: L = Frac(FqX) + sage: phi = DrinfeldModule(FqX, [L(2), L(1)]) + sage: phi.height() + Traceback (most recent call last): + ... + ValueError: height is defined for prime function field characteristic + + sage: Fq = GF(343) + sage: FqX. = Fq[] + sage: K. = Fq.extension(2) + sage: phi = DrinfeldModule(FqX, [1, 0, z6]) + sage: phi.height() + 2 + sage: phi.is_supersingular() + True + """ - return Integer(1) + try: + if self.characteristic().is_zero(): + raise ValueError('height is defined for prime ' \ + 'function field characteristic') + else: + p = self.characteristic() + return Integer((self(p).valuation()) // (p.degree())) + except NotImplementedError: + raise NotImplementedError('height not implemented in this case') def invert(self, ore_pol): r""" From bcdfb60284efc88d246625b61b72ae86773ee6d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 20 Sep 2022 13:37:07 +0200 Subject: [PATCH 128/751] Fix definition of finite drinfeld module in FiniteDrinfeldModule --- .../drinfeld_modules/finite_drinfeld_module.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 82e2d304048..a64af067a34 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -29,9 +29,9 @@ class FiniteDrinfeldModule(DrinfeldModule): r""" This class represents a finite Drinfeld module. - A *finite Drinfeld module* is a Drinfeld module whose base, which is - a morphism, is surjective. This is equivalent to say that the base - codomain is a finite field. + A *finite Drinfeld module* is a Drinfeld module whose base codomain + is a finite field. In this case, the function field characteristic + is a prime ideal. For general definitions and help on Drinfeld modules, see class :class:`sage.rings.function_fields.drinfeld_module.drinfeld_module.DrinfeldModule`. From 0cdd80f5c8b694e67151b97b9eeef36e5340e086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Wed, 21 Sep 2022 12:13:15 +0200 Subject: [PATCH 129/751] (fix) Fix function_field/all.py Thank you David, see Ticket 33713, comment 125. --- src/sage/rings/function_field/all.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sage/rings/function_field/all.py b/src/sage/rings/function_field/all.py index 6904f3ef4fb..17cf87636e3 100644 --- a/src/sage/rings/function_field/all.py +++ b/src/sage/rings/function_field/all.py @@ -1 +1,2 @@ +from .constructor import FunctionField from .drinfeld_modules.all import * From 8052550f00cd9ae9e8ba0e83a5c84022d462b361 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 22 Sep 2022 14:46:26 +0200 Subject: [PATCH 130/751] Remove .all import See ticket 33713, comment 247. --- src/sage/rings/function_field/all.py | 2 +- src/sage/rings/function_field/drinfeld_modules/all.py | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) delete mode 100644 src/sage/rings/function_field/drinfeld_modules/all.py diff --git a/src/sage/rings/function_field/all.py b/src/sage/rings/function_field/all.py index 17cf87636e3..5557bbb349f 100644 --- a/src/sage/rings/function_field/all.py +++ b/src/sage/rings/function_field/all.py @@ -1,2 +1,2 @@ from .constructor import FunctionField -from .drinfeld_modules.all import * +from .drinfeld_modules.drinfeld_module import DrinfeldModule diff --git a/src/sage/rings/function_field/drinfeld_modules/all.py b/src/sage/rings/function_field/drinfeld_modules/all.py deleted file mode 100644 index 71d56f75a35..00000000000 --- a/src/sage/rings/function_field/drinfeld_modules/all.py +++ /dev/null @@ -1,3 +0,0 @@ -from sage.misc.lazy_import import lazy_import - -lazy_import('sage.rings.function_field.drinfeld_modules.drinfeld_module', 'DrinfeldModule') From 9a77a819635a355dfee5805b5c87b7a6be219037 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 2 Jul 2022 15:32:55 -0700 Subject: [PATCH 131/751] sage.env.sage_include_directories: Do not append distutils.sysconfig.get_python_inc() --- src/sage/env.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/sage/env.py b/src/sage/env.py index 911f34b1bc6..0542ff4471b 100644 --- a/src/sage/env.py +++ b/src/sage/env.py @@ -383,12 +383,9 @@ def sage_include_directories(use_sources=False): sage: any(os.path.isfile(os.path.join(d, file)) for d in dirs) True """ - import distutils.sysconfig - TOP = SAGE_SRC if use_sources else SAGE_LIB - dirs = [TOP, - distutils.sysconfig.get_python_inc()] + dirs = [TOP] try: import numpy dirs.insert(1, numpy.get_include()) From e2688ef47fac633e5f5a299106e807e23f942d28 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 2 Jul 2022 16:21:53 -0700 Subject: [PATCH 132/751] sage.env.sage_include_directories: Append sysconfig variable INCLUDEPY --- src/sage/env.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/sage/env.py b/src/sage/env.py index 0542ff4471b..e71e625308b 100644 --- a/src/sage/env.py +++ b/src/sage/env.py @@ -383,14 +383,20 @@ def sage_include_directories(use_sources=False): sage: any(os.path.isfile(os.path.join(d, file)) for d in dirs) True """ - TOP = SAGE_SRC if use_sources else SAGE_LIB - - dirs = [TOP] + if use_sources: + dirs = [SAGE_SRC] + else: + import sage + dirs = [os.path.dirname(directory) + for directory in sage.__path__] try: import numpy - dirs.insert(1, numpy.get_include()) + dirs.append(numpy.get_include()) except ModuleNotFoundError: pass + + dirs.append(sysconfig.get_config_var('INCLUDEPY')) + return dirs def get_cblas_pc_module_name() -> str: From 1e158033ab0ad13a6694dac9118e9d108d258e9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 27 Sep 2022 16:38:58 +0200 Subject: [PATCH 133/751] (minor) Fix typo in docstring --- .../function_field/drinfeld_modules/finite_drinfeld_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index a64af067a34..db4e1052fd5 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -166,7 +166,7 @@ def frobenius_charpoly(self, var='T'): with `\deg(A) \leq \frac{n}{2}` and `\deg(B) = n`. Note that the *Frobenius trace* is defined as `A(X)` and the - *Frobenius norm` is defined as `B(X)`. + *Frobenius norm* is defined as `B(X)`. INPUT: From 5fe2745a4edb559dab0fb6ba1dd72ac7a62a9806 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Thu, 29 Sep 2022 10:17:59 +0200 Subject: [PATCH 134/751] Fix lint error E265 This error was due to using \#*** \#*** and not \# *** \# *** for the license preambule in .py files. --- src/sage/categories/drinfeld_modules.py | 12 ++++++------ .../function_field/drinfeld_modules/action.py | 16 ++++++++-------- .../drinfeld_modules/drinfeld_module.py | 16 ++++++++-------- .../drinfeld_modules/finite_drinfeld_module.py | 16 ++++++++-------- .../function_field/drinfeld_modules/homset.py | 16 ++++++++-------- .../function_field/drinfeld_modules/morphism.py | 16 ++++++++-------- 6 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 61d0482af48..f222795f947 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -10,13 +10,13 @@ - Xavier Caruso (2022-06) """ -#***************************************************************************** -# Copyright (C) 2022 Xavier Caruso -# Antoine Leudière +# ***************************************************************************** +# Copyright (C) 2022 Xavier Caruso +# Antoine Leudière # -# Distributed under the terms of the GNU General Public License (GPL) -# http://www.gnu.org/licenses/ -#****************************************************************************** +# Distributed under the terms of the GNU General Public License (GPL) +# http://www.gnu.org/licenses/ +# ****************************************************************************** from sage.categories.category_types import Category_over_base from sage.categories.homsets import Homsets diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index 4b348bff6e2..b3c1b8a8c5d 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -9,15 +9,15 @@ - Antoine Leudière (2022-04) """ -#***************************************************************************** -# Copyright (C) 2022 Antoine Leudière +# ***************************************************************************** +# Copyright (C) 2022 Antoine Leudière # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# http://www.gnu.org/licenses/ -#***************************************************************************** +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# http://www.gnu.org/licenses/ +# ***************************************************************************** from sage.categories.action import Action from sage.misc.latex import latex diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 31aff8ced91..dc3bfaa5944 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -14,15 +14,15 @@ - Xavier Caruso (2022-06) """ -#***************************************************************************** -# Copyright (C) 2022 Antoine Leudière +# ***************************************************************************** +# Copyright (C) 2022 Antoine Leudière # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# http://www.gnu.org/licenses/ -#***************************************************************************** +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# http://www.gnu.org/licenses/ +# ***************************************************************************** from sage.categories.drinfeld_modules import DrinfeldModules from sage.matrix.constructor import Matrix diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index db4e1052fd5..1b51ed079ad 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -11,15 +11,15 @@ - Antoine Leudière (2022-04) """ -#***************************************************************************** -# Copyright (C) 2022 Antoine Leudière +# ***************************************************************************** +# Copyright (C) 2022 Antoine Leudière # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# http://www.gnu.org/licenses/ -#***************************************************************************** +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# http://www.gnu.org/licenses/ +# ***************************************************************************** from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.function_field.drinfeld_modules.drinfeld_module import DrinfeldModule diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index 43cd91849f7..1b8f0004e1b 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -9,15 +9,15 @@ - Antoine Leudière (2022-04) """ -#***************************************************************************** -# Copyright (C) 2022 Antoine Leudière +# ***************************************************************************** +# Copyright (C) 2022 Antoine Leudière # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# http://www.gnu.org/licenses/ -#***************************************************************************** +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# http://www.gnu.org/licenses/ +# ***************************************************************************** from sage.categories.drinfeld_modules import DrinfeldModules from sage.categories.homset import Homset diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index d80ff19643b..c96ca7b438d 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -8,15 +8,15 @@ - Antoine Leudière (2022-04) """ -#***************************************************************************** -# Copyright (C) 2022 Antoine Leudière +# ***************************************************************************** +# Copyright (C) 2022 Antoine Leudière # -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# http://www.gnu.org/licenses/ -#***************************************************************************** +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# http://www.gnu.org/licenses/ +# ***************************************************************************** from sage.misc.inherit_comparison import InheritComparisonClasscallMetaclass from sage.misc.latex import latex From a82b36f01ac7606215625ac0acaeb281891fdd37 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 11 Jun 2021 18:03:48 -0700 Subject: [PATCH 135/751] build/pkgs/cvxpy: New pip package --- build/pkgs/cvxpy/SPKG.rst | 18 ++++++++++++++++++ build/pkgs/cvxpy/dependencies | 4 ++++ build/pkgs/cvxpy/requirements.txt | 1 + build/pkgs/cvxpy/type | 1 + 4 files changed, 24 insertions(+) create mode 100644 build/pkgs/cvxpy/SPKG.rst create mode 100644 build/pkgs/cvxpy/dependencies create mode 100644 build/pkgs/cvxpy/requirements.txt create mode 100644 build/pkgs/cvxpy/type diff --git a/build/pkgs/cvxpy/SPKG.rst b/build/pkgs/cvxpy/SPKG.rst new file mode 100644 index 00000000000..55998a0d419 --- /dev/null +++ b/build/pkgs/cvxpy/SPKG.rst @@ -0,0 +1,18 @@ +cvxpy: A domain-specific language for modeling convex optimization problems in Python. +====================================================================================== + +Description +----------- + +A domain-specific language for modeling convex optimization problems in Python. + +License +------- + +Apache License, Version 2.0 + +Upstream Contact +---------------- + +https://pypi.org/project/cvxpy/ + diff --git a/build/pkgs/cvxpy/dependencies b/build/pkgs/cvxpy/dependencies new file mode 100644 index 00000000000..888fc3e4481 --- /dev/null +++ b/build/pkgs/cvxpy/dependencies @@ -0,0 +1,4 @@ +$(PYTHON) numpy scipy pybind11 glpk cvxopt | $(PYTHON_TOOLCHAIN) + +---------- +All lines of this file are ignored except the first. diff --git a/build/pkgs/cvxpy/requirements.txt b/build/pkgs/cvxpy/requirements.txt new file mode 100644 index 00000000000..187142bb93e --- /dev/null +++ b/build/pkgs/cvxpy/requirements.txt @@ -0,0 +1 @@ +cvxpy diff --git a/build/pkgs/cvxpy/type b/build/pkgs/cvxpy/type new file mode 100644 index 00000000000..134d9bc32d5 --- /dev/null +++ b/build/pkgs/cvxpy/type @@ -0,0 +1 @@ +optional From 7bd56e3b2145ebc8b10311762686771b36bdea1e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 10 Mar 2022 13:10:05 -0800 Subject: [PATCH 136/751] sage.numerical.backends.cvxpy_backend: New --- src/sage/numerical/backends/cvxpy_backend.pxd | 31 + src/sage/numerical/backends/cvxpy_backend.pyx | 553 ++++++++++++++++++ .../numerical/backends/generic_backend.pyx | 15 +- 3 files changed, 597 insertions(+), 2 deletions(-) create mode 100644 src/sage/numerical/backends/cvxpy_backend.pxd create mode 100644 src/sage/numerical/backends/cvxpy_backend.pyx diff --git a/src/sage/numerical/backends/cvxpy_backend.pxd b/src/sage/numerical/backends/cvxpy_backend.pxd new file mode 100644 index 00000000000..3d077c3ed07 --- /dev/null +++ b/src/sage/numerical/backends/cvxpy_backend.pxd @@ -0,0 +1,31 @@ +############################################################################## +# Copyright (C) 2010 Nathann Cohen +# Copyright (C) 2022 Matthias Koeppe +# Distributed under the terms of the GNU General Public License (GPL) +# The full text of the GPL is available at: +# http://www.gnu.org/licenses/ +############################################################################## + +from sage.numerical.backends.generic_backend cimport GenericBackend + +cdef class CVXPYBackend(GenericBackend): + + cdef object variables + cdef object problem + cdef object prob_name + + cdef object _cvxpy_solver + cdef object _cvxpy_solver_args + + cpdef int add_variable(self, + lower_bound=*, + upper_bound=*, + binary=*, + continuous=*, + integer=*, + obj=*, + name=*, + coefficients=*) \ + except -1 + + cpdef cvxpy_problem(self) diff --git a/src/sage/numerical/backends/cvxpy_backend.pyx b/src/sage/numerical/backends/cvxpy_backend.pyx new file mode 100644 index 00000000000..d6390a5a89b --- /dev/null +++ b/src/sage/numerical/backends/cvxpy_backend.pyx @@ -0,0 +1,553 @@ +r""" +CVXPY Backend + +AUTHORS: + +- Nathann Cohen (2010-10) : generic_backend template +- Matthias Koeppe (2022-03) : this backend + +""" + +# **************************************************************************** +# Copyright (C) 2010 Nathann Cohen +# Copyright (C) 2022 Matthias Koeppe +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# https://www.gnu.org/licenses/ +# **************************************************************************** + +from sage.numerical.mip import MIPSolverException +from sage.rings.real_double import RDF +from sage.modules.free_module_element import vector +from copy import copy +import cvxpy +from cvxpy.atoms.affine.add_expr import AddExpression +from cvxpy.expressions.constants import Constant + +cdef class CVXPYBackend: + """ + MIP Backend that delegates to CVXPY. + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver="CVXPY") + """ + + def __cinit__(self, maximization=True, base_ring=None, cvxpy_solver=None, cvxpy_solver_args=None): + """ + Cython constructor + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver="CVXPY") + """ + if base_ring is None: + base_ring = RDF + elif base_ring != RDF: + raise ValueError('base_ring must be RDF') + + if isinstance(cvxpy_solver, str): + import cvxpy as cp + cvxpy_solver = getattr(cp, cvxpy_solver.upper()) + self._cvxpy_solver = cvxpy_solver + self._cvxpy_solver_args = cvxpy_solver_args + + self.set_verbosity(0) + self.variables = [] + if maximization: + objective = cvxpy.Maximize(0) + else: + objective = cvxpy.Minimize(0) + self.problem = cvxpy.Problem(objective, ()) + + cpdef __copy__(self): + """ + Returns a copy of self. + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = MixedIntegerLinearProgram(solver="CVXPY") + sage: b = p.new_variable() + sage: p.add_constraint(b[1] + b[2] <= 6) + sage: p.set_objective(b[1] + b[2]) + sage: cp = copy(p.get_backend()) + sage: cp.solve() + 0 + sage: cp.get_objective_value() + 6 + """ + cdef CVXPYBackend cp = type(self)(base_ring=self.base_ring()) + cp.problem = self.problem # it's considered immutable; so no need to copy. + cp.variables = copy(self.variables) + return cp + + cpdef cvxpy_problem(self): + return self.problem + + cpdef int add_variable(self, lower_bound=0, upper_bound=None, + binary=False, continuous=True, integer=False, + obj=None, name=None, coefficients=None) except -1: + ## coefficients is an extension in this backend, + ## and a proposed addition to the interface, to unify this with add_col. + """ + Add a variable. + + This amounts to adding a new column to the matrix. By default, + the variable is both nonnegative and real. + + INPUT: + + - ``lower_bound`` - the lower bound of the variable (default: 0) + + - ``upper_bound`` - the upper bound of the variable (default: ``None``) + + - ``binary`` - ``True`` if the variable is binary (default: ``False``). + + - ``continuous`` - ``True`` if the variable is binary (default: ``True``). + + - ``integer`` - ``True`` if the variable is binary (default: ``False``). + + - ``obj`` - (optional) coefficient of this variable in the objective function (default: 0) + + - ``name`` - an optional name for the newly added variable (default: ``None``). + + - ``coefficients`` -- (optional) an iterable of pairs ``(i, v)``. In each + pair, ``i`` is a row index (integer) and ``v`` is a + value (element of :meth:`base_ring`). + + OUTPUT: The index of the newly created variable + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver="CVXPY") + sage: p.ncols() + 0 + sage: p.add_variable() + 0 + sage: p.ncols() + 1 + sage: p.add_variable(continuous=True, integer=True) + Traceback (most recent call last): + ... + ValueError: ... + sage: p.add_variable(name='x',obj=1) + 1 + sage: p.col_name(1) + 'x' + sage: p.objective_coefficient(1) + 1 + """ + cdef int vtype = int(binary) + int(continuous) + int(integer) + if vtype == 0: + continuous = True + elif vtype != 1: + raise ValueError("Exactly one parameter of 'binary', 'integer' and 'continuous' must be 'True'.") + + if binary: + variable = cvxpy.Variable(name=name, boolean=True) + elif integer: + variable = cvxpy.Variable(name=name, integer=True) + else: + variable = cvxpy.Variable(name=name) + + self.variables.append(variable) + index = self.ncols() - 1 + self.add_linear_constraint([(index, 1)], lower_bound, upper_bound) + + if obj: + objective = type(self.problem.objective)(self.problem.objective.args[0] + + obj * variable) + self.problem = cvxpy.Problem(objective, self.problem.constraints) + + if coefficients is not None: + raise NotImplementedError + + return index + + cpdef set_verbosity(self, int level): + """ + Set the log (verbosity) level + + INPUT: + + - ``level`` (integer) -- From 0 (no verbosity) to 3. + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver="CVXPY") + sage: p.set_verbosity(2) + """ + pass + + cpdef add_linear_constraint(self, coefficients, lower_bound, upper_bound, name=None): + """ + Add a linear constraint. + + INPUT: + + - ``coefficients`` -- an iterable of pairs ``(i, v)``. In each + pair, ``i`` is a variable index (integer) and ``v`` is a + value (element of :meth:`base_ring`). + + - ``lower_bound`` -- element of :meth:`base_ring` or + ``None``. The lower bound. + + - ``upper_bound`` -- element of :meth:`base_ring` or + ``None``. The upper bound. + + - ``name`` -- string or ``None``. Optional name for this row. + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver="CVXPY") + sage: p.add_variables(5) + 4 + sage: p.add_linear_constraint( zip(range(5), range(5)), 2, 2) + sage: p.row(0) + ([1, 2, 3, 4], [1, 2, 3, 4]) + sage: p.row_bounds(0) + (2, 2) + sage: p.add_linear_constraint( zip(range(5), range(5)), 1, 1, name='foo') + sage: p.row_name(1) + 'foo' + """ + if coefficients: + expr = AddExpression([v * self.variables[i] for i, v in coefficients]) + else: + expr = Constant(0) + constraints = list(self.problem.constraints) + if lower_bound is not None and lower_bound == upper_bound: + constraints.append(expr == upper_bound) + elif lower_bound is not None: + constraints.append(lower_bound <= expr) + elif upper_bound is not None: + constraints.append(expr <= upper_bound) + self.problem = cvxpy.Problem(self.problem.objective, constraints) + + cpdef add_col(self, indices, coeffs): + """ + Add a column. + + INPUT: + + - ``indices`` (list of integers) -- this list contains the + indices of the constraints in which the variable's + coefficient is nonzero + + - ``coeffs`` (list of real values) -- associates a coefficient + to the variable in each of the constraints in which it + appears. Namely, the i-th entry of ``coeffs`` corresponds to + the coefficient of the variable in the constraint + represented by the i-th entry in ``indices``. + + .. NOTE:: + + ``indices`` and ``coeffs`` are expected to be of the same + length. + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver="CVXPY") + sage: p.ncols() + 0 + sage: p.nrows() + 0 + sage: p.add_linear_constraints(5, 0, None) + sage: p.add_col(list(range(5)), list(range(5))) + sage: p.nrows() + 5 + """ + self.add_variable(coefficients=zip(indices, coeffs)) + + cpdef set_objective(self, list coeff, d=0.0): + """ + Set the objective function. + + INPUT: + + - ``coeff`` - a list of real values, whose ith element is the + coefficient of the ith variable in the objective function. + + - ``d`` (double) -- the constant term in the linear function (set to `0` by default) + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver="CVXPY") + sage: p.add_variables(5) + 4 + sage: p.set_objective([1, 1, 2, 1, 3]) + sage: [p.objective_coefficient(x) for x in range(5)] + [1.0, 1.0, 2.0, 1.0, 3.0] + """ + if self.variables: + expr = AddExpression([c * x for c, x in zip(coeff, self.variables)]) + else: + expr = Constant(0) + objective = type(self.problem.objective)(expr) + + cpdef set_sense(self, int sense): + """ + Set the direction (maximization/minimization). + + INPUT: + + - ``sense`` (integer) : + + * +1 => Maximization + * -1 => Minimization + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver = "GLPK") + sage: p.is_maximization() + True + sage: p.set_sense(-1) + sage: p.is_maximization() + False + """ + expr = self.problem.objective.args[0] + if sense == 1: + objective = cvxpy.Maximize(expr) + else: + objective = cvxpy.Minimize(expr) + self.problem = cvxpy.Problem(objective, self.problem.constraints) + + cpdef int solve(self) except -1: + """ + Solve the problem. + + .. NOTE:: + + This method raises ``MIPSolverException`` exceptions when + the solution cannot be computed for any reason (none + exists, or the LP solver was not able to find it, etc...) + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver="CVXPY") + sage: p.add_linear_constraints(5, 0, None) + sage: p.add_col(list(range(5)), list(range(5))) + sage: p.solve() + 0 + sage: p.objective_coefficient(0,1) + sage: p.solve() + Traceback (most recent call last): + ... + MIPSolverException: ... + """ + try: + self.problem.solve() + except Exception as e: + raise MIPSolverException(f"cvxpy.Problem.solve raised exception: {e}") + status = self.problem.status + if 'optimal' in status: + return 0 + if 'infeasible' in status: + raise MIPSolverException(f"cvxpy.Problem.solve: Problem has no feasible solution") + if 'unbounded' in status: + raise MIPSolverException(f"cvxpy.Problem.solve: Problem is unbounded") + raise MIPSolverException(f"cvxpy.Problem.solve reported an unknown problem status: {status}") + + cpdef get_objective_value(self): + """ + Return the value of the objective function. + + .. NOTE:: + + Behavior is undefined unless ``solve`` has been called before. + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver="CVXPY") + sage: p.add_variables(2) + 1 + sage: p.add_linear_constraint([(0,1), (1,2)], None, 3) + sage: p.set_objective([2, 5]) + sage: p.solve() + 0 + sage: p.get_objective_value() + 15/2 + sage: p.get_variable_value(0) + 0 + sage: p.get_variable_value(1) + 3/2 + """ + return self.problem.value + + cpdef get_variable_value(self, int variable): + """ + Return the value of a variable given by the solver. + + .. NOTE:: + + Behavior is undefined unless ``solve`` has been called before. + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver="CVXPY") + sage: p.add_variables(2) + 1 + sage: p.add_linear_constraint([(0,1), (1, 2)], None, 3) + sage: p.set_objective([2, 5]) + sage: p.solve() + 0 + sage: p.get_objective_value() + 15/2 + sage: p.get_variable_value(0) + 0 + sage: p.get_variable_value(1) + 3/2 + """ + return self.variables[variable].value + + cpdef int ncols(self): + """ + Return the number of columns/variables. + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver="CVXPY") + sage: p.ncols() + 0 + sage: p.add_variables(2) + 1 + sage: p.ncols() + 2 + """ + return len(self.variables) + + cpdef int nrows(self): + """ + Return the number of rows/constraints. + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver="CVXPY") + sage: p.nrows() + 0 + sage: p.add_linear_constraints(2, 0, None) + sage: p.nrows() + 2 + """ + return len(self.problem.constraints) + + cpdef bint is_maximization(self): + """ + Test whether the problem is a maximization + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver="CVXPY") + sage: p.is_maximization() + True + sage: p.set_sense(-1) + sage: p.is_maximization() + False + """ + return isinstance(self.problem.objective, cvxpy.Maximize) + + cpdef problem_name(self, name=None): + """ + Return or define the problem's name + + INPUT: + + - ``name`` (``str``) -- the problem's name. When set to + ``None`` (default), the method returns the problem's name. + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver="CVXPY") + sage: p.problem_name("There_once_was_a_french_fry") + sage: print(p.problem_name()) + There_once_was_a_french_fry + """ + if name is None: + if self.prob_name is not None: + return self.prob_name + else: + return "" + else: + self.prob_name = str(name) + + cpdef bint is_variable_binary(self, int index): + """ + Test whether the given variable is of binary type. + + INPUT: + + - ``index`` (integer) -- the variable's id + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver="CVXPY") + sage: p.ncols() + 0 + sage: p.add_variable() + 0 + sage: p.is_variable_binary(0) + False + """ + return False + + cpdef bint is_variable_integer(self, int index): + """ + Test whether the given variable is of integer type. + + INPUT: + + - ``index`` (integer) -- the variable's id + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver="CVXPY") + sage: p.ncols() + 0 + sage: p.add_variable() + 0 + sage: p.is_variable_integer(0) + False + """ + return False + + cpdef bint is_variable_continuous(self, int index): + """ + Test whether the given variable is of continuous/real type. + + INPUT: + + - ``index`` (integer) -- the variable's id + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver="CVXPY") + sage: p.ncols() + 0 + sage: p.add_variable() + 0 + sage: p.is_variable_continuous(0) + True + """ + return True diff --git a/src/sage/numerical/backends/generic_backend.pyx b/src/sage/numerical/backends/generic_backend.pyx index ac167aefa8d..8b02bc51cc5 100644 --- a/src/sage/numerical/backends/generic_backend.pyx +++ b/src/sage/numerical/backends/generic_backend.pyx @@ -1645,8 +1645,11 @@ def default_mip_solver(solver=None): elif solver == "Interactivelp": default_solver = solver + elif solver.startswith("Cvxpy"): + default_solver = solver + else: - raise ValueError("'solver' should be set to 'GLPK', 'Coin', 'CPLEX', 'CVXOPT', 'Gurobi', 'PPL', 'InteractiveLP', a callable, or None.") + raise ValueError("'solver' should be set to 'GLPK', 'Coin', 'CPLEX', 'CVXOPT', 'Gurobi', 'PPL', 'InteractiveLP', 'CVXPY', a callable, or None.") cpdef GenericBackend get_solver(constraint_generation = False, solver = None, base_ring = None): """ @@ -1802,5 +1805,13 @@ cpdef GenericBackend get_solver(constraint_generation = False, solver = None, ba from sage.numerical.backends.interactivelp_backend import InteractiveLPBackend return InteractiveLPBackend(base_ring=base_ring) + elif solver.startswith("Cvxpy"): + from sage.numerical.backends.cvxpy_backend import CVXPYBackend + from functools import partial + if solver == "Cvxpy": + return CVXPYBackend() + if solver.startswith("Cvxpy/"): + return CVXPYBackend(cvxpy_solver=solver[len("Cvxpy/")]) + else: - raise ValueError("'solver' should be set to 'GLPK', 'GLPK/exact', 'Coin', 'CPLEX', 'CVXOPT', 'Gurobi', 'PPL', 'InteractiveLP', None (in which case the default one is used), or a callable.") + raise ValueError("'solver' should be set to 'GLPK', 'GLPK/exact', 'Coin', 'CPLEX', 'CVXOPT', 'Gurobi', 'PPL', 'InteractiveLP', 'Cvxpy', None (in which case the default one is used), or a callable.") From 1999add889ae360f23dc208a4644d09f10905c59 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 12 Mar 2022 09:42:51 -0800 Subject: [PATCH 137/751] src/sage/numerical/backends/cvxpy_backend.pyx: Implement MixedIntegerLinearProgram(solver="CVXPY/SciPy/HiGHS") etc. --- src/sage/numerical/backends/cvxpy_backend.pyx | 66 +++++++++++++++++-- .../numerical/backends/generic_backend.pyx | 2 +- 2 files changed, 63 insertions(+), 5 deletions(-) diff --git a/src/sage/numerical/backends/cvxpy_backend.pyx b/src/sage/numerical/backends/cvxpy_backend.pyx index d6390a5a89b..de131361540 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pyx +++ b/src/sage/numerical/backends/cvxpy_backend.pyx @@ -1,3 +1,4 @@ +# sage.doctest: optional - cvxpy r""" CVXPY Backend @@ -31,10 +32,60 @@ cdef class CVXPYBackend: """ MIP Backend that delegates to CVXPY. + CVXPY interfaces to various solvers, see + https://www.cvxpy.org/install/index.html#install and + https://www.cvxpy.org/tutorial/advanced/index.html#choosing-a-solver + EXAMPLES:: - sage: from sage.numerical.backends.generic_backend import get_solver - sage: p = get_solver(solver="CVXPY") + sage: import cvxpy + sage: cvxpy.installed_solvers() # random + + Using the default solver determined by CVXPY:: + + sage: p = MixedIntegerLinearProgram(solver="CVXPY"); p.solve() + 0.0 + + Using a specific solver:: + + sage: p = MixedIntegerLinearProgram(solver="CVXPY/OSQP"); p.solve() + 0.0 + sage: p = MixedIntegerLinearProgram(solver="CVXPY/ECOS"); p.solve() + 0.0 + sage: p = MixedIntegerLinearProgram(solver="CVXPY/SCS"); p.solve() + 0.0 + sage: p = MixedIntegerLinearProgram(solver="CVXPY/SciPy/HiGHS"); p.solve() + 0.0 + + Open-source solvers provided by optional packages:: + + sage: p = MixedIntegerLinearProgram(solver="CVXPY/GLPK"); p.solve() # optional - cvxopt + 0.0 + sage: p = MixedIntegerLinearProgram(solver="CVXPY/GLPK_MI"); p.solve() # optional - cvxopt + 0.0 + sage: p = MixedIntegerLinearProgram(solver="CVXPY/CVXOPT"); p.solve() # optional - cvxopt + 0.0 + sage: p = MixedIntegerLinearProgram(solver="CVXPY/GLOP"); p.solve() # optional - ortools + 0.0 + sage: p = MixedIntegerLinearProgram(solver="CVXPY/PDLP"); p.solve() # optional - ortools + 0.0 + sage: p = MixedIntegerLinearProgram(solver="CVXPY/CBC"); p.solve() # optional - cylp + 0.0 + + Non-free solvers:: + + sage: p = MixedIntegerLinearProgram(solver="CVXPY/Gurobi"); p.solve() # optional - gurobi + 0.0 + sage: p = MixedIntegerLinearProgram(solver="CVXPY/CPLEX"); p.solve() # optional - cplex + 0.0 + sage: p = MixedIntegerLinearProgram(solver="CVXPY/MOSEK"); p.solve() # optional - mosek + 0.0 + sage: p = MixedIntegerLinearProgram(solver="CVXPY/SCIP"); p.solve() # optional - pyscipopt + 0.0 + sage: p = MixedIntegerLinearProgram(solver="CVXPY/XPRESS"); p.solve() # optional - xpress + 0.0 + sage: p = MixedIntegerLinearProgram(solver="CVXPY/NAG"); p.solve() # optional - naginterfaces + 0.0 """ def __cinit__(self, maximization=True, base_ring=None, cvxpy_solver=None, cvxpy_solver_args=None): @@ -51,9 +102,16 @@ cdef class CVXPYBackend: elif base_ring != RDF: raise ValueError('base_ring must be RDF') + if cvxpy_solver_args is None: + cvxpy_solver_args = {} + if isinstance(cvxpy_solver, str): + cvxpy_solver = cvxpy_solver.upper() + if cvxpy_solver.startswith("SCIPY/"): + cvxpy_solver_args['scipy_options'] = {"method": cvxpy_solver[len("SCIPY/"):]} + cvxpy_solver = "SCIPY" import cvxpy as cp - cvxpy_solver = getattr(cp, cvxpy_solver.upper()) + cvxpy_solver = getattr(cp, cvxpy_solver) self._cvxpy_solver = cvxpy_solver self._cvxpy_solver_args = cvxpy_solver_args @@ -349,7 +407,7 @@ cdef class CVXPYBackend: MIPSolverException: ... """ try: - self.problem.solve() + self.problem.solve(solver=self._cvxpy_solver, **self._cvxpy_solver_args) except Exception as e: raise MIPSolverException(f"cvxpy.Problem.solve raised exception: {e}") status = self.problem.status diff --git a/src/sage/numerical/backends/generic_backend.pyx b/src/sage/numerical/backends/generic_backend.pyx index 8b02bc51cc5..c12e1923495 100644 --- a/src/sage/numerical/backends/generic_backend.pyx +++ b/src/sage/numerical/backends/generic_backend.pyx @@ -1811,7 +1811,7 @@ cpdef GenericBackend get_solver(constraint_generation = False, solver = None, ba if solver == "Cvxpy": return CVXPYBackend() if solver.startswith("Cvxpy/"): - return CVXPYBackend(cvxpy_solver=solver[len("Cvxpy/")]) + return CVXPYBackend(cvxpy_solver=solver[len("Cvxpy/"):]) else: raise ValueError("'solver' should be set to 'GLPK', 'GLPK/exact', 'Coin', 'CPLEX', 'CVXOPT', 'Gurobi', 'PPL', 'InteractiveLP', 'Cvxpy', None (in which case the default one is used), or a callable.") From cf742f75ff008cf48fba610cea4b8e5d8583848e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 12 Mar 2022 10:52:35 -0800 Subject: [PATCH 138/751] CVXPYBackend.set_objective: Fix up --- src/sage/numerical/backends/cvxpy_backend.pyx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sage/numerical/backends/cvxpy_backend.pyx b/src/sage/numerical/backends/cvxpy_backend.pyx index de131361540..324725b2ee7 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pyx +++ b/src/sage/numerical/backends/cvxpy_backend.pyx @@ -353,6 +353,7 @@ cdef class CVXPYBackend: else: expr = Constant(0) objective = type(self.problem.objective)(expr) + self.problem = cvxpy.Problem(objective, self.problem.constraints) cpdef set_sense(self, int sense): """ From 460ab6917832068409c6a6ca8bcbec85e7400b08 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 12 Mar 2022 10:53:18 -0800 Subject: [PATCH 139/751] CVXPYBackend.get_variable_value: Convert array to float, fix doctests --- src/sage/numerical/backends/cvxpy_backend.pyx | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/sage/numerical/backends/cvxpy_backend.pyx b/src/sage/numerical/backends/cvxpy_backend.pyx index 324725b2ee7..de85c126656 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pyx +++ b/src/sage/numerical/backends/cvxpy_backend.pyx @@ -438,12 +438,12 @@ cdef class CVXPYBackend: sage: p.set_objective([2, 5]) sage: p.solve() 0 - sage: p.get_objective_value() - 15/2 - sage: p.get_variable_value(0) - 0 - sage: p.get_variable_value(1) - 3/2 + sage: p.get_objective_value() # abs tol 1e-8 + 7.5 + sage: p.get_variable_value(0) # abs tol 1e-8 + 0.0 + sage: p.get_variable_value(1) # abs tol 1e-8 + 1.5 """ return self.problem.value @@ -465,14 +465,14 @@ cdef class CVXPYBackend: sage: p.set_objective([2, 5]) sage: p.solve() 0 - sage: p.get_objective_value() - 15/2 - sage: p.get_variable_value(0) - 0 - sage: p.get_variable_value(1) - 3/2 - """ - return self.variables[variable].value + sage: p.get_objective_value() # abs tol 1e-8 + 7.5 + sage: p.get_variable_value(0) # abs tol 1e-8 + 0.0 + sage: p.get_variable_value(1) # abs tol 1e-8 + 1.5 + """ + return float(self.variables[variable].value) cpdef int ncols(self): """ From 16885574530cf8fe51ce5a0bf2e804c23e9e4ac2 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 12 Mar 2022 11:10:11 -0800 Subject: [PATCH 140/751] src/sage/numerical/backends/generic_backend.pyx: Make Cvxpy/cbc the default solver if available --- src/sage/numerical/backends/cvxpy_backend.pyx | 4 ++-- .../numerical/backends/generic_backend.pyx | 18 ++++++++++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/src/sage/numerical/backends/cvxpy_backend.pyx b/src/sage/numerical/backends/cvxpy_backend.pyx index de85c126656..6207adda02a 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pyx +++ b/src/sage/numerical/backends/cvxpy_backend.pyx @@ -137,8 +137,8 @@ cdef class CVXPYBackend: sage: cp = copy(p.get_backend()) sage: cp.solve() 0 - sage: cp.get_objective_value() - 6 + sage: cp.get_objective_value() # abs tol 1e-8 + 6.0 """ cdef CVXPYBackend cp = type(self)(base_ring=self.base_ring()) cp.problem = self.problem # it's considered immutable; so no need to copy. diff --git a/src/sage/numerical/backends/generic_backend.pyx b/src/sage/numerical/backends/generic_backend.pyx index c12e1923495..d709402b150 100644 --- a/src/sage/numerical/backends/generic_backend.pyx +++ b/src/sage/numerical/backends/generic_backend.pyx @@ -1591,7 +1591,7 @@ def default_mip_solver(solver=None): return default_solver else: - for s in ["Cplex", "Gurobi", "Coin", "Glpk"]: + for s in ["Cplex", "Gurobi", "Cvxpy/cbc", "Coin", "Glpk"]: try: default_mip_solver(s) return s @@ -1645,8 +1645,22 @@ def default_mip_solver(solver=None): elif solver == "Interactivelp": default_solver = solver + elif solver == "Cvxpy": + try: + from sage.numerical.backends.cvxpy_backend import CVXPYBackend + except ImportError: + raise ValueError("CVXPY is not available. Please refer to the documentation to install it.") + else: + default_solver = solver + elif solver.startswith("Cvxpy"): - default_solver = solver + try: + s = get_solver(solver=solver) + s.solve() + except Exception as e: + raise ValueError(f"{solver} is not available: {e}. Please refer to the documentation to install it.") + else: + default_solver = solver else: raise ValueError("'solver' should be set to 'GLPK', 'Coin', 'CPLEX', 'CVXOPT', 'Gurobi', 'PPL', 'InteractiveLP', 'CVXPY', a callable, or None.") From a9d28519e1a85c64415021a7d276e435d5461f17 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 12 Mar 2022 12:24:01 -0800 Subject: [PATCH 141/751] CVXPYBackend.add_variable: Handle coefficients --- src/sage/numerical/backends/cvxpy_backend.pyx | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/sage/numerical/backends/cvxpy_backend.pyx b/src/sage/numerical/backends/cvxpy_backend.pyx index 6207adda02a..5aa8b5b1eca 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pyx +++ b/src/sage/numerical/backends/cvxpy_backend.pyx @@ -27,6 +27,7 @@ from copy import copy import cvxpy from cvxpy.atoms.affine.add_expr import AddExpression from cvxpy.expressions.constants import Constant +from cvxpy.constraints.zero import Equality cdef class CVXPYBackend: """ @@ -217,6 +218,17 @@ cdef class CVXPYBackend: self.variables.append(variable) index = self.ncols() - 1 + + if coefficients is not None: + constraints = list(self.problem.constraints) + for i, v in coefficients: + if not isinstance(constraints[i], Equality): + raise NotImplementedError('adding coefficients to inequalities is ambiguous ' + 'because cvxpy rewrites all inequalities as <=') + constraints[i] = type(constraints[i])(constraints[i].args[0] + v * variable, + constraints[i].args[1]) + self.problem = cvxpy.Problem(self.problem.objective, constraints) + self.add_linear_constraint([(index, 1)], lower_bound, upper_bound) if obj: @@ -224,9 +236,6 @@ cdef class CVXPYBackend: + obj * variable) self.problem = cvxpy.Problem(objective, self.problem.constraints) - if coefficients is not None: - raise NotImplementedError - return index cpdef set_verbosity(self, int level): From 6e0425239bab2f6d5b5401ca4980279ca15c9d0d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 12 Mar 2022 12:24:27 -0800 Subject: [PATCH 142/751] src/sage/numerical/backends/cvxpy_backend.pyx: Increase abs tol in doctests --- src/sage/numerical/backends/cvxpy_backend.pyx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/sage/numerical/backends/cvxpy_backend.pyx b/src/sage/numerical/backends/cvxpy_backend.pyx index 5aa8b5b1eca..273a671f1fd 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pyx +++ b/src/sage/numerical/backends/cvxpy_backend.pyx @@ -138,7 +138,7 @@ cdef class CVXPYBackend: sage: cp = copy(p.get_backend()) sage: cp.solve() 0 - sage: cp.get_objective_value() # abs tol 1e-8 + sage: cp.get_objective_value() # abs tol 1e-7 6.0 """ cdef CVXPYBackend cp = type(self)(base_ring=self.base_ring()) @@ -447,11 +447,11 @@ cdef class CVXPYBackend: sage: p.set_objective([2, 5]) sage: p.solve() 0 - sage: p.get_objective_value() # abs tol 1e-8 + sage: p.get_objective_value() # abs tol 1e-7 7.5 - sage: p.get_variable_value(0) # abs tol 1e-8 + sage: p.get_variable_value(0) # abs tol 1e-7 0.0 - sage: p.get_variable_value(1) # abs tol 1e-8 + sage: p.get_variable_value(1) # abs tol 1e-7 1.5 """ return self.problem.value @@ -474,11 +474,11 @@ cdef class CVXPYBackend: sage: p.set_objective([2, 5]) sage: p.solve() 0 - sage: p.get_objective_value() # abs tol 1e-8 + sage: p.get_objective_value() # abs tol 1e-7 7.5 - sage: p.get_variable_value(0) # abs tol 1e-8 + sage: p.get_variable_value(0) # abs tol 1e-7 0.0 - sage: p.get_variable_value(1) # abs tol 1e-8 + sage: p.get_variable_value(1) # abs tol 1e-7 1.5 """ return float(self.variables[variable].value) From 08d7a7dc3dd7f6faf02e10d7bf975aa94f4cc042 Mon Sep 17 00:00:00 2001 From: sheerluck Date: Sat, 12 Mar 2022 13:51:11 -0800 Subject: [PATCH 143/751] adding some code from ppl_backend.pyx to cvxpy_backend.{pyx,pxd} --- src/sage/numerical/backends/cvxpy_backend.pxd | 8 + src/sage/numerical/backends/cvxpy_backend.pyx | 286 +++++++++++++++++- 2 files changed, 290 insertions(+), 4 deletions(-) diff --git a/src/sage/numerical/backends/cvxpy_backend.pxd b/src/sage/numerical/backends/cvxpy_backend.pxd index 3d077c3ed07..c311f51b885 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pxd +++ b/src/sage/numerical/backends/cvxpy_backend.pxd @@ -17,6 +17,14 @@ cdef class CVXPYBackend(GenericBackend): cdef object _cvxpy_solver cdef object _cvxpy_solver_args + cdef list objective_coefficients + cdef list Matrix + + cdef list row_lower_bound + cdef list row_upper_bound + cdef list col_lower_bound + cdef list col_upper_bound + cpdef int add_variable(self, lower_bound=*, upper_bound=*, diff --git a/src/sage/numerical/backends/cvxpy_backend.pyx b/src/sage/numerical/backends/cvxpy_backend.pyx index 273a671f1fd..3fb0f8e99eb 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pyx +++ b/src/sage/numerical/backends/cvxpy_backend.pyx @@ -118,6 +118,13 @@ cdef class CVXPYBackend: self.set_verbosity(0) self.variables = [] + self.Matrix = [] + self.row_lower_bound = [] + self.row_upper_bound = [] + self.col_lower_bound = [] + self.col_upper_bound = [] + self.objective_coefficients = [] + self.obj_constant_term = 0.0 if maximization: objective = cvxpy.Maximize(0) else: @@ -144,6 +151,13 @@ cdef class CVXPYBackend: cdef CVXPYBackend cp = type(self)(base_ring=self.base_ring()) cp.problem = self.problem # it's considered immutable; so no need to copy. cp.variables = copy(self.variables) + cp.Matrix = [row[:] for row in self.Matrix] + cp.row_lower_bound = self.row_lower_bound[:] + cp.row_upper_bound = self.row_upper_bound[:] + cp.col_lower_bound = self.col_lower_bound[:] + cp.col_upper_bound = self.col_upper_bound[:] + cp.objective_coefficients = self.objective_coefficients[:] + cp.obj_constant_term = self.obj_constant_term return cp cpdef cvxpy_problem(self): @@ -209,6 +223,12 @@ cdef class CVXPYBackend: elif vtype != 1: raise ValueError("Exactly one parameter of 'binary', 'integer' and 'continuous' must be 'True'.") + for i in range(len(self.Matrix)): + self.Matrix[i].append(0) + self.col_lower_bound.append(lower_bound) + self.col_upper_bound.append(upper_bound) + self.objective_coefficients.append(obj) + if binary: variable = cvxpy.Variable(name=name, boolean=True) elif integer: @@ -287,6 +307,16 @@ cdef class CVXPYBackend: sage: p.row_name(1) 'foo' """ + last = len(self.Matrix) + self.Matrix.append([]) + for i in range(len(self.objective_coefficients)): + self.Matrix[last].append(0) + for a in coefficients: + self.Matrix[last][a[0]] = a[1] + + self.row_lower_bound.append(lower_bound) + self.row_upper_bound.append(upper_bound) + if coefficients: expr = AddExpression([v * self.variables[i] for i, v in coefficients]) else: @@ -334,6 +364,14 @@ cdef class CVXPYBackend: sage: p.nrows() 5 """ + for i in range(len(self.Matrix)): + self.Matrix[i].append(0) + for i in range(len(indices)): + self.Matrix[indices[i]][len(self.Matrix[indices[i]]) - 1] = coeffs[i] + + self.col_lower_bound.append(None) + self.col_upper_bound.append(None) + #self.objective_coefficients.append(0) goes to "self.add_variable" self.add_variable(coefficients=zip(indices, coeffs)) cpdef set_objective(self, list coeff, d=0.0): @@ -359,10 +397,14 @@ cdef class CVXPYBackend: """ if self.variables: expr = AddExpression([c * x for c, x in zip(coeff, self.variables)]) + for i in range(len(coeff)): + self.objective_coefficients[i] = coeff[i] else: expr = Constant(0) objective = type(self.problem.objective)(expr) - self.problem = cvxpy.Problem(objective, self.problem.constraints) + constraints = list(self.problem.constraints) + self.problem = cvxpy.Problem(objective, constraints) + self.obj_constant_term = d cpdef set_sense(self, int sense): """ @@ -392,6 +434,42 @@ cdef class CVXPYBackend: objective = cvxpy.Minimize(expr) self.problem = cvxpy.Problem(objective, self.problem.constraints) + cpdef objective_coefficient(self, int variable, coeff=None): + """ + Set or get the coefficient of a variable in the objective function + + INPUT: + + - ``variable`` (integer) -- the variable's id + + - ``coeff`` (double) -- its coefficient or ``None`` for + reading (default: ``None``) + + EXAMPLES:: + + sage: from sage_numerical_backends_coin.coin_backend import CoinBackend + sage: p = CoinBackend() + sage: p.add_variable() + 0 + sage: p.objective_coefficient(0) + 0.0 + sage: p.objective_coefficient(0,2) + sage: p.objective_coefficient(0) + 2.0 + """ + if coeff is not None: + self.objective_coefficients[variable] = coeff + expr = AddExpression([c * x for c, x in zip(coeff, self.variables)]) + objective = type(self.problem.objective)(expr) + constraints = list(self.problem.constraints) + self.problem = cvxpy.Problem(objective, constraints) + else: + if variable < len(self.objective_coefficients): + return self.objective_coefficients[variable] + else: + return 0 + + cpdef int solve(self) except -1: """ Solve the problem. @@ -454,7 +532,7 @@ cdef class CVXPYBackend: sage: p.get_variable_value(1) # abs tol 1e-7 1.5 """ - return self.problem.value + return self.problem.value + self.obj_constant_term cpdef get_variable_value(self, int variable): """ @@ -557,6 +635,98 @@ cdef class CVXPYBackend: else: self.prob_name = str(name) + cpdef row(self, int i): + """ + Return a row + + INPUT: + + - ``index`` (integer) -- the constraint's id. + + OUTPUT: + + A pair ``(indices, coeffs)`` where ``indices`` lists the + entries whose coefficient is nonzero, and to which ``coeffs`` + associates their coefficient on the model of the + ``add_linear_constraint`` method. + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver="CVXPY") + sage: p.add_variables(5) + 4 + sage: p.add_linear_constraint(zip(range(5), range(5)), 2, 2) + sage: p.row(0) + ([1, 2, 3, 4], [1, 2, 3, 4]) + sage: p.row_bounds(0) + (2, 2) + """ + idx = [] + coef = [] + for j in range(len(self.Matrix[i])): + if self.Matrix[i][j] != 0: + idx.append(j) + coef.append(self.Matrix[i][j]) + return (idx, coef) + + cpdef row_bounds(self, int index): + """ + Return the bounds of a specific constraint. + + INPUT: + + - ``index`` (integer) -- the constraint's id. + + OUTPUT: + + A pair ``(lower_bound, upper_bound)``. Each of them can be set + to ``None`` if the constraint is not bounded in the + corresponding direction, and is a real value otherwise. + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver="CVXPY") + sage: p.add_variables(5) + 4 + sage: p.add_linear_constraint(zip(range(5), range(5)), 2, 2) + sage: p.row(0) + ([1, 2, 3, 4], [1, 2, 3, 4]) + sage: p.row_bounds(0) + (2, 2) + """ + return (self.row_lower_bound[index], self.row_upper_bound[index]) + + cpdef col_bounds(self, int index): + """ + Return the bounds of a specific variable. + + INPUT: + + - ``index`` (integer) -- the variable's id. + + OUTPUT: + + A pair ``(lower_bound, upper_bound)``. Each of them can be set + to ``None`` if the variable is not bounded in the + corresponding direction, and is a real value otherwise. + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver = "CVXPY") + sage: p.add_variable() + 0 + sage: p.col_bounds(0) + (0, None) + sage: p.variable_upper_bound(0, 5) + sage: p.col_bounds(0) + (0, 5) + """ + return (self.col_lower_bound[index], self.col_upper_bound[index]) + + cpdef bint is_variable_binary(self, int index): """ Test whether the given variable is of binary type. @@ -576,7 +746,7 @@ cdef class CVXPYBackend: sage: p.is_variable_binary(0) False """ - return False + return True cpdef bint is_variable_integer(self, int index): """ @@ -618,4 +788,112 @@ cdef class CVXPYBackend: sage: p.is_variable_continuous(0) True """ - return True + return False + + cpdef row_name(self, int index): + """ + Return the ``index`` th row name + + INPUT: + + - ``index`` (integer) -- the row's id + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver="CVXPY") + sage: p.row_name(0) + 'Empty constraint 1' + """ + #if self.row_name_var[index] is not None: + # return self.row_name_var[index] + return "constraint_" + repr(index) + + cpdef col_name(self, int index): + """ + Return the ``index`` th col name + + INPUT: + + - ``index`` (integer) -- the col's id + + - ``name`` (``char *``) -- its name. When set to ``NULL`` + (default), the method returns the current name. + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver="CVXPY") + sage: p.add_variable() + 0 + sage: p.col_name(0) + 'I am a variable' + """ + #if self.col_name_var[index] is not None: + # return self.col_name_var[index] + return "x_" + repr(index) + + cpdef variable_upper_bound(self, int index, value = False): + """ + Return or define the upper bound on a variable + + INPUT: + + - ``index`` (integer) -- the variable's id + + - ``value`` -- real value, or ``None`` to mean that the + variable has not upper bound. When set to ``None`` + (default), the method returns the current value. + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver = "CVXPY") + sage: p.add_variable() + 0 + sage: p.col_bounds(0) + (0, None) + sage: p.variable_upper_bound(0, 5) + sage: p.col_bounds(0) + (0, 5) + sage: p.variable_upper_bound(0, None) + sage: p.col_bounds(0) + (0, None) + """ + if value is not False: + self.col_upper_bound[index] = value + else: + return self.col_upper_bound[index] + + cpdef variable_lower_bound(self, int index, value = False): + """ + Return or define the lower bound on a variable + + INPUT: + + - ``index`` (integer) -- the variable's id + + - ``value`` -- real value, or ``None`` to mean that the + variable has not lower bound. When set to ``None`` + (default), the method returns the current value. + + EXAMPLES:: + + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver = "CVXPY") + sage: p.add_variable() + 0 + sage: p.col_bounds(0) + (0, None) + sage: p.variable_lower_bound(0, 5) + sage: p.col_bounds(0) + (5, None) + sage: p.variable_lower_bound(0, None) + sage: p.col_bounds(0) + (None, None) + """ + if value is not False: + self.col_lower_bound[index] = value + else: + return self.col_lower_bound[index] + From e00601fc8f0c527342a205d0d58ef4b4fb7f7e78 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 12 Mar 2022 16:08:36 -0800 Subject: [PATCH 144/751] CVXPYBackend.is_variable_{boolean,integer,continuous}: Implement --- src/sage/numerical/backends/cvxpy_backend.pyx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sage/numerical/backends/cvxpy_backend.pyx b/src/sage/numerical/backends/cvxpy_backend.pyx index 3fb0f8e99eb..e04155033bd 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pyx +++ b/src/sage/numerical/backends/cvxpy_backend.pyx @@ -746,7 +746,7 @@ cdef class CVXPYBackend: sage: p.is_variable_binary(0) False """ - return True + return bool(self.variables[index].boolean_idx) cpdef bint is_variable_integer(self, int index): """ @@ -767,7 +767,7 @@ cdef class CVXPYBackend: sage: p.is_variable_integer(0) False """ - return False + return bool(self.variables[index].integer_idx) cpdef bint is_variable_continuous(self, int index): """ @@ -788,7 +788,7 @@ cdef class CVXPYBackend: sage: p.is_variable_continuous(0) True """ - return False + return not self.is_variable_binary(index) and not self.is_variable_integer(index) cpdef row_name(self, int index): """ From 555ea6b28b65668358ee15e27bae80fda6c5ca2b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 12 Mar 2022 16:11:09 -0800 Subject: [PATCH 145/751] src/sage/numerical/backends/cvxpy_backend.pyx: Fix up some doctests --- src/sage/numerical/backends/cvxpy_backend.pyx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/sage/numerical/backends/cvxpy_backend.pyx b/src/sage/numerical/backends/cvxpy_backend.pyx index e04155033bd..c42a9a758d1 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pyx +++ b/src/sage/numerical/backends/cvxpy_backend.pyx @@ -420,7 +420,7 @@ cdef class CVXPYBackend: EXAMPLES:: sage: from sage.numerical.backends.generic_backend import get_solver - sage: p = get_solver(solver = "GLPK") + sage: p = get_solver(solver="CVXPY") sage: p.is_maximization() True sage: p.set_sense(-1) @@ -447,8 +447,8 @@ cdef class CVXPYBackend: EXAMPLES:: - sage: from sage_numerical_backends_coin.coin_backend import CoinBackend - sage: p = CoinBackend() + sage: from sage.numerical.backends.generic_backend import get_solver + sage: p = get_solver(solver="CVXPY") sage: p.add_variable() 0 sage: p.objective_coefficient(0) @@ -715,7 +715,7 @@ cdef class CVXPYBackend: EXAMPLES:: sage: from sage.numerical.backends.generic_backend import get_solver - sage: p = get_solver(solver = "CVXPY") + sage: p = get_solver(solver="CVXPY") sage: p.add_variable() 0 sage: p.col_bounds(0) @@ -848,7 +848,7 @@ cdef class CVXPYBackend: EXAMPLES:: sage: from sage.numerical.backends.generic_backend import get_solver - sage: p = get_solver(solver = "CVXPY") + sage: p = get_solver(solver="CVXPY") sage: p.add_variable() 0 sage: p.col_bounds(0) @@ -880,7 +880,7 @@ cdef class CVXPYBackend: EXAMPLES:: sage: from sage.numerical.backends.generic_backend import get_solver - sage: p = get_solver(solver = "CVXPY") + sage: p = get_solver(solver="CVXPY") sage: p.add_variable() 0 sage: p.col_bounds(0) From cded2773465691ac66c3524b5a81b98d34c20ba5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 12 Mar 2022 16:18:40 -0800 Subject: [PATCH 146/751] CVXPYBackend.objective_coefficient: Fix up --- src/sage/numerical/backends/cvxpy_backend.pyx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sage/numerical/backends/cvxpy_backend.pyx b/src/sage/numerical/backends/cvxpy_backend.pyx index c42a9a758d1..d7651bd568b 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pyx +++ b/src/sage/numerical/backends/cvxpy_backend.pyx @@ -317,8 +317,9 @@ cdef class CVXPYBackend: self.row_lower_bound.append(lower_bound) self.row_upper_bound.append(upper_bound) - if coefficients: - expr = AddExpression([v * self.variables[i] for i, v in coefficients]) + terms = [v * self.variables[i] for i, v in coefficients] + if terms: + expr = AddExpression(terms) else: expr = Constant(0) constraints = list(self.problem.constraints) @@ -459,7 +460,7 @@ cdef class CVXPYBackend: """ if coeff is not None: self.objective_coefficients[variable] = coeff - expr = AddExpression([c * x for c, x in zip(coeff, self.variables)]) + expr = self.problem.objective.args[0] + coeff * self.variables[variable] objective = type(self.problem.objective)(expr) constraints = list(self.problem.constraints) self.problem = cvxpy.Problem(objective, constraints) @@ -469,7 +470,6 @@ cdef class CVXPYBackend: else: return 0 - cpdef int solve(self) except -1: """ Solve the problem. From c9611aac2529a91bbf05e74bfe9cea50664b3831 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Mar 2022 14:46:29 -0700 Subject: [PATCH 147/751] build/pkgs/cylp: Add patch from /~https://github.com/coin-or/CyLP/pull/150 --- build/pkgs/cylp/package-version.txt | 2 +- ...4b94e279e96842da0d38ae657f06f1e9415.patch} | 0 ...21ac6bcc290fd60b83bf48741030d9d0abe7.patch | 2888 +++++++++++++++++ 3 files changed, 2889 insertions(+), 1 deletion(-) rename build/pkgs/cylp/patches/{e619c4b94e279e96842da0d38ae657f06f1e9415.patch => 00-e619c4b94e279e96842da0d38ae657f06f1e9415.patch} (100%) create mode 100644 build/pkgs/cylp/patches/01-7c5b21ac6bcc290fd60b83bf48741030d9d0abe7.patch diff --git a/build/pkgs/cylp/package-version.txt b/build/pkgs/cylp/package-version.txt index ad7e0bcae92..a242ad0cff8 100644 --- a/build/pkgs/cylp/package-version.txt +++ b/build/pkgs/cylp/package-version.txt @@ -1 +1 @@ -0.91.4 +0.91.4.p1 diff --git a/build/pkgs/cylp/patches/e619c4b94e279e96842da0d38ae657f06f1e9415.patch b/build/pkgs/cylp/patches/00-e619c4b94e279e96842da0d38ae657f06f1e9415.patch similarity index 100% rename from build/pkgs/cylp/patches/e619c4b94e279e96842da0d38ae657f06f1e9415.patch rename to build/pkgs/cylp/patches/00-e619c4b94e279e96842da0d38ae657f06f1e9415.patch diff --git a/build/pkgs/cylp/patches/01-7c5b21ac6bcc290fd60b83bf48741030d9d0abe7.patch b/build/pkgs/cylp/patches/01-7c5b21ac6bcc290fd60b83bf48741030d9d0abe7.patch new file mode 100644 index 00000000000..036d73f7973 --- /dev/null +++ b/build/pkgs/cylp/patches/01-7c5b21ac6bcc290fd60b83bf48741030d9d0abe7.patch @@ -0,0 +1,2888 @@ +From 7c5b21ac6bcc290fd60b83bf48741030d9d0abe7 Mon Sep 17 00:00:00 2001 +From: Ted Ralphs +Date: Mon, 14 Mar 2022 16:19:51 -0400 +Subject: [PATCH] Adding function to detect whether problem is infeasible or an + optimal solution is found + +--- + cylp/cy/CyCbcModel.cpp | 866 +++++++++++++++++++++++++---------------- + cylp/cy/CyCbcModel.pxd | 2 + + cylp/cy/CyCbcModel.pyx | 13 +- + 3 files changed, 536 insertions(+), 345 deletions(-) + +diff --git a/cylp/cy/CyCbcModel.cpp b/cylp/cy/CyCbcModel.cpp +index c62fd3b..8192e18 100644 +--- a/cylp/cy/CyCbcModel.cpp ++++ b/cylp/cy/CyCbcModel.cpp +@@ -1,4 +1,4 @@ +-/* Generated by Cython 0.29.25 */ ++/* Generated by Cython 0.29.28 */ + + #ifndef PY_SSIZE_T_CLEAN + #define PY_SSIZE_T_CLEAN +@@ -9,8 +9,8 @@ + #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) + #error Cython requires Python 2.6+ or Python 3.3+. + #else +-#define CYTHON_ABI "0_29_25" +-#define CYTHON_HEX_VERSION 0x001D19F0 ++#define CYTHON_ABI "0_29_28" ++#define CYTHON_HEX_VERSION 0x001D1CF0 + #define CYTHON_FUTURE_DIVISION 0 + #include + #ifndef offsetof +@@ -172,7 +172,10 @@ + #ifndef CYTHON_UNPACK_METHODS + #define CYTHON_UNPACK_METHODS 1 + #endif +- #ifndef CYTHON_FAST_THREAD_STATE ++ #if PY_VERSION_HEX >= 0x030B00A4 ++ #undef CYTHON_FAST_THREAD_STATE ++ #define CYTHON_FAST_THREAD_STATE 0 ++ #elif !defined(CYTHON_FAST_THREAD_STATE) + #define CYTHON_FAST_THREAD_STATE 1 + #endif + #ifndef CYTHON_FAST_PYCALL +@@ -187,7 +190,10 @@ + #ifndef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) + #endif +- #ifndef CYTHON_USE_EXC_INFO_STACK ++ #if PY_VERSION_HEX >= 0x030B00A4 ++ #undef CYTHON_USE_EXC_INFO_STACK ++ #define CYTHON_USE_EXC_INFO_STACK 0 ++ #elif !defined(CYTHON_USE_EXC_INFO_STACK) + #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) + #endif + #endif +@@ -994,7 +1000,7 @@ static const char *__pyx_f[] = { + "cylp/cy/CyCutGeneratorPythonBase.pxd", + }; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":690 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":690 + * # in Cython to enable them only on the right systems. + * + * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< +@@ -1003,7 +1009,7 @@ static const char *__pyx_f[] = { + */ + typedef npy_int8 __pyx_t_5numpy_int8_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":691 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":691 + * + * ctypedef npy_int8 int8_t + * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< +@@ -1012,7 +1018,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; + */ + typedef npy_int16 __pyx_t_5numpy_int16_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":692 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":692 + * ctypedef npy_int8 int8_t + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< +@@ -1021,7 +1027,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; + */ + typedef npy_int32 __pyx_t_5numpy_int32_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":693 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":693 + * ctypedef npy_int16 int16_t + * ctypedef npy_int32 int32_t + * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< +@@ -1030,7 +1036,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; + */ + typedef npy_int64 __pyx_t_5numpy_int64_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":697 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":697 + * #ctypedef npy_int128 int128_t + * + * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< +@@ -1039,7 +1045,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; + */ + typedef npy_uint8 __pyx_t_5numpy_uint8_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":698 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":698 + * + * ctypedef npy_uint8 uint8_t + * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< +@@ -1048,7 +1054,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; + */ + typedef npy_uint16 __pyx_t_5numpy_uint16_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":699 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":699 + * ctypedef npy_uint8 uint8_t + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< +@@ -1057,7 +1063,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; + */ + typedef npy_uint32 __pyx_t_5numpy_uint32_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":700 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":700 + * ctypedef npy_uint16 uint16_t + * ctypedef npy_uint32 uint32_t + * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< +@@ -1066,7 +1072,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; + */ + typedef npy_uint64 __pyx_t_5numpy_uint64_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":704 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":704 + * #ctypedef npy_uint128 uint128_t + * + * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< +@@ -1075,7 +1081,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; + */ + typedef npy_float32 __pyx_t_5numpy_float32_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":705 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":705 + * + * ctypedef npy_float32 float32_t + * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< +@@ -1084,7 +1090,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; + */ + typedef npy_float64 __pyx_t_5numpy_float64_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":714 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":714 + * # The int types are mapped a bit surprising -- + * # numpy.int corresponds to 'l' and numpy.long to 'q' + * ctypedef npy_long int_t # <<<<<<<<<<<<<< +@@ -1093,7 +1099,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; + */ + typedef npy_long __pyx_t_5numpy_int_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":715 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":715 + * # numpy.int corresponds to 'l' and numpy.long to 'q' + * ctypedef npy_long int_t + * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< +@@ -1102,7 +1108,7 @@ typedef npy_long __pyx_t_5numpy_int_t; + */ + typedef npy_longlong __pyx_t_5numpy_long_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":716 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":716 + * ctypedef npy_long int_t + * ctypedef npy_longlong long_t + * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< +@@ -1111,7 +1117,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; + */ + typedef npy_longlong __pyx_t_5numpy_longlong_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":718 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":718 + * ctypedef npy_longlong longlong_t + * + * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< +@@ -1120,7 +1126,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; + */ + typedef npy_ulong __pyx_t_5numpy_uint_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":719 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":719 + * + * ctypedef npy_ulong uint_t + * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< +@@ -1129,7 +1135,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; + */ + typedef npy_ulonglong __pyx_t_5numpy_ulong_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":720 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":720 + * ctypedef npy_ulong uint_t + * ctypedef npy_ulonglong ulong_t + * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< +@@ -1138,7 +1144,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; + */ + typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":722 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":722 + * ctypedef npy_ulonglong ulonglong_t + * + * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< +@@ -1147,7 +1153,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; + */ + typedef npy_intp __pyx_t_5numpy_intp_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":723 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":723 + * + * ctypedef npy_intp intp_t + * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< +@@ -1156,7 +1162,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; + */ + typedef npy_uintp __pyx_t_5numpy_uintp_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":725 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":725 + * ctypedef npy_uintp uintp_t + * + * ctypedef npy_double float_t # <<<<<<<<<<<<<< +@@ -1165,7 +1171,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; + */ + typedef npy_double __pyx_t_5numpy_float_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":726 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":726 + * + * ctypedef npy_double float_t + * ctypedef npy_double double_t # <<<<<<<<<<<<<< +@@ -1174,7 +1180,7 @@ typedef npy_double __pyx_t_5numpy_float_t; + */ + typedef npy_double __pyx_t_5numpy_double_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":727 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":727 + * ctypedef npy_double float_t + * ctypedef npy_double double_t + * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< +@@ -1240,7 +1246,7 @@ struct __pyx_obj_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase; + struct __pyx_obj_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase; + struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":729 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":729 + * ctypedef npy_longdouble longdouble_t + * + * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< +@@ -1249,7 +1255,7 @@ struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel; + */ + typedef npy_cfloat __pyx_t_5numpy_cfloat_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":730 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":730 + * + * ctypedef npy_cfloat cfloat_t + * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< +@@ -1258,7 +1264,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; + */ + typedef npy_cdouble __pyx_t_5numpy_cdouble_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":731 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":731 + * ctypedef npy_cfloat cfloat_t + * ctypedef npy_cdouble cdouble_t + * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< +@@ -1267,7 +1273,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; + */ + typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":733 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":733 + * ctypedef npy_clongdouble clongdouble_t + * + * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< +@@ -1291,7 +1297,7 @@ struct __pyx_opt_args_4cylp_2cy_12CyClpSimplex_12CyClpSimplex_readMps { + }; + struct __pyx_opt_args_4cylp_2cy_10CyCbcModel_10CyCbcModel_addCutGenerator; + +-/* "cylp/cy/CyCbcModel.pxd":89 ++/* "cylp/cy/CyCbcModel.pxd":91 + * cdef setCppSelf(self, CppICbcModel* cppmodel) + * cdef setClpModel(self, clpmodel) + * cpdef addCutGenerator(self, CyCglCutGenerator generator, # <<<<<<<<<<<<<< +@@ -1707,7 +1713,7 @@ struct __pyx_obj_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase { + }; + + +-/* "cylp/cy/CyCbcModel.pxd":82 ++/* "cylp/cy/CyCbcModel.pxd":84 + * CppOsiSolverInterface* solver() + * + * cdef class CyCbcModel: # <<<<<<<<<<<<<< +@@ -2749,9 +2755,13 @@ static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; + static const char __pyx_k_stopped_on_time[] = "stopped on time"; + static const char __pyx_k_stopped_on_nodes[] = "stopped on nodes"; + static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; ++static const char __pyx_k_relaxation_abondoned[] = "relaxation abondoned"; ++static const char __pyx_k_isRelaxationAbondoned[] = "isRelaxationAbondoned"; + static const char __pyx_k_relaxation_infeasible[] = "relaxation infeasible"; + static const char __pyx_k_stopped_on_user_event[] = "stopped on user event"; ++static const char __pyx_k_isRelaxationInfeasible[] = "isRelaxationInfeasible"; + static const char __pyx_k_pythonCutGeneratorObject[] = "pythonCutGeneratorObject"; ++static const char __pyx_k_problem_proven_infeasible[] = "problem proven infeasible"; + static const char __pyx_k_cylp_py_modeling_CyLPModel[] = "cylp.py.modeling.CyLPModel"; + static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; + static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; +@@ -2787,6 +2797,8 @@ static PyObject *__pyx_n_s_import; + static PyObject *__pyx_n_s_indices; + static PyObject *__pyx_n_s_inds; + static PyObject *__pyx_n_s_infeasible; ++static PyObject *__pyx_n_s_isRelaxationAbondoned; ++static PyObject *__pyx_n_s_isRelaxationInfeasible; + static PyObject *__pyx_n_s_itertools; + static PyObject *__pyx_n_s_izip; + static PyObject *__pyx_n_s_keys; +@@ -2799,6 +2811,7 @@ static PyObject *__pyx_n_s_normal; + static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; + static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; + static PyObject *__pyx_n_s_problemStatus; ++static PyObject *__pyx_kp_s_problem_proven_infeasible; + static PyObject *__pyx_n_s_product; + static PyObject *__pyx_n_s_pythonCutGeneratorObject; + static PyObject *__pyx_n_s_pyx_vtable; +@@ -2806,6 +2819,7 @@ static PyObject *__pyx_n_s_range; + static PyObject *__pyx_n_s_reduce; + static PyObject *__pyx_n_s_reduce_cython; + static PyObject *__pyx_n_s_reduce_ex; ++static PyObject *__pyx_kp_s_relaxation_abondoned; + static PyObject *__pyx_kp_s_relaxation_infeasible; + static PyObject *__pyx_kp_s_setNodeCompare_argument_should_b; + static PyObject *__pyx_n_s_setstate; +@@ -4773,7 +4787,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_10solve(struct __p + * property status: + * def __get__(self): # <<<<<<<<<<<<<< + * # secondaryStatus() should be used instead of status() (??) +- * #if self.isRelaxationInfeasible(): ++ * if self.isRelaxationInfeasible(): + */ + + /* Python wrapper */ +@@ -4793,29 +4807,196 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status___get__(st + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; +- int __pyx_t_2; ++ PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; ++ int __pyx_t_4; ++ int __pyx_t_5; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":160 +- * # return 'relaxation abondoned' +- * #return problemStatus[self.CppSelf.status()] ++ /* "cylp/cy/CyCbcModel.pyx":155 ++ * def __get__(self): ++ * # secondaryStatus() should be used instead of status() (??) ++ * if self.isRelaxationInfeasible(): # <<<<<<<<<<<<<< ++ * return problemStatus[1] ++ * if self.isRelaxationAbondoned(): ++ */ ++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isRelaxationInfeasible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) ++ __Pyx_GOTREF(__pyx_t_2); ++ __pyx_t_3 = NULL; ++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { ++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); ++ if (likely(__pyx_t_3)) { ++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); ++ __Pyx_INCREF(__pyx_t_3); ++ __Pyx_INCREF(function); ++ __Pyx_DECREF_SET(__pyx_t_2, function); ++ } ++ } ++ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); ++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; ++ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error) ++ __Pyx_GOTREF(__pyx_t_1); ++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; ++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 155, __pyx_L1_error) ++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; ++ if (__pyx_t_4) { ++ ++ /* "cylp/cy/CyCbcModel.pyx":156 ++ * # secondaryStatus() should be used instead of status() (??) ++ * if self.isRelaxationInfeasible(): ++ * return problemStatus[1] # <<<<<<<<<<<<<< ++ * if self.isRelaxationAbondoned(): ++ * return 'relaxation abondoned' ++ */ ++ __Pyx_XDECREF(__pyx_r); ++ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_problemStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error) ++ __Pyx_GOTREF(__pyx_t_1); ++ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error) ++ __Pyx_GOTREF(__pyx_t_2); ++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; ++ __pyx_r = __pyx_t_2; ++ __pyx_t_2 = 0; ++ goto __pyx_L0; ++ ++ /* "cylp/cy/CyCbcModel.pyx":155 ++ * def __get__(self): ++ * # secondaryStatus() should be used instead of status() (??) ++ * if self.isRelaxationInfeasible(): # <<<<<<<<<<<<<< ++ * return problemStatus[1] ++ * if self.isRelaxationAbondoned(): ++ */ ++ } ++ ++ /* "cylp/cy/CyCbcModel.pyx":157 ++ * if self.isRelaxationInfeasible(): ++ * return problemStatus[1] ++ * if self.isRelaxationAbondoned(): # <<<<<<<<<<<<<< ++ * return 'relaxation abondoned' ++ * if self.CppSelf.isProvenInfeasible(): ++ */ ++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isRelaxationAbondoned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) ++ __Pyx_GOTREF(__pyx_t_1); ++ __pyx_t_3 = NULL; ++ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { ++ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); ++ if (likely(__pyx_t_3)) { ++ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); ++ __Pyx_INCREF(__pyx_t_3); ++ __Pyx_INCREF(function); ++ __Pyx_DECREF_SET(__pyx_t_1, function); ++ } ++ } ++ __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1); ++ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; ++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error) ++ __Pyx_GOTREF(__pyx_t_2); ++ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; ++ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 157, __pyx_L1_error) ++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; ++ if (__pyx_t_4) { ++ ++ /* "cylp/cy/CyCbcModel.pyx":158 ++ * return problemStatus[1] ++ * if self.isRelaxationAbondoned(): ++ * return 'relaxation abondoned' # <<<<<<<<<<<<<< ++ * if self.CppSelf.isProvenInfeasible(): ++ * return 'problem proven infeasible' ++ */ ++ __Pyx_XDECREF(__pyx_r); ++ __Pyx_INCREF(__pyx_kp_s_relaxation_abondoned); ++ __pyx_r = __pyx_kp_s_relaxation_abondoned; ++ goto __pyx_L0; ++ ++ /* "cylp/cy/CyCbcModel.pyx":157 ++ * if self.isRelaxationInfeasible(): ++ * return problemStatus[1] ++ * if self.isRelaxationAbondoned(): # <<<<<<<<<<<<<< ++ * return 'relaxation abondoned' ++ * if self.CppSelf.isProvenInfeasible(): ++ */ ++ } ++ ++ /* "cylp/cy/CyCbcModel.pyx":159 ++ * if self.isRelaxationAbondoned(): ++ * return 'relaxation abondoned' ++ * if self.CppSelf.isProvenInfeasible(): # <<<<<<<<<<<<<< ++ * return 'problem proven infeasible' ++ * if self.CppSelf.isProvenOptimal(): ++ */ ++ __pyx_t_4 = (__pyx_v_self->CppSelf->isProvenInfeasible() != 0); ++ if (__pyx_t_4) { ++ ++ /* "cylp/cy/CyCbcModel.pyx":160 ++ * return 'relaxation abondoned' ++ * if self.CppSelf.isProvenInfeasible(): ++ * return 'problem proven infeasible' # <<<<<<<<<<<<<< ++ * if self.CppSelf.isProvenOptimal(): ++ * return 'solution' ++ */ ++ __Pyx_XDECREF(__pyx_r); ++ __Pyx_INCREF(__pyx_kp_s_problem_proven_infeasible); ++ __pyx_r = __pyx_kp_s_problem_proven_infeasible; ++ goto __pyx_L0; ++ ++ /* "cylp/cy/CyCbcModel.pyx":159 ++ * if self.isRelaxationAbondoned(): ++ * return 'relaxation abondoned' ++ * if self.CppSelf.isProvenInfeasible(): # <<<<<<<<<<<<<< ++ * return 'problem proven infeasible' ++ * if self.CppSelf.isProvenOptimal(): ++ */ ++ } ++ ++ /* "cylp/cy/CyCbcModel.pyx":161 ++ * if self.CppSelf.isProvenInfeasible(): ++ * return 'problem proven infeasible' ++ * if self.CppSelf.isProvenOptimal(): # <<<<<<<<<<<<<< ++ * return 'solution' ++ * return problemStatus[self.CppSelf.secondaryStatus()] ++ */ ++ __pyx_t_4 = (__pyx_v_self->CppSelf->isProvenOptimal() != 0); ++ if (__pyx_t_4) { ++ ++ /* "cylp/cy/CyCbcModel.pyx":162 ++ * return 'problem proven infeasible' ++ * if self.CppSelf.isProvenOptimal(): ++ * return 'solution' # <<<<<<<<<<<<<< ++ * return problemStatus[self.CppSelf.secondaryStatus()] ++ * ++ */ ++ __Pyx_XDECREF(__pyx_r); ++ __Pyx_INCREF(__pyx_n_s_solution); ++ __pyx_r = __pyx_n_s_solution; ++ goto __pyx_L0; ++ ++ /* "cylp/cy/CyCbcModel.pyx":161 ++ * if self.CppSelf.isProvenInfeasible(): ++ * return 'problem proven infeasible' ++ * if self.CppSelf.isProvenOptimal(): # <<<<<<<<<<<<<< ++ * return 'solution' ++ * return problemStatus[self.CppSelf.secondaryStatus()] ++ */ ++ } ++ ++ /* "cylp/cy/CyCbcModel.pyx":163 ++ * if self.CppSelf.isProvenOptimal(): ++ * return 'solution' + * return problemStatus[self.CppSelf.secondaryStatus()] # <<<<<<<<<<<<<< + * + * property logLevel: + */ + __Pyx_XDECREF(__pyx_r); +- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_problemStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error) ++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_problemStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error) ++ __Pyx_GOTREF(__pyx_t_2); ++ __pyx_t_5 = __pyx_v_self->CppSelf->secondaryStatus(); ++ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_t_5, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); +- __pyx_t_2 = __pyx_v_self->CppSelf->secondaryStatus(); +- __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_t_2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error) +- __Pyx_GOTREF(__pyx_t_3); +- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; +- __pyx_r = __pyx_t_3; +- __pyx_t_3 = 0; ++ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; ++ __pyx_r = __pyx_t_1; ++ __pyx_t_1 = 0; + goto __pyx_L0; + + /* "cylp/cy/CyCbcModel.pyx":153 +@@ -4823,12 +5004,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status___get__(st + * property status: + * def __get__(self): # <<<<<<<<<<<<<< + * # secondaryStatus() should be used instead of status() (??) +- * #if self.isRelaxationInfeasible(): ++ * if self.isRelaxationInfeasible(): + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); ++ __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.status.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; +@@ -4838,7 +5020,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status___get__(st + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":163 ++/* "cylp/cy/CyCbcModel.pyx":166 + * + * property logLevel: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -4868,7 +5050,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel___get__( + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":164 ++ /* "cylp/cy/CyCbcModel.pyx":167 + * property logLevel: + * def __get__(self): + * return self.CppSelf.logLevel() # <<<<<<<<<<<<<< +@@ -4876,13 +5058,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel___get__( + * def __set__(self, value): + */ + __Pyx_XDECREF(__pyx_r); +- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->logLevel()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->logLevel()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "cylp/cy/CyCbcModel.pyx":163 ++ /* "cylp/cy/CyCbcModel.pyx":166 + * + * property logLevel: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -4901,7 +5083,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel___get__( + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":166 ++/* "cylp/cy/CyCbcModel.pyx":169 + * return self.CppSelf.logLevel() + * + * def __set__(self, value): # <<<<<<<<<<<<<< +@@ -4931,17 +5113,17 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel_2__set__(struc + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":167 ++ /* "cylp/cy/CyCbcModel.pyx":170 + * + * def __set__(self, value): + * self.CppSelf.setLogLevel(value) # <<<<<<<<<<<<<< + * + * def isRelaxationInfeasible(self): + */ +- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 167, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_v_self->CppSelf->setLogLevel(__pyx_t_1); + +- /* "cylp/cy/CyCbcModel.pyx":166 ++ /* "cylp/cy/CyCbcModel.pyx":169 + * return self.CppSelf.logLevel() + * + * def __set__(self, value): # <<<<<<<<<<<<<< +@@ -4960,7 +5142,7 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel_2__set__(struc + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":169 ++/* "cylp/cy/CyCbcModel.pyx":172 + * self.CppSelf.setLogLevel(value) + * + * def isRelaxationInfeasible(self): # <<<<<<<<<<<<<< +@@ -4991,7 +5173,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12isRelaxationInfe + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("isRelaxationInfeasible", 0); + +- /* "cylp/cy/CyCbcModel.pyx":170 ++ /* "cylp/cy/CyCbcModel.pyx":173 + * + * def isRelaxationInfeasible(self): + * return self.CppSelf.isInitialSolveProvenPrimalInfeasible() # <<<<<<<<<<<<<< +@@ -4999,13 +5181,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12isRelaxationInfe + * def isRelaxationDualInfeasible(self): + */ + __Pyx_XDECREF(__pyx_r); +- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->CppSelf->isInitialSolveProvenPrimalInfeasible()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->CppSelf->isInitialSolveProvenPrimalInfeasible()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "cylp/cy/CyCbcModel.pyx":169 ++ /* "cylp/cy/CyCbcModel.pyx":172 + * self.CppSelf.setLogLevel(value) + * + * def isRelaxationInfeasible(self): # <<<<<<<<<<<<<< +@@ -5024,7 +5206,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12isRelaxationInfe + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":172 ++/* "cylp/cy/CyCbcModel.pyx":175 + * return self.CppSelf.isInitialSolveProvenPrimalInfeasible() + * + * def isRelaxationDualInfeasible(self): # <<<<<<<<<<<<<< +@@ -5055,7 +5237,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14isRelaxationDual + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("isRelaxationDualInfeasible", 0); + +- /* "cylp/cy/CyCbcModel.pyx":173 ++ /* "cylp/cy/CyCbcModel.pyx":176 + * + * def isRelaxationDualInfeasible(self): + * return self.CppSelf.isInitialSolveProvenDualInfeasible() # <<<<<<<<<<<<<< +@@ -5063,13 +5245,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14isRelaxationDual + * def isRelaxationOptimal(self): + */ + __Pyx_XDECREF(__pyx_r); +- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->CppSelf->isInitialSolveProvenDualInfeasible()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->CppSelf->isInitialSolveProvenDualInfeasible()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "cylp/cy/CyCbcModel.pyx":172 ++ /* "cylp/cy/CyCbcModel.pyx":175 + * return self.CppSelf.isInitialSolveProvenPrimalInfeasible() + * + * def isRelaxationDualInfeasible(self): # <<<<<<<<<<<<<< +@@ -5088,7 +5270,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14isRelaxationDual + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":175 ++/* "cylp/cy/CyCbcModel.pyx":178 + * return self.CppSelf.isInitialSolveProvenDualInfeasible() + * + * def isRelaxationOptimal(self): # <<<<<<<<<<<<<< +@@ -5119,7 +5301,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16isRelaxationOpti + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("isRelaxationOptimal", 0); + +- /* "cylp/cy/CyCbcModel.pyx":176 ++ /* "cylp/cy/CyCbcModel.pyx":179 + * + * def isRelaxationOptimal(self): + * return self.CppSelf.isInitialSolveProvenOptimal() # <<<<<<<<<<<<<< +@@ -5127,13 +5309,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16isRelaxationOpti + * def isRelaxationAbondoned(self): + */ + __Pyx_XDECREF(__pyx_r); +- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->CppSelf->isInitialSolveProvenOptimal()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->CppSelf->isInitialSolveProvenOptimal()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "cylp/cy/CyCbcModel.pyx":175 ++ /* "cylp/cy/CyCbcModel.pyx":178 + * return self.CppSelf.isInitialSolveProvenDualInfeasible() + * + * def isRelaxationOptimal(self): # <<<<<<<<<<<<<< +@@ -5152,7 +5334,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16isRelaxationOpti + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":178 ++/* "cylp/cy/CyCbcModel.pyx":181 + * return self.CppSelf.isInitialSolveProvenOptimal() + * + * def isRelaxationAbondoned(self): # <<<<<<<<<<<<<< +@@ -5183,7 +5365,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbon + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("isRelaxationAbondoned", 0); + +- /* "cylp/cy/CyCbcModel.pyx":179 ++ /* "cylp/cy/CyCbcModel.pyx":182 + * + * def isRelaxationAbondoned(self): + * return self.CppSelf.isInitialSolveAbandoned() # <<<<<<<<<<<<<< +@@ -5191,13 +5373,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbon + * property osiSolverInteface: + */ + __Pyx_XDECREF(__pyx_r); +- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->CppSelf->isInitialSolveAbandoned()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->CppSelf->isInitialSolveAbandoned()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "cylp/cy/CyCbcModel.pyx":178 ++ /* "cylp/cy/CyCbcModel.pyx":181 + * return self.CppSelf.isInitialSolveProvenOptimal() + * + * def isRelaxationAbondoned(self): # <<<<<<<<<<<<<< +@@ -5216,7 +5398,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbon + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":182 ++/* "cylp/cy/CyCbcModel.pyx":185 + * + * property osiSolverInteface: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -5247,30 +5429,30 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_17osiSolverIntefac + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":183 ++ /* "cylp/cy/CyCbcModel.pyx":186 + * property osiSolverInteface: + * def __get__(self): + * cdef CyOsiSolverInterface osi = CyOsiSolverInterface() # <<<<<<<<<<<<<< + * osi.setCppSelf(self.CppSelf.solver()) + * return osi + */ +- __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_osi = ((struct __pyx_obj_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface *)__pyx_t_1); + __pyx_t_1 = 0; + +- /* "cylp/cy/CyCbcModel.pyx":184 ++ /* "cylp/cy/CyCbcModel.pyx":187 + * def __get__(self): + * cdef CyOsiSolverInterface osi = CyOsiSolverInterface() + * osi.setCppSelf(self.CppSelf.solver()) # <<<<<<<<<<<<<< + * return osi + * + */ +- __pyx_t_1 = ((struct __pyx_vtabstruct_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface *)__pyx_v_osi->__pyx_vtab)->setCppSelf(__pyx_v_osi, __pyx_v_self->CppSelf->solver()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) ++ __pyx_t_1 = ((struct __pyx_vtabstruct_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface *)__pyx_v_osi->__pyx_vtab)->setCppSelf(__pyx_v_osi, __pyx_v_self->CppSelf->solver()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + +- /* "cylp/cy/CyCbcModel.pyx":185 ++ /* "cylp/cy/CyCbcModel.pyx":188 + * cdef CyOsiSolverInterface osi = CyOsiSolverInterface() + * osi.setCppSelf(self.CppSelf.solver()) + * return osi # <<<<<<<<<<<<<< +@@ -5282,7 +5464,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_17osiSolverIntefac + __pyx_r = ((PyObject *)__pyx_v_osi); + goto __pyx_L0; + +- /* "cylp/cy/CyCbcModel.pyx":182 ++ /* "cylp/cy/CyCbcModel.pyx":185 + * + * property osiSolverInteface: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -5302,7 +5484,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_17osiSolverIntefac + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":188 ++/* "cylp/cy/CyCbcModel.pyx":191 + * + * property primalVariableSolution: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -5352,7 +5534,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":189 ++ /* "cylp/cy/CyCbcModel.pyx":192 + * property primalVariableSolution: + * def __get__(self): + * ret = self.CppSelf.getPrimalVariableSolution() # <<<<<<<<<<<<<< +@@ -5365,17 +5547,17 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + __pyx_v_ret = __pyx_t_2; + __pyx_t_2 = 0; + +- /* "cylp/cy/CyCbcModel.pyx":190 ++ /* "cylp/cy/CyCbcModel.pyx":193 + * def __get__(self): + * ret = self.CppSelf.getPrimalVariableSolution() + * if self.cyLPModel: # <<<<<<<<<<<<<< + * m = self.cyLPModel + * inds = m.inds + */ +- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->cyLPModel); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 190, __pyx_L1_error) ++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->cyLPModel); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 193, __pyx_L1_error) + if (__pyx_t_3) { + +- /* "cylp/cy/CyCbcModel.pyx":191 ++ /* "cylp/cy/CyCbcModel.pyx":194 + * ret = self.CppSelf.getPrimalVariableSolution() + * if self.cyLPModel: + * m = self.cyLPModel # <<<<<<<<<<<<<< +@@ -5387,40 +5569,40 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + __pyx_v_m = __pyx_t_2; + __pyx_t_2 = 0; + +- /* "cylp/cy/CyCbcModel.pyx":192 ++ /* "cylp/cy/CyCbcModel.pyx":195 + * if self.cyLPModel: + * m = self.cyLPModel + * inds = m.inds # <<<<<<<<<<<<<< + * d = {} + * for v in inds.varIndex.keys(): + */ +- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_inds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_inds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_inds = __pyx_t_2; + __pyx_t_2 = 0; + +- /* "cylp/cy/CyCbcModel.pyx":193 ++ /* "cylp/cy/CyCbcModel.pyx":196 + * m = self.cyLPModel + * inds = m.inds + * d = {} # <<<<<<<<<<<<<< + * for v in inds.varIndex.keys(): + * d[v] = ret[inds.varIndex[v]] + */ +- __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_v_d = __pyx_t_2; + __pyx_t_2 = 0; + +- /* "cylp/cy/CyCbcModel.pyx":194 ++ /* "cylp/cy/CyCbcModel.pyx":197 + * inds = m.inds + * d = {} + * for v in inds.varIndex.keys(): # <<<<<<<<<<<<<< + * d[v] = ret[inds.varIndex[v]] + * var = m.getVarByName(v) + */ +- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_inds, __pyx_n_s_varIndex); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 194, __pyx_L1_error) ++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_inds, __pyx_n_s_varIndex); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); +- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_keys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 194, __pyx_L1_error) ++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_keys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = NULL; +@@ -5435,16 +5617,16 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + } + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; +- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error) ++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { + __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { +- __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 194, __pyx_L1_error) ++ __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); +- __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 194, __pyx_L1_error) ++ __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 197, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + for (;;) { +@@ -5452,17 +5634,17 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + if (likely(PyList_CheckExact(__pyx_t_5))) { + if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS +- __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 194, __pyx_L1_error) ++ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 197, __pyx_L1_error) + #else +- __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error) ++ __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } else { + if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS +- __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 194, __pyx_L1_error) ++ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 197, __pyx_L1_error) + #else +- __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error) ++ __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + #endif + } +@@ -5472,7 +5654,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); +- else __PYX_ERR(0, 194, __pyx_L1_error) ++ else __PYX_ERR(0, 197, __pyx_L1_error) + } + break; + } +@@ -5481,32 +5663,32 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_2); + __pyx_t_2 = 0; + +- /* "cylp/cy/CyCbcModel.pyx":195 ++ /* "cylp/cy/CyCbcModel.pyx":198 + * d = {} + * for v in inds.varIndex.keys(): + * d[v] = ret[inds.varIndex[v]] # <<<<<<<<<<<<<< + * var = m.getVarByName(v) + * if var.dims: + */ +- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_inds, __pyx_n_s_varIndex); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_inds, __pyx_n_s_varIndex); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); +- __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error) ++ __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; +- __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_ret, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_ret, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; +- if (unlikely(PyObject_SetItem(__pyx_v_d, __pyx_v_v, __pyx_t_2) < 0)) __PYX_ERR(0, 195, __pyx_L1_error) ++ if (unlikely(PyObject_SetItem(__pyx_v_d, __pyx_v_v, __pyx_t_2) < 0)) __PYX_ERR(0, 198, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + +- /* "cylp/cy/CyCbcModel.pyx":196 ++ /* "cylp/cy/CyCbcModel.pyx":199 + * for v in inds.varIndex.keys(): + * d[v] = ret[inds.varIndex[v]] + * var = m.getVarByName(v) # <<<<<<<<<<<<<< + * if var.dims: + * d[v] = CyLPSolution() + */ +- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_getVarByName); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L1_error) ++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_getVarByName); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { +@@ -5520,33 +5702,33 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + } + __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_v_v) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_v); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; +- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error) ++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_2); + __pyx_t_2 = 0; + +- /* "cylp/cy/CyCbcModel.pyx":197 ++ /* "cylp/cy/CyCbcModel.pyx":200 + * d[v] = ret[inds.varIndex[v]] + * var = m.getVarByName(v) + * if var.dims: # <<<<<<<<<<<<<< + * d[v] = CyLPSolution() + * dimRanges = [range(i) for i in var.dims] + */ +- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dims); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dims); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); +- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 197, __pyx_L1_error) ++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 200, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + +- /* "cylp/cy/CyCbcModel.pyx":198 ++ /* "cylp/cy/CyCbcModel.pyx":201 + * var = m.getVarByName(v) + * if var.dims: + * d[v] = CyLPSolution() # <<<<<<<<<<<<<< + * dimRanges = [range(i) for i in var.dims] + * for element in product(*dimRanges): + */ +- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CyLPSolution); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 198, __pyx_L1_error) ++ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CyLPSolution); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { +@@ -5560,30 +5742,30 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + } + __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; +- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error) ++ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; +- if (unlikely(PyObject_SetItem(__pyx_v_d, __pyx_v_v, __pyx_t_2) < 0)) __PYX_ERR(0, 198, __pyx_L1_error) ++ if (unlikely(PyObject_SetItem(__pyx_v_d, __pyx_v_v, __pyx_t_2) < 0)) __PYX_ERR(0, 201, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + +- /* "cylp/cy/CyCbcModel.pyx":199 ++ /* "cylp/cy/CyCbcModel.pyx":202 + * if var.dims: + * d[v] = CyLPSolution() + * dimRanges = [range(i) for i in var.dims] # <<<<<<<<<<<<<< + * for element in product(*dimRanges): + * d[v][element] = ret[var.__getitem__(element).indices[0]] + */ +- __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error) ++ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); +- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dims); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error) ++ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dims); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { + __pyx_t_8 = __pyx_t_4; __Pyx_INCREF(__pyx_t_8); __pyx_t_9 = 0; + __pyx_t_10 = NULL; + } else { +- __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 199, __pyx_L1_error) ++ __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); +- __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 199, __pyx_L1_error) ++ __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 202, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + for (;;) { +@@ -5591,17 +5773,17 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + if (likely(PyList_CheckExact(__pyx_t_8))) { + if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_8)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS +- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 199, __pyx_L1_error) ++ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 202, __pyx_L1_error) + #else +- __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error) ++ __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_8)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS +- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 199, __pyx_L1_error) ++ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 202, __pyx_L1_error) + #else +- __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error) ++ __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } +@@ -5611,7 +5793,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); +- else __PYX_ERR(0, 199, __pyx_L1_error) ++ else __PYX_ERR(0, 202, __pyx_L1_error) + } + break; + } +@@ -5619,27 +5801,27 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + } + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); + __pyx_t_4 = 0; +- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error) ++ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); +- if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 199, __pyx_L1_error) ++ if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 202, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_XDECREF_SET(__pyx_v_dimRanges, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + +- /* "cylp/cy/CyCbcModel.pyx":200 ++ /* "cylp/cy/CyCbcModel.pyx":203 + * d[v] = CyLPSolution() + * dimRanges = [range(i) for i in var.dims] + * for element in product(*dimRanges): # <<<<<<<<<<<<<< + * d[v][element] = ret[var.__getitem__(element).indices[0]] + * ret = d + */ +- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_product); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error) ++ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_product); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); +- __pyx_t_8 = PySequence_Tuple(__pyx_v_dimRanges); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 200, __pyx_L1_error) ++ __pyx_t_8 = PySequence_Tuple(__pyx_v_dimRanges); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); +- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 200, __pyx_L1_error) ++ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; +@@ -5647,9 +5829,9 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + __pyx_t_8 = __pyx_t_4; __Pyx_INCREF(__pyx_t_8); __pyx_t_9 = 0; + __pyx_t_10 = NULL; + } else { +- __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 200, __pyx_L1_error) ++ __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); +- __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 200, __pyx_L1_error) ++ __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 203, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + for (;;) { +@@ -5657,17 +5839,17 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + if (likely(PyList_CheckExact(__pyx_t_8))) { + if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_8)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS +- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 200, __pyx_L1_error) ++ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 203, __pyx_L1_error) + #else +- __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 200, __pyx_L1_error) ++ __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } else { + if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_8)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS +- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 200, __pyx_L1_error) ++ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 203, __pyx_L1_error) + #else +- __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 200, __pyx_L1_error) ++ __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + } +@@ -5677,7 +5859,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); +- else __PYX_ERR(0, 200, __pyx_L1_error) ++ else __PYX_ERR(0, 203, __pyx_L1_error) + } + break; + } +@@ -5686,14 +5868,14 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + __Pyx_XDECREF_SET(__pyx_v_element, __pyx_t_4); + __pyx_t_4 = 0; + +- /* "cylp/cy/CyCbcModel.pyx":201 ++ /* "cylp/cy/CyCbcModel.pyx":204 + * dimRanges = [range(i) for i in var.dims] + * for element in product(*dimRanges): + * d[v][element] = ret[var.__getitem__(element).indices[0]] # <<<<<<<<<<<<<< + * ret = d + * else: + */ +- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_getitem); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_getitem); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_11 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { +@@ -5707,25 +5889,25 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + } + __pyx_t_4 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_v_element) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_element); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; +- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error) ++ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; +- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; +- __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error) ++ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; +- __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_ret, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_ret, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; +- __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_d, __pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error) ++ __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_d, __pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); +- if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_element, __pyx_t_2) < 0)) __PYX_ERR(0, 201, __pyx_L1_error) ++ if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_element, __pyx_t_2) < 0)) __PYX_ERR(0, 204, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + +- /* "cylp/cy/CyCbcModel.pyx":200 ++ /* "cylp/cy/CyCbcModel.pyx":203 + * d[v] = CyLPSolution() + * dimRanges = [range(i) for i in var.dims] + * for element in product(*dimRanges): # <<<<<<<<<<<<<< +@@ -5735,7 +5917,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + +- /* "cylp/cy/CyCbcModel.pyx":197 ++ /* "cylp/cy/CyCbcModel.pyx":200 + * d[v] = ret[inds.varIndex[v]] + * var = m.getVarByName(v) + * if var.dims: # <<<<<<<<<<<<<< +@@ -5744,7 +5926,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + */ + } + +- /* "cylp/cy/CyCbcModel.pyx":194 ++ /* "cylp/cy/CyCbcModel.pyx":197 + * inds = m.inds + * d = {} + * for v in inds.varIndex.keys(): # <<<<<<<<<<<<<< +@@ -5754,7 +5936,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + +- /* "cylp/cy/CyCbcModel.pyx":202 ++ /* "cylp/cy/CyCbcModel.pyx":205 + * for element in product(*dimRanges): + * d[v][element] = ret[var.__getitem__(element).indices[0]] + * ret = d # <<<<<<<<<<<<<< +@@ -5764,7 +5946,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + __Pyx_INCREF(__pyx_v_d); + __Pyx_DECREF_SET(__pyx_v_ret, __pyx_v_d); + +- /* "cylp/cy/CyCbcModel.pyx":190 ++ /* "cylp/cy/CyCbcModel.pyx":193 + * def __get__(self): + * ret = self.CppSelf.getPrimalVariableSolution() + * if self.cyLPModel: # <<<<<<<<<<<<<< +@@ -5774,7 +5956,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + goto __pyx_L3; + } + +- /* "cylp/cy/CyCbcModel.pyx":204 ++ /* "cylp/cy/CyCbcModel.pyx":207 + * ret = d + * else: + * names = self.clpModel.variableNames # <<<<<<<<<<<<<< +@@ -5782,29 +5964,29 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + * d = CyLPSolution() + */ + /*else*/ { +- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->clpModel, __pyx_n_s_variableNames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 204, __pyx_L1_error) ++ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->clpModel, __pyx_n_s_variableNames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 207, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_v_names = __pyx_t_5; + __pyx_t_5 = 0; + +- /* "cylp/cy/CyCbcModel.pyx":205 ++ /* "cylp/cy/CyCbcModel.pyx":208 + * else: + * names = self.clpModel.variableNames + * if names: # <<<<<<<<<<<<<< + * d = CyLPSolution() + * for i in range(len(names)): + */ +- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_names); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 205, __pyx_L1_error) ++ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_names); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 208, __pyx_L1_error) + if (__pyx_t_3) { + +- /* "cylp/cy/CyCbcModel.pyx":206 ++ /* "cylp/cy/CyCbcModel.pyx":209 + * names = self.clpModel.variableNames + * if names: + * d = CyLPSolution() # <<<<<<<<<<<<<< + * for i in range(len(names)): + * d[names[i]] = ret[i] + */ +- __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_CyLPSolution); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 206, __pyx_L1_error) ++ __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_CyLPSolution); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { +@@ -5818,32 +6000,32 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + } + __pyx_t_5 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; +- if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 206, __pyx_L1_error) ++ if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_v_d = __pyx_t_5; + __pyx_t_5 = 0; + +- /* "cylp/cy/CyCbcModel.pyx":207 ++ /* "cylp/cy/CyCbcModel.pyx":210 + * if names: + * d = CyLPSolution() + * for i in range(len(names)): # <<<<<<<<<<<<<< + * d[names[i]] = ret[i] + * ret = d + */ +- __pyx_t_6 = PyObject_Length(__pyx_v_names); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 207, __pyx_L1_error) +- __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 207, __pyx_L1_error) ++ __pyx_t_6 = PyObject_Length(__pyx_v_names); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 210, __pyx_L1_error) ++ __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 210, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); +- __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 207, __pyx_L1_error) ++ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) { + __pyx_t_5 = __pyx_t_8; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; + __pyx_t_7 = NULL; + } else { +- __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 207, __pyx_L1_error) ++ __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 210, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); +- __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 207, __pyx_L1_error) ++ __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 210, __pyx_L1_error) + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + for (;;) { +@@ -5851,17 +6033,17 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + if (likely(PyList_CheckExact(__pyx_t_5))) { + if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS +- __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 207, __pyx_L1_error) ++ __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 210, __pyx_L1_error) + #else +- __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 207, __pyx_L1_error) ++ __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #endif + } else { + if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS +- __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 207, __pyx_L1_error) ++ __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 210, __pyx_L1_error) + #else +- __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 207, __pyx_L1_error) ++ __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + #endif + } +@@ -5871,7 +6053,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); +- else __PYX_ERR(0, 207, __pyx_L1_error) ++ else __PYX_ERR(0, 210, __pyx_L1_error) + } + break; + } +@@ -5880,22 +6062,22 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_8); + __pyx_t_8 = 0; + +- /* "cylp/cy/CyCbcModel.pyx":208 ++ /* "cylp/cy/CyCbcModel.pyx":211 + * d = CyLPSolution() + * for i in range(len(names)): + * d[names[i]] = ret[i] # <<<<<<<<<<<<<< + * ret = d + * return ret + */ +- __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_ret, __pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 208, __pyx_L1_error) ++ __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_ret, __pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); +- __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_names, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error) ++ __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_names, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); +- if (unlikely(PyObject_SetItem(__pyx_v_d, __pyx_t_2, __pyx_t_8) < 0)) __PYX_ERR(0, 208, __pyx_L1_error) ++ if (unlikely(PyObject_SetItem(__pyx_v_d, __pyx_t_2, __pyx_t_8) < 0)) __PYX_ERR(0, 211, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + +- /* "cylp/cy/CyCbcModel.pyx":207 ++ /* "cylp/cy/CyCbcModel.pyx":210 + * if names: + * d = CyLPSolution() + * for i in range(len(names)): # <<<<<<<<<<<<<< +@@ -5905,7 +6087,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + } + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + +- /* "cylp/cy/CyCbcModel.pyx":209 ++ /* "cylp/cy/CyCbcModel.pyx":212 + * for i in range(len(names)): + * d[names[i]] = ret[i] + * ret = d # <<<<<<<<<<<<<< +@@ -5915,7 +6097,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + __Pyx_INCREF(__pyx_v_d); + __Pyx_DECREF_SET(__pyx_v_ret, __pyx_v_d); + +- /* "cylp/cy/CyCbcModel.pyx":205 ++ /* "cylp/cy/CyCbcModel.pyx":208 + * else: + * names = self.clpModel.variableNames + * if names: # <<<<<<<<<<<<<< +@@ -5926,7 +6108,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + } + __pyx_L3:; + +- /* "cylp/cy/CyCbcModel.pyx":210 ++ /* "cylp/cy/CyCbcModel.pyx":213 + * d[names[i]] = ret[i] + * ret = d + * return ret # <<<<<<<<<<<<<< +@@ -5938,7 +6120,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + __pyx_r = __pyx_v_ret; + goto __pyx_L0; + +- /* "cylp/cy/CyCbcModel.pyx":188 ++ /* "cylp/cy/CyCbcModel.pyx":191 + * + * property primalVariableSolution: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -5971,7 +6153,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":213 ++/* "cylp/cy/CyCbcModel.pyx":216 + * + * property solutionCount: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6001,7 +6183,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13solutionCount___ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":214 ++ /* "cylp/cy/CyCbcModel.pyx":217 + * property solutionCount: + * def __get__(self): + * return self.CppSelf.getSolutionCount() # <<<<<<<<<<<<<< +@@ -6009,13 +6191,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13solutionCount___ + * property numberHeuristicSolutions: + */ + __Pyx_XDECREF(__pyx_r); +- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getSolutionCount()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getSolutionCount()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "cylp/cy/CyCbcModel.pyx":213 ++ /* "cylp/cy/CyCbcModel.pyx":216 + * + * property solutionCount: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6034,7 +6216,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13solutionCount___ + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":217 ++/* "cylp/cy/CyCbcModel.pyx":220 + * + * property numberHeuristicSolutions: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6064,7 +6246,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_24numberHeuristicS + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":218 ++ /* "cylp/cy/CyCbcModel.pyx":221 + * property numberHeuristicSolutions: + * def __get__(self): + * return self.CppSelf.getNumberHeuristicSolutions() # <<<<<<<<<<<<<< +@@ -6072,13 +6254,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_24numberHeuristicS + * property nodeCount: + */ + __Pyx_XDECREF(__pyx_r); +- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getNumberHeuristicSolutions()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getNumberHeuristicSolutions()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "cylp/cy/CyCbcModel.pyx":217 ++ /* "cylp/cy/CyCbcModel.pyx":220 + * + * property numberHeuristicSolutions: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6097,7 +6279,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_24numberHeuristicS + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":221 ++/* "cylp/cy/CyCbcModel.pyx":224 + * + * property nodeCount: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6127,7 +6309,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_9nodeCount___get__ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":222 ++ /* "cylp/cy/CyCbcModel.pyx":225 + * property nodeCount: + * def __get__(self): + * return self.CppSelf.getNodeCount() # <<<<<<<<<<<<<< +@@ -6135,13 +6317,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_9nodeCount___get__ + * property objectiveValue: + */ + __Pyx_XDECREF(__pyx_r); +- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getNodeCount()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getNodeCount()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "cylp/cy/CyCbcModel.pyx":221 ++ /* "cylp/cy/CyCbcModel.pyx":224 + * + * property nodeCount: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6160,7 +6342,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_9nodeCount___get__ + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":225 ++/* "cylp/cy/CyCbcModel.pyx":228 + * + * property objectiveValue: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6190,7 +6372,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14objectiveValue__ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":226 ++ /* "cylp/cy/CyCbcModel.pyx":229 + * property objectiveValue: + * def __get__(self): + * return self.CppSelf.getObjValue() # <<<<<<<<<<<<<< +@@ -6198,13 +6380,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14objectiveValue__ + * property bestPossibleObjValue: + */ + __Pyx_XDECREF(__pyx_r); +- __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getObjValue()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getObjValue()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "cylp/cy/CyCbcModel.pyx":225 ++ /* "cylp/cy/CyCbcModel.pyx":228 + * + * property objectiveValue: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6223,7 +6405,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14objectiveValue__ + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":229 ++/* "cylp/cy/CyCbcModel.pyx":232 + * + * property bestPossibleObjValue: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6253,7 +6435,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20bestPossibleObjV + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":230 ++ /* "cylp/cy/CyCbcModel.pyx":233 + * property bestPossibleObjValue: + * def __get__(self): + * return self.CppSelf.getBestPossibleObjValue() # <<<<<<<<<<<<<< +@@ -6261,13 +6443,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20bestPossibleObjV + * property numberObjects: + */ + __Pyx_XDECREF(__pyx_r); +- __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getBestPossibleObjValue()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getBestPossibleObjValue()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "cylp/cy/CyCbcModel.pyx":229 ++ /* "cylp/cy/CyCbcModel.pyx":232 + * + * property bestPossibleObjValue: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6286,7 +6468,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20bestPossibleObjV + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":233 ++/* "cylp/cy/CyCbcModel.pyx":236 + * + * property numberObjects: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6316,7 +6498,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberObjects___ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":234 ++ /* "cylp/cy/CyCbcModel.pyx":237 + * property numberObjects: + * def __get__(self): + * return self.CppSelf.numberObjects() # <<<<<<<<<<<<<< +@@ -6324,13 +6506,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberObjects___ + * property integerTolerance: + */ + __Pyx_XDECREF(__pyx_r); +- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->numberObjects()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->numberObjects()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "cylp/cy/CyCbcModel.pyx":233 ++ /* "cylp/cy/CyCbcModel.pyx":236 + * + * property numberObjects: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6349,7 +6531,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberObjects___ + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":237 ++/* "cylp/cy/CyCbcModel.pyx":240 + * + * property integerTolerance: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6379,7 +6561,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":238 ++ /* "cylp/cy/CyCbcModel.pyx":241 + * property integerTolerance: + * def __get__(self): + * return self.CppSelf.getIntegerTolerance() # <<<<<<<<<<<<<< +@@ -6387,13 +6569,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance + * def __set__(self, value): + */ + __Pyx_XDECREF(__pyx_r); +- __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getIntegerTolerance()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getIntegerTolerance()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "cylp/cy/CyCbcModel.pyx":237 ++ /* "cylp/cy/CyCbcModel.pyx":240 + * + * property integerTolerance: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6412,7 +6594,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":240 ++/* "cylp/cy/CyCbcModel.pyx":243 + * return self.CppSelf.getIntegerTolerance() + * + * def __set__(self, value): # <<<<<<<<<<<<<< +@@ -6442,17 +6624,17 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance_2__se + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":241 ++ /* "cylp/cy/CyCbcModel.pyx":244 + * + * def __set__(self, value): + * self.CppSelf.setIntegerTolerance(value) # <<<<<<<<<<<<<< + * + * property maximumSeconds: + */ +- __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 241, __pyx_L1_error) ++ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L1_error) + (void)(__pyx_v_self->CppSelf->setIntegerTolerance(__pyx_t_1)); + +- /* "cylp/cy/CyCbcModel.pyx":240 ++ /* "cylp/cy/CyCbcModel.pyx":243 + * return self.CppSelf.getIntegerTolerance() + * + * def __set__(self, value): # <<<<<<<<<<<<<< +@@ -6471,7 +6653,7 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance_2__se + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":244 ++/* "cylp/cy/CyCbcModel.pyx":247 + * + * property maximumSeconds: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6501,7 +6683,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds__ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":245 ++ /* "cylp/cy/CyCbcModel.pyx":248 + * property maximumSeconds: + * def __get__(self): + * return self.CppSelf.getMaximumSeconds() # <<<<<<<<<<<<<< +@@ -6509,13 +6691,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds__ + * def __set__(self, value): + */ + __Pyx_XDECREF(__pyx_r); +- __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getMaximumSeconds()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getMaximumSeconds()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "cylp/cy/CyCbcModel.pyx":244 ++ /* "cylp/cy/CyCbcModel.pyx":247 + * + * property maximumSeconds: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6534,7 +6716,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds__ + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":247 ++/* "cylp/cy/CyCbcModel.pyx":250 + * return self.CppSelf.getMaximumSeconds() + * + * def __set__(self, value): # <<<<<<<<<<<<<< +@@ -6564,17 +6746,17 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds_2__set_ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":248 ++ /* "cylp/cy/CyCbcModel.pyx":251 + * + * def __set__(self, value): + * self.CppSelf.setMaximumSeconds(value) # <<<<<<<<<<<<<< + * + * property maximumNodes: + */ +- __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 248, __pyx_L1_error) ++ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 251, __pyx_L1_error) + (void)(__pyx_v_self->CppSelf->setMaximumSeconds(__pyx_t_1)); + +- /* "cylp/cy/CyCbcModel.pyx":247 ++ /* "cylp/cy/CyCbcModel.pyx":250 + * return self.CppSelf.getMaximumSeconds() + * + * def __set__(self, value): # <<<<<<<<<<<<<< +@@ -6593,7 +6775,7 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds_2__set_ + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":251 ++/* "cylp/cy/CyCbcModel.pyx":254 + * + * property maximumNodes: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6623,7 +6805,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes___g + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":252 ++ /* "cylp/cy/CyCbcModel.pyx":255 + * property maximumNodes: + * def __get__(self): + * return self.CppSelf.getMaximumNodes() # <<<<<<<<<<<<<< +@@ -6631,13 +6813,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes___g + * def __set__(self, value): + */ + __Pyx_XDECREF(__pyx_r); +- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getMaximumNodes()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getMaximumNodes()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "cylp/cy/CyCbcModel.pyx":251 ++ /* "cylp/cy/CyCbcModel.pyx":254 + * + * property maximumNodes: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6656,7 +6838,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes___g + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":254 ++/* "cylp/cy/CyCbcModel.pyx":257 + * return self.CppSelf.getMaximumNodes() + * + * def __set__(self, value): # <<<<<<<<<<<<<< +@@ -6686,17 +6868,17 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes_2__set__( + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":255 ++ /* "cylp/cy/CyCbcModel.pyx":258 + * + * def __set__(self, value): + * self.CppSelf.setMaximumNodes(value) # <<<<<<<<<<<<<< + * + * property numberThreads: + */ +- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 255, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 258, __pyx_L1_error) + (void)(__pyx_v_self->CppSelf->setMaximumNodes(__pyx_t_1)); + +- /* "cylp/cy/CyCbcModel.pyx":254 ++ /* "cylp/cy/CyCbcModel.pyx":257 + * return self.CppSelf.getMaximumNodes() + * + * def __set__(self, value): # <<<<<<<<<<<<<< +@@ -6715,7 +6897,7 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes_2__set__( + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":258 ++/* "cylp/cy/CyCbcModel.pyx":261 + * + * property numberThreads: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6745,7 +6927,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads___ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":259 ++ /* "cylp/cy/CyCbcModel.pyx":262 + * property numberThreads: + * def __get__(self): + * return self.CppSelf.getNumberThreads() # <<<<<<<<<<<<<< +@@ -6753,13 +6935,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads___ + * def __set__(self, value): + */ + __Pyx_XDECREF(__pyx_r); +- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getNumberThreads()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getNumberThreads()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "cylp/cy/CyCbcModel.pyx":258 ++ /* "cylp/cy/CyCbcModel.pyx":261 + * + * property numberThreads: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6778,7 +6960,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads___ + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":261 ++/* "cylp/cy/CyCbcModel.pyx":264 + * return self.CppSelf.getNumberThreads() + * + * def __set__(self, value): # <<<<<<<<<<<<<< +@@ -6808,17 +6990,17 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads_2__set__ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":262 ++ /* "cylp/cy/CyCbcModel.pyx":265 + * + * def __set__(self, value): + * self.CppSelf.setNumberThreads(value) # <<<<<<<<<<<<<< + * + * property allowableGap: + */ +- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 262, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 265, __pyx_L1_error) + __pyx_v_self->CppSelf->setNumberThreads(__pyx_t_1); + +- /* "cylp/cy/CyCbcModel.pyx":261 ++ /* "cylp/cy/CyCbcModel.pyx":264 + * return self.CppSelf.getNumberThreads() + * + * def __set__(self, value): # <<<<<<<<<<<<<< +@@ -6837,7 +7019,7 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads_2__set__ + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":265 ++/* "cylp/cy/CyCbcModel.pyx":268 + * + * property allowableGap: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6867,7 +7049,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap___g + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":266 ++ /* "cylp/cy/CyCbcModel.pyx":269 + * property allowableGap: + * def __get__(self): + * return self.CppSelf.getAllowableGap() # <<<<<<<<<<<<<< +@@ -6875,13 +7057,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap___g + * def __set__(self, value): + */ + __Pyx_XDECREF(__pyx_r); +- __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getAllowableGap()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getAllowableGap()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "cylp/cy/CyCbcModel.pyx":265 ++ /* "cylp/cy/CyCbcModel.pyx":268 + * + * property allowableGap: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6900,7 +7082,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap___g + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":268 ++/* "cylp/cy/CyCbcModel.pyx":271 + * return self.CppSelf.getAllowableGap() + * + * def __set__(self, value): # <<<<<<<<<<<<<< +@@ -6930,17 +7112,17 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap_2__set__( + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":269 ++ /* "cylp/cy/CyCbcModel.pyx":272 + * + * def __set__(self, value): + * self.CppSelf.setAllowableGap(value) # <<<<<<<<<<<<<< + * + * property allowableFractionGap: + */ +- __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 269, __pyx_L1_error) ++ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 272, __pyx_L1_error) + __pyx_v_self->CppSelf->setAllowableGap(__pyx_t_1); + +- /* "cylp/cy/CyCbcModel.pyx":268 ++ /* "cylp/cy/CyCbcModel.pyx":271 + * return self.CppSelf.getAllowableGap() + * + * def __set__(self, value): # <<<<<<<<<<<<<< +@@ -6959,7 +7141,7 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap_2__set__( + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":272 ++/* "cylp/cy/CyCbcModel.pyx":275 + * + * property allowableFractionGap: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -6989,7 +7171,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractio + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":273 ++ /* "cylp/cy/CyCbcModel.pyx":276 + * property allowableFractionGap: + * def __get__(self): + * return self.CppSelf.getAllowableFractionGap() # <<<<<<<<<<<<<< +@@ -6997,13 +7179,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractio + * def __set__(self, value): + */ + __Pyx_XDECREF(__pyx_r); +- __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getAllowableFractionGap()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getAllowableFractionGap()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "cylp/cy/CyCbcModel.pyx":272 ++ /* "cylp/cy/CyCbcModel.pyx":275 + * + * property allowableFractionGap: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -7022,7 +7204,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractio + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":275 ++/* "cylp/cy/CyCbcModel.pyx":278 + * return self.CppSelf.getAllowableFractionGap() + * + * def __set__(self, value): # <<<<<<<<<<<<<< +@@ -7052,17 +7234,17 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractionGap_2 + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":276 ++ /* "cylp/cy/CyCbcModel.pyx":279 + * + * def __set__(self, value): + * self.CppSelf.setAllowableFractionGap(value) # <<<<<<<<<<<<<< + * + * property allowablePercentageGap: + */ +- __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L1_error) ++ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 279, __pyx_L1_error) + __pyx_v_self->CppSelf->setAllowableFractionGap(__pyx_t_1); + +- /* "cylp/cy/CyCbcModel.pyx":275 ++ /* "cylp/cy/CyCbcModel.pyx":278 + * return self.CppSelf.getAllowableFractionGap() + * + * def __set__(self, value): # <<<<<<<<<<<<<< +@@ -7081,7 +7263,7 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractionGap_2 + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":279 ++/* "cylp/cy/CyCbcModel.pyx":282 + * + * property allowablePercentageGap: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -7111,7 +7293,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercent + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":280 ++ /* "cylp/cy/CyCbcModel.pyx":283 + * property allowablePercentageGap: + * def __get__(self): + * return self.CppSelf.getAllowablePercentageGap() # <<<<<<<<<<<<<< +@@ -7119,13 +7301,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercent + * def __set__(self, value): + */ + __Pyx_XDECREF(__pyx_r); +- __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getAllowablePercentageGap()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error) ++ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getAllowablePercentageGap()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "cylp/cy/CyCbcModel.pyx":279 ++ /* "cylp/cy/CyCbcModel.pyx":282 + * + * property allowablePercentageGap: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -7144,7 +7326,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercent + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":282 ++/* "cylp/cy/CyCbcModel.pyx":285 + * return self.CppSelf.getAllowablePercentageGap() + * + * def __set__(self, value): # <<<<<<<<<<<<<< +@@ -7174,17 +7356,17 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercentageGap + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":283 ++ /* "cylp/cy/CyCbcModel.pyx":286 + * + * def __set__(self, value): + * self.CppSelf.setAllowablePercentageGap(value) # <<<<<<<<<<<<<< + * + * property maximumSolutions: + */ +- __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 283, __pyx_L1_error) ++ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 286, __pyx_L1_error) + __pyx_v_self->CppSelf->setAllowablePercentageGap(__pyx_t_1); + +- /* "cylp/cy/CyCbcModel.pyx":282 ++ /* "cylp/cy/CyCbcModel.pyx":285 + * return self.CppSelf.getAllowablePercentageGap() + * + * def __set__(self, value): # <<<<<<<<<<<<<< +@@ -7203,7 +7385,7 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercentageGap + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":286 ++/* "cylp/cy/CyCbcModel.pyx":289 + * + * property maximumSolutions: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -7233,7 +7415,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__get__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":287 ++ /* "cylp/cy/CyCbcModel.pyx":290 + * property maximumSolutions: + * def __get__(self): + * return self.CppSelf.getMaximumSolutions() # <<<<<<<<<<<<<< +@@ -7241,13 +7423,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions + * def __set__(self, value): + */ + __Pyx_XDECREF(__pyx_r); +- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getMaximumSolutions()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getMaximumSolutions()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 290, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "cylp/cy/CyCbcModel.pyx":286 ++ /* "cylp/cy/CyCbcModel.pyx":289 + * + * property maximumSolutions: + * def __get__(self): # <<<<<<<<<<<<<< +@@ -7266,7 +7448,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions + return __pyx_r; + } + +-/* "cylp/cy/CyCbcModel.pyx":289 ++/* "cylp/cy/CyCbcModel.pyx":292 + * return self.CppSelf.getMaximumSolutions() + * + * def __set__(self, value): # <<<<<<<<<<<<<< +@@ -7296,17 +7478,17 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions_2__se + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("__set__", 0); + +- /* "cylp/cy/CyCbcModel.pyx":290 ++ /* "cylp/cy/CyCbcModel.pyx":293 + * + * def __set__(self, value): + * self.CppSelf.setMaximumSolutions(value) # <<<<<<<<<<<<<< + * + * + */ +- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 290, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 293, __pyx_L1_error) + (void)(__pyx_v_self->CppSelf->setMaximumSolutions(__pyx_t_1)); + +- /* "cylp/cy/CyCbcModel.pyx":289 ++ /* "cylp/cy/CyCbcModel.pyx":292 + * return self.CppSelf.getMaximumSolutions() + * + * def __set__(self, value): # <<<<<<<<<<<<<< +@@ -7440,7 +7622,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22__setstate_cytho + return __pyx_r; + } + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":735 + * ctypedef npy_cdouble complex_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< +@@ -7457,7 +7639,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":736 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":736 + * + * cdef inline object PyArray_MultiIterNew1(a): + * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< +@@ -7471,7 +7653,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":735 + * ctypedef npy_cdouble complex_t + * + * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< +@@ -7490,7 +7672,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ + return __pyx_r; + } + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":738 + * return PyArray_MultiIterNew(1, a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< +@@ -7507,7 +7689,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":739 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":739 + * + * cdef inline object PyArray_MultiIterNew2(a, b): + * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< +@@ -7521,7 +7703,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":738 + * return PyArray_MultiIterNew(1, a) + * + * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< +@@ -7540,7 +7722,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ + return __pyx_r; + } + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":741 + * return PyArray_MultiIterNew(2, a, b) + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< +@@ -7557,7 +7739,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":742 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":742 + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): + * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< +@@ -7571,7 +7753,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":741 + * return PyArray_MultiIterNew(2, a, b) + * + * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< +@@ -7590,7 +7772,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ + return __pyx_r; + } + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":744 + * return PyArray_MultiIterNew(3, a, b, c) + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< +@@ -7607,7 +7789,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":745 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":745 + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): + * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< +@@ -7621,7 +7803,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":744 + * return PyArray_MultiIterNew(3, a, b, c) + * + * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< +@@ -7640,7 +7822,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ + return __pyx_r; + } + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":747 + * return PyArray_MultiIterNew(4, a, b, c, d) + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< +@@ -7657,7 +7839,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":748 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":748 + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): + * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< +@@ -7671,7 +7853,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ + __pyx_t_1 = 0; + goto __pyx_L0; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":747 + * return PyArray_MultiIterNew(4, a, b, c, d) + * + * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< +@@ -7690,7 +7872,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ + return __pyx_r; + } + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":750 + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< +@@ -7704,7 +7886,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ + int __pyx_t_1; + __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":751 + * + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< +@@ -7714,7 +7896,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ + __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); + if (__pyx_t_1) { + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":752 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":752 + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): + * return d.subarray.shape # <<<<<<<<<<<<<< +@@ -7726,7 +7908,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ + __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); + goto __pyx_L0; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":751 + * + * cdef inline tuple PyDataType_SHAPE(dtype d): + * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< +@@ -7735,7 +7917,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ + */ + } + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":754 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":754 + * return d.subarray.shape + * else: + * return () # <<<<<<<<<<<<<< +@@ -7749,7 +7931,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ + goto __pyx_L0; + } + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":750 + * return PyArray_MultiIterNew(5, a, b, c, d, e) + * + * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< +@@ -7764,7 +7946,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ + return __pyx_r; + } + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":929 + * int _import_umath() except -1 + * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< +@@ -7776,7 +7958,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("set_array_base", 0); + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":930 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":930 + * + * cdef inline void set_array_base(ndarray arr, object base): + * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< +@@ -7785,7 +7967,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a + */ + Py_INCREF(__pyx_v_base); + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":931 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":931 + * cdef inline void set_array_base(ndarray arr, object base): + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< +@@ -7794,7 +7976,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a + */ + (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":929 + * int _import_umath() except -1 + * + * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< +@@ -7806,7 +7988,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a + __Pyx_RefNannyFinishContext(); + } + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":933 + * PyArray_SetBaseObject(arr, base) + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< +@@ -7821,7 +8003,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py + int __pyx_t_1; + __Pyx_RefNannySetupContext("get_array_base", 0); + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":934 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":934 + * + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< +@@ -7830,7 +8012,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py + */ + __pyx_v_base = PyArray_BASE(__pyx_v_arr); + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":935 + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< +@@ -7840,7 +8022,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py + __pyx_t_1 = ((__pyx_v_base == NULL) != 0); + if (__pyx_t_1) { + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":936 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":936 + * base = PyArray_BASE(arr) + * if base is NULL: + * return None # <<<<<<<<<<<<<< +@@ -7851,7 +8033,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py + __pyx_r = Py_None; __Pyx_INCREF(Py_None); + goto __pyx_L0; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":935 + * cdef inline object get_array_base(ndarray arr): + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< +@@ -7860,7 +8042,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py + */ + } + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":937 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":937 + * if base is NULL: + * return None + * return base # <<<<<<<<<<<<<< +@@ -7872,7 +8054,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py + __pyx_r = ((PyObject *)__pyx_v_base); + goto __pyx_L0; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":933 + * PyArray_SetBaseObject(arr, base) + * + * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< +@@ -7887,7 +8069,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py + return __pyx_r; + } + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":941 + * # Versions of the import_* functions which are more suitable for + * # Cython code. + * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< +@@ -7911,7 +8093,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("import_array", 0); + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":942 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< +@@ -7927,7 +8109,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":943 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":943 + * cdef inline int import_array() except -1: + * try: + * __pyx_import_array() # <<<<<<<<<<<<<< +@@ -7936,7 +8118,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { + */ + __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error) + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":942 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< +@@ -7950,7 +8132,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { + goto __pyx_L8_try_end; + __pyx_L3_error:; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":944 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":944 + * try: + * __pyx_import_array() + * except Exception: # <<<<<<<<<<<<<< +@@ -7965,7 +8147,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":945 + * __pyx_import_array() + * except Exception: + * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< +@@ -7981,7 +8163,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":942 + * # Cython code. + * cdef inline int import_array() except -1: + * try: # <<<<<<<<<<<<<< +@@ -7996,7 +8178,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { + __pyx_L8_try_end:; + } + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":941 + * # Versions of the import_* functions which are more suitable for + * # Cython code. + * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< +@@ -8019,7 +8201,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { + return __pyx_r; + } + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":947 + * raise ImportError("numpy.core.multiarray failed to import") + * + * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< +@@ -8043,7 +8225,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("import_umath", 0); + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":948 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< +@@ -8059,7 +8241,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":949 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":949 + * cdef inline int import_umath() except -1: + * try: + * _import_umath() # <<<<<<<<<<<<<< +@@ -8068,7 +8250,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { + */ + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error) + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":948 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< +@@ -8082,7 +8264,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { + goto __pyx_L8_try_end; + __pyx_L3_error:; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":950 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":950 + * try: + * _import_umath() + * except Exception: # <<<<<<<<<<<<<< +@@ -8097,7 +8279,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":951 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< +@@ -8113,7 +8295,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":948 + * + * cdef inline int import_umath() except -1: + * try: # <<<<<<<<<<<<<< +@@ -8128,7 +8310,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { + __pyx_L8_try_end:; + } + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":947 + * raise ImportError("numpy.core.multiarray failed to import") + * + * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< +@@ -8151,7 +8333,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { + return __pyx_r; + } + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":953 + * raise ImportError("numpy.core.umath failed to import") + * + * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< +@@ -8175,7 +8357,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("import_ufunc", 0); + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":954 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< +@@ -8191,7 +8373,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { + __Pyx_XGOTREF(__pyx_t_3); + /*try:*/ { + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":955 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":955 + * cdef inline int import_ufunc() except -1: + * try: + * _import_umath() # <<<<<<<<<<<<<< +@@ -8200,7 +8382,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { + */ + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error) + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":954 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< +@@ -8214,7 +8396,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { + goto __pyx_L8_try_end; + __pyx_L3_error:; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":956 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":956 + * try: + * _import_umath() + * except Exception: # <<<<<<<<<<<<<< +@@ -8229,7 +8411,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_7); + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":957 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":957 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< +@@ -8245,7 +8427,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { + goto __pyx_L5_except_error; + __pyx_L5_except_error:; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":954 + * + * cdef inline int import_ufunc() except -1: + * try: # <<<<<<<<<<<<<< +@@ -8260,7 +8442,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { + __pyx_L8_try_end:; + } + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":953 + * raise ImportError("numpy.core.umath failed to import") + * + * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< +@@ -8283,7 +8465,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { + return __pyx_r; + } + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":967 + * + * + * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< +@@ -8296,7 +8478,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_timedelta64_object", 0); + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":979 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":979 + * bool + * """ + * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< +@@ -8306,7 +8488,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ + __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); + goto __pyx_L0; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":967 + * + * + * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< +@@ -8320,7 +8502,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ + return __pyx_r; + } + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":982 + * + * + * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< +@@ -8333,7 +8515,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("is_datetime64_object", 0); + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":994 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":994 + * bool + * """ + * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< +@@ -8343,7 +8525,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o + __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); + goto __pyx_L0; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":982 + * + * + * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< +@@ -8357,7 +8539,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o + return __pyx_r; + } + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":997 + * + * + * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< +@@ -8368,7 +8550,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o + static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { + npy_datetime __pyx_r; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1004 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":1004 + * also needed. That can be found using `get_datetime64_unit`. + * """ + * return (obj).obval # <<<<<<<<<<<<<< +@@ -8378,7 +8560,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * + __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; + goto __pyx_L0; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":997 + * + * + * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< +@@ -8391,7 +8573,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * + return __pyx_r; + } + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":1007 + * + * + * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< +@@ -8402,7 +8584,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * + static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { + npy_timedelta __pyx_r; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1011 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":1011 + * returns the int64 value underlying scalar numpy timedelta64 object + * """ + * return (obj).obval # <<<<<<<<<<<<<< +@@ -8412,7 +8594,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject + __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; + goto __pyx_L0; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":1007 + * + * + * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< +@@ -8425,7 +8607,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject + return __pyx_r; + } + +-/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 ++/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":1014 + * + * + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< +@@ -8436,7 +8618,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject + static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { + NPY_DATETIMEUNIT __pyx_r; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1018 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":1018 + * returns the unit part of the dtype for a numpy datetime64 object. + * """ + * return (obj).obmeta.base # <<<<<<<<<<<<<< +@@ -8444,7 +8626,7 @@ static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObjec + __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); + goto __pyx_L0; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":1014 + * + * + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< +@@ -8790,14 +8972,14 @@ static PyTypeObject __pyx_type_4cylp_2cy_10CyCbcModel_CyCbcModel = { + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif +- #if PY_VERSION_HEX >= 0x030800b1 ++ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) + 0, /*tp_vectorcall*/ + #endif + #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 + 0, /*tp_print*/ + #endif +- #if PY_VERSION_HEX >= 0x030B00A2 +- 0, /*tp_inline_values_offset*/ ++ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 ++ 0, /*tp_pypy_flags*/ + #endif + }; + +@@ -8876,6 +9058,8 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_n_s_indices, __pyx_k_indices, sizeof(__pyx_k_indices), 0, 0, 1, 1}, + {&__pyx_n_s_inds, __pyx_k_inds, sizeof(__pyx_k_inds), 0, 0, 1, 1}, + {&__pyx_n_s_infeasible, __pyx_k_infeasible, sizeof(__pyx_k_infeasible), 0, 0, 1, 1}, ++ {&__pyx_n_s_isRelaxationAbondoned, __pyx_k_isRelaxationAbondoned, sizeof(__pyx_k_isRelaxationAbondoned), 0, 0, 1, 1}, ++ {&__pyx_n_s_isRelaxationInfeasible, __pyx_k_isRelaxationInfeasible, sizeof(__pyx_k_isRelaxationInfeasible), 0, 0, 1, 1}, + {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1}, + {&__pyx_n_s_izip, __pyx_k_izip, sizeof(__pyx_k_izip), 0, 0, 1, 1}, + {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1}, +@@ -8888,6 +9072,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0}, + {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, + {&__pyx_n_s_problemStatus, __pyx_k_problemStatus, sizeof(__pyx_k_problemStatus), 0, 0, 1, 1}, ++ {&__pyx_kp_s_problem_proven_infeasible, __pyx_k_problem_proven_infeasible, sizeof(__pyx_k_problem_proven_infeasible), 0, 0, 1, 0}, + {&__pyx_n_s_product, __pyx_k_product, sizeof(__pyx_k_product), 0, 0, 1, 1}, + {&__pyx_n_s_pythonCutGeneratorObject, __pyx_k_pythonCutGeneratorObject, sizeof(__pyx_k_pythonCutGeneratorObject), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, +@@ -8895,6 +9080,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, + {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, + {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, ++ {&__pyx_kp_s_relaxation_abondoned, __pyx_k_relaxation_abondoned, sizeof(__pyx_k_relaxation_abondoned), 0, 0, 1, 0}, + {&__pyx_kp_s_relaxation_infeasible, __pyx_k_relaxation_infeasible, sizeof(__pyx_k_relaxation_infeasible), 0, 0, 1, 0}, + {&__pyx_kp_s_setNodeCompare_argument_should_b, __pyx_k_setNodeCompare_argument_should_b, sizeof(__pyx_k_setNodeCompare_argument_should_b), 0, 0, 1, 0}, + {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, +@@ -8920,7 +9106,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { + __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 7, __pyx_L1_error) + __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 99, __pyx_L1_error) + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 112, __pyx_L1_error) +- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 199, __pyx_L1_error) ++ __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 202, __pyx_L1_error) + return 0; + __pyx_L1_error:; + return -1; +@@ -8949,7 +9135,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { + __Pyx_GOTREF(__pyx_tuple__3); + __Pyx_GIVEREF(__pyx_tuple__3); + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":945 + * __pyx_import_array() + * except Exception: + * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< +@@ -8960,7 +9146,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { + __Pyx_GOTREF(__pyx_tuple__4); + __Pyx_GIVEREF(__pyx_tuple__4); + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":951 + * _import_umath() + * except Exception: + * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< +@@ -9665,7 +9851,7 @@ if (!__Pyx_RefNanny) { + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_7) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + +- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 ++ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":1014 + * + * + * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< From ee48b3c79e60939af78396ce76a52c87d1992e89 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 14 Mar 2022 15:23:27 -0700 Subject: [PATCH 148/751] build/pkgs/cvxpy: Use /~https://github.com/cvxpy/cvxpy/pull/1707 --- build/pkgs/cvxpy/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/cvxpy/requirements.txt b/build/pkgs/cvxpy/requirements.txt index 187142bb93e..4882cefe710 100644 --- a/build/pkgs/cvxpy/requirements.txt +++ b/build/pkgs/cvxpy/requirements.txt @@ -1 +1 @@ -cvxpy +cvxpy @ git+/~https://github.com/cvxpy/cvxpy.git@refs/pull/1707/head From bc60f6181759cd140cb8bdba355cdbc8cdbcb8b0 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 15 Mar 2022 21:05:38 -0700 Subject: [PATCH 149/751] build/pkgs/cylp: Add another commit from /~https://github.com/coin-or/CyLP/pull/150 --- build/pkgs/cylp/package-version.txt | 2 +- ...6ccc89a9f6510c8ebf7d54f7a135294dc257.patch | 280 ++++++++++++++++++ 2 files changed, 281 insertions(+), 1 deletion(-) create mode 100644 build/pkgs/cylp/patches/02-bc666ccc89a9f6510c8ebf7d54f7a135294dc257.patch diff --git a/build/pkgs/cylp/package-version.txt b/build/pkgs/cylp/package-version.txt index a242ad0cff8..9568b88b4a3 100644 --- a/build/pkgs/cylp/package-version.txt +++ b/build/pkgs/cylp/package-version.txt @@ -1 +1 @@ -0.91.4.p1 +0.91.4.p2 diff --git a/build/pkgs/cylp/patches/02-bc666ccc89a9f6510c8ebf7d54f7a135294dc257.patch b/build/pkgs/cylp/patches/02-bc666ccc89a9f6510c8ebf7d54f7a135294dc257.patch new file mode 100644 index 00000000000..7d6ccfb8002 --- /dev/null +++ b/build/pkgs/cylp/patches/02-bc666ccc89a9f6510c8ebf7d54f7a135294dc257.patch @@ -0,0 +1,280 @@ +From bc666ccc89a9f6510c8ebf7d54f7a135294dc257 Mon Sep 17 00:00:00 2001 +From: Ted Ralphs +Date: Tue, 15 Mar 2022 15:37:57 -0400 +Subject: [PATCH] Fixing another typo and clarify menaing of status + +--- + cylp/cy/CyCbcModel.cpp | 87 ++++++++++++++++++++++-------------------- + cylp/cy/CyCbcModel.pyx | 4 +- + 2 files changed, 47 insertions(+), 44 deletions(-) + +diff --git a/cylp/cy/CyCbcModel.cpp b/cylp/cy/CyCbcModel.cpp +index 8192e18..cf3e3b8 100644 +--- a/cylp/cy/CyCbcModel.cpp ++++ b/cylp/cy/CyCbcModel.cpp +@@ -2753,10 +2753,11 @@ static const char __pyx_k_NodeCompareBase[] = "NodeCompareBase"; + static const char __pyx_k_addCutGenerator[] = "addCutGenerator"; + static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; + static const char __pyx_k_stopped_on_time[] = "stopped on time"; ++static const char __pyx_k_search_completed[] = "search completed"; + static const char __pyx_k_stopped_on_nodes[] = "stopped on nodes"; + static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; +-static const char __pyx_k_relaxation_abondoned[] = "relaxation abondoned"; +-static const char __pyx_k_isRelaxationAbondoned[] = "isRelaxationAbondoned"; ++static const char __pyx_k_relaxation_abandoned[] = "relaxation abandoned"; ++static const char __pyx_k_isRelaxationAbandoned[] = "isRelaxationAbandoned"; + static const char __pyx_k_relaxation_infeasible[] = "relaxation infeasible"; + static const char __pyx_k_stopped_on_user_event[] = "stopped on user event"; + static const char __pyx_k_isRelaxationInfeasible[] = "isRelaxationInfeasible"; +@@ -2797,7 +2798,7 @@ static PyObject *__pyx_n_s_import; + static PyObject *__pyx_n_s_indices; + static PyObject *__pyx_n_s_inds; + static PyObject *__pyx_n_s_infeasible; +-static PyObject *__pyx_n_s_isRelaxationAbondoned; ++static PyObject *__pyx_n_s_isRelaxationAbandoned; + static PyObject *__pyx_n_s_isRelaxationInfeasible; + static PyObject *__pyx_n_s_itertools; + static PyObject *__pyx_n_s_izip; +@@ -2819,8 +2820,9 @@ static PyObject *__pyx_n_s_range; + static PyObject *__pyx_n_s_reduce; + static PyObject *__pyx_n_s_reduce_cython; + static PyObject *__pyx_n_s_reduce_ex; +-static PyObject *__pyx_kp_s_relaxation_abondoned; ++static PyObject *__pyx_kp_s_relaxation_abandoned; + static PyObject *__pyx_kp_s_relaxation_infeasible; ++static PyObject *__pyx_kp_s_search_completed; + static PyObject *__pyx_kp_s_setNodeCompare_argument_should_b; + static PyObject *__pyx_n_s_setstate; + static PyObject *__pyx_n_s_setstate_cython; +@@ -2850,7 +2852,7 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel_2__set__(struc + static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12isRelaxationInfeasible(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */ + static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14isRelaxationDualInfeasible(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */ + static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16isRelaxationOptimal(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */ +-static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbondoned(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */ ++static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbandoned(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */ + static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_17osiSolverInteface___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */ + static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSolution___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */ + static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13solutionCount___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */ +@@ -4821,7 +4823,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status___get__(st + * # secondaryStatus() should be used instead of status() (??) + * if self.isRelaxationInfeasible(): # <<<<<<<<<<<<<< + * return problemStatus[1] +- * if self.isRelaxationAbondoned(): ++ * if self.isRelaxationAbandoned(): + */ + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isRelaxationInfeasible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); +@@ -4848,8 +4850,8 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status___get__(st + * # secondaryStatus() should be used instead of status() (??) + * if self.isRelaxationInfeasible(): + * return problemStatus[1] # <<<<<<<<<<<<<< +- * if self.isRelaxationAbondoned(): +- * return 'relaxation abondoned' ++ * if self.isRelaxationAbandoned(): ++ * return 'relaxation abandoned' + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_problemStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error) +@@ -4866,18 +4868,18 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status___get__(st + * # secondaryStatus() should be used instead of status() (??) + * if self.isRelaxationInfeasible(): # <<<<<<<<<<<<<< + * return problemStatus[1] +- * if self.isRelaxationAbondoned(): ++ * if self.isRelaxationAbandoned(): + */ + } + + /* "cylp/cy/CyCbcModel.pyx":157 + * if self.isRelaxationInfeasible(): + * return problemStatus[1] +- * if self.isRelaxationAbondoned(): # <<<<<<<<<<<<<< +- * return 'relaxation abondoned' ++ * if self.isRelaxationAbandoned(): # <<<<<<<<<<<<<< ++ * return 'relaxation abandoned' + * if self.CppSelf.isProvenInfeasible(): + */ +- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isRelaxationAbondoned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) ++ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isRelaxationAbandoned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { +@@ -4900,28 +4902,28 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status___get__(st + + /* "cylp/cy/CyCbcModel.pyx":158 + * return problemStatus[1] +- * if self.isRelaxationAbondoned(): +- * return 'relaxation abondoned' # <<<<<<<<<<<<<< ++ * if self.isRelaxationAbandoned(): ++ * return 'relaxation abandoned' # <<<<<<<<<<<<<< + * if self.CppSelf.isProvenInfeasible(): + * return 'problem proven infeasible' + */ + __Pyx_XDECREF(__pyx_r); +- __Pyx_INCREF(__pyx_kp_s_relaxation_abondoned); +- __pyx_r = __pyx_kp_s_relaxation_abondoned; ++ __Pyx_INCREF(__pyx_kp_s_relaxation_abandoned); ++ __pyx_r = __pyx_kp_s_relaxation_abandoned; + goto __pyx_L0; + + /* "cylp/cy/CyCbcModel.pyx":157 + * if self.isRelaxationInfeasible(): + * return problemStatus[1] +- * if self.isRelaxationAbondoned(): # <<<<<<<<<<<<<< +- * return 'relaxation abondoned' ++ * if self.isRelaxationAbandoned(): # <<<<<<<<<<<<<< ++ * return 'relaxation abandoned' + * if self.CppSelf.isProvenInfeasible(): + */ + } + + /* "cylp/cy/CyCbcModel.pyx":159 +- * if self.isRelaxationAbondoned(): +- * return 'relaxation abondoned' ++ * if self.isRelaxationAbandoned(): ++ * return 'relaxation abandoned' + * if self.CppSelf.isProvenInfeasible(): # <<<<<<<<<<<<<< + * return 'problem proven infeasible' + * if self.CppSelf.isProvenOptimal(): +@@ -4930,7 +4932,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status___get__(st + if (__pyx_t_4) { + + /* "cylp/cy/CyCbcModel.pyx":160 +- * return 'relaxation abondoned' ++ * return 'relaxation abandoned' + * if self.CppSelf.isProvenInfeasible(): + * return 'problem proven infeasible' # <<<<<<<<<<<<<< + * if self.CppSelf.isProvenOptimal(): +@@ -4942,8 +4944,8 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status___get__(st + goto __pyx_L0; + + /* "cylp/cy/CyCbcModel.pyx":159 +- * if self.isRelaxationAbondoned(): +- * return 'relaxation abondoned' ++ * if self.isRelaxationAbandoned(): ++ * return 'relaxation abandoned' + * if self.CppSelf.isProvenInfeasible(): # <<<<<<<<<<<<<< + * return 'problem proven infeasible' + * if self.CppSelf.isProvenOptimal(): +@@ -5306,7 +5308,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16isRelaxationOpti + * def isRelaxationOptimal(self): + * return self.CppSelf.isInitialSolveProvenOptimal() # <<<<<<<<<<<<<< + * +- * def isRelaxationAbondoned(self): ++ * def isRelaxationAbandoned(self): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->CppSelf->isInitialSolveProvenOptimal()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error) +@@ -5337,37 +5339,37 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16isRelaxationOpti + /* "cylp/cy/CyCbcModel.pyx":181 + * return self.CppSelf.isInitialSolveProvenOptimal() + * +- * def isRelaxationAbondoned(self): # <<<<<<<<<<<<<< ++ * def isRelaxationAbandoned(self): # <<<<<<<<<<<<<< + * return self.CppSelf.isInitialSolveAbandoned() + * + */ + + /* Python wrapper */ +-static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_19isRelaxationAbondoned(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +-static char __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbondoned[] = "CyCbcModel.isRelaxationAbondoned(self)"; +-static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_19isRelaxationAbondoned(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { ++static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_19isRelaxationAbandoned(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ ++static char __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbandoned[] = "CyCbcModel.isRelaxationAbandoned(self)"; ++static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_19isRelaxationAbandoned(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations +- __Pyx_RefNannySetupContext("isRelaxationAbondoned (wrapper)", 0); +- __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbondoned(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self)); ++ __Pyx_RefNannySetupContext("isRelaxationAbandoned (wrapper)", 0); ++ __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbandoned(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; + } + +-static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbondoned(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) { ++static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbandoned(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; +- __Pyx_RefNannySetupContext("isRelaxationAbondoned", 0); ++ __Pyx_RefNannySetupContext("isRelaxationAbandoned", 0); + + /* "cylp/cy/CyCbcModel.pyx":182 + * +- * def isRelaxationAbondoned(self): ++ * def isRelaxationAbandoned(self): + * return self.CppSelf.isInitialSolveAbandoned() # <<<<<<<<<<<<<< + * + * property osiSolverInteface: +@@ -5382,7 +5384,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbon + /* "cylp/cy/CyCbcModel.pyx":181 + * return self.CppSelf.isInitialSolveProvenOptimal() + * +- * def isRelaxationAbondoned(self): # <<<<<<<<<<<<<< ++ * def isRelaxationAbandoned(self): # <<<<<<<<<<<<<< + * return self.CppSelf.isInitialSolveAbandoned() + * + */ +@@ -5390,7 +5392,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbon + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); +- __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.isRelaxationAbondoned", __pyx_clineno, __pyx_lineno, __pyx_filename); ++ __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.isRelaxationAbandoned", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); +@@ -8883,7 +8885,7 @@ static PyMethodDef __pyx_methods_4cylp_2cy_10CyCbcModel_CyCbcModel[] = { + {"isRelaxationInfeasible", (PyCFunction)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_13isRelaxationInfeasible, METH_NOARGS, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_12isRelaxationInfeasible}, + {"isRelaxationDualInfeasible", (PyCFunction)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_15isRelaxationDualInfeasible, METH_NOARGS, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_14isRelaxationDualInfeasible}, + {"isRelaxationOptimal", (PyCFunction)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_17isRelaxationOptimal, METH_NOARGS, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_16isRelaxationOptimal}, +- {"isRelaxationAbondoned", (PyCFunction)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_19isRelaxationAbondoned, METH_NOARGS, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbondoned}, ++ {"isRelaxationAbandoned", (PyCFunction)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_19isRelaxationAbandoned, METH_NOARGS, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbandoned}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_21__reduce_cython__, METH_NOARGS, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_20__reduce_cython__}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_23__setstate_cython__, METH_O, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_22__setstate_cython__}, + {0, 0, 0, 0} +@@ -9058,7 +9060,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_n_s_indices, __pyx_k_indices, sizeof(__pyx_k_indices), 0, 0, 1, 1}, + {&__pyx_n_s_inds, __pyx_k_inds, sizeof(__pyx_k_inds), 0, 0, 1, 1}, + {&__pyx_n_s_infeasible, __pyx_k_infeasible, sizeof(__pyx_k_infeasible), 0, 0, 1, 1}, +- {&__pyx_n_s_isRelaxationAbondoned, __pyx_k_isRelaxationAbondoned, sizeof(__pyx_k_isRelaxationAbondoned), 0, 0, 1, 1}, ++ {&__pyx_n_s_isRelaxationAbandoned, __pyx_k_isRelaxationAbandoned, sizeof(__pyx_k_isRelaxationAbandoned), 0, 0, 1, 1}, + {&__pyx_n_s_isRelaxationInfeasible, __pyx_k_isRelaxationInfeasible, sizeof(__pyx_k_isRelaxationInfeasible), 0, 0, 1, 1}, + {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1}, + {&__pyx_n_s_izip, __pyx_k_izip, sizeof(__pyx_k_izip), 0, 0, 1, 1}, +@@ -9080,8 +9082,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { + {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, + {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, + {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, +- {&__pyx_kp_s_relaxation_abondoned, __pyx_k_relaxation_abondoned, sizeof(__pyx_k_relaxation_abondoned), 0, 0, 1, 0}, ++ {&__pyx_kp_s_relaxation_abandoned, __pyx_k_relaxation_abandoned, sizeof(__pyx_k_relaxation_abandoned), 0, 0, 1, 0}, + {&__pyx_kp_s_relaxation_infeasible, __pyx_k_relaxation_infeasible, sizeof(__pyx_k_relaxation_infeasible), 0, 0, 1, 0}, ++ {&__pyx_kp_s_search_completed, __pyx_k_search_completed, sizeof(__pyx_k_search_completed), 0, 0, 1, 0}, + {&__pyx_kp_s_setNodeCompare_argument_should_b, __pyx_k_setNodeCompare_argument_should_b, sizeof(__pyx_k_setNodeCompare_argument_should_b), 0, 0, 1, 0}, + {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, + {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, +@@ -9808,15 +9811,15 @@ if (!__Pyx_RefNanny) { + /* "cylp/cy/CyCbcModel.pyx":33 + * + * # Understandable messages to translate what branchAndBound() returns +- * problemStatus = ['solution', 'relaxation infeasible', # <<<<<<<<<<<<<< ++ * problemStatus = ['search completed', 'relaxation infeasible', # <<<<<<<<<<<<<< + * 'stopped on gap', 'stopped on nodes', 'stopped on time', + * 'stopped on user event', 'stopped on solutions' + */ + __pyx_t_7 = PyList_New(8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 33, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); +- __Pyx_INCREF(__pyx_n_s_solution); +- __Pyx_GIVEREF(__pyx_n_s_solution); +- PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_solution); ++ __Pyx_INCREF(__pyx_kp_s_search_completed); ++ __Pyx_GIVEREF(__pyx_kp_s_search_completed); ++ PyList_SET_ITEM(__pyx_t_7, 0, __pyx_kp_s_search_completed); + __Pyx_INCREF(__pyx_kp_s_relaxation_infeasible); + __Pyx_GIVEREF(__pyx_kp_s_relaxation_infeasible); + PyList_SET_ITEM(__pyx_t_7, 1, __pyx_kp_s_relaxation_infeasible); From 4d0b57b5b7c52109d12b08f7a32fb2bb331afc24 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 20 Mar 2022 11:43:49 -0700 Subject: [PATCH 150/751] src/sage/numerical/backends/cvxpy_backend_test.py: New --- src/sage/numerical/backends/cvxpy_backend_test.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/sage/numerical/backends/cvxpy_backend_test.py diff --git a/src/sage/numerical/backends/cvxpy_backend_test.py b/src/sage/numerical/backends/cvxpy_backend_test.py new file mode 100644 index 00000000000..6b72d90df91 --- /dev/null +++ b/src/sage/numerical/backends/cvxpy_backend_test.py @@ -0,0 +1,10 @@ +import pytest +from sage.numerical.backends.generic_backend_test import GenericBackendTests +from sage.numerical.backends.generic_backend import GenericBackend +from sage.numerical.mip import MixedIntegerLinearProgram + +class TestCVXPYBackend(GenericBackendTests): + + @pytest.fixture + def backend(self) -> GenericBackend: + return MixedIntegerLinearProgram(solver="CVXPY").get_backend() From 26244793debb0547745a504ec51cd327d6db6ad8 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 26 Mar 2022 19:08:32 -0700 Subject: [PATCH 151/751] build/pkgs/cylp: Update to 0.91.5, remove patches --- build/pkgs/cylp/checksums.ini | 6 +- build/pkgs/cylp/package-version.txt | 2 +- ...c4b94e279e96842da0d38ae657f06f1e9415.patch | 88285 ---------------- ...21ac6bcc290fd60b83bf48741030d9d0abe7.patch | 2888 - ...6ccc89a9f6510c8ebf7d54f7a135294dc257.patch | 280 - 5 files changed, 4 insertions(+), 91457 deletions(-) delete mode 100644 build/pkgs/cylp/patches/00-e619c4b94e279e96842da0d38ae657f06f1e9415.patch delete mode 100644 build/pkgs/cylp/patches/01-7c5b21ac6bcc290fd60b83bf48741030d9d0abe7.patch delete mode 100644 build/pkgs/cylp/patches/02-bc666ccc89a9f6510c8ebf7d54f7a135294dc257.patch diff --git a/build/pkgs/cylp/checksums.ini b/build/pkgs/cylp/checksums.ini index 1b44a7d5faa..0a073c1569a 100644 --- a/build/pkgs/cylp/checksums.ini +++ b/build/pkgs/cylp/checksums.ini @@ -1,5 +1,5 @@ tarball=cylp-VERSION.tar.gz -sha1=54965f2ae9b914df7817dffd53bc34925a6fadd4 -md5=a4f50e6b24a7fcd2e890a9e7e8825437 -cksum=4132703858 +sha1=1c2d20933abc48ed2fefc1ae45d8f9492fc2eef2 +md5=ac0308a916dac5dd84f831dbc0fba5c5 +cksum=1532166313 upstream_url=https://pypi.io/packages/source/c/cylp/cylp-VERSION.tar.gz diff --git a/build/pkgs/cylp/package-version.txt b/build/pkgs/cylp/package-version.txt index 9568b88b4a3..1d5e6c02bae 100644 --- a/build/pkgs/cylp/package-version.txt +++ b/build/pkgs/cylp/package-version.txt @@ -1 +1 @@ -0.91.4.p2 +0.91.5 diff --git a/build/pkgs/cylp/patches/00-e619c4b94e279e96842da0d38ae657f06f1e9415.patch b/build/pkgs/cylp/patches/00-e619c4b94e279e96842da0d38ae657f06f1e9415.patch deleted file mode 100644 index 295cae02b2c..00000000000 --- a/build/pkgs/cylp/patches/00-e619c4b94e279e96842da0d38ae657f06f1e9415.patch +++ /dev/null @@ -1,88285 +0,0 @@ -From e619c4b94e279e96842da0d38ae657f06f1e9415 Mon Sep 17 00:00:00 2001 -From: Ted Ralphs -Date: Wed, 15 Dec 2021 18:01:49 -0500 -Subject: [PATCH] Re-generating with Cython 0.29.27 for Python 3.10 - compatibility. Fixes #132 - ---- - cylp/cy/CyCbcModel.cpp | 3071 ++++++-------------- - cylp/cy/CyCbcNode.cpp | 3671 +++++++----------------- - cylp/cy/CyCgl.cpp | 3248 +++++++-------------- - cylp/cy/CyCglCutGeneratorBase.cpp | 3652 +++++++---------------- - cylp/cy/CyCglTreeInfo.cpp | 355 ++- - cylp/cy/CyClpDualRowPivotBase.cpp | 3623 +++++++---------------- - cylp/cy/CyClpPrimalColumnPivotBase.cpp | 3652 +++++++---------------- - cylp/cy/CyClpSimplex.cpp | 2852 +++++------------- - cylp/cy/CyCoinIndexedVector.cpp | 470 ++- - cylp/cy/CyCoinModel.cpp | 3055 +++++--------------- - cylp/cy/CyCoinMpsIO.cpp | 2732 +++++------------- - cylp/cy/CyCoinPackedMatrix.cpp | 3026 +++++-------------- - cylp/cy/CyCutGeneratorPythonBase.cpp | 2994 +++++-------------- - cylp/cy/CyDantzigPivot.cpp | 3217 ++++++--------------- - cylp/cy/CyDualPivotPythonBase.cpp | 3018 ++++++------------- - cylp/cy/CyOsiCuts.cpp | 3040 ++++++-------------- - cylp/cy/CyOsiSolverInterface.cpp | 3037 +++++--------------- - cylp/cy/CyPEPivot.cpp | 3214 ++++++--------------- - cylp/cy/CyPivotPythonBase.cpp | 3174 ++++++-------------- - cylp/cy/CyTest.cpp | 3588 +++++++---------------- - cylp/cy/CyWolfePivot.cpp | 3292 +++++++-------------- - 21 files changed, 17581 insertions(+), 44400 deletions(-) - -diff --git a/cylp/cy/CyCbcModel.cpp b/cylp/cy/CyCbcModel.cpp -index 14b5c2a..c62fd3b 100644 ---- a/cylp/cy/CyCbcModel.cpp -+++ b/cylp/cy/CyCbcModel.cpp -@@ -1,14 +1,16 @@ --/* Generated by Cython 0.29.21 */ -+/* Generated by Cython 0.29.25 */ - -+#ifndef PY_SSIZE_T_CLEAN - #define PY_SSIZE_T_CLEAN -+#endif /* PY_SSIZE_T_CLEAN */ - #include "Python.h" - #ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. - #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. - #else --#define CYTHON_ABI "0_29_21" --#define CYTHON_HEX_VERSION 0x001D15F0 -+#define CYTHON_ABI "0_29_25" -+#define CYTHON_HEX_VERSION 0x001D19F0 - #define CYTHON_FUTURE_DIVISION 0 - #include - #ifndef offsetof -@@ -155,7 +157,7 @@ - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif -- #if PY_VERSION_HEX < 0x030300F0 -+ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) -@@ -174,7 +176,7 @@ - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL -- #define CYTHON_FAST_PYCALL 1 -+ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1) - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) -@@ -193,7 +195,9 @@ - #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) - #endif - #if CYTHON_USE_PYLONG_INTERNALS -- #include "longintrepr.h" -+ #if PY_MAJOR_VERSION < 3 -+ #include "longintrepr.h" -+ #endif - #undef SHIFT - #undef BASE - #undef MASK -@@ -324,9 +328,68 @@ class __Pyx_FakeReference { - #define __Pyx_DefaultClassType PyClass_Type - #else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" --#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 -- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ -- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -+ #define __Pyx_DefaultClassType PyType_Type -+#if PY_VERSION_HEX >= 0x030B00A1 -+ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, -+ PyObject *code, PyObject *c, PyObject* n, PyObject *v, -+ PyObject *fv, PyObject *cell, PyObject* fn, -+ PyObject *name, int fline, PyObject *lnos) { -+ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; -+ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; -+ const char *fn_cstr=NULL; -+ const char *name_cstr=NULL; -+ PyCodeObject* co=NULL; -+ PyObject *type, *value, *traceback; -+ PyErr_Fetch(&type, &value, &traceback); -+ if (!(kwds=PyDict_New())) goto end; -+ if (!(argcount=PyLong_FromLong(a))) goto end; -+ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; -+ if (!(posonlyargcount=PyLong_FromLong(0))) goto end; -+ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; -+ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; -+ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; -+ if (!(nlocals=PyLong_FromLong(l))) goto end; -+ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; -+ if (!(stacksize=PyLong_FromLong(s))) goto end; -+ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; -+ if (!(flags=PyLong_FromLong(f))) goto end; -+ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; -+ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; -+ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; -+ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; -+ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; -+ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here -+ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; -+ Py_XDECREF((PyObject*)co); -+ co = (PyCodeObject*)call_result; -+ call_result = NULL; -+ if (0) { -+ cleanup_code_too: -+ Py_XDECREF((PyObject*)co); -+ co = NULL; -+ } -+ end: -+ Py_XDECREF(kwds); -+ Py_XDECREF(argcount); -+ Py_XDECREF(posonlyargcount); -+ Py_XDECREF(kwonlyargcount); -+ Py_XDECREF(nlocals); -+ Py_XDECREF(stacksize); -+ Py_XDECREF(replace); -+ Py_XDECREF(call_result); -+ Py_XDECREF(empty); -+ if (type) { -+ PyErr_Restore(type, value, traceback); -+ } -+ return co; -+ } - #else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -@@ -440,8 +503,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #endif - #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 -+ #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) -+ #else -+ #define __Pyx_PyUnicode_READY(op) (0) -+ #endif - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) -@@ -450,7 +517,11 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) - #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) -+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) -+ #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) -+ #endif - #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) - #endif -@@ -556,10 +627,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong -- #define __Pyx_PyInt_AsHash_t PyInt_AsLong -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t - #else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t -- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t - #endif - #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) -@@ -622,7 +693,13 @@ static CYTHON_INLINE float __PYX_NAN() { - #include - #include - #include "numpy/arrayobject.h" -+#include "numpy/ndarrayobject.h" -+#include "numpy/ndarraytypes.h" -+#include "numpy/arrayscalars.h" - #include "numpy/ufuncobject.h" -+ -+ /* NumPy API declarations from "numpy/__init__.pxd" */ -+ - #include "CglAllDifferent.hpp" - #include "CglClique.hpp" - #include "CglKnapsackCover.hpp" -@@ -650,11 +727,11 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "IClpDualRowPivotBase.h" - #include "CoinModel.hpp" - #include "ICoinPackedMatrix.hpp" -+#include - #include "ios" - #include "new" - #include "stdexcept" - #include "typeinfo" --#include - #include - #include "IClpSimplex.hpp" - #include "ClpSimplex.hpp" -@@ -761,6 +838,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); - static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); - #if CYTHON_ASSUME_SAFE_MACROS - #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) - #else -@@ -916,7 +994,7 @@ static const char *__pyx_f[] = { - "cylp/cy/CyCutGeneratorPythonBase.pxd", - }; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":775 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":690 - * # in Cython to enable them only on the right systems. - * - * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< -@@ -925,7 +1003,7 @@ static const char *__pyx_f[] = { - */ - typedef npy_int8 __pyx_t_5numpy_int8_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":776 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":691 - * - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< -@@ -934,7 +1012,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; - */ - typedef npy_int16 __pyx_t_5numpy_int16_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":777 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":692 - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< -@@ -943,7 +1021,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; - */ - typedef npy_int32 __pyx_t_5numpy_int32_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":778 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":693 - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t - * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< -@@ -952,7 +1030,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; - */ - typedef npy_int64 __pyx_t_5numpy_int64_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":782 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":697 - * #ctypedef npy_int128 int128_t - * - * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< -@@ -961,7 +1039,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; - */ - typedef npy_uint8 __pyx_t_5numpy_uint8_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":783 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":698 - * - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< -@@ -970,7 +1048,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; - */ - typedef npy_uint16 __pyx_t_5numpy_uint16_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":784 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":699 - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< -@@ -979,7 +1057,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; - */ - typedef npy_uint32 __pyx_t_5numpy_uint32_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":785 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":700 - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t - * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< -@@ -988,7 +1066,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; - */ - typedef npy_uint64 __pyx_t_5numpy_uint64_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":789 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":704 - * #ctypedef npy_uint128 uint128_t - * - * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< -@@ -997,7 +1075,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; - */ - typedef npy_float32 __pyx_t_5numpy_float32_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":790 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":705 - * - * ctypedef npy_float32 float32_t - * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< -@@ -1006,7 +1084,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; - */ - typedef npy_float64 __pyx_t_5numpy_float64_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":799 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":714 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< -@@ -1015,7 +1093,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; - */ - typedef npy_long __pyx_t_5numpy_int_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":800 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":715 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< -@@ -1024,7 +1102,7 @@ typedef npy_long __pyx_t_5numpy_int_t; - */ - typedef npy_longlong __pyx_t_5numpy_long_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":801 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":716 - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t - * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< -@@ -1033,7 +1111,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; - */ - typedef npy_longlong __pyx_t_5numpy_longlong_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":803 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":718 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< -@@ -1042,7 +1120,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; - */ - typedef npy_ulong __pyx_t_5numpy_uint_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":804 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":719 - * - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< -@@ -1051,7 +1129,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":805 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":720 - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t - * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< -@@ -1060,7 +1138,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":807 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":722 - * ctypedef npy_ulonglong ulonglong_t - * - * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< -@@ -1069,7 +1147,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - */ - typedef npy_intp __pyx_t_5numpy_intp_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":808 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":723 - * - * ctypedef npy_intp intp_t - * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< -@@ -1078,7 +1156,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; - */ - typedef npy_uintp __pyx_t_5numpy_uintp_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":810 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":725 - * ctypedef npy_uintp uintp_t - * - * ctypedef npy_double float_t # <<<<<<<<<<<<<< -@@ -1087,7 +1165,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; - */ - typedef npy_double __pyx_t_5numpy_float_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":811 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":726 - * - * ctypedef npy_double float_t - * ctypedef npy_double double_t # <<<<<<<<<<<<<< -@@ -1096,7 +1174,7 @@ typedef npy_double __pyx_t_5numpy_float_t; - */ - typedef npy_double __pyx_t_5numpy_double_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":812 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":727 - * ctypedef npy_double float_t - * ctypedef npy_double double_t - * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< -@@ -1162,7 +1240,7 @@ struct __pyx_obj_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase; - struct __pyx_obj_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase; - struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":814 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":729 - * ctypedef npy_longdouble longdouble_t - * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< -@@ -1171,7 +1249,7 @@ struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel; - */ - typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":815 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":730 - * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< -@@ -1180,7 +1258,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - */ - typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":816 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":731 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< -@@ -1189,7 +1267,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - */ - typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":818 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":733 - * ctypedef npy_clongdouble clongdouble_t - * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< -@@ -1970,6 +2048,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #ifndef Py_MEMBER_SIZE - #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) - #endif -+#if CYTHON_FAST_PYCALL - static size_t __pyx_pyframe_localsplus_offset = 0; - #include "frameobject.h" - #define __Pxy_PyFrame_Initialize_Offsets()\ -@@ -1977,6 +2056,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) - #define __Pyx_PyFrame_GetLocalsplus(frame)\ - (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) -+#endif // CYTHON_FAST_PYCALL - #endif - - /* PyObjectCall.proto */ -@@ -2192,29 +2272,6 @@ static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { - #define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) - #endif - --/* DictGetItem.proto */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); --#define __Pyx_PyObject_Dict_GetItem(obj, name)\ -- (likely(PyDict_CheckExact(obj)) ?\ -- __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) --#else --#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) --#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) --#endif -- --/* RaiseTooManyValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); -- --/* RaiseNeedMoreValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); -- --/* RaiseNoneIterError.proto */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -- --/* ExtTypeTest.proto */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); -- - /* GetTopmostException.proto */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); -@@ -2316,11 +2373,10 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); - static void __Pyx_AddTraceback(const char *funcname, int c_line, - int py_line, const char *filename); - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -- --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); -+/* GCCDiagnostics.proto */ -+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -+#define __Pyx_HAS_GCC_DIAGNOSTIC -+#endif - - /* RealImag.proto */ - #if CYTHON_CCOMPLEX -@@ -2420,12 +2476,15 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); - #endif - #endif - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); -- - /* CIntFromPy.proto */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); - -+/* CIntToPy.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -+ -+/* CIntToPy.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); -+ - /* CIntFromPy.proto */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); - -@@ -2542,8 +2601,17 @@ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; - static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; - static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; - static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -+static PyTypeObject *__pyx_ptype_5numpy_generic = 0; -+static PyTypeObject *__pyx_ptype_5numpy_number = 0; -+static PyTypeObject *__pyx_ptype_5numpy_integer = 0; -+static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; -+static PyTypeObject *__pyx_ptype_5numpy_floating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; -+static PyTypeObject *__pyx_ptype_5numpy_character = 0; - static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ - - /* Module declarations from 'cylp.cy.CyCgl' */ - static PyTypeObject *__pyx_ptype_4cylp_2cy_5CyCgl_CyCglCutGenerator = 0; -@@ -2624,8 +2692,6 @@ static PyObject *__pyx_builtin_zip; - static PyObject *__pyx_builtin_AttributeError; - static PyObject *__pyx_builtin_TypeError; - static PyObject *__pyx_builtin_range; --static PyObject *__pyx_builtin_ValueError; --static PyObject *__pyx_builtin_RuntimeError; - static const char __pyx_k_[] = ""; - static const char __pyx_k_zip[] = "zip"; - static const char __pyx_k_dims[] = "dims"; -@@ -2661,7 +2727,6 @@ static const char __pyx_k_itertools[] = "itertools"; - static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; - static const char __pyx_k_whatDepth[] = "whatDepth"; - static const char __pyx_k_CyCbcModel[] = "CyCbcModel"; --static const char __pyx_k_ValueError[] = "ValueError"; - static const char __pyx_k_atSolution[] = "atSolution"; - static const char __pyx_k_infeasible[] = "infeasible"; - static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; -@@ -2669,7 +2734,6 @@ static const char __pyx_k_ImportError[] = "ImportError"; - static const char __pyx_k_cylp_py_mip[] = "cylp.py.mip"; - static const char __pyx_k_newSolution[] = "newSolution"; - static const char __pyx_k_CyLPSolution[] = "CyLPSolution"; --static const char __pyx_k_RuntimeError[] = "RuntimeError"; - static const char __pyx_k_getVarByName[] = "getVarByName"; - static const char __pyx_k_howOftenInSub[] = "howOftenInSub"; - static const char __pyx_k_problemStatus[] = "problemStatus"; -@@ -2689,29 +2753,18 @@ static const char __pyx_k_relaxation_infeasible[] = "relaxation infeasible"; - static const char __pyx_k_stopped_on_user_event[] = "stopped on user event"; - static const char __pyx_k_pythonCutGeneratorObject[] = "pythonCutGeneratorObject"; - static const char __pyx_k_cylp_py_modeling_CyLPModel[] = "cylp.py.modeling.CyLPModel"; --static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; - static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; --static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; --static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; --static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; --static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; - static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; - static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; - static const char __pyx_k_setNodeCompare_argument_should_b[] = "setNodeCompare argument should be a NodeCompareBase object. Got %s"; - static const char __pyx_k_stopped_on_solutionslinear_relax[] = "stopped on solutionslinear relaxation unbounded"; --static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; - static PyObject *__pyx_kp_s_; - static PyObject *__pyx_n_s_AttributeError; - static PyObject *__pyx_n_s_CyCbcModel; - static PyObject *__pyx_n_s_CyLPSolution; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; - static PyObject *__pyx_n_s_ImportError; - static PyObject *__pyx_n_s_NodeCompareBase; --static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; --static PyObject *__pyx_n_s_RuntimeError; - static PyObject *__pyx_n_s_TypeError; --static PyObject *__pyx_n_s_ValueError; - static PyObject *__pyx_n_s_addCutGenerator; - static PyObject *__pyx_n_s_append; - static PyObject *__pyx_n_s_atSolution; -@@ -2740,8 +2793,6 @@ static PyObject *__pyx_n_s_keys; - static PyObject *__pyx_n_s_main; - static PyObject *__pyx_n_s_name; - static PyObject *__pyx_n_s_name_2; --static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; --static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; - static PyObject *__pyx_n_s_newSolution; - static PyObject *__pyx_kp_s_no_default___reduce___due_to_non; - static PyObject *__pyx_n_s_normal; -@@ -2766,7 +2817,6 @@ static PyObject *__pyx_kp_s_stopped_on_solutionslinear_relax; - static PyObject *__pyx_kp_s_stopped_on_time; - static PyObject *__pyx_kp_s_stopped_on_user_event; - static PyObject *__pyx_n_s_test; --static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; - static PyObject *__pyx_n_s_unset; - static PyObject *__pyx_kp_s_utf_8; - static PyObject *__pyx_n_s_varIndex; -@@ -2813,8 +2863,6 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions - static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions_2__set__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, PyObject *__pyx_v_value); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ - static PyObject *__pyx_tp_new_4cylp_2cy_10CyCbcModel_CyCbcModel(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ - static PyObject *__pyx_int_1; - static PyObject *__pyx_int_neg_1; -@@ -2823,11 +2871,6 @@ static PyObject *__pyx_tuple__2; - static PyObject *__pyx_tuple__3; - static PyObject *__pyx_tuple__4; - static PyObject *__pyx_tuple__5; --static PyObject *__pyx_tuple__6; --static PyObject *__pyx_tuple__7; --static PyObject *__pyx_tuple__8; --static PyObject *__pyx_tuple__9; --static PyObject *__pyx_tuple__10; - /* Late includes */ - - /* "cylp/cy/CyCbcModel.pyx":14 -@@ -7397,1939 +7440,331 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22__setstate_cytho - return __pyx_r; - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 -+ * ctypedef npy_cdouble complex_t -+ * -+ * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(1, a) -+ * - */ - --/* Python wrapper */ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); -- __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_v_i; -- int __pyx_v_ndim; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- int __pyx_v_t; -- char *__pyx_v_f; -- PyArray_Descr *__pyx_v_descr = 0; -- int __pyx_v_offset; -- int __pyx_r; -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { -+ PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- int __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- int __pyx_t_4; -- int __pyx_t_5; -- int __pyx_t_6; -- PyArray_Descr *__pyx_t_7; -- PyObject *__pyx_t_8 = NULL; -- char *__pyx_t_9; -+ PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; -- if (__pyx_v_info == NULL) { -- PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); -- return -1; -- } -- __Pyx_RefNannySetupContext("__getbuffer__", 0); -- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); -- __Pyx_GIVEREF(__pyx_v_info->obj); -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":265 -- * -- * cdef int i, ndim -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":736 - * -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":266 -- * cdef int i, ndim -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew1(a): -+ * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< - * -- * ndim = PyArray_NDIM(self) -+ * cdef inline object PyArray_MultiIterNew2(a, b): - */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":268 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 -+ * ctypedef npy_cdouble complex_t - * -- * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(1, a) - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) - */ -- __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L4_bool_binop_done; -- } -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":271 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 -+ * return PyArray_MultiIterNew(1, a) - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not C contiguous") -+ * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(2, a, b) - * - */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L4_bool_binop_done:; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":739 - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 272, __pyx_L1_error) -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -+ * cdef inline object PyArray_MultiIterNew2(a, b): -+ * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): - */ -- } -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 -+ * return PyArray_MultiIterNew(1, a) -+ * -+ * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(2, a, b) - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") - */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L7_bool_binop_done; -- } - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":275 -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 -+ * return PyArray_MultiIterNew(2, a, b) - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not Fortran contiguous") -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(3, a, b, c) - * - */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L7_bool_binop_done:; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":742 - * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 276, __pyx_L1_error) -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): -+ * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - */ -- } -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":278 -- * raise ValueError(u"ndarray is not Fortran contiguous") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 -+ * return PyArray_MultiIterNew(2, a, b) - * -- * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":279 -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(3, a, b, c) - * -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * # Allocate new buffer for strides and shape info. -- */ -- __pyx_v_info->ndim = __pyx_v_ndim; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. - */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":283 -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- */ -- __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":284 -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim # <<<<<<<<<<<<<< -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- */ -- __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":285 -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim -- * for i in range(ndim): # <<<<<<<<<<<<<< -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] -- */ -- __pyx_t_4 = __pyx_v_ndim; -- __pyx_t_5 = __pyx_t_4; -- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { -- __pyx_v_i = __pyx_t_6; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":286 -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- */ -- (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":287 -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< -- * else: -- * info.strides = PyArray_STRIDES(self) -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 -+ * return PyArray_MultiIterNew(3, a, b, c) -+ * -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(4, a, b, c, d) -+ * - */ -- (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); -- } - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- goto __pyx_L9; -- } -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":289 -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":745 -+ * -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -+ * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -+ * -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - */ -- /*else*/ { -- __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":290 -- * else: -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 -+ * return PyArray_MultiIterNew(3, a, b, c) -+ * -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(4, a, b, c, d) -+ * - */ -- __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); -- } -- __pyx_L9:; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":291 -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL # <<<<<<<<<<<<<< -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) -- */ -- __pyx_v_info->suboffsets = NULL; -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":292 -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< -- * info.readonly = not PyArray_ISWRITEABLE(self) -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 -+ * return PyArray_MultiIterNew(4, a, b, c, d) - * -- */ -- __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":293 -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * cdef int t - */ -- __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":296 -- * -- * cdef int t -- * cdef char* f = NULL # <<<<<<<<<<<<<< -- * cdef dtype descr = PyArray_DESCR(self) -- * cdef int offset -- */ -- __pyx_v_f = NULL; -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":297 -- * cdef int t -- * cdef char* f = NULL -- * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< -- * cdef int offset -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":748 -+ * -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< - * -+ * cdef inline tuple PyDataType_SHAPE(dtype d): - */ -- __pyx_t_7 = PyArray_DESCR(__pyx_v_self); -- __pyx_t_3 = ((PyObject *)__pyx_t_7); -- __Pyx_INCREF(__pyx_t_3); -- __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); -- __pyx_t_3 = 0; -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":300 -- * cdef int offset -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 -+ * return PyArray_MultiIterNew(4, a, b, c, d) - * -- * info.obj = self # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(descr): -- */ -- __Pyx_INCREF(((PyObject *)__pyx_v_self)); -- __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); -- __pyx_v_info->obj = ((PyObject *)__pyx_v_self); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); -- if (__pyx_t_1) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":303 -- * -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num # <<<<<<<<<<<<<< -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- */ -- __pyx_t_4 = __pyx_v_descr->type_num; -- __pyx_v_t = __pyx_t_4; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); -- if (!__pyx_t_2) { -- goto __pyx_L15_next_or; -- } else { -- } -- __pyx_t_2 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_L15_next_or:; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":305 -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L14_bool_binop_done:; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 306, __pyx_L1_error) -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":307 -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- */ -- switch (__pyx_v_t) { -- case NPY_BYTE: -- __pyx_v_f = ((char *)"b"); -- break; -- case NPY_UBYTE: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":308 -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- */ -- __pyx_v_f = ((char *)"B"); -- break; -- case NPY_SHORT: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":309 -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- */ -- __pyx_v_f = ((char *)"h"); -- break; -- case NPY_USHORT: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":310 -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- */ -- __pyx_v_f = ((char *)"H"); -- break; -- case NPY_INT: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":311 -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- */ -- __pyx_v_f = ((char *)"i"); -- break; -- case NPY_UINT: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":312 -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- */ -- __pyx_v_f = ((char *)"I"); -- break; -- case NPY_LONG: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":313 -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- */ -- __pyx_v_f = ((char *)"l"); -- break; -- case NPY_ULONG: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":314 -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- */ -- __pyx_v_f = ((char *)"L"); -- break; -- case NPY_LONGLONG: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":315 -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- */ -- __pyx_v_f = ((char *)"q"); -- break; -- case NPY_ULONGLONG: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":316 -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- */ -- __pyx_v_f = ((char *)"Q"); -- break; -- case NPY_FLOAT: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":317 -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- */ -- __pyx_v_f = ((char *)"f"); -- break; -- case NPY_DOUBLE: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":318 -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- */ -- __pyx_v_f = ((char *)"d"); -- break; -- case NPY_LONGDOUBLE: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":319 -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- */ -- __pyx_v_f = ((char *)"g"); -- break; -- case NPY_CFLOAT: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":320 -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- */ -- __pyx_v_f = ((char *)"Zf"); -- break; -- case NPY_CDOUBLE: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":321 -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" -- */ -- __pyx_v_f = ((char *)"Zd"); -- break; -- case NPY_CLONGDOUBLE: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":322 -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f = "O" -- * else: -- */ -- __pyx_v_f = ((char *)"Zg"); -- break; -- case NPY_OBJECT: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":323 -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_v_f = ((char *)"O"); -- break; -- default: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":325 -- * elif t == NPY_OBJECT: f = "O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * info.format = f -- * return -- */ -- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_8); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 325, __pyx_L1_error) -- break; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":326 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f # <<<<<<<<<<<<<< -- * return -- * else: -- */ -- __pyx_v_info->format = __pyx_v_f; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":327 -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f -- * return # <<<<<<<<<<<<<< -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- */ -- __pyx_r = 0; -- goto __pyx_L0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":329 -- * return -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- */ -- /*else*/ { -- __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":330 -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, -- */ -- (__pyx_v_info->format[0]) = '^'; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":331 -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 # <<<<<<<<<<<<<< -- * f = _util_dtypestring(descr, info.format + 1, -- * info.format + _buffer_format_string_len, -- */ -- __pyx_v_offset = 0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":332 -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< -- * info.format + _buffer_format_string_len, -- * &offset) -- */ -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":335 -- * info.format + _buffer_format_string_len, -- * &offset) -- * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- */ -- (__pyx_v_f[0]) = '\x00'; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- -- /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; -- if (__pyx_v_info->obj != NULL) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- goto __pyx_L2; -- __pyx_L0:; -- if (__pyx_v_info->obj == Py_None) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- __pyx_L2:; -- __Pyx_XDECREF((PyObject *)__pyx_v_descr); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); -- __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("__releasebuffer__", 0); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); -- if (__pyx_t_1) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":339 -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) -- */ -- PyObject_Free(__pyx_v_info->format); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":341 -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) # <<<<<<<<<<<<<< -- * # info.shape was stored after info.strides in the same block -- * -- */ -- PyObject_Free(__pyx_v_info->strides); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":820 -- * ctypedef npy_cdouble complex_t -- * -- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(1, a) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- int __pyx_lineno = 0; -- const char *__pyx_filename = NULL; -- int __pyx_clineno = 0; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":821 -- * -- * cdef inline object PyArray_MultiIterNew1(a): -- * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 821, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":820 -- * ctypedef npy_cdouble complex_t -- * -- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(1, a) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":823 -- * return PyArray_MultiIterNew(1, a) -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(2, a, b) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- int __pyx_lineno = 0; -- const char *__pyx_filename = NULL; -- int __pyx_clineno = 0; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":824 -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): -- * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 824, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":823 -- * return PyArray_MultiIterNew(1, a) -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(2, a, b) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":826 -- * return PyArray_MultiIterNew(2, a, b) -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- int __pyx_lineno = 0; -- const char *__pyx_filename = NULL; -- int __pyx_clineno = 0; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":827 -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): -- * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 827, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":826 -- * return PyArray_MultiIterNew(2, a, b) -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":829 -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- int __pyx_lineno = 0; -- const char *__pyx_filename = NULL; -- int __pyx_clineno = 0; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":830 -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -- * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 830, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":829 -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":832 -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- int __pyx_lineno = 0; -- const char *__pyx_filename = NULL; -- int __pyx_clineno = 0; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":833 -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -- * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 833, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":832 -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":835 -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":836 -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -- * return d.subarray.shape -- * else: -- */ -- __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); -- if (__pyx_t_1) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":837 -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape # <<<<<<<<<<<<<< -- * else: -- * return () -- */ -- __Pyx_XDECREF(__pyx_r); -- __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); -- __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); -- goto __pyx_L0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":836 -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -- * return d.subarray.shape -- * else: -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":839 -- * return d.subarray.shape -- * else: -- * return () # <<<<<<<<<<<<<< -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: -- */ -- /*else*/ { -- __Pyx_XDECREF(__pyx_r); -- __Pyx_INCREF(__pyx_empty_tuple); -- __pyx_r = __pyx_empty_tuple; -- goto __pyx_L0; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":835 -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape -- */ -- -- /* function exit code */ -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":841 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { -- PyArray_Descr *__pyx_v_child = 0; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- PyObject *__pyx_v_fields = 0; -- PyObject *__pyx_v_childname = NULL; -- PyObject *__pyx_v_new_offset = NULL; -- PyObject *__pyx_v_t = NULL; -- char *__pyx_r; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- Py_ssize_t __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- PyObject *__pyx_t_4 = NULL; -- int __pyx_t_5; -- int __pyx_t_6; -- int __pyx_t_7; -- long __pyx_t_8; -- char *__pyx_t_9; -- int __pyx_lineno = 0; -- const char *__pyx_filename = NULL; -- int __pyx_clineno = 0; -- __Pyx_RefNannySetupContext("_util_dtypestring", 0); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":846 -- * -- * cdef dtype child -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * cdef tuple fields -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":847 -- * cdef dtype child -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * cdef tuple fields -- * -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":850 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- if (unlikely(__pyx_v_descr->names == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -- __PYX_ERR(2, 850, __pyx_L1_error) -- } -- __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; -- for (;;) { -- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 850, __pyx_L1_error) -- #else -- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 850, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- #endif -- __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * -- * for childname in descr.names: -- * fields = descr.fields[childname] # <<<<<<<<<<<<<< -- * child, new_offset = fields -- * -- */ -- if (unlikely(__pyx_v_descr->fields == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); -- __PYX_ERR(2, 851, __pyx_L1_error) -- } -- __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 851, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); -- __pyx_t_3 = 0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":852 -- * for childname in descr.names: -- * fields = descr.fields[childname] -- * child, new_offset = fields # <<<<<<<<<<<<<< -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- */ -- if (likely(__pyx_v_fields != Py_None)) { -- PyObject* sequence = __pyx_v_fields; -- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); -- if (unlikely(size != 2)) { -- if (size > 2) __Pyx_RaiseTooManyValuesError(2); -- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); -- __PYX_ERR(2, 852, __pyx_L1_error) -- } -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); -- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); -- __Pyx_INCREF(__pyx_t_3); -- __Pyx_INCREF(__pyx_t_4); -- #else -- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- #endif -- } else { -- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 852, __pyx_L1_error) -- } -- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); -- __pyx_t_3 = 0; -- __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":854 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 854, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 854, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 854, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 855, __pyx_L1_error) -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":854 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":857 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); -- if (!__pyx_t_7) { -- goto __pyx_L8_next_or; -- } else { -- } -- __pyx_t_7 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_L8_next_or:; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * # One could encode it in the format string and have Cython -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); -- if (__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_6 = __pyx_t_7; -- __pyx_L7_bool_binop_done:; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":857 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_6)) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":859 -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * # One could encode it in the format string and have Cython -- * # complain instead, BUT: < and > in format strings also imply -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 859, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 859, __pyx_L1_error) -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":857 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":869 -- * -- * # Output padding bytes -- * while offset[0] < new_offset: # <<<<<<<<<<<<<< -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- */ -- while (1) { -- __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 869, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 869, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 869, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (!__pyx_t_6) break; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":870 -- * # Output padding bytes -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< -- * f += 1 -- * offset[0] += 1 -- */ -- (__pyx_v_f[0]) = 0x78; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":871 -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte -- * f += 1 # <<<<<<<<<<<<<< -- * offset[0] += 1 -- * -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":872 -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- * offset[0] += 1 # <<<<<<<<<<<<<< -- * -- * offset[0] += child.itemsize -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":874 -- * offset[0] += 1 -- * -- * offset[0] += child.itemsize # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(child): -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":876 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); -- if (__pyx_t_6) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num # <<<<<<<<<<<<<< -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 877, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":878 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 879, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 879, __pyx_L1_error) -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":878 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- } -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":882 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 882, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 882, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 882, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 98; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":883 -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 66; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":884 -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x68; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":885 -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 72; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":886 -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x69; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":887 -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 73; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":888 -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x6C; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":889 -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 76; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":890 -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x71; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":891 -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 81; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":892 -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x66; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":893 -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x64; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":894 -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x67; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":895 -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x66; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":896 -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x64; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":897 -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x67; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":898 -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -+ * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape - */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (likely(__pyx_t_6)) { -- (__pyx_v_f[0]) = 79; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":900 -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * f += 1 -- * else: -- */ -- /*else*/ { -- __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 900, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 900, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 900, __pyx_L1_error) -- } -- __pyx_L15:; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":901 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * f += 1 # <<<<<<<<<<<<<< -- * else: -- * # Cython ignores struct boundary information ("T{...}"), -- */ -- __pyx_v_f = (__pyx_v_f + 1); -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ int __pyx_t_1; -+ __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":876 -- * offset[0] += child.itemsize -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -+ * return d.subarray.shape -+ * else: - */ -- goto __pyx_L13; -- } -+ __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); -+ if (__pyx_t_1) { - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":905 -- * # Cython ignores struct boundary information ("T{...}"), -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< -- * return f -- * -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":752 -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape # <<<<<<<<<<<<<< -+ * else: -+ * return () - */ -- /*else*/ { -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 905, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- } -- __pyx_L13:; -+ __Pyx_XDECREF(__pyx_r); -+ __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); -+ __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); -+ goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":850 -- * cdef tuple fields -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -+ * return d.subarray.shape -+ * else: - */ - } -- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":906 -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) -- * return f # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":754 -+ * return d.subarray.shape -+ * else: -+ * return () # <<<<<<<<<<<<<< - * - * - */ -- __pyx_r = __pyx_v_f; -- goto __pyx_L0; -+ /*else*/ { -+ __Pyx_XDECREF(__pyx_r); -+ __Pyx_INCREF(__pyx_empty_tuple); -+ __pyx_r = __pyx_empty_tuple; -+ goto __pyx_L0; -+ } - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":841 -- * return () -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -+ * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape - */ - - /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_4); -- __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = NULL; - __pyx_L0:; -- __Pyx_XDECREF((PyObject *)__pyx_v_child); -- __Pyx_XDECREF(__pyx_v_fields); -- __Pyx_XDECREF(__pyx_v_childname); -- __Pyx_XDECREF(__pyx_v_new_offset); -- __Pyx_XDECREF(__pyx_v_t); -+ __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1021 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -9341,7 +7776,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("set_array_base", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":930 - * - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< -@@ -9350,7 +7785,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - Py_INCREF(__pyx_v_base); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1023 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":931 - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< -@@ -9359,7 +7794,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1021 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -9371,7 +7806,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyFinishContext(); - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1025 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -9386,7 +7821,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - int __pyx_t_1; - __Pyx_RefNannySetupContext("get_array_base", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":934 - * - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< -@@ -9395,7 +7830,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - __pyx_v_base = PyArray_BASE(__pyx_v_arr); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1027 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -9405,7 +7840,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_t_1 = ((__pyx_v_base == NULL) != 0); - if (__pyx_t_1) { - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":936 - * base = PyArray_BASE(arr) - * if base is NULL: - * return None # <<<<<<<<<<<<<< -@@ -9416,7 +7851,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1027 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -9425,7 +7860,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - } - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1029 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":937 - * if base is NULL: - * return None - * return base # <<<<<<<<<<<<<< -@@ -9437,7 +7872,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = ((PyObject *)__pyx_v_base); - goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1025 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -9452,12 +7887,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - return __pyx_r; - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1033 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { -@@ -9476,11 +7911,11 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_array", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - { -@@ -9492,20 +7927,20 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":943 - * cdef inline int import_array() except -1: - * try: -- * _import_array() # <<<<<<<<<<<<<< -+ * __pyx_import_array() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") - */ -- __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1035, __pyx_L3_error) -+ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error) - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - } -@@ -9515,9 +7950,9 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1036 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":944 - * try: -- * _import_array() -+ * __pyx_import_array() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.multiarray failed to import") - * -@@ -9525,32 +7960,32 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1036, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1037 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1037, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1037, __pyx_L5_except_error) -+ __PYX_ERR(2, 945, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - __Pyx_XGIVEREF(__pyx_t_1); -@@ -9561,12 +7996,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_L8_try_end:; - } - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1033 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - /* function exit code */ -@@ -9584,7 +8019,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - return __pyx_r; - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1039 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -9608,7 +8043,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_umath", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -9624,16 +8059,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":949 - * cdef inline int import_umath() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1041, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error) - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -9647,7 +8082,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1042 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":950 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< -@@ -9657,28 +8092,28 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1042, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1043 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1043, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1043, __pyx_L5_except_error) -+ __PYX_ERR(2, 951, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -9693,7 +8128,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_L8_try_end:; - } - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1039 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -9716,7 +8151,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - return __pyx_r; - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1045 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -9740,7 +8175,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_ufunc", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -9756,16 +8191,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":955 - * cdef inline int import_ufunc() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1047, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error) - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -9779,69 +8214,246 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1048 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":956 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") -+ * - */ - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1048, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1049 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":957 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -+ * -+ * cdef extern from *: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1049, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1049, __pyx_L5_except_error) -+ __PYX_ERR(2, 957, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 -+ * -+ * cdef inline int import_ufunc() except -1: -+ * try: # <<<<<<<<<<<<<< -+ * _import_umath() -+ * except Exception: -+ */ -+ __Pyx_XGIVEREF(__pyx_t_1); -+ __Pyx_XGIVEREF(__pyx_t_2); -+ __Pyx_XGIVEREF(__pyx_t_3); -+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); -+ goto __pyx_L1_error; -+ __pyx_L8_try_end:; -+ } -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 -+ * raise ImportError("numpy.core.umath failed to import") -+ * -+ * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -+ * try: -+ * _import_umath() -+ */ -+ -+ /* function exit code */ -+ __pyx_r = 0; -+ goto __pyx_L0; -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_5); -+ __Pyx_XDECREF(__pyx_t_6); -+ __Pyx_XDECREF(__pyx_t_7); -+ __Pyx_XDECREF(__pyx_t_8); -+ __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = -1; -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_timedelta64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":979 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_datetime64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":994 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { -+ npy_datetime __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1004 -+ * also needed. That can be found using `get_datetime64_unit`. -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { -+ npy_timedelta __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1011 -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: -- * try: # <<<<<<<<<<<<<< -- * _import_umath() -- * except Exception: -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ -- __Pyx_XGIVEREF(__pyx_t_1); -- __Pyx_XGIVEREF(__pyx_t_2); -- __Pyx_XGIVEREF(__pyx_t_3); -- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); -- goto __pyx_L1_error; -- __pyx_L8_try_end:; -- } - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1045 -- * raise ImportError("numpy.core.umath failed to import") -+static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { -+ NPY_DATETIMEUNIT __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1018 -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ * """ -+ * return (obj).obmeta.base # <<<<<<<<<<<<<< -+ */ -+ __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - - /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_5); -- __Pyx_XDECREF(__pyx_t_6); -- __Pyx_XDECREF(__pyx_t_7); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; - __pyx_L0:; -- __Pyx_RefNannyFinishContext(); - return __pyx_r; - } - static struct __pyx_vtabstruct_4cylp_2cy_10CyCbcModel_CyCbcModel __pyx_vtable_4cylp_2cy_10CyCbcModel_CyCbcModel; -@@ -10184,6 +8796,9 @@ static PyTypeObject __pyx_type_4cylp_2cy_10CyCbcModel_CyCbcModel = { - #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 - 0, /*tp_print*/ - #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyMethodDef __pyx_methods[] = { -@@ -10236,14 +8851,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1}, - {&__pyx_n_s_CyCbcModel, __pyx_k_CyCbcModel, sizeof(__pyx_k_CyCbcModel), 0, 0, 1, 1}, - {&__pyx_n_s_CyLPSolution, __pyx_k_CyLPSolution, sizeof(__pyx_k_CyLPSolution), 0, 0, 1, 1}, -- {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, - {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, - {&__pyx_n_s_NodeCompareBase, __pyx_k_NodeCompareBase, sizeof(__pyx_k_NodeCompareBase), 0, 0, 1, 1}, -- {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, -- {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, - {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, -- {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_n_s_addCutGenerator, __pyx_k_addCutGenerator, sizeof(__pyx_k_addCutGenerator), 0, 0, 1, 1}, - {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, - {&__pyx_n_s_atSolution, __pyx_k_atSolution, sizeof(__pyx_k_atSolution), 0, 0, 1, 1}, -@@ -10272,8 +8882,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, - {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, - {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, -- {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, -- {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, - {&__pyx_n_s_newSolution, __pyx_k_newSolution, sizeof(__pyx_k_newSolution), 0, 0, 1, 1}, - {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, - {&__pyx_n_s_normal, __pyx_k_normal, sizeof(__pyx_k_normal), 0, 0, 1, 1}, -@@ -10298,7 +8906,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_kp_s_stopped_on_time, __pyx_k_stopped_on_time, sizeof(__pyx_k_stopped_on_time), 0, 0, 1, 0}, - {&__pyx_kp_s_stopped_on_user_event, __pyx_k_stopped_on_user_event, sizeof(__pyx_k_stopped_on_user_event), 0, 0, 1, 0}, - {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, -- {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, - {&__pyx_n_s_unset, __pyx_k_unset, sizeof(__pyx_k_unset), 0, 0, 1, 1}, - {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0}, - {&__pyx_n_s_varIndex, __pyx_k_varIndex, sizeof(__pyx_k_varIndex), 0, 0, 1, 1}, -@@ -10314,8 +8921,6 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 99, __pyx_L1_error) - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 112, __pyx_L1_error) - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 199, __pyx_L1_error) -- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error) -- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 855, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -@@ -10344,82 +8949,27 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_GOTREF(__pyx_tuple__3); - __Pyx_GIVEREF(__pyx_tuple__3); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__4); -- __Pyx_GIVEREF(__pyx_tuple__4); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__5); -- __Pyx_GIVEREF(__pyx_tuple__5); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__6); -- __Pyx_GIVEREF(__pyx_tuple__6); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__7); -- __Pyx_GIVEREF(__pyx_tuple__7); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 879, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__8); -- __Pyx_GIVEREF(__pyx_tuple__8); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1037 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 1037, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__9); -- __Pyx_GIVEREF(__pyx_tuple__9); -+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 945, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__4); -+ __Pyx_GIVEREF(__pyx_tuple__4); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1043 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 1043, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__10); -- __Pyx_GIVEREF(__pyx_tuple__10); -+ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 951, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__5); -+ __Pyx_GIVEREF(__pyx_tuple__5); - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -10527,18 +9077,38 @@ static int __Pyx_modinit_type_import_code(void) { - __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(5, 15, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) -+ __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error) -- __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error) -- __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error) -+ __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error) -+ __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error) -- __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 917, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error) -+ __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error) -+ __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error) -+ __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error) -+ __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error) -+ __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error) -+ __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error) -+ __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error) -+ __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error) -+ __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error) -+ __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error) -+ __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyCgl"); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 103, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); -@@ -10827,11 +9397,9 @@ if (!__Pyx_RefNanny) { - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ -- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS -- #ifdef WITH_THREAD /* Python build with threading support? */ -+ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - PyEval_InitThreads(); - #endif -- #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; -@@ -11097,12 +9665,12 @@ if (!__Pyx_RefNanny) { - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_7) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1045 -- * raise ImportError("numpy.core.umath failed to import") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - - /*--- Wrapped vars code ---*/ -@@ -11300,7 +9868,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #if CYTHON_COMPILING_IN_CPYTHON - static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; -- ternaryfunc call = func->ob_type->tp_call; -+ ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -@@ -11672,7 +10240,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec - if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { - return __Pyx_PyObject_CallMethO(func, arg); - #if CYTHON_FAST_PYCCALL -- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { -+ } else if (__Pyx_PyFastCFunction_Check(func)) { - return __Pyx_PyCFunction_FastCall(func, &arg, 1); - #endif - } -@@ -12142,61 +10710,6 @@ static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject* key) { - } - #endif - --/* DictGetItem */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { -- PyObject *value; -- value = PyDict_GetItemWithError(d, key); -- if (unlikely(!value)) { -- if (!PyErr_Occurred()) { -- if (unlikely(PyTuple_Check(key))) { -- PyObject* args = PyTuple_Pack(1, key); -- if (likely(args)) { -- PyErr_SetObject(PyExc_KeyError, args); -- Py_DECREF(args); -- } -- } else { -- PyErr_SetObject(PyExc_KeyError, key); -- } -- } -- return NULL; -- } -- Py_INCREF(value); -- return value; --} --#endif -- --/* RaiseTooManyValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { -- PyErr_Format(PyExc_ValueError, -- "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); --} -- --/* RaiseNeedMoreValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { -- PyErr_Format(PyExc_ValueError, -- "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", -- index, (index == 1) ? "" : "s"); --} -- --/* RaiseNoneIterError */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); --} -- --/* ExtTypeTest */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { -- if (unlikely(!type)) { -- PyErr_SetString(PyExc_SystemError, "Missing type object"); -- return 0; -- } -- if (likely(__Pyx_TypeCheck(obj, type))) -- return 1; -- PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", -- Py_TYPE(obj)->tp_name, type->tp_name); -- return 0; --} -- - /* GetTopmostException */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * -@@ -12718,7 +11231,7 @@ static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int - } - if (!use_cline) { - c_line = 0; -- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); -+ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; -@@ -12815,30 +11328,31 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { -- PyCodeObject *py_code = 0; -- PyObject *py_srcfile = 0; -- PyObject *py_funcname = 0; -+ PyCodeObject *py_code = NULL; -+ PyObject *py_funcname = NULL; - #if PY_MAJOR_VERSION < 3 -+ PyObject *py_srcfile = NULL; - py_srcfile = PyString_FromString(filename); -- #else -- py_srcfile = PyUnicode_FromString(filename); -- #endif - if (!py_srcfile) goto bad; -+ #endif - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; -+ funcname = PyUnicode_AsUTF8(py_funcname); -+ if (!funcname) goto bad; - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); -- #else -- py_funcname = PyUnicode_FromString(funcname); -+ if (!py_funcname) goto bad; - #endif - } -- if (!py_funcname) goto bad; -+ #if PY_MAJOR_VERSION < 3 - py_code = __Pyx_PyCode_New( - 0, - 0, -@@ -12857,11 +11371,16 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - __pyx_empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); -- Py_DECREF(py_funcname); -+ #else -+ py_code = PyCode_NewEmpty(filename, funcname, py_line); -+ #endif -+ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline - return py_code; - bad: -- Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -+ #if PY_MAJOR_VERSION < 3 -+ Py_XDECREF(py_srcfile); -+ #endif - return NULL; - } - static void __Pyx_AddTraceback(const char *funcname, int c_line, -@@ -12915,68 +11434,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - return (target_type) value;\ - } - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(int) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(int) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(int) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(int), -- little, !is_unsigned); -- } --} -- --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(long) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(long) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(long) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(long), -- little, !is_unsigned); -- } --} -- - /* Declarations */ - #if CYTHON_CCOMPLEX - #ifdef __cplusplus -@@ -13285,40 +11742,16 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - #endif - #endif - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { -- const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(enum NPY_TYPES) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(enum NPY_TYPES) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), -- little, !is_unsigned); -- } --} -- - /* CIntFromPy */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -13505,9 +11938,92 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - return (int) -1; - } - -+/* CIntToPy */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif -+ const int is_unsigned = neg_one > const_zero; -+ if (is_unsigned) { -+ if (sizeof(int) < sizeof(long)) { -+ return PyInt_FromLong((long) value); -+ } else if (sizeof(int) <= sizeof(unsigned long)) { -+ return PyLong_FromUnsignedLong((unsigned long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+#endif -+ } -+ } else { -+ if (sizeof(int) <= sizeof(long)) { -+ return PyInt_FromLong((long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ return PyLong_FromLongLong((PY_LONG_LONG) value); -+#endif -+ } -+ } -+ { -+ int one = 1; int little = (int)*(unsigned char *)&one; -+ unsigned char *bytes = (unsigned char *)&value; -+ return _PyLong_FromByteArray(bytes, sizeof(int), -+ little, !is_unsigned); -+ } -+} -+ -+/* CIntToPy */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif -+ const int is_unsigned = neg_one > const_zero; -+ if (is_unsigned) { -+ if (sizeof(long) < sizeof(long)) { -+ return PyInt_FromLong((long) value); -+ } else if (sizeof(long) <= sizeof(unsigned long)) { -+ return PyLong_FromUnsignedLong((unsigned long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+#endif -+ } -+ } else { -+ if (sizeof(long) <= sizeof(long)) { -+ return PyInt_FromLong((long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -+ return PyLong_FromLongLong((PY_LONG_LONG) value); -+#endif -+ } -+ } -+ { -+ int one = 1; int little = (int)*(unsigned char *)&one; -+ unsigned char *bytes = (unsigned char *)&value; -+ return _PyLong_FromByteArray(bytes, sizeof(long), -+ little, !is_unsigned); -+ } -+} -+ - /* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -14058,6 +12574,23 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_DECREF(x); - return ival; - } -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { -+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { -+ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); -+#if PY_MAJOR_VERSION < 3 -+ } else if (likely(PyInt_CheckExact(o))) { -+ return PyInt_AS_LONG(o); -+#endif -+ } else { -+ Py_ssize_t ival; -+ PyObject *x; -+ x = PyNumber_Index(o); -+ if (!x) return -1; -+ ival = PyInt_AsLong(x); -+ Py_DECREF(x); -+ return ival; -+ } -+} - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); - } -diff --git a/cylp/cy/CyCbcNode.cpp b/cylp/cy/CyCbcNode.cpp -index a50a01a..c6b7608 100644 ---- a/cylp/cy/CyCbcNode.cpp -+++ b/cylp/cy/CyCbcNode.cpp -@@ -1,14 +1,16 @@ --/* Generated by Cython 0.29.12 */ -+/* Generated by Cython 0.29.25 */ - -+#ifndef PY_SSIZE_T_CLEAN - #define PY_SSIZE_T_CLEAN -+#endif /* PY_SSIZE_T_CLEAN */ - #include "Python.h" - #ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. - #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. - #else --#define CYTHON_ABI "0_29_12" --#define CYTHON_HEX_VERSION 0x001D0CF0 -+#define CYTHON_ABI "0_29_25" -+#define CYTHON_HEX_VERSION 0x001D19F0 - #define CYTHON_FUTURE_DIVISION 0 - #include - #ifndef offsetof -@@ -155,7 +157,7 @@ - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif -- #if PY_VERSION_HEX < 0x030300F0 -+ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) -@@ -174,7 +176,7 @@ - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL -- #define CYTHON_FAST_PYCALL 1 -+ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1) - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) -@@ -193,7 +195,9 @@ - #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) - #endif - #if CYTHON_USE_PYLONG_INTERNALS -- #include "longintrepr.h" -+ #if PY_MAJOR_VERSION < 3 -+ #include "longintrepr.h" -+ #endif - #undef SHIFT - #undef BASE - #undef MASK -@@ -324,9 +328,68 @@ class __Pyx_FakeReference { - #define __Pyx_DefaultClassType PyClass_Type - #else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" --#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 -- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ -- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -+ #define __Pyx_DefaultClassType PyType_Type -+#if PY_VERSION_HEX >= 0x030B00A1 -+ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, -+ PyObject *code, PyObject *c, PyObject* n, PyObject *v, -+ PyObject *fv, PyObject *cell, PyObject* fn, -+ PyObject *name, int fline, PyObject *lnos) { -+ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; -+ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; -+ const char *fn_cstr=NULL; -+ const char *name_cstr=NULL; -+ PyCodeObject* co=NULL; -+ PyObject *type, *value, *traceback; -+ PyErr_Fetch(&type, &value, &traceback); -+ if (!(kwds=PyDict_New())) goto end; -+ if (!(argcount=PyLong_FromLong(a))) goto end; -+ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; -+ if (!(posonlyargcount=PyLong_FromLong(0))) goto end; -+ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; -+ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; -+ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; -+ if (!(nlocals=PyLong_FromLong(l))) goto end; -+ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; -+ if (!(stacksize=PyLong_FromLong(s))) goto end; -+ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; -+ if (!(flags=PyLong_FromLong(f))) goto end; -+ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; -+ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; -+ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; -+ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; -+ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; -+ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here -+ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; -+ Py_XDECREF((PyObject*)co); -+ co = (PyCodeObject*)call_result; -+ call_result = NULL; -+ if (0) { -+ cleanup_code_too: -+ Py_XDECREF((PyObject*)co); -+ co = NULL; -+ } -+ end: -+ Py_XDECREF(kwds); -+ Py_XDECREF(argcount); -+ Py_XDECREF(posonlyargcount); -+ Py_XDECREF(kwonlyargcount); -+ Py_XDECREF(nlocals); -+ Py_XDECREF(stacksize); -+ Py_XDECREF(replace); -+ Py_XDECREF(call_result); -+ Py_XDECREF(empty); -+ if (type) { -+ PyErr_Restore(type, value, traceback); -+ } -+ return co; -+ } - #else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -@@ -440,8 +503,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #endif - #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 -+ #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) -+ #else -+ #define __Pyx_PyUnicode_READY(op) (0) -+ #endif - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) -@@ -449,7 +516,15 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) -+ #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) -+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) -+ #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) -+ #endif -+ #else -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) -+ #endif - #else - #define CYTHON_PEP393_ENABLED 0 - #define PyUnicode_1BYTE_KIND 1 -@@ -498,8 +573,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define PyString_Type PyUnicode_Type - #define PyString_Check PyUnicode_Check - #define PyString_CheckExact PyUnicode_CheckExact -+#ifndef PyObject_Unicode - #define PyObject_Unicode PyObject_Str - #endif -+#endif - #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) - #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) -@@ -510,6 +587,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #ifndef PySet_CheckExact - #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) - #endif -+#if PY_VERSION_HEX >= 0x030900A4 -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) -+#else -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) -+#endif - #if CYTHON_ASSUME_SAFE_MACROS - #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) - #else -@@ -543,13 +627,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong -- #define __Pyx_PyInt_AsHash_t PyInt_AsLong -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t - #else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t -- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t - #endif - #if PY_MAJOR_VERSION >= 3 -- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) -+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) - #else - #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) - #endif -@@ -590,11 +674,10 @@ static CYTHON_INLINE float __PYX_NAN() { - #define __Pyx_truncl truncl - #endif - -- -+#define __PYX_MARK_ERR_POS(f_index, lineno) \ -+ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } - #define __PYX_ERR(f_index, lineno, Ln_error) \ --{ \ -- __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ --} -+ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } - - #ifndef __PYX_EXTERN_C - #ifdef __cplusplus -@@ -610,7 +693,13 @@ static CYTHON_INLINE float __PYX_NAN() { - #include - #include - #include "numpy/arrayobject.h" -+#include "numpy/ndarrayobject.h" -+#include "numpy/ndarraytypes.h" -+#include "numpy/arrayscalars.h" - #include "numpy/ufuncobject.h" -+ -+ /* NumPy API declarations from "numpy/__init__.pxd" */ -+ - #include "ICbcNode.hpp" - #ifdef _OPENMP - #include -@@ -708,6 +797,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); - static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); - #if CYTHON_ASSUME_SAFE_MACROS - #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) - #else -@@ -843,12 +933,12 @@ static const char *__pyx_filename; - - static const char *__pyx_f[] = { - "stringsource", -- "cylp\\cy\\CyCbcNode.pyx", -+ "cylp/cy/CyCbcNode.pyx", - "__init__.pxd", - "type.pxd", - }; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":776 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":690 - * # in Cython to enable them only on the right systems. - * - * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< -@@ -857,7 +947,7 @@ static const char *__pyx_f[] = { - */ - typedef npy_int8 __pyx_t_5numpy_int8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":777 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":691 - * - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< -@@ -866,7 +956,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; - */ - typedef npy_int16 __pyx_t_5numpy_int16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":778 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":692 - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< -@@ -875,7 +965,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; - */ - typedef npy_int32 __pyx_t_5numpy_int32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":779 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":693 - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t - * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< -@@ -884,7 +974,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; - */ - typedef npy_int64 __pyx_t_5numpy_int64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":783 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":697 - * #ctypedef npy_int128 int128_t - * - * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< -@@ -893,7 +983,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; - */ - typedef npy_uint8 __pyx_t_5numpy_uint8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":784 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":698 - * - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< -@@ -902,7 +992,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; - */ - typedef npy_uint16 __pyx_t_5numpy_uint16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":785 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":699 - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< -@@ -911,7 +1001,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; - */ - typedef npy_uint32 __pyx_t_5numpy_uint32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":786 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":700 - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t - * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< -@@ -920,7 +1010,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; - */ - typedef npy_uint64 __pyx_t_5numpy_uint64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":790 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":704 - * #ctypedef npy_uint128 uint128_t - * - * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< -@@ -929,7 +1019,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; - */ - typedef npy_float32 __pyx_t_5numpy_float32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":791 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":705 - * - * ctypedef npy_float32 float32_t - * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< -@@ -938,7 +1028,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; - */ - typedef npy_float64 __pyx_t_5numpy_float64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":800 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":714 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< -@@ -947,7 +1037,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; - */ - typedef npy_long __pyx_t_5numpy_int_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":801 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":715 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< -@@ -956,7 +1046,7 @@ typedef npy_long __pyx_t_5numpy_int_t; - */ - typedef npy_longlong __pyx_t_5numpy_long_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":802 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":716 - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t - * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< -@@ -965,7 +1055,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; - */ - typedef npy_longlong __pyx_t_5numpy_longlong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":804 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":718 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< -@@ -974,7 +1064,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; - */ - typedef npy_ulong __pyx_t_5numpy_uint_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":805 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":719 - * - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< -@@ -983,7 +1073,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":806 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":720 - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t - * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< -@@ -992,7 +1082,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":808 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":722 - * ctypedef npy_ulonglong ulonglong_t - * - * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< -@@ -1001,7 +1091,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - */ - typedef npy_intp __pyx_t_5numpy_intp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":809 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":723 - * - * ctypedef npy_intp intp_t - * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< -@@ -1010,7 +1100,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; - */ - typedef npy_uintp __pyx_t_5numpy_uintp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":811 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":725 - * ctypedef npy_uintp uintp_t - * - * ctypedef npy_double float_t # <<<<<<<<<<<<<< -@@ -1019,7 +1109,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; - */ - typedef npy_double __pyx_t_5numpy_float_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":812 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":726 - * - * ctypedef npy_double float_t - * ctypedef npy_double double_t # <<<<<<<<<<<<<< -@@ -1028,7 +1118,7 @@ typedef npy_double __pyx_t_5numpy_float_t; - */ - typedef npy_double __pyx_t_5numpy_double_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":813 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":727 - * ctypedef npy_double float_t - * ctypedef npy_double double_t - * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< -@@ -1064,7 +1154,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(do - /*--- Type declarations ---*/ - struct __pyx_obj_4cylp_2cy_9CyCbcNode_CyCbcNode; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":815 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":729 - * ctypedef npy_longdouble longdouble_t - * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< -@@ -1073,7 +1163,7 @@ struct __pyx_obj_4cylp_2cy_9CyCbcNode_CyCbcNode; - */ - typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":816 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":730 - * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< -@@ -1082,7 +1172,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - */ - typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":817 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":731 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< -@@ -1091,7 +1181,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - */ - typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":819 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":733 - * ctypedef npy_clongdouble clongdouble_t - * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< -@@ -1261,67 +1351,6 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - /* RaiseException.proto */ - static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); - --/* PyCFunctionFastCall.proto */ --#if CYTHON_FAST_PYCCALL --static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); --#else --#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) --#endif -- --/* PyFunctionFastCall.proto */ --#if CYTHON_FAST_PYCALL --#define __Pyx_PyFunction_FastCall(func, args, nargs)\ -- __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) --#if 1 || PY_VERSION_HEX < 0x030600B1 --static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); --#else --#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) --#endif --#define __Pyx_BUILD_ASSERT_EXPR(cond)\ -- (sizeof(char [1 - 2*!(cond)]) - 1) --#ifndef Py_MEMBER_SIZE --#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) --#endif -- static size_t __pyx_pyframe_localsplus_offset = 0; -- #include "frameobject.h" -- #define __Pxy_PyFrame_Initialize_Offsets()\ -- ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ -- (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) -- #define __Pyx_PyFrame_GetLocalsplus(frame)\ -- (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) --#endif -- --/* PyObjectCallMethO.proto */ --#if CYTHON_COMPILING_IN_CPYTHON --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); --#endif -- --/* PyObjectCallOneArg.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); -- --/* DictGetItem.proto */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); --#define __Pyx_PyObject_Dict_GetItem(obj, name)\ -- (likely(PyDict_CheckExact(obj)) ?\ -- __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) --#else --#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) --#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) --#endif -- --/* RaiseTooManyValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); -- --/* RaiseNeedMoreValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); -- --/* RaiseNoneIterError.proto */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -- --/* ExtTypeTest.proto */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); -- - /* GetTopmostException.proto */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); -@@ -1371,6 +1400,9 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - /* SetVTable.proto */ - static int __Pyx_SetVtable(PyObject *dict, void *vtable); - -+/* PyObjectGetAttrStrNoError.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); -+ - /* SetupReduce.proto */ - static int __Pyx_setup_reduce(PyObject* type_obj); - -@@ -1479,8 +1511,10 @@ static void __Pyx_CppExn2PyErr() { - } - #endif - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -+/* GCCDiagnostics.proto */ -+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -+#define __Pyx_HAS_GCC_DIAGNOSTIC -+#endif - - /* RealImag.proto */ - #if CYTHON_CCOMPLEX -@@ -1581,10 +1615,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); - #endif - - /* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); -- --/* CIntFromPy.proto */ --static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); - - /* CIntToPy.proto */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); -@@ -1592,6 +1623,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); - /* CIntFromPy.proto */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); - -+/* CIntFromPy.proto */ -+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); -+ - /* FastTypeChecks.proto */ - #if CYTHON_COMPILING_IN_CPYTHON - #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) -@@ -1639,8 +1673,17 @@ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; - static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; - static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; - static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -+static PyTypeObject *__pyx_ptype_5numpy_generic = 0; -+static PyTypeObject *__pyx_ptype_5numpy_number = 0; -+static PyTypeObject *__pyx_ptype_5numpy_integer = 0; -+static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; -+static PyTypeObject *__pyx_ptype_5numpy_floating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; -+static PyTypeObject *__pyx_ptype_5numpy_character = 0; - static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ - - /* Module declarations from 'cylp.cy.CyCbcNode' */ - static PyTypeObject *__pyx_ptype_4cylp_2cy_9CyCbcNode_CyCbcNode = 0; -@@ -1650,62 +1693,41 @@ int __pyx_module_is_main_cylp__cy__CyCbcNode = 0; - - /* Implementation of 'cylp.cy.CyCbcNode' */ - static PyObject *__pyx_builtin_TypeError; --static PyObject *__pyx_builtin_ValueError; --static PyObject *__pyx_builtin_range; --static PyObject *__pyx_builtin_RuntimeError; - static PyObject *__pyx_builtin_ImportError; - static const char __pyx_k_main[] = "__main__"; - static const char __pyx_k_name[] = "__name__"; - static const char __pyx_k_test[] = "__test__"; --static const char __pyx_k_range[] = "range"; - static const char __pyx_k_reduce[] = "__reduce__"; - static const char __pyx_k_getstate[] = "__getstate__"; - static const char __pyx_k_setstate[] = "__setstate__"; - static const char __pyx_k_CyCbcNode[] = "CyCbcNode"; - static const char __pyx_k_TypeError[] = "TypeError"; - static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; --static const char __pyx_k_ValueError[] = "ValueError"; - static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; - static const char __pyx_k_ImportError[] = "ImportError"; --static const char __pyx_k_RuntimeError[] = "RuntimeError"; - static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; - static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; - static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; --static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; - static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; --static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; --static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; --static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; --static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; - static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; - static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; --static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; - static PyObject *__pyx_n_s_CyCbcNode; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; - static PyObject *__pyx_n_s_ImportError; --static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; --static PyObject *__pyx_n_s_RuntimeError; - static PyObject *__pyx_n_s_TypeError; --static PyObject *__pyx_n_s_ValueError; - static PyObject *__pyx_n_s_cline_in_traceback; - static PyObject *__pyx_n_s_getstate; - static PyObject *__pyx_n_s_main; - static PyObject *__pyx_n_s_name; --static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; --static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; - static PyObject *__pyx_kp_s_no_default___reduce___due_to_non; - static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; - static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; - static PyObject *__pyx_n_s_pyx_vtable; --static PyObject *__pyx_n_s_range; - static PyObject *__pyx_n_s_reduce; - static PyObject *__pyx_n_s_reduce_cython; - static PyObject *__pyx_n_s_reduce_ex; - static PyObject *__pyx_n_s_setstate; - static PyObject *__pyx_n_s_setstate_cython; - static PyObject *__pyx_n_s_test; --static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; - static int __pyx_pf_4cylp_2cy_9CyCbcNode_9CyCbcNode___cinit__(struct __pyx_obj_4cylp_2cy_9CyCbcNode_CyCbcNode *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_9CyCbcNode_9CyCbcNode_5depth___get__(struct __pyx_obj_4cylp_2cy_9CyCbcNode_CyCbcNode *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_9CyCbcNode_9CyCbcNode_17numberUnsatisfied___get__(struct __pyx_obj_4cylp_2cy_9CyCbcNode_CyCbcNode *__pyx_v_self); /* proto */ -@@ -1716,18 +1738,11 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyCbcNode_9CyCbcNode_14objectiveValue___get - static PyObject *__pyx_pf_4cylp_2cy_9CyCbcNode_9CyCbcNode_2breakTie(struct __pyx_obj_4cylp_2cy_9CyCbcNode_CyCbcNode *__pyx_v_self, struct __pyx_obj_4cylp_2cy_9CyCbcNode_CyCbcNode *__pyx_v_y); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_9CyCbcNode_9CyCbcNode_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_9CyCbcNode_CyCbcNode *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_9CyCbcNode_9CyCbcNode_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_9CyCbcNode_CyCbcNode *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ - static PyObject *__pyx_tp_new_4cylp_2cy_9CyCbcNode_CyCbcNode(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ - static PyObject *__pyx_tuple_; - static PyObject *__pyx_tuple__2; - static PyObject *__pyx_tuple__3; - static PyObject *__pyx_tuple__4; --static PyObject *__pyx_tuple__5; --static PyObject *__pyx_tuple__6; --static PyObject *__pyx_tuple__7; --static PyObject *__pyx_tuple__8; --static PyObject *__pyx_tuple__9; - /* Late includes */ - - /* "cylp/cy/CyCbcNode.pyx":7 -@@ -1758,6 +1773,9 @@ static int __pyx_pf_4cylp_2cy_9CyCbcNode_9CyCbcNode___cinit__(struct __pyx_obj_4 - int __pyx_r; - __Pyx_RefNannyDeclarations - ICbcNode *__pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - - /* "cylp/cy/CyCbcNode.pyx":8 -@@ -1868,6 +1886,9 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyCbcNode_9CyCbcNode_5depth___get__(struct - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyCbcNode.pyx":16 -@@ -1928,6 +1949,9 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyCbcNode_9CyCbcNode_17numberUnsatisfied___ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyCbcNode.pyx":20 -@@ -1988,6 +2012,9 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyCbcNode_9CyCbcNode_18sumInfeasibilities__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyCbcNode.pyx":24 -@@ -2048,6 +2075,9 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyCbcNode_9CyCbcNode_6active___get__(struct - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyCbcNode.pyx":28 -@@ -2108,6 +2138,9 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyCbcNode_9CyCbcNode_6onTree___get__(struct - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyCbcNode.pyx":32 -@@ -2168,6 +2201,9 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyCbcNode_9CyCbcNode_14objectiveValue___get - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyCbcNode.pyx":36 -@@ -2214,6 +2250,9 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyCbcNode_9CyCbcNode_14objectiveValue___get - static PyObject *__pyx_pw_4cylp_2cy_9CyCbcNode_9CyCbcNode_3breakTie(PyObject *__pyx_v_self, PyObject *__pyx_v_y); /*proto*/ - static char __pyx_doc_4cylp_2cy_9CyCbcNode_9CyCbcNode_2breakTie[] = "CyCbcNode.breakTie(self, CyCbcNode y)"; - static PyObject *__pyx_pw_4cylp_2cy_9CyCbcNode_9CyCbcNode_3breakTie(PyObject *__pyx_v_self, PyObject *__pyx_v_y) { -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("breakTie (wrapper)", 0); -@@ -2233,6 +2272,9 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyCbcNode_9CyCbcNode_2breakTie(struct __pyx - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("breakTie", 0); - - /* "cylp/cy/CyCbcNode.pyx":39 -@@ -2289,6 +2331,9 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyCbcNode_9CyCbcNode_4__reduce_cython__(CYT - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -2344,6 +2389,9 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyCbcNode_9CyCbcNode_6__setstate_cython__(C - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -2374,1084 +2422,243 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyCbcNode_9CyCbcNode_6__setstate_cython__(C - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 -+ * ctypedef npy_cdouble complex_t -+ * -+ * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(1, a) -+ * - */ - --/* Python wrapper */ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); -- __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_v_i; -- int __pyx_v_ndim; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- int __pyx_v_t; -- char *__pyx_v_f; -- PyArray_Descr *__pyx_v_descr = 0; -- int __pyx_v_offset; -- int __pyx_r; -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { -+ PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- int __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- int __pyx_t_4; -- int __pyx_t_5; -- int __pyx_t_6; -- PyArray_Descr *__pyx_t_7; -- PyObject *__pyx_t_8 = NULL; -- char *__pyx_t_9; -- if (__pyx_v_info == NULL) { -- PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); -- return -1; -- } -- __Pyx_RefNannySetupContext("__getbuffer__", 0); -- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); -- __Pyx_GIVEREF(__pyx_v_info->obj); -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":265 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":736 - * -- * cdef int i, ndim -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":266 -- * cdef int i, ndim -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew1(a): -+ * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< - * -- * ndim = PyArray_NDIM(self) -+ * cdef inline object PyArray_MultiIterNew2(a, b): - */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":268 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 -+ * ctypedef npy_cdouble complex_t - * -- * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(1, a) - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) - */ -- __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L4_bool_binop_done; -- } -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":271 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 -+ * return PyArray_MultiIterNew(1, a) - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not C contiguous") -+ * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(2, a, b) - * - */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L4_bool_binop_done:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":739 - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 272, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -+ * cdef inline object PyArray_MultiIterNew2(a, b): -+ * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): - */ -- } -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 -+ * return PyArray_MultiIterNew(1, a) -+ * -+ * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(2, a, b) - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") - */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L7_bool_binop_done; -- } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":275 -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 -+ * return PyArray_MultiIterNew(2, a, b) - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not Fortran contiguous") -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(3, a, b, c) - * - */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L7_bool_binop_done:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":742 - * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 276, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): -+ * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - */ -- } -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":278 -- * raise ValueError(u"ndarray is not Fortran contiguous") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 -+ * return PyArray_MultiIterNew(2, a, b) - * -- * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":279 -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(3, a, b, c) - * -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * # Allocate new buffer for strides and shape info. - */ -- __pyx_v_info->ndim = __pyx_v_ndim; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":283 -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- */ -- __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":284 -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim # <<<<<<<<<<<<<< -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- */ -- __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":285 -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim -- * for i in range(ndim): # <<<<<<<<<<<<<< -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] -- */ -- __pyx_t_4 = __pyx_v_ndim; -- __pyx_t_5 = __pyx_t_4; -- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { -- __pyx_v_i = __pyx_t_6; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":286 -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- */ -- (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":287 -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< -- * else: -- * info.strides = PyArray_STRIDES(self) -- */ -- (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- goto __pyx_L9; -- } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":289 -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- */ -- /*else*/ { -- __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":290 -- * else: -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 -+ * return PyArray_MultiIterNew(3, a, b, c) -+ * -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(4, a, b, c, d) -+ * - */ -- __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); -- } -- __pyx_L9:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":291 -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL # <<<<<<<<<<<<<< -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) -- */ -- __pyx_v_info->suboffsets = NULL; -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":292 -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< -- * info.readonly = not PyArray_ISWRITEABLE(self) -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":745 - * -- */ -- __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":293 -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -+ * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< - * -- * cdef int t -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - */ -- __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":296 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 -+ * return PyArray_MultiIterNew(3, a, b, c) - * -- * cdef int t -- * cdef char* f = NULL # <<<<<<<<<<<<<< -- * cdef dtype descr = PyArray_DESCR(self) -- * cdef int offset -- */ -- __pyx_v_f = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":297 -- * cdef int t -- * cdef char* f = NULL -- * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< -- * cdef int offset -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(4, a, b, c, d) - * - */ -- __pyx_t_7 = PyArray_DESCR(__pyx_v_self); -- __pyx_t_3 = ((PyObject *)__pyx_t_7); -- __Pyx_INCREF(__pyx_t_3); -- __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); -- __pyx_t_3 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":300 -- * cdef int offset -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 -+ * return PyArray_MultiIterNew(4, a, b, c, d) - * -- * info.obj = self # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * if not PyDataType_HASFIELDS(descr): - */ -- __Pyx_INCREF(((PyObject *)__pyx_v_self)); -- __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); -- __pyx_v_info->obj = ((PyObject *)__pyx_v_self); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); -- if (__pyx_t_1) { -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":303 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":748 -+ * -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< - * -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num # <<<<<<<<<<<<<< -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -+ * cdef inline tuple PyDataType_SHAPE(dtype d): - */ -- __pyx_t_4 = __pyx_v_descr->type_num; -- __pyx_v_t = __pyx_t_4; -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); -- if (!__pyx_t_2) { -- goto __pyx_L15_next_or; -- } else { -- } -- __pyx_t_2 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_L15_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":305 -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L14_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 306, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":307 -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- */ -- switch (__pyx_v_t) { -- case NPY_BYTE: -- __pyx_v_f = ((char *)"b"); -- break; -- case NPY_UBYTE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":308 -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- */ -- __pyx_v_f = ((char *)"B"); -- break; -- case NPY_SHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":309 -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- */ -- __pyx_v_f = ((char *)"h"); -- break; -- case NPY_USHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":310 -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- */ -- __pyx_v_f = ((char *)"H"); -- break; -- case NPY_INT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":311 -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- */ -- __pyx_v_f = ((char *)"i"); -- break; -- case NPY_UINT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":312 -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- */ -- __pyx_v_f = ((char *)"I"); -- break; -- case NPY_LONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":313 -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- */ -- __pyx_v_f = ((char *)"l"); -- break; -- case NPY_ULONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":314 -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- */ -- __pyx_v_f = ((char *)"L"); -- break; -- case NPY_LONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":315 -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- */ -- __pyx_v_f = ((char *)"q"); -- break; -- case NPY_ULONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":316 -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- */ -- __pyx_v_f = ((char *)"Q"); -- break; -- case NPY_FLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":317 -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- */ -- __pyx_v_f = ((char *)"f"); -- break; -- case NPY_DOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":318 -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- */ -- __pyx_v_f = ((char *)"d"); -- break; -- case NPY_LONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":319 -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- */ -- __pyx_v_f = ((char *)"g"); -- break; -- case NPY_CFLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":320 -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- */ -- __pyx_v_f = ((char *)"Zf"); -- break; -- case NPY_CDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":321 -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" -- */ -- __pyx_v_f = ((char *)"Zd"); -- break; -- case NPY_CLONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":322 -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f = "O" -- * else: -- */ -- __pyx_v_f = ((char *)"Zg"); -- break; -- case NPY_OBJECT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":323 -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_v_f = ((char *)"O"); -- break; -- default: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":325 -- * elif t == NPY_OBJECT: f = "O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * info.format = f -- * return -- */ -- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_8); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 325, __pyx_L1_error) -- break; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":326 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f # <<<<<<<<<<<<<< -- * return -- * else: -- */ -- __pyx_v_info->format = __pyx_v_f; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":327 -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f -- * return # <<<<<<<<<<<<<< -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- */ -- __pyx_r = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":329 -- * return -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- */ -- /*else*/ { -- __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":330 -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, -- */ -- (__pyx_v_info->format[0]) = '^'; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":331 -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 # <<<<<<<<<<<<<< -- * f = _util_dtypestring(descr, info.format + 1, -- * info.format + _buffer_format_string_len, -- */ -- __pyx_v_offset = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":332 -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< -- * info.format + _buffer_format_string_len, -- * &offset) -- */ -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":335 -- * info.format + _buffer_format_string_len, -- * &offset) -- * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- */ -- (__pyx_v_f[0]) = '\x00'; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- -- /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; -- if (__pyx_v_info->obj != NULL) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- goto __pyx_L2; -- __pyx_L0:; -- if (__pyx_v_info->obj == Py_None) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- __pyx_L2:; -- __Pyx_XDECREF((PyObject *)__pyx_v_descr); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); -- __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("__releasebuffer__", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":339 -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) -- */ -- PyObject_Free(__pyx_v_info->format); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":341 -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) # <<<<<<<<<<<<<< -- * # info.shape was stored after info.strides in the same block -- * -- */ -- PyObject_Free(__pyx_v_info->strides); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -- * ctypedef npy_cdouble complex_t -- * -- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(1, a) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":822 -- * -- * cdef inline object PyArray_MultiIterNew1(a): -- * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -- * ctypedef npy_cdouble complex_t -- * -- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(1, a) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -- * return PyArray_MultiIterNew(1, a) -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(2, a, b) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":825 -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): -- * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -- * return PyArray_MultiIterNew(1, a) -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(2, a, b) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -- * return PyArray_MultiIterNew(2, a, b) -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":828 -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): -- * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -- * return PyArray_MultiIterNew(2, a, b) -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":831 -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -- * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":834 -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -- * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 -+ * return PyArray_MultiIterNew(4, a, b, c, d) -+ * -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) -+ * - */ - - /* function exit code */ -@@ -3465,7 +2672,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -3479,7 +2686,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - int __pyx_t_1; - __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -3489,7 +2696,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":838 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":752 - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): - * return d.subarray.shape # <<<<<<<<<<<<<< -@@ -3501,7 +2708,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -3510,12 +2717,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":840 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":754 - * return d.subarray.shape - * else: - * return () # <<<<<<<<<<<<<< - * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: -+ * - */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); -@@ -3524,768 +2731,22 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - goto __pyx_L0; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape -- */ -- -- /* function exit code */ -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { -- PyArray_Descr *__pyx_v_child = 0; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- PyObject *__pyx_v_fields = 0; -- PyObject *__pyx_v_childname = NULL; -- PyObject *__pyx_v_new_offset = NULL; -- PyObject *__pyx_v_t = NULL; -- char *__pyx_r; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- Py_ssize_t __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- PyObject *__pyx_t_4 = NULL; -- int __pyx_t_5; -- int __pyx_t_6; -- int __pyx_t_7; -- long __pyx_t_8; -- char *__pyx_t_9; -- __Pyx_RefNannySetupContext("_util_dtypestring", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":847 -- * -- * cdef dtype child -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * cdef tuple fields -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":848 -- * cdef dtype child -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * cdef tuple fields -- * -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- if (unlikely(__pyx_v_descr->names == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -- __PYX_ERR(2, 851, __pyx_L1_error) -- } -- __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; -- for (;;) { -- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 851, __pyx_L1_error) -- #else -- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- #endif -- __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":852 -- * -- * for childname in descr.names: -- * fields = descr.fields[childname] # <<<<<<<<<<<<<< -- * child, new_offset = fields -- * -- */ -- if (unlikely(__pyx_v_descr->fields == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); -- __PYX_ERR(2, 852, __pyx_L1_error) -- } -- __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":853 -- * for childname in descr.names: -- * fields = descr.fields[childname] -- * child, new_offset = fields # <<<<<<<<<<<<<< -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- */ -- if (likely(__pyx_v_fields != Py_None)) { -- PyObject* sequence = __pyx_v_fields; -- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); -- if (unlikely(size != 2)) { -- if (size > 2) __Pyx_RaiseTooManyValuesError(2); -- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); -- __PYX_ERR(2, 853, __pyx_L1_error) -- } -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); -- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); -- __Pyx_INCREF(__pyx_t_3); -- __Pyx_INCREF(__pyx_t_4); -- #else -- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- #endif -- } else { -- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error) -- } -- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); -- __pyx_t_3 = 0; -- __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 856, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); -- if (!__pyx_t_7) { -- goto __pyx_L8_next_or; -- } else { -- } -- __pyx_t_7 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_L8_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":859 -- * -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * # One could encode it in the format string and have Cython -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); -- if (__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_6 = __pyx_t_7; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":860 -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * # One could encode it in the format string and have Cython -- * # complain instead, BUT: < and > in format strings also imply -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 860, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":870 -- * -- * # Output padding bytes -- * while offset[0] < new_offset: # <<<<<<<<<<<<<< -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- */ -- while (1) { -- __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (!__pyx_t_6) break; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":871 -- * # Output padding bytes -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< -- * f += 1 -- * offset[0] += 1 -- */ -- (__pyx_v_f[0]) = 0x78; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":872 -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte -- * f += 1 # <<<<<<<<<<<<<< -- * offset[0] += 1 -- * -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":873 -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- * offset[0] += 1 # <<<<<<<<<<<<<< -- * -- * offset[0] += child.itemsize -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":875 -- * offset[0] += 1 -- * -- * offset[0] += child.itemsize # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(child): -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); -- if (__pyx_t_6) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":878 -- * -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num # <<<<<<<<<<<<<< -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 880, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":883 -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 98; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":884 -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":885 -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x68; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":886 -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 72; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":887 -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x69; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":888 -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 73; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":889 -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x6C; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":890 -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 76; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":891 -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x71; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":892 -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 81; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":893 -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":894 -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x64; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":895 -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x67; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":896 -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x66; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":897 -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x64; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":898 -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x67; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":899 -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (likely(__pyx_t_6)) { -- (__pyx_v_f[0]) = 79; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":901 -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * f += 1 -- * else: -- */ -- /*else*/ { -- __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 901, __pyx_L1_error) -- } -- __pyx_L15:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":902 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * f += 1 # <<<<<<<<<<<<<< -- * else: -- * # Cython ignores struct boundary information ("T{...}"), -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- goto __pyx_L13; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":906 -- * # Cython ignores struct boundary information ("T{...}"), -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< -- * return f -- * -- */ -- /*else*/ { -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 906, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- } -- __pyx_L13:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- } -- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":907 -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) -- * return f # <<<<<<<<<<<<<< -- * -- * -- */ -- __pyx_r = __pyx_v_f; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -+ * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape - */ - - /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_4); -- __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = NULL; - __pyx_L0:; -- __Pyx_XDECREF((PyObject *)__pyx_v_child); -- __Pyx_XDECREF(__pyx_v_fields); -- __Pyx_XDECREF(__pyx_v_childname); -- __Pyx_XDECREF(__pyx_v_new_offset); -- __Pyx_XDECREF(__pyx_v_t); -+ __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -4297,7 +2758,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("set_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1023 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":930 - * - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< -@@ -4306,7 +2767,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - Py_INCREF(__pyx_v_base); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1024 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":931 - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< -@@ -4315,7 +2776,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -4327,7 +2788,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyFinishContext(); - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -4342,7 +2803,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - int __pyx_t_1; - __Pyx_RefNannySetupContext("get_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1027 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":934 - * - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< -@@ -4351,7 +2812,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - __pyx_v_base = PyArray_BASE(__pyx_v_arr); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -4361,7 +2822,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_t_1 = ((__pyx_v_base == NULL) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1029 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":936 - * base = PyArray_BASE(arr) - * if base is NULL: - * return None # <<<<<<<<<<<<<< -@@ -4372,7 +2833,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -4381,7 +2842,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1030 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":937 - * if base is NULL: - * return None - * return base # <<<<<<<<<<<<<< -@@ -4393,7 +2854,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = ((PyObject *)__pyx_v_base); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -4408,12 +2869,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { -@@ -4427,13 +2888,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_array", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - { -@@ -4445,20 +2909,20 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1036 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":943 - * cdef inline int import_array() except -1: - * try: -- * _import_array() # <<<<<<<<<<<<<< -+ * __pyx_import_array() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") - */ -- __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error) -+ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - } -@@ -4468,9 +2932,9 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1037 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":944 - * try: -- * _import_array() -+ * __pyx_import_array() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.multiarray failed to import") - * -@@ -4478,32 +2942,32 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __PYX_ERR(2, 945, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - __Pyx_XGIVEREF(__pyx_t_1); -@@ -4514,12 +2978,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - /* function exit code */ -@@ -4537,7 +3001,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -4556,9 +3020,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_umath", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -4574,16 +3041,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1042 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":949 - * cdef inline int import_umath() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -4597,7 +3064,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1043 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":950 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< -@@ -4607,28 +3074,28 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __PYX_ERR(2, 951, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -4643,7 +3110,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -4666,7 +3133,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -4685,9 +3152,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_ufunc", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -4703,16 +3173,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1048 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":955 - * cdef inline int import_ufunc() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -4726,35 +3196,38 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1049 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":956 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") -+ * - */ - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1050 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":957 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -+ * -+ * cdef extern from *: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __PYX_ERR(2, 957, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -4769,7 +3242,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -4791,6 +3264,180 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_RefNannyFinishContext(); - return __pyx_r; - } -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_timedelta64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":979 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_datetime64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":994 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { -+ npy_datetime __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1004 -+ * also needed. That can be found using `get_datetime64_unit`. -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { -+ npy_timedelta __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1011 -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { -+ NPY_DATETIMEUNIT __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1018 -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ * """ -+ * return (obj).obmeta.base # <<<<<<<<<<<<<< -+ */ -+ __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} - static struct __pyx_vtabstruct_4cylp_2cy_9CyCbcNode_CyCbcNode __pyx_vtable_4cylp_2cy_9CyCbcNode_CyCbcNode; - - static PyObject *__pyx_tp_new_4cylp_2cy_9CyCbcNode_CyCbcNode(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { -@@ -4867,7 +3514,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_9CyCbcNode_CyCbcNode = { - sizeof(struct __pyx_obj_4cylp_2cy_9CyCbcNode_CyCbcNode), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_9CyCbcNode_CyCbcNode, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -4920,6 +3572,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_9CyCbcNode_CyCbcNode = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyMethodDef __pyx_methods[] = { -@@ -4969,39 +3627,27 @@ static struct PyModuleDef __pyx_moduledef = { - - static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_CyCbcNode, __pyx_k_CyCbcNode, sizeof(__pyx_k_CyCbcNode), 0, 0, 1, 1}, -- {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, - {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, -- {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, -- {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, - {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, -- {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, - {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, - {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, - {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, -- {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, -- {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, - {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, - {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0}, - {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, - {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, -- {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, - {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, - {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, - {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, - {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, -- {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, - {0, 0, 0, 0, 0, 0, 0} - }; - static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error) -- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error) -- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(2, 285, __pyx_L1_error) -- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 856, __pyx_L1_error) -- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error) -+ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 945, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -@@ -5030,82 +3676,27 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_GOTREF(__pyx_tuple__2); - __Pyx_GIVEREF(__pyx_tuple__2); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__3); -- __Pyx_GIVEREF(__pyx_tuple__3); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__4); -- __Pyx_GIVEREF(__pyx_tuple__4); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__5); -- __Pyx_GIVEREF(__pyx_tuple__5); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__6); -- __Pyx_GIVEREF(__pyx_tuple__6); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__7); -- __Pyx_GIVEREF(__pyx_tuple__7); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 1038, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__8); -- __Pyx_GIVEREF(__pyx_tuple__8); -+ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 945, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__3); -+ __Pyx_GIVEREF(__pyx_tuple__3); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 1044, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__9); -- __Pyx_GIVEREF(__pyx_tuple__9); -+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 951, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__4); -+ __Pyx_GIVEREF(__pyx_tuple__4); - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -5154,6 +3745,9 @@ static int __Pyx_modinit_function_export_code(void) { - - static int __Pyx_modinit_type_init_code(void) { - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); - /*--- Type init code ---*/ - __pyx_vtabptr_4cylp_2cy_9CyCbcNode_CyCbcNode = &__pyx_vtable_4cylp_2cy_9CyCbcNode_CyCbcNode; -@@ -5179,6 +3773,9 @@ static int __Pyx_modinit_type_init_code(void) { - static int __Pyx_modinit_type_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); - /*--- Type import code ---*/ - __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) -@@ -5192,18 +3789,38 @@ static int __Pyx_modinit_type_import_code(void) { - __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) -+ __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error) -- __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error) -- __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error) -+ __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error) -+ __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error) -- __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error) -+ __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error) -+ __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error) -+ __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error) -+ __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error) -+ __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error) -+ __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error) -+ __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error) -+ __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error) -+ __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error) -+ __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error) -+ __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_RefNannyFinishContext(); - return 0; -@@ -5230,17 +3847,19 @@ static int __Pyx_modinit_function_import_code(void) { - } - - --#if PY_MAJOR_VERSION < 3 --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC void --#else -+#ifndef CYTHON_NO_PYINIT_EXPORT - #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#elif PY_MAJOR_VERSION < 3 -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" void -+#else -+#define __Pyx_PyMODINIT_FUNC void - #endif - #else --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC PyObject * -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * - #else --#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#define __Pyx_PyMODINIT_FUNC PyObject * - #endif - #endif - -@@ -5322,6 +3941,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_CyCbcNode(PyObject *__pyx_pyinit_m - #endif - { - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannyDeclarations - #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m) { -@@ -5369,11 +3991,9 @@ if (!__Pyx_RefNanny) { - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ -- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS -- #ifdef WITH_THREAD /* Python build with threading support? */ -+ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - PyEval_InitThreads(); - #endif -- #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; -@@ -5410,15 +4030,15 @@ if (!__Pyx_RefNanny) { - } - #endif - /*--- Builtin init code ---*/ -- if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Constants init code ---*/ -- if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Global type/function init code ---*/ - (void)__Pyx_modinit_global_init_code(); - (void)__Pyx_modinit_variable_export_code(); - (void)__Pyx_modinit_function_export_code(); -- if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; -- if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) -+ if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) - (void)__Pyx_modinit_variable_import_code(); - (void)__Pyx_modinit_function_import_code(); - /*--- Execution code ---*/ -@@ -5436,12 +4056,12 @@ if (!__Pyx_RefNanny) { - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -- * raise ImportError("numpy.core.umath failed to import") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - - /*--- Wrapped vars code ---*/ -@@ -5605,7 +4225,7 @@ static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *nam - #if CYTHON_COMPILING_IN_CPYTHON - static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; -- ternaryfunc call = func->ob_type->tp_call; -+ ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -@@ -5804,263 +4424,6 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject - } - #endif - --/* PyCFunctionFastCall */ --#if CYTHON_FAST_PYCCALL --static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { -- PyCFunctionObject *func = (PyCFunctionObject*)func_obj; -- PyCFunction meth = PyCFunction_GET_FUNCTION(func); -- PyObject *self = PyCFunction_GET_SELF(func); -- int flags = PyCFunction_GET_FLAGS(func); -- assert(PyCFunction_Check(func)); -- assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); -- assert(nargs >= 0); -- assert(nargs == 0 || args != NULL); -- /* _PyCFunction_FastCallDict() must not be called with an exception set, -- because it may clear it (directly or indirectly) and so the -- caller loses its exception */ -- assert(!PyErr_Occurred()); -- if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { -- return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); -- } else { -- return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); -- } --} --#endif -- --/* PyFunctionFastCall */ --#if CYTHON_FAST_PYCALL --static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, -- PyObject *globals) { -- PyFrameObject *f; -- PyThreadState *tstate = __Pyx_PyThreadState_Current; -- PyObject **fastlocals; -- Py_ssize_t i; -- PyObject *result; -- assert(globals != NULL); -- /* XXX Perhaps we should create a specialized -- PyFrame_New() that doesn't take locals, but does -- take builtins without sanity checking them. -- */ -- assert(tstate != NULL); -- f = PyFrame_New(tstate, co, globals, NULL); -- if (f == NULL) { -- return NULL; -- } -- fastlocals = __Pyx_PyFrame_GetLocalsplus(f); -- for (i = 0; i < na; i++) { -- Py_INCREF(*args); -- fastlocals[i] = *args++; -- } -- result = PyEval_EvalFrameEx(f,0); -- ++tstate->recursion_depth; -- Py_DECREF(f); -- --tstate->recursion_depth; -- return result; --} --#if 1 || PY_VERSION_HEX < 0x030600B1 --static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { -- PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); -- PyObject *globals = PyFunction_GET_GLOBALS(func); -- PyObject *argdefs = PyFunction_GET_DEFAULTS(func); -- PyObject *closure; --#if PY_MAJOR_VERSION >= 3 -- PyObject *kwdefs; --#endif -- PyObject *kwtuple, **k; -- PyObject **d; -- Py_ssize_t nd; -- Py_ssize_t nk; -- PyObject *result; -- assert(kwargs == NULL || PyDict_Check(kwargs)); -- nk = kwargs ? PyDict_Size(kwargs) : 0; -- if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { -- return NULL; -- } -- if ( --#if PY_MAJOR_VERSION >= 3 -- co->co_kwonlyargcount == 0 && --#endif -- likely(kwargs == NULL || nk == 0) && -- co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { -- if (argdefs == NULL && co->co_argcount == nargs) { -- result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); -- goto done; -- } -- else if (nargs == 0 && argdefs != NULL -- && co->co_argcount == Py_SIZE(argdefs)) { -- /* function called with no arguments, but all parameters have -- a default value: use default values as arguments .*/ -- args = &PyTuple_GET_ITEM(argdefs, 0); -- result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); -- goto done; -- } -- } -- if (kwargs != NULL) { -- Py_ssize_t pos, i; -- kwtuple = PyTuple_New(2 * nk); -- if (kwtuple == NULL) { -- result = NULL; -- goto done; -- } -- k = &PyTuple_GET_ITEM(kwtuple, 0); -- pos = i = 0; -- while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { -- Py_INCREF(k[i]); -- Py_INCREF(k[i+1]); -- i += 2; -- } -- nk = i / 2; -- } -- else { -- kwtuple = NULL; -- k = NULL; -- } -- closure = PyFunction_GET_CLOSURE(func); --#if PY_MAJOR_VERSION >= 3 -- kwdefs = PyFunction_GET_KW_DEFAULTS(func); --#endif -- if (argdefs != NULL) { -- d = &PyTuple_GET_ITEM(argdefs, 0); -- nd = Py_SIZE(argdefs); -- } -- else { -- d = NULL; -- nd = 0; -- } --#if PY_MAJOR_VERSION >= 3 -- result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, -- args, (int)nargs, -- k, (int)nk, -- d, (int)nd, kwdefs, closure); --#else -- result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, -- args, (int)nargs, -- k, (int)nk, -- d, (int)nd, closure); --#endif -- Py_XDECREF(kwtuple); --done: -- Py_LeaveRecursiveCall(); -- return result; --} --#endif --#endif -- --/* PyObjectCallMethO */ --#if CYTHON_COMPILING_IN_CPYTHON --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { -- PyObject *self, *result; -- PyCFunction cfunc; -- cfunc = PyCFunction_GET_FUNCTION(func); -- self = PyCFunction_GET_SELF(func); -- if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -- return NULL; -- result = cfunc(self, arg); -- Py_LeaveRecursiveCall(); -- if (unlikely(!result) && unlikely(!PyErr_Occurred())) { -- PyErr_SetString( -- PyExc_SystemError, -- "NULL result without error in PyObject_Call"); -- } -- return result; --} --#endif -- --/* PyObjectCallOneArg */ --#if CYTHON_COMPILING_IN_CPYTHON --static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { -- PyObject *result; -- PyObject *args = PyTuple_New(1); -- if (unlikely(!args)) return NULL; -- Py_INCREF(arg); -- PyTuple_SET_ITEM(args, 0, arg); -- result = __Pyx_PyObject_Call(func, args, NULL); -- Py_DECREF(args); -- return result; --} --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { --#if CYTHON_FAST_PYCALL -- if (PyFunction_Check(func)) { -- return __Pyx_PyFunction_FastCall(func, &arg, 1); -- } --#endif -- if (likely(PyCFunction_Check(func))) { -- if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { -- return __Pyx_PyObject_CallMethO(func, arg); --#if CYTHON_FAST_PYCCALL -- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { -- return __Pyx_PyCFunction_FastCall(func, &arg, 1); --#endif -- } -- } -- return __Pyx__PyObject_CallOneArg(func, arg); --} --#else --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { -- PyObject *result; -- PyObject *args = PyTuple_Pack(1, arg); -- if (unlikely(!args)) return NULL; -- result = __Pyx_PyObject_Call(func, args, NULL); -- Py_DECREF(args); -- return result; --} --#endif -- --/* DictGetItem */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { -- PyObject *value; -- value = PyDict_GetItemWithError(d, key); -- if (unlikely(!value)) { -- if (!PyErr_Occurred()) { -- if (unlikely(PyTuple_Check(key))) { -- PyObject* args = PyTuple_Pack(1, key); -- if (likely(args)) { -- PyErr_SetObject(PyExc_KeyError, args); -- Py_DECREF(args); -- } -- } else { -- PyErr_SetObject(PyExc_KeyError, key); -- } -- } -- return NULL; -- } -- Py_INCREF(value); -- return value; --} --#endif -- --/* RaiseTooManyValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { -- PyErr_Format(PyExc_ValueError, -- "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); --} -- --/* RaiseNeedMoreValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { -- PyErr_Format(PyExc_ValueError, -- "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", -- index, (index == 1) ? "" : "s"); --} -- --/* RaiseNoneIterError */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); --} -- --/* ExtTypeTest */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { -- if (unlikely(!type)) { -- PyErr_SetString(PyExc_SystemError, "Missing type object"); -- return 0; -- } -- if (likely(__Pyx_TypeCheck(obj, type))) -- return 1; -- PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", -- Py_TYPE(obj)->tp_name, type->tp_name); -- return 0; --} -- - /* GetTopmostException */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * -@@ -6284,6 +4647,28 @@ static int __Pyx_SetVtable(PyObject *dict, void *vtable) { - return -1; - } - -+/* PyObjectGetAttrStrNoError */ -+static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { -+ __Pyx_PyThreadState_declare -+ __Pyx_PyThreadState_assign -+ if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) -+ __Pyx_PyErr_Clear(); -+} -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { -+ PyObject *result; -+#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 -+ PyTypeObject* tp = Py_TYPE(obj); -+ if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { -+ return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); -+ } -+#endif -+ result = __Pyx_PyObject_GetAttrStr(obj, attr_name); -+ if (unlikely(!result)) { -+ __Pyx_PyObject_GetAttrStr_ClearAttributeError(); -+ } -+ return result; -+} -+ - /* SetupReduce */ - static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { - int ret; -@@ -6311,43 +4696,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { - PyObject *setstate = NULL; - PyObject *setstate_cython = NULL; - #if CYTHON_USE_PYTYPE_LOOKUP -- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #else -- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #endif - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #else -- object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #endif -- reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; -+ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; - if (reduce_ex == object_reduce_ex) { - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #else -- object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #endif -- reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; -+ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; - if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { -- reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; -+ reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); -+ if (likely(reduce_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (reduce == object_reduce || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); - if (!setstate) PyErr_Clear(); - if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { -- setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; -+ setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); -+ if (likely(setstate_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (!setstate || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - } - PyType_Modified((PyTypeObject*)type_obj); - } - } -- goto GOOD; --BAD: -+ goto __PYX_GOOD; -+__PYX_BAD: - if (!PyErr_Occurred()) - PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); - ret = -1; --GOOD: -+__PYX_GOOD: - #if !CYTHON_USE_PYTYPE_LOOKUP - Py_XDECREF(object_reduce); - Py_XDECREF(object_reduce_ex); -@@ -6449,7 +4842,7 @@ static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UIN - - /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK --static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { -+static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { - PyObject *use_cline; - PyObject *ptype, *pvalue, *ptraceback; - #if CYTHON_COMPILING_IN_CPYTHON -@@ -6479,7 +4872,7 @@ static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { - } - if (!use_cline) { - c_line = 0; -- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); -+ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; -@@ -6553,7 +4946,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - if (__pyx_code_cache.count == __pyx_code_cache.max_count) { - int new_max = __pyx_code_cache.max_count + 64; - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( -- __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); -+ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); - if (unlikely(!entries)) { - return; - } -@@ -6576,30 +4969,31 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { -- PyCodeObject *py_code = 0; -- PyObject *py_srcfile = 0; -- PyObject *py_funcname = 0; -+ PyCodeObject *py_code = NULL; -+ PyObject *py_funcname = NULL; - #if PY_MAJOR_VERSION < 3 -+ PyObject *py_srcfile = NULL; - py_srcfile = PyString_FromString(filename); -- #else -- py_srcfile = PyUnicode_FromString(filename); -- #endif - if (!py_srcfile) goto bad; -+ #endif - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; -+ funcname = PyUnicode_AsUTF8(py_funcname); -+ if (!funcname) goto bad; - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); -- #else -- py_funcname = PyUnicode_FromString(funcname); -+ if (!py_funcname) goto bad; - #endif - } -- if (!py_funcname) goto bad; -+ #if PY_MAJOR_VERSION < 3 - py_code = __Pyx_PyCode_New( - 0, - 0, -@@ -6618,11 +5012,16 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - __pyx_empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); -- Py_DECREF(py_funcname); -+ #else -+ py_code = PyCode_NewEmpty(filename, funcname, py_line); -+ #endif -+ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline - return py_code; - bad: -- Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -+ #if PY_MAJOR_VERSION < 3 -+ Py_XDECREF(py_srcfile); -+ #endif - return NULL; - } - static void __Pyx_AddTraceback(const char *funcname, int c_line, -@@ -6654,37 +5053,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - Py_XDECREF(py_frame); - } - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(int) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(int) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(int) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(int), -- little, !is_unsigned); -- } --} -- - /* Declarations */ - #if CYTHON_CCOMPLEX - #ifdef __cplusplus -@@ -6802,7 +5170,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_float(a, a); - return __Pyx_c_prod_float(a, a); - case 3: - z = __Pyx_c_prod_float(a, a); -@@ -6957,7 +5324,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_double(a, a); - return __Pyx_c_prod_double(a, a); - case 3: - z = __Pyx_c_prod_double(a, a); -@@ -6995,251 +5361,54 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - #endif - #endif - --/* CIntFromPyVerify */ --#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ -- __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) --#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ -- __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) --#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ -- {\ -- func_type value = func_value;\ -- if (sizeof(target_type) < sizeof(func_type)) {\ -- if (unlikely(value != (func_type) (target_type) value)) {\ -- func_type zero = 0;\ -- if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ -- return (target_type) -1;\ -- if (is_unsigned && unlikely(value < zero))\ -- goto raise_neg_overflow;\ -- else\ -- goto raise_overflow;\ -- }\ -- }\ -- return (target_type) value;\ -- } -- - /* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { -- const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(enum NPY_TYPES) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" - #endif -- } -- } else { -- if (sizeof(enum NPY_TYPES) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop - #endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), -- little, !is_unsigned); -- } --} -- --/* CIntFromPy */ --static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; - const int is_unsigned = neg_one > const_zero; --#if PY_MAJOR_VERSION < 3 -- if (likely(PyInt_Check(x))) { -+ if (is_unsigned) { - if (sizeof(int) < sizeof(long)) { -- __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) -- } else { -- long val = PyInt_AS_LONG(x); -- if (is_unsigned && unlikely(val < 0)) { -- goto raise_neg_overflow; -- } -- return (int) val; -- } -- } else --#endif -- if (likely(PyLong_Check(x))) { -- if (is_unsigned) { --#if CYTHON_USE_PYLONG_INTERNALS -- const digit* digits = ((PyLongObject*)x)->ob_digit; -- switch (Py_SIZE(x)) { -- case 0: return (int) 0; -- case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) -- case 2: -- if (8 * sizeof(int) > 1 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { -- return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -- } -- } -- break; -- case 3: -- if (8 * sizeof(int) > 2 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { -- return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -- } -- } -- break; -- case 4: -- if (8 * sizeof(int) > 3 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { -- return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -- } -- } -- break; -- } --#endif --#if CYTHON_COMPILING_IN_CPYTHON -- if (unlikely(Py_SIZE(x) < 0)) { -- goto raise_neg_overflow; -- } --#else -- { -- int result = PyObject_RichCompareBool(x, Py_False, Py_LT); -- if (unlikely(result < 0)) -- return (int) -1; -- if (unlikely(result == 1)) -- goto raise_neg_overflow; -- } --#endif -- if (sizeof(int) <= sizeof(unsigned long)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) --#endif -- } -- } else { --#if CYTHON_USE_PYLONG_INTERNALS -- const digit* digits = ((PyLongObject*)x)->ob_digit; -- switch (Py_SIZE(x)) { -- case 0: return (int) 0; -- case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) -- case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) -- case -2: -- if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -- } -- } -- break; -- case 2: -- if (8 * sizeof(int) > 1 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -- return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -- } -- } -- break; -- case -3: -- if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -- } -- } -- break; -- case 3: -- if (8 * sizeof(int) > 2 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -- return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -- } -- } -- break; -- case -4: -- if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -- } -- } -- break; -- case 4: -- if (8 * sizeof(int) > 3 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -- return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -- } -- } -- break; -- } --#endif -- if (sizeof(int) <= sizeof(long)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) --#endif -- } -- } -- { --#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) -- PyErr_SetString(PyExc_RuntimeError, -- "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); --#else -- int val; -- PyObject *v = __Pyx_PyNumber_IntOrLong(x); -- #if PY_MAJOR_VERSION < 3 -- if (likely(v) && !PyLong_Check(v)) { -- PyObject *tmp = v; -- v = PyNumber_Long(tmp); -- Py_DECREF(tmp); -- } -- #endif -- if (likely(v)) { -- int one = 1; int is_little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&val; -- int ret = _PyLong_AsByteArray((PyLongObject *)v, -- bytes, sizeof(val), -- is_little, !is_unsigned); -- Py_DECREF(v); -- if (likely(!ret)) -- return val; -- } -+ return PyInt_FromLong((long) value); -+ } else if (sizeof(int) <= sizeof(unsigned long)) { -+ return PyLong_FromUnsignedLong((unsigned long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); - #endif -- return (int) -1; - } - } else { -- int val; -- PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); -- if (!tmp) return (int) -1; -- val = __Pyx_PyInt_As_int(tmp); -- Py_DECREF(tmp); -- return val; -+ if (sizeof(int) <= sizeof(long)) { -+ return PyInt_FromLong((long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ return PyLong_FromLongLong((PY_LONG_LONG) value); -+#endif -+ } -+ } -+ { -+ int one = 1; int little = (int)*(unsigned char *)&one; -+ unsigned char *bytes = (unsigned char *)&value; -+ return _PyLong_FromByteArray(bytes, sizeof(int), -+ little, !is_unsigned); - } --raise_overflow: -- PyErr_SetString(PyExc_OverflowError, -- "value too large to convert to int"); -- return (int) -1; --raise_neg_overflow: -- PyErr_SetString(PyExc_OverflowError, -- "can't convert negative value to int"); -- return (int) -1; - } - - /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(long) < sizeof(long)) { -@@ -7268,9 +5437,38 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - } - } - -+/* CIntFromPyVerify */ -+#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ -+ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) -+#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ -+ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) -+#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ -+ {\ -+ func_type value = func_value;\ -+ if (sizeof(target_type) < sizeof(func_type)) {\ -+ if (unlikely(value != (func_type) (target_type) value)) {\ -+ func_type zero = 0;\ -+ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ -+ return (target_type) -1;\ -+ if (is_unsigned && unlikely(value < zero))\ -+ goto raise_neg_overflow;\ -+ else\ -+ goto raise_overflow;\ -+ }\ -+ }\ -+ return (target_type) value;\ -+ } -+ - /* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -7457,6 +5655,202 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - return (long) -1; - } - -+/* CIntFromPy */ -+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif -+ const int is_unsigned = neg_one > const_zero; -+#if PY_MAJOR_VERSION < 3 -+ if (likely(PyInt_Check(x))) { -+ if (sizeof(int) < sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) -+ } else { -+ long val = PyInt_AS_LONG(x); -+ if (is_unsigned && unlikely(val < 0)) { -+ goto raise_neg_overflow; -+ } -+ return (int) val; -+ } -+ } else -+#endif -+ if (likely(PyLong_Check(x))) { -+ if (is_unsigned) { -+#if CYTHON_USE_PYLONG_INTERNALS -+ const digit* digits = ((PyLongObject*)x)->ob_digit; -+ switch (Py_SIZE(x)) { -+ case 0: return (int) 0; -+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) -+ case 2: -+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { -+ return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ } -+ } -+ break; -+ case 3: -+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { -+ return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ } -+ } -+ break; -+ case 4: -+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { -+ return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ } -+ } -+ break; -+ } -+#endif -+#if CYTHON_COMPILING_IN_CPYTHON -+ if (unlikely(Py_SIZE(x) < 0)) { -+ goto raise_neg_overflow; -+ } -+#else -+ { -+ int result = PyObject_RichCompareBool(x, Py_False, Py_LT); -+ if (unlikely(result < 0)) -+ return (int) -1; -+ if (unlikely(result == 1)) -+ goto raise_neg_overflow; -+ } -+#endif -+ if (sizeof(int) <= sizeof(unsigned long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -+#endif -+ } -+ } else { -+#if CYTHON_USE_PYLONG_INTERNALS -+ const digit* digits = ((PyLongObject*)x)->ob_digit; -+ switch (Py_SIZE(x)) { -+ case 0: return (int) 0; -+ case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) -+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) -+ case -2: -+ if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ } -+ } -+ break; -+ case 2: -+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ } -+ } -+ break; -+ case -3: -+ if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ } -+ } -+ break; -+ case 3: -+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ } -+ } -+ break; -+ case -4: -+ if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ } -+ } -+ break; -+ case 4: -+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -+ return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ } -+ } -+ break; -+ } -+#endif -+ if (sizeof(int) <= sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) -+#endif -+ } -+ } -+ { -+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) -+ PyErr_SetString(PyExc_RuntimeError, -+ "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); -+#else -+ int val; -+ PyObject *v = __Pyx_PyNumber_IntOrLong(x); -+ #if PY_MAJOR_VERSION < 3 -+ if (likely(v) && !PyLong_Check(v)) { -+ PyObject *tmp = v; -+ v = PyNumber_Long(tmp); -+ Py_DECREF(tmp); -+ } -+ #endif -+ if (likely(v)) { -+ int one = 1; int is_little = (int)*(unsigned char *)&one; -+ unsigned char *bytes = (unsigned char *)&val; -+ int ret = _PyLong_AsByteArray((PyLongObject *)v, -+ bytes, sizeof(val), -+ is_little, !is_unsigned); -+ Py_DECREF(v); -+ if (likely(!ret)) -+ return val; -+ } -+#endif -+ return (int) -1; -+ } -+ } else { -+ int val; -+ PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); -+ if (!tmp) return (int) -1; -+ val = __Pyx_PyInt_As_int(tmp); -+ Py_DECREF(tmp); -+ return val; -+ } -+raise_overflow: -+ PyErr_SetString(PyExc_OverflowError, -+ "value too large to convert to int"); -+ return (int) -1; -+raise_neg_overflow: -+ PyErr_SetString(PyExc_OverflowError, -+ "can't convert negative value to int"); -+ return (int) -1; -+} -+ - /* FastTypeChecks */ - #if CYTHON_COMPILING_IN_CPYTHON - static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { -@@ -7821,6 +6215,23 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_DECREF(x); - return ival; - } -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { -+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { -+ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); -+#if PY_MAJOR_VERSION < 3 -+ } else if (likely(PyInt_CheckExact(o))) { -+ return PyInt_AS_LONG(o); -+#endif -+ } else { -+ Py_ssize_t ival; -+ PyObject *x; -+ x = PyNumber_Index(o); -+ if (!x) return -1; -+ ival = PyInt_AsLong(x); -+ Py_DECREF(x); -+ return ival; -+ } -+} - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); - } -diff --git a/cylp/cy/CyCgl.cpp b/cylp/cy/CyCgl.cpp -index c210ec9..0e19d5e 100644 ---- a/cylp/cy/CyCgl.cpp -+++ b/cylp/cy/CyCgl.cpp -@@ -1,14 +1,16 @@ --/* Generated by Cython 0.29.12 */ -+/* Generated by Cython 0.29.25 */ - -+#ifndef PY_SSIZE_T_CLEAN - #define PY_SSIZE_T_CLEAN -+#endif /* PY_SSIZE_T_CLEAN */ - #include "Python.h" - #ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. - #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. - #else --#define CYTHON_ABI "0_29_12" --#define CYTHON_HEX_VERSION 0x001D0CF0 -+#define CYTHON_ABI "0_29_25" -+#define CYTHON_HEX_VERSION 0x001D19F0 - #define CYTHON_FUTURE_DIVISION 0 - #include - #ifndef offsetof -@@ -155,7 +157,7 @@ - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif -- #if PY_VERSION_HEX < 0x030300F0 -+ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) -@@ -174,7 +176,7 @@ - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL -- #define CYTHON_FAST_PYCALL 1 -+ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1) - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) -@@ -193,7 +195,9 @@ - #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) - #endif - #if CYTHON_USE_PYLONG_INTERNALS -- #include "longintrepr.h" -+ #if PY_MAJOR_VERSION < 3 -+ #include "longintrepr.h" -+ #endif - #undef SHIFT - #undef BASE - #undef MASK -@@ -324,9 +328,68 @@ class __Pyx_FakeReference { - #define __Pyx_DefaultClassType PyClass_Type - #else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" --#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 -- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ -- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -+ #define __Pyx_DefaultClassType PyType_Type -+#if PY_VERSION_HEX >= 0x030B00A1 -+ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, -+ PyObject *code, PyObject *c, PyObject* n, PyObject *v, -+ PyObject *fv, PyObject *cell, PyObject* fn, -+ PyObject *name, int fline, PyObject *lnos) { -+ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; -+ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; -+ const char *fn_cstr=NULL; -+ const char *name_cstr=NULL; -+ PyCodeObject* co=NULL; -+ PyObject *type, *value, *traceback; -+ PyErr_Fetch(&type, &value, &traceback); -+ if (!(kwds=PyDict_New())) goto end; -+ if (!(argcount=PyLong_FromLong(a))) goto end; -+ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; -+ if (!(posonlyargcount=PyLong_FromLong(0))) goto end; -+ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; -+ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; -+ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; -+ if (!(nlocals=PyLong_FromLong(l))) goto end; -+ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; -+ if (!(stacksize=PyLong_FromLong(s))) goto end; -+ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; -+ if (!(flags=PyLong_FromLong(f))) goto end; -+ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; -+ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; -+ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; -+ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; -+ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; -+ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here -+ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; -+ Py_XDECREF((PyObject*)co); -+ co = (PyCodeObject*)call_result; -+ call_result = NULL; -+ if (0) { -+ cleanup_code_too: -+ Py_XDECREF((PyObject*)co); -+ co = NULL; -+ } -+ end: -+ Py_XDECREF(kwds); -+ Py_XDECREF(argcount); -+ Py_XDECREF(posonlyargcount); -+ Py_XDECREF(kwonlyargcount); -+ Py_XDECREF(nlocals); -+ Py_XDECREF(stacksize); -+ Py_XDECREF(replace); -+ Py_XDECREF(call_result); -+ Py_XDECREF(empty); -+ if (type) { -+ PyErr_Restore(type, value, traceback); -+ } -+ return co; -+ } - #else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -@@ -440,8 +503,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #endif - #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 -+ #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) -+ #else -+ #define __Pyx_PyUnicode_READY(op) (0) -+ #endif - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) -@@ -449,7 +516,15 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) -+ #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) -+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) -+ #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) -+ #endif -+ #else -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) -+ #endif - #else - #define CYTHON_PEP393_ENABLED 0 - #define PyUnicode_1BYTE_KIND 1 -@@ -498,8 +573,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define PyString_Type PyUnicode_Type - #define PyString_Check PyUnicode_Check - #define PyString_CheckExact PyUnicode_CheckExact -+#ifndef PyObject_Unicode - #define PyObject_Unicode PyObject_Str - #endif -+#endif - #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) - #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) -@@ -510,6 +587,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #ifndef PySet_CheckExact - #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) - #endif -+#if PY_VERSION_HEX >= 0x030900A4 -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) -+#else -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) -+#endif - #if CYTHON_ASSUME_SAFE_MACROS - #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) - #else -@@ -543,13 +627,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong -- #define __Pyx_PyInt_AsHash_t PyInt_AsLong -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t - #else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t -- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t - #endif - #if PY_MAJOR_VERSION >= 3 -- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) -+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) - #else - #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) - #endif -@@ -590,11 +674,10 @@ static CYTHON_INLINE float __PYX_NAN() { - #define __Pyx_truncl truncl - #endif - -- -+#define __PYX_MARK_ERR_POS(f_index, lineno) \ -+ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } - #define __PYX_ERR(f_index, lineno, Ln_error) \ --{ \ -- __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ --} -+ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } - - #ifndef __PYX_EXTERN_C - #ifdef __cplusplus -@@ -610,7 +693,13 @@ static CYTHON_INLINE float __PYX_NAN() { - #include - #include - #include "numpy/arrayobject.h" -+#include "numpy/ndarrayobject.h" -+#include "numpy/ndarraytypes.h" -+#include "numpy/arrayscalars.h" - #include "numpy/ufuncobject.h" -+ -+ /* NumPy API declarations from "numpy/__init__.pxd" */ -+ - #include "CglAllDifferent.hpp" - #include "CglClique.hpp" - #include "CglKnapsackCover.hpp" -@@ -724,6 +813,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); - static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); - #if CYTHON_ASSUME_SAFE_MACROS - #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) - #else -@@ -859,12 +949,12 @@ static const char *__pyx_filename; - - static const char *__pyx_f[] = { - "stringsource", -- "cylp\\cy\\CyCgl.pyx", -+ "cylp/cy/CyCgl.pyx", - "__init__.pxd", - "type.pxd", - }; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":776 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":690 - * # in Cython to enable them only on the right systems. - * - * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< -@@ -873,7 +963,7 @@ static const char *__pyx_f[] = { - */ - typedef npy_int8 __pyx_t_5numpy_int8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":777 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":691 - * - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< -@@ -882,7 +972,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; - */ - typedef npy_int16 __pyx_t_5numpy_int16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":778 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":692 - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< -@@ -891,7 +981,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; - */ - typedef npy_int32 __pyx_t_5numpy_int32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":779 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":693 - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t - * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< -@@ -900,7 +990,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; - */ - typedef npy_int64 __pyx_t_5numpy_int64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":783 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":697 - * #ctypedef npy_int128 int128_t - * - * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< -@@ -909,7 +999,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; - */ - typedef npy_uint8 __pyx_t_5numpy_uint8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":784 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":698 - * - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< -@@ -918,7 +1008,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; - */ - typedef npy_uint16 __pyx_t_5numpy_uint16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":785 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":699 - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< -@@ -927,7 +1017,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; - */ - typedef npy_uint32 __pyx_t_5numpy_uint32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":786 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":700 - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t - * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< -@@ -936,7 +1026,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; - */ - typedef npy_uint64 __pyx_t_5numpy_uint64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":790 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":704 - * #ctypedef npy_uint128 uint128_t - * - * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< -@@ -945,7 +1035,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; - */ - typedef npy_float32 __pyx_t_5numpy_float32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":791 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":705 - * - * ctypedef npy_float32 float32_t - * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< -@@ -954,7 +1044,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; - */ - typedef npy_float64 __pyx_t_5numpy_float64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":800 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":714 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< -@@ -963,7 +1053,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; - */ - typedef npy_long __pyx_t_5numpy_int_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":801 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":715 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< -@@ -972,7 +1062,7 @@ typedef npy_long __pyx_t_5numpy_int_t; - */ - typedef npy_longlong __pyx_t_5numpy_long_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":802 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":716 - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t - * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< -@@ -981,7 +1071,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; - */ - typedef npy_longlong __pyx_t_5numpy_longlong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":804 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":718 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< -@@ -990,7 +1080,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; - */ - typedef npy_ulong __pyx_t_5numpy_uint_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":805 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":719 - * - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< -@@ -999,7 +1089,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":806 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":720 - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t - * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< -@@ -1008,7 +1098,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":808 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":722 - * ctypedef npy_ulonglong ulonglong_t - * - * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< -@@ -1017,7 +1107,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - */ - typedef npy_intp __pyx_t_5numpy_intp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":809 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":723 - * - * ctypedef npy_intp intp_t - * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< -@@ -1026,7 +1116,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; - */ - typedef npy_uintp __pyx_t_5numpy_uintp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":811 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":725 - * ctypedef npy_uintp uintp_t - * - * ctypedef npy_double float_t # <<<<<<<<<<<<<< -@@ -1035,7 +1125,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; - */ - typedef npy_double __pyx_t_5numpy_float_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":812 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":726 - * - * ctypedef npy_double float_t - * ctypedef npy_double double_t # <<<<<<<<<<<<<< -@@ -1044,7 +1134,7 @@ typedef npy_double __pyx_t_5numpy_float_t; - */ - typedef npy_double __pyx_t_5numpy_double_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":813 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":727 - * ctypedef npy_double float_t - * ctypedef npy_double double_t - * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< -@@ -1096,7 +1186,7 @@ struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglPreProcess; - struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglProbing; - struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglSimpleRounding; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":815 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":729 - * ctypedef npy_longdouble longdouble_t - * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< -@@ -1105,7 +1195,7 @@ struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglSimpleRounding; - */ - typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":816 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":730 - * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< -@@ -1114,7 +1204,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - */ - typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":817 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":731 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< -@@ -1123,7 +1213,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - */ - typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":819 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":733 - * ctypedef npy_clongdouble clongdouble_t - * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< -@@ -1511,67 +1601,6 @@ static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr - #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v) - #endif - --/* PyCFunctionFastCall.proto */ --#if CYTHON_FAST_PYCCALL --static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); --#else --#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) --#endif -- --/* PyFunctionFastCall.proto */ --#if CYTHON_FAST_PYCALL --#define __Pyx_PyFunction_FastCall(func, args, nargs)\ -- __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) --#if 1 || PY_VERSION_HEX < 0x030600B1 --static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); --#else --#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) --#endif --#define __Pyx_BUILD_ASSERT_EXPR(cond)\ -- (sizeof(char [1 - 2*!(cond)]) - 1) --#ifndef Py_MEMBER_SIZE --#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) --#endif -- static size_t __pyx_pyframe_localsplus_offset = 0; -- #include "frameobject.h" -- #define __Pxy_PyFrame_Initialize_Offsets()\ -- ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ -- (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) -- #define __Pyx_PyFrame_GetLocalsplus(frame)\ -- (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) --#endif -- --/* PyObjectCallMethO.proto */ --#if CYTHON_COMPILING_IN_CPYTHON --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); --#endif -- --/* PyObjectCallOneArg.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); -- --/* DictGetItem.proto */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); --#define __Pyx_PyObject_Dict_GetItem(obj, name)\ -- (likely(PyDict_CheckExact(obj)) ?\ -- __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) --#else --#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) --#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) --#endif -- --/* RaiseTooManyValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); -- --/* RaiseNeedMoreValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); -- --/* RaiseNoneIterError.proto */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -- --/* ExtTypeTest.proto */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); -- - /* GetTopmostException.proto */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); -@@ -1618,6 +1647,9 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr - #endif - -+/* PyObjectGetAttrStrNoError.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); -+ - /* SetupReduce.proto */ - static int __Pyx_setup_reduce(PyObject* type_obj); - -@@ -1729,8 +1761,10 @@ static void __Pyx_CppExn2PyErr() { - } - #endif - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -+/* GCCDiagnostics.proto */ -+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -+#define __Pyx_HAS_GCC_DIAGNOSTIC -+#endif - - /* RealImag.proto */ - #if CYTHON_CCOMPLEX -@@ -1831,7 +1865,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); - #endif - - /* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); - - /* CIntFromPy.proto */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); -@@ -1890,8 +1924,17 @@ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; - static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; - static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; - static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -+static PyTypeObject *__pyx_ptype_5numpy_generic = 0; -+static PyTypeObject *__pyx_ptype_5numpy_number = 0; -+static PyTypeObject *__pyx_ptype_5numpy_integer = 0; -+static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; -+static PyTypeObject *__pyx_ptype_5numpy_floating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; -+static PyTypeObject *__pyx_ptype_5numpy_character = 0; - static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ - - /* Module declarations from 'cylp.cy.CyCgl' */ - static PyTypeObject *__pyx_ptype_4cylp_2cy_5CyCgl_CyCglCutGenerator = 0; -@@ -1917,22 +1960,17 @@ int __pyx_module_is_main_cylp__cy__CyCgl = 0; - - /* Implementation of 'cylp.cy.CyCgl' */ - static PyObject *__pyx_builtin_TypeError; --static PyObject *__pyx_builtin_ValueError; --static PyObject *__pyx_builtin_range; --static PyObject *__pyx_builtin_RuntimeError; - static PyObject *__pyx_builtin_ImportError; - static const char __pyx_k_main[] = "__main__"; - static const char __pyx_k_name[] = "__name__"; - static const char __pyx_k_test[] = "__test__"; - static const char __pyx_k_limit[] = "limit"; --static const char __pyx_k_range[] = "range"; - static const char __pyx_k_reduce[] = "__reduce__"; - static const char __pyx_k_getstate[] = "__getstate__"; - static const char __pyx_k_setstate[] = "__setstate__"; - static const char __pyx_k_TypeError[] = "TypeError"; - static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; - static const char __pyx_k_CyCglLandP[] = "CyCglLandP"; --static const char __pyx_k_ValueError[] = "ValueError"; - static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; - static const char __pyx_k_CyCglClique[] = "CyCglClique"; - static const char __pyx_k_CyCglGomory[] = "CyCglGomory"; -@@ -1940,7 +1978,6 @@ static const char __pyx_k_CyCglTwomir[] = "CyCglTwomir"; - static const char __pyx_k_ImportError[] = "ImportError"; - static const char __pyx_k_CyCglOddHole[] = "CyCglOddHole"; - static const char __pyx_k_CyCglProbing[] = "CyCglProbing"; --static const char __pyx_k_RuntimeError[] = "RuntimeError"; - static const char __pyx_k_CyCglRedSplit[] = "CyCglRedSplit"; - static const char __pyx_k_maxInKnapsack[] = "maxInKnapsack"; - static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; -@@ -1956,16 +1993,10 @@ static const char __pyx_k_CyCglSimpleRounding[] = "CyCglSimpleRounding"; - static const char __pyx_k_CyCglResidualCapacity[] = "CyCglResidualCapacity"; - static const char __pyx_k_CyCglMixedIntegerRounding[] = "CyCglMixedIntegerRounding"; - static const char __pyx_k_CyCglMixedIntegerRounding2[] = "CyCglMixedIntegerRounding2"; --static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; - static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; --static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; --static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; --static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; --static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; - static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; - static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; - static const char __pyx_k_self_CppSelf_cannot_be_converted[] = "self.CppSelf cannot be converted to a Python object for pickling"; --static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; - static PyObject *__pyx_n_s_CyCglAllDifferent; - static PyObject *__pyx_n_s_CyCglClique; - static PyObject *__pyx_n_s_CyCglCutGenerator; -@@ -1983,26 +2014,18 @@ static PyObject *__pyx_n_s_CyCglRedSplit; - static PyObject *__pyx_n_s_CyCglResidualCapacity; - static PyObject *__pyx_n_s_CyCglSimpleRounding; - static PyObject *__pyx_n_s_CyCglTwomir; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; - static PyObject *__pyx_n_s_ImportError; --static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; --static PyObject *__pyx_n_s_RuntimeError; - static PyObject *__pyx_n_s_TypeError; --static PyObject *__pyx_n_s_ValueError; - static PyObject *__pyx_n_s_cline_in_traceback; - static PyObject *__pyx_n_s_getstate; - static PyObject *__pyx_n_s_limit; - static PyObject *__pyx_n_s_main; - static PyObject *__pyx_n_s_maxInKnapsack; - static PyObject *__pyx_n_s_name; --static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; --static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; - static PyObject *__pyx_kp_s_no_default___reduce___due_to_non; - static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; - static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; - static PyObject *__pyx_n_s_pyx_vtable; --static PyObject *__pyx_n_s_range; - static PyObject *__pyx_n_s_reduce; - static PyObject *__pyx_n_s_reduce_cython; - static PyObject *__pyx_n_s_reduce_ex; -@@ -2010,7 +2033,6 @@ static PyObject *__pyx_kp_s_self_CppSelf_cannot_be_converted; - static PyObject *__pyx_n_s_setstate; - static PyObject *__pyx_n_s_setstate_cython; - static PyObject *__pyx_n_s_test; --static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; - static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_17CyCglCutGenerator___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_17CyCglCutGenerator_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ - static int __pyx_pf_4cylp_2cy_5CyCgl_17CyCglAllDifferent___cinit__(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglAllDifferent *__pyx_v_self); /* proto */ -@@ -2065,8 +2087,6 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_12CyCglProbing_4__setstate_cython__(C - static int __pyx_pf_4cylp_2cy_5CyCgl_19CyCglSimpleRounding___cinit__(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglSimpleRounding *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_19CyCglSimpleRounding_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglSimpleRounding *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_19CyCglSimpleRounding_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglSimpleRounding *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ - static PyObject *__pyx_tp_new_4cylp_2cy_5CyCgl_CyCglCutGenerator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ - static PyObject *__pyx_tp_new_4cylp_2cy_5CyCgl_CyCglAllDifferent(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ - static PyObject *__pyx_tp_new_4cylp_2cy_5CyCgl_CyCglClique(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ -@@ -2121,11 +2141,6 @@ static PyObject *__pyx_tuple__33; - static PyObject *__pyx_tuple__34; - static PyObject *__pyx_tuple__35; - static PyObject *__pyx_tuple__36; --static PyObject *__pyx_tuple__37; --static PyObject *__pyx_tuple__38; --static PyObject *__pyx_tuple__39; --static PyObject *__pyx_tuple__40; --static PyObject *__pyx_tuple__41; - /* Late includes */ - - /* "(tree fragment)":1 -@@ -2151,6 +2166,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_17CyCglCutGenerator___reduce_cython__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -2205,6 +2223,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_17CyCglCutGenerator_2__setstate_cytho - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -2263,6 +2284,9 @@ static int __pyx_pf_4cylp_2cy_5CyCgl_17CyCglAllDifferent___cinit__(struct __pyx_ - int __pyx_r; - __Pyx_RefNannyDeclarations - CglAllDifferent *__pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - - /* "cylp/cy/CyCgl.pyx":9 -@@ -2322,6 +2346,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_17CyCglAllDifferent_2__reduce_cython_ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -2376,6 +2403,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_17CyCglAllDifferent_4__setstate_cytho - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -2434,6 +2464,9 @@ static int __pyx_pf_4cylp_2cy_5CyCgl_11CyCglClique___cinit__(struct __pyx_obj_4c - int __pyx_r; - __Pyx_RefNannyDeclarations - CglClique *__pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - - /* "cylp/cy/CyCgl.pyx":13 -@@ -2493,6 +2526,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_11CyCglClique_2__reduce_cython__(CYTH - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -2547,6 +2583,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_11CyCglClique_4__setstate_cython__(CY - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -2589,6 +2628,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_11CyCglClique_4__setstate_cython__(CY - static int __pyx_pw_4cylp_2cy_5CyCgl_18CyCglKnapsackCover_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ - static int __pyx_pw_4cylp_2cy_5CyCgl_18CyCglKnapsackCover_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_maxInKnapsack = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - int __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); -@@ -2645,6 +2687,9 @@ static int __pyx_pf_4cylp_2cy_5CyCgl_18CyCglKnapsackCover___cinit__(struct __pyx - int __pyx_r; - __Pyx_RefNannyDeclarations - CglKnapsackCover *__pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - - /* "cylp/cy/CyCgl.pyx":17 -@@ -2752,6 +2797,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_18CyCglKnapsackCover_13maxInKnapsack_ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyCgl.pyx":25 -@@ -2812,6 +2860,9 @@ static int __pyx_pf_4cylp_2cy_5CyCgl_18CyCglKnapsackCover_13maxInKnapsack_2__set - int __pyx_r; - __Pyx_RefNannyDeclarations - int __pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__set__", 0); - - /* "cylp/cy/CyCgl.pyx":28 -@@ -2866,6 +2917,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_18CyCglKnapsackCover_2__reduce_cython - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -2920,6 +2974,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_18CyCglKnapsackCover_4__setstate_cyth - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -2978,6 +3035,9 @@ static int __pyx_pf_4cylp_2cy_5CyCgl_12CyCglOddHole___cinit__(struct __pyx_obj_4 - int __pyx_r; - __Pyx_RefNannyDeclarations - CglOddHole *__pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - - /* "cylp/cy/CyCgl.pyx":32 -@@ -3037,6 +3097,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_12CyCglOddHole_2__reduce_cython__(CYT - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -3091,6 +3154,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_12CyCglOddHole_4__setstate_cython__(C - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -3149,6 +3215,9 @@ static int __pyx_pf_4cylp_2cy_5CyCgl_14CyCglFlowCover___cinit__(struct __pyx_obj - int __pyx_r; - __Pyx_RefNannyDeclarations - CglFlowCover *__pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - - /* "cylp/cy/CyCgl.pyx":38 -@@ -3208,6 +3277,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_14CyCglFlowCover_2__reduce_cython__(C - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -3262,6 +3334,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_14CyCglFlowCover_4__setstate_cython__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -3304,6 +3379,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_14CyCglFlowCover_4__setstate_cython__ - static int __pyx_pw_4cylp_2cy_5CyCgl_11CyCglGomory_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ - static int __pyx_pw_4cylp_2cy_5CyCgl_11CyCglGomory_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_limit = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - int __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); -@@ -3360,6 +3438,9 @@ static int __pyx_pf_4cylp_2cy_5CyCgl_11CyCglGomory___cinit__(struct __pyx_obj_4c - int __pyx_r; - __Pyx_RefNannyDeclarations - CglGomory *__pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - - /* "cylp/cy/CyCgl.pyx":44 -@@ -3467,6 +3548,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_11CyCglGomory_5limit___get__(struct _ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyCgl.pyx":52 -@@ -3527,6 +3611,9 @@ static int __pyx_pf_4cylp_2cy_5CyCgl_11CyCglGomory_5limit_2__set__(struct __pyx_ - int __pyx_r; - __Pyx_RefNannyDeclarations - int __pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__set__", 0); - - /* "cylp/cy/CyCgl.pyx":55 -@@ -3581,6 +3668,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_11CyCglGomory_2__reduce_cython__(CYTH - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -3635,6 +3725,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_11CyCglGomory_4__setstate_cython__(CY - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -3693,6 +3786,9 @@ static int __pyx_pf_4cylp_2cy_5CyCgl_13CyCglRedSplit___cinit__(struct __pyx_obj_ - int __pyx_r; - __Pyx_RefNannyDeclarations - CglRedSplit *__pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - - /* "cylp/cy/CyCgl.pyx":59 -@@ -3752,6 +3848,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_13CyCglRedSplit_2__reduce_cython__(CY - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -3806,6 +3905,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_13CyCglRedSplit_4__setstate_cython__( - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -3864,6 +3966,9 @@ static int __pyx_pf_4cylp_2cy_5CyCgl_19CyCglLiftAndProject___cinit__(struct __py - int __pyx_r; - __Pyx_RefNannyDeclarations - CglLiftAndProject *__pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - - /* "cylp/cy/CyCgl.pyx":65 -@@ -3923,6 +4028,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_19CyCglLiftAndProject_2__reduce_cytho - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -3977,6 +4085,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_19CyCglLiftAndProject_4__setstate_cyt - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -4035,6 +4146,9 @@ static int __pyx_pf_4cylp_2cy_5CyCgl_10CyCglLandP___cinit__(struct __pyx_obj_4cy - int __pyx_r; - __Pyx_RefNannyDeclarations - CglLandP *__pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - - /* "cylp/cy/CyCgl.pyx":69 -@@ -4094,6 +4208,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_10CyCglLandP_2__reduce_cython__(CYTHO - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -4148,6 +4265,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_10CyCglLandP_4__setstate_cython__(CYT - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -4206,6 +4326,9 @@ static int __pyx_pf_4cylp_2cy_5CyCgl_25CyCglMixedIntegerRounding___cinit__(struc - int __pyx_r; - __Pyx_RefNannyDeclarations - CglMixedIntegerRounding *__pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - - /* "cylp/cy/CyCgl.pyx":75 -@@ -4265,6 +4388,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_25CyCglMixedIntegerRounding_2__reduce - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -4319,6 +4445,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_25CyCglMixedIntegerRounding_4__setsta - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -4377,6 +4506,9 @@ static int __pyx_pf_4cylp_2cy_5CyCgl_26CyCglMixedIntegerRounding2___cinit__(stru - int __pyx_r; - __Pyx_RefNannyDeclarations - CglMixedIntegerRounding2 *__pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - - /* "cylp/cy/CyCgl.pyx":79 -@@ -4436,6 +4568,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_26CyCglMixedIntegerRounding2_2__reduc - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -4490,6 +4625,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_26CyCglMixedIntegerRounding2_4__setst - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -4548,6 +4686,9 @@ static int __pyx_pf_4cylp_2cy_5CyCgl_11CyCglTwomir___cinit__(struct __pyx_obj_4c - int __pyx_r; - __Pyx_RefNannyDeclarations - CglTwomir *__pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - - /* "cylp/cy/CyCgl.pyx":83 -@@ -4607,6 +4748,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_11CyCglTwomir_2__reduce_cython__(CYTH - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -4661,6 +4805,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_11CyCglTwomir_4__setstate_cython__(CY - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -4719,6 +4866,9 @@ static int __pyx_pf_4cylp_2cy_5CyCgl_21CyCglResidualCapacity___cinit__(struct __ - int __pyx_r; - __Pyx_RefNannyDeclarations - CglResidualCapacity *__pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - - /* "cylp/cy/CyCgl.pyx":88 -@@ -4778,6 +4928,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_21CyCglResidualCapacity_2__reduce_cyt - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -4832,6 +4985,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_21CyCglResidualCapacity_4__setstate_c - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -4890,6 +5046,9 @@ static int __pyx_pf_4cylp_2cy_5CyCgl_15CyCglPreProcess___cinit__(struct __pyx_ob - int __pyx_r; - __Pyx_RefNannyDeclarations - CglPreProcess *__pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - - /* "cylp/cy/CyCgl.pyx":100 -@@ -4949,6 +5108,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_15CyCglPreProcess_2__reduce_cython__( - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -5003,6 +5165,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_15CyCglPreProcess_4__setstate_cython_ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -5061,6 +5226,9 @@ static int __pyx_pf_4cylp_2cy_5CyCgl_12CyCglProbing___cinit__(struct __pyx_obj_4 - int __pyx_r; - __Pyx_RefNannyDeclarations - CglProbing *__pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - - /* "cylp/cy/CyCgl.pyx":104 -@@ -5120,6 +5288,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_12CyCglProbing_2__reduce_cython__(CYT - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -5174,6 +5345,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_12CyCglProbing_4__setstate_cython__(C - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -5232,6 +5406,9 @@ static int __pyx_pf_4cylp_2cy_5CyCgl_19CyCglSimpleRounding___cinit__(struct __py - int __pyx_r; - __Pyx_RefNannyDeclarations - CglSimpleRounding *__pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - - /* "cylp/cy/CyCgl.pyx":108 -@@ -5291,6 +5468,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_19CyCglSimpleRounding_2__reduce_cytho - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -5345,6 +5525,9 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_19CyCglSimpleRounding_4__setstate_cyt - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -5375,863 +5558,7 @@ static PyObject *__pyx_pf_4cylp_2cy_5CyCgl_19CyCglSimpleRounding_4__setstate_cyt - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); -- __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_v_i; -- int __pyx_v_ndim; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- int __pyx_v_t; -- char *__pyx_v_f; -- PyArray_Descr *__pyx_v_descr = 0; -- int __pyx_v_offset; -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- int __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- int __pyx_t_4; -- int __pyx_t_5; -- int __pyx_t_6; -- PyArray_Descr *__pyx_t_7; -- PyObject *__pyx_t_8 = NULL; -- char *__pyx_t_9; -- if (__pyx_v_info == NULL) { -- PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); -- return -1; -- } -- __Pyx_RefNannySetupContext("__getbuffer__", 0); -- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); -- __Pyx_GIVEREF(__pyx_v_info->obj); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":265 -- * -- * cdef int i, ndim -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":266 -- * cdef int i, ndim -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * -- * ndim = PyArray_NDIM(self) -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":268 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- */ -- __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L4_bool_binop_done; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":271 -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not C contiguous") -- * -- */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L4_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 272, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L7_bool_binop_done; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":275 -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not Fortran contiguous") -- * -- */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 276, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":278 -- * raise ValueError(u"ndarray is not Fortran contiguous") -- * -- * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":279 -- * -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * # Allocate new buffer for strides and shape info. -- */ -- __pyx_v_info->ndim = __pyx_v_ndim; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":283 -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- */ -- __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":284 -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim # <<<<<<<<<<<<<< -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- */ -- __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":285 -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim -- * for i in range(ndim): # <<<<<<<<<<<<<< -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] -- */ -- __pyx_t_4 = __pyx_v_ndim; -- __pyx_t_5 = __pyx_t_4; -- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { -- __pyx_v_i = __pyx_t_6; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":286 -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- */ -- (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":287 -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< -- * else: -- * info.strides = PyArray_STRIDES(self) -- */ -- (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- goto __pyx_L9; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":289 -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- */ -- /*else*/ { -- __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":290 -- * else: -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- */ -- __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); -- } -- __pyx_L9:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":291 -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL # <<<<<<<<<<<<<< -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) -- */ -- __pyx_v_info->suboffsets = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":292 -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< -- * info.readonly = not PyArray_ISWRITEABLE(self) -- * -- */ -- __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":293 -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< -- * -- * cdef int t -- */ -- __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":296 -- * -- * cdef int t -- * cdef char* f = NULL # <<<<<<<<<<<<<< -- * cdef dtype descr = PyArray_DESCR(self) -- * cdef int offset -- */ -- __pyx_v_f = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":297 -- * cdef int t -- * cdef char* f = NULL -- * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< -- * cdef int offset -- * -- */ -- __pyx_t_7 = PyArray_DESCR(__pyx_v_self); -- __pyx_t_3 = ((PyObject *)__pyx_t_7); -- __Pyx_INCREF(__pyx_t_3); -- __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":300 -- * cdef int offset -- * -- * info.obj = self # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(descr): -- */ -- __Pyx_INCREF(((PyObject *)__pyx_v_self)); -- __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); -- __pyx_v_info->obj = ((PyObject *)__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":303 -- * -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num # <<<<<<<<<<<<<< -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- */ -- __pyx_t_4 = __pyx_v_descr->type_num; -- __pyx_v_t = __pyx_t_4; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); -- if (!__pyx_t_2) { -- goto __pyx_L15_next_or; -- } else { -- } -- __pyx_t_2 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_L15_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":305 -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L14_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 306, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":307 -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- */ -- switch (__pyx_v_t) { -- case NPY_BYTE: -- __pyx_v_f = ((char *)"b"); -- break; -- case NPY_UBYTE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":308 -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- */ -- __pyx_v_f = ((char *)"B"); -- break; -- case NPY_SHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":309 -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- */ -- __pyx_v_f = ((char *)"h"); -- break; -- case NPY_USHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":310 -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- */ -- __pyx_v_f = ((char *)"H"); -- break; -- case NPY_INT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":311 -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- */ -- __pyx_v_f = ((char *)"i"); -- break; -- case NPY_UINT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":312 -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- */ -- __pyx_v_f = ((char *)"I"); -- break; -- case NPY_LONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":313 -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- */ -- __pyx_v_f = ((char *)"l"); -- break; -- case NPY_ULONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":314 -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- */ -- __pyx_v_f = ((char *)"L"); -- break; -- case NPY_LONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":315 -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- */ -- __pyx_v_f = ((char *)"q"); -- break; -- case NPY_ULONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":316 -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- */ -- __pyx_v_f = ((char *)"Q"); -- break; -- case NPY_FLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":317 -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- */ -- __pyx_v_f = ((char *)"f"); -- break; -- case NPY_DOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":318 -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- */ -- __pyx_v_f = ((char *)"d"); -- break; -- case NPY_LONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":319 -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- */ -- __pyx_v_f = ((char *)"g"); -- break; -- case NPY_CFLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":320 -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- */ -- __pyx_v_f = ((char *)"Zf"); -- break; -- case NPY_CDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":321 -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" -- */ -- __pyx_v_f = ((char *)"Zd"); -- break; -- case NPY_CLONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":322 -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f = "O" -- * else: -- */ -- __pyx_v_f = ((char *)"Zg"); -- break; -- case NPY_OBJECT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":323 -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_v_f = ((char *)"O"); -- break; -- default: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":325 -- * elif t == NPY_OBJECT: f = "O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * info.format = f -- * return -- */ -- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_8); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 325, __pyx_L1_error) -- break; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":326 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f # <<<<<<<<<<<<<< -- * return -- * else: -- */ -- __pyx_v_info->format = __pyx_v_f; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":327 -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f -- * return # <<<<<<<<<<<<<< -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- */ -- __pyx_r = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":329 -- * return -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- */ -- /*else*/ { -- __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":330 -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, -- */ -- (__pyx_v_info->format[0]) = '^'; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":331 -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 # <<<<<<<<<<<<<< -- * f = _util_dtypestring(descr, info.format + 1, -- * info.format + _buffer_format_string_len, -- */ -- __pyx_v_offset = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":332 -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< -- * info.format + _buffer_format_string_len, -- * &offset) -- */ -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":335 -- * info.format + _buffer_format_string_len, -- * &offset) -- * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- */ -- (__pyx_v_f[0]) = '\x00'; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- -- /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; -- if (__pyx_v_info->obj != NULL) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- goto __pyx_L2; -- __pyx_L0:; -- if (__pyx_v_info->obj == Py_None) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- __pyx_L2:; -- __Pyx_XDECREF((PyObject *)__pyx_v_descr); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); -- __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("__releasebuffer__", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":339 -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) -- */ -- PyObject_Free(__pyx_v_info->format); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":341 -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) # <<<<<<<<<<<<<< -- * # info.shape was stored after info.strides in the same block -- * -- */ -- PyObject_Free(__pyx_v_info->strides); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -@@ -6243,9 +5570,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":822 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":736 - * - * cdef inline object PyArray_MultiIterNew1(a): - * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< -@@ -6253,13 +5583,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - * cdef inline object PyArray_MultiIterNew2(a, b): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -@@ -6278,7 +5608,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -@@ -6290,9 +5620,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":825 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":739 - * - * cdef inline object PyArray_MultiIterNew2(a, b): - * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< -@@ -6300,13 +5633,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - * cdef inline object PyArray_MultiIterNew3(a, b, c): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -@@ -6325,7 +5658,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -@@ -6337,9 +5670,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":828 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":742 - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): - * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< -@@ -6347,13 +5683,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -@@ -6372,7 +5708,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -6384,9 +5720,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":831 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":745 - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -@@ -6394,13 +5733,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -6419,7 +5758,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -6431,9 +5770,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":834 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":748 - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< -@@ -6441,13 +5783,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - * cdef inline tuple PyDataType_SHAPE(dtype d): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -6466,7 +5808,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -6480,7 +5822,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - int __pyx_t_1; - __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -6490,7 +5832,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":838 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":752 - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): - * return d.subarray.shape # <<<<<<<<<<<<<< -@@ -6502,7 +5844,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -6511,12 +5853,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":840 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":754 - * return d.subarray.shape - * else: - * return () # <<<<<<<<<<<<<< - * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: -+ * - */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); -@@ -6525,7 +5867,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - goto __pyx_L0; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -6540,754 +5882,8 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { -- PyArray_Descr *__pyx_v_child = 0; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- PyObject *__pyx_v_fields = 0; -- PyObject *__pyx_v_childname = NULL; -- PyObject *__pyx_v_new_offset = NULL; -- PyObject *__pyx_v_t = NULL; -- char *__pyx_r; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- Py_ssize_t __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- PyObject *__pyx_t_4 = NULL; -- int __pyx_t_5; -- int __pyx_t_6; -- int __pyx_t_7; -- long __pyx_t_8; -- char *__pyx_t_9; -- __Pyx_RefNannySetupContext("_util_dtypestring", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":847 -- * -- * cdef dtype child -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * cdef tuple fields -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":848 -- * cdef dtype child -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * cdef tuple fields -- * -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- if (unlikely(__pyx_v_descr->names == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -- __PYX_ERR(2, 851, __pyx_L1_error) -- } -- __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; -- for (;;) { -- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 851, __pyx_L1_error) -- #else -- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- #endif -- __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":852 -- * -- * for childname in descr.names: -- * fields = descr.fields[childname] # <<<<<<<<<<<<<< -- * child, new_offset = fields -- * -- */ -- if (unlikely(__pyx_v_descr->fields == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); -- __PYX_ERR(2, 852, __pyx_L1_error) -- } -- __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":853 -- * for childname in descr.names: -- * fields = descr.fields[childname] -- * child, new_offset = fields # <<<<<<<<<<<<<< -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- */ -- if (likely(__pyx_v_fields != Py_None)) { -- PyObject* sequence = __pyx_v_fields; -- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); -- if (unlikely(size != 2)) { -- if (size > 2) __Pyx_RaiseTooManyValuesError(2); -- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); -- __PYX_ERR(2, 853, __pyx_L1_error) -- } -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); -- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); -- __Pyx_INCREF(__pyx_t_3); -- __Pyx_INCREF(__pyx_t_4); -- #else -- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- #endif -- } else { -- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error) -- } -- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); -- __pyx_t_3 = 0; -- __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 856, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); -- if (!__pyx_t_7) { -- goto __pyx_L8_next_or; -- } else { -- } -- __pyx_t_7 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_L8_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":859 -- * -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * # One could encode it in the format string and have Cython -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); -- if (__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_6 = __pyx_t_7; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":860 -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * # One could encode it in the format string and have Cython -- * # complain instead, BUT: < and > in format strings also imply -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 860, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":870 -- * -- * # Output padding bytes -- * while offset[0] < new_offset: # <<<<<<<<<<<<<< -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- */ -- while (1) { -- __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (!__pyx_t_6) break; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":871 -- * # Output padding bytes -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< -- * f += 1 -- * offset[0] += 1 -- */ -- (__pyx_v_f[0]) = 0x78; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":872 -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte -- * f += 1 # <<<<<<<<<<<<<< -- * offset[0] += 1 -- * -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":873 -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- * offset[0] += 1 # <<<<<<<<<<<<<< -- * -- * offset[0] += child.itemsize -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":875 -- * offset[0] += 1 -- * -- * offset[0] += child.itemsize # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(child): -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); -- if (__pyx_t_6) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":878 -- * -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num # <<<<<<<<<<<<<< -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 880, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":883 -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 98; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":884 -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":885 -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x68; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":886 -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 72; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":887 -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x69; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":888 -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 73; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":889 -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x6C; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":890 -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 76; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":891 -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x71; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":892 -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 81; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":893 -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":894 -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x64; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":895 -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x67; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":896 -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x66; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":897 -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x64; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":898 -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x67; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":899 -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (likely(__pyx_t_6)) { -- (__pyx_v_f[0]) = 79; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":901 -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * f += 1 -- * else: -- */ -- /*else*/ { -- __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 901, __pyx_L1_error) -- } -- __pyx_L15:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":902 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * f += 1 # <<<<<<<<<<<<<< -- * else: -- * # Cython ignores struct boundary information ("T{...}"), -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- goto __pyx_L13; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":906 -- * # Cython ignores struct boundary information ("T{...}"), -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< -- * return f -- * -- */ -- /*else*/ { -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 906, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- } -- __pyx_L13:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- } -- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":907 -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) -- * return f # <<<<<<<<<<<<<< -- * -- * -- */ -- __pyx_r = __pyx_v_f; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_4); -- __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = NULL; -- __pyx_L0:; -- __Pyx_XDECREF((PyObject *)__pyx_v_child); -- __Pyx_XDECREF(__pyx_v_fields); -- __Pyx_XDECREF(__pyx_v_childname); -- __Pyx_XDECREF(__pyx_v_new_offset); -- __Pyx_XDECREF(__pyx_v_t); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -- * int _import_umath() except -1 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 -+ * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< - * Py_INCREF(base) # important to do this before stealing the reference below! -@@ -7298,7 +5894,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("set_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1023 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":930 - * - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< -@@ -7307,7 +5903,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - Py_INCREF(__pyx_v_base); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1024 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":931 - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< -@@ -7316,7 +5912,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -7328,7 +5924,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyFinishContext(); - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -7343,7 +5939,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - int __pyx_t_1; - __Pyx_RefNannySetupContext("get_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1027 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":934 - * - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< -@@ -7352,7 +5948,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - __pyx_v_base = PyArray_BASE(__pyx_v_arr); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -7362,7 +5958,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_t_1 = ((__pyx_v_base == NULL) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1029 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":936 - * base = PyArray_BASE(arr) - * if base is NULL: - * return None # <<<<<<<<<<<<<< -@@ -7373,7 +5969,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -7382,7 +5978,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1030 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":937 - * if base is NULL: - * return None - * return base # <<<<<<<<<<<<<< -@@ -7394,7 +5990,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = ((PyObject *)__pyx_v_base); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -7409,12 +6005,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { -@@ -7428,13 +6024,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_array", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - { -@@ -7446,20 +6045,20 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1036 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":943 - * cdef inline int import_array() except -1: - * try: -- * _import_array() # <<<<<<<<<<<<<< -+ * __pyx_import_array() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") - */ -- __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error) -+ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - } -@@ -7469,9 +6068,9 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1037 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":944 - * try: -- * _import_array() -+ * __pyx_import_array() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.multiarray failed to import") - * -@@ -7479,32 +6078,32 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __PYX_ERR(2, 945, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - __Pyx_XGIVEREF(__pyx_t_1); -@@ -7515,12 +6114,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - /* function exit code */ -@@ -7538,7 +6137,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -7557,9 +6156,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_umath", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -7575,16 +6177,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1042 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":949 - * cdef inline int import_umath() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -7598,7 +6200,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1043 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":950 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< -@@ -7608,28 +6210,28 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __PYX_ERR(2, 951, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -7644,7 +6246,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -7667,7 +6269,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -7686,9 +6288,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_ufunc", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -7704,16 +6309,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1048 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":955 - * cdef inline int import_ufunc() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -7727,35 +6332,38 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1049 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":956 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") -+ * - */ - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1050 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":957 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -+ * -+ * cdef extern from *: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __PYX_ERR(2, 957, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -7770,7 +6378,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -7793,6 +6401,180 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - return __pyx_r; - } - -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_timedelta64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":979 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_datetime64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":994 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { -+ npy_datetime __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1004 -+ * also needed. That can be found using `get_datetime64_unit`. -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { -+ npy_timedelta __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1011 -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { -+ NPY_DATETIMEUNIT __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1018 -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ * """ -+ * return (obj).obmeta.base # <<<<<<<<<<<<<< -+ */ -+ __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ - static PyObject *__pyx_tp_new_4cylp_2cy_5CyCgl_CyCglCutGenerator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - PyObject *o; - if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { -@@ -7825,7 +6607,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglCutGenerator = { - sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglCutGenerator), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_5CyCgl_CyCglCutGenerator, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -7878,6 +6665,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglCutGenerator = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyObject *__pyx_tp_new_4cylp_2cy_5CyCgl_CyCglAllDifferent(PyTypeObject *t, PyObject *a, PyObject *k) { -@@ -7902,7 +6695,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglAllDifferent = { - sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglAllDifferent), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_5CyCgl_CyCglCutGenerator, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -7955,6 +6753,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglAllDifferent = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyObject *__pyx_tp_new_4cylp_2cy_5CyCgl_CyCglClique(PyTypeObject *t, PyObject *a, PyObject *k) { -@@ -7979,7 +6783,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglClique = { - sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglClique), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_5CyCgl_CyCglCutGenerator, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -8032,6 +6841,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglClique = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - static struct __pyx_vtabstruct_4cylp_2cy_5CyCgl_CyCglKnapsackCover __pyx_vtable_4cylp_2cy_5CyCgl_CyCglKnapsackCover; - -@@ -8079,7 +6894,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglKnapsackCover = { - sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglKnapsackCover), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_5CyCgl_CyCglCutGenerator, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -8132,6 +6952,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglKnapsackCover = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyObject *__pyx_tp_new_4cylp_2cy_5CyCgl_CyCglOddHole(PyTypeObject *t, PyObject *a, PyObject *k) { -@@ -8156,7 +6982,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglOddHole = { - sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglOddHole), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_5CyCgl_CyCglCutGenerator, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -8209,6 +7040,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglOddHole = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyObject *__pyx_tp_new_4cylp_2cy_5CyCgl_CyCglFlowCover(PyTypeObject *t, PyObject *a, PyObject *k) { -@@ -8233,7 +7070,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglFlowCover = { - sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglFlowCover), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_5CyCgl_CyCglCutGenerator, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -8286,6 +7128,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglFlowCover = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - static struct __pyx_vtabstruct_4cylp_2cy_5CyCgl_CyCglGomory __pyx_vtable_4cylp_2cy_5CyCgl_CyCglGomory; - -@@ -8333,7 +7181,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglGomory = { - sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglGomory), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_5CyCgl_CyCglCutGenerator, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -8386,6 +7239,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglGomory = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyObject *__pyx_tp_new_4cylp_2cy_5CyCgl_CyCglRedSplit(PyTypeObject *t, PyObject *a, PyObject *k) { -@@ -8410,7 +7269,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglRedSplit = { - sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglRedSplit), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_5CyCgl_CyCglCutGenerator, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -8460,8 +7324,14 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglRedSplit = { - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif -- #if PY_VERSION_HEX >= 0x030800b1 -- 0, /*tp_vectorcall*/ -+ #if PY_VERSION_HEX >= 0x030800b1 -+ 0, /*tp_vectorcall*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ - #endif - }; - -@@ -8487,7 +7357,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglLiftAndProject = { - sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglLiftAndProject), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_5CyCgl_CyCglCutGenerator, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -8540,6 +7415,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglLiftAndProject = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyObject *__pyx_tp_new_4cylp_2cy_5CyCgl_CyCglLandP(PyTypeObject *t, PyObject *a, PyObject *k) { -@@ -8564,7 +7445,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglLandP = { - sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglLandP), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_5CyCgl_CyCglCutGenerator, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -8617,6 +7503,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglLandP = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyObject *__pyx_tp_new_4cylp_2cy_5CyCgl_CyCglMixedIntegerRounding(PyTypeObject *t, PyObject *a, PyObject *k) { -@@ -8641,7 +7533,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglMixedIntegerRounding = { - sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglMixedIntegerRounding), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_5CyCgl_CyCglCutGenerator, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -8694,6 +7591,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglMixedIntegerRounding = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyObject *__pyx_tp_new_4cylp_2cy_5CyCgl_CyCglMixedIntegerRounding2(PyTypeObject *t, PyObject *a, PyObject *k) { -@@ -8718,7 +7621,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglMixedIntegerRounding2 = { - sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglMixedIntegerRounding2), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_5CyCgl_CyCglCutGenerator, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -8771,6 +7679,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglMixedIntegerRounding2 = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyObject *__pyx_tp_new_4cylp_2cy_5CyCgl_CyCglTwomir(PyTypeObject *t, PyObject *a, PyObject *k) { -@@ -8795,7 +7709,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglTwomir = { - sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglTwomir), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_5CyCgl_CyCglCutGenerator, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -8848,6 +7767,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglTwomir = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyObject *__pyx_tp_new_4cylp_2cy_5CyCgl_CyCglResidualCapacity(PyTypeObject *t, PyObject *a, PyObject *k) { -@@ -8872,7 +7797,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglResidualCapacity = { - sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglResidualCapacity), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_5CyCgl_CyCglCutGenerator, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -8925,6 +7855,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglResidualCapacity = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyObject *__pyx_tp_new_4cylp_2cy_5CyCgl_CyCglPreProcess(PyTypeObject *t, PyObject *a, PyObject *k) { -@@ -8949,7 +7885,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglPreProcess = { - sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglPreProcess), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_5CyCgl_CyCglCutGenerator, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -9002,6 +7943,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglPreProcess = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyObject *__pyx_tp_new_4cylp_2cy_5CyCgl_CyCglProbing(PyTypeObject *t, PyObject *a, PyObject *k) { -@@ -9026,7 +7973,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglProbing = { - sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglProbing), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_5CyCgl_CyCglCutGenerator, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -9079,6 +8031,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglProbing = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyObject *__pyx_tp_new_4cylp_2cy_5CyCgl_CyCglSimpleRounding(PyTypeObject *t, PyObject *a, PyObject *k) { -@@ -9103,7 +8061,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglSimpleRounding = { - sizeof(struct __pyx_obj_4cylp_2cy_5CyCgl_CyCglSimpleRounding), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_5CyCgl_CyCglCutGenerator, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -9156,6 +8119,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_5CyCgl_CyCglSimpleRounding = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyMethodDef __pyx_methods[] = { -@@ -9221,26 +8190,18 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_CyCglResidualCapacity, __pyx_k_CyCglResidualCapacity, sizeof(__pyx_k_CyCglResidualCapacity), 0, 0, 1, 1}, - {&__pyx_n_s_CyCglSimpleRounding, __pyx_k_CyCglSimpleRounding, sizeof(__pyx_k_CyCglSimpleRounding), 0, 0, 1, 1}, - {&__pyx_n_s_CyCglTwomir, __pyx_k_CyCglTwomir, sizeof(__pyx_k_CyCglTwomir), 0, 0, 1, 1}, -- {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, - {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, -- {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, -- {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, - {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, -- {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, - {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, - {&__pyx_n_s_limit, __pyx_k_limit, sizeof(__pyx_k_limit), 0, 0, 1, 1}, - {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, - {&__pyx_n_s_maxInKnapsack, __pyx_k_maxInKnapsack, sizeof(__pyx_k_maxInKnapsack), 0, 0, 1, 1}, - {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, -- {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, -- {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, - {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, - {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0}, - {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, - {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, -- {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, - {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, -@@ -9248,15 +8209,11 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, - {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, - {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, -- {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, - {0, 0, 0, 0, 0, 0, 0} - }; - static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error) -- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error) -- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(2, 285, __pyx_L1_error) -- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 856, __pyx_L1_error) -- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error) -+ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 945, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -@@ -9589,82 +8546,27 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_GOTREF(__pyx_tuple__34); - __Pyx_GIVEREF(__pyx_tuple__34); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__35); -- __Pyx_GIVEREF(__pyx_tuple__35); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__36); -- __Pyx_GIVEREF(__pyx_tuple__36); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__37); -- __Pyx_GIVEREF(__pyx_tuple__37); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__38); -- __Pyx_GIVEREF(__pyx_tuple__38); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__39); -- __Pyx_GIVEREF(__pyx_tuple__39); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(2, 1038, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__40); -- __Pyx_GIVEREF(__pyx_tuple__40); -+ __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(2, 945, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__35); -+ __Pyx_GIVEREF(__pyx_tuple__35); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(2, 1044, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__41); -- __Pyx_GIVEREF(__pyx_tuple__41); -+ __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(2, 951, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__36); -+ __Pyx_GIVEREF(__pyx_tuple__36); - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -9714,6 +8616,9 @@ static int __Pyx_modinit_function_export_code(void) { - - static int __Pyx_modinit_type_init_code(void) { - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); - /*--- Type init code ---*/ - if (PyType_Ready(&__pyx_type_4cylp_2cy_5CyCgl_CyCglCutGenerator) < 0) __PYX_ERR(1, 4, __pyx_L1_error) -@@ -9918,6 +8823,9 @@ static int __Pyx_modinit_type_init_code(void) { - static int __Pyx_modinit_type_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); - /*--- Type import code ---*/ - __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) -@@ -9931,18 +8839,38 @@ static int __Pyx_modinit_type_import_code(void) { - __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) -+ __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error) -- __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error) -- __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error) -+ __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error) -+ __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error) -- __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error) -+ __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error) -+ __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error) -+ __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error) -+ __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error) -+ __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error) -+ __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error) -+ __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error) -+ __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error) -+ __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error) -+ __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error) -+ __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_RefNannyFinishContext(); - return 0; -@@ -9969,17 +8897,19 @@ static int __Pyx_modinit_function_import_code(void) { - } - - --#if PY_MAJOR_VERSION < 3 --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC void --#else -+#ifndef CYTHON_NO_PYINIT_EXPORT - #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#elif PY_MAJOR_VERSION < 3 -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" void -+#else -+#define __Pyx_PyMODINIT_FUNC void - #endif - #else --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC PyObject * -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * - #else --#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#define __Pyx_PyMODINIT_FUNC PyObject * - #endif - #endif - -@@ -10061,6 +8991,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_CyCgl(PyObject *__pyx_pyinit_modul - #endif - { - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannyDeclarations - #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m) { -@@ -10108,11 +9041,9 @@ if (!__Pyx_RefNanny) { - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ -- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS -- #ifdef WITH_THREAD /* Python build with threading support? */ -+ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - PyEval_InitThreads(); - #endif -- #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; -@@ -10149,15 +9080,15 @@ if (!__Pyx_RefNanny) { - } - #endif - /*--- Builtin init code ---*/ -- if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Constants init code ---*/ -- if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Global type/function init code ---*/ - (void)__Pyx_modinit_global_init_code(); - (void)__Pyx_modinit_variable_export_code(); - (void)__Pyx_modinit_function_export_code(); -- if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; -- if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) -+ if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) - (void)__Pyx_modinit_variable_import_code(); - (void)__Pyx_modinit_function_import_code(); - /*--- Execution code ---*/ -@@ -10175,12 +9106,12 @@ if (!__Pyx_RefNanny) { - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -- * raise ImportError("numpy.core.umath failed to import") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - - /*--- Wrapped vars code ---*/ -@@ -10257,7 +9188,7 @@ static PyObject *__Pyx_GetBuiltinName(PyObject *name) { - #if CYTHON_COMPILING_IN_CPYTHON - static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; -- ternaryfunc call = func->ob_type->tp_call; -+ ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -@@ -10558,7 +9489,7 @@ static int __Pyx_ParseOptionalKeywords( - } - name = first_kw_arg; - #if PY_MAJOR_VERSION < 3 -- if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { -+ if (likely(PyString_Check(key))) { - while (*name) { - if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) - && _PyString_Eq(**name, key)) { -@@ -10585,7 +9516,7 @@ static int __Pyx_ParseOptionalKeywords( - while (*name) { - int cmp = (**name == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 -- (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : -+ (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**name, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; -@@ -10601,7 +9532,7 @@ static int __Pyx_ParseOptionalKeywords( - while (argname != first_kw_arg) { - int cmp = (**argname == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 -- (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : -+ (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**argname, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; -@@ -10652,263 +9583,6 @@ static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr - } - #endif - --/* PyCFunctionFastCall */ --#if CYTHON_FAST_PYCCALL --static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { -- PyCFunctionObject *func = (PyCFunctionObject*)func_obj; -- PyCFunction meth = PyCFunction_GET_FUNCTION(func); -- PyObject *self = PyCFunction_GET_SELF(func); -- int flags = PyCFunction_GET_FLAGS(func); -- assert(PyCFunction_Check(func)); -- assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); -- assert(nargs >= 0); -- assert(nargs == 0 || args != NULL); -- /* _PyCFunction_FastCallDict() must not be called with an exception set, -- because it may clear it (directly or indirectly) and so the -- caller loses its exception */ -- assert(!PyErr_Occurred()); -- if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { -- return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); -- } else { -- return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); -- } --} --#endif -- --/* PyFunctionFastCall */ --#if CYTHON_FAST_PYCALL --static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, -- PyObject *globals) { -- PyFrameObject *f; -- PyThreadState *tstate = __Pyx_PyThreadState_Current; -- PyObject **fastlocals; -- Py_ssize_t i; -- PyObject *result; -- assert(globals != NULL); -- /* XXX Perhaps we should create a specialized -- PyFrame_New() that doesn't take locals, but does -- take builtins without sanity checking them. -- */ -- assert(tstate != NULL); -- f = PyFrame_New(tstate, co, globals, NULL); -- if (f == NULL) { -- return NULL; -- } -- fastlocals = __Pyx_PyFrame_GetLocalsplus(f); -- for (i = 0; i < na; i++) { -- Py_INCREF(*args); -- fastlocals[i] = *args++; -- } -- result = PyEval_EvalFrameEx(f,0); -- ++tstate->recursion_depth; -- Py_DECREF(f); -- --tstate->recursion_depth; -- return result; --} --#if 1 || PY_VERSION_HEX < 0x030600B1 --static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { -- PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); -- PyObject *globals = PyFunction_GET_GLOBALS(func); -- PyObject *argdefs = PyFunction_GET_DEFAULTS(func); -- PyObject *closure; --#if PY_MAJOR_VERSION >= 3 -- PyObject *kwdefs; --#endif -- PyObject *kwtuple, **k; -- PyObject **d; -- Py_ssize_t nd; -- Py_ssize_t nk; -- PyObject *result; -- assert(kwargs == NULL || PyDict_Check(kwargs)); -- nk = kwargs ? PyDict_Size(kwargs) : 0; -- if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { -- return NULL; -- } -- if ( --#if PY_MAJOR_VERSION >= 3 -- co->co_kwonlyargcount == 0 && --#endif -- likely(kwargs == NULL || nk == 0) && -- co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { -- if (argdefs == NULL && co->co_argcount == nargs) { -- result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); -- goto done; -- } -- else if (nargs == 0 && argdefs != NULL -- && co->co_argcount == Py_SIZE(argdefs)) { -- /* function called with no arguments, but all parameters have -- a default value: use default values as arguments .*/ -- args = &PyTuple_GET_ITEM(argdefs, 0); -- result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); -- goto done; -- } -- } -- if (kwargs != NULL) { -- Py_ssize_t pos, i; -- kwtuple = PyTuple_New(2 * nk); -- if (kwtuple == NULL) { -- result = NULL; -- goto done; -- } -- k = &PyTuple_GET_ITEM(kwtuple, 0); -- pos = i = 0; -- while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { -- Py_INCREF(k[i]); -- Py_INCREF(k[i+1]); -- i += 2; -- } -- nk = i / 2; -- } -- else { -- kwtuple = NULL; -- k = NULL; -- } -- closure = PyFunction_GET_CLOSURE(func); --#if PY_MAJOR_VERSION >= 3 -- kwdefs = PyFunction_GET_KW_DEFAULTS(func); --#endif -- if (argdefs != NULL) { -- d = &PyTuple_GET_ITEM(argdefs, 0); -- nd = Py_SIZE(argdefs); -- } -- else { -- d = NULL; -- nd = 0; -- } --#if PY_MAJOR_VERSION >= 3 -- result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, -- args, (int)nargs, -- k, (int)nk, -- d, (int)nd, kwdefs, closure); --#else -- result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, -- args, (int)nargs, -- k, (int)nk, -- d, (int)nd, closure); --#endif -- Py_XDECREF(kwtuple); --done: -- Py_LeaveRecursiveCall(); -- return result; --} --#endif --#endif -- --/* PyObjectCallMethO */ --#if CYTHON_COMPILING_IN_CPYTHON --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { -- PyObject *self, *result; -- PyCFunction cfunc; -- cfunc = PyCFunction_GET_FUNCTION(func); -- self = PyCFunction_GET_SELF(func); -- if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -- return NULL; -- result = cfunc(self, arg); -- Py_LeaveRecursiveCall(); -- if (unlikely(!result) && unlikely(!PyErr_Occurred())) { -- PyErr_SetString( -- PyExc_SystemError, -- "NULL result without error in PyObject_Call"); -- } -- return result; --} --#endif -- --/* PyObjectCallOneArg */ --#if CYTHON_COMPILING_IN_CPYTHON --static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { -- PyObject *result; -- PyObject *args = PyTuple_New(1); -- if (unlikely(!args)) return NULL; -- Py_INCREF(arg); -- PyTuple_SET_ITEM(args, 0, arg); -- result = __Pyx_PyObject_Call(func, args, NULL); -- Py_DECREF(args); -- return result; --} --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { --#if CYTHON_FAST_PYCALL -- if (PyFunction_Check(func)) { -- return __Pyx_PyFunction_FastCall(func, &arg, 1); -- } --#endif -- if (likely(PyCFunction_Check(func))) { -- if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { -- return __Pyx_PyObject_CallMethO(func, arg); --#if CYTHON_FAST_PYCCALL -- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { -- return __Pyx_PyCFunction_FastCall(func, &arg, 1); --#endif -- } -- } -- return __Pyx__PyObject_CallOneArg(func, arg); --} --#else --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { -- PyObject *result; -- PyObject *args = PyTuple_Pack(1, arg); -- if (unlikely(!args)) return NULL; -- result = __Pyx_PyObject_Call(func, args, NULL); -- Py_DECREF(args); -- return result; --} --#endif -- --/* DictGetItem */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { -- PyObject *value; -- value = PyDict_GetItemWithError(d, key); -- if (unlikely(!value)) { -- if (!PyErr_Occurred()) { -- if (unlikely(PyTuple_Check(key))) { -- PyObject* args = PyTuple_Pack(1, key); -- if (likely(args)) { -- PyErr_SetObject(PyExc_KeyError, args); -- Py_DECREF(args); -- } -- } else { -- PyErr_SetObject(PyExc_KeyError, key); -- } -- } -- return NULL; -- } -- Py_INCREF(value); -- return value; --} --#endif -- --/* RaiseTooManyValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { -- PyErr_Format(PyExc_ValueError, -- "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); --} -- --/* RaiseNeedMoreValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { -- PyErr_Format(PyExc_ValueError, -- "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", -- index, (index == 1) ? "" : "s"); --} -- --/* RaiseNoneIterError */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); --} -- --/* ExtTypeTest */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { -- if (unlikely(!type)) { -- PyErr_SetString(PyExc_SystemError, "Missing type object"); -- return 0; -- } -- if (likely(__Pyx_TypeCheck(obj, type))) -- return 1; -- PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", -- Py_TYPE(obj)->tp_name, type->tp_name); -- return 0; --} -- - /* GetTopmostException */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * -@@ -11114,6 +9788,28 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - } - #endif - -+/* PyObjectGetAttrStrNoError */ -+static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { -+ __Pyx_PyThreadState_declare -+ __Pyx_PyThreadState_assign -+ if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) -+ __Pyx_PyErr_Clear(); -+} -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { -+ PyObject *result; -+#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 -+ PyTypeObject* tp = Py_TYPE(obj); -+ if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { -+ return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); -+ } -+#endif -+ result = __Pyx_PyObject_GetAttrStr(obj, attr_name); -+ if (unlikely(!result)) { -+ __Pyx_PyObject_GetAttrStr_ClearAttributeError(); -+ } -+ return result; -+} -+ - /* SetupReduce */ - static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { - int ret; -@@ -11141,43 +9837,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { - PyObject *setstate = NULL; - PyObject *setstate_cython = NULL; - #if CYTHON_USE_PYTYPE_LOOKUP -- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #else -- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #endif - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #else -- object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #endif -- reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; -+ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; - if (reduce_ex == object_reduce_ex) { - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #else -- object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #endif -- reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; -+ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; - if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { -- reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; -+ reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); -+ if (likely(reduce_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (reduce == object_reduce || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); - if (!setstate) PyErr_Clear(); - if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { -- setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; -+ setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); -+ if (likely(setstate_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (!setstate || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - } - PyType_Modified((PyTypeObject*)type_obj); - } - } -- goto GOOD; --BAD: -+ goto __PYX_GOOD; -+__PYX_BAD: - if (!PyErr_Occurred()) - PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); - ret = -1; --GOOD: -+__PYX_GOOD: - #if !CYTHON_USE_PYTYPE_LOOKUP - Py_XDECREF(object_reduce); - Py_XDECREF(object_reduce_ex); -@@ -11297,7 +10001,7 @@ static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UIN - - /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK --static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { -+static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { - PyObject *use_cline; - PyObject *ptype, *pvalue, *ptraceback; - #if CYTHON_COMPILING_IN_CPYTHON -@@ -11327,7 +10031,7 @@ static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { - } - if (!use_cline) { - c_line = 0; -- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); -+ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; -@@ -11401,7 +10105,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - if (__pyx_code_cache.count == __pyx_code_cache.max_count) { - int new_max = __pyx_code_cache.max_count + 64; - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( -- __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); -+ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); - if (unlikely(!entries)) { - return; - } -@@ -11424,30 +10128,31 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { -- PyCodeObject *py_code = 0; -- PyObject *py_srcfile = 0; -- PyObject *py_funcname = 0; -+ PyCodeObject *py_code = NULL; -+ PyObject *py_funcname = NULL; - #if PY_MAJOR_VERSION < 3 -+ PyObject *py_srcfile = NULL; - py_srcfile = PyString_FromString(filename); -- #else -- py_srcfile = PyUnicode_FromString(filename); -- #endif - if (!py_srcfile) goto bad; -+ #endif - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; -+ funcname = PyUnicode_AsUTF8(py_funcname); -+ if (!funcname) goto bad; - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); -- #else -- py_funcname = PyUnicode_FromString(funcname); -+ if (!py_funcname) goto bad; - #endif - } -- if (!py_funcname) goto bad; -+ #if PY_MAJOR_VERSION < 3 - py_code = __Pyx_PyCode_New( - 0, - 0, -@@ -11466,11 +10171,16 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - __pyx_empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); -- Py_DECREF(py_funcname); -+ #else -+ py_code = PyCode_NewEmpty(filename, funcname, py_line); -+ #endif -+ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline - return py_code; - bad: -- Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -+ #if PY_MAJOR_VERSION < 3 -+ Py_XDECREF(py_srcfile); -+ #endif - return NULL; - } - static void __Pyx_AddTraceback(const char *funcname, int c_line, -@@ -11502,37 +10212,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - Py_XDECREF(py_frame); - } - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(int) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(int) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(int) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(int), -- little, !is_unsigned); -- } --} -- - /* CIntFromPyVerify */ - #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ - __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) -@@ -11672,7 +10351,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_float(a, a); - return __Pyx_c_prod_float(a, a); - case 3: - z = __Pyx_c_prod_float(a, a); -@@ -11827,7 +10505,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_double(a, a); - return __Pyx_c_prod_double(a, a); - case 3: - z = __Pyx_c_prod_double(a, a); -@@ -11866,24 +10543,31 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - #endif - - /* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { -- const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { -- if (sizeof(enum NPY_TYPES) < sizeof(long)) { -+ if (sizeof(int) < sizeof(long)) { - return PyInt_FromLong((long) value); -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { -+ } else if (sizeof(int) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); - #ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); - #endif - } - } else { -- if (sizeof(enum NPY_TYPES) <= sizeof(long)) { -+ if (sizeof(int) <= sizeof(long)) { - return PyInt_FromLong((long) value); - #ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); - #endif - } -@@ -11891,14 +10575,21 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES v - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), -+ return _PyLong_FromByteArray(bytes, sizeof(int), - little, !is_unsigned); - } - } - - /* CIntFromPy */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -12087,7 +10778,14 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - - /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(long) < sizeof(long)) { -@@ -12118,7 +10816,14 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - - /* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -12669,6 +11374,23 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_DECREF(x); - return ival; - } -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { -+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { -+ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); -+#if PY_MAJOR_VERSION < 3 -+ } else if (likely(PyInt_CheckExact(o))) { -+ return PyInt_AS_LONG(o); -+#endif -+ } else { -+ Py_ssize_t ival; -+ PyObject *x; -+ x = PyNumber_Index(o); -+ if (!x) return -1; -+ ival = PyInt_AsLong(x); -+ Py_DECREF(x); -+ return ival; -+ } -+} - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); - } -diff --git a/cylp/cy/CyCglCutGeneratorBase.cpp b/cylp/cy/CyCglCutGeneratorBase.cpp -index acf66c0..5195449 100644 ---- a/cylp/cy/CyCglCutGeneratorBase.cpp -+++ b/cylp/cy/CyCglCutGeneratorBase.cpp -@@ -1,14 +1,16 @@ --/* Generated by Cython 0.29.12 */ -+/* Generated by Cython 0.29.25 */ - -+#ifndef PY_SSIZE_T_CLEAN - #define PY_SSIZE_T_CLEAN -+#endif /* PY_SSIZE_T_CLEAN */ - #include "Python.h" - #ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. - #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. - #else --#define CYTHON_ABI "0_29_12" --#define CYTHON_HEX_VERSION 0x001D0CF0 -+#define CYTHON_ABI "0_29_25" -+#define CYTHON_HEX_VERSION 0x001D19F0 - #define CYTHON_FUTURE_DIVISION 0 - #include - #ifndef offsetof -@@ -155,7 +157,7 @@ - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif -- #if PY_VERSION_HEX < 0x030300F0 -+ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) -@@ -174,7 +176,7 @@ - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL -- #define CYTHON_FAST_PYCALL 1 -+ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1) - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) -@@ -193,7 +195,9 @@ - #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) - #endif - #if CYTHON_USE_PYLONG_INTERNALS -- #include "longintrepr.h" -+ #if PY_MAJOR_VERSION < 3 -+ #include "longintrepr.h" -+ #endif - #undef SHIFT - #undef BASE - #undef MASK -@@ -324,9 +328,68 @@ class __Pyx_FakeReference { - #define __Pyx_DefaultClassType PyClass_Type - #else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" --#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 -- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ -- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -+ #define __Pyx_DefaultClassType PyType_Type -+#if PY_VERSION_HEX >= 0x030B00A1 -+ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, -+ PyObject *code, PyObject *c, PyObject* n, PyObject *v, -+ PyObject *fv, PyObject *cell, PyObject* fn, -+ PyObject *name, int fline, PyObject *lnos) { -+ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; -+ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; -+ const char *fn_cstr=NULL; -+ const char *name_cstr=NULL; -+ PyCodeObject* co=NULL; -+ PyObject *type, *value, *traceback; -+ PyErr_Fetch(&type, &value, &traceback); -+ if (!(kwds=PyDict_New())) goto end; -+ if (!(argcount=PyLong_FromLong(a))) goto end; -+ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; -+ if (!(posonlyargcount=PyLong_FromLong(0))) goto end; -+ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; -+ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; -+ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; -+ if (!(nlocals=PyLong_FromLong(l))) goto end; -+ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; -+ if (!(stacksize=PyLong_FromLong(s))) goto end; -+ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; -+ if (!(flags=PyLong_FromLong(f))) goto end; -+ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; -+ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; -+ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; -+ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; -+ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; -+ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here -+ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; -+ Py_XDECREF((PyObject*)co); -+ co = (PyCodeObject*)call_result; -+ call_result = NULL; -+ if (0) { -+ cleanup_code_too: -+ Py_XDECREF((PyObject*)co); -+ co = NULL; -+ } -+ end: -+ Py_XDECREF(kwds); -+ Py_XDECREF(argcount); -+ Py_XDECREF(posonlyargcount); -+ Py_XDECREF(kwonlyargcount); -+ Py_XDECREF(nlocals); -+ Py_XDECREF(stacksize); -+ Py_XDECREF(replace); -+ Py_XDECREF(call_result); -+ Py_XDECREF(empty); -+ if (type) { -+ PyErr_Restore(type, value, traceback); -+ } -+ return co; -+ } - #else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -@@ -440,8 +503,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #endif - #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 -+ #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) -+ #else -+ #define __Pyx_PyUnicode_READY(op) (0) -+ #endif - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) -@@ -449,7 +516,15 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) -+ #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) -+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) -+ #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) -+ #endif -+ #else -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) -+ #endif - #else - #define CYTHON_PEP393_ENABLED 0 - #define PyUnicode_1BYTE_KIND 1 -@@ -498,8 +573,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define PyString_Type PyUnicode_Type - #define PyString_Check PyUnicode_Check - #define PyString_CheckExact PyUnicode_CheckExact -+#ifndef PyObject_Unicode - #define PyObject_Unicode PyObject_Str - #endif -+#endif - #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) - #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) -@@ -510,6 +587,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #ifndef PySet_CheckExact - #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) - #endif -+#if PY_VERSION_HEX >= 0x030900A4 -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) -+#else -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) -+#endif - #if CYTHON_ASSUME_SAFE_MACROS - #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) - #else -@@ -543,13 +627,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong -- #define __Pyx_PyInt_AsHash_t PyInt_AsLong -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t - #else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t -- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t - #endif - #if PY_MAJOR_VERSION >= 3 -- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) -+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) - #else - #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) - #endif -@@ -590,11 +674,10 @@ static CYTHON_INLINE float __PYX_NAN() { - #define __Pyx_truncl truncl - #endif - -- -+#define __PYX_MARK_ERR_POS(f_index, lineno) \ -+ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } - #define __PYX_ERR(f_index, lineno, Ln_error) \ --{ \ -- __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ --} -+ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } - - #ifndef __PYX_EXTERN_C - #ifdef __cplusplus -@@ -615,7 +698,13 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "ClpFactorization.hpp" - #include "IClpPrimalColumnPivotBase.h" - #include "numpy/arrayobject.h" -+#include "numpy/ndarrayobject.h" -+#include "numpy/ndarraytypes.h" -+#include "numpy/arrayscalars.h" - #include "numpy/ufuncobject.h" -+ -+ /* NumPy API declarations from "numpy/__init__.pxd" */ -+ - #include "ClpDualRowPivot.hpp" - #include "IClpDualRowPivotBase.h" - #include "CoinModel.hpp" -@@ -643,11 +732,11 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "OsiSolverInterface.hpp" - #include "CbcCompareUser.hpp" - #include "ICbcModel.hpp" -+#include - #include "ios" - #include "new" - #include "stdexcept" - #include "typeinfo" --#include - #include - #include "IClpSimplex.hpp" - #include "IOsiCuts.hpp" -@@ -749,6 +838,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); - static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); - #if CYTHON_ASSUME_SAFE_MACROS - #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) - #else -@@ -884,26 +974,26 @@ static const char *__pyx_filename; - - static const char *__pyx_f[] = { - "stringsource", -- "cylp\\cy\\CyCglCutGeneratorBase.pyx", -+ "cylp/cy/CyCglCutGeneratorBase.pyx", - "__init__.pxd", - "type.pxd", - "bool.pxd", - "complex.pxd", -- "cylp\\cy\\CyCoinIndexedVector.pxd", -- "cylp\\cy\\CyClpPrimalColumnPivotBase.pxd", -- "cylp\\cy\\CyClpDualRowPivotBase.pxd", -- "cylp\\cy\\CyCoinModel.pxd", -- "cylp\\cy\\CyCoinPackedMatrix.pxd", -- "cylp\\cy\\CyCgl.pxd", -- "cylp\\cy\\CyCbcNode.pxd", -- "cylp\\cy\\CyOsiSolverInterface.pxd", -- "cylp\\cy\\CyCbcModel.pxd", -- "cylp\\cy\\CyClpSimplex.pxd", -- "cylp\\cy\\CyOsiCuts.pxd", -- "cylp\\cy\\CyCglTreeInfo.pxd", -+ "cylp/cy/CyCoinIndexedVector.pxd", -+ "cylp/cy/CyClpPrimalColumnPivotBase.pxd", -+ "cylp/cy/CyClpDualRowPivotBase.pxd", -+ "cylp/cy/CyCoinModel.pxd", -+ "cylp/cy/CyCoinPackedMatrix.pxd", -+ "cylp/cy/CyCgl.pxd", -+ "cylp/cy/CyCbcNode.pxd", -+ "cylp/cy/CyOsiSolverInterface.pxd", -+ "cylp/cy/CyCbcModel.pxd", -+ "cylp/cy/CyClpSimplex.pxd", -+ "cylp/cy/CyOsiCuts.pxd", -+ "cylp/cy/CyCglTreeInfo.pxd", - }; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":776 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":690 - * # in Cython to enable them only on the right systems. - * - * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< -@@ -912,7 +1002,7 @@ static const char *__pyx_f[] = { - */ - typedef npy_int8 __pyx_t_5numpy_int8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":777 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":691 - * - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< -@@ -921,7 +1011,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; - */ - typedef npy_int16 __pyx_t_5numpy_int16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":778 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":692 - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< -@@ -930,7 +1020,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; - */ - typedef npy_int32 __pyx_t_5numpy_int32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":779 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":693 - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t - * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< -@@ -939,7 +1029,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; - */ - typedef npy_int64 __pyx_t_5numpy_int64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":783 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":697 - * #ctypedef npy_int128 int128_t - * - * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< -@@ -948,7 +1038,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; - */ - typedef npy_uint8 __pyx_t_5numpy_uint8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":784 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":698 - * - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< -@@ -957,7 +1047,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; - */ - typedef npy_uint16 __pyx_t_5numpy_uint16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":785 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":699 - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< -@@ -966,7 +1056,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; - */ - typedef npy_uint32 __pyx_t_5numpy_uint32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":786 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":700 - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t - * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< -@@ -975,7 +1065,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; - */ - typedef npy_uint64 __pyx_t_5numpy_uint64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":790 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":704 - * #ctypedef npy_uint128 uint128_t - * - * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< -@@ -984,7 +1074,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; - */ - typedef npy_float32 __pyx_t_5numpy_float32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":791 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":705 - * - * ctypedef npy_float32 float32_t - * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< -@@ -993,7 +1083,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; - */ - typedef npy_float64 __pyx_t_5numpy_float64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":800 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":714 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< -@@ -1002,7 +1092,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; - */ - typedef npy_long __pyx_t_5numpy_int_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":801 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":715 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< -@@ -1011,7 +1101,7 @@ typedef npy_long __pyx_t_5numpy_int_t; - */ - typedef npy_longlong __pyx_t_5numpy_long_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":802 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":716 - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t - * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< -@@ -1020,7 +1110,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; - */ - typedef npy_longlong __pyx_t_5numpy_longlong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":804 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":718 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< -@@ -1029,7 +1119,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; - */ - typedef npy_ulong __pyx_t_5numpy_uint_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":805 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":719 - * - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< -@@ -1038,7 +1128,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":806 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":720 - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t - * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< -@@ -1047,7 +1137,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":808 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":722 - * ctypedef npy_ulonglong ulonglong_t - * - * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< -@@ -1056,7 +1146,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - */ - typedef npy_intp __pyx_t_5numpy_intp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":809 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":723 - * - * ctypedef npy_intp intp_t - * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< -@@ -1065,7 +1155,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; - */ - typedef npy_uintp __pyx_t_5numpy_uintp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":811 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":725 - * ctypedef npy_uintp uintp_t - * - * ctypedef npy_double float_t # <<<<<<<<<<<<<< -@@ -1074,7 +1164,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; - */ - typedef npy_double __pyx_t_5numpy_float_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":812 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":726 - * - * ctypedef npy_double float_t - * ctypedef npy_double double_t # <<<<<<<<<<<<<< -@@ -1083,7 +1173,7 @@ typedef npy_double __pyx_t_5numpy_float_t; - */ - typedef npy_double __pyx_t_5numpy_double_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":813 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":727 - * ctypedef npy_double float_t - * ctypedef npy_double double_t - * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< -@@ -1148,7 +1238,7 @@ struct __pyx_obj_4cylp_2cy_9CyOsiCuts_CyOsiCuts; - struct __pyx_obj_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo; - struct __pyx_obj_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":815 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":729 - * ctypedef npy_longdouble longdouble_t - * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< -@@ -1157,7 +1247,7 @@ struct __pyx_obj_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase; - */ - typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":816 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":730 - * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< -@@ -1166,7 +1256,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - */ - typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":817 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":731 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< -@@ -1175,7 +1265,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - */ - typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":819 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":733 - * ctypedef npy_clongdouble clongdouble_t - * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< -@@ -1972,67 +2062,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg - /* RaiseException.proto */ - static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); - --/* PyCFunctionFastCall.proto */ --#if CYTHON_FAST_PYCCALL --static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); --#else --#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) --#endif -- --/* PyFunctionFastCall.proto */ --#if CYTHON_FAST_PYCALL --#define __Pyx_PyFunction_FastCall(func, args, nargs)\ -- __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) --#if 1 || PY_VERSION_HEX < 0x030600B1 --static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); --#else --#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) --#endif --#define __Pyx_BUILD_ASSERT_EXPR(cond)\ -- (sizeof(char [1 - 2*!(cond)]) - 1) --#ifndef Py_MEMBER_SIZE --#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) --#endif -- static size_t __pyx_pyframe_localsplus_offset = 0; -- #include "frameobject.h" -- #define __Pxy_PyFrame_Initialize_Offsets()\ -- ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ -- (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) -- #define __Pyx_PyFrame_GetLocalsplus(frame)\ -- (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) --#endif -- --/* PyObjectCallMethO.proto */ --#if CYTHON_COMPILING_IN_CPYTHON --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); --#endif -- --/* PyObjectCallOneArg.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); -- --/* DictGetItem.proto */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); --#define __Pyx_PyObject_Dict_GetItem(obj, name)\ -- (likely(PyDict_CheckExact(obj)) ?\ -- __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) --#else --#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) --#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) --#endif -- --/* RaiseTooManyValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); -- --/* RaiseNeedMoreValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); -- --/* RaiseNoneIterError.proto */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -- --/* ExtTypeTest.proto */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); -- - /* GetTopmostException.proto */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); -@@ -2082,6 +2111,9 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - /* SetVTable.proto */ - static int __Pyx_SetVtable(PyObject *dict, void *vtable); - -+/* PyObjectGetAttrStrNoError.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); -+ - /* SetupReduce.proto */ - static int __Pyx_setup_reduce(PyObject* type_obj); - -@@ -2252,14 +2284,10 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - #endif - #endif - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -- --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); -- --/* CIntFromPy.proto */ --static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); -+/* GCCDiagnostics.proto */ -+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -+#define __Pyx_HAS_GCC_DIAGNOSTIC -+#endif - - /* CIntToPy.proto */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); -@@ -2267,6 +2295,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); - /* CIntFromPy.proto */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); - -+/* CIntFromPy.proto */ -+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); -+ - /* FastTypeChecks.proto */ - #if CYTHON_COMPILING_IN_CPYTHON - #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) -@@ -2390,8 +2421,17 @@ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; - static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; - static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; - static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -+static PyTypeObject *__pyx_ptype_5numpy_generic = 0; -+static PyTypeObject *__pyx_ptype_5numpy_number = 0; -+static PyTypeObject *__pyx_ptype_5numpy_integer = 0; -+static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; -+static PyTypeObject *__pyx_ptype_5numpy_floating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; -+static PyTypeObject *__pyx_ptype_5numpy_character = 0; - static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ - - /* Module declarations from 'cylp.cy.CyClpDualRowPivotBase' */ - static PyTypeObject *__pyx_ptype_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase = 0; -@@ -2454,60 +2494,40 @@ int __pyx_module_is_main_cylp__cy__CyCglCutGeneratorBase = 0; - - /* Implementation of 'cylp.cy.CyCglCutGeneratorBase' */ - static PyObject *__pyx_builtin_TypeError; --static PyObject *__pyx_builtin_ValueError; --static PyObject *__pyx_builtin_range; --static PyObject *__pyx_builtin_RuntimeError; - static PyObject *__pyx_builtin_ImportError; - static const char __pyx_k_main[] = "__main__"; - static const char __pyx_k_name[] = "__name__"; - static const char __pyx_k_test[] = "__test__"; --static const char __pyx_k_range[] = "range"; - static const char __pyx_k_import[] = "__import__"; - static const char __pyx_k_reduce[] = "__reduce__"; - static const char __pyx_k_getstate[] = "__getstate__"; - static const char __pyx_k_setstate[] = "__setstate__"; - static const char __pyx_k_TypeError[] = "TypeError"; - static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; --static const char __pyx_k_ValueError[] = "ValueError"; - static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; - static const char __pyx_k_ImportError[] = "ImportError"; --static const char __pyx_k_RuntimeError[] = "RuntimeError"; - static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; - static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; - static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; - static const char __pyx_k_CyCglCutGeneratorBase[] = "CyCglCutGeneratorBase"; --static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; - static const char __pyx_k_cylp_cy_CyCglCutGeneratorBase[] = "cylp.cy.CyCglCutGeneratorBase"; - static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; --static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; - static const char __pyx_k_CyCglCutGenerator_pyx_generateCu[] = "CyCglCutGenerator.pyx: generateCuts must be implemented."; --static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; --static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; --static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; - static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; - static const char __pyx_k_self_CppSelf_cannot_be_converted[] = "self.CppSelf cannot be converted to a Python object for pickling"; --static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; - static PyObject *__pyx_n_s_CyCglCutGeneratorBase; - static PyObject *__pyx_kp_s_CyCglCutGenerator_pyx_generateCu; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; - static PyObject *__pyx_n_s_ImportError; --static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; --static PyObject *__pyx_n_s_RuntimeError; - static PyObject *__pyx_n_s_TypeError; --static PyObject *__pyx_n_s_ValueError; - static PyObject *__pyx_n_s_cline_in_traceback; - static PyObject *__pyx_n_s_cylp_cy_CyCglCutGeneratorBase; - static PyObject *__pyx_n_s_getstate; - static PyObject *__pyx_n_s_import; - static PyObject *__pyx_n_s_main; - static PyObject *__pyx_n_s_name; --static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; --static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; - static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; - static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; - static PyObject *__pyx_n_s_pyx_vtable; --static PyObject *__pyx_n_s_range; - static PyObject *__pyx_n_s_reduce; - static PyObject *__pyx_n_s_reduce_cython; - static PyObject *__pyx_n_s_reduce_ex; -@@ -2515,24 +2535,16 @@ static PyObject *__pyx_kp_s_self_CppSelf_cannot_be_converted; - static PyObject *__pyx_n_s_setstate; - static PyObject *__pyx_n_s_setstate_cython; - static PyObject *__pyx_n_s_test; --static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; - static int __pyx_pf_4cylp_2cy_21CyCglCutGeneratorBase_21CyCglCutGeneratorBase___init__(struct __pyx_obj_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase *__pyx_v_self); /* proto */ - static void __pyx_pf_4cylp_2cy_21CyCglCutGeneratorBase_21CyCglCutGeneratorBase_2__dealloc__(struct __pyx_obj_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_21CyCglCutGeneratorBase_21CyCglCutGeneratorBase_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_21CyCglCutGeneratorBase_21CyCglCutGeneratorBase_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ - static PyObject *__pyx_tp_new_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ - static PyObject *__pyx_tuple_; - static PyObject *__pyx_tuple__2; - static PyObject *__pyx_tuple__3; - static PyObject *__pyx_tuple__4; - static PyObject *__pyx_tuple__5; --static PyObject *__pyx_tuple__6; --static PyObject *__pyx_tuple__7; --static PyObject *__pyx_tuple__8; --static PyObject *__pyx_tuple__9; --static PyObject *__pyx_tuple__10; - /* Late includes */ - - /* "cylp/cy/CyCglCutGeneratorBase.pyx":6 -@@ -2546,6 +2558,9 @@ static PyObject *__pyx_tuple__10; - static void __pyx_f_4cylp_2cy_21CyCglCutGeneratorBase_RunGenerateCuts(void *__pyx_v_ptr, OsiSolverInterface *__pyx_v_si, CppOsiCuts *__pyx_v_cs, CglTreeInfo __pyx_v_info) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("RunGenerateCuts", 0); - - /* "cylp/cy/CyCglCutGeneratorBase.pyx":9 -@@ -2739,6 +2754,9 @@ static PyObject *__pyx_f_4cylp_2cy_21CyCglCutGeneratorBase_21CyCglCutGeneratorBa - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("generateCuts", 0); - - /* "cylp/cy/CyCglCutGeneratorBase.pyx":30 -@@ -2843,6 +2861,9 @@ static PyObject *__pyx_pf_4cylp_2cy_21CyCglCutGeneratorBase_21CyCglCutGeneratorB - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -2898,6 +2919,9 @@ static PyObject *__pyx_pf_4cylp_2cy_21CyCglCutGeneratorBase_21CyCglCutGeneratorB - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -2928,1918 +2952,331 @@ static PyObject *__pyx_pf_4cylp_2cy_21CyCglCutGeneratorBase_21CyCglCutGeneratorB - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 -+ * ctypedef npy_cdouble complex_t -+ * -+ * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(1, a) -+ * - */ - --/* Python wrapper */ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); -- __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_v_i; -- int __pyx_v_ndim; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- int __pyx_v_t; -- char *__pyx_v_f; -- PyArray_Descr *__pyx_v_descr = 0; -- int __pyx_v_offset; -- int __pyx_r; -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { -+ PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- int __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- int __pyx_t_4; -- int __pyx_t_5; -- int __pyx_t_6; -- PyArray_Descr *__pyx_t_7; -- PyObject *__pyx_t_8 = NULL; -- char *__pyx_t_9; -- if (__pyx_v_info == NULL) { -- PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); -- return -1; -- } -- __Pyx_RefNannySetupContext("__getbuffer__", 0); -- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); -- __Pyx_GIVEREF(__pyx_v_info->obj); -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":265 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":736 - * -- * cdef int i, ndim -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":266 -- * cdef int i, ndim -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew1(a): -+ * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< - * -- * ndim = PyArray_NDIM(self) -+ * cdef inline object PyArray_MultiIterNew2(a, b): - */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":268 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 -+ * ctypedef npy_cdouble complex_t - * -- * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(1, a) - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) - */ -- __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L4_bool_binop_done; -- } -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":271 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 -+ * return PyArray_MultiIterNew(1, a) - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not C contiguous") -+ * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(2, a, b) - * - */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L4_bool_binop_done:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":739 - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 272, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -+ * cdef inline object PyArray_MultiIterNew2(a, b): -+ * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): - */ -- } -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 -+ * return PyArray_MultiIterNew(1, a) -+ * -+ * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(2, a, b) - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") - */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L7_bool_binop_done; -- } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":275 -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 -+ * return PyArray_MultiIterNew(2, a, b) - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not Fortran contiguous") -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(3, a, b, c) - * - */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L7_bool_binop_done:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":742 - * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 276, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): -+ * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - */ -- } -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":278 -- * raise ValueError(u"ndarray is not Fortran contiguous") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 -+ * return PyArray_MultiIterNew(2, a, b) - * -- * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":279 -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(3, a, b, c) - * -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * # Allocate new buffer for strides and shape info. -- */ -- __pyx_v_info->ndim = __pyx_v_ndim; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":283 -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- */ -- __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":284 -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim # <<<<<<<<<<<<<< -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- */ -- __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":285 -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim -- * for i in range(ndim): # <<<<<<<<<<<<<< -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] -- */ -- __pyx_t_4 = __pyx_v_ndim; -- __pyx_t_5 = __pyx_t_4; -- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { -- __pyx_v_i = __pyx_t_6; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":286 -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- */ -- (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":287 -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< -- * else: -- * info.strides = PyArray_STRIDES(self) -- */ -- (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. - */ -- goto __pyx_L9; -- } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":289 -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- */ -- /*else*/ { -- __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":290 -- * else: -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 -+ * return PyArray_MultiIterNew(3, a, b, c) -+ * -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(4, a, b, c, d) -+ * - */ -- __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); -- } -- __pyx_L9:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":291 -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL # <<<<<<<<<<<<<< -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) -- */ -- __pyx_v_info->suboffsets = NULL; -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":292 -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< -- * info.readonly = not PyArray_ISWRITEABLE(self) -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":745 - * -- */ -- __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":293 -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -+ * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< - * -- * cdef int t -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - */ -- __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":296 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 -+ * return PyArray_MultiIterNew(3, a, b, c) - * -- * cdef int t -- * cdef char* f = NULL # <<<<<<<<<<<<<< -- * cdef dtype descr = PyArray_DESCR(self) -- * cdef int offset -- */ -- __pyx_v_f = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":297 -- * cdef int t -- * cdef char* f = NULL -- * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< -- * cdef int offset -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(4, a, b, c, d) - * - */ -- __pyx_t_7 = PyArray_DESCR(__pyx_v_self); -- __pyx_t_3 = ((PyObject *)__pyx_t_7); -- __Pyx_INCREF(__pyx_t_3); -- __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); -- __pyx_t_3 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":300 -- * cdef int offset -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 -+ * return PyArray_MultiIterNew(4, a, b, c, d) - * -- * info.obj = self # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * if not PyDataType_HASFIELDS(descr): - */ -- __Pyx_INCREF(((PyObject *)__pyx_v_self)); -- __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); -- __pyx_v_info->obj = ((PyObject *)__pyx_v_self); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":748 -+ * -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< - * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -+ * cdef inline tuple PyDataType_SHAPE(dtype d): - */ -- __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); -- if (__pyx_t_1) { -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":303 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 -+ * return PyArray_MultiIterNew(4, a, b, c, d) -+ * -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num # <<<<<<<<<<<<<< -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): - */ -- __pyx_t_4 = __pyx_v_descr->type_num; -- __pyx_v_t = __pyx_t_4; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); -- if (!__pyx_t_2) { -- goto __pyx_L15_next_or; -- } else { -- } -- __pyx_t_2 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_L15_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":305 -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L14_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 306, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":307 -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- */ -- switch (__pyx_v_t) { -- case NPY_BYTE: -- __pyx_v_f = ((char *)"b"); -- break; -- case NPY_UBYTE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":308 -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- */ -- __pyx_v_f = ((char *)"B"); -- break; -- case NPY_SHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":309 -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- */ -- __pyx_v_f = ((char *)"h"); -- break; -- case NPY_USHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":310 -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- */ -- __pyx_v_f = ((char *)"H"); -- break; -- case NPY_INT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":311 -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- */ -- __pyx_v_f = ((char *)"i"); -- break; -- case NPY_UINT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":312 -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- */ -- __pyx_v_f = ((char *)"I"); -- break; -- case NPY_LONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":313 -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- */ -- __pyx_v_f = ((char *)"l"); -- break; -- case NPY_ULONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":314 -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- */ -- __pyx_v_f = ((char *)"L"); -- break; -- case NPY_LONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":315 -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- */ -- __pyx_v_f = ((char *)"q"); -- break; -- case NPY_ULONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":316 -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- */ -- __pyx_v_f = ((char *)"Q"); -- break; -- case NPY_FLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":317 -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- */ -- __pyx_v_f = ((char *)"f"); -- break; -- case NPY_DOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":318 -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- */ -- __pyx_v_f = ((char *)"d"); -- break; -- case NPY_LONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":319 -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- */ -- __pyx_v_f = ((char *)"g"); -- break; -- case NPY_CFLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":320 -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- */ -- __pyx_v_f = ((char *)"Zf"); -- break; -- case NPY_CDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":321 -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" -- */ -- __pyx_v_f = ((char *)"Zd"); -- break; -- case NPY_CLONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":322 -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f = "O" -- * else: -- */ -- __pyx_v_f = ((char *)"Zg"); -- break; -- case NPY_OBJECT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":323 -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_v_f = ((char *)"O"); -- break; -- default: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":325 -- * elif t == NPY_OBJECT: f = "O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * info.format = f -- * return -- */ -- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_8); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 325, __pyx_L1_error) -- break; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":326 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f # <<<<<<<<<<<<<< -- * return -- * else: -- */ -- __pyx_v_info->format = __pyx_v_f; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":327 -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f -- * return # <<<<<<<<<<<<<< -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- */ -- __pyx_r = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":329 -- * return -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- */ -- /*else*/ { -- __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":330 -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, -- */ -- (__pyx_v_info->format[0]) = '^'; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":331 -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 # <<<<<<<<<<<<<< -- * f = _util_dtypestring(descr, info.format + 1, -- * info.format + _buffer_format_string_len, -- */ -- __pyx_v_offset = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":332 -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< -- * info.format + _buffer_format_string_len, -- * &offset) -- */ -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":335 -- * info.format + _buffer_format_string_len, -- * &offset) -- * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- */ -- (__pyx_v_f[0]) = '\x00'; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- -- /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; -- if (__pyx_v_info->obj != NULL) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- goto __pyx_L2; -- __pyx_L0:; -- if (__pyx_v_info->obj == Py_None) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- __pyx_L2:; -- __Pyx_XDECREF((PyObject *)__pyx_v_descr); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); -- __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("__releasebuffer__", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":339 -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) -- */ -- PyObject_Free(__pyx_v_info->format); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":341 -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) # <<<<<<<<<<<<<< -- * # info.shape was stored after info.strides in the same block -- * -- */ -- PyObject_Free(__pyx_v_info->strides); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -- * ctypedef npy_cdouble complex_t -- * -- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(1, a) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":822 -- * -- * cdef inline object PyArray_MultiIterNew1(a): -- * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -- * ctypedef npy_cdouble complex_t -- * -- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(1, a) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -- * return PyArray_MultiIterNew(1, a) -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(2, a, b) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":825 -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): -- * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -- * return PyArray_MultiIterNew(1, a) -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(2, a, b) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -- * return PyArray_MultiIterNew(2, a, b) -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":828 -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): -- * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -- * return PyArray_MultiIterNew(2, a, b) -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":831 -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -- * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":834 -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -- * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -- * return d.subarray.shape -- * else: -- */ -- __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":838 -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape # <<<<<<<<<<<<<< -- * else: -- * return () -- */ -- __Pyx_XDECREF(__pyx_r); -- __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); -- __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -- * return d.subarray.shape -- * else: -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":840 -- * return d.subarray.shape -- * else: -- * return () # <<<<<<<<<<<<<< -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: -- */ -- /*else*/ { -- __Pyx_XDECREF(__pyx_r); -- __Pyx_INCREF(__pyx_empty_tuple); -- __pyx_r = __pyx_empty_tuple; -- goto __pyx_L0; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape -- */ -- -- /* function exit code */ -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { -- PyArray_Descr *__pyx_v_child = 0; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- PyObject *__pyx_v_fields = 0; -- PyObject *__pyx_v_childname = NULL; -- PyObject *__pyx_v_new_offset = NULL; -- PyObject *__pyx_v_t = NULL; -- char *__pyx_r; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- Py_ssize_t __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- PyObject *__pyx_t_4 = NULL; -- int __pyx_t_5; -- int __pyx_t_6; -- int __pyx_t_7; -- long __pyx_t_8; -- char *__pyx_t_9; -- __Pyx_RefNannySetupContext("_util_dtypestring", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":847 -- * -- * cdef dtype child -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * cdef tuple fields -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":848 -- * cdef dtype child -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * cdef tuple fields -- * -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- if (unlikely(__pyx_v_descr->names == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -- __PYX_ERR(2, 851, __pyx_L1_error) -- } -- __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; -- for (;;) { -- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 851, __pyx_L1_error) -- #else -- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- #endif -- __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":852 -- * -- * for childname in descr.names: -- * fields = descr.fields[childname] # <<<<<<<<<<<<<< -- * child, new_offset = fields -- * -- */ -- if (unlikely(__pyx_v_descr->fields == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); -- __PYX_ERR(2, 852, __pyx_L1_error) -- } -- __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":853 -- * for childname in descr.names: -- * fields = descr.fields[childname] -- * child, new_offset = fields # <<<<<<<<<<<<<< -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- */ -- if (likely(__pyx_v_fields != Py_None)) { -- PyObject* sequence = __pyx_v_fields; -- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); -- if (unlikely(size != 2)) { -- if (size > 2) __Pyx_RaiseTooManyValuesError(2); -- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); -- __PYX_ERR(2, 853, __pyx_L1_error) -- } -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); -- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); -- __Pyx_INCREF(__pyx_t_3); -- __Pyx_INCREF(__pyx_t_4); -- #else -- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- #endif -- } else { -- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error) -- } -- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); -- __pyx_t_3 = 0; -- __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 856, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); -- if (!__pyx_t_7) { -- goto __pyx_L8_next_or; -- } else { -- } -- __pyx_t_7 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_L8_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":859 -- * -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * # One could encode it in the format string and have Cython -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); -- if (__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_6 = __pyx_t_7; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":860 -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * # One could encode it in the format string and have Cython -- * # complain instead, BUT: < and > in format strings also imply -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 860, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":870 -- * -- * # Output padding bytes -- * while offset[0] < new_offset: # <<<<<<<<<<<<<< -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- */ -- while (1) { -- __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (!__pyx_t_6) break; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":871 -- * # Output padding bytes -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< -- * f += 1 -- * offset[0] += 1 -- */ -- (__pyx_v_f[0]) = 0x78; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":872 -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte -- * f += 1 # <<<<<<<<<<<<<< -- * offset[0] += 1 -- * -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":873 -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- * offset[0] += 1 # <<<<<<<<<<<<<< -- * -- * offset[0] += child.itemsize -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":875 -- * offset[0] += 1 -- * -- * offset[0] += child.itemsize # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(child): -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); -- if (__pyx_t_6) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":878 -- * -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num # <<<<<<<<<<<<<< -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 880, __pyx_L1_error) -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -+ * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape - */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":883 -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 98; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":884 -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":885 -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x68; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":886 -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 72; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":887 -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x69; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":888 -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 73; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":889 -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x6C; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":890 -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 76; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":891 -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x71; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":892 -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 81; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":893 -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":894 -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x64; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":895 -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x67; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":896 -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x66; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":897 -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x64; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":898 -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x67; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":899 -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (likely(__pyx_t_6)) { -- (__pyx_v_f[0]) = 79; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":901 -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * f += 1 -- * else: -- */ -- /*else*/ { -- __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 901, __pyx_L1_error) -- } -- __pyx_L15:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":902 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * f += 1 # <<<<<<<<<<<<<< -- * else: -- * # Cython ignores struct boundary information ("T{...}"), -- */ -- __pyx_v_f = (__pyx_v_f + 1); -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ int __pyx_t_1; -+ __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -+ * return d.subarray.shape -+ * else: - */ -- goto __pyx_L13; -- } -+ __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); -+ if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":906 -- * # Cython ignores struct boundary information ("T{...}"), -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< -- * return f -- * -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":752 -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape # <<<<<<<<<<<<<< -+ * else: -+ * return () - */ -- /*else*/ { -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 906, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- } -- __pyx_L13:; -+ __Pyx_XDECREF(__pyx_r); -+ __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); -+ __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -+ * return d.subarray.shape -+ * else: - */ - } -- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":907 -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) -- * return f # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":754 -+ * return d.subarray.shape -+ * else: -+ * return () # <<<<<<<<<<<<<< - * - * - */ -- __pyx_r = __pyx_v_f; -- goto __pyx_L0; -+ /*else*/ { -+ __Pyx_XDECREF(__pyx_r); -+ __Pyx_INCREF(__pyx_empty_tuple); -+ __pyx_r = __pyx_empty_tuple; -+ goto __pyx_L0; -+ } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -+ * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape - */ - - /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_4); -- __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = NULL; - __pyx_L0:; -- __Pyx_XDECREF((PyObject *)__pyx_v_child); -- __Pyx_XDECREF(__pyx_v_fields); -- __Pyx_XDECREF(__pyx_v_childname); -- __Pyx_XDECREF(__pyx_v_new_offset); -- __Pyx_XDECREF(__pyx_v_t); -+ __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -4851,7 +3288,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("set_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1023 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":930 - * - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< -@@ -4860,7 +3297,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - Py_INCREF(__pyx_v_base); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1024 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":931 - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< -@@ -4869,7 +3306,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -4881,7 +3318,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyFinishContext(); - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -4896,7 +3333,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - int __pyx_t_1; - __Pyx_RefNannySetupContext("get_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1027 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":934 - * - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< -@@ -4905,7 +3342,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - __pyx_v_base = PyArray_BASE(__pyx_v_arr); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -4915,7 +3352,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_t_1 = ((__pyx_v_base == NULL) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1029 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":936 - * base = PyArray_BASE(arr) - * if base is NULL: - * return None # <<<<<<<<<<<<<< -@@ -4926,7 +3363,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -4935,7 +3372,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1030 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":937 - * if base is NULL: - * return None - * return base # <<<<<<<<<<<<<< -@@ -4947,7 +3384,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = ((PyObject *)__pyx_v_base); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -4962,12 +3399,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { -@@ -4981,13 +3418,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_array", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - { -@@ -4999,20 +3439,20 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1036 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":943 - * cdef inline int import_array() except -1: - * try: -- * _import_array() # <<<<<<<<<<<<<< -+ * __pyx_import_array() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") - */ -- __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error) -+ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - } -@@ -5022,9 +3462,9 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1037 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":944 - * try: -- * _import_array() -+ * __pyx_import_array() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.multiarray failed to import") - * -@@ -5032,32 +3472,32 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __PYX_ERR(2, 945, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - __Pyx_XGIVEREF(__pyx_t_1); -@@ -5068,12 +3508,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - /* function exit code */ -@@ -5091,7 +3531,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -5110,9 +3550,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_umath", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5128,16 +3571,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1042 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":949 - * cdef inline int import_umath() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5151,7 +3594,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1043 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":950 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< -@@ -5161,28 +3604,28 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __PYX_ERR(2, 951, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5197,7 +3640,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -5220,7 +3663,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -5239,9 +3682,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_ufunc", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5257,16 +3703,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1048 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":955 - * cdef inline int import_ufunc() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5280,69 +3726,246 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1049 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":956 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") -+ * - */ - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1050 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":957 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -+ * -+ * cdef extern from *: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __PYX_ERR(2, 957, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< - * _import_umath() - * except Exception: - */ -- __Pyx_XGIVEREF(__pyx_t_1); -- __Pyx_XGIVEREF(__pyx_t_2); -- __Pyx_XGIVEREF(__pyx_t_3); -- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); -- goto __pyx_L1_error; -- __pyx_L8_try_end:; -- } -+ __Pyx_XGIVEREF(__pyx_t_1); -+ __Pyx_XGIVEREF(__pyx_t_2); -+ __Pyx_XGIVEREF(__pyx_t_3); -+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); -+ goto __pyx_L1_error; -+ __pyx_L8_try_end:; -+ } -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 -+ * raise ImportError("numpy.core.umath failed to import") -+ * -+ * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -+ * try: -+ * _import_umath() -+ */ -+ -+ /* function exit code */ -+ __pyx_r = 0; -+ goto __pyx_L0; -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_5); -+ __Pyx_XDECREF(__pyx_t_6); -+ __Pyx_XDECREF(__pyx_t_7); -+ __Pyx_XDECREF(__pyx_t_8); -+ __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = -1; -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_timedelta64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":979 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_datetime64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":994 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { -+ npy_datetime __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1004 -+ * also needed. That can be found using `get_datetime64_unit`. -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { -+ npy_timedelta __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1011 -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -- * raise ImportError("numpy.core.umath failed to import") -+static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { -+ NPY_DATETIMEUNIT __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1018 -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ * """ -+ * return (obj).obmeta.base # <<<<<<<<<<<<<< -+ */ -+ __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - - /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_5); -- __Pyx_XDECREF(__pyx_t_6); -- __Pyx_XDECREF(__pyx_t_7); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; - __pyx_L0:; -- __Pyx_RefNannyFinishContext(); - return __pyx_r; - } - static struct __pyx_vtabstruct_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase __pyx_vtable_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase; -@@ -5373,9 +3996,9 @@ static void __pyx_tp_dealloc_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGenerator - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); -- ++Py_REFCNT(o); -+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); - __pyx_pw_4cylp_2cy_21CyCglCutGeneratorBase_21CyCglCutGeneratorBase_3__dealloc__(o); -- --Py_REFCNT(o); -+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); - PyErr_Restore(etype, eval, etb); - } - Py_CLEAR(p->cyModel); -@@ -5412,7 +4035,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGenerat - sizeof(struct __pyx_obj_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -5465,6 +4093,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGenerat - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyMethodDef __pyx_methods[] = { -@@ -5515,25 +4149,17 @@ static struct PyModuleDef __pyx_moduledef = { - static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_CyCglCutGeneratorBase, __pyx_k_CyCglCutGeneratorBase, sizeof(__pyx_k_CyCglCutGeneratorBase), 0, 0, 1, 1}, - {&__pyx_kp_s_CyCglCutGenerator_pyx_generateCu, __pyx_k_CyCglCutGenerator_pyx_generateCu, sizeof(__pyx_k_CyCglCutGenerator_pyx_generateCu), 0, 0, 1, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, - {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, -- {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, -- {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, - {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, -- {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, - {&__pyx_n_s_cylp_cy_CyCglCutGeneratorBase, __pyx_k_cylp_cy_CyCglCutGeneratorBase, sizeof(__pyx_k_cylp_cy_CyCglCutGeneratorBase), 0, 0, 1, 1}, - {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, - {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, - {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, - {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, -- {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, -- {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, - {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0}, - {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, - {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, -- {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, - {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, -@@ -5541,15 +4167,11 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, - {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, - {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, -- {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, - {0, 0, 0, 0, 0, 0, 0} - }; - static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error) -- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error) -- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(2, 285, __pyx_L1_error) -- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 856, __pyx_L1_error) -- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error) -+ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 945, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -@@ -5589,82 +4211,27 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_GOTREF(__pyx_tuple__3); - __Pyx_GIVEREF(__pyx_tuple__3); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__4); -- __Pyx_GIVEREF(__pyx_tuple__4); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__5); -- __Pyx_GIVEREF(__pyx_tuple__5); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__6); -- __Pyx_GIVEREF(__pyx_tuple__6); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__7); -- __Pyx_GIVEREF(__pyx_tuple__7); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__8); -- __Pyx_GIVEREF(__pyx_tuple__8); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 1038, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__9); -- __Pyx_GIVEREF(__pyx_tuple__9); -+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 945, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__4); -+ __Pyx_GIVEREF(__pyx_tuple__4); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 1044, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__10); -- __Pyx_GIVEREF(__pyx_tuple__10); -+ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 951, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__5); -+ __Pyx_GIVEREF(__pyx_tuple__5); - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -5705,6 +4272,9 @@ static int __Pyx_modinit_variable_export_code(void) { - - static int __Pyx_modinit_function_export_code(void) { - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); - /*--- Function export code ---*/ - if (__Pyx_ExportFunction("RunGenerateCuts", (void (*)(void))__pyx_f_4cylp_2cy_21CyCglCutGeneratorBase_RunGenerateCuts, "void (void *, OsiSolverInterface *, CppOsiCuts *, CglTreeInfo)") < 0) __PYX_ERR(1, 1, __pyx_L1_error) -@@ -5718,6 +4288,9 @@ static int __Pyx_modinit_function_export_code(void) { - - static int __Pyx_modinit_type_init_code(void) { - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); - /*--- Type init code ---*/ - __pyx_vtabptr_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase = &__pyx_vtable_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase; -@@ -5744,6 +4317,9 @@ static int __Pyx_modinit_type_init_code(void) { - static int __Pyx_modinit_type_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); - /*--- Type import code ---*/ - __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) -@@ -5779,18 +4355,38 @@ static int __Pyx_modinit_type_import_code(void) { - if (!__pyx_ptype_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase) __PYX_ERR(7, 67, __pyx_L1_error) - __pyx_vtabptr_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase = (struct __pyx_vtabstruct_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase)) __PYX_ERR(7, 67, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) -+ __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error) -- __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error) -- __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error) -+ __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error) -+ __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error) -- __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error) -+ __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error) -+ __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error) -+ __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error) -+ __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error) -+ __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error) -+ __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error) -+ __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error) -+ __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error) -+ __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error) -+ __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error) -+ __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpDualRowPivotBase"); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); -@@ -5911,17 +4507,19 @@ static int __Pyx_modinit_function_import_code(void) { - } - - --#if PY_MAJOR_VERSION < 3 --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC void --#else -+#ifndef CYTHON_NO_PYINIT_EXPORT - #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#elif PY_MAJOR_VERSION < 3 -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" void -+#else -+#define __Pyx_PyMODINIT_FUNC void - #endif - #else --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC PyObject * -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * - #else --#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#define __Pyx_PyMODINIT_FUNC PyObject * - #endif - #endif - -@@ -6004,6 +4602,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_CyCglCutGeneratorBase(PyObject *__ - { - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannyDeclarations - #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m) { -@@ -6051,11 +4652,9 @@ if (!__Pyx_RefNanny) { - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ -- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS -- #ifdef WITH_THREAD /* Python build with threading support? */ -+ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - PyEval_InitThreads(); - #endif -- #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; -@@ -6092,15 +4691,15 @@ if (!__Pyx_RefNanny) { - } - #endif - /*--- Builtin init code ---*/ -- if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Constants init code ---*/ -- if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Global type/function init code ---*/ - (void)__Pyx_modinit_global_init_code(); - (void)__Pyx_modinit_variable_export_code(); -- if (unlikely(__Pyx_modinit_function_export_code() != 0)) goto __pyx_L1_error; -- if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; -- if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_function_export_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) -+ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) -+ if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) - (void)__Pyx_modinit_variable_import_code(); - (void)__Pyx_modinit_function_import_code(); - /*--- Execution code ---*/ -@@ -6135,12 +4734,12 @@ if (!__Pyx_RefNanny) { - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -- * raise ImportError("numpy.core.umath failed to import") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - - /*--- Wrapped vars code ---*/ -@@ -6350,7 +4949,7 @@ static int __Pyx_CheckKeywordStrings( - #if CYTHON_COMPILING_IN_CPYTHON - static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; -- ternaryfunc call = func->ob_type->tp_call; -+ ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -@@ -6525,263 +5124,6 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject - } - #endif - --/* PyCFunctionFastCall */ --#if CYTHON_FAST_PYCCALL --static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { -- PyCFunctionObject *func = (PyCFunctionObject*)func_obj; -- PyCFunction meth = PyCFunction_GET_FUNCTION(func); -- PyObject *self = PyCFunction_GET_SELF(func); -- int flags = PyCFunction_GET_FLAGS(func); -- assert(PyCFunction_Check(func)); -- assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); -- assert(nargs >= 0); -- assert(nargs == 0 || args != NULL); -- /* _PyCFunction_FastCallDict() must not be called with an exception set, -- because it may clear it (directly or indirectly) and so the -- caller loses its exception */ -- assert(!PyErr_Occurred()); -- if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { -- return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); -- } else { -- return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); -- } --} --#endif -- --/* PyFunctionFastCall */ --#if CYTHON_FAST_PYCALL --static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, -- PyObject *globals) { -- PyFrameObject *f; -- PyThreadState *tstate = __Pyx_PyThreadState_Current; -- PyObject **fastlocals; -- Py_ssize_t i; -- PyObject *result; -- assert(globals != NULL); -- /* XXX Perhaps we should create a specialized -- PyFrame_New() that doesn't take locals, but does -- take builtins without sanity checking them. -- */ -- assert(tstate != NULL); -- f = PyFrame_New(tstate, co, globals, NULL); -- if (f == NULL) { -- return NULL; -- } -- fastlocals = __Pyx_PyFrame_GetLocalsplus(f); -- for (i = 0; i < na; i++) { -- Py_INCREF(*args); -- fastlocals[i] = *args++; -- } -- result = PyEval_EvalFrameEx(f,0); -- ++tstate->recursion_depth; -- Py_DECREF(f); -- --tstate->recursion_depth; -- return result; --} --#if 1 || PY_VERSION_HEX < 0x030600B1 --static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { -- PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); -- PyObject *globals = PyFunction_GET_GLOBALS(func); -- PyObject *argdefs = PyFunction_GET_DEFAULTS(func); -- PyObject *closure; --#if PY_MAJOR_VERSION >= 3 -- PyObject *kwdefs; --#endif -- PyObject *kwtuple, **k; -- PyObject **d; -- Py_ssize_t nd; -- Py_ssize_t nk; -- PyObject *result; -- assert(kwargs == NULL || PyDict_Check(kwargs)); -- nk = kwargs ? PyDict_Size(kwargs) : 0; -- if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { -- return NULL; -- } -- if ( --#if PY_MAJOR_VERSION >= 3 -- co->co_kwonlyargcount == 0 && --#endif -- likely(kwargs == NULL || nk == 0) && -- co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { -- if (argdefs == NULL && co->co_argcount == nargs) { -- result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); -- goto done; -- } -- else if (nargs == 0 && argdefs != NULL -- && co->co_argcount == Py_SIZE(argdefs)) { -- /* function called with no arguments, but all parameters have -- a default value: use default values as arguments .*/ -- args = &PyTuple_GET_ITEM(argdefs, 0); -- result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); -- goto done; -- } -- } -- if (kwargs != NULL) { -- Py_ssize_t pos, i; -- kwtuple = PyTuple_New(2 * nk); -- if (kwtuple == NULL) { -- result = NULL; -- goto done; -- } -- k = &PyTuple_GET_ITEM(kwtuple, 0); -- pos = i = 0; -- while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { -- Py_INCREF(k[i]); -- Py_INCREF(k[i+1]); -- i += 2; -- } -- nk = i / 2; -- } -- else { -- kwtuple = NULL; -- k = NULL; -- } -- closure = PyFunction_GET_CLOSURE(func); --#if PY_MAJOR_VERSION >= 3 -- kwdefs = PyFunction_GET_KW_DEFAULTS(func); --#endif -- if (argdefs != NULL) { -- d = &PyTuple_GET_ITEM(argdefs, 0); -- nd = Py_SIZE(argdefs); -- } -- else { -- d = NULL; -- nd = 0; -- } --#if PY_MAJOR_VERSION >= 3 -- result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, -- args, (int)nargs, -- k, (int)nk, -- d, (int)nd, kwdefs, closure); --#else -- result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, -- args, (int)nargs, -- k, (int)nk, -- d, (int)nd, closure); --#endif -- Py_XDECREF(kwtuple); --done: -- Py_LeaveRecursiveCall(); -- return result; --} --#endif --#endif -- --/* PyObjectCallMethO */ --#if CYTHON_COMPILING_IN_CPYTHON --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { -- PyObject *self, *result; -- PyCFunction cfunc; -- cfunc = PyCFunction_GET_FUNCTION(func); -- self = PyCFunction_GET_SELF(func); -- if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -- return NULL; -- result = cfunc(self, arg); -- Py_LeaveRecursiveCall(); -- if (unlikely(!result) && unlikely(!PyErr_Occurred())) { -- PyErr_SetString( -- PyExc_SystemError, -- "NULL result without error in PyObject_Call"); -- } -- return result; --} --#endif -- --/* PyObjectCallOneArg */ --#if CYTHON_COMPILING_IN_CPYTHON --static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { -- PyObject *result; -- PyObject *args = PyTuple_New(1); -- if (unlikely(!args)) return NULL; -- Py_INCREF(arg); -- PyTuple_SET_ITEM(args, 0, arg); -- result = __Pyx_PyObject_Call(func, args, NULL); -- Py_DECREF(args); -- return result; --} --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { --#if CYTHON_FAST_PYCALL -- if (PyFunction_Check(func)) { -- return __Pyx_PyFunction_FastCall(func, &arg, 1); -- } --#endif -- if (likely(PyCFunction_Check(func))) { -- if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { -- return __Pyx_PyObject_CallMethO(func, arg); --#if CYTHON_FAST_PYCCALL -- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { -- return __Pyx_PyCFunction_FastCall(func, &arg, 1); --#endif -- } -- } -- return __Pyx__PyObject_CallOneArg(func, arg); --} --#else --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { -- PyObject *result; -- PyObject *args = PyTuple_Pack(1, arg); -- if (unlikely(!args)) return NULL; -- result = __Pyx_PyObject_Call(func, args, NULL); -- Py_DECREF(args); -- return result; --} --#endif -- --/* DictGetItem */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { -- PyObject *value; -- value = PyDict_GetItemWithError(d, key); -- if (unlikely(!value)) { -- if (!PyErr_Occurred()) { -- if (unlikely(PyTuple_Check(key))) { -- PyObject* args = PyTuple_Pack(1, key); -- if (likely(args)) { -- PyErr_SetObject(PyExc_KeyError, args); -- Py_DECREF(args); -- } -- } else { -- PyErr_SetObject(PyExc_KeyError, key); -- } -- } -- return NULL; -- } -- Py_INCREF(value); -- return value; --} --#endif -- --/* RaiseTooManyValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { -- PyErr_Format(PyExc_ValueError, -- "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); --} -- --/* RaiseNeedMoreValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { -- PyErr_Format(PyExc_ValueError, -- "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", -- index, (index == 1) ? "" : "s"); --} -- --/* RaiseNoneIterError */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); --} -- --/* ExtTypeTest */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { -- if (unlikely(!type)) { -- PyErr_SetString(PyExc_SystemError, "Missing type object"); -- return 0; -- } -- if (likely(__Pyx_TypeCheck(obj, type))) -- return 1; -- PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", -- Py_TYPE(obj)->tp_name, type->tp_name); -- return 0; --} -- - /* GetTopmostException */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * -@@ -7005,6 +5347,28 @@ static int __Pyx_SetVtable(PyObject *dict, void *vtable) { - return -1; - } - -+/* PyObjectGetAttrStrNoError */ -+static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { -+ __Pyx_PyThreadState_declare -+ __Pyx_PyThreadState_assign -+ if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) -+ __Pyx_PyErr_Clear(); -+} -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { -+ PyObject *result; -+#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 -+ PyTypeObject* tp = Py_TYPE(obj); -+ if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { -+ return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); -+ } -+#endif -+ result = __Pyx_PyObject_GetAttrStr(obj, attr_name); -+ if (unlikely(!result)) { -+ __Pyx_PyObject_GetAttrStr_ClearAttributeError(); -+ } -+ return result; -+} -+ - /* SetupReduce */ - static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { - int ret; -@@ -7032,43 +5396,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { - PyObject *setstate = NULL; - PyObject *setstate_cython = NULL; - #if CYTHON_USE_PYTYPE_LOOKUP -- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #else -- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #endif - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #else -- object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #endif -- reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; -+ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; - if (reduce_ex == object_reduce_ex) { - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #else -- object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #endif -- reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; -+ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; - if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { -- reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; -+ reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); -+ if (likely(reduce_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (reduce == object_reduce || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); - if (!setstate) PyErr_Clear(); - if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { -- setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; -+ setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); -+ if (likely(setstate_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (!setstate || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - } - PyType_Modified((PyTypeObject*)type_obj); - } - } -- goto GOOD; --BAD: -+ goto __PYX_GOOD; -+__PYX_BAD: - if (!PyErr_Occurred()) - PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); - ret = -1; --GOOD: -+__PYX_GOOD: - #if !CYTHON_USE_PYTYPE_LOOKUP - Py_XDECREF(object_reduce); - Py_XDECREF(object_reduce_ex); -@@ -7192,7 +5564,7 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { - { - #if PY_MAJOR_VERSION >= 3 - if (level == -1) { -- if (strchr(__Pyx_MODULE_NAME, '.')) { -+ if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { - module = PyImport_ImportModuleLevelObject( - name, global_dict, empty_dict, list, 1); - if (!module) { -@@ -7255,7 +5627,7 @@ static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UIN - - /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK --static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { -+static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { - PyObject *use_cline; - PyObject *ptype, *pvalue, *ptraceback; - #if CYTHON_COMPILING_IN_CPYTHON -@@ -7285,7 +5657,7 @@ static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { - } - if (!use_cline) { - c_line = 0; -- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); -+ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; -@@ -7359,7 +5731,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - if (__pyx_code_cache.count == __pyx_code_cache.max_count) { - int new_max = __pyx_code_cache.max_count + 64; - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( -- __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); -+ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); - if (unlikely(!entries)) { - return; - } -@@ -7382,30 +5754,31 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { -- PyCodeObject *py_code = 0; -- PyObject *py_srcfile = 0; -- PyObject *py_funcname = 0; -+ PyCodeObject *py_code = NULL; -+ PyObject *py_funcname = NULL; - #if PY_MAJOR_VERSION < 3 -+ PyObject *py_srcfile = NULL; - py_srcfile = PyString_FromString(filename); -- #else -- py_srcfile = PyUnicode_FromString(filename); -- #endif - if (!py_srcfile) goto bad; -+ #endif - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; -+ funcname = PyUnicode_AsUTF8(py_funcname); -+ if (!funcname) goto bad; - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); -- #else -- py_funcname = PyUnicode_FromString(funcname); -+ if (!py_funcname) goto bad; - #endif - } -- if (!py_funcname) goto bad; -+ #if PY_MAJOR_VERSION < 3 - py_code = __Pyx_PyCode_New( - 0, - 0, -@@ -7424,11 +5797,16 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - __pyx_empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); -- Py_DECREF(py_funcname); -+ #else -+ py_code = PyCode_NewEmpty(filename, funcname, py_line); -+ #endif -+ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline - return py_code; - bad: -- Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -+ #if PY_MAJOR_VERSION < 3 -+ Py_XDECREF(py_srcfile); -+ #endif - return NULL; - } - static void __Pyx_AddTraceback(const char *funcname, int c_line, -@@ -7577,7 +5955,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - case 1: - return a; - case 2: -- z = __Pyx_c_prod_float(a, a); - return __Pyx_c_prod_float(a, a); - case 3: - z = __Pyx_c_prod_float(a, a); -@@ -7732,7 +6109,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - case 1: - return a; - case 2: -- z = __Pyx_c_prod_double(a, a); - return __Pyx_c_prod_double(a, a); - case 3: - z = __Pyx_c_prod_double(a, a); -@@ -7771,24 +6147,31 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - #endif - - /* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { -- if (sizeof(int) < sizeof(long)) { -+ if (sizeof(long) < sizeof(long)) { - return PyInt_FromLong((long) value); -- } else if (sizeof(int) <= sizeof(unsigned long)) { -+ } else if (sizeof(long) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); - #ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); - #endif - } - } else { -- if (sizeof(int) <= sizeof(long)) { -+ if (sizeof(long) <= sizeof(long)) { - return PyInt_FromLong((long) value); - #ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); - #endif - } -@@ -7796,7 +6179,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(int), -+ return _PyLong_FromByteArray(bytes, sizeof(long), - little, !is_unsigned); - } - } -@@ -7823,51 +6206,27 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - return (target_type) value;\ - } - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { -- const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(enum NPY_TYPES) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+/* CIntFromPy */ -+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" - #endif -- } -- } else { -- if (sizeof(enum NPY_TYPES) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop - #endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), -- little, !is_unsigned); -- } --} -- --/* CIntFromPy */ --static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -- if (sizeof(int) < sizeof(long)) { -- __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) -+ if (sizeof(long) < sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } -- return (int) val; -+ return (long) val; - } - } else - #endif -@@ -7876,32 +6235,32 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (int) 0; -- case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) -+ case 0: return (long) 0; -+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) - case 2: -- if (8 * sizeof(int) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { -- return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { -+ return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - case 3: -- if (8 * sizeof(int) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { -- return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { -+ return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - case 4: -- if (8 * sizeof(int) > 3 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { -- return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { -+ return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; -@@ -7915,86 +6274,86 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) -- return (int) -1; -+ return (long) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } - #endif -- if (sizeof(int) <= sizeof(unsigned long)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) -+ if (sizeof(long) <= sizeof(unsigned long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) - #endif - } - } else { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (int) 0; -- case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) -- case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) -+ case 0: return (long) 0; -+ case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) -+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) - case -2: -- if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -+ return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 2: -- if (8 * sizeof(int) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -- return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -+ return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case -3: -- if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -+ return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 3: -- if (8 * sizeof(int) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -- return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -+ return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case -4: -- if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -+ return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 4: -- if (8 * sizeof(int) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -- return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -+ return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - } - #endif -- if (sizeof(int) <= sizeof(long)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) -+ if (sizeof(long) <= sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) -+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) - #endif - } - } -@@ -8003,7 +6362,7 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); - #else -- int val; -+ long val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); - #if PY_MAJOR_VERSION < 3 - if (likely(v) && !PyLong_Check(v)) { -@@ -8023,71 +6382,47 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - return val; - } - #endif -- return (int) -1; -+ return (long) -1; - } - } else { -- int val; -+ long val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); -- if (!tmp) return (int) -1; -- val = __Pyx_PyInt_As_int(tmp); -+ if (!tmp) return (long) -1; -+ val = __Pyx_PyInt_As_long(tmp); - Py_DECREF(tmp); - return val; - } - raise_overflow: - PyErr_SetString(PyExc_OverflowError, -- "value too large to convert to int"); -- return (int) -1; -+ "value too large to convert to long"); -+ return (long) -1; - raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, -- "can't convert negative value to int"); -- return (int) -1; -+ "can't convert negative value to long"); -+ return (long) -1; - } - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(long) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(long) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+/* CIntFromPy */ -+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" - #endif -- } -- } else { -- if (sizeof(long) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop - #endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(long), -- little, !is_unsigned); -- } --} -- --/* CIntFromPy */ --static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -- if (sizeof(long) < sizeof(long)) { -- __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) -+ if (sizeof(int) < sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } -- return (long) val; -+ return (int) val; - } - } else - #endif -@@ -8096,32 +6431,32 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (long) 0; -- case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) -+ case 0: return (int) 0; -+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) - case 2: -- if (8 * sizeof(long) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { -- return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { -+ return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; - case 3: -- if (8 * sizeof(long) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { -- return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { -+ return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; - case 4: -- if (8 * sizeof(long) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { -- return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { -+ return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; -@@ -8135,86 +6470,86 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) -- return (long) -1; -+ return (int) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } - #endif -- if (sizeof(long) <= sizeof(unsigned long)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) -+ if (sizeof(int) <= sizeof(unsigned long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) - #endif - } - } else { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (long) 0; -- case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) -- case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) -+ case 0: return (int) 0; -+ case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) -+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) - case -2: -- if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -- return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 2: -- if (8 * sizeof(long) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -- return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case -3: -- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -- return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 3: -- if (8 * sizeof(long) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -- return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case -4: -- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -- return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 4: -- if (8 * sizeof(long) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -- return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -+ return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - } - #endif -- if (sizeof(long) <= sizeof(long)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) -+ if (sizeof(int) <= sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) - #endif - } - } -@@ -8223,7 +6558,7 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); - #else -- long val; -+ int val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); - #if PY_MAJOR_VERSION < 3 - if (likely(v) && !PyLong_Check(v)) { -@@ -8243,24 +6578,24 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - return val; - } - #endif -- return (long) -1; -+ return (int) -1; - } - } else { -- long val; -+ int val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); -- if (!tmp) return (long) -1; -- val = __Pyx_PyInt_As_long(tmp); -+ if (!tmp) return (int) -1; -+ val = __Pyx_PyInt_As_int(tmp); - Py_DECREF(tmp); - return val; - } - raise_overflow: - PyErr_SetString(PyExc_OverflowError, -- "value too large to convert to long"); -- return (long) -1; -+ "value too large to convert to int"); -+ return (int) -1; - raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, -- "can't convert negative value to long"); -- return (long) -1; -+ "can't convert negative value to int"); -+ return (int) -1; - } - - /* FastTypeChecks */ -@@ -8664,6 +6999,23 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_DECREF(x); - return ival; - } -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { -+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { -+ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); -+#if PY_MAJOR_VERSION < 3 -+ } else if (likely(PyInt_CheckExact(o))) { -+ return PyInt_AS_LONG(o); -+#endif -+ } else { -+ Py_ssize_t ival; -+ PyObject *x; -+ x = PyNumber_Index(o); -+ if (!x) return -1; -+ ival = PyInt_AsLong(x); -+ Py_DECREF(x); -+ return ival; -+ } -+} - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); - } -diff --git a/cylp/cy/CyCglTreeInfo.cpp b/cylp/cy/CyCglTreeInfo.cpp -index af46065..de3fa97 100644 ---- a/cylp/cy/CyCglTreeInfo.cpp -+++ b/cylp/cy/CyCglTreeInfo.cpp -@@ -1,14 +1,16 @@ --/* Generated by Cython 0.29.12 */ -+/* Generated by Cython 0.29.25 */ - -+#ifndef PY_SSIZE_T_CLEAN - #define PY_SSIZE_T_CLEAN -+#endif /* PY_SSIZE_T_CLEAN */ - #include "Python.h" - #ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. - #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. - #else --#define CYTHON_ABI "0_29_12" --#define CYTHON_HEX_VERSION 0x001D0CF0 -+#define CYTHON_ABI "0_29_25" -+#define CYTHON_HEX_VERSION 0x001D19F0 - #define CYTHON_FUTURE_DIVISION 0 - #include - #ifndef offsetof -@@ -155,7 +157,7 @@ - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif -- #if PY_VERSION_HEX < 0x030300F0 -+ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) -@@ -174,7 +176,7 @@ - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL -- #define CYTHON_FAST_PYCALL 1 -+ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1) - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) -@@ -193,7 +195,9 @@ - #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) - #endif - #if CYTHON_USE_PYLONG_INTERNALS -- #include "longintrepr.h" -+ #if PY_MAJOR_VERSION < 3 -+ #include "longintrepr.h" -+ #endif - #undef SHIFT - #undef BASE - #undef MASK -@@ -324,9 +328,68 @@ class __Pyx_FakeReference { - #define __Pyx_DefaultClassType PyClass_Type - #else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" --#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 -- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ -- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -+ #define __Pyx_DefaultClassType PyType_Type -+#if PY_VERSION_HEX >= 0x030B00A1 -+ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, -+ PyObject *code, PyObject *c, PyObject* n, PyObject *v, -+ PyObject *fv, PyObject *cell, PyObject* fn, -+ PyObject *name, int fline, PyObject *lnos) { -+ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; -+ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; -+ const char *fn_cstr=NULL; -+ const char *name_cstr=NULL; -+ PyCodeObject* co=NULL; -+ PyObject *type, *value, *traceback; -+ PyErr_Fetch(&type, &value, &traceback); -+ if (!(kwds=PyDict_New())) goto end; -+ if (!(argcount=PyLong_FromLong(a))) goto end; -+ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; -+ if (!(posonlyargcount=PyLong_FromLong(0))) goto end; -+ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; -+ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; -+ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; -+ if (!(nlocals=PyLong_FromLong(l))) goto end; -+ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; -+ if (!(stacksize=PyLong_FromLong(s))) goto end; -+ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; -+ if (!(flags=PyLong_FromLong(f))) goto end; -+ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; -+ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; -+ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; -+ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; -+ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; -+ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here -+ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; -+ Py_XDECREF((PyObject*)co); -+ co = (PyCodeObject*)call_result; -+ call_result = NULL; -+ if (0) { -+ cleanup_code_too: -+ Py_XDECREF((PyObject*)co); -+ co = NULL; -+ } -+ end: -+ Py_XDECREF(kwds); -+ Py_XDECREF(argcount); -+ Py_XDECREF(posonlyargcount); -+ Py_XDECREF(kwonlyargcount); -+ Py_XDECREF(nlocals); -+ Py_XDECREF(stacksize); -+ Py_XDECREF(replace); -+ Py_XDECREF(call_result); -+ Py_XDECREF(empty); -+ if (type) { -+ PyErr_Restore(type, value, traceback); -+ } -+ return co; -+ } - #else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -@@ -440,8 +503,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #endif - #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 -+ #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) -+ #else -+ #define __Pyx_PyUnicode_READY(op) (0) -+ #endif - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) -@@ -449,7 +516,15 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) -+ #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) -+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) -+ #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) -+ #endif -+ #else -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) -+ #endif - #else - #define CYTHON_PEP393_ENABLED 0 - #define PyUnicode_1BYTE_KIND 1 -@@ -498,8 +573,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define PyString_Type PyUnicode_Type - #define PyString_Check PyUnicode_Check - #define PyString_CheckExact PyUnicode_CheckExact -+#ifndef PyObject_Unicode - #define PyObject_Unicode PyObject_Str - #endif -+#endif - #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) - #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) -@@ -510,6 +587,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #ifndef PySet_CheckExact - #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) - #endif -+#if PY_VERSION_HEX >= 0x030900A4 -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) -+#else -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) -+#endif - #if CYTHON_ASSUME_SAFE_MACROS - #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) - #else -@@ -543,13 +627,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong -- #define __Pyx_PyInt_AsHash_t PyInt_AsLong -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t - #else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t -- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t - #endif - #if PY_MAJOR_VERSION >= 3 -- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) -+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) - #else - #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) - #endif -@@ -590,11 +674,10 @@ static CYTHON_INLINE float __PYX_NAN() { - #define __Pyx_truncl truncl - #endif - -- -+#define __PYX_MARK_ERR_POS(f_index, lineno) \ -+ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } - #define __PYX_ERR(f_index, lineno, Ln_error) \ --{ \ -- __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ --} -+ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } - - #ifndef __PYX_EXTERN_C - #ifdef __cplusplus -@@ -704,6 +787,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); - static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); - #if CYTHON_ASSUME_SAFE_MACROS - #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) - #else -@@ -817,7 +901,7 @@ static const char *__pyx_filename; - - static const char *__pyx_f[] = { - "stringsource", -- "cylp\\cy\\CyCglTreeInfo.pyx", -+ "cylp/cy/CyCglTreeInfo.pyx", - }; - - /*--- Type declarations ---*/ -@@ -995,6 +1079,17 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - /* SetVTable.proto */ - static int __Pyx_SetVtable(PyObject *dict, void *vtable); - -+/* PyErrExceptionMatches.proto */ -+#if CYTHON_FAST_THREAD_STATE -+#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) -+static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); -+#else -+#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) -+#endif -+ -+/* PyObjectGetAttrStrNoError.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); -+ - /* SetupReduce.proto */ - static int __Pyx_setup_reduce(PyObject* type_obj); - -@@ -1092,6 +1187,11 @@ static void __Pyx_CppExn2PyErr() { - } - #endif - -+/* GCCDiagnostics.proto */ -+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -+#define __Pyx_HAS_GCC_DIAGNOSTIC -+#endif -+ - /* CIntToPy.proto */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); - -@@ -1194,6 +1294,9 @@ static int __pyx_pf_4cylp_2cy_13CyCglTreeInfo_13CyCglTreeInfo___cinit__(struct _ - int __pyx_r; - __Pyx_RefNannyDeclarations - CglTreeInfo *__pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - - /* "cylp/cy/CyCglTreeInfo.pyx":7 -@@ -1298,6 +1401,9 @@ static PyObject *__pyx_pf_4cylp_2cy_13CyCglTreeInfo_13CyCglTreeInfo_2__reduce_cy - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -1352,6 +1458,9 @@ static PyObject *__pyx_pf_4cylp_2cy_13CyCglTreeInfo_13CyCglTreeInfo_4__setstate_ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -1422,7 +1531,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo = { - sizeof(struct __pyx_obj_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -1475,6 +1589,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyMethodDef __pyx_methods[] = { -@@ -1616,6 +1736,9 @@ static int __Pyx_modinit_function_export_code(void) { - - static int __Pyx_modinit_type_init_code(void) { - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); - /*--- Type init code ---*/ - __pyx_vtabptr_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo = &__pyx_vtable_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo; -@@ -1663,17 +1786,19 @@ static int __Pyx_modinit_function_import_code(void) { - } - - --#if PY_MAJOR_VERSION < 3 --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC void --#else -+#ifndef CYTHON_NO_PYINIT_EXPORT - #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#elif PY_MAJOR_VERSION < 3 -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" void -+#else -+#define __Pyx_PyMODINIT_FUNC void - #endif - #else --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC PyObject * -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * - #else --#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#define __Pyx_PyMODINIT_FUNC PyObject * - #endif - #endif - -@@ -1755,6 +1880,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_CyCglTreeInfo(PyObject *__pyx_pyin - #endif - { - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannyDeclarations - #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m) { -@@ -1802,11 +1930,9 @@ if (!__Pyx_RefNanny) { - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ -- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS -- #ifdef WITH_THREAD /* Python build with threading support? */ -+ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - PyEval_InitThreads(); - #endif -- #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; -@@ -1843,14 +1969,14 @@ if (!__Pyx_RefNanny) { - } - #endif - /*--- Builtin init code ---*/ -- if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 2, __pyx_L1_error) - /*--- Constants init code ---*/ -- if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 2, __pyx_L1_error) - /*--- Global type/function init code ---*/ - (void)__Pyx_modinit_global_init_code(); - (void)__Pyx_modinit_variable_export_code(); - (void)__Pyx_modinit_function_export_code(); -- if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(1, 2, __pyx_L1_error) - (void)__Pyx_modinit_type_import_code(); - (void)__Pyx_modinit_variable_import_code(); - (void)__Pyx_modinit_function_import_code(); -@@ -2010,7 +2136,7 @@ static int __Pyx_CheckKeywordStrings( - #if CYTHON_COMPILING_IN_CPYTHON - static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; -- ternaryfunc call = func->ob_type->tp_call; -+ ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -@@ -2277,6 +2403,53 @@ static int __Pyx_SetVtable(PyObject *dict, void *vtable) { - return -1; - } - -+/* PyErrExceptionMatches */ -+#if CYTHON_FAST_THREAD_STATE -+static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { -+ Py_ssize_t i, n; -+ n = PyTuple_GET_SIZE(tuple); -+#if PY_MAJOR_VERSION >= 3 -+ for (i=0; icurexc_type; -+ if (exc_type == err) return 1; -+ if (unlikely(!exc_type)) return 0; -+ if (unlikely(PyTuple_Check(err))) -+ return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); -+ return __Pyx_PyErr_GivenExceptionMatches(exc_type, err); -+} -+#endif -+ -+/* PyObjectGetAttrStrNoError */ -+static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { -+ __Pyx_PyThreadState_declare -+ __Pyx_PyThreadState_assign -+ if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) -+ __Pyx_PyErr_Clear(); -+} -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { -+ PyObject *result; -+#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 -+ PyTypeObject* tp = Py_TYPE(obj); -+ if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { -+ return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); -+ } -+#endif -+ result = __Pyx_PyObject_GetAttrStr(obj, attr_name); -+ if (unlikely(!result)) { -+ __Pyx_PyObject_GetAttrStr_ClearAttributeError(); -+ } -+ return result; -+} -+ - /* SetupReduce */ - static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { - int ret; -@@ -2304,43 +2477,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { - PyObject *setstate = NULL; - PyObject *setstate_cython = NULL; - #if CYTHON_USE_PYTYPE_LOOKUP -- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #else -- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #endif - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #else -- object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #endif -- reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; -+ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; - if (reduce_ex == object_reduce_ex) { - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #else -- object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #endif -- reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; -+ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; - if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { -- reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; -+ reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); -+ if (likely(reduce_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (reduce == object_reduce || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); - if (!setstate) PyErr_Clear(); - if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { -- setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; -+ setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); -+ if (likely(setstate_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (!setstate || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - } - PyType_Modified((PyTypeObject*)type_obj); - } - } -- goto GOOD; --BAD: -+ goto __PYX_GOOD; -+__PYX_BAD: - if (!PyErr_Occurred()) - PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); - ret = -1; --GOOD: -+__PYX_GOOD: - #if !CYTHON_USE_PYTYPE_LOOKUP - Py_XDECREF(object_reduce); - Py_XDECREF(object_reduce_ex); -@@ -2381,7 +2562,7 @@ static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UIN - - /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK --static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { -+static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { - PyObject *use_cline; - PyObject *ptype, *pvalue, *ptraceback; - #if CYTHON_COMPILING_IN_CPYTHON -@@ -2411,7 +2592,7 @@ static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { - } - if (!use_cline) { - c_line = 0; -- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); -+ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; -@@ -2485,7 +2666,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - if (__pyx_code_cache.count == __pyx_code_cache.max_count) { - int new_max = __pyx_code_cache.max_count + 64; - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( -- __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); -+ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); - if (unlikely(!entries)) { - return; - } -@@ -2508,30 +2689,31 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { -- PyCodeObject *py_code = 0; -- PyObject *py_srcfile = 0; -- PyObject *py_funcname = 0; -+ PyCodeObject *py_code = NULL; -+ PyObject *py_funcname = NULL; - #if PY_MAJOR_VERSION < 3 -+ PyObject *py_srcfile = NULL; - py_srcfile = PyString_FromString(filename); -- #else -- py_srcfile = PyUnicode_FromString(filename); -- #endif - if (!py_srcfile) goto bad; -+ #endif - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; -+ funcname = PyUnicode_AsUTF8(py_funcname); -+ if (!funcname) goto bad; - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); -- #else -- py_funcname = PyUnicode_FromString(funcname); -+ if (!py_funcname) goto bad; - #endif - } -- if (!py_funcname) goto bad; -+ #if PY_MAJOR_VERSION < 3 - py_code = __Pyx_PyCode_New( - 0, - 0, -@@ -2550,11 +2732,16 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - __pyx_empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); -- Py_DECREF(py_funcname); -+ #else -+ py_code = PyCode_NewEmpty(filename, funcname, py_line); -+ #endif -+ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline - return py_code; - bad: -- Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -+ #if PY_MAJOR_VERSION < 3 -+ Py_XDECREF(py_srcfile); -+ #endif - return NULL; - } - static void __Pyx_AddTraceback(const char *funcname, int c_line, -@@ -2588,7 +2775,14 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - - /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(long) < sizeof(long)) { -@@ -2641,7 +2835,14 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - - /* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -2830,7 +3031,14 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - - /* CIntFromPy */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -3381,6 +3589,23 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_DECREF(x); - return ival; - } -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { -+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { -+ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); -+#if PY_MAJOR_VERSION < 3 -+ } else if (likely(PyInt_CheckExact(o))) { -+ return PyInt_AS_LONG(o); -+#endif -+ } else { -+ Py_ssize_t ival; -+ PyObject *x; -+ x = PyNumber_Index(o); -+ if (!x) return -1; -+ ival = PyInt_AsLong(x); -+ Py_DECREF(x); -+ return ival; -+ } -+} - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); - } -diff --git a/cylp/cy/CyClpDualRowPivotBase.cpp b/cylp/cy/CyClpDualRowPivotBase.cpp -index 21f3977..93a41a8 100644 ---- a/cylp/cy/CyClpDualRowPivotBase.cpp -+++ b/cylp/cy/CyClpDualRowPivotBase.cpp -@@ -1,14 +1,16 @@ --/* Generated by Cython 0.29.12 */ -+/* Generated by Cython 0.29.25 */ - -+#ifndef PY_SSIZE_T_CLEAN - #define PY_SSIZE_T_CLEAN -+#endif /* PY_SSIZE_T_CLEAN */ - #include "Python.h" - #ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. - #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. - #else --#define CYTHON_ABI "0_29_12" --#define CYTHON_HEX_VERSION 0x001D0CF0 -+#define CYTHON_ABI "0_29_25" -+#define CYTHON_HEX_VERSION 0x001D19F0 - #define CYTHON_FUTURE_DIVISION 0 - #include - #ifndef offsetof -@@ -155,7 +157,7 @@ - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif -- #if PY_VERSION_HEX < 0x030300F0 -+ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) -@@ -174,7 +176,7 @@ - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL -- #define CYTHON_FAST_PYCALL 1 -+ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1) - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) -@@ -193,7 +195,9 @@ - #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) - #endif - #if CYTHON_USE_PYLONG_INTERNALS -- #include "longintrepr.h" -+ #if PY_MAJOR_VERSION < 3 -+ #include "longintrepr.h" -+ #endif - #undef SHIFT - #undef BASE - #undef MASK -@@ -324,9 +328,68 @@ class __Pyx_FakeReference { - #define __Pyx_DefaultClassType PyClass_Type - #else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" --#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 -- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ -- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -+ #define __Pyx_DefaultClassType PyType_Type -+#if PY_VERSION_HEX >= 0x030B00A1 -+ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, -+ PyObject *code, PyObject *c, PyObject* n, PyObject *v, -+ PyObject *fv, PyObject *cell, PyObject* fn, -+ PyObject *name, int fline, PyObject *lnos) { -+ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; -+ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; -+ const char *fn_cstr=NULL; -+ const char *name_cstr=NULL; -+ PyCodeObject* co=NULL; -+ PyObject *type, *value, *traceback; -+ PyErr_Fetch(&type, &value, &traceback); -+ if (!(kwds=PyDict_New())) goto end; -+ if (!(argcount=PyLong_FromLong(a))) goto end; -+ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; -+ if (!(posonlyargcount=PyLong_FromLong(0))) goto end; -+ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; -+ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; -+ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; -+ if (!(nlocals=PyLong_FromLong(l))) goto end; -+ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; -+ if (!(stacksize=PyLong_FromLong(s))) goto end; -+ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; -+ if (!(flags=PyLong_FromLong(f))) goto end; -+ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; -+ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; -+ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; -+ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; -+ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; -+ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here -+ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; -+ Py_XDECREF((PyObject*)co); -+ co = (PyCodeObject*)call_result; -+ call_result = NULL; -+ if (0) { -+ cleanup_code_too: -+ Py_XDECREF((PyObject*)co); -+ co = NULL; -+ } -+ end: -+ Py_XDECREF(kwds); -+ Py_XDECREF(argcount); -+ Py_XDECREF(posonlyargcount); -+ Py_XDECREF(kwonlyargcount); -+ Py_XDECREF(nlocals); -+ Py_XDECREF(stacksize); -+ Py_XDECREF(replace); -+ Py_XDECREF(call_result); -+ Py_XDECREF(empty); -+ if (type) { -+ PyErr_Restore(type, value, traceback); -+ } -+ return co; -+ } - #else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -@@ -440,8 +503,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #endif - #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 -+ #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) -+ #else -+ #define __Pyx_PyUnicode_READY(op) (0) -+ #endif - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) -@@ -449,7 +516,15 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) -+ #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) -+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) -+ #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) -+ #endif -+ #else -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) -+ #endif - #else - #define CYTHON_PEP393_ENABLED 0 - #define PyUnicode_1BYTE_KIND 1 -@@ -498,8 +573,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define PyString_Type PyUnicode_Type - #define PyString_Check PyUnicode_Check - #define PyString_CheckExact PyUnicode_CheckExact -+#ifndef PyObject_Unicode - #define PyObject_Unicode PyObject_Str - #endif -+#endif - #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) - #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) -@@ -510,6 +587,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #ifndef PySet_CheckExact - #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) - #endif -+#if PY_VERSION_HEX >= 0x030900A4 -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) -+#else -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) -+#endif - #if CYTHON_ASSUME_SAFE_MACROS - #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) - #else -@@ -543,13 +627,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong -- #define __Pyx_PyInt_AsHash_t PyInt_AsLong -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t - #else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t -- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t - #endif - #if PY_MAJOR_VERSION >= 3 -- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) -+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) - #else - #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) - #endif -@@ -590,11 +674,10 @@ static CYTHON_INLINE float __PYX_NAN() { - #define __Pyx_truncl truncl - #endif - -- -+#define __PYX_MARK_ERR_POS(f_index, lineno) \ -+ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } - #define __PYX_ERR(f_index, lineno, Ln_error) \ --{ \ -- __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ --} -+ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } - - #ifndef __PYX_EXTERN_C - #ifdef __cplusplus -@@ -615,7 +698,13 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "ClpFactorization.hpp" - #include "IClpPrimalColumnPivotBase.h" - #include "numpy/arrayobject.h" -+#include "numpy/ndarrayobject.h" -+#include "numpy/ndarraytypes.h" -+#include "numpy/arrayscalars.h" - #include "numpy/ufuncobject.h" -+ -+ /* NumPy API declarations from "numpy/__init__.pxd" */ -+ - #include "CoinModel.hpp" - #include "ICoinPackedMatrix.hpp" - #include "CglAllDifferent.hpp" -@@ -641,11 +730,11 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "OsiSolverInterface.hpp" - #include "CbcCompareUser.hpp" - #include "ICbcModel.hpp" -+#include - #include "ios" - #include "new" - #include "stdexcept" - #include "typeinfo" --#include - #include - #include "ClpDualRowPivot.hpp" - #include "IClpSimplex.hpp" -@@ -746,6 +835,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); - static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); - #if CYTHON_ASSUME_SAFE_MACROS - #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) - #else -@@ -881,20 +971,20 @@ static const char *__pyx_filename; - - static const char *__pyx_f[] = { - "stringsource", -- "cylp\\cy\\CyClpDualRowPivotBase.pyx", -+ "cylp/cy/CyClpDualRowPivotBase.pyx", - "__init__.pxd", - "type.pxd", - "bool.pxd", - "complex.pxd", -- "cylp\\cy\\CyCoinIndexedVector.pxd", -- "cylp\\cy\\CyClpPrimalColumnPivotBase.pxd", -- "cylp\\cy\\CyCoinModel.pxd", -- "cylp\\cy\\CyCoinPackedMatrix.pxd", -- "cylp\\cy\\CyCgl.pxd", -- "cylp\\cy\\CyCbcNode.pxd", -- "cylp\\cy\\CyOsiSolverInterface.pxd", -- "cylp\\cy\\CyCbcModel.pxd", -- "cylp\\cy\\CyClpSimplex.pxd", -+ "cylp/cy/CyCoinIndexedVector.pxd", -+ "cylp/cy/CyClpPrimalColumnPivotBase.pxd", -+ "cylp/cy/CyCoinModel.pxd", -+ "cylp/cy/CyCoinPackedMatrix.pxd", -+ "cylp/cy/CyCgl.pxd", -+ "cylp/cy/CyCbcNode.pxd", -+ "cylp/cy/CyOsiSolverInterface.pxd", -+ "cylp/cy/CyCbcModel.pxd", -+ "cylp/cy/CyClpSimplex.pxd", - }; - /* BufferFormatStructs.proto */ - #define IS_UNSIGNED(type) (((type) -1) > 0) -@@ -933,7 +1023,7 @@ typedef struct { - } __Pyx_BufFmt_Context; - - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":776 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":690 - * # in Cython to enable them only on the right systems. - * - * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< -@@ -942,7 +1032,7 @@ typedef struct { - */ - typedef npy_int8 __pyx_t_5numpy_int8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":777 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":691 - * - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< -@@ -951,7 +1041,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; - */ - typedef npy_int16 __pyx_t_5numpy_int16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":778 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":692 - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< -@@ -960,7 +1050,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; - */ - typedef npy_int32 __pyx_t_5numpy_int32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":779 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":693 - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t - * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< -@@ -969,7 +1059,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; - */ - typedef npy_int64 __pyx_t_5numpy_int64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":783 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":697 - * #ctypedef npy_int128 int128_t - * - * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< -@@ -978,7 +1068,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; - */ - typedef npy_uint8 __pyx_t_5numpy_uint8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":784 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":698 - * - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< -@@ -987,7 +1077,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; - */ - typedef npy_uint16 __pyx_t_5numpy_uint16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":785 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":699 - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< -@@ -996,7 +1086,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; - */ - typedef npy_uint32 __pyx_t_5numpy_uint32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":786 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":700 - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t - * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< -@@ -1005,7 +1095,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; - */ - typedef npy_uint64 __pyx_t_5numpy_uint64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":790 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":704 - * #ctypedef npy_uint128 uint128_t - * - * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< -@@ -1014,7 +1104,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; - */ - typedef npy_float32 __pyx_t_5numpy_float32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":791 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":705 - * - * ctypedef npy_float32 float32_t - * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< -@@ -1023,7 +1113,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; - */ - typedef npy_float64 __pyx_t_5numpy_float64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":800 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":714 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< -@@ -1032,7 +1122,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; - */ - typedef npy_long __pyx_t_5numpy_int_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":801 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":715 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< -@@ -1041,7 +1131,7 @@ typedef npy_long __pyx_t_5numpy_int_t; - */ - typedef npy_longlong __pyx_t_5numpy_long_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":802 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":716 - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t - * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< -@@ -1050,7 +1140,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; - */ - typedef npy_longlong __pyx_t_5numpy_longlong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":804 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":718 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< -@@ -1059,7 +1149,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; - */ - typedef npy_ulong __pyx_t_5numpy_uint_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":805 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":719 - * - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< -@@ -1068,7 +1158,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":806 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":720 - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t - * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< -@@ -1077,7 +1167,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":808 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":722 - * ctypedef npy_ulonglong ulonglong_t - * - * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< -@@ -1086,7 +1176,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - */ - typedef npy_intp __pyx_t_5numpy_intp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":809 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":723 - * - * ctypedef npy_intp intp_t - * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< -@@ -1095,7 +1185,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; - */ - typedef npy_uintp __pyx_t_5numpy_uintp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":811 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":725 - * ctypedef npy_uintp uintp_t - * - * ctypedef npy_double float_t # <<<<<<<<<<<<<< -@@ -1104,7 +1194,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; - */ - typedef npy_double __pyx_t_5numpy_float_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":812 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":726 - * - * ctypedef npy_double float_t - * ctypedef npy_double double_t # <<<<<<<<<<<<<< -@@ -1113,7 +1203,7 @@ typedef npy_double __pyx_t_5numpy_float_t; - */ - typedef npy_double __pyx_t_5numpy_double_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":813 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":727 - * ctypedef npy_double float_t - * ctypedef npy_double double_t - * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< -@@ -1175,7 +1265,7 @@ struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex; - struct __pyx_obj_4cylp_2cy_12CyClpSimplex_VarStatus; - struct __pyx_obj_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":815 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":729 - * ctypedef npy_longdouble longdouble_t - * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< -@@ -1184,7 +1274,7 @@ struct __pyx_obj_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase; - */ - typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":816 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":730 - * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< -@@ -1193,7 +1283,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - */ - typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":817 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":731 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< -@@ -1202,7 +1292,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - */ - typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":819 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":733 - * ctypedef npy_clongdouble clongdouble_t - * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< -@@ -1927,11 +2017,45 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame) - #endif - #define __Pyx_TraceDeclarations\ -- static PyCodeObject *__pyx_frame_code = NULL;\ -- CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\ -- int __Pyx_use_tracing = 0; -+ static PyCodeObject *__pyx_frame_code = NULL;\ -+ CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\ -+ int __Pyx_use_tracing = 0; - #define __Pyx_TraceFrameInit(codeobj)\ -- if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj; -+ if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj; -+#if PY_VERSION_HEX >= 0x030b00a2 -+ #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\ -+ (unlikely((tstate)->cframe->use_tracing) &&\ -+ (!(check_tracing) || !(tstate)->tracing) &&\ -+ (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc))) -+ #define __Pyx_EnterTracing(tstate) PyThreadState_EnterTracing(tstate) -+ #define __Pyx_LeaveTracing(tstate) PyThreadState_LeaveTracing(tstate) -+#elif PY_VERSION_HEX >= 0x030a00b1 -+ #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\ -+ (unlikely((tstate)->cframe->use_tracing) &&\ -+ (!(check_tracing) || !(tstate)->tracing) &&\ -+ (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc))) -+ #define __Pyx_EnterTracing(tstate)\ -+ do { tstate->tracing++; tstate->cframe->use_tracing = 0; } while (0) -+ #define __Pyx_LeaveTracing(tstate)\ -+ do {\ -+ tstate->tracing--;\ -+ tstate->cframe->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\ -+ || tstate->c_profilefunc != NULL);\ -+ } while (0) -+#else -+ #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\ -+ (unlikely((tstate)->use_tracing) &&\ -+ (!(check_tracing) || !(tstate)->tracing) &&\ -+ (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc))) -+ #define __Pyx_EnterTracing(tstate)\ -+ do { tstate->tracing++; tstate->use_tracing = 0; } while (0) -+ #define __Pyx_LeaveTracing(tstate)\ -+ do {\ -+ tstate->tracing--;\ -+ tstate->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\ -+ || tstate->c_profilefunc != NULL);\ -+ } while (0) -+#endif - #ifdef WITH_THREAD - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\ - if (nogil) {\ -@@ -1939,8 +2063,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ -- if (unlikely(tstate->use_tracing) && !tstate->tracing &&\ -- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ -+ if (__Pyx_IsTracing(tstate, 1, 1)) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\ - }\ - PyGILState_Release(state);\ -@@ -1948,8 +2071,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - }\ - } else {\ - PyThreadState* tstate = PyThreadState_GET();\ -- if (unlikely(tstate->use_tracing) && !tstate->tracing &&\ -- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ -+ if (__Pyx_IsTracing(tstate, 1, 1)) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\ - if (unlikely(__Pyx_use_tracing < 0)) goto_error;\ - }\ -@@ -1957,8 +2079,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - #else - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\ - { PyThreadState* tstate = PyThreadState_GET();\ -- if (unlikely(tstate->use_tracing) && !tstate->tracing &&\ -- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ -+ if (__Pyx_IsTracing(tstate, 1, 1)) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\ - if (unlikely(__Pyx_use_tracing < 0)) goto_error;\ - }\ -@@ -1967,10 +2088,8 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - #define __Pyx_TraceException()\ - if (likely(!__Pyx_use_tracing)); else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ -- if (tstate->use_tracing &&\ -- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ -- tstate->tracing++;\ -- tstate->use_tracing = 0;\ -+ if (__Pyx_IsTracing(tstate, 0, 1)) {\ -+ __Pyx_EnterTracing(tstate);\ - PyObject *exc_info = __Pyx_GetExceptionTuple(tstate);\ - if (exc_info) {\ - if (CYTHON_TRACE && tstate->c_tracefunc)\ -@@ -1980,22 +2099,19 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\ - Py_DECREF(exc_info);\ - }\ -- tstate->use_tracing = 1;\ -- tstate->tracing--;\ -+ __Pyx_LeaveTracing(tstate);\ - }\ - } - static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) { - PyObject *type, *value, *traceback; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); -- tstate->tracing++; -- tstate->use_tracing = 0; -+ __Pyx_EnterTracing(tstate); - if (CYTHON_TRACE && tstate->c_tracefunc) - tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result); - if (tstate->c_profilefunc) - tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result); - CYTHON_FRAME_DEL(frame); -- tstate->use_tracing = 1; -- tstate->tracing--; -+ __Pyx_LeaveTracing(tstate); - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - } - #ifdef WITH_THREAD -@@ -2006,14 +2122,14 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ -- if (tstate->use_tracing) {\ -+ if (__Pyx_IsTracing(tstate, 0, 0)) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - PyGILState_Release(state);\ - }\ - } else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ -- if (tstate->use_tracing) {\ -+ if (__Pyx_IsTracing(tstate, 0, 0)) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - }\ -@@ -2022,7 +2138,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - #define __Pyx_TraceReturn(result, nogil)\ - if (likely(!__Pyx_use_tracing)); else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ -- if (tstate->use_tracing) {\ -+ if (__Pyx_IsTracing(tstate, 0, 0)) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - } -@@ -2042,11 +2158,9 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - PyObject *type, *value, *traceback; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - __Pyx_PyFrame_SetLineNumber(frame, lineno); -- tstate->tracing++; -- tstate->use_tracing = 0; -+ __Pyx_EnterTracing(tstate); - ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL); -- tstate->use_tracing = 1; -- tstate->tracing--; -+ __Pyx_LeaveTracing(tstate); - if (likely(!ret)) { - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - } else { -@@ -2065,7 +2179,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ -- if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\ -+ if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\ - ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\ - }\ - PyGILState_Release(state);\ -@@ -2073,7 +2187,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - }\ - } else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ -- if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\ -+ if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\ - int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\ - if (unlikely(ret)) goto_error;\ - }\ -@@ -2083,7 +2197,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - #define __Pyx_TraceLine(lineno, nogil, goto_error)\ - if (likely(!__Pyx_use_tracing)); else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ -- if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\ -+ if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\ - int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\ - if (unlikely(ret)) goto_error;\ - }\ -@@ -2139,64 +2253,6 @@ static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info); - static Py_ssize_t __Pyx_minusones[] = { -1, -1, -1, -1, -1, -1, -1, -1 }; - static Py_ssize_t __Pyx_zeros[] = { 0, 0, 0, 0, 0, 0, 0, 0 }; - --/* PyCFunctionFastCall.proto */ --#if CYTHON_FAST_PYCCALL --static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); --#else --#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) --#endif -- --/* PyFunctionFastCall.proto */ --#if CYTHON_FAST_PYCALL --#define __Pyx_PyFunction_FastCall(func, args, nargs)\ -- __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) --#if 1 || PY_VERSION_HEX < 0x030600B1 --static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); --#else --#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) --#endif --#define __Pyx_BUILD_ASSERT_EXPR(cond)\ -- (sizeof(char [1 - 2*!(cond)]) - 1) --#ifndef Py_MEMBER_SIZE --#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) --#endif -- static size_t __pyx_pyframe_localsplus_offset = 0; -- #include "frameobject.h" -- #define __Pxy_PyFrame_Initialize_Offsets()\ -- ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ -- (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) -- #define __Pyx_PyFrame_GetLocalsplus(frame)\ -- (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) --#endif -- --/* PyObjectCallMethO.proto */ --#if CYTHON_COMPILING_IN_CPYTHON --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); --#endif -- --/* PyObjectCallOneArg.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); -- --/* DictGetItem.proto */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); --#define __Pyx_PyObject_Dict_GetItem(obj, name)\ -- (likely(PyDict_CheckExact(obj)) ?\ -- __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) --#else --#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) --#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) --#endif -- --/* RaiseTooManyValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); -- --/* RaiseNeedMoreValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); -- --/* RaiseNoneIterError.proto */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -- - /* GetTopmostException.proto */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); -@@ -2246,6 +2302,9 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - /* SetVTable.proto */ - static int __Pyx_SetVtable(PyObject *dict, void *vtable); - -+/* PyObjectGetAttrStrNoError.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); -+ - /* SetupReduce.proto */ - static int __Pyx_setup_reduce(PyObject* type_obj); - -@@ -2338,8 +2397,10 @@ typedef struct { - #endif - - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -+/* GCCDiagnostics.proto */ -+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -+#define __Pyx_HAS_GCC_DIAGNOSTIC -+#endif - - /* RealImag.proto */ - #if CYTHON_CCOMPLEX -@@ -2439,12 +2500,12 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); - #endif - #endif - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); -- - /* CIntFromPy.proto */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); - -+/* CIntToPy.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -+ - /* CIntToPy.proto */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); - -@@ -2577,8 +2638,17 @@ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; - static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; - static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; - static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -+static PyTypeObject *__pyx_ptype_5numpy_generic = 0; -+static PyTypeObject *__pyx_ptype_5numpy_number = 0; -+static PyTypeObject *__pyx_ptype_5numpy_integer = 0; -+static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; -+static PyTypeObject *__pyx_ptype_5numpy_floating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; -+static PyTypeObject *__pyx_ptype_5numpy_character = 0; - static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ - static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/ - - /* Module declarations from 'cylp.cy.CyCoinModel' */ -@@ -2640,60 +2710,40 @@ int __pyx_module_is_main_cylp__cy__CyClpDualRowPivotBase = 0; - - /* Implementation of 'cylp.cy.CyClpDualRowPivotBase' */ - static PyObject *__pyx_builtin_TypeError; --static PyObject *__pyx_builtin_ValueError; --static PyObject *__pyx_builtin_range; --static PyObject *__pyx_builtin_RuntimeError; - static PyObject *__pyx_builtin_ImportError; - static const char __pyx_k_main[] = "__main__"; - static const char __pyx_k_name[] = "__name__"; - static const char __pyx_k_test[] = "__test__"; --static const char __pyx_k_range[] = "range"; - static const char __pyx_k_reduce[] = "__reduce__"; - static const char __pyx_k_getstate[] = "__getstate__"; - static const char __pyx_k_setstate[] = "__setstate__"; - static const char __pyx_k_TypeError[] = "TypeError"; - static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; --static const char __pyx_k_ValueError[] = "ValueError"; - static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; - static const char __pyx_k_ImportError[] = "ImportError"; --static const char __pyx_k_RuntimeError[] = "RuntimeError"; - static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; - static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; - static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; - static const char __pyx_k_CyClpDualRowPivotBase[] = "CyClpDualRowPivotBase"; --static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; - static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; --static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; - static const char __pyx_k_CyClpDualRowPivotBase_pyx_pivotR[] = "CyClpDualRowPivotBase.pyx: pivotRow() should be implemented."; - static const char __pyx_k_CyClpDualRowPivotBase_pyx_update[] = "CyClpDualRowPivotBase.pyx: updateWeights should be implemented."; --static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; --static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; --static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; - static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; - static const char __pyx_k_self_CppSelf_cannot_be_converted[] = "self.CppSelf cannot be converted to a Python object for pickling"; - static const char __pyx_k_CyClpDualRowPivotBase_pyx_update_2[] = "CyClpDualRowPivotBase.pyx: updatePrimalSolution should be implemented."; --static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; - static PyObject *__pyx_n_s_CyClpDualRowPivotBase; - static PyObject *__pyx_kp_s_CyClpDualRowPivotBase_pyx_pivotR; - static PyObject *__pyx_kp_s_CyClpDualRowPivotBase_pyx_update; - static PyObject *__pyx_kp_s_CyClpDualRowPivotBase_pyx_update_2; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; - static PyObject *__pyx_n_s_ImportError; --static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; --static PyObject *__pyx_n_s_RuntimeError; - static PyObject *__pyx_n_s_TypeError; --static PyObject *__pyx_n_s_ValueError; - static PyObject *__pyx_n_s_cline_in_traceback; - static PyObject *__pyx_n_s_getstate; - static PyObject *__pyx_n_s_main; - static PyObject *__pyx_n_s_name; --static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; --static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; - static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; - static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; - static PyObject *__pyx_n_s_pyx_vtable; --static PyObject *__pyx_n_s_range; - static PyObject *__pyx_n_s_reduce; - static PyObject *__pyx_n_s_reduce_cython; - static PyObject *__pyx_n_s_reduce_ex; -@@ -2701,14 +2751,11 @@ static PyObject *__pyx_kp_s_self_CppSelf_cannot_be_converted; - static PyObject *__pyx_n_s_setstate; - static PyObject *__pyx_n_s_setstate_cython; - static PyObject *__pyx_n_s_test; --static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; - static int __pyx_pf_4cylp_2cy_21CyClpDualRowPivotBase_21CyClpDualRowPivotBase___init__(struct __pyx_obj_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_21CyClpDualRowPivotBase_21CyClpDualRowPivotBase_5nRows___get__(struct __pyx_obj_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_21CyClpDualRowPivotBase_21CyClpDualRowPivotBase_5nCols___get__(struct __pyx_obj_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_21CyClpDualRowPivotBase_21CyClpDualRowPivotBase_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_21CyClpDualRowPivotBase_21CyClpDualRowPivotBase_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ - static PyObject *__pyx_tp_new_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ - static PyObject *__pyx_tuple_; - static PyObject *__pyx_tuple__2; -@@ -2717,11 +2764,6 @@ static PyObject *__pyx_tuple__4; - static PyObject *__pyx_tuple__5; - static PyObject *__pyx_tuple__6; - static PyObject *__pyx_tuple__7; --static PyObject *__pyx_tuple__8; --static PyObject *__pyx_tuple__9; --static PyObject *__pyx_tuple__10; --static PyObject *__pyx_tuple__11; --static PyObject *__pyx_tuple__12; - /* Late includes */ - - /* "cylp/cy/CyClpDualRowPivotBase.pyx":9 -@@ -2738,6 +2780,9 @@ static int __pyx_f_4cylp_2cy_21CyClpDualRowPivotBase_RunPivotRow(void *__pyx_v_p - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("RunPivotRow", 0); - __Pyx_TraceCall("RunPivotRow", __pyx_f[1], 9, 0, __PYX_ERR(1, 9, __pyx_L1_error)); - -@@ -2786,6 +2831,9 @@ static ClpDualRowPivot *__pyx_f_4cylp_2cy_21CyClpDualRowPivotBase_RunDualPivotCl - ClpDualRowPivot *__pyx_r; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("RunDualPivotClone", 0); - __Pyx_TraceCall("RunDualPivotClone", __pyx_f[1], 12, 0, __PYX_ERR(1, 12, __pyx_L1_error)); - -@@ -2829,6 +2877,9 @@ static double __pyx_f_4cylp_2cy_21CyClpDualRowPivotBase_RunUpdateWeights(void *_ - double __pyx_r; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("RunUpdateWeights", 0); - __Pyx_TraceCall("RunUpdateWeights", __pyx_f[1], 15, 0, __PYX_ERR(1, 15, __pyx_L1_error)); - -@@ -2874,6 +2925,9 @@ static void __pyx_f_4cylp_2cy_21CyClpDualRowPivotBase_RunUpdatePrimalSolution(vo - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("RunUpdatePrimalSolution", 0); - __Pyx_TraceCall("RunUpdatePrimalSolution", __pyx_f[1], 21, 0, __PYX_ERR(1, 21, __pyx_L1_error)); - -@@ -2955,6 +3009,9 @@ static int __pyx_pf_4cylp_2cy_21CyClpDualRowPivotBase_21CyClpDualRowPivotBase___ - int __pyx_r; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[1], 30, 0, __PYX_ERR(1, 30, __pyx_L1_error)); - -@@ -3000,6 +3057,9 @@ static PyObject *__pyx_f_4cylp_2cy_21CyClpDualRowPivotBase_21CyClpDualRowPivotBa - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("pivotRow", 0); - __Pyx_TraceCall("pivotRow", __pyx_f[1], 38, 0, __PYX_ERR(1, 38, __pyx_L1_error)); - -@@ -3048,6 +3108,9 @@ static ClpDualRowPivot *__pyx_f_4cylp_2cy_21CyClpDualRowPivotBase_21CyClpDualRow - ClpDualRowPivot *__pyx_r; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("clone", 0); - __Pyx_TraceCall("clone", __pyx_f[1], 42, 0, __PYX_ERR(1, 42, __pyx_L1_error)); - -@@ -3101,6 +3164,9 @@ static double __pyx_f_4cylp_2cy_21CyClpDualRowPivotBase_21CyClpDualRowPivotBase_ - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("updateWeights", 0); - __Pyx_TraceCall("updateWeights", __pyx_f[1], 52, 0, __PYX_ERR(1, 52, __pyx_L1_error)); - -@@ -3149,6 +3215,9 @@ static void __pyx_f_4cylp_2cy_21CyClpDualRowPivotBase_21CyClpDualRowPivotBase_up - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("updatePrimalSolution", 0); - __Pyx_TraceCall("updatePrimalSolution", __pyx_f[1], 59, 0, __PYX_ERR(1, 59, __pyx_L1_error)); - __pyx_pybuffer_changeInObjective.pybuffer.buf = NULL; -@@ -3202,6 +3271,9 @@ static IClpSimplex *__pyx_f_4cylp_2cy_21CyClpDualRowPivotBase_21CyClpDualRowPivo - IClpSimplex *__pyx_r; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("model", 0); - __Pyx_TraceCall("model", __pyx_f[1], 66, 0, __PYX_ERR(1, 66, __pyx_L1_error)); - -@@ -3244,6 +3316,9 @@ static IClpSimplex *__pyx_f_4cylp_2cy_21CyClpDualRowPivotBase_21CyClpDualRowPivo - static void __pyx_f_4cylp_2cy_21CyClpDualRowPivotBase_21CyClpDualRowPivotBase_setModel(struct __pyx_obj_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase *__pyx_v_self, IClpSimplex *__pyx_v_m) { - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("setModel", 0); - __Pyx_TraceCall("setModel", __pyx_f[1], 69, 0, __PYX_ERR(1, 69, __pyx_L1_error)); - -@@ -3285,6 +3360,9 @@ static double *__pyx_f_4cylp_2cy_21CyClpDualRowPivotBase_21CyClpDualRowPivotBase - double *__pyx_r; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("getReducedCosts", 0); - __Pyx_TraceCall("getReducedCosts", __pyx_f[1], 72, 0, __PYX_ERR(1, 72, __pyx_L1_error)); - -@@ -3342,6 +3420,9 @@ static PyObject *__pyx_pf_4cylp_2cy_21CyClpDualRowPivotBase_21CyClpDualRowPivotB - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 76, 0, __PYX_ERR(1, 76, __pyx_L1_error)); - -@@ -3404,6 +3485,9 @@ static PyObject *__pyx_pf_4cylp_2cy_21CyClpDualRowPivotBase_21CyClpDualRowPivotB - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 80, 0, __PYX_ERR(1, 80, __pyx_L1_error)); - -@@ -3463,6 +3547,9 @@ static PyObject *__pyx_pf_4cylp_2cy_21CyClpDualRowPivotBase_21CyClpDualRowPivotB - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - __Pyx_TraceCall("__reduce_cython__", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error)); - -@@ -3521,6 +3608,9 @@ static PyObject *__pyx_pf_4cylp_2cy_21CyClpDualRowPivotBase_21CyClpDualRowPivotB - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - __Pyx_TraceCall("__setstate_cython__", __pyx_f[0], 3, 0, __PYX_ERR(0, 3, __pyx_L1_error)); - -@@ -3553,1952 +3643,355 @@ static PyObject *__pyx_pf_4cylp_2cy_21CyClpDualRowPivotBase_21CyClpDualRowPivotB - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 -+ * ctypedef npy_cdouble complex_t -+ * -+ * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(1, a) -+ * - */ - --/* Python wrapper */ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); -- __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_v_i; -- int __pyx_v_ndim; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- int __pyx_v_t; -- char *__pyx_v_f; -- PyArray_Descr *__pyx_v_descr = 0; -- int __pyx_v_offset; -- int __pyx_r; -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { -+ PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- int __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- int __pyx_t_4; -- int __pyx_t_5; -- int __pyx_t_6; -- PyArray_Descr *__pyx_t_7; -- PyObject *__pyx_t_8 = NULL; -- char *__pyx_t_9; -- if (__pyx_v_info == NULL) { -- PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); -- return -1; -- } -- __Pyx_RefNannySetupContext("__getbuffer__", 0); -- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); -- __Pyx_GIVEREF(__pyx_v_info->obj); -- __Pyx_TraceCall("__getbuffer__", __pyx_f[2], 258, 0, __PYX_ERR(2, 258, __pyx_L1_error)); -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); -+ __Pyx_TraceCall("PyArray_MultiIterNew1", __pyx_f[2], 735, 0, __PYX_ERR(2, 735, __pyx_L1_error)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":265 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":736 - * -- * cdef int i, ndim -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -+ * cdef inline object PyArray_MultiIterNew1(a): -+ * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< - * -+ * cdef inline object PyArray_MultiIterNew2(a, b): - */ -- __pyx_v_endian_detector = 1; -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":266 -- * cdef int i, ndim -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 -+ * ctypedef npy_cdouble complex_t -+ * -+ * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(1, a) - * -- * ndim = PyArray_NDIM(self) - */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":268 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_TraceReturn(__pyx_r, 0); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 -+ * return PyArray_MultiIterNew(1, a) - * -- * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(2, a, b) - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) - */ -- __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L4_bool_binop_done; -- } -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_TraceDeclarations -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); -+ __Pyx_TraceCall("PyArray_MultiIterNew2", __pyx_f[2], 738, 0, __PYX_ERR(2, 738, __pyx_L1_error)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":271 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":739 - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not C contiguous") -+ * cdef inline object PyArray_MultiIterNew2(a, b): -+ * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< - * -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): - */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L4_bool_binop_done:; -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 -+ * return PyArray_MultiIterNew(1, a) - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(2, a, b) - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) - */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 272, __pyx_L1_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- } -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_TraceReturn(__pyx_r, 0); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 -+ * return PyArray_MultiIterNew(2, a, b) -+ * -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(3, a, b, c) - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") - */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L7_bool_binop_done; -- } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":275 -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_TraceDeclarations -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); -+ __Pyx_TraceCall("PyArray_MultiIterNew3", __pyx_f[2], 741, 0, __PYX_ERR(2, 741, __pyx_L1_error)); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":742 - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not Fortran contiguous") -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): -+ * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< - * -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L7_bool_binop_done:; -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 -+ * return PyArray_MultiIterNew(2, a, b) - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(3, a, b, c) - * -- * info.buf = PyArray_DATA(self) - */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 276, __pyx_L1_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- } -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_TraceReturn(__pyx_r, 0); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":278 -- * raise ValueError(u"ndarray is not Fortran contiguous") -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 -+ * return PyArray_MultiIterNew(3, a, b, c) - * -- * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":279 -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(4, a, b, c, d) - * -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * # Allocate new buffer for strides and shape info. -- */ -- __pyx_v_info->ndim = __pyx_v_ndim; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. - */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":283 -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- */ -- __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":284 -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim # <<<<<<<<<<<<<< -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- */ -- __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":285 -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim -- * for i in range(ndim): # <<<<<<<<<<<<<< -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] -- */ -- __pyx_t_4 = __pyx_v_ndim; -- __pyx_t_5 = __pyx_t_4; -- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { -- __pyx_v_i = __pyx_t_6; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":286 -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- */ -- (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":287 -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< -- * else: -- * info.strides = PyArray_STRIDES(self) -- */ -- (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- goto __pyx_L9; -- } -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_TraceDeclarations -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); -+ __Pyx_TraceCall("PyArray_MultiIterNew4", __pyx_f[2], 744, 0, __PYX_ERR(2, 744, __pyx_L1_error)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":289 -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":745 -+ * -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -+ * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -+ * -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - */ -- /*else*/ { -- __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":290 -- * else: -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 -+ * return PyArray_MultiIterNew(3, a, b, c) -+ * -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(4, a, b, c, d) -+ * - */ -- __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); -- } -- __pyx_L9:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":291 -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL # <<<<<<<<<<<<<< -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) -- */ -- __pyx_v_info->suboffsets = NULL; -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_TraceReturn(__pyx_r, 0); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":292 -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< -- * info.readonly = not PyArray_ISWRITEABLE(self) -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 -+ * return PyArray_MultiIterNew(4, a, b, c, d) - * -- */ -- __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":293 -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * cdef int t - */ -- __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":296 -- * -- * cdef int t -- * cdef char* f = NULL # <<<<<<<<<<<<<< -- * cdef dtype descr = PyArray_DESCR(self) -- * cdef int offset -- */ -- __pyx_v_f = NULL; -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_TraceDeclarations -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); -+ __Pyx_TraceCall("PyArray_MultiIterNew5", __pyx_f[2], 747, 0, __PYX_ERR(2, 747, __pyx_L1_error)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":297 -- * cdef int t -- * cdef char* f = NULL -- * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< -- * cdef int offset -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":748 -+ * -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< - * -+ * cdef inline tuple PyDataType_SHAPE(dtype d): - */ -- __pyx_t_7 = PyArray_DESCR(__pyx_v_self); -- __pyx_t_3 = ((PyObject *)__pyx_t_7); -- __Pyx_INCREF(__pyx_t_3); -- __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); -- __pyx_t_3 = 0; -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":300 -- * cdef int offset -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 -+ * return PyArray_MultiIterNew(4, a, b, c, d) - * -- * info.obj = self # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * if not PyDataType_HASFIELDS(descr): - */ -- __Pyx_INCREF(((PyObject *)__pyx_v_self)); -- __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); -- __pyx_v_info->obj = ((PyObject *)__pyx_v_self); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":303 -- * -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num # <<<<<<<<<<<<<< -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- */ -- __pyx_t_4 = __pyx_v_descr->type_num; -- __pyx_v_t = __pyx_t_4; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); -- if (!__pyx_t_2) { -- goto __pyx_L15_next_or; -- } else { -- } -- __pyx_t_2 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_L15_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":305 -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L14_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 306, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":307 -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- */ -- switch (__pyx_v_t) { -- case NPY_BYTE: -- __pyx_v_f = ((char *)"b"); -- break; -- case NPY_UBYTE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":308 -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- */ -- __pyx_v_f = ((char *)"B"); -- break; -- case NPY_SHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":309 -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- */ -- __pyx_v_f = ((char *)"h"); -- break; -- case NPY_USHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":310 -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- */ -- __pyx_v_f = ((char *)"H"); -- break; -- case NPY_INT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":311 -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- */ -- __pyx_v_f = ((char *)"i"); -- break; -- case NPY_UINT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":312 -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- */ -- __pyx_v_f = ((char *)"I"); -- break; -- case NPY_LONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":313 -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- */ -- __pyx_v_f = ((char *)"l"); -- break; -- case NPY_ULONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":314 -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- */ -- __pyx_v_f = ((char *)"L"); -- break; -- case NPY_LONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":315 -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- */ -- __pyx_v_f = ((char *)"q"); -- break; -- case NPY_ULONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":316 -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- */ -- __pyx_v_f = ((char *)"Q"); -- break; -- case NPY_FLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":317 -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- */ -- __pyx_v_f = ((char *)"f"); -- break; -- case NPY_DOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":318 -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- */ -- __pyx_v_f = ((char *)"d"); -- break; -- case NPY_LONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":319 -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- */ -- __pyx_v_f = ((char *)"g"); -- break; -- case NPY_CFLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":320 -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- */ -- __pyx_v_f = ((char *)"Zf"); -- break; -- case NPY_CDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":321 -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" -- */ -- __pyx_v_f = ((char *)"Zd"); -- break; -- case NPY_CLONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":322 -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f = "O" -- * else: -- */ -- __pyx_v_f = ((char *)"Zg"); -- break; -- case NPY_OBJECT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":323 -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_v_f = ((char *)"O"); -- break; -- default: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":325 -- * elif t == NPY_OBJECT: f = "O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * info.format = f -- * return -- */ -- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_8); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 325, __pyx_L1_error) -- break; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":326 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f # <<<<<<<<<<<<<< -- * return -- * else: -- */ -- __pyx_v_info->format = __pyx_v_f; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":327 -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f -- * return # <<<<<<<<<<<<<< -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- */ -- __pyx_r = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":329 -- * return -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- */ -- /*else*/ { -- __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":330 -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, -- */ -- (__pyx_v_info->format[0]) = '^'; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":331 -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 # <<<<<<<<<<<<<< -- * f = _util_dtypestring(descr, info.format + 1, -- * info.format + _buffer_format_string_len, -- */ -- __pyx_v_offset = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":332 -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< -- * info.format + _buffer_format_string_len, -- * &offset) -- */ -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":335 -- * info.format + _buffer_format_string_len, -- * &offset) -- * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- */ -- (__pyx_v_f[0]) = '\x00'; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- -- /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; -- if (__pyx_v_info->obj != NULL) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- goto __pyx_L2; -- __pyx_L0:; -- if (__pyx_v_info->obj == Py_None) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- __pyx_L2:; -- __Pyx_XDECREF((PyObject *)__pyx_v_descr); -- __Pyx_TraceReturn(Py_None, 0); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); -- __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_TraceDeclarations -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("__releasebuffer__", 0); -- __Pyx_TraceCall("__releasebuffer__", __pyx_f[2], 337, 0, __PYX_ERR(2, 337, __pyx_L1_error)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":339 -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) -- */ -- PyObject_Free(__pyx_v_info->format); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":341 -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) # <<<<<<<<<<<<<< -- * # info.shape was stored after info.strides in the same block -- * -- */ -- PyObject_Free(__pyx_v_info->strides); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- -- /* function exit code */ -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_WriteUnraisable("numpy.ndarray.__releasebuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); -- __pyx_L0:; -- __Pyx_TraceReturn(Py_None, 0); -- __Pyx_RefNannyFinishContext(); --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -- * ctypedef npy_cdouble complex_t -- * -- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(1, a) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { -- PyObject *__pyx_r = NULL; -- __Pyx_TraceDeclarations -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); -- __Pyx_TraceCall("PyArray_MultiIterNew1", __pyx_f[2], 821, 0, __PYX_ERR(2, 821, __pyx_L1_error)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":822 -- * -- * cdef inline object PyArray_MultiIterNew1(a): -- * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -- * ctypedef npy_cdouble complex_t -- * -- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(1, a) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_TraceReturn(__pyx_r, 0); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -- * return PyArray_MultiIterNew(1, a) -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(2, a, b) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { -- PyObject *__pyx_r = NULL; -- __Pyx_TraceDeclarations -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); -- __Pyx_TraceCall("PyArray_MultiIterNew2", __pyx_f[2], 824, 0, __PYX_ERR(2, 824, __pyx_L1_error)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":825 -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): -- * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -- * return PyArray_MultiIterNew(1, a) -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(2, a, b) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_TraceReturn(__pyx_r, 0); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -- * return PyArray_MultiIterNew(2, a, b) -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { -- PyObject *__pyx_r = NULL; -- __Pyx_TraceDeclarations -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); -- __Pyx_TraceCall("PyArray_MultiIterNew3", __pyx_f[2], 827, 0, __PYX_ERR(2, 827, __pyx_L1_error)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":828 -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): -- * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -- * return PyArray_MultiIterNew(2, a, b) -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_TraceReturn(__pyx_r, 0); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { -- PyObject *__pyx_r = NULL; -- __Pyx_TraceDeclarations -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); -- __Pyx_TraceCall("PyArray_MultiIterNew4", __pyx_f[2], 830, 0, __PYX_ERR(2, 830, __pyx_L1_error)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":831 -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -- * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_TraceReturn(__pyx_r, 0); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { -- PyObject *__pyx_r = NULL; -- __Pyx_TraceDeclarations -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); -- __Pyx_TraceCall("PyArray_MultiIterNew5", __pyx_f[2], 833, 0, __PYX_ERR(2, 833, __pyx_L1_error)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":834 -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -- * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_TraceReturn(__pyx_r, 0); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { -- PyObject *__pyx_r = NULL; -- __Pyx_TraceDeclarations -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); -- __Pyx_TraceCall("PyDataType_SHAPE", __pyx_f[2], 836, 0, __PYX_ERR(2, 836, __pyx_L1_error)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -- * return d.subarray.shape -- * else: -- */ -- __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":838 -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape # <<<<<<<<<<<<<< -- * else: -- * return () -- */ -- __Pyx_XDECREF(__pyx_r); -- __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); -- __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -- * return d.subarray.shape -- * else: -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":840 -- * return d.subarray.shape -- * else: -- * return () # <<<<<<<<<<<<<< -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: -- */ -- /*else*/ { -- __Pyx_XDECREF(__pyx_r); -- __Pyx_INCREF(__pyx_empty_tuple); -- __pyx_r = __pyx_empty_tuple; -- goto __pyx_L0; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_AddTraceback("numpy.PyDataType_SHAPE", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_TraceReturn(__pyx_r, 0); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { -- PyArray_Descr *__pyx_v_child = 0; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- PyObject *__pyx_v_fields = 0; -- PyObject *__pyx_v_childname = NULL; -- PyObject *__pyx_v_new_offset = NULL; -- PyObject *__pyx_v_t = NULL; -- char *__pyx_r; -- __Pyx_TraceDeclarations -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- Py_ssize_t __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- PyObject *__pyx_t_4 = NULL; -- int __pyx_t_5; -- int __pyx_t_6; -- int __pyx_t_7; -- long __pyx_t_8; -- char *__pyx_t_9; -- __Pyx_RefNannySetupContext("_util_dtypestring", 0); -- __Pyx_TraceCall("_util_dtypestring", __pyx_f[2], 842, 0, __PYX_ERR(2, 842, __pyx_L1_error)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":847 -- * -- * cdef dtype child -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * cdef tuple fields -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":848 -- * cdef dtype child -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * cdef tuple fields -- * -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- if (unlikely(__pyx_v_descr->names == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -- __PYX_ERR(2, 851, __pyx_L1_error) -- } -- __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; -- for (;;) { -- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 851, __pyx_L1_error) -- #else -- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- #endif -- __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":852 -- * -- * for childname in descr.names: -- * fields = descr.fields[childname] # <<<<<<<<<<<<<< -- * child, new_offset = fields -- * -- */ -- if (unlikely(__pyx_v_descr->fields == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); -- __PYX_ERR(2, 852, __pyx_L1_error) -- } -- __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":853 -- * for childname in descr.names: -- * fields = descr.fields[childname] -- * child, new_offset = fields # <<<<<<<<<<<<<< -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- */ -- if (likely(__pyx_v_fields != Py_None)) { -- PyObject* sequence = __pyx_v_fields; -- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); -- if (unlikely(size != 2)) { -- if (size > 2) __Pyx_RaiseTooManyValuesError(2); -- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); -- __PYX_ERR(2, 853, __pyx_L1_error) -- } -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); -- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); -- __Pyx_INCREF(__pyx_t_3); -- __Pyx_INCREF(__pyx_t_4); -- #else -- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- #endif -- } else { -- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error) -- } -- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); -- __pyx_t_3 = 0; -- __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 856, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); -- if (!__pyx_t_7) { -- goto __pyx_L8_next_or; -- } else { -- } -- __pyx_t_7 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_L8_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":859 -- * -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * # One could encode it in the format string and have Cython -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); -- if (__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_6 = __pyx_t_7; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":860 -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * # One could encode it in the format string and have Cython -- * # complain instead, BUT: < and > in format strings also imply -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 860, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":870 -- * -- * # Output padding bytes -- * while offset[0] < new_offset: # <<<<<<<<<<<<<< -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- */ -- while (1) { -- __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (!__pyx_t_6) break; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":871 -- * # Output padding bytes -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< -- * f += 1 -- * offset[0] += 1 -- */ -- (__pyx_v_f[0]) = 0x78; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":872 -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte -- * f += 1 # <<<<<<<<<<<<<< -- * offset[0] += 1 -- * -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":873 -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- * offset[0] += 1 # <<<<<<<<<<<<<< -- * -- * offset[0] += child.itemsize -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":875 -- * offset[0] += 1 -- * -- * offset[0] += child.itemsize # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(child): -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); -- if (__pyx_t_6) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":878 -- * -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num # <<<<<<<<<<<<<< -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 880, __pyx_L1_error) -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_TraceReturn(__pyx_r, 0); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -+ * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape - */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":883 -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 98; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":884 -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":885 -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x68; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":886 -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 72; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":887 -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x69; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":888 -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 73; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":889 -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x6C; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":890 -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 76; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":891 -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x71; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":892 -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 81; -- goto __pyx_L15; -- } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":893 -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":894 -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x64; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":895 -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x67; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":896 -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x66; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":897 -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x64; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":898 -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x67; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":899 -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (likely(__pyx_t_6)) { -- (__pyx_v_f[0]) = 79; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":901 -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * f += 1 -- * else: -- */ -- /*else*/ { -- __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 901, __pyx_L1_error) -- } -- __pyx_L15:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":902 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * f += 1 # <<<<<<<<<<<<<< -- * else: -- * # Cython ignores struct boundary information ("T{...}"), -- */ -- __pyx_v_f = (__pyx_v_f + 1); -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_TraceDeclarations -+ __Pyx_RefNannyDeclarations -+ int __pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); -+ __Pyx_TraceCall("PyDataType_SHAPE", __pyx_f[2], 750, 0, __PYX_ERR(2, 750, __pyx_L1_error)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -+ * return d.subarray.shape -+ * else: - */ -- goto __pyx_L13; -- } -+ __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); -+ if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":906 -- * # Cython ignores struct boundary information ("T{...}"), -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< -- * return f -- * -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":752 -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape # <<<<<<<<<<<<<< -+ * else: -+ * return () - */ -- /*else*/ { -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 906, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- } -- __pyx_L13:; -+ __Pyx_XDECREF(__pyx_r); -+ __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); -+ __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -+ * return d.subarray.shape -+ * else: - */ - } -- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":907 -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) -- * return f # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":754 -+ * return d.subarray.shape -+ * else: -+ * return () # <<<<<<<<<<<<<< - * - * - */ -- __pyx_r = __pyx_v_f; -- goto __pyx_L0; -+ /*else*/ { -+ __Pyx_XDECREF(__pyx_r); -+ __Pyx_INCREF(__pyx_empty_tuple); -+ __pyx_r = __pyx_empty_tuple; -+ goto __pyx_L0; -+ } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -+ * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape - */ - - /* function exit code */ - __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_4); -- __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = NULL; -+ __Pyx_AddTraceback("numpy.PyDataType_SHAPE", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; - __pyx_L0:; -- __Pyx_XDECREF((PyObject *)__pyx_v_child); -- __Pyx_XDECREF(__pyx_v_fields); -- __Pyx_XDECREF(__pyx_v_childname); -- __Pyx_XDECREF(__pyx_v_new_offset); -- __Pyx_XDECREF(__pyx_v_t); -- __Pyx_TraceReturn(Py_None, 0); -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_TraceReturn(__pyx_r, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -5509,10 +4002,13 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx - static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("set_array_base", 0); -- __Pyx_TraceCall("set_array_base", __pyx_f[2], 1022, 0, __PYX_ERR(2, 1022, __pyx_L1_error)); -+ __Pyx_TraceCall("set_array_base", __pyx_f[2], 929, 0, __PYX_ERR(2, 929, __pyx_L1_error)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1023 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":930 - * - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< -@@ -5521,7 +4017,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - Py_INCREF(__pyx_v_base); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1024 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":931 - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< -@@ -5530,7 +4026,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -5547,7 +4043,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyFinishContext(); - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5561,10 +4057,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - int __pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("get_array_base", 0); -- __Pyx_TraceCall("get_array_base", __pyx_f[2], 1026, 0, __PYX_ERR(2, 1026, __pyx_L1_error)); -+ __Pyx_TraceCall("get_array_base", __pyx_f[2], 933, 0, __PYX_ERR(2, 933, __pyx_L1_error)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1027 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":934 - * - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< -@@ -5573,7 +4072,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - __pyx_v_base = PyArray_BASE(__pyx_v_arr); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5583,7 +4082,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_t_1 = ((__pyx_v_base == NULL) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1029 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":936 - * base = PyArray_BASE(arr) - * if base is NULL: - * return None # <<<<<<<<<<<<<< -@@ -5594,7 +4093,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5603,7 +4102,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1030 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":937 - * if base is NULL: - * return None - * return base # <<<<<<<<<<<<<< -@@ -5615,7 +4114,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = ((PyObject *)__pyx_v_base); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5634,12 +4133,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { -@@ -5654,14 +4153,17 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_array", 0); -- __Pyx_TraceCall("import_array", __pyx_f[2], 1034, 0, __PYX_ERR(2, 1034, __pyx_L1_error)); -+ __Pyx_TraceCall("import_array", __pyx_f[2], 941, 0, __PYX_ERR(2, 941, __pyx_L1_error)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - { -@@ -5673,20 +4175,20 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1036 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":943 - * cdef inline int import_array() except -1: - * try: -- * _import_array() # <<<<<<<<<<<<<< -+ * __pyx_import_array() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") - */ -- __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error) -+ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - } -@@ -5696,9 +4198,9 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1037 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":944 - * try: -- * _import_array() -+ * __pyx_import_array() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.multiarray failed to import") - * -@@ -5706,32 +4208,32 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __PYX_ERR(2, 945, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - __Pyx_XGIVEREF(__pyx_t_1); -@@ -5742,12 +4244,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - /* function exit code */ -@@ -5766,7 +4268,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -5786,10 +4288,13 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_umath", 0); -- __Pyx_TraceCall("import_umath", __pyx_f[2], 1040, 0, __PYX_ERR(2, 1040, __pyx_L1_error)); -+ __Pyx_TraceCall("import_umath", __pyx_f[2], 947, 0, __PYX_ERR(2, 947, __pyx_L1_error)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5805,16 +4310,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1042 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":949 - * cdef inline int import_umath() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5828,7 +4333,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1043 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":950 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< -@@ -5838,28 +4343,28 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __PYX_ERR(2, 951, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5874,7 +4379,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -5898,7 +4403,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -5918,10 +4423,13 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_ufunc", 0); -- __Pyx_TraceCall("import_ufunc", __pyx_f[2], 1046, 0, __PYX_ERR(2, 1046, __pyx_L1_error)); -+ __Pyx_TraceCall("import_ufunc", __pyx_f[2], 953, 0, __PYX_ERR(2, 953, __pyx_L1_error)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5937,16 +4445,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1048 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":955 - * cdef inline int import_ufunc() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5960,35 +4468,38 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1049 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":956 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") -+ * - */ - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1050 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":957 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -+ * -+ * cdef extern from *: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __PYX_ERR(2, 957, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -6003,7 +4514,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -6026,6 +4537,225 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_RefNannyFinishContext(); - return __pyx_r; - } -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_TraceDeclarations -+ __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("is_timedelta64_object", 0); -+ __Pyx_TraceCall("is_timedelta64_object", __pyx_f[2], 967, 0, __PYX_ERR(2, 967, __pyx_L1_error)); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":979 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_WriteUnraisable("numpy.is_timedelta64_object", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_TraceReturn(Py_None, 0); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_TraceDeclarations -+ __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("is_datetime64_object", 0); -+ __Pyx_TraceCall("is_datetime64_object", __pyx_f[2], 982, 0, __PYX_ERR(2, 982, __pyx_L1_error)); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":994 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_WriteUnraisable("numpy.is_datetime64_object", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_TraceReturn(Py_None, 0); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { -+ npy_datetime __pyx_r; -+ __Pyx_TraceDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_TraceCall("get_datetime64_value", __pyx_f[2], 997, 1, __PYX_ERR(2, 997, __pyx_L1_error)); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1004 -+ * also needed. That can be found using `get_datetime64_unit`. -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_WriteUnraisable("numpy.get_datetime64_value", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_TraceReturn(Py_None, 1); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { -+ npy_timedelta __pyx_r; -+ __Pyx_TraceDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_TraceCall("get_timedelta64_value", __pyx_f[2], 1007, 1, __PYX_ERR(2, 1007, __pyx_L1_error)); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1011 -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_WriteUnraisable("numpy.get_timedelta64_value", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_TraceReturn(Py_None, 1); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { -+ NPY_DATETIMEUNIT __pyx_r; -+ __Pyx_TraceDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_TraceCall("get_datetime64_unit", __pyx_f[2], 1014, 1, __PYX_ERR(2, 1014, __pyx_L1_error)); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1018 -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ * """ -+ * return (obj).obmeta.base # <<<<<<<<<<<<<< -+ */ -+ __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_WriteUnraisable("numpy.get_datetime64_unit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); -+ __pyx_r = (NPY_DATETIMEUNIT) 0; -+ __pyx_L0:; -+ __Pyx_TraceReturn(Py_None, 1); -+ return __pyx_r; -+} - static struct __pyx_vtabstruct_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase __pyx_vtable_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase; - - static PyObject *__pyx_tp_new_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { -@@ -6099,7 +4829,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPiv - sizeof(struct __pyx_obj_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -6149,8 +4884,14 @@ static PyTypeObject __pyx_type_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPiv - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif -- #if PY_VERSION_HEX >= 0x030800b1 -- 0, /*tp_vectorcall*/ -+ #if PY_VERSION_HEX >= 0x030800b1 -+ 0, /*tp_vectorcall*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ - #endif - }; - -@@ -6204,23 +4945,15 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_kp_s_CyClpDualRowPivotBase_pyx_pivotR, __pyx_k_CyClpDualRowPivotBase_pyx_pivotR, sizeof(__pyx_k_CyClpDualRowPivotBase_pyx_pivotR), 0, 0, 1, 0}, - {&__pyx_kp_s_CyClpDualRowPivotBase_pyx_update, __pyx_k_CyClpDualRowPivotBase_pyx_update, sizeof(__pyx_k_CyClpDualRowPivotBase_pyx_update), 0, 0, 1, 0}, - {&__pyx_kp_s_CyClpDualRowPivotBase_pyx_update_2, __pyx_k_CyClpDualRowPivotBase_pyx_update_2, sizeof(__pyx_k_CyClpDualRowPivotBase_pyx_update_2), 0, 0, 1, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, - {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, -- {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, -- {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, - {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, -- {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, - {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, - {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, - {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, -- {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, -- {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, - {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0}, - {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, - {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, -- {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, - {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, -@@ -6228,15 +4961,11 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, - {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, - {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, -- {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, - {0, 0, 0, 0, 0, 0, 0} - }; - static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error) -- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error) -- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(2, 285, __pyx_L1_error) -- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 856, __pyx_L1_error) -- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error) -+ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 945, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -@@ -6298,82 +5027,27 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_GOTREF(__pyx_tuple__5); - __Pyx_GIVEREF(__pyx_tuple__5); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__6); -- __Pyx_GIVEREF(__pyx_tuple__6); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__7); -- __Pyx_GIVEREF(__pyx_tuple__7); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__8); -- __Pyx_GIVEREF(__pyx_tuple__8); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__9); -- __Pyx_GIVEREF(__pyx_tuple__9); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__10); -- __Pyx_GIVEREF(__pyx_tuple__10); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(2, 1038, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__11); -- __Pyx_GIVEREF(__pyx_tuple__11); -+ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 945, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__6); -+ __Pyx_GIVEREF(__pyx_tuple__6); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(2, 1044, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__12); -- __Pyx_GIVEREF(__pyx_tuple__12); -+ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 951, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__7); -+ __Pyx_GIVEREF(__pyx_tuple__7); - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -6414,6 +5088,9 @@ static int __Pyx_modinit_variable_export_code(void) { - - static int __Pyx_modinit_function_export_code(void) { - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); - /*--- Function export code ---*/ - if (__Pyx_ExportFunction("RunPivotRow", (void (*)(void))__pyx_f_4cylp_2cy_21CyClpDualRowPivotBase_RunPivotRow, "int (void *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error) -@@ -6429,6 +5106,9 @@ static int __Pyx_modinit_function_export_code(void) { - - static int __Pyx_modinit_type_init_code(void) { - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); - /*--- Type init code ---*/ - __pyx_vtabptr_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase = &__pyx_vtable_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase; -@@ -6460,6 +5140,9 @@ static int __Pyx_modinit_type_init_code(void) { - static int __Pyx_modinit_type_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); - /*--- Type import code ---*/ - __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) -@@ -6495,18 +5178,38 @@ static int __Pyx_modinit_type_import_code(void) { - if (!__pyx_ptype_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase) __PYX_ERR(7, 67, __pyx_L1_error) - __pyx_vtabptr_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase = (struct __pyx_vtabstruct_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase)) __PYX_ERR(7, 67, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) -+ __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error) -- __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error) -- __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error) -+ __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error) -+ __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error) -- __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error) -+ __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error) -+ __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error) -+ __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error) -+ __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error) -+ __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error) -+ __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error) -+ __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error) -+ __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error) -+ __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error) -+ __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error) -+ __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyCoinModel"); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 34, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); -@@ -6609,17 +5312,19 @@ static int __Pyx_modinit_function_import_code(void) { - } - - --#if PY_MAJOR_VERSION < 3 --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC void --#else -+#ifndef CYTHON_NO_PYINIT_EXPORT - #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#elif PY_MAJOR_VERSION < 3 -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" void -+#else -+#define __Pyx_PyMODINIT_FUNC void - #endif - #else --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC PyObject * -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * - #else --#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#define __Pyx_PyMODINIT_FUNC PyObject * - #endif - #endif - -@@ -6703,6 +5408,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_CyClpDualRowPivotBase(PyObject *__ - __Pyx_TraceDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannyDeclarations - #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m) { -@@ -6750,11 +5458,9 @@ if (!__Pyx_RefNanny) { - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ -- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS -- #ifdef WITH_THREAD /* Python build with threading support? */ -+ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - PyEval_InitThreads(); - #endif -- #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; -@@ -6791,15 +5497,15 @@ if (!__Pyx_RefNanny) { - } - #endif - /*--- Builtin init code ---*/ -- if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Constants init code ---*/ -- if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Global type/function init code ---*/ - (void)__Pyx_modinit_global_init_code(); - (void)__Pyx_modinit_variable_export_code(); -- if (unlikely(__Pyx_modinit_function_export_code() != 0)) goto __pyx_L1_error; -- if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; -- if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_function_export_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) -+ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) -+ if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) - (void)__Pyx_modinit_variable_import_code(); - (void)__Pyx_modinit_function_import_code(); - /*--- Execution code ---*/ -@@ -6827,12 +5533,12 @@ if (!__Pyx_RefNanny) { - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -- * raise ImportError("numpy.core.umath failed to import") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - __Pyx_TraceReturn(Py_None, 0); - -@@ -6961,10 +5667,9 @@ static int __Pyx_TraceSetupAndCall(PyCodeObject** code, - (*frame)->f_tstate = tstate; - #endif - } -- __Pyx_PyFrame_SetLineNumber(*frame, firstlineno); -+ __Pyx_PyFrame_SetLineNumber(*frame, firstlineno); - retval = 1; -- tstate->tracing++; -- tstate->use_tracing = 0; -+ __Pyx_EnterTracing(tstate); - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - #if CYTHON_TRACE - if (tstate->c_tracefunc) -@@ -6972,12 +5677,10 @@ static int __Pyx_TraceSetupAndCall(PyCodeObject** code, - if (retval && tstate->c_profilefunc) - #endif - retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0; -- tstate->use_tracing = (tstate->c_profilefunc || -- (CYTHON_TRACE && tstate->c_tracefunc)); -- tstate->tracing--; -+ __Pyx_LeaveTracing(tstate); - if (retval) { - __Pyx_ErrRestoreInState(tstate, type, value, traceback); -- return tstate->use_tracing && retval; -+ return __Pyx_IsTracing(tstate, 0, 0) && retval; - } else { - Py_XDECREF(type); - Py_XDECREF(value); -@@ -7148,7 +5851,7 @@ static int __Pyx_CheckKeywordStrings( - #if CYTHON_COMPILING_IN_CPYTHON - static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; -- ternaryfunc call = func->ob_type->tp_call; -+ ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -@@ -7390,6 +6093,7 @@ static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { - } - static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { - switch (ch) { -+ case '?': return "'bool'"; - case 'c': return "'char'"; - case 'b': return "'signed char'"; - case 'B': return "'unsigned char'"; -@@ -7432,7 +6136,7 @@ static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { - } - static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { - switch (ch) { -- case 'c': case 'b': case 'B': case 's': case 'p': return 1; -+ case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; - case 'h': case 'H': return sizeof(short); - case 'i': case 'I': return sizeof(int); - case 'l': case 'L': return sizeof(long); -@@ -7516,7 +6220,7 @@ static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { - case 'b': case 'h': case 'i': - case 'l': case 'q': case 's': case 'p': - return 'I'; -- case 'B': case 'H': case 'I': case 'L': case 'Q': -+ case '?': case 'B': case 'H': case 'I': case 'L': case 'Q': - return 'U'; - case 'f': case 'd': case 'g': - return (is_complex ? 'C' : 'R'); -@@ -7660,9 +6364,7 @@ static PyObject * - __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) - { - const char *ts = *tsp; -- int i = 0, number; -- int ndim = ctx->head->field->type->ndim; --; -+ int i = 0, number, ndim; - ++ts; - if (ctx->new_count != 1) { - PyErr_SetString(PyExc_ValueError, -@@ -7670,6 +6372,7 @@ __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) - return NULL; - } - if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; -+ ndim = ctx->head->field->type->ndim; - while (*ts && *ts != ')') { - switch (*ts) { - case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; -@@ -7795,12 +6498,12 @@ static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const cha - return NULL; - } - CYTHON_FALLTHROUGH; -- case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': -+ case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': - case 'l': case 'L': case 'q': case 'Q': - case 'f': case 'd': case 'g': - case 'O': case 'p': -- if (ctx->enc_type == *ts && got_Z == ctx->is_complex && -- ctx->enc_packmode == ctx->new_packmode) { -+ if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) && -+ (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) { - ctx->enc_count += ctx->new_count; - ctx->new_count = 1; - got_Z = 0; -@@ -7883,250 +6586,6 @@ fail:; - return -1; - } - --/* PyCFunctionFastCall */ -- #if CYTHON_FAST_PYCCALL --static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { -- PyCFunctionObject *func = (PyCFunctionObject*)func_obj; -- PyCFunction meth = PyCFunction_GET_FUNCTION(func); -- PyObject *self = PyCFunction_GET_SELF(func); -- int flags = PyCFunction_GET_FLAGS(func); -- assert(PyCFunction_Check(func)); -- assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); -- assert(nargs >= 0); -- assert(nargs == 0 || args != NULL); -- /* _PyCFunction_FastCallDict() must not be called with an exception set, -- because it may clear it (directly or indirectly) and so the -- caller loses its exception */ -- assert(!PyErr_Occurred()); -- if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { -- return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); -- } else { -- return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); -- } --} --#endif -- --/* PyFunctionFastCall */ -- #if CYTHON_FAST_PYCALL --static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, -- PyObject *globals) { -- PyFrameObject *f; -- PyThreadState *tstate = __Pyx_PyThreadState_Current; -- PyObject **fastlocals; -- Py_ssize_t i; -- PyObject *result; -- assert(globals != NULL); -- /* XXX Perhaps we should create a specialized -- PyFrame_New() that doesn't take locals, but does -- take builtins without sanity checking them. -- */ -- assert(tstate != NULL); -- f = PyFrame_New(tstate, co, globals, NULL); -- if (f == NULL) { -- return NULL; -- } -- fastlocals = __Pyx_PyFrame_GetLocalsplus(f); -- for (i = 0; i < na; i++) { -- Py_INCREF(*args); -- fastlocals[i] = *args++; -- } -- result = PyEval_EvalFrameEx(f,0); -- ++tstate->recursion_depth; -- Py_DECREF(f); -- --tstate->recursion_depth; -- return result; --} --#if 1 || PY_VERSION_HEX < 0x030600B1 --static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { -- PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); -- PyObject *globals = PyFunction_GET_GLOBALS(func); -- PyObject *argdefs = PyFunction_GET_DEFAULTS(func); -- PyObject *closure; --#if PY_MAJOR_VERSION >= 3 -- PyObject *kwdefs; --#endif -- PyObject *kwtuple, **k; -- PyObject **d; -- Py_ssize_t nd; -- Py_ssize_t nk; -- PyObject *result; -- assert(kwargs == NULL || PyDict_Check(kwargs)); -- nk = kwargs ? PyDict_Size(kwargs) : 0; -- if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { -- return NULL; -- } -- if ( --#if PY_MAJOR_VERSION >= 3 -- co->co_kwonlyargcount == 0 && --#endif -- likely(kwargs == NULL || nk == 0) && -- co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { -- if (argdefs == NULL && co->co_argcount == nargs) { -- result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); -- goto done; -- } -- else if (nargs == 0 && argdefs != NULL -- && co->co_argcount == Py_SIZE(argdefs)) { -- /* function called with no arguments, but all parameters have -- a default value: use default values as arguments .*/ -- args = &PyTuple_GET_ITEM(argdefs, 0); -- result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); -- goto done; -- } -- } -- if (kwargs != NULL) { -- Py_ssize_t pos, i; -- kwtuple = PyTuple_New(2 * nk); -- if (kwtuple == NULL) { -- result = NULL; -- goto done; -- } -- k = &PyTuple_GET_ITEM(kwtuple, 0); -- pos = i = 0; -- while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { -- Py_INCREF(k[i]); -- Py_INCREF(k[i+1]); -- i += 2; -- } -- nk = i / 2; -- } -- else { -- kwtuple = NULL; -- k = NULL; -- } -- closure = PyFunction_GET_CLOSURE(func); --#if PY_MAJOR_VERSION >= 3 -- kwdefs = PyFunction_GET_KW_DEFAULTS(func); --#endif -- if (argdefs != NULL) { -- d = &PyTuple_GET_ITEM(argdefs, 0); -- nd = Py_SIZE(argdefs); -- } -- else { -- d = NULL; -- nd = 0; -- } --#if PY_MAJOR_VERSION >= 3 -- result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, -- args, (int)nargs, -- k, (int)nk, -- d, (int)nd, kwdefs, closure); --#else -- result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, -- args, (int)nargs, -- k, (int)nk, -- d, (int)nd, closure); --#endif -- Py_XDECREF(kwtuple); --done: -- Py_LeaveRecursiveCall(); -- return result; --} --#endif --#endif -- --/* PyObjectCallMethO */ -- #if CYTHON_COMPILING_IN_CPYTHON --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { -- PyObject *self, *result; -- PyCFunction cfunc; -- cfunc = PyCFunction_GET_FUNCTION(func); -- self = PyCFunction_GET_SELF(func); -- if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -- return NULL; -- result = cfunc(self, arg); -- Py_LeaveRecursiveCall(); -- if (unlikely(!result) && unlikely(!PyErr_Occurred())) { -- PyErr_SetString( -- PyExc_SystemError, -- "NULL result without error in PyObject_Call"); -- } -- return result; --} --#endif -- --/* PyObjectCallOneArg */ -- #if CYTHON_COMPILING_IN_CPYTHON --static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { -- PyObject *result; -- PyObject *args = PyTuple_New(1); -- if (unlikely(!args)) return NULL; -- Py_INCREF(arg); -- PyTuple_SET_ITEM(args, 0, arg); -- result = __Pyx_PyObject_Call(func, args, NULL); -- Py_DECREF(args); -- return result; --} --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { --#if CYTHON_FAST_PYCALL -- if (PyFunction_Check(func)) { -- return __Pyx_PyFunction_FastCall(func, &arg, 1); -- } --#endif -- if (likely(PyCFunction_Check(func))) { -- if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { -- return __Pyx_PyObject_CallMethO(func, arg); --#if CYTHON_FAST_PYCCALL -- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { -- return __Pyx_PyCFunction_FastCall(func, &arg, 1); --#endif -- } -- } -- return __Pyx__PyObject_CallOneArg(func, arg); --} --#else --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { -- PyObject *result; -- PyObject *args = PyTuple_Pack(1, arg); -- if (unlikely(!args)) return NULL; -- result = __Pyx_PyObject_Call(func, args, NULL); -- Py_DECREF(args); -- return result; --} --#endif -- --/* DictGetItem */ -- #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { -- PyObject *value; -- value = PyDict_GetItemWithError(d, key); -- if (unlikely(!value)) { -- if (!PyErr_Occurred()) { -- if (unlikely(PyTuple_Check(key))) { -- PyObject* args = PyTuple_Pack(1, key); -- if (likely(args)) { -- PyErr_SetObject(PyExc_KeyError, args); -- Py_DECREF(args); -- } -- } else { -- PyErr_SetObject(PyExc_KeyError, key); -- } -- } -- return NULL; -- } -- Py_INCREF(value); -- return value; --} --#endif -- --/* RaiseTooManyValuesToUnpack */ -- static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { -- PyErr_Format(PyExc_ValueError, -- "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); --} -- --/* RaiseNeedMoreValuesToUnpack */ -- static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { -- PyErr_Format(PyExc_ValueError, -- "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", -- index, (index == 1) ? "" : "s"); --} -- --/* RaiseNoneIterError */ -- static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); --} -- - /* GetTopmostException */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * -@@ -8350,6 +6809,28 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - return -1; - } - -+/* PyObjectGetAttrStrNoError */ -+ static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { -+ __Pyx_PyThreadState_declare -+ __Pyx_PyThreadState_assign -+ if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) -+ __Pyx_PyErr_Clear(); -+} -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { -+ PyObject *result; -+#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 -+ PyTypeObject* tp = Py_TYPE(obj); -+ if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { -+ return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); -+ } -+#endif -+ result = __Pyx_PyObject_GetAttrStr(obj, attr_name); -+ if (unlikely(!result)) { -+ __Pyx_PyObject_GetAttrStr_ClearAttributeError(); -+ } -+ return result; -+} -+ - /* SetupReduce */ - static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { - int ret; -@@ -8377,43 +6858,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { - PyObject *setstate = NULL; - PyObject *setstate_cython = NULL; - #if CYTHON_USE_PYTYPE_LOOKUP -- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #else -- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #endif - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #else -- object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #endif -- reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; -+ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; - if (reduce_ex == object_reduce_ex) { - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #else -- object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #endif -- reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; -+ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; - if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { -- reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; -+ reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); -+ if (likely(reduce_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (reduce == object_reduce || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); - if (!setstate) PyErr_Clear(); - if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { -- setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; -+ setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); -+ if (likely(setstate_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (!setstate || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - } - PyType_Modified((PyTypeObject*)type_obj); - } - } -- goto GOOD; --BAD: -+ goto __PYX_GOOD; -+__PYX_BAD: - if (!PyErr_Occurred()) - PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); - ret = -1; --GOOD: -+__PYX_GOOD: - #if !CYTHON_USE_PYTYPE_LOOKUP - Py_XDECREF(object_reduce); - Py_XDECREF(object_reduce_ex); -@@ -8535,7 +7024,7 @@ static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UIN - - /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK --static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { -+static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { - PyObject *use_cline; - PyObject *ptype, *pvalue, *ptraceback; - #if CYTHON_COMPILING_IN_CPYTHON -@@ -8565,7 +7054,7 @@ static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { - } - if (!use_cline) { - c_line = 0; -- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); -+ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; -@@ -8639,7 +7128,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - if (__pyx_code_cache.count == __pyx_code_cache.max_count) { - int new_max = __pyx_code_cache.max_count + 64; - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( -- __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); -+ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); - if (unlikely(!entries)) { - return; - } -@@ -8662,30 +7151,31 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { -- PyCodeObject *py_code = 0; -- PyObject *py_srcfile = 0; -- PyObject *py_funcname = 0; -+ PyCodeObject *py_code = NULL; -+ PyObject *py_funcname = NULL; - #if PY_MAJOR_VERSION < 3 -+ PyObject *py_srcfile = NULL; - py_srcfile = PyString_FromString(filename); -- #else -- py_srcfile = PyUnicode_FromString(filename); -- #endif - if (!py_srcfile) goto bad; -+ #endif - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; -+ funcname = PyUnicode_AsUTF8(py_funcname); -+ if (!funcname) goto bad; - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); -- #else -- py_funcname = PyUnicode_FromString(funcname); -+ if (!py_funcname) goto bad; - #endif - } -- if (!py_funcname) goto bad; -+ #if PY_MAJOR_VERSION < 3 - py_code = __Pyx_PyCode_New( - 0, - 0, -@@ -8704,11 +7194,16 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - __pyx_empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); -- Py_DECREF(py_funcname); -+ #else -+ py_code = PyCode_NewEmpty(filename, funcname, py_line); -+ #endif -+ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline - return py_code; - bad: -- Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -+ #if PY_MAJOR_VERSION < 3 -+ Py_XDECREF(py_srcfile); -+ #endif - return NULL; - } - static void __Pyx_AddTraceback(const char *funcname, int c_line, -@@ -8743,7 +7238,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - #if PY_MAJOR_VERSION < 3 - static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { - if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); -- if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); - PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); - return -1; - } -@@ -8755,7 +7249,6 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - return; - } - if ((0)) {} -- else if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); - view->obj = NULL; - Py_DECREF(obj); - } -@@ -8784,37 +7277,6 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - return (target_type) value;\ - } - --/* CIntToPy */ -- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(int) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(int) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(int) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(int), -- little, !is_unsigned); -- } --} -- - /* Declarations */ - #if CYTHON_CCOMPLEX - #ifdef __cplusplus -@@ -8932,7 +7394,6 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_float(a, a); - return __Pyx_c_prod_float(a, a); - case 3: - z = __Pyx_c_prod_float(a, a); -@@ -9087,7 +7548,6 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_double(a, a); - return __Pyx_c_prod_double(a, a); - case 3: - z = __Pyx_c_prod_double(a, a); -@@ -9125,40 +7585,16 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - #endif - #endif - --/* CIntToPy */ -- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { -- const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(enum NPY_TYPES) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(enum NPY_TYPES) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), -- little, !is_unsigned); -- } --} -- - /* CIntFromPy */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -9345,9 +7781,54 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - return (int) -1; - } - -+/* CIntToPy */ -+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif -+ const int is_unsigned = neg_one > const_zero; -+ if (is_unsigned) { -+ if (sizeof(int) < sizeof(long)) { -+ return PyInt_FromLong((long) value); -+ } else if (sizeof(int) <= sizeof(unsigned long)) { -+ return PyLong_FromUnsignedLong((unsigned long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+#endif -+ } -+ } else { -+ if (sizeof(int) <= sizeof(long)) { -+ return PyInt_FromLong((long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ return PyLong_FromLongLong((PY_LONG_LONG) value); -+#endif -+ } -+ } -+ { -+ int one = 1; int little = (int)*(unsigned char *)&one; -+ unsigned char *bytes = (unsigned char *)&value; -+ return _PyLong_FromByteArray(bytes, sizeof(int), -+ little, !is_unsigned); -+ } -+} -+ - /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(long) < sizeof(long)) { -@@ -9378,7 +7859,14 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - - /* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -9966,6 +8454,23 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_DECREF(x); - return ival; - } -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { -+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { -+ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); -+#if PY_MAJOR_VERSION < 3 -+ } else if (likely(PyInt_CheckExact(o))) { -+ return PyInt_AS_LONG(o); -+#endif -+ } else { -+ Py_ssize_t ival; -+ PyObject *x; -+ x = PyNumber_Index(o); -+ if (!x) return -1; -+ ival = PyInt_AsLong(x); -+ Py_DECREF(x); -+ return ival; -+ } -+} - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); - } -diff --git a/cylp/cy/CyClpPrimalColumnPivotBase.cpp b/cylp/cy/CyClpPrimalColumnPivotBase.cpp -index 10c5a89..ffa1838 100644 ---- a/cylp/cy/CyClpPrimalColumnPivotBase.cpp -+++ b/cylp/cy/CyClpPrimalColumnPivotBase.cpp -@@ -1,14 +1,16 @@ --/* Generated by Cython 0.29.12 */ -+/* Generated by Cython 0.29.25 */ - -+#ifndef PY_SSIZE_T_CLEAN - #define PY_SSIZE_T_CLEAN -+#endif /* PY_SSIZE_T_CLEAN */ - #include "Python.h" - #ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. - #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. - #else --#define CYTHON_ABI "0_29_12" --#define CYTHON_HEX_VERSION 0x001D0CF0 -+#define CYTHON_ABI "0_29_25" -+#define CYTHON_HEX_VERSION 0x001D19F0 - #define CYTHON_FUTURE_DIVISION 0 - #include - #ifndef offsetof -@@ -155,7 +157,7 @@ - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif -- #if PY_VERSION_HEX < 0x030300F0 -+ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) -@@ -174,7 +176,7 @@ - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL -- #define CYTHON_FAST_PYCALL 1 -+ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1) - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) -@@ -193,7 +195,9 @@ - #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) - #endif - #if CYTHON_USE_PYLONG_INTERNALS -- #include "longintrepr.h" -+ #if PY_MAJOR_VERSION < 3 -+ #include "longintrepr.h" -+ #endif - #undef SHIFT - #undef BASE - #undef MASK -@@ -324,9 +328,68 @@ class __Pyx_FakeReference { - #define __Pyx_DefaultClassType PyClass_Type - #else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" --#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 -- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ -- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -+ #define __Pyx_DefaultClassType PyType_Type -+#if PY_VERSION_HEX >= 0x030B00A1 -+ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, -+ PyObject *code, PyObject *c, PyObject* n, PyObject *v, -+ PyObject *fv, PyObject *cell, PyObject* fn, -+ PyObject *name, int fline, PyObject *lnos) { -+ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; -+ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; -+ const char *fn_cstr=NULL; -+ const char *name_cstr=NULL; -+ PyCodeObject* co=NULL; -+ PyObject *type, *value, *traceback; -+ PyErr_Fetch(&type, &value, &traceback); -+ if (!(kwds=PyDict_New())) goto end; -+ if (!(argcount=PyLong_FromLong(a))) goto end; -+ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; -+ if (!(posonlyargcount=PyLong_FromLong(0))) goto end; -+ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; -+ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; -+ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; -+ if (!(nlocals=PyLong_FromLong(l))) goto end; -+ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; -+ if (!(stacksize=PyLong_FromLong(s))) goto end; -+ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; -+ if (!(flags=PyLong_FromLong(f))) goto end; -+ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; -+ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; -+ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; -+ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; -+ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; -+ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here -+ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; -+ Py_XDECREF((PyObject*)co); -+ co = (PyCodeObject*)call_result; -+ call_result = NULL; -+ if (0) { -+ cleanup_code_too: -+ Py_XDECREF((PyObject*)co); -+ co = NULL; -+ } -+ end: -+ Py_XDECREF(kwds); -+ Py_XDECREF(argcount); -+ Py_XDECREF(posonlyargcount); -+ Py_XDECREF(kwonlyargcount); -+ Py_XDECREF(nlocals); -+ Py_XDECREF(stacksize); -+ Py_XDECREF(replace); -+ Py_XDECREF(call_result); -+ Py_XDECREF(empty); -+ if (type) { -+ PyErr_Restore(type, value, traceback); -+ } -+ return co; -+ } - #else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -@@ -440,8 +503,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #endif - #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 -+ #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) -+ #else -+ #define __Pyx_PyUnicode_READY(op) (0) -+ #endif - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) -@@ -449,7 +516,15 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) -+ #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) -+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) -+ #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) -+ #endif -+ #else -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) -+ #endif - #else - #define CYTHON_PEP393_ENABLED 0 - #define PyUnicode_1BYTE_KIND 1 -@@ -498,8 +573,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define PyString_Type PyUnicode_Type - #define PyString_Check PyUnicode_Check - #define PyString_CheckExact PyUnicode_CheckExact -+#ifndef PyObject_Unicode - #define PyObject_Unicode PyObject_Str - #endif -+#endif - #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) - #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) -@@ -510,6 +587,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #ifndef PySet_CheckExact - #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) - #endif -+#if PY_VERSION_HEX >= 0x030900A4 -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) -+#else -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) -+#endif - #if CYTHON_ASSUME_SAFE_MACROS - #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) - #else -@@ -543,13 +627,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong -- #define __Pyx_PyInt_AsHash_t PyInt_AsLong -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t - #else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t -- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t - #endif - #if PY_MAJOR_VERSION >= 3 -- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) -+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) - #else - #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) - #endif -@@ -590,11 +674,10 @@ static CYTHON_INLINE float __PYX_NAN() { - #define __Pyx_truncl truncl - #endif - -- -+#define __PYX_MARK_ERR_POS(f_index, lineno) \ -+ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } - #define __PYX_ERR(f_index, lineno, Ln_error) \ --{ \ -- __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ --} -+ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } - - #ifndef __PYX_EXTERN_C - #ifdef __cplusplus -@@ -612,7 +695,13 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "pythread.h" - #include "ICoinIndexedVector.hpp" - #include "numpy/arrayobject.h" -+#include "numpy/ndarrayobject.h" -+#include "numpy/ndarraytypes.h" -+#include "numpy/arrayscalars.h" - #include "numpy/ufuncobject.h" -+ -+ /* NumPy API declarations from "numpy/__init__.pxd" */ -+ - #include "ClpDualRowPivot.hpp" - #include "ClpFactorization.hpp" - #include "IClpDualRowPivotBase.h" -@@ -641,11 +730,11 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "OsiSolverInterface.hpp" - #include "CbcCompareUser.hpp" - #include "ICbcModel.hpp" -+#include - #include "ios" - #include "new" - #include "stdexcept" - #include "typeinfo" --#include - #include - #include "IClpPrimalColumnPivotBase.h" - #include "ClpPrimalColumnPivot.hpp" -@@ -746,6 +835,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); - static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); - #if CYTHON_ASSUME_SAFE_MACROS - #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) - #else -@@ -881,23 +971,23 @@ static const char *__pyx_filename; - - static const char *__pyx_f[] = { - "stringsource", -- "cylp\\cy\\CyClpPrimalColumnPivotBase.pyx", -+ "cylp/cy/CyClpPrimalColumnPivotBase.pyx", - "__init__.pxd", - "type.pxd", - "bool.pxd", - "complex.pxd", -- "cylp\\cy\\CyCoinIndexedVector.pxd", -- "cylp\\cy\\CyClpDualRowPivotBase.pxd", -- "cylp\\cy\\CyCoinModel.pxd", -- "cylp\\cy\\CyCoinPackedMatrix.pxd", -- "cylp\\cy\\CyCgl.pxd", -- "cylp\\cy\\CyCbcNode.pxd", -- "cylp\\cy\\CyOsiSolverInterface.pxd", -- "cylp\\cy\\CyCbcModel.pxd", -- "cylp\\cy\\CyClpSimplex.pxd", -+ "cylp/cy/CyCoinIndexedVector.pxd", -+ "cylp/cy/CyClpDualRowPivotBase.pxd", -+ "cylp/cy/CyCoinModel.pxd", -+ "cylp/cy/CyCoinPackedMatrix.pxd", -+ "cylp/cy/CyCgl.pxd", -+ "cylp/cy/CyCbcNode.pxd", -+ "cylp/cy/CyOsiSolverInterface.pxd", -+ "cylp/cy/CyCbcModel.pxd", -+ "cylp/cy/CyClpSimplex.pxd", - }; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":776 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":690 - * # in Cython to enable them only on the right systems. - * - * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< -@@ -906,7 +996,7 @@ static const char *__pyx_f[] = { - */ - typedef npy_int8 __pyx_t_5numpy_int8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":777 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":691 - * - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< -@@ -915,7 +1005,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; - */ - typedef npy_int16 __pyx_t_5numpy_int16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":778 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":692 - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< -@@ -924,7 +1014,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; - */ - typedef npy_int32 __pyx_t_5numpy_int32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":779 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":693 - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t - * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< -@@ -933,7 +1023,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; - */ - typedef npy_int64 __pyx_t_5numpy_int64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":783 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":697 - * #ctypedef npy_int128 int128_t - * - * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< -@@ -942,7 +1032,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; - */ - typedef npy_uint8 __pyx_t_5numpy_uint8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":784 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":698 - * - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< -@@ -951,7 +1041,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; - */ - typedef npy_uint16 __pyx_t_5numpy_uint16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":785 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":699 - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< -@@ -960,7 +1050,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; - */ - typedef npy_uint32 __pyx_t_5numpy_uint32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":786 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":700 - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t - * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< -@@ -969,7 +1059,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; - */ - typedef npy_uint64 __pyx_t_5numpy_uint64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":790 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":704 - * #ctypedef npy_uint128 uint128_t - * - * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< -@@ -978,7 +1068,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; - */ - typedef npy_float32 __pyx_t_5numpy_float32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":791 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":705 - * - * ctypedef npy_float32 float32_t - * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< -@@ -987,7 +1077,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; - */ - typedef npy_float64 __pyx_t_5numpy_float64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":800 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":714 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< -@@ -996,7 +1086,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; - */ - typedef npy_long __pyx_t_5numpy_int_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":801 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":715 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< -@@ -1005,7 +1095,7 @@ typedef npy_long __pyx_t_5numpy_int_t; - */ - typedef npy_longlong __pyx_t_5numpy_long_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":802 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":716 - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t - * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< -@@ -1014,7 +1104,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; - */ - typedef npy_longlong __pyx_t_5numpy_longlong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":804 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":718 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< -@@ -1023,7 +1113,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; - */ - typedef npy_ulong __pyx_t_5numpy_uint_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":805 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":719 - * - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< -@@ -1032,7 +1122,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":806 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":720 - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t - * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< -@@ -1041,7 +1131,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":808 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":722 - * ctypedef npy_ulonglong ulonglong_t - * - * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< -@@ -1050,7 +1140,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - */ - typedef npy_intp __pyx_t_5numpy_intp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":809 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":723 - * - * ctypedef npy_intp intp_t - * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< -@@ -1059,7 +1149,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; - */ - typedef npy_uintp __pyx_t_5numpy_uintp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":811 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":725 - * ctypedef npy_uintp uintp_t - * - * ctypedef npy_double float_t # <<<<<<<<<<<<<< -@@ -1068,7 +1158,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; - */ - typedef npy_double __pyx_t_5numpy_float_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":812 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":726 - * - * ctypedef npy_double float_t - * ctypedef npy_double double_t # <<<<<<<<<<<<<< -@@ -1077,7 +1167,7 @@ typedef npy_double __pyx_t_5numpy_float_t; - */ - typedef npy_double __pyx_t_5numpy_double_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":813 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":727 - * ctypedef npy_double float_t - * ctypedef npy_double double_t - * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< -@@ -1139,7 +1229,7 @@ struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex; - struct __pyx_obj_4cylp_2cy_12CyClpSimplex_VarStatus; - struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":815 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":729 - * ctypedef npy_longdouble longdouble_t - * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< -@@ -1148,7 +1238,7 @@ struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBa - */ - typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":816 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":730 - * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< -@@ -1157,7 +1247,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - */ - typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":817 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":731 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< -@@ -1166,7 +1256,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - */ - typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":819 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":733 - * ctypedef npy_clongdouble clongdouble_t - * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< -@@ -1891,11 +1981,45 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame) - #endif - #define __Pyx_TraceDeclarations\ -- static PyCodeObject *__pyx_frame_code = NULL;\ -- CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\ -- int __Pyx_use_tracing = 0; -+ static PyCodeObject *__pyx_frame_code = NULL;\ -+ CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\ -+ int __Pyx_use_tracing = 0; - #define __Pyx_TraceFrameInit(codeobj)\ -- if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj; -+ if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj; -+#if PY_VERSION_HEX >= 0x030b00a2 -+ #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\ -+ (unlikely((tstate)->cframe->use_tracing) &&\ -+ (!(check_tracing) || !(tstate)->tracing) &&\ -+ (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc))) -+ #define __Pyx_EnterTracing(tstate) PyThreadState_EnterTracing(tstate) -+ #define __Pyx_LeaveTracing(tstate) PyThreadState_LeaveTracing(tstate) -+#elif PY_VERSION_HEX >= 0x030a00b1 -+ #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\ -+ (unlikely((tstate)->cframe->use_tracing) &&\ -+ (!(check_tracing) || !(tstate)->tracing) &&\ -+ (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc))) -+ #define __Pyx_EnterTracing(tstate)\ -+ do { tstate->tracing++; tstate->cframe->use_tracing = 0; } while (0) -+ #define __Pyx_LeaveTracing(tstate)\ -+ do {\ -+ tstate->tracing--;\ -+ tstate->cframe->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\ -+ || tstate->c_profilefunc != NULL);\ -+ } while (0) -+#else -+ #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\ -+ (unlikely((tstate)->use_tracing) &&\ -+ (!(check_tracing) || !(tstate)->tracing) &&\ -+ (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc))) -+ #define __Pyx_EnterTracing(tstate)\ -+ do { tstate->tracing++; tstate->use_tracing = 0; } while (0) -+ #define __Pyx_LeaveTracing(tstate)\ -+ do {\ -+ tstate->tracing--;\ -+ tstate->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\ -+ || tstate->c_profilefunc != NULL);\ -+ } while (0) -+#endif - #ifdef WITH_THREAD - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\ - if (nogil) {\ -@@ -1903,8 +2027,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ -- if (unlikely(tstate->use_tracing) && !tstate->tracing &&\ -- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ -+ if (__Pyx_IsTracing(tstate, 1, 1)) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\ - }\ - PyGILState_Release(state);\ -@@ -1912,8 +2035,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - }\ - } else {\ - PyThreadState* tstate = PyThreadState_GET();\ -- if (unlikely(tstate->use_tracing) && !tstate->tracing &&\ -- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ -+ if (__Pyx_IsTracing(tstate, 1, 1)) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\ - if (unlikely(__Pyx_use_tracing < 0)) goto_error;\ - }\ -@@ -1921,8 +2043,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - #else - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\ - { PyThreadState* tstate = PyThreadState_GET();\ -- if (unlikely(tstate->use_tracing) && !tstate->tracing &&\ -- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ -+ if (__Pyx_IsTracing(tstate, 1, 1)) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\ - if (unlikely(__Pyx_use_tracing < 0)) goto_error;\ - }\ -@@ -1931,10 +2052,8 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - #define __Pyx_TraceException()\ - if (likely(!__Pyx_use_tracing)); else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ -- if (tstate->use_tracing &&\ -- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ -- tstate->tracing++;\ -- tstate->use_tracing = 0;\ -+ if (__Pyx_IsTracing(tstate, 0, 1)) {\ -+ __Pyx_EnterTracing(tstate);\ - PyObject *exc_info = __Pyx_GetExceptionTuple(tstate);\ - if (exc_info) {\ - if (CYTHON_TRACE && tstate->c_tracefunc)\ -@@ -1944,22 +2063,19 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\ - Py_DECREF(exc_info);\ - }\ -- tstate->use_tracing = 1;\ -- tstate->tracing--;\ -+ __Pyx_LeaveTracing(tstate);\ - }\ - } - static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) { - PyObject *type, *value, *traceback; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); -- tstate->tracing++; -- tstate->use_tracing = 0; -+ __Pyx_EnterTracing(tstate); - if (CYTHON_TRACE && tstate->c_tracefunc) - tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result); - if (tstate->c_profilefunc) - tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result); - CYTHON_FRAME_DEL(frame); -- tstate->use_tracing = 1; -- tstate->tracing--; -+ __Pyx_LeaveTracing(tstate); - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - } - #ifdef WITH_THREAD -@@ -1970,14 +2086,14 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ -- if (tstate->use_tracing) {\ -+ if (__Pyx_IsTracing(tstate, 0, 0)) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - PyGILState_Release(state);\ - }\ - } else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ -- if (tstate->use_tracing) {\ -+ if (__Pyx_IsTracing(tstate, 0, 0)) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - }\ -@@ -1986,7 +2102,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - #define __Pyx_TraceReturn(result, nogil)\ - if (likely(!__Pyx_use_tracing)); else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ -- if (tstate->use_tracing) {\ -+ if (__Pyx_IsTracing(tstate, 0, 0)) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - } -@@ -2006,11 +2122,9 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - PyObject *type, *value, *traceback; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - __Pyx_PyFrame_SetLineNumber(frame, lineno); -- tstate->tracing++; -- tstate->use_tracing = 0; -+ __Pyx_EnterTracing(tstate); - ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL); -- tstate->use_tracing = 1; -- tstate->tracing--; -+ __Pyx_LeaveTracing(tstate); - if (likely(!ret)) { - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - } else { -@@ -2029,7 +2143,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ -- if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\ -+ if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\ - ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\ - }\ - PyGILState_Release(state);\ -@@ -2037,7 +2151,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - }\ - } else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ -- if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\ -+ if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\ - int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\ - if (unlikely(ret)) goto_error;\ - }\ -@@ -2047,7 +2161,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - #define __Pyx_TraceLine(lineno, nogil, goto_error)\ - if (likely(!__Pyx_use_tracing)); else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ -- if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\ -+ if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\ - int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\ - if (unlikely(ret)) goto_error;\ - }\ -@@ -2079,67 +2193,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg - /* RaiseException.proto */ - static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); - --/* PyCFunctionFastCall.proto */ --#if CYTHON_FAST_PYCCALL --static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); --#else --#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) --#endif -- --/* PyFunctionFastCall.proto */ --#if CYTHON_FAST_PYCALL --#define __Pyx_PyFunction_FastCall(func, args, nargs)\ -- __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) --#if 1 || PY_VERSION_HEX < 0x030600B1 --static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); --#else --#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) --#endif --#define __Pyx_BUILD_ASSERT_EXPR(cond)\ -- (sizeof(char [1 - 2*!(cond)]) - 1) --#ifndef Py_MEMBER_SIZE --#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) --#endif -- static size_t __pyx_pyframe_localsplus_offset = 0; -- #include "frameobject.h" -- #define __Pxy_PyFrame_Initialize_Offsets()\ -- ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ -- (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) -- #define __Pyx_PyFrame_GetLocalsplus(frame)\ -- (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) --#endif -- --/* PyObjectCallMethO.proto */ --#if CYTHON_COMPILING_IN_CPYTHON --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); --#endif -- --/* PyObjectCallOneArg.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); -- --/* DictGetItem.proto */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); --#define __Pyx_PyObject_Dict_GetItem(obj, name)\ -- (likely(PyDict_CheckExact(obj)) ?\ -- __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) --#else --#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) --#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) --#endif -- --/* RaiseTooManyValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); -- --/* RaiseNeedMoreValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); -- --/* RaiseNoneIterError.proto */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -- --/* ExtTypeTest.proto */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); -- - /* GetTopmostException.proto */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); -@@ -2189,6 +2242,9 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - /* SetVTable.proto */ - static int __Pyx_SetVtable(PyObject *dict, void *vtable); - -+/* PyObjectGetAttrStrNoError.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); -+ - /* SetupReduce.proto */ - static int __Pyx_setup_reduce(PyObject* type_obj); - -@@ -2258,8 +2314,10 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); - static void __Pyx_AddTraceback(const char *funcname, int c_line, - int py_line, const char *filename); - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -+/* GCCDiagnostics.proto */ -+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -+#define __Pyx_HAS_GCC_DIAGNOSTIC -+#endif - - /* RealImag.proto */ - #if CYTHON_CCOMPLEX -@@ -2359,12 +2417,12 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); - #endif - #endif - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); -- - /* CIntFromPy.proto */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); - -+/* CIntToPy.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -+ - /* CIntToPy.proto */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); - -@@ -2493,8 +2551,17 @@ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; - static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; - static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; - static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -+static PyTypeObject *__pyx_ptype_5numpy_generic = 0; -+static PyTypeObject *__pyx_ptype_5numpy_number = 0; -+static PyTypeObject *__pyx_ptype_5numpy_integer = 0; -+static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; -+static PyTypeObject *__pyx_ptype_5numpy_floating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; -+static PyTypeObject *__pyx_ptype_5numpy_character = 0; - static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ - - /* Module declarations from 'cylp.cy.CyClpDualRowPivotBase' */ - static PyTypeObject *__pyx_ptype_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase = 0; -@@ -2556,58 +2623,38 @@ int __pyx_module_is_main_cylp__cy__CyClpPrimalColumnPivotBase = 0; - - /* Implementation of 'cylp.cy.CyClpPrimalColumnPivotBase' */ - static PyObject *__pyx_builtin_TypeError; --static PyObject *__pyx_builtin_ValueError; --static PyObject *__pyx_builtin_range; --static PyObject *__pyx_builtin_RuntimeError; - static PyObject *__pyx_builtin_ImportError; - static const char __pyx_k_main[] = "__main__"; - static const char __pyx_k_name[] = "__name__"; - static const char __pyx_k_test[] = "__test__"; --static const char __pyx_k_range[] = "range"; - static const char __pyx_k_reduce[] = "__reduce__"; - static const char __pyx_k_getstate[] = "__getstate__"; - static const char __pyx_k_setstate[] = "__setstate__"; - static const char __pyx_k_TypeError[] = "TypeError"; - static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; --static const char __pyx_k_ValueError[] = "ValueError"; - static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; - static const char __pyx_k_ImportError[] = "ImportError"; --static const char __pyx_k_RuntimeError[] = "RuntimeError"; - static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; - static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; - static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; - static const char __pyx_k_CyClpPrimalColumnPivotBase[] = "CyClpPrimalColumnPivotBase"; --static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; - static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; --static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; - static const char __pyx_k_CyClpPrimalColumnPivotBase_pyx_p[] = "CyClpPrimalColumnPivotBase.pyx: pivotColumn must be implemented."; - static const char __pyx_k_CyClpPrimalColumnPivotBase_pyx_s[] = "CyClpPrimalColumnPivotBase.pyx: saveWeights must be implemented."; --static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; --static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; --static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; - static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; - static const char __pyx_k_self_CppSelf_cannot_be_converted[] = "self.CppSelf cannot be converted to a Python object for pickling"; --static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; - static PyObject *__pyx_n_s_CyClpPrimalColumnPivotBase; - static PyObject *__pyx_kp_s_CyClpPrimalColumnPivotBase_pyx_p; - static PyObject *__pyx_kp_s_CyClpPrimalColumnPivotBase_pyx_s; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; - static PyObject *__pyx_n_s_ImportError; --static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; --static PyObject *__pyx_n_s_RuntimeError; - static PyObject *__pyx_n_s_TypeError; --static PyObject *__pyx_n_s_ValueError; - static PyObject *__pyx_n_s_cline_in_traceback; - static PyObject *__pyx_n_s_getstate; - static PyObject *__pyx_n_s_main; - static PyObject *__pyx_n_s_name; --static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; --static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; - static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; - static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; - static PyObject *__pyx_n_s_pyx_vtable; --static PyObject *__pyx_n_s_range; - static PyObject *__pyx_n_s_reduce; - static PyObject *__pyx_n_s_reduce_cython; - static PyObject *__pyx_n_s_reduce_ex; -@@ -2615,15 +2662,12 @@ static PyObject *__pyx_kp_s_self_CppSelf_cannot_be_converted; - static PyObject *__pyx_n_s_setstate; - static PyObject *__pyx_n_s_setstate_cython; - static PyObject *__pyx_n_s_test; --static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; - static int __pyx_pf_4cylp_2cy_26CyClpPrimalColumnPivotBase_26CyClpPrimalColumnPivotBase___init__(struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase *__pyx_v_self); /* proto */ - static void __pyx_pf_4cylp_2cy_26CyClpPrimalColumnPivotBase_26CyClpPrimalColumnPivotBase_2__dealloc__(struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_26CyClpPrimalColumnPivotBase_26CyClpPrimalColumnPivotBase_5nRows___get__(struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_26CyClpPrimalColumnPivotBase_26CyClpPrimalColumnPivotBase_5nCols___get__(struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_26CyClpPrimalColumnPivotBase_26CyClpPrimalColumnPivotBase_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_26CyClpPrimalColumnPivotBase_26CyClpPrimalColumnPivotBase_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ - static PyObject *__pyx_tp_new_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ - static PyObject *__pyx_tuple_; - static PyObject *__pyx_tuple__2; -@@ -2631,11 +2675,6 @@ static PyObject *__pyx_tuple__3; - static PyObject *__pyx_tuple__4; - static PyObject *__pyx_tuple__5; - static PyObject *__pyx_tuple__6; --static PyObject *__pyx_tuple__7; --static PyObject *__pyx_tuple__8; --static PyObject *__pyx_tuple__9; --static PyObject *__pyx_tuple__10; --static PyObject *__pyx_tuple__11; - /* Late includes */ - - /* "cylp/cy/CyClpPrimalColumnPivotBase.pyx":7 -@@ -2652,6 +2691,9 @@ static int __pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_RunPivotColumn(void *_ - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_t_2; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("RunPivotColumn", 0); - __Pyx_TraceCall("RunPivotColumn", __pyx_f[1], 7, 0, __PYX_ERR(1, 7, __pyx_L1_error)); - -@@ -2700,6 +2742,9 @@ static ClpPrimalColumnPivot *__pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_RunC - ClpPrimalColumnPivot *__pyx_r; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("RunClone", 0); - __Pyx_TraceCall("RunClone", __pyx_f[1], 14, 0, __PYX_ERR(1, 14, __pyx_L1_error)); - -@@ -2742,6 +2787,9 @@ static ClpPrimalColumnPivot *__pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_RunC - static void __pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_RunSaveWeights(void *__pyx_v_ptr, IClpSimplex *__pyx_v_model, int __pyx_v_mode) { - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("RunSaveWeights", 0); - __Pyx_TraceCall("RunSaveWeights", __pyx_f[1], 17, 0, __PYX_ERR(1, 17, __pyx_L1_error)); - -@@ -2799,6 +2847,9 @@ static int __pyx_pf_4cylp_2cy_26CyClpPrimalColumnPivotBase_26CyClpPrimalColumnPi - int __pyx_r; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__init__", 0); - __Pyx_TraceCall("__init__", __pyx_f[1], 24, 0, __PYX_ERR(1, 24, __pyx_L1_error)); - -@@ -2862,6 +2913,9 @@ static void __pyx_pw_4cylp_2cy_26CyClpPrimalColumnPivotBase_26CyClpPrimalColumnP - static void __pyx_pf_4cylp_2cy_26CyClpPrimalColumnPivotBase_26CyClpPrimalColumnPivotBase_2__dealloc__(struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase *__pyx_v_self) { - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__dealloc__", 0); - __Pyx_TraceCall("__dealloc__", __pyx_f[1], 32, 0, __PYX_ERR(1, 32, __pyx_L1_error)); - -@@ -2913,6 +2967,9 @@ static PyObject *__pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_26CyClpPrimalCol - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("pivotColumn", 0); - __Pyx_TraceCall("pivotColumn", __pyx_f[1], 36, 0, __PYX_ERR(1, 36, __pyx_L1_error)); - -@@ -2961,6 +3018,9 @@ static ClpPrimalColumnPivot *__pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_26Cy - ClpPrimalColumnPivot *__pyx_r; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("clone", 0); - __Pyx_TraceCall("clone", __pyx_f[1], 42, 0, __PYX_ERR(1, 42, __pyx_L1_error)); - -@@ -3013,6 +3073,9 @@ static void __pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_26CyClpPrimalColumnPi - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("saveWeights", 0); - __Pyx_TraceCall("saveWeights", __pyx_f[1], 51, 0, __PYX_ERR(1, 51, __pyx_L1_error)); - -@@ -3057,6 +3120,9 @@ static IClpSimplex *__pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_26CyClpPrimal - IClpSimplex *__pyx_r; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("model", 0); - __Pyx_TraceCall("model", __pyx_f[1], 55, 0, __PYX_ERR(1, 55, __pyx_L1_error)); - -@@ -3099,6 +3165,9 @@ static IClpSimplex *__pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_26CyClpPrimal - static void __pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_26CyClpPrimalColumnPivotBase_setModel(struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase *__pyx_v_self, IClpSimplex *__pyx_v_m) { - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("setModel", 0); - __Pyx_TraceCall("setModel", __pyx_f[1], 58, 0, __PYX_ERR(1, 58, __pyx_L1_error)); - -@@ -3140,6 +3209,9 @@ static double *__pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_26CyClpPrimalColum - double *__pyx_r; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("getReducedCosts", 0); - __Pyx_TraceCall("getReducedCosts", __pyx_f[1], 61, 0, __PYX_ERR(1, 61, __pyx_L1_error)); - -@@ -3197,6 +3269,9 @@ static PyObject *__pyx_pf_4cylp_2cy_26CyClpPrimalColumnPivotBase_26CyClpPrimalCo - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 65, 0, __PYX_ERR(1, 65, __pyx_L1_error)); - -@@ -3259,6 +3334,9 @@ static PyObject *__pyx_pf_4cylp_2cy_26CyClpPrimalColumnPivotBase_26CyClpPrimalCo - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - __Pyx_TraceCall("__get__", __pyx_f[1], 69, 0, __PYX_ERR(1, 69, __pyx_L1_error)); - -@@ -3318,6 +3396,9 @@ static PyObject *__pyx_pf_4cylp_2cy_26CyClpPrimalColumnPivotBase_26CyClpPrimalCo - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - __Pyx_TraceCall("__reduce_cython__", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error)); - -@@ -3376,6 +3457,9 @@ static PyObject *__pyx_pf_4cylp_2cy_26CyClpPrimalColumnPivotBase_26CyClpPrimalCo - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - __Pyx_TraceCall("__setstate_cython__", __pyx_f[0], 3, 0, __PYX_ERR(0, 3, __pyx_L1_error)); - -@@ -3408,1952 +3492,355 @@ static PyObject *__pyx_pf_4cylp_2cy_26CyClpPrimalColumnPivotBase_26CyClpPrimalCo - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 -+ * ctypedef npy_cdouble complex_t -+ * -+ * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(1, a) -+ * - */ - --/* Python wrapper */ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); -- __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_v_i; -- int __pyx_v_ndim; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- int __pyx_v_t; -- char *__pyx_v_f; -- PyArray_Descr *__pyx_v_descr = 0; -- int __pyx_v_offset; -- int __pyx_r; -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { -+ PyObject *__pyx_r = NULL; - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- int __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- int __pyx_t_4; -- int __pyx_t_5; -- int __pyx_t_6; -- PyArray_Descr *__pyx_t_7; -- PyObject *__pyx_t_8 = NULL; -- char *__pyx_t_9; -- if (__pyx_v_info == NULL) { -- PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); -- return -1; -- } -- __Pyx_RefNannySetupContext("__getbuffer__", 0); -- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); -- __Pyx_GIVEREF(__pyx_v_info->obj); -- __Pyx_TraceCall("__getbuffer__", __pyx_f[2], 258, 0, __PYX_ERR(2, 258, __pyx_L1_error)); -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); -+ __Pyx_TraceCall("PyArray_MultiIterNew1", __pyx_f[2], 735, 0, __PYX_ERR(2, 735, __pyx_L1_error)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":265 -- * -- * cdef int i, ndim -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":736 - * -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":266 -- * cdef int i, ndim -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew1(a): -+ * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< - * -- * ndim = PyArray_NDIM(self) -+ * cdef inline object PyArray_MultiIterNew2(a, b): - */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":268 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 -+ * ctypedef npy_cdouble complex_t - * -- * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(1, a) - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) - */ -- __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L4_bool_binop_done; -- } -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_TraceReturn(__pyx_r, 0); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":271 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 -+ * return PyArray_MultiIterNew(1, a) - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not C contiguous") -+ * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(2, a, b) - * - */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L4_bool_binop_done:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_TraceDeclarations -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); -+ __Pyx_TraceCall("PyArray_MultiIterNew2", __pyx_f[2], 738, 0, __PYX_ERR(2, 738, __pyx_L1_error)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":739 - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 272, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -+ * cdef inline object PyArray_MultiIterNew2(a, b): -+ * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): - */ -- } -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 -+ * return PyArray_MultiIterNew(1, a) -+ * -+ * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(2, a, b) - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") - */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L7_bool_binop_done; -- } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":275 -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_TraceReturn(__pyx_r, 0); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 -+ * return PyArray_MultiIterNew(2, a, b) - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not Fortran contiguous") -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(3, a, b, c) - * - */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L7_bool_binop_done:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_TraceDeclarations -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); -+ __Pyx_TraceCall("PyArray_MultiIterNew3", __pyx_f[2], 741, 0, __PYX_ERR(2, 741, __pyx_L1_error)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":742 - * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 276, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): -+ * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - */ -- } -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":278 -- * raise ValueError(u"ndarray is not Fortran contiguous") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 -+ * return PyArray_MultiIterNew(2, a, b) - * -- * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":279 -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(3, a, b, c) - * -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * # Allocate new buffer for strides and shape info. -- */ -- __pyx_v_info->ndim = __pyx_v_ndim; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":283 -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- */ -- __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":284 -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim # <<<<<<<<<<<<<< -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- */ -- __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":285 -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim -- * for i in range(ndim): # <<<<<<<<<<<<<< -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] -- */ -- __pyx_t_4 = __pyx_v_ndim; -- __pyx_t_5 = __pyx_t_4; -- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { -- __pyx_v_i = __pyx_t_6; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":286 -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- */ -- (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":287 -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< -- * else: -- * info.strides = PyArray_STRIDES(self) -- */ -- (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. - */ -- goto __pyx_L9; -- } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":289 -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- */ -- /*else*/ { -- __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_TraceReturn(__pyx_r, 0); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":290 -- * else: -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 -+ * return PyArray_MultiIterNew(3, a, b, c) -+ * -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(4, a, b, c, d) -+ * - */ -- __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); -- } -- __pyx_L9:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":291 -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL # <<<<<<<<<<<<<< -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) -- */ -- __pyx_v_info->suboffsets = NULL; -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_TraceDeclarations -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); -+ __Pyx_TraceCall("PyArray_MultiIterNew4", __pyx_f[2], 744, 0, __PYX_ERR(2, 744, __pyx_L1_error)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":292 -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< -- * info.readonly = not PyArray_ISWRITEABLE(self) -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":745 - * -- */ -- __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":293 -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -+ * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< - * -- * cdef int t -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - */ -- __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":296 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 -+ * return PyArray_MultiIterNew(3, a, b, c) - * -- * cdef int t -- * cdef char* f = NULL # <<<<<<<<<<<<<< -- * cdef dtype descr = PyArray_DESCR(self) -- * cdef int offset -- */ -- __pyx_v_f = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":297 -- * cdef int t -- * cdef char* f = NULL -- * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< -- * cdef int offset -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(4, a, b, c, d) - * - */ -- __pyx_t_7 = PyArray_DESCR(__pyx_v_self); -- __pyx_t_3 = ((PyObject *)__pyx_t_7); -- __Pyx_INCREF(__pyx_t_3); -- __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); -- __pyx_t_3 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":300 -- * cdef int offset -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_TraceReturn(__pyx_r, 0); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 -+ * return PyArray_MultiIterNew(4, a, b, c, d) - * -- * info.obj = self # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * if not PyDataType_HASFIELDS(descr): - */ -- __Pyx_INCREF(((PyObject *)__pyx_v_self)); -- __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); -- __pyx_v_info->obj = ((PyObject *)__pyx_v_self); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); -- if (__pyx_t_1) { -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_TraceDeclarations -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); -+ __Pyx_TraceCall("PyArray_MultiIterNew5", __pyx_f[2], 747, 0, __PYX_ERR(2, 747, __pyx_L1_error)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":303 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":748 - * -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num # <<<<<<<<<<<<<< -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< -+ * -+ * cdef inline tuple PyDataType_SHAPE(dtype d): - */ -- __pyx_t_4 = __pyx_v_descr->type_num; -- __pyx_v_t = __pyx_t_4; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); -- if (!__pyx_t_2) { -- goto __pyx_L15_next_or; -- } else { -- } -- __pyx_t_2 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_L15_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":305 -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L14_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 306, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":307 -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- */ -- switch (__pyx_v_t) { -- case NPY_BYTE: -- __pyx_v_f = ((char *)"b"); -- break; -- case NPY_UBYTE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":308 -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- */ -- __pyx_v_f = ((char *)"B"); -- break; -- case NPY_SHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":309 -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- */ -- __pyx_v_f = ((char *)"h"); -- break; -- case NPY_USHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":310 -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- */ -- __pyx_v_f = ((char *)"H"); -- break; -- case NPY_INT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":311 -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- */ -- __pyx_v_f = ((char *)"i"); -- break; -- case NPY_UINT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":312 -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- */ -- __pyx_v_f = ((char *)"I"); -- break; -- case NPY_LONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":313 -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- */ -- __pyx_v_f = ((char *)"l"); -- break; -- case NPY_ULONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":314 -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- */ -- __pyx_v_f = ((char *)"L"); -- break; -- case NPY_LONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":315 -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- */ -- __pyx_v_f = ((char *)"q"); -- break; -- case NPY_ULONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":316 -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- */ -- __pyx_v_f = ((char *)"Q"); -- break; -- case NPY_FLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":317 -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- */ -- __pyx_v_f = ((char *)"f"); -- break; -- case NPY_DOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":318 -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- */ -- __pyx_v_f = ((char *)"d"); -- break; -- case NPY_LONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":319 -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- */ -- __pyx_v_f = ((char *)"g"); -- break; -- case NPY_CFLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":320 -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- */ -- __pyx_v_f = ((char *)"Zf"); -- break; -- case NPY_CDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":321 -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" -- */ -- __pyx_v_f = ((char *)"Zd"); -- break; -- case NPY_CLONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":322 -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f = "O" -- * else: -- */ -- __pyx_v_f = ((char *)"Zg"); -- break; -- case NPY_OBJECT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":323 -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_v_f = ((char *)"O"); -- break; -- default: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":325 -- * elif t == NPY_OBJECT: f = "O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * info.format = f -- * return -- */ -- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_8); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 325, __pyx_L1_error) -- break; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":326 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f # <<<<<<<<<<<<<< -- * return -- * else: -- */ -- __pyx_v_info->format = __pyx_v_f; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":327 -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f -- * return # <<<<<<<<<<<<<< -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- */ -- __pyx_r = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":329 -- * return -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- */ -- /*else*/ { -- __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":330 -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, -- */ -- (__pyx_v_info->format[0]) = '^'; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":331 -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 # <<<<<<<<<<<<<< -- * f = _util_dtypestring(descr, info.format + 1, -- * info.format + _buffer_format_string_len, -- */ -- __pyx_v_offset = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":332 -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< -- * info.format + _buffer_format_string_len, -- * &offset) -- */ -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":335 -- * info.format + _buffer_format_string_len, -- * &offset) -- * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- */ -- (__pyx_v_f[0]) = '\x00'; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- -- /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; -- if (__pyx_v_info->obj != NULL) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- goto __pyx_L2; -- __pyx_L0:; -- if (__pyx_v_info->obj == Py_None) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- __pyx_L2:; -- __Pyx_XDECREF((PyObject *)__pyx_v_descr); -- __Pyx_TraceReturn(Py_None, 0); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); -- __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_TraceDeclarations -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("__releasebuffer__", 0); -- __Pyx_TraceCall("__releasebuffer__", __pyx_f[2], 337, 0, __PYX_ERR(2, 337, __pyx_L1_error)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":339 -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) -- */ -- PyObject_Free(__pyx_v_info->format); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":341 -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) # <<<<<<<<<<<<<< -- * # info.shape was stored after info.strides in the same block -- * -- */ -- PyObject_Free(__pyx_v_info->strides); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- -- /* function exit code */ -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_WriteUnraisable("numpy.ndarray.__releasebuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); -- __pyx_L0:; -- __Pyx_TraceReturn(Py_None, 0); -- __Pyx_RefNannyFinishContext(); --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -- * ctypedef npy_cdouble complex_t -- * -- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(1, a) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { -- PyObject *__pyx_r = NULL; -- __Pyx_TraceDeclarations -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); -- __Pyx_TraceCall("PyArray_MultiIterNew1", __pyx_f[2], 821, 0, __PYX_ERR(2, 821, __pyx_L1_error)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":822 -- * -- * cdef inline object PyArray_MultiIterNew1(a): -- * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -- * ctypedef npy_cdouble complex_t -- * -- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(1, a) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_TraceReturn(__pyx_r, 0); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -- * return PyArray_MultiIterNew(1, a) -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(2, a, b) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { -- PyObject *__pyx_r = NULL; -- __Pyx_TraceDeclarations -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); -- __Pyx_TraceCall("PyArray_MultiIterNew2", __pyx_f[2], 824, 0, __PYX_ERR(2, 824, __pyx_L1_error)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":825 -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): -- * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -- * return PyArray_MultiIterNew(1, a) -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(2, a, b) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_TraceReturn(__pyx_r, 0); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -- * return PyArray_MultiIterNew(2, a, b) -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { -- PyObject *__pyx_r = NULL; -- __Pyx_TraceDeclarations -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); -- __Pyx_TraceCall("PyArray_MultiIterNew3", __pyx_f[2], 827, 0, __PYX_ERR(2, 827, __pyx_L1_error)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":828 -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): -- * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -- * return PyArray_MultiIterNew(2, a, b) -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_TraceReturn(__pyx_r, 0); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { -- PyObject *__pyx_r = NULL; -- __Pyx_TraceDeclarations -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); -- __Pyx_TraceCall("PyArray_MultiIterNew4", __pyx_f[2], 830, 0, __PYX_ERR(2, 830, __pyx_L1_error)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":831 -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -- * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_TraceReturn(__pyx_r, 0); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { -- PyObject *__pyx_r = NULL; -- __Pyx_TraceDeclarations -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); -- __Pyx_TraceCall("PyArray_MultiIterNew5", __pyx_f[2], 833, 0, __PYX_ERR(2, 833, __pyx_L1_error)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":834 -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -- * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_TraceReturn(__pyx_r, 0); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { -- PyObject *__pyx_r = NULL; -- __Pyx_TraceDeclarations -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); -- __Pyx_TraceCall("PyDataType_SHAPE", __pyx_f[2], 836, 0, __PYX_ERR(2, 836, __pyx_L1_error)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -- * return d.subarray.shape -- * else: -- */ -- __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":838 -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape # <<<<<<<<<<<<<< -- * else: -- * return () -- */ -- __Pyx_XDECREF(__pyx_r); -- __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); -- __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -- * return d.subarray.shape -- * else: -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":840 -- * return d.subarray.shape -- * else: -- * return () # <<<<<<<<<<<<<< -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: -- */ -- /*else*/ { -- __Pyx_XDECREF(__pyx_r); -- __Pyx_INCREF(__pyx_empty_tuple); -- __pyx_r = __pyx_empty_tuple; -- goto __pyx_L0; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_AddTraceback("numpy.PyDataType_SHAPE", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_TraceReturn(__pyx_r, 0); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { -- PyArray_Descr *__pyx_v_child = 0; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- PyObject *__pyx_v_fields = 0; -- PyObject *__pyx_v_childname = NULL; -- PyObject *__pyx_v_new_offset = NULL; -- PyObject *__pyx_v_t = NULL; -- char *__pyx_r; -- __Pyx_TraceDeclarations -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- Py_ssize_t __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- PyObject *__pyx_t_4 = NULL; -- int __pyx_t_5; -- int __pyx_t_6; -- int __pyx_t_7; -- long __pyx_t_8; -- char *__pyx_t_9; -- __Pyx_RefNannySetupContext("_util_dtypestring", 0); -- __Pyx_TraceCall("_util_dtypestring", __pyx_f[2], 842, 0, __PYX_ERR(2, 842, __pyx_L1_error)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":847 -- * -- * cdef dtype child -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * cdef tuple fields -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":848 -- * cdef dtype child -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * cdef tuple fields -- * -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- if (unlikely(__pyx_v_descr->names == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -- __PYX_ERR(2, 851, __pyx_L1_error) -- } -- __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; -- for (;;) { -- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 851, __pyx_L1_error) -- #else -- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- #endif -- __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":852 -- * -- * for childname in descr.names: -- * fields = descr.fields[childname] # <<<<<<<<<<<<<< -- * child, new_offset = fields -- * -- */ -- if (unlikely(__pyx_v_descr->fields == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); -- __PYX_ERR(2, 852, __pyx_L1_error) -- } -- __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":853 -- * for childname in descr.names: -- * fields = descr.fields[childname] -- * child, new_offset = fields # <<<<<<<<<<<<<< -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- */ -- if (likely(__pyx_v_fields != Py_None)) { -- PyObject* sequence = __pyx_v_fields; -- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); -- if (unlikely(size != 2)) { -- if (size > 2) __Pyx_RaiseTooManyValuesError(2); -- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); -- __PYX_ERR(2, 853, __pyx_L1_error) -- } -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); -- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); -- __Pyx_INCREF(__pyx_t_3); -- __Pyx_INCREF(__pyx_t_4); -- #else -- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- #endif -- } else { -- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error) -- } -- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); -- __pyx_t_3 = 0; -- __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 856, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); -- if (!__pyx_t_7) { -- goto __pyx_L8_next_or; -- } else { -- } -- __pyx_t_7 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_L8_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":859 -- * -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * # One could encode it in the format string and have Cython -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); -- if (__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_6 = __pyx_t_7; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":860 -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * # One could encode it in the format string and have Cython -- * # complain instead, BUT: < and > in format strings also imply -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 860, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":870 -- * -- * # Output padding bytes -- * while offset[0] < new_offset: # <<<<<<<<<<<<<< -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- */ -- while (1) { -- __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (!__pyx_t_6) break; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":871 -- * # Output padding bytes -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< -- * f += 1 -- * offset[0] += 1 -- */ -- (__pyx_v_f[0]) = 0x78; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":872 -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte -- * f += 1 # <<<<<<<<<<<<<< -- * offset[0] += 1 -- * -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":873 -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- * offset[0] += 1 # <<<<<<<<<<<<<< -- * -- * offset[0] += child.itemsize -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":875 -- * offset[0] += 1 -- * -- * offset[0] += child.itemsize # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(child): -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); -- if (__pyx_t_6) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":878 -- * -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num # <<<<<<<<<<<<<< -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 880, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":883 -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 98; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":884 -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":885 -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x68; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":886 -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 72; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":887 -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x69; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":888 -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 73; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":889 -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x6C; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":890 -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 76; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":891 -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x71; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":892 -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 81; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":893 -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":894 -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x64; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":895 -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x67; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":896 -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x66; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":897 -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x64; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":898 -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x67; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":899 -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (likely(__pyx_t_6)) { -- (__pyx_v_f[0]) = 79; -- goto __pyx_L15; -- } -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 -+ * return PyArray_MultiIterNew(4, a, b, c, d) -+ * -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) -+ * -+ */ - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":901 -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * f += 1 -- * else: -- */ -- /*else*/ { -- __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 901, __pyx_L1_error) -- } -- __pyx_L15:; -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_TraceReturn(__pyx_r, 0); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":902 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * f += 1 # <<<<<<<<<<<<<< -- * else: -- * # Cython ignores struct boundary information ("T{...}"), -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) -+ * -+ * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape - */ -- __pyx_v_f = (__pyx_v_f + 1); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_TraceDeclarations -+ __Pyx_RefNannyDeclarations -+ int __pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); -+ __Pyx_TraceCall("PyDataType_SHAPE", __pyx_f[2], 750, 0, __PYX_ERR(2, 750, __pyx_L1_error)); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -+ * return d.subarray.shape -+ * else: - */ -- goto __pyx_L13; -- } -+ __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); -+ if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":906 -- * # Cython ignores struct boundary information ("T{...}"), -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< -- * return f -- * -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":752 -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape # <<<<<<<<<<<<<< -+ * else: -+ * return () - */ -- /*else*/ { -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 906, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- } -- __pyx_L13:; -+ __Pyx_XDECREF(__pyx_r); -+ __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); -+ __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -+ * return d.subarray.shape -+ * else: - */ - } -- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":907 -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) -- * return f # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":754 -+ * return d.subarray.shape -+ * else: -+ * return () # <<<<<<<<<<<<<< - * - * - */ -- __pyx_r = __pyx_v_f; -- goto __pyx_L0; -+ /*else*/ { -+ __Pyx_XDECREF(__pyx_r); -+ __Pyx_INCREF(__pyx_empty_tuple); -+ __pyx_r = __pyx_empty_tuple; -+ goto __pyx_L0; -+ } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -+ * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape - */ - - /* function exit code */ - __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_4); -- __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = NULL; -+ __Pyx_AddTraceback("numpy.PyDataType_SHAPE", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; - __pyx_L0:; -- __Pyx_XDECREF((PyObject *)__pyx_v_child); -- __Pyx_XDECREF(__pyx_v_fields); -- __Pyx_XDECREF(__pyx_v_childname); -- __Pyx_XDECREF(__pyx_v_new_offset); -- __Pyx_XDECREF(__pyx_v_t); -- __Pyx_TraceReturn(Py_None, 0); -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_TraceReturn(__pyx_r, 0); - __Pyx_RefNannyFinishContext(); - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -5364,10 +3851,13 @@ static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx - static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("set_array_base", 0); -- __Pyx_TraceCall("set_array_base", __pyx_f[2], 1022, 0, __PYX_ERR(2, 1022, __pyx_L1_error)); -+ __Pyx_TraceCall("set_array_base", __pyx_f[2], 929, 0, __PYX_ERR(2, 929, __pyx_L1_error)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1023 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":930 - * - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< -@@ -5376,7 +3866,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - Py_INCREF(__pyx_v_base); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1024 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":931 - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< -@@ -5385,7 +3875,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -5402,7 +3892,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyFinishContext(); - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5416,10 +3906,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __Pyx_TraceDeclarations - __Pyx_RefNannyDeclarations - int __pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("get_array_base", 0); -- __Pyx_TraceCall("get_array_base", __pyx_f[2], 1026, 0, __PYX_ERR(2, 1026, __pyx_L1_error)); -+ __Pyx_TraceCall("get_array_base", __pyx_f[2], 933, 0, __PYX_ERR(2, 933, __pyx_L1_error)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1027 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":934 - * - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< -@@ -5428,7 +3921,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - __pyx_v_base = PyArray_BASE(__pyx_v_arr); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5438,7 +3931,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_t_1 = ((__pyx_v_base == NULL) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1029 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":936 - * base = PyArray_BASE(arr) - * if base is NULL: - * return None # <<<<<<<<<<<<<< -@@ -5449,7 +3942,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5458,7 +3951,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1030 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":937 - * if base is NULL: - * return None - * return base # <<<<<<<<<<<<<< -@@ -5470,7 +3963,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = ((PyObject *)__pyx_v_base); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5489,12 +3982,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { -@@ -5509,14 +4002,17 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_array", 0); -- __Pyx_TraceCall("import_array", __pyx_f[2], 1034, 0, __PYX_ERR(2, 1034, __pyx_L1_error)); -+ __Pyx_TraceCall("import_array", __pyx_f[2], 941, 0, __PYX_ERR(2, 941, __pyx_L1_error)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - { -@@ -5528,20 +4024,20 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1036 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":943 - * cdef inline int import_array() except -1: - * try: -- * _import_array() # <<<<<<<<<<<<<< -+ * __pyx_import_array() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") - */ -- __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error) -+ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - } -@@ -5551,9 +4047,9 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1037 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":944 - * try: -- * _import_array() -+ * __pyx_import_array() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.multiarray failed to import") - * -@@ -5561,32 +4057,32 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __PYX_ERR(2, 945, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - __Pyx_XGIVEREF(__pyx_t_1); -@@ -5597,12 +4093,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - /* function exit code */ -@@ -5621,7 +4117,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -5641,10 +4137,13 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_umath", 0); -- __Pyx_TraceCall("import_umath", __pyx_f[2], 1040, 0, __PYX_ERR(2, 1040, __pyx_L1_error)); -+ __Pyx_TraceCall("import_umath", __pyx_f[2], 947, 0, __PYX_ERR(2, 947, __pyx_L1_error)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5660,16 +4159,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1042 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":949 - * cdef inline int import_umath() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5683,7 +4182,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1043 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":950 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< -@@ -5693,28 +4192,28 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __PYX_ERR(2, 951, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5729,7 +4228,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -5753,7 +4252,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -5773,10 +4272,13 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_ufunc", 0); -- __Pyx_TraceCall("import_ufunc", __pyx_f[2], 1046, 0, __PYX_ERR(2, 1046, __pyx_L1_error)); -+ __Pyx_TraceCall("import_ufunc", __pyx_f[2], 953, 0, __PYX_ERR(2, 953, __pyx_L1_error)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5792,16 +4294,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1048 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":955 - * cdef inline int import_ufunc() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5815,35 +4317,38 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1049 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":956 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") -+ * - */ - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1050 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":957 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -+ * -+ * cdef extern from *: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __PYX_ERR(2, 957, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5858,7 +4363,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -5881,6 +4386,225 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_RefNannyFinishContext(); - return __pyx_r; - } -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_TraceDeclarations -+ __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("is_timedelta64_object", 0); -+ __Pyx_TraceCall("is_timedelta64_object", __pyx_f[2], 967, 0, __PYX_ERR(2, 967, __pyx_L1_error)); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":979 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_WriteUnraisable("numpy.is_timedelta64_object", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_TraceReturn(Py_None, 0); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_TraceDeclarations -+ __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("is_datetime64_object", 0); -+ __Pyx_TraceCall("is_datetime64_object", __pyx_f[2], 982, 0, __PYX_ERR(2, 982, __pyx_L1_error)); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":994 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_WriteUnraisable("numpy.is_datetime64_object", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_TraceReturn(Py_None, 0); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { -+ npy_datetime __pyx_r; -+ __Pyx_TraceDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_TraceCall("get_datetime64_value", __pyx_f[2], 997, 1, __PYX_ERR(2, 997, __pyx_L1_error)); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1004 -+ * also needed. That can be found using `get_datetime64_unit`. -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_WriteUnraisable("numpy.get_datetime64_value", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_TraceReturn(Py_None, 1); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { -+ npy_timedelta __pyx_r; -+ __Pyx_TraceDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_TraceCall("get_timedelta64_value", __pyx_f[2], 1007, 1, __PYX_ERR(2, 1007, __pyx_L1_error)); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1011 -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_WriteUnraisable("numpy.get_timedelta64_value", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_TraceReturn(Py_None, 1); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { -+ NPY_DATETIMEUNIT __pyx_r; -+ __Pyx_TraceDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_TraceCall("get_datetime64_unit", __pyx_f[2], 1014, 1, __PYX_ERR(2, 1014, __pyx_L1_error)); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1018 -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ * """ -+ * return (obj).obmeta.base # <<<<<<<<<<<<<< -+ */ -+ __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_WriteUnraisable("numpy.get_datetime64_unit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); -+ __pyx_r = (NPY_DATETIMEUNIT) 0; -+ __pyx_L0:; -+ __Pyx_TraceReturn(Py_None, 1); -+ return __pyx_r; -+} - static struct __pyx_vtabstruct_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase __pyx_vtable_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase; - - static PyObject *__pyx_tp_new_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { -@@ -5909,9 +4633,9 @@ static void __pyx_tp_dealloc_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalC - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); -- ++Py_REFCNT(o); -+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); - __pyx_pw_4cylp_2cy_26CyClpPrimalColumnPivotBase_26CyClpPrimalColumnPivotBase_3__dealloc__(o); -- --Py_REFCNT(o); -+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); - PyErr_Restore(etype, eval, etb); - } - Py_CLEAR(p->cyModel); -@@ -5962,7 +4686,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrima - sizeof(struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -6015,6 +4744,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrima - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyMethodDef __pyx_methods[] = { -@@ -6066,23 +4801,15 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_CyClpPrimalColumnPivotBase, __pyx_k_CyClpPrimalColumnPivotBase, sizeof(__pyx_k_CyClpPrimalColumnPivotBase), 0, 0, 1, 1}, - {&__pyx_kp_s_CyClpPrimalColumnPivotBase_pyx_p, __pyx_k_CyClpPrimalColumnPivotBase_pyx_p, sizeof(__pyx_k_CyClpPrimalColumnPivotBase_pyx_p), 0, 0, 1, 0}, - {&__pyx_kp_s_CyClpPrimalColumnPivotBase_pyx_s, __pyx_k_CyClpPrimalColumnPivotBase_pyx_s, sizeof(__pyx_k_CyClpPrimalColumnPivotBase_pyx_s), 0, 0, 1, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, - {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, -- {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, -- {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, - {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, -- {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, - {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, - {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, - {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, -- {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, -- {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, - {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0}, - {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, - {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, -- {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, - {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, -@@ -6090,15 +4817,11 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, - {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, - {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, -- {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, - {0, 0, 0, 0, 0, 0, 0} - }; - static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error) -- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error) -- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(2, 285, __pyx_L1_error) -- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 856, __pyx_L1_error) -- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error) -+ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 945, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -@@ -6130,101 +4853,46 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_GOTREF(__pyx_tuple__2); - __Pyx_GIVEREF(__pyx_tuple__2); - -- /* "(tree fragment)":2 -- * def __reduce_cython__(self): -- * raise TypeError("self.CppSelf cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< -- * def __setstate_cython__(self, __pyx_state): -- * raise TypeError("self.CppSelf cannot be converted to a Python object for pickling") -- */ -- __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_self_CppSelf_cannot_be_converted); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 2, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__3); -- __Pyx_GIVEREF(__pyx_tuple__3); -- -- /* "(tree fragment)":4 -- * raise TypeError("self.CppSelf cannot be converted to a Python object for pickling") -- * def __setstate_cython__(self, __pyx_state): -- * raise TypeError("self.CppSelf cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< -- */ -- __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_self_CppSelf_cannot_be_converted); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 4, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__4); -- __Pyx_GIVEREF(__pyx_tuple__4); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__5); -- __Pyx_GIVEREF(__pyx_tuple__5); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__6); -- __Pyx_GIVEREF(__pyx_tuple__6); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__7); -- __Pyx_GIVEREF(__pyx_tuple__7); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -+ /* "(tree fragment)":2 -+ * def __reduce_cython__(self): -+ * raise TypeError("self.CppSelf cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< -+ * def __setstate_cython__(self, __pyx_state): -+ * raise TypeError("self.CppSelf cannot be converted to a Python object for pickling") - */ -- __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__8); -- __Pyx_GIVEREF(__pyx_tuple__8); -+ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_self_CppSelf_cannot_be_converted); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 2, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__3); -+ __Pyx_GIVEREF(__pyx_tuple__3); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -+ /* "(tree fragment)":4 -+ * raise TypeError("self.CppSelf cannot be converted to a Python object for pickling") -+ * def __setstate_cython__(self, __pyx_state): -+ * raise TypeError("self.CppSelf cannot be converted to a Python object for pickling") # <<<<<<<<<<<<<< - */ -- __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__9); -- __Pyx_GIVEREF(__pyx_tuple__9); -+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_self_CppSelf_cannot_be_converted); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 4, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__4); -+ __Pyx_GIVEREF(__pyx_tuple__4); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 1038, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__10); -- __Pyx_GIVEREF(__pyx_tuple__10); -+ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 945, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__5); -+ __Pyx_GIVEREF(__pyx_tuple__5); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(2, 1044, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__11); -- __Pyx_GIVEREF(__pyx_tuple__11); -+ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 951, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__6); -+ __Pyx_GIVEREF(__pyx_tuple__6); - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -6265,6 +4933,9 @@ static int __Pyx_modinit_variable_export_code(void) { - - static int __Pyx_modinit_function_export_code(void) { - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0); - /*--- Function export code ---*/ - if (__Pyx_ExportFunction("RunPivotColumn", (void (*)(void))__pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_RunPivotColumn, "int (void *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error) -@@ -6279,6 +4950,9 @@ static int __Pyx_modinit_function_export_code(void) { - - static int __Pyx_modinit_type_init_code(void) { - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); - /*--- Type init code ---*/ - __pyx_vtabptr_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase = &__pyx_vtable_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase; -@@ -6309,6 +4983,9 @@ static int __Pyx_modinit_type_init_code(void) { - static int __Pyx_modinit_type_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); - /*--- Type import code ---*/ - __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) -@@ -6338,18 +5015,38 @@ static int __Pyx_modinit_type_import_code(void) { - if (!__pyx_ptype_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector) __PYX_ERR(6, 22, __pyx_L1_error) - __pyx_vtabptr_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector = (struct __pyx_vtabstruct_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector)) __PYX_ERR(6, 22, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) -+ __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error) -- __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error) -- __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error) -+ __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error) -+ __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error) -- __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error) -+ __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error) -+ __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error) -+ __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error) -+ __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error) -+ __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error) -+ __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error) -+ __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error) -+ __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error) -+ __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error) -+ __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error) -+ __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpDualRowPivotBase"); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); -@@ -6458,17 +5155,19 @@ static int __Pyx_modinit_function_import_code(void) { - } - - --#if PY_MAJOR_VERSION < 3 --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC void --#else -+#ifndef CYTHON_NO_PYINIT_EXPORT - #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#elif PY_MAJOR_VERSION < 3 -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" void -+#else -+#define __Pyx_PyMODINIT_FUNC void - #endif - #else --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC PyObject * -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * - #else --#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#define __Pyx_PyMODINIT_FUNC PyObject * - #endif - #endif - -@@ -6551,6 +5250,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_CyClpPrimalColumnPivotBase(PyObjec - { - __Pyx_TraceDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannyDeclarations - #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m) { -@@ -6598,11 +5300,9 @@ if (!__Pyx_RefNanny) { - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ -- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS -- #ifdef WITH_THREAD /* Python build with threading support? */ -+ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - PyEval_InitThreads(); - #endif -- #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; -@@ -6639,15 +5339,15 @@ if (!__Pyx_RefNanny) { - } - #endif - /*--- Builtin init code ---*/ -- if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Constants init code ---*/ -- if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Global type/function init code ---*/ - (void)__Pyx_modinit_global_init_code(); - (void)__Pyx_modinit_variable_export_code(); -- if (unlikely(__Pyx_modinit_function_export_code() != 0)) goto __pyx_L1_error; -- if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; -- if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_function_export_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) -+ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) -+ if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) - (void)__Pyx_modinit_variable_import_code(); - (void)__Pyx_modinit_function_import_code(); - /*--- Execution code ---*/ -@@ -6666,12 +5366,12 @@ if (!__Pyx_RefNanny) { - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -- * raise ImportError("numpy.core.umath failed to import") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - __Pyx_TraceReturn(Py_None, 0); - -@@ -6800,10 +5500,9 @@ static int __Pyx_TraceSetupAndCall(PyCodeObject** code, - (*frame)->f_tstate = tstate; - #endif - } -- __Pyx_PyFrame_SetLineNumber(*frame, firstlineno); -+ __Pyx_PyFrame_SetLineNumber(*frame, firstlineno); - retval = 1; -- tstate->tracing++; -- tstate->use_tracing = 0; -+ __Pyx_EnterTracing(tstate); - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - #if CYTHON_TRACE - if (tstate->c_tracefunc) -@@ -6811,12 +5510,10 @@ static int __Pyx_TraceSetupAndCall(PyCodeObject** code, - if (retval && tstate->c_profilefunc) - #endif - retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0; -- tstate->use_tracing = (tstate->c_profilefunc || -- (CYTHON_TRACE && tstate->c_tracefunc)); -- tstate->tracing--; -+ __Pyx_LeaveTracing(tstate); - if (retval) { - __Pyx_ErrRestoreInState(tstate, type, value, traceback); -- return tstate->use_tracing && retval; -+ return __Pyx_IsTracing(tstate, 0, 0) && retval; - } else { - Py_XDECREF(type); - Py_XDECREF(value); -@@ -6974,7 +5671,7 @@ static int __Pyx_CheckKeywordStrings( - #if CYTHON_COMPILING_IN_CPYTHON - static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; -- ternaryfunc call = func->ob_type->tp_call; -+ ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -@@ -7149,263 +5846,6 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject - } - #endif - --/* PyCFunctionFastCall */ --#if CYTHON_FAST_PYCCALL --static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { -- PyCFunctionObject *func = (PyCFunctionObject*)func_obj; -- PyCFunction meth = PyCFunction_GET_FUNCTION(func); -- PyObject *self = PyCFunction_GET_SELF(func); -- int flags = PyCFunction_GET_FLAGS(func); -- assert(PyCFunction_Check(func)); -- assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); -- assert(nargs >= 0); -- assert(nargs == 0 || args != NULL); -- /* _PyCFunction_FastCallDict() must not be called with an exception set, -- because it may clear it (directly or indirectly) and so the -- caller loses its exception */ -- assert(!PyErr_Occurred()); -- if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { -- return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); -- } else { -- return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); -- } --} --#endif -- --/* PyFunctionFastCall */ --#if CYTHON_FAST_PYCALL --static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, -- PyObject *globals) { -- PyFrameObject *f; -- PyThreadState *tstate = __Pyx_PyThreadState_Current; -- PyObject **fastlocals; -- Py_ssize_t i; -- PyObject *result; -- assert(globals != NULL); -- /* XXX Perhaps we should create a specialized -- PyFrame_New() that doesn't take locals, but does -- take builtins without sanity checking them. -- */ -- assert(tstate != NULL); -- f = PyFrame_New(tstate, co, globals, NULL); -- if (f == NULL) { -- return NULL; -- } -- fastlocals = __Pyx_PyFrame_GetLocalsplus(f); -- for (i = 0; i < na; i++) { -- Py_INCREF(*args); -- fastlocals[i] = *args++; -- } -- result = PyEval_EvalFrameEx(f,0); -- ++tstate->recursion_depth; -- Py_DECREF(f); -- --tstate->recursion_depth; -- return result; --} --#if 1 || PY_VERSION_HEX < 0x030600B1 --static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { -- PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); -- PyObject *globals = PyFunction_GET_GLOBALS(func); -- PyObject *argdefs = PyFunction_GET_DEFAULTS(func); -- PyObject *closure; --#if PY_MAJOR_VERSION >= 3 -- PyObject *kwdefs; --#endif -- PyObject *kwtuple, **k; -- PyObject **d; -- Py_ssize_t nd; -- Py_ssize_t nk; -- PyObject *result; -- assert(kwargs == NULL || PyDict_Check(kwargs)); -- nk = kwargs ? PyDict_Size(kwargs) : 0; -- if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { -- return NULL; -- } -- if ( --#if PY_MAJOR_VERSION >= 3 -- co->co_kwonlyargcount == 0 && --#endif -- likely(kwargs == NULL || nk == 0) && -- co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { -- if (argdefs == NULL && co->co_argcount == nargs) { -- result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); -- goto done; -- } -- else if (nargs == 0 && argdefs != NULL -- && co->co_argcount == Py_SIZE(argdefs)) { -- /* function called with no arguments, but all parameters have -- a default value: use default values as arguments .*/ -- args = &PyTuple_GET_ITEM(argdefs, 0); -- result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); -- goto done; -- } -- } -- if (kwargs != NULL) { -- Py_ssize_t pos, i; -- kwtuple = PyTuple_New(2 * nk); -- if (kwtuple == NULL) { -- result = NULL; -- goto done; -- } -- k = &PyTuple_GET_ITEM(kwtuple, 0); -- pos = i = 0; -- while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { -- Py_INCREF(k[i]); -- Py_INCREF(k[i+1]); -- i += 2; -- } -- nk = i / 2; -- } -- else { -- kwtuple = NULL; -- k = NULL; -- } -- closure = PyFunction_GET_CLOSURE(func); --#if PY_MAJOR_VERSION >= 3 -- kwdefs = PyFunction_GET_KW_DEFAULTS(func); --#endif -- if (argdefs != NULL) { -- d = &PyTuple_GET_ITEM(argdefs, 0); -- nd = Py_SIZE(argdefs); -- } -- else { -- d = NULL; -- nd = 0; -- } --#if PY_MAJOR_VERSION >= 3 -- result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, -- args, (int)nargs, -- k, (int)nk, -- d, (int)nd, kwdefs, closure); --#else -- result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, -- args, (int)nargs, -- k, (int)nk, -- d, (int)nd, closure); --#endif -- Py_XDECREF(kwtuple); --done: -- Py_LeaveRecursiveCall(); -- return result; --} --#endif --#endif -- --/* PyObjectCallMethO */ --#if CYTHON_COMPILING_IN_CPYTHON --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { -- PyObject *self, *result; -- PyCFunction cfunc; -- cfunc = PyCFunction_GET_FUNCTION(func); -- self = PyCFunction_GET_SELF(func); -- if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -- return NULL; -- result = cfunc(self, arg); -- Py_LeaveRecursiveCall(); -- if (unlikely(!result) && unlikely(!PyErr_Occurred())) { -- PyErr_SetString( -- PyExc_SystemError, -- "NULL result without error in PyObject_Call"); -- } -- return result; --} --#endif -- --/* PyObjectCallOneArg */ --#if CYTHON_COMPILING_IN_CPYTHON --static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { -- PyObject *result; -- PyObject *args = PyTuple_New(1); -- if (unlikely(!args)) return NULL; -- Py_INCREF(arg); -- PyTuple_SET_ITEM(args, 0, arg); -- result = __Pyx_PyObject_Call(func, args, NULL); -- Py_DECREF(args); -- return result; --} --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { --#if CYTHON_FAST_PYCALL -- if (PyFunction_Check(func)) { -- return __Pyx_PyFunction_FastCall(func, &arg, 1); -- } --#endif -- if (likely(PyCFunction_Check(func))) { -- if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { -- return __Pyx_PyObject_CallMethO(func, arg); --#if CYTHON_FAST_PYCCALL -- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { -- return __Pyx_PyCFunction_FastCall(func, &arg, 1); --#endif -- } -- } -- return __Pyx__PyObject_CallOneArg(func, arg); --} --#else --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { -- PyObject *result; -- PyObject *args = PyTuple_Pack(1, arg); -- if (unlikely(!args)) return NULL; -- result = __Pyx_PyObject_Call(func, args, NULL); -- Py_DECREF(args); -- return result; --} --#endif -- --/* DictGetItem */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { -- PyObject *value; -- value = PyDict_GetItemWithError(d, key); -- if (unlikely(!value)) { -- if (!PyErr_Occurred()) { -- if (unlikely(PyTuple_Check(key))) { -- PyObject* args = PyTuple_Pack(1, key); -- if (likely(args)) { -- PyErr_SetObject(PyExc_KeyError, args); -- Py_DECREF(args); -- } -- } else { -- PyErr_SetObject(PyExc_KeyError, key); -- } -- } -- return NULL; -- } -- Py_INCREF(value); -- return value; --} --#endif -- --/* RaiseTooManyValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { -- PyErr_Format(PyExc_ValueError, -- "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); --} -- --/* RaiseNeedMoreValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { -- PyErr_Format(PyExc_ValueError, -- "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", -- index, (index == 1) ? "" : "s"); --} -- --/* RaiseNoneIterError */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); --} -- --/* ExtTypeTest */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { -- if (unlikely(!type)) { -- PyErr_SetString(PyExc_SystemError, "Missing type object"); -- return 0; -- } -- if (likely(__Pyx_TypeCheck(obj, type))) -- return 1; -- PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", -- Py_TYPE(obj)->tp_name, type->tp_name); -- return 0; --} -- - /* GetTopmostException */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * -@@ -7629,6 +6069,28 @@ static int __Pyx_SetVtable(PyObject *dict, void *vtable) { - return -1; - } - -+/* PyObjectGetAttrStrNoError */ -+static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { -+ __Pyx_PyThreadState_declare -+ __Pyx_PyThreadState_assign -+ if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) -+ __Pyx_PyErr_Clear(); -+} -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { -+ PyObject *result; -+#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 -+ PyTypeObject* tp = Py_TYPE(obj); -+ if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { -+ return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); -+ } -+#endif -+ result = __Pyx_PyObject_GetAttrStr(obj, attr_name); -+ if (unlikely(!result)) { -+ __Pyx_PyObject_GetAttrStr_ClearAttributeError(); -+ } -+ return result; -+} -+ - /* SetupReduce */ - static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { - int ret; -@@ -7656,43 +6118,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { - PyObject *setstate = NULL; - PyObject *setstate_cython = NULL; - #if CYTHON_USE_PYTYPE_LOOKUP -- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #else -- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #endif - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #else -- object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #endif -- reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; -+ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; - if (reduce_ex == object_reduce_ex) { - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #else -- object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #endif -- reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; -+ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; - if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { -- reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; -+ reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); -+ if (likely(reduce_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (reduce == object_reduce || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); - if (!setstate) PyErr_Clear(); - if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { -- setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; -+ setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); -+ if (likely(setstate_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (!setstate || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - } - PyType_Modified((PyTypeObject*)type_obj); - } - } -- goto GOOD; --BAD: -+ goto __PYX_GOOD; -+__PYX_BAD: - if (!PyErr_Occurred()) - PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); - ret = -1; --GOOD: -+__PYX_GOOD: - #if !CYTHON_USE_PYTYPE_LOOKUP - Py_XDECREF(object_reduce); - Py_XDECREF(object_reduce_ex); -@@ -7814,7 +6284,7 @@ static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UIN - - /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK --static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { -+static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { - PyObject *use_cline; - PyObject *ptype, *pvalue, *ptraceback; - #if CYTHON_COMPILING_IN_CPYTHON -@@ -7844,7 +6314,7 @@ static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { - } - if (!use_cline) { - c_line = 0; -- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); -+ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; -@@ -7918,7 +6388,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - if (__pyx_code_cache.count == __pyx_code_cache.max_count) { - int new_max = __pyx_code_cache.max_count + 64; - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( -- __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); -+ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); - if (unlikely(!entries)) { - return; - } -@@ -7941,30 +6411,31 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { -- PyCodeObject *py_code = 0; -- PyObject *py_srcfile = 0; -- PyObject *py_funcname = 0; -+ PyCodeObject *py_code = NULL; -+ PyObject *py_funcname = NULL; - #if PY_MAJOR_VERSION < 3 -+ PyObject *py_srcfile = NULL; - py_srcfile = PyString_FromString(filename); -- #else -- py_srcfile = PyUnicode_FromString(filename); -- #endif - if (!py_srcfile) goto bad; -+ #endif - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; -+ funcname = PyUnicode_AsUTF8(py_funcname); -+ if (!funcname) goto bad; - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); -- #else -- py_funcname = PyUnicode_FromString(funcname); -+ if (!py_funcname) goto bad; - #endif - } -- if (!py_funcname) goto bad; -+ #if PY_MAJOR_VERSION < 3 - py_code = __Pyx_PyCode_New( - 0, - 0, -@@ -7983,11 +6454,16 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - __pyx_empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); -- Py_DECREF(py_funcname); -+ #else -+ py_code = PyCode_NewEmpty(filename, funcname, py_line); -+ #endif -+ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline - return py_code; - bad: -- Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -+ #if PY_MAJOR_VERSION < 3 -+ Py_XDECREF(py_srcfile); -+ #endif - return NULL; - } - static void __Pyx_AddTraceback(const char *funcname, int c_line, -@@ -8041,37 +6517,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - return (target_type) value;\ - } - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(int) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(int) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(int) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(int), -- little, !is_unsigned); -- } --} -- - /* Declarations */ - #if CYTHON_CCOMPLEX - #ifdef __cplusplus -@@ -8189,7 +6634,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_float(a, a); - return __Pyx_c_prod_float(a, a); - case 3: - z = __Pyx_c_prod_float(a, a); -@@ -8344,7 +6788,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_double(a, a); - return __Pyx_c_prod_double(a, a); - case 3: - z = __Pyx_c_prod_double(a, a); -@@ -8382,40 +6825,16 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - #endif - #endif - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { -- const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(enum NPY_TYPES) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(enum NPY_TYPES) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), -- little, !is_unsigned); -- } --} -- - /* CIntFromPy */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -8602,9 +7021,54 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - return (int) -1; - } - -+/* CIntToPy */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif -+ const int is_unsigned = neg_one > const_zero; -+ if (is_unsigned) { -+ if (sizeof(int) < sizeof(long)) { -+ return PyInt_FromLong((long) value); -+ } else if (sizeof(int) <= sizeof(unsigned long)) { -+ return PyLong_FromUnsignedLong((unsigned long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+#endif -+ } -+ } else { -+ if (sizeof(int) <= sizeof(long)) { -+ return PyInt_FromLong((long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ return PyLong_FromLongLong((PY_LONG_LONG) value); -+#endif -+ } -+ } -+ { -+ int one = 1; int little = (int)*(unsigned char *)&one; -+ unsigned char *bytes = (unsigned char *)&value; -+ return _PyLong_FromByteArray(bytes, sizeof(int), -+ little, !is_unsigned); -+ } -+} -+ - /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(long) < sizeof(long)) { -@@ -8635,7 +7099,14 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - - /* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -9223,6 +7694,23 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_DECREF(x); - return ival; - } -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { -+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { -+ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); -+#if PY_MAJOR_VERSION < 3 -+ } else if (likely(PyInt_CheckExact(o))) { -+ return PyInt_AS_LONG(o); -+#endif -+ } else { -+ Py_ssize_t ival; -+ PyObject *x; -+ x = PyNumber_Index(o); -+ if (!x) return -1; -+ ival = PyInt_AsLong(x); -+ Py_DECREF(x); -+ return ival; -+ } -+} - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); - } -diff --git a/cylp/cy/CyClpSimplex.cpp b/cylp/cy/CyClpSimplex.cpp -index 8acc740..4a84cb1 100644 ---- a/cylp/cy/CyClpSimplex.cpp -+++ b/cylp/cy/CyClpSimplex.cpp -@@ -1,14 +1,16 @@ --/* Generated by Cython 0.29.21 */ -+/* Generated by Cython 0.29.25 */ - -+#ifndef PY_SSIZE_T_CLEAN - #define PY_SSIZE_T_CLEAN -+#endif /* PY_SSIZE_T_CLEAN */ - #include "Python.h" - #ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. - #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. - #else --#define CYTHON_ABI "0_29_21" --#define CYTHON_HEX_VERSION 0x001D15F0 -+#define CYTHON_ABI "0_29_25" -+#define CYTHON_HEX_VERSION 0x001D19F0 - #define CYTHON_FUTURE_DIVISION 0 - #include - #ifndef offsetof -@@ -155,7 +157,7 @@ - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif -- #if PY_VERSION_HEX < 0x030300F0 -+ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) -@@ -174,7 +176,7 @@ - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL -- #define CYTHON_FAST_PYCALL 1 -+ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1) - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) -@@ -193,7 +195,9 @@ - #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) - #endif - #if CYTHON_USE_PYLONG_INTERNALS -- #include "longintrepr.h" -+ #if PY_MAJOR_VERSION < 3 -+ #include "longintrepr.h" -+ #endif - #undef SHIFT - #undef BASE - #undef MASK -@@ -324,9 +328,68 @@ class __Pyx_FakeReference { - #define __Pyx_DefaultClassType PyClass_Type - #else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" --#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 -- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ -- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -+ #define __Pyx_DefaultClassType PyType_Type -+#if PY_VERSION_HEX >= 0x030B00A1 -+ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, -+ PyObject *code, PyObject *c, PyObject* n, PyObject *v, -+ PyObject *fv, PyObject *cell, PyObject* fn, -+ PyObject *name, int fline, PyObject *lnos) { -+ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; -+ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; -+ const char *fn_cstr=NULL; -+ const char *name_cstr=NULL; -+ PyCodeObject* co=NULL; -+ PyObject *type, *value, *traceback; -+ PyErr_Fetch(&type, &value, &traceback); -+ if (!(kwds=PyDict_New())) goto end; -+ if (!(argcount=PyLong_FromLong(a))) goto end; -+ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; -+ if (!(posonlyargcount=PyLong_FromLong(0))) goto end; -+ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; -+ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; -+ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; -+ if (!(nlocals=PyLong_FromLong(l))) goto end; -+ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; -+ if (!(stacksize=PyLong_FromLong(s))) goto end; -+ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; -+ if (!(flags=PyLong_FromLong(f))) goto end; -+ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; -+ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; -+ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; -+ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; -+ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; -+ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here -+ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; -+ Py_XDECREF((PyObject*)co); -+ co = (PyCodeObject*)call_result; -+ call_result = NULL; -+ if (0) { -+ cleanup_code_too: -+ Py_XDECREF((PyObject*)co); -+ co = NULL; -+ } -+ end: -+ Py_XDECREF(kwds); -+ Py_XDECREF(argcount); -+ Py_XDECREF(posonlyargcount); -+ Py_XDECREF(kwonlyargcount); -+ Py_XDECREF(nlocals); -+ Py_XDECREF(stacksize); -+ Py_XDECREF(replace); -+ Py_XDECREF(call_result); -+ Py_XDECREF(empty); -+ if (type) { -+ PyErr_Restore(type, value, traceback); -+ } -+ return co; -+ } - #else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -@@ -440,8 +503,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #endif - #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 -+ #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) -+ #else -+ #define __Pyx_PyUnicode_READY(op) (0) -+ #endif - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) -@@ -450,7 +517,11 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) - #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) -+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) -+ #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) -+ #endif - #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) - #endif -@@ -556,10 +627,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong -- #define __Pyx_PyInt_AsHash_t PyInt_AsLong -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t - #else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t -- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t - #endif - #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) -@@ -627,7 +698,13 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "ClpFactorization.hpp" - #include "IClpPrimalColumnPivotBase.h" - #include "numpy/arrayobject.h" -+#include "numpy/ndarrayobject.h" -+#include "numpy/ndarraytypes.h" -+#include "numpy/arrayscalars.h" - #include "numpy/ufuncobject.h" -+ -+ /* NumPy API declarations from "numpy/__init__.pxd" */ -+ - #include "ClpDualRowPivot.hpp" - #include "IClpDualRowPivotBase.h" - #include "CoinModel.hpp" -@@ -655,11 +732,11 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "OsiSolverInterface.hpp" - #include "CbcCompareUser.hpp" - #include "ICbcModel.hpp" -+#include - #include "ios" - #include "new" - #include "stdexcept" - #include "typeinfo" --#include - #include - #include "IClpSimplex.hpp" - #include "ICoinMpsIO.hpp" -@@ -759,6 +836,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); - static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); - #if CYTHON_ASSUME_SAFE_MACROS - #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) - #else -@@ -951,7 +1029,7 @@ typedef struct { - } __Pyx_BufFmt_Context; - - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":775 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":690 - * # in Cython to enable them only on the right systems. - * - * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< -@@ -960,7 +1038,7 @@ typedef struct { - */ - typedef npy_int8 __pyx_t_5numpy_int8_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":776 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":691 - * - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< -@@ -969,7 +1047,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; - */ - typedef npy_int16 __pyx_t_5numpy_int16_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":777 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":692 - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< -@@ -978,7 +1056,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; - */ - typedef npy_int32 __pyx_t_5numpy_int32_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":778 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":693 - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t - * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< -@@ -987,7 +1065,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; - */ - typedef npy_int64 __pyx_t_5numpy_int64_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":782 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":697 - * #ctypedef npy_int128 int128_t - * - * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< -@@ -996,7 +1074,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; - */ - typedef npy_uint8 __pyx_t_5numpy_uint8_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":783 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":698 - * - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< -@@ -1005,7 +1083,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; - */ - typedef npy_uint16 __pyx_t_5numpy_uint16_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":784 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":699 - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< -@@ -1014,7 +1092,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; - */ - typedef npy_uint32 __pyx_t_5numpy_uint32_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":785 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":700 - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t - * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< -@@ -1023,7 +1101,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; - */ - typedef npy_uint64 __pyx_t_5numpy_uint64_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":789 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":704 - * #ctypedef npy_uint128 uint128_t - * - * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< -@@ -1032,7 +1110,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; - */ - typedef npy_float32 __pyx_t_5numpy_float32_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":790 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":705 - * - * ctypedef npy_float32 float32_t - * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< -@@ -1041,7 +1119,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; - */ - typedef npy_float64 __pyx_t_5numpy_float64_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":799 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":714 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< -@@ -1050,7 +1128,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; - */ - typedef npy_long __pyx_t_5numpy_int_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":800 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":715 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< -@@ -1059,7 +1137,7 @@ typedef npy_long __pyx_t_5numpy_int_t; - */ - typedef npy_longlong __pyx_t_5numpy_long_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":801 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":716 - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t - * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< -@@ -1068,7 +1146,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; - */ - typedef npy_longlong __pyx_t_5numpy_longlong_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":803 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":718 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< -@@ -1077,7 +1155,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; - */ - typedef npy_ulong __pyx_t_5numpy_uint_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":804 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":719 - * - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< -@@ -1086,7 +1164,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":805 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":720 - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t - * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< -@@ -1095,7 +1173,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":807 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":722 - * ctypedef npy_ulonglong ulonglong_t - * - * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< -@@ -1104,7 +1182,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - */ - typedef npy_intp __pyx_t_5numpy_intp_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":808 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":723 - * - * ctypedef npy_intp intp_t - * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< -@@ -1113,7 +1191,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; - */ - typedef npy_uintp __pyx_t_5numpy_uintp_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":810 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":725 - * ctypedef npy_uintp uintp_t - * - * ctypedef npy_double float_t # <<<<<<<<<<<<<< -@@ -1122,7 +1200,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; - */ - typedef npy_double __pyx_t_5numpy_float_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":811 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":726 - * - * ctypedef npy_double float_t - * ctypedef npy_double double_t # <<<<<<<<<<<<<< -@@ -1131,7 +1209,7 @@ typedef npy_double __pyx_t_5numpy_float_t; - */ - typedef npy_double __pyx_t_5numpy_double_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":812 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":727 - * ctypedef npy_double float_t - * ctypedef npy_double double_t - * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< -@@ -1198,7 +1276,7 @@ struct __pyx_obj_4cylp_2cy_11CyCoinMpsIO_CyCoinMpsIO; - struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex; - struct __pyx_obj_4cylp_2cy_12CyClpSimplex_VarStatus; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":814 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":729 - * ctypedef npy_longdouble longdouble_t - * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< -@@ -1207,7 +1285,7 @@ struct __pyx_obj_4cylp_2cy_12CyClpSimplex_VarStatus; - */ - typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":815 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":730 - * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< -@@ -1216,7 +1294,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - */ - typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":816 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":731 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< -@@ -1225,7 +1303,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - */ - typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":818 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":733 - * ctypedef npy_clongdouble clongdouble_t - * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< -@@ -2082,11 +2160,45 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame) - #endif - #define __Pyx_TraceDeclarations\ -- static PyCodeObject *__pyx_frame_code = NULL;\ -- CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\ -- int __Pyx_use_tracing = 0; -+ static PyCodeObject *__pyx_frame_code = NULL;\ -+ CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\ -+ int __Pyx_use_tracing = 0; - #define __Pyx_TraceFrameInit(codeobj)\ -- if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj; -+ if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj; -+#if PY_VERSION_HEX >= 0x030b00a2 -+ #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\ -+ (unlikely((tstate)->cframe->use_tracing) &&\ -+ (!(check_tracing) || !(tstate)->tracing) &&\ -+ (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc))) -+ #define __Pyx_EnterTracing(tstate) PyThreadState_EnterTracing(tstate) -+ #define __Pyx_LeaveTracing(tstate) PyThreadState_LeaveTracing(tstate) -+#elif PY_VERSION_HEX >= 0x030a00b1 -+ #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\ -+ (unlikely((tstate)->cframe->use_tracing) &&\ -+ (!(check_tracing) || !(tstate)->tracing) &&\ -+ (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc))) -+ #define __Pyx_EnterTracing(tstate)\ -+ do { tstate->tracing++; tstate->cframe->use_tracing = 0; } while (0) -+ #define __Pyx_LeaveTracing(tstate)\ -+ do {\ -+ tstate->tracing--;\ -+ tstate->cframe->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\ -+ || tstate->c_profilefunc != NULL);\ -+ } while (0) -+#else -+ #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\ -+ (unlikely((tstate)->use_tracing) &&\ -+ (!(check_tracing) || !(tstate)->tracing) &&\ -+ (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc))) -+ #define __Pyx_EnterTracing(tstate)\ -+ do { tstate->tracing++; tstate->use_tracing = 0; } while (0) -+ #define __Pyx_LeaveTracing(tstate)\ -+ do {\ -+ tstate->tracing--;\ -+ tstate->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\ -+ || tstate->c_profilefunc != NULL);\ -+ } while (0) -+#endif - #ifdef WITH_THREAD - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\ - if (nogil) {\ -@@ -2094,8 +2206,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ -- if (unlikely(tstate->use_tracing) && !tstate->tracing &&\ -- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ -+ if (__Pyx_IsTracing(tstate, 1, 1)) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\ - }\ - PyGILState_Release(state);\ -@@ -2103,8 +2214,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - }\ - } else {\ - PyThreadState* tstate = PyThreadState_GET();\ -- if (unlikely(tstate->use_tracing) && !tstate->tracing &&\ -- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ -+ if (__Pyx_IsTracing(tstate, 1, 1)) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\ - if (unlikely(__Pyx_use_tracing < 0)) goto_error;\ - }\ -@@ -2112,8 +2222,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - #else - #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\ - { PyThreadState* tstate = PyThreadState_GET();\ -- if (unlikely(tstate->use_tracing) && !tstate->tracing &&\ -- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ -+ if (__Pyx_IsTracing(tstate, 1, 1)) {\ - __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\ - if (unlikely(__Pyx_use_tracing < 0)) goto_error;\ - }\ -@@ -2122,10 +2231,8 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - #define __Pyx_TraceException()\ - if (likely(!__Pyx_use_tracing)); else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ -- if (tstate->use_tracing &&\ -- (tstate->c_profilefunc || (CYTHON_TRACE && tstate->c_tracefunc))) {\ -- tstate->tracing++;\ -- tstate->use_tracing = 0;\ -+ if (__Pyx_IsTracing(tstate, 0, 1)) {\ -+ __Pyx_EnterTracing(tstate);\ - PyObject *exc_info = __Pyx_GetExceptionTuple(tstate);\ - if (exc_info) {\ - if (CYTHON_TRACE && tstate->c_tracefunc)\ -@@ -2135,22 +2242,19 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\ - Py_DECREF(exc_info);\ - }\ -- tstate->use_tracing = 1;\ -- tstate->tracing--;\ -+ __Pyx_LeaveTracing(tstate);\ - }\ - } - static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) { - PyObject *type, *value, *traceback; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); -- tstate->tracing++; -- tstate->use_tracing = 0; -+ __Pyx_EnterTracing(tstate); - if (CYTHON_TRACE && tstate->c_tracefunc) - tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result); - if (tstate->c_profilefunc) - tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result); - CYTHON_FRAME_DEL(frame); -- tstate->use_tracing = 1; -- tstate->tracing--; -+ __Pyx_LeaveTracing(tstate); - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - } - #ifdef WITH_THREAD -@@ -2161,14 +2265,14 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ -- if (tstate->use_tracing) {\ -+ if (__Pyx_IsTracing(tstate, 0, 0)) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - PyGILState_Release(state);\ - }\ - } else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ -- if (tstate->use_tracing) {\ -+ if (__Pyx_IsTracing(tstate, 0, 0)) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - }\ -@@ -2177,7 +2281,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - #define __Pyx_TraceReturn(result, nogil)\ - if (likely(!__Pyx_use_tracing)); else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ -- if (tstate->use_tracing) {\ -+ if (__Pyx_IsTracing(tstate, 0, 0)) {\ - __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\ - }\ - } -@@ -2197,11 +2301,9 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - PyObject *type, *value, *traceback; - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - __Pyx_PyFrame_SetLineNumber(frame, lineno); -- tstate->tracing++; -- tstate->use_tracing = 0; -+ __Pyx_EnterTracing(tstate); - ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL); -- tstate->use_tracing = 1; -- tstate->tracing--; -+ __Pyx_LeaveTracing(tstate); - if (likely(!ret)) { - __Pyx_ErrRestoreInState(tstate, type, value, traceback); - } else { -@@ -2220,7 +2322,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - PyThreadState *tstate;\ - PyGILState_STATE state = PyGILState_Ensure();\ - tstate = __Pyx_PyThreadState_Current;\ -- if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\ -+ if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\ - ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\ - }\ - PyGILState_Release(state);\ -@@ -2228,7 +2330,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - }\ - } else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ -- if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\ -+ if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\ - int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\ - if (unlikely(ret)) goto_error;\ - }\ -@@ -2238,7 +2340,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - #define __Pyx_TraceLine(lineno, nogil, goto_error)\ - if (likely(!__Pyx_use_tracing)); else {\ - PyThreadState* tstate = __Pyx_PyThreadState_Current;\ -- if (unlikely(tstate->use_tracing && tstate->c_tracefunc && __pyx_frame->f_trace)) {\ -+ if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\ - int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\ - if (unlikely(ret)) goto_error;\ - }\ -@@ -2262,6 +2364,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #ifndef Py_MEMBER_SIZE - #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) - #endif -+#if CYTHON_FAST_PYCALL - static size_t __pyx_pyframe_localsplus_offset = 0; - #include "frameobject.h" - #define __Pxy_PyFrame_Initialize_Offsets()\ -@@ -2269,6 +2372,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) - #define __Pyx_PyFrame_GetLocalsplus(frame)\ - (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) -+#endif // CYTHON_FAST_PYCALL - #endif - - /* PyObjectCall.proto */ -@@ -2582,9 +2686,6 @@ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject * - /* HasAttr.proto */ - static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); - --/* RaiseNoneIterError.proto */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -- - /* PyObject_GenericGetAttrNoDict.proto */ - #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 - static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name); -@@ -2675,18 +2776,14 @@ typedef struct { - #endif - - -+/* GCCDiagnostics.proto */ -+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -+#define __Pyx_HAS_GCC_DIAGNOSTIC -+#endif -+ - /* None.proto */ - static CYTHON_INLINE long __Pyx_pow_long(long, long); - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); -- --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -- --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__IClpSimplex_3a__3a_Status(enum IClpSimplex::Status value); -- - /* RealImag.proto */ - #if CYTHON_CCOMPLEX - #ifdef __cplusplus -@@ -2785,18 +2882,24 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__IClpSimplex_3a__3a_Status( - #endif - #endif - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); -- - /* CIntFromPy.proto */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); - -+/* CIntToPy.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); -+ - /* CIntFromPy.proto */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); - -+/* CIntToPy.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -+ - /* CIntFromPy.proto */ - static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *); - -+/* CIntToPy.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__IClpSimplex_3a__3a_Status(enum IClpSimplex::Status value); -+ - /* CIntFromPy.proto */ - static CYTHON_INLINE enum IClpSimplex::Status __Pyx_PyInt_As_enum__IClpSimplex_3a__3a_Status(PyObject *); - -@@ -2948,8 +3051,17 @@ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; - static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; - static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; - static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -+static PyTypeObject *__pyx_ptype_5numpy_generic = 0; -+static PyTypeObject *__pyx_ptype_5numpy_number = 0; -+static PyTypeObject *__pyx_ptype_5numpy_integer = 0; -+static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; -+static PyTypeObject *__pyx_ptype_5numpy_floating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; -+static PyTypeObject *__pyx_ptype_5numpy_character = 0; - static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ - static CYTHON_INLINE int __pyx_f_5numpy_import_array(void); /*proto*/ - - /* Module declarations from 'cylp.cy.CyClpDualRowPivotBase' */ -@@ -3031,8 +3143,6 @@ static PyObject *__pyx_builtin_xrange; - static PyObject *__pyx_builtin_range; - static PyObject *__pyx_builtin_print; - static PyObject *__pyx_builtin_open; --static PyObject *__pyx_builtin_ValueError; --static PyObject *__pyx_builtin_RuntimeError; - static const char __pyx_k_A[] = "A"; - static const char __pyx_k_B[] = "B"; - static const char __pyx_k_D[] = "D"; -@@ -3210,7 +3320,6 @@ static const char __pyx_k_pyx_state[] = "__pyx_state"; - static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; - static const char __pyx_k_rowStarts[] = "rowStarts"; - static const char __pyx_k_variables[] = "variables"; --static const char __pyx_k_ValueError[] = "ValueError"; - static const char __pyx_k_constIndex[] = "constIndex"; - static const char __pyx_k_coo_matrix[] = "coo_matrix"; - static const char __pyx_k_filterVars[] = "filterVars"; -@@ -3239,7 +3348,6 @@ static const char __pyx_k_setRowUpper[] = "setRowUpper"; - static const char __pyx_k_useRowNames[] = "useRowNames"; - static const char __pyx_k_CyClpSimplex[] = "CyClpSimplex"; - static const char __pyx_k_CyLPSolution[] = "CyLPSolution"; --static const char __pyx_k_RuntimeError[] = "RuntimeError"; - static const char __pyx_k_atLowerBound[] = "atLowerBound"; - static const char __pyx_k_atUpperBound[] = "atUpperBound"; - static const char __pyx_k_columnStarts[] = "columnStarts"; -@@ -3338,7 +3446,6 @@ static const char __pyx_k_unrecognised_extension_s[] = "unrecognised extension % - static const char __pyx_k_No_CyClpSimplex_cyLPModel[] = "No CyClpSimplex cyLPModel."; - static const char __pyx_k_cylp_py_modeling_CyLPModel[] = "cylp.py.modeling.CyLPModel"; - static const char __pyx_k_CyClpSimplex_dual_line_1577[] = "CyClpSimplex.dual (line 1577)"; --static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; - static const char __pyx_k_setColumnLowerFirstElements[] = "setColumnLowerFirstElements"; - static const char __pyx_k_setColumnUpperFirstElements[] = "setColumnUpperFirstElements"; - static const char __pyx_k_stopped_on_iterations_or_time[] = "stopped on iterations or time"; -@@ -3355,7 +3462,6 @@ static const char __pyx_k_To_remove_a_constraint_you_must[] = "To remove a const - static const char __pyx_k_dualPivotMethodObject_should_be[] = "dualPivotMethodObject should be of a class derived from DualPivotPythonBase"; - static const char __pyx_k_if_arg_is_an_integer_mark_varia[] = "\n if ``arg`` is an integer: mark variable index ``arg`` as integer.\n if ``arg`` is a :class:`CyLPVar` object: mark variable\n ``arg`` as integer. Here is an example of the latter:\n\n >>> import numpy as np\n >>> from cylp.cy import CyClpSimplex\n >>> from cylp.py.modeling.CyLPModel import CyLPModel, CyLPArray\n >>> model = CyLPModel()\n >>>\n >>> x = model.addVariable('x', 3)\n >>> y = model.addVariable('y', 2)\n >>>\n >>> A = np.matrix([[1., 2., 0],[1., 0, 1.]])\n >>> B = np.matrix([[1., 0, 0], [0, 0, 1.]])\n >>> D = np.matrix([[1., 2.],[0, 1]])\n >>> a = CyLPArray([5, 2.5])\n >>> b = CyLPArray([4.2, 3])\n >>> x_u= CyLPArray([2., 3.5])\n >>>\n >>> model += A*x <= a\n >>> model += 2 <= B * x + D * y <= b\n >>> model += y >= 0\n >>> model += 1.1 <= x[1:3] <= x_u\n >>>\n >>> c = CyLPArray([1., -2., 3.])\n >>> model.objective = c * x + 2 * y.sum()\n >>>\n >>>\n >>> s = CyClpSimplex(model)\n >>> s.setInteger(x[1:3])\n >>>\n >>> cbcModel = s.getCbcModel()\n >>> cbcModel.solve()\n 0\n >>> print(cbcModel.status)\n 'solution'\n >>>\n >>> sol_x = cbcModel.primalVariableSolution['x']\n >>> (abs(sol_x -\n ... np.array([0.5, 2, 2]) ) <= 10**-6).all()\n True\n >>> sol_y = cbcModel.primalVariableSolution['y']\n >>> (abs(sol_y -\n ... np.array([0, 0.75]) ) <= 10**-6).all()\n True\n\n "; - static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; --static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; - static const char __pyx_k_CyClpPrimalColumnPivotBase_pyx_p[] = "CyClpPrimalColumnPivotBase.pyx: pivot column should be implemented."; - static const char __pyx_k_CyClpSimplex_initialDualSolve_li[] = "CyClpSimplex.initialDualSolve (line 1274)"; - static const char __pyx_k_CyClpSimplex_initialSolve_line_1[] = "CyClpSimplex.initialSolve (line 1233)"; -@@ -3368,11 +3474,9 @@ static const char __pyx_k_CyClpSimplex_setConstraintStatus[] = "CyClpSimplex.set - static const char __pyx_k_CyClpSimplex_setInteger_line_167[] = "CyClpSimplex.setInteger (line 1678)"; - static const char __pyx_k_CyClpSimplex_setVariableStatus_l[] = "CyClpSimplex.setVariableStatus (line 1006)"; - static const char __pyx_k_Expected_a_CyLPModel_as_an_argum[] = "Expected a CyLPModel as an argument to cylpSimplex constructor. Got %s"; --static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; - static const char __pyx_k_Hessian_can_be_set_to_a_matrix_t[] = "Hessian can be set to a matrix that implements *tocoo* method"; - static const char __pyx_k_Incompatible_checksums_s_vs_0xd4[] = "Incompatible checksums (%s vs 0xd41d8cd = ())"; - static const char __pyx_k_No_write_access_for_s_or_an_inte[] = "No write access for %s or an intermediate directory does not exist."; --static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; - static const char __pyx_k_Presolve_says_problem_infeasible[] = "Presolve says problem infeasible."; - static const char __pyx_k_The_argument_of_getVarStatus_can[] = "The argument of getVarStatus can be a CyLPVar only if the object is built using a CyLPModel."; - static const char __pyx_k_The_argument_of_setInteger_can_b[] = "The argument of setInteger can be a CyLPVar only if the object is built using a CyLPModel."; -@@ -3383,13 +3487,11 @@ static const char __pyx_k_To_set_the_objective_function_of[] = "To set the objec - static const char __pyx_k_Variables_should_have_the_same_d[] = "Variables should have the same dimensions to be complements. Got %s: %g and %s: %g"; - static const char __pyx_k_coefMatrix_must_be_a_scipy_spars[] = "coefMatrix must be a scipy sparse matrix."; - static const char __pyx_k_cylp_py_pivots_DualPivotPythonBa[] = "cylp.py.pivots.DualPivotPythonBase"; --static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; - static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; - static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; - static const char __pyx_k_pivotMethodObject_should_be_of_a[] = "pivotMethodObject should be of a class derived from PivotPythonBase"; - static const char __pyx_k_stopped_by_event_handler_virtual[] = "stopped by event handler (virtual int ClpEventHandler::event())"; - static const char __pyx_k_Run_CLP_s_initalPrimalSolve_The_2[] = "\n Run CLP's initalPrimalSolve. The same as :func:`initalSolve` but force\n the use of dual Simplex.\n\n **Usage example**\n\n >>> from cylp.cy.CyClpSimplex import CyClpSimplex, getMpsExample\n >>> s = CyClpSimplex()\n >>> f = getMpsExample()\n >>> s.readMps(f)\n 0\n >>> s.initialDualSolve()\n 'optimal'\n >>> round(s.objectiveValue, 4)\n 2520.5717\n\n "; --static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; - static PyObject *__pyx_n_s_A; - static PyObject *__pyx_n_s_B; - static PyObject *__pyx_n_s_CLP_deleteConstraints; -@@ -3417,8 +3519,6 @@ static PyObject *__pyx_n_s_CyLPVar; - static PyObject *__pyx_n_s_D; - static PyObject *__pyx_n_s_DualPivotPythonBase; - static PyObject *__pyx_kp_s_Expected_a_CyLPModel_as_an_argum; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; - static PyObject *__pyx_n_s_Hessian; - static PyObject *__pyx_kp_s_Hessian_can_be_set_to_a_matrix_t; - static PyObject *__pyx_n_s_ImportError; -@@ -3429,7 +3529,6 @@ static PyObject *__pyx_kp_s_No_cylpSimplex_cyLPModel_is_set; - static PyObject *__pyx_kp_s_No_such_constraint_s; - static PyObject *__pyx_kp_s_No_such_variable_s; - static PyObject *__pyx_kp_s_No_write_access_for_s_or_an_inte; --static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; - static PyObject *__pyx_n_s_PickleError; - static PyObject *__pyx_n_s_PivotPythonBase; - static PyObject *__pyx_kp_s_Presolve_says_problem_infeasible; -@@ -3437,7 +3536,6 @@ static PyObject *__pyx_kp_u_Run_CLP_s_initalPrimalSolve_The; - static PyObject *__pyx_kp_u_Run_CLP_s_initalPrimalSolve_The_2; - static PyObject *__pyx_kp_u_Run_CLP_s_initialSolve_It_does; - static PyObject *__pyx_kp_u_Runs_CLP_dual_simplex_Usage_Exa; --static PyObject *__pyx_n_s_RuntimeError; - static PyObject *__pyx_kp_u_Set_the_coefficient_matrix_cons; - static PyObject *__pyx_kp_u_Set_the_status_of_a_constraint; - static PyObject *__pyx_kp_u_Set_the_status_of_a_variable_ar; -@@ -3450,7 +3548,6 @@ static PyObject *__pyx_kp_s_To_remove_a_constraint_you_must; - static PyObject *__pyx_kp_s_To_remove_a_variable_you_must_se; - static PyObject *__pyx_kp_s_To_set_the_objective_function_of; - static PyObject *__pyx_n_s_TypeError; --static PyObject *__pyx_n_s_ValueError; - static PyObject *__pyx_n_s_VarStatus; - static PyObject *__pyx_kp_s_Variables_should_have_the_same_d; - static PyObject *__pyx_kp_s__8; -@@ -3604,8 +3701,6 @@ static PyObject *__pyx_n_s_nVars; - static PyObject *__pyx_n_s_name; - static PyObject *__pyx_n_s_name_2; - static PyObject *__pyx_n_s_ncol; --static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; --static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; - static PyObject *__pyx_n_s_new; - static PyObject *__pyx_n_s_newNumberColumns; - static PyObject *__pyx_n_s_newNumberRows; -@@ -3713,7 +3808,6 @@ static PyObject *__pyx_n_s_test; - static PyObject *__pyx_n_s_toarray; - static PyObject *__pyx_n_s_tocoo; - static PyObject *__pyx_n_s_tryPlusMinusOne; --static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; - static PyObject *__pyx_kp_s_unrecognised_extension_s; - static PyObject *__pyx_n_s_update; - static PyObject *__pyx_n_s_updateStatus; -@@ -3942,8 +4036,6 @@ static PyObject *__pyx_pf_4cylp_2cy_12CyClpSimplex_4getMpsExample(CYTHON_UNUSED - static PyObject *__pyx_pf_4cylp_2cy_12CyClpSimplex_9VarStatus___reduce_cython__(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_VarStatus *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_12CyClpSimplex_9VarStatus_2__setstate_cython__(struct __pyx_obj_4cylp_2cy_12CyClpSimplex_VarStatus *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_12CyClpSimplex_6__pyx_unpickle_VarStatus(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */ --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ - static PyObject *__pyx_tp_new_4cylp_2cy_12CyClpSimplex_CyClpSimplex(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ - static PyObject *__pyx_tp_new_4cylp_2cy_12CyClpSimplex_VarStatus(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ - static PyObject *__pyx_float_0_; -@@ -3998,11 +4090,6 @@ static PyObject *__pyx_tuple__30; - static PyObject *__pyx_tuple__31; - static PyObject *__pyx_tuple__32; - static PyObject *__pyx_tuple__33; --static PyObject *__pyx_tuple__34; --static PyObject *__pyx_tuple__35; --static PyObject *__pyx_tuple__36; --static PyObject *__pyx_tuple__37; --static PyObject *__pyx_tuple__38; - static PyObject *__pyx_codeobj__23; - static PyObject *__pyx_codeobj__27; - static PyObject *__pyx_codeobj__28; -@@ -37604,879 +37691,7 @@ static PyObject *__pyx_f_4cylp_2cy_12CyClpSimplex___pyx_unpickle_VarStatus__set_ - return __pyx_r; - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); -- __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_v_i; -- int __pyx_v_ndim; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- int __pyx_v_t; -- char *__pyx_v_f; -- PyArray_Descr *__pyx_v_descr = 0; -- int __pyx_v_offset; -- int __pyx_r; -- __Pyx_TraceDeclarations -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- int __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- int __pyx_t_4; -- int __pyx_t_5; -- int __pyx_t_6; -- PyArray_Descr *__pyx_t_7; -- PyObject *__pyx_t_8 = NULL; -- char *__pyx_t_9; -- int __pyx_lineno = 0; -- const char *__pyx_filename = NULL; -- int __pyx_clineno = 0; -- if (__pyx_v_info == NULL) { -- PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); -- return -1; -- } -- __Pyx_RefNannySetupContext("__getbuffer__", 0); -- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); -- __Pyx_GIVEREF(__pyx_v_info->obj); -- __Pyx_TraceCall("__getbuffer__", __pyx_f[2], 258, 0, __PYX_ERR(2, 258, __pyx_L1_error)); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":265 -- * -- * cdef int i, ndim -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":266 -- * cdef int i, ndim -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * -- * ndim = PyArray_NDIM(self) -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":268 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- */ -- __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L4_bool_binop_done; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":271 -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not C contiguous") -- * -- */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L4_bool_binop_done:; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 272, __pyx_L1_error) -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L7_bool_binop_done; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":275 -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not Fortran contiguous") -- * -- */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L7_bool_binop_done:; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 276, __pyx_L1_error) -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":278 -- * raise ValueError(u"ndarray is not Fortran contiguous") -- * -- * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":279 -- * -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * # Allocate new buffer for strides and shape info. -- */ -- __pyx_v_info->ndim = __pyx_v_ndim; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":283 -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- */ -- __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":284 -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim # <<<<<<<<<<<<<< -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- */ -- __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":285 -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim -- * for i in range(ndim): # <<<<<<<<<<<<<< -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] -- */ -- __pyx_t_4 = __pyx_v_ndim; -- __pyx_t_5 = __pyx_t_4; -- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { -- __pyx_v_i = __pyx_t_6; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":286 -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- */ -- (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":287 -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< -- * else: -- * info.strides = PyArray_STRIDES(self) -- */ -- (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- goto __pyx_L9; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":289 -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- */ -- /*else*/ { -- __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":290 -- * else: -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- */ -- __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); -- } -- __pyx_L9:; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":291 -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL # <<<<<<<<<<<<<< -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) -- */ -- __pyx_v_info->suboffsets = NULL; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":292 -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< -- * info.readonly = not PyArray_ISWRITEABLE(self) -- * -- */ -- __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":293 -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< -- * -- * cdef int t -- */ -- __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":296 -- * -- * cdef int t -- * cdef char* f = NULL # <<<<<<<<<<<<<< -- * cdef dtype descr = PyArray_DESCR(self) -- * cdef int offset -- */ -- __pyx_v_f = NULL; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":297 -- * cdef int t -- * cdef char* f = NULL -- * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< -- * cdef int offset -- * -- */ -- __pyx_t_7 = PyArray_DESCR(__pyx_v_self); -- __pyx_t_3 = ((PyObject *)__pyx_t_7); -- __Pyx_INCREF(__pyx_t_3); -- __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":300 -- * cdef int offset -- * -- * info.obj = self # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(descr): -- */ -- __Pyx_INCREF(((PyObject *)__pyx_v_self)); -- __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); -- __pyx_v_info->obj = ((PyObject *)__pyx_v_self); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); -- if (__pyx_t_1) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":303 -- * -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num # <<<<<<<<<<<<<< -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- */ -- __pyx_t_4 = __pyx_v_descr->type_num; -- __pyx_v_t = __pyx_t_4; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); -- if (!__pyx_t_2) { -- goto __pyx_L15_next_or; -- } else { -- } -- __pyx_t_2 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_L15_next_or:; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":305 -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L14_bool_binop_done:; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 306, __pyx_L1_error) -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":307 -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- */ -- switch (__pyx_v_t) { -- case NPY_BYTE: -- __pyx_v_f = ((char *)"b"); -- break; -- case NPY_UBYTE: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":308 -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- */ -- __pyx_v_f = ((char *)"B"); -- break; -- case NPY_SHORT: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":309 -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- */ -- __pyx_v_f = ((char *)"h"); -- break; -- case NPY_USHORT: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":310 -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- */ -- __pyx_v_f = ((char *)"H"); -- break; -- case NPY_INT: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":311 -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- */ -- __pyx_v_f = ((char *)"i"); -- break; -- case NPY_UINT: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":312 -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- */ -- __pyx_v_f = ((char *)"I"); -- break; -- case NPY_LONG: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":313 -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- */ -- __pyx_v_f = ((char *)"l"); -- break; -- case NPY_ULONG: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":314 -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- */ -- __pyx_v_f = ((char *)"L"); -- break; -- case NPY_LONGLONG: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":315 -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- */ -- __pyx_v_f = ((char *)"q"); -- break; -- case NPY_ULONGLONG: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":316 -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- */ -- __pyx_v_f = ((char *)"Q"); -- break; -- case NPY_FLOAT: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":317 -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- */ -- __pyx_v_f = ((char *)"f"); -- break; -- case NPY_DOUBLE: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":318 -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- */ -- __pyx_v_f = ((char *)"d"); -- break; -- case NPY_LONGDOUBLE: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":319 -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- */ -- __pyx_v_f = ((char *)"g"); -- break; -- case NPY_CFLOAT: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":320 -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- */ -- __pyx_v_f = ((char *)"Zf"); -- break; -- case NPY_CDOUBLE: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":321 -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" -- */ -- __pyx_v_f = ((char *)"Zd"); -- break; -- case NPY_CLONGDOUBLE: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":322 -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f = "O" -- * else: -- */ -- __pyx_v_f = ((char *)"Zg"); -- break; -- case NPY_OBJECT: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":323 -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_v_f = ((char *)"O"); -- break; -- default: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":325 -- * elif t == NPY_OBJECT: f = "O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * info.format = f -- * return -- */ -- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_8); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 325, __pyx_L1_error) -- break; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":326 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f # <<<<<<<<<<<<<< -- * return -- * else: -- */ -- __pyx_v_info->format = __pyx_v_f; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":327 -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f -- * return # <<<<<<<<<<<<<< -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- */ -- __pyx_r = 0; -- goto __pyx_L0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":329 -- * return -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- */ -- /*else*/ { -- __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":330 -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, -- */ -- (__pyx_v_info->format[0]) = '^'; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":331 -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 # <<<<<<<<<<<<<< -- * f = _util_dtypestring(descr, info.format + 1, -- * info.format + _buffer_format_string_len, -- */ -- __pyx_v_offset = 0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":332 -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< -- * info.format + _buffer_format_string_len, -- * &offset) -- */ -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":335 -- * info.format + _buffer_format_string_len, -- * &offset) -- * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- */ -- (__pyx_v_f[0]) = '\x00'; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- -- /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; -- if (__pyx_v_info->obj != NULL) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- goto __pyx_L2; -- __pyx_L0:; -- if (__pyx_v_info->obj == Py_None) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- __pyx_L2:; -- __Pyx_XDECREF((PyObject *)__pyx_v_descr); -- __Pyx_TraceReturn(Py_None, 0); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); -- __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_TraceDeclarations -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- int __pyx_lineno = 0; -- const char *__pyx_filename = NULL; -- int __pyx_clineno = 0; -- __Pyx_RefNannySetupContext("__releasebuffer__", 0); -- __Pyx_TraceCall("__releasebuffer__", __pyx_f[2], 337, 0, __PYX_ERR(2, 337, __pyx_L1_error)); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); -- if (__pyx_t_1) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":339 -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) -- */ -- PyObject_Free(__pyx_v_info->format); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":341 -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) # <<<<<<<<<<<<<< -- * # info.shape was stored after info.strides in the same block -- * -- */ -- PyObject_Free(__pyx_v_info->strides); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- -- /* function exit code */ -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_WriteUnraisable("numpy.ndarray.__releasebuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); -- __pyx_L0:; -- __Pyx_TraceReturn(Py_None, 0); -- __Pyx_RefNannyFinishContext(); --} -- --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":820 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -@@ -38493,9 +37708,9 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); -- __Pyx_TraceCall("PyArray_MultiIterNew1", __pyx_f[2], 820, 0, __PYX_ERR(2, 820, __pyx_L1_error)); -+ __Pyx_TraceCall("PyArray_MultiIterNew1", __pyx_f[2], 735, 0, __PYX_ERR(2, 735, __pyx_L1_error)); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":821 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":736 - * - * cdef inline object PyArray_MultiIterNew1(a): - * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< -@@ -38503,13 +37718,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - * cdef inline object PyArray_MultiIterNew2(a, b): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 821, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":820 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -@@ -38529,7 +37744,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - return __pyx_r; - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":823 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -@@ -38546,9 +37761,9 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); -- __Pyx_TraceCall("PyArray_MultiIterNew2", __pyx_f[2], 823, 0, __PYX_ERR(2, 823, __pyx_L1_error)); -+ __Pyx_TraceCall("PyArray_MultiIterNew2", __pyx_f[2], 738, 0, __PYX_ERR(2, 738, __pyx_L1_error)); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":824 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":739 - * - * cdef inline object PyArray_MultiIterNew2(a, b): - * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< -@@ -38556,13 +37771,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - * cdef inline object PyArray_MultiIterNew3(a, b, c): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 824, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":823 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -@@ -38582,7 +37797,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - return __pyx_r; - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":826 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -@@ -38599,9 +37814,9 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); -- __Pyx_TraceCall("PyArray_MultiIterNew3", __pyx_f[2], 826, 0, __PYX_ERR(2, 826, __pyx_L1_error)); -+ __Pyx_TraceCall("PyArray_MultiIterNew3", __pyx_f[2], 741, 0, __PYX_ERR(2, 741, __pyx_L1_error)); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":827 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":742 - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): - * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< -@@ -38609,13 +37824,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 827, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":826 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -@@ -38635,7 +37850,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - return __pyx_r; - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":829 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -38652,9 +37867,9 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); -- __Pyx_TraceCall("PyArray_MultiIterNew4", __pyx_f[2], 829, 0, __PYX_ERR(2, 829, __pyx_L1_error)); -+ __Pyx_TraceCall("PyArray_MultiIterNew4", __pyx_f[2], 744, 0, __PYX_ERR(2, 744, __pyx_L1_error)); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":830 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":745 - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -@@ -38662,13 +37877,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 830, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":829 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -38688,7 +37903,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - return __pyx_r; - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":832 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -38705,9 +37920,9 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); -- __Pyx_TraceCall("PyArray_MultiIterNew5", __pyx_f[2], 832, 0, __PYX_ERR(2, 832, __pyx_L1_error)); -+ __Pyx_TraceCall("PyArray_MultiIterNew5", __pyx_f[2], 747, 0, __PYX_ERR(2, 747, __pyx_L1_error)); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":833 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":748 - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< -@@ -38715,13 +37930,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - * cdef inline tuple PyDataType_SHAPE(dtype d): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 833, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":832 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -38741,7 +37956,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - return __pyx_r; - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":835 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -38758,9 +37973,9 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); -- __Pyx_TraceCall("PyDataType_SHAPE", __pyx_f[2], 835, 0, __PYX_ERR(2, 835, __pyx_L1_error)); -+ __Pyx_TraceCall("PyDataType_SHAPE", __pyx_f[2], 750, 0, __PYX_ERR(2, 750, __pyx_L1_error)); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":836 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -38770,7 +37985,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); - if (__pyx_t_1) { - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":837 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":752 - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): - * return d.subarray.shape # <<<<<<<<<<<<<< -@@ -38782,7 +37997,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); - goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":836 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -38791,12 +38006,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - */ - } - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":839 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":754 - * return d.subarray.shape - * else: - * return () # <<<<<<<<<<<<<< - * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: -+ * - */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); -@@ -38805,7 +38020,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - goto __pyx_L0; - } - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":835 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -38824,759 +38039,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - return __pyx_r; - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":841 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { -- PyArray_Descr *__pyx_v_child = 0; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- PyObject *__pyx_v_fields = 0; -- PyObject *__pyx_v_childname = NULL; -- PyObject *__pyx_v_new_offset = NULL; -- PyObject *__pyx_v_t = NULL; -- char *__pyx_r; -- __Pyx_TraceDeclarations -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- Py_ssize_t __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- PyObject *__pyx_t_4 = NULL; -- int __pyx_t_5; -- int __pyx_t_6; -- int __pyx_t_7; -- long __pyx_t_8; -- char *__pyx_t_9; -- int __pyx_lineno = 0; -- const char *__pyx_filename = NULL; -- int __pyx_clineno = 0; -- __Pyx_RefNannySetupContext("_util_dtypestring", 0); -- __Pyx_TraceCall("_util_dtypestring", __pyx_f[2], 841, 0, __PYX_ERR(2, 841, __pyx_L1_error)); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":846 -- * -- * cdef dtype child -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * cdef tuple fields -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":847 -- * cdef dtype child -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * cdef tuple fields -- * -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":850 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- if (unlikely(__pyx_v_descr->names == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -- __PYX_ERR(2, 850, __pyx_L1_error) -- } -- __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; -- for (;;) { -- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 850, __pyx_L1_error) -- #else -- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 850, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- #endif -- __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * -- * for childname in descr.names: -- * fields = descr.fields[childname] # <<<<<<<<<<<<<< -- * child, new_offset = fields -- * -- */ -- if (unlikely(__pyx_v_descr->fields == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); -- __PYX_ERR(2, 851, __pyx_L1_error) -- } -- __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 851, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); -- __pyx_t_3 = 0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":852 -- * for childname in descr.names: -- * fields = descr.fields[childname] -- * child, new_offset = fields # <<<<<<<<<<<<<< -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- */ -- if (likely(__pyx_v_fields != Py_None)) { -- PyObject* sequence = __pyx_v_fields; -- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); -- if (unlikely(size != 2)) { -- if (size > 2) __Pyx_RaiseTooManyValuesError(2); -- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); -- __PYX_ERR(2, 852, __pyx_L1_error) -- } -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); -- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); -- __Pyx_INCREF(__pyx_t_3); -- __Pyx_INCREF(__pyx_t_4); -- #else -- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- #endif -- } else { -- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 852, __pyx_L1_error) -- } -- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); -- __pyx_t_3 = 0; -- __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":854 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 854, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 854, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 854, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 855, __pyx_L1_error) -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":854 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":857 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); -- if (!__pyx_t_7) { -- goto __pyx_L8_next_or; -- } else { -- } -- __pyx_t_7 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_L8_next_or:; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * # One could encode it in the format string and have Cython -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); -- if (__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_6 = __pyx_t_7; -- __pyx_L7_bool_binop_done:; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":857 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_6)) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":859 -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * # One could encode it in the format string and have Cython -- * # complain instead, BUT: < and > in format strings also imply -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 859, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 859, __pyx_L1_error) -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":857 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":869 -- * -- * # Output padding bytes -- * while offset[0] < new_offset: # <<<<<<<<<<<<<< -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- */ -- while (1) { -- __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 869, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 869, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 869, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (!__pyx_t_6) break; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":870 -- * # Output padding bytes -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< -- * f += 1 -- * offset[0] += 1 -- */ -- (__pyx_v_f[0]) = 0x78; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":871 -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte -- * f += 1 # <<<<<<<<<<<<<< -- * offset[0] += 1 -- * -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":872 -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- * offset[0] += 1 # <<<<<<<<<<<<<< -- * -- * offset[0] += child.itemsize -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":874 -- * offset[0] += 1 -- * -- * offset[0] += child.itemsize # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(child): -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":876 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); -- if (__pyx_t_6) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num # <<<<<<<<<<<<<< -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 877, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":878 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 879, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 879, __pyx_L1_error) -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":878 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":882 -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 882, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 882, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 882, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 98; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":883 -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 66; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":884 -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x68; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":885 -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 72; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":886 -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x69; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":887 -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 73; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":888 -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x6C; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":889 -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 76; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":890 -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x71; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":891 -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 81; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":892 -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x66; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":893 -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x64; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":894 -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x67; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":895 -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x66; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":896 -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x64; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":897 -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x67; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":898 -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (likely(__pyx_t_6)) { -- (__pyx_v_f[0]) = 79; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":900 -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * f += 1 -- * else: -- */ -- /*else*/ { -- __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 900, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 900, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 900, __pyx_L1_error) -- } -- __pyx_L15:; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":901 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * f += 1 # <<<<<<<<<<<<<< -- * else: -- * # Cython ignores struct boundary information ("T{...}"), -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":876 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- goto __pyx_L13; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":905 -- * # Cython ignores struct boundary information ("T{...}"), -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< -- * return f -- * -- */ -- /*else*/ { -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 905, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- } -- __pyx_L13:; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":850 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- } -- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":906 -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) -- * return f # <<<<<<<<<<<<<< -- * -- * -- */ -- __pyx_r = __pyx_v_f; -- goto __pyx_L0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":841 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_4); -- __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = NULL; -- __pyx_L0:; -- __Pyx_XDECREF((PyObject *)__pyx_v_child); -- __Pyx_XDECREF(__pyx_v_fields); -- __Pyx_XDECREF(__pyx_v_childname); -- __Pyx_XDECREF(__pyx_v_new_offset); -- __Pyx_XDECREF(__pyx_v_t); -- __Pyx_TraceReturn(Py_None, 0); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1021 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -39591,9 +38054,9 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("set_array_base", 0); -- __Pyx_TraceCall("set_array_base", __pyx_f[2], 1021, 0, __PYX_ERR(2, 1021, __pyx_L1_error)); -+ __Pyx_TraceCall("set_array_base", __pyx_f[2], 929, 0, __PYX_ERR(2, 929, __pyx_L1_error)); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":930 - * - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< -@@ -39602,7 +38065,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - Py_INCREF(__pyx_v_base); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1023 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":931 - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< -@@ -39611,7 +38074,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1021 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -39628,7 +38091,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyFinishContext(); - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1025 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -39646,9 +38109,9 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("get_array_base", 0); -- __Pyx_TraceCall("get_array_base", __pyx_f[2], 1025, 0, __PYX_ERR(2, 1025, __pyx_L1_error)); -+ __Pyx_TraceCall("get_array_base", __pyx_f[2], 933, 0, __PYX_ERR(2, 933, __pyx_L1_error)); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":934 - * - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< -@@ -39657,7 +38120,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - __pyx_v_base = PyArray_BASE(__pyx_v_arr); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1027 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -39667,7 +38130,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_t_1 = ((__pyx_v_base == NULL) != 0); - if (__pyx_t_1) { - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":936 - * base = PyArray_BASE(arr) - * if base is NULL: - * return None # <<<<<<<<<<<<<< -@@ -39678,7 +38141,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1027 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -39687,7 +38150,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - } - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1029 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":937 - * if base is NULL: - * return None - * return base # <<<<<<<<<<<<<< -@@ -39699,7 +38162,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = ((PyObject *)__pyx_v_base); - goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1025 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -39718,12 +38181,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - return __pyx_r; - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1033 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { -@@ -39742,13 +38205,13 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_array", 0); -- __Pyx_TraceCall("import_array", __pyx_f[2], 1033, 0, __PYX_ERR(2, 1033, __pyx_L1_error)); -+ __Pyx_TraceCall("import_array", __pyx_f[2], 941, 0, __PYX_ERR(2, 941, __pyx_L1_error)); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - { -@@ -39760,20 +38223,20 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":943 - * cdef inline int import_array() except -1: - * try: -- * _import_array() # <<<<<<<<<<<<<< -+ * __pyx_import_array() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") - */ -- __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1035, __pyx_L3_error) -+ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error) - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - } -@@ -39783,9 +38246,9 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1036 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":944 - * try: -- * _import_array() -+ * __pyx_import_array() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.multiarray failed to import") - * -@@ -39793,32 +38256,32 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1036, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1037 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1037, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1037, __pyx_L5_except_error) -+ __PYX_ERR(2, 945, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - __Pyx_XGIVEREF(__pyx_t_1); -@@ -39829,12 +38292,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_L8_try_end:; - } - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1033 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - /* function exit code */ -@@ -39853,7 +38316,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - return __pyx_r; - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1039 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -39877,9 +38340,9 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_umath", 0); -- __Pyx_TraceCall("import_umath", __pyx_f[2], 1039, 0, __PYX_ERR(2, 1039, __pyx_L1_error)); -+ __Pyx_TraceCall("import_umath", __pyx_f[2], 947, 0, __PYX_ERR(2, 947, __pyx_L1_error)); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -39895,16 +38358,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":949 - * cdef inline int import_umath() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1041, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error) - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -39918,7 +38381,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1042 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":950 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< -@@ -39928,28 +38391,28 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1042, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1043 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1043, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1043, __pyx_L5_except_error) -+ __PYX_ERR(2, 951, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -39964,7 +38427,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_L8_try_end:; - } - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1039 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -39988,7 +38451,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - return __pyx_r; - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1045 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -40012,9 +38475,9 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_ufunc", 0); -- __Pyx_TraceCall("import_ufunc", __pyx_f[2], 1045, 0, __PYX_ERR(2, 1045, __pyx_L1_error)); -+ __Pyx_TraceCall("import_ufunc", __pyx_f[2], 953, 0, __PYX_ERR(2, 953, __pyx_L1_error)); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -40030,16 +38493,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":955 - * cdef inline int import_ufunc() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1047, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error) - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -40053,35 +38516,38 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1048 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":956 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") -+ * - */ - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1048, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1049 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":957 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -+ * -+ * cdef extern from *: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1049, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1049, __pyx_L5_except_error) -+ __PYX_ERR(2, 957, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -40096,7 +38562,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __pyx_L8_try_end:; - } - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1045 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -40119,6 +38585,225 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_RefNannyFinishContext(); - return __pyx_r; - } -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_TraceDeclarations -+ __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("is_timedelta64_object", 0); -+ __Pyx_TraceCall("is_timedelta64_object", __pyx_f[2], 967, 0, __PYX_ERR(2, 967, __pyx_L1_error)); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":979 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_WriteUnraisable("numpy.is_timedelta64_object", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_TraceReturn(Py_None, 0); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_TraceDeclarations -+ __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("is_datetime64_object", 0); -+ __Pyx_TraceCall("is_datetime64_object", __pyx_f[2], 982, 0, __PYX_ERR(2, 982, __pyx_L1_error)); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":994 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_WriteUnraisable("numpy.is_datetime64_object", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_TraceReturn(Py_None, 0); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { -+ npy_datetime __pyx_r; -+ __Pyx_TraceDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_TraceCall("get_datetime64_value", __pyx_f[2], 997, 1, __PYX_ERR(2, 997, __pyx_L1_error)); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1004 -+ * also needed. That can be found using `get_datetime64_unit`. -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_WriteUnraisable("numpy.get_datetime64_value", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_TraceReturn(Py_None, 1); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { -+ npy_timedelta __pyx_r; -+ __Pyx_TraceDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_TraceCall("get_timedelta64_value", __pyx_f[2], 1007, 1, __PYX_ERR(2, 1007, __pyx_L1_error)); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1011 -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_WriteUnraisable("numpy.get_timedelta64_value", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_TraceReturn(Py_None, 1); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { -+ NPY_DATETIMEUNIT __pyx_r; -+ __Pyx_TraceDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_TraceCall("get_datetime64_unit", __pyx_f[2], 1014, 1, __PYX_ERR(2, 1014, __pyx_L1_error)); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1018 -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ * """ -+ * return (obj).obmeta.base # <<<<<<<<<<<<<< -+ */ -+ __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_WriteUnraisable("numpy.get_datetime64_unit", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 1); -+ __pyx_r = (NPY_DATETIMEUNIT) 0; -+ __pyx_L0:; -+ __Pyx_TraceReturn(Py_None, 1); -+ return __pyx_r; -+} - static struct __pyx_vtabstruct_4cylp_2cy_12CyClpSimplex_CyClpSimplex __pyx_vtable_4cylp_2cy_12CyClpSimplex_CyClpSimplex; - - static PyObject *__pyx_tp_new_4cylp_2cy_12CyClpSimplex_CyClpSimplex(PyTypeObject *t, PyObject *a, PyObject *k) { -@@ -40976,6 +39661,9 @@ static PyTypeObject __pyx_type_4cylp_2cy_12CyClpSimplex_CyClpSimplex = { - #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 - 0, /*tp_print*/ - #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyObject *__pyx_tp_new_4cylp_2cy_12CyClpSimplex_VarStatus(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { -@@ -41071,6 +39759,9 @@ static PyTypeObject __pyx_type_4cylp_2cy_12CyClpSimplex_VarStatus = { - #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 - 0, /*tp_print*/ - #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyMethodDef __pyx_methods[] = { -@@ -41147,8 +39838,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_D, __pyx_k_D, sizeof(__pyx_k_D), 0, 0, 1, 1}, - {&__pyx_n_s_DualPivotPythonBase, __pyx_k_DualPivotPythonBase, sizeof(__pyx_k_DualPivotPythonBase), 0, 0, 1, 1}, - {&__pyx_kp_s_Expected_a_CyLPModel_as_an_argum, __pyx_k_Expected_a_CyLPModel_as_an_argum, sizeof(__pyx_k_Expected_a_CyLPModel_as_an_argum), 0, 0, 1, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, - {&__pyx_n_s_Hessian, __pyx_k_Hessian, sizeof(__pyx_k_Hessian), 0, 0, 1, 1}, - {&__pyx_kp_s_Hessian_can_be_set_to_a_matrix_t, __pyx_k_Hessian_can_be_set_to_a_matrix_t, sizeof(__pyx_k_Hessian_can_be_set_to_a_matrix_t), 0, 0, 1, 0}, - {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, -@@ -41159,7 +39848,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_kp_s_No_such_constraint_s, __pyx_k_No_such_constraint_s, sizeof(__pyx_k_No_such_constraint_s), 0, 0, 1, 0}, - {&__pyx_kp_s_No_such_variable_s, __pyx_k_No_such_variable_s, sizeof(__pyx_k_No_such_variable_s), 0, 0, 1, 0}, - {&__pyx_kp_s_No_write_access_for_s_or_an_inte, __pyx_k_No_write_access_for_s_or_an_inte, sizeof(__pyx_k_No_write_access_for_s_or_an_inte), 0, 0, 1, 0}, -- {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, - {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1}, - {&__pyx_n_s_PivotPythonBase, __pyx_k_PivotPythonBase, sizeof(__pyx_k_PivotPythonBase), 0, 0, 1, 1}, - {&__pyx_kp_s_Presolve_says_problem_infeasible, __pyx_k_Presolve_says_problem_infeasible, sizeof(__pyx_k_Presolve_says_problem_infeasible), 0, 0, 1, 0}, -@@ -41167,7 +39855,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_kp_u_Run_CLP_s_initalPrimalSolve_The_2, __pyx_k_Run_CLP_s_initalPrimalSolve_The_2, sizeof(__pyx_k_Run_CLP_s_initalPrimalSolve_The_2), 0, 1, 0, 0}, - {&__pyx_kp_u_Run_CLP_s_initialSolve_It_does, __pyx_k_Run_CLP_s_initialSolve_It_does, sizeof(__pyx_k_Run_CLP_s_initialSolve_It_does), 0, 1, 0, 0}, - {&__pyx_kp_u_Runs_CLP_dual_simplex_Usage_Exa, __pyx_k_Runs_CLP_dual_simplex_Usage_Exa, sizeof(__pyx_k_Runs_CLP_dual_simplex_Usage_Exa), 0, 1, 0, 0}, -- {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, - {&__pyx_kp_u_Set_the_coefficient_matrix_cons, __pyx_k_Set_the_coefficient_matrix_cons, sizeof(__pyx_k_Set_the_coefficient_matrix_cons), 0, 1, 0, 0}, - {&__pyx_kp_u_Set_the_status_of_a_constraint, __pyx_k_Set_the_status_of_a_constraint, sizeof(__pyx_k_Set_the_status_of_a_constraint), 0, 1, 0, 0}, - {&__pyx_kp_u_Set_the_status_of_a_variable_ar, __pyx_k_Set_the_status_of_a_variable_ar, sizeof(__pyx_k_Set_the_status_of_a_variable_ar), 0, 1, 0, 0}, -@@ -41180,7 +39867,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_kp_s_To_remove_a_variable_you_must_se, __pyx_k_To_remove_a_variable_you_must_se, sizeof(__pyx_k_To_remove_a_variable_you_must_se), 0, 0, 1, 0}, - {&__pyx_kp_s_To_set_the_objective_function_of, __pyx_k_To_set_the_objective_function_of, sizeof(__pyx_k_To_set_the_objective_function_of), 0, 0, 1, 0}, - {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, -- {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_n_s_VarStatus, __pyx_k_VarStatus, sizeof(__pyx_k_VarStatus), 0, 0, 1, 1}, - {&__pyx_kp_s_Variables_should_have_the_same_d, __pyx_k_Variables_should_have_the_same_d, sizeof(__pyx_k_Variables_should_have_the_same_d), 0, 0, 1, 0}, - {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0}, -@@ -41334,8 +40020,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, - {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, - {&__pyx_n_s_ncol, __pyx_k_ncol, sizeof(__pyx_k_ncol), 0, 0, 1, 1}, -- {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, -- {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, - {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1}, - {&__pyx_n_s_newNumberColumns, __pyx_k_newNumberColumns, sizeof(__pyx_k_newNumberColumns), 0, 0, 1, 1}, - {&__pyx_n_s_newNumberRows, __pyx_k_newNumberRows, sizeof(__pyx_k_newNumberRows), 0, 0, 1, 1}, -@@ -41443,7 +40127,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_toarray, __pyx_k_toarray, sizeof(__pyx_k_toarray), 0, 0, 1, 1}, - {&__pyx_n_s_tocoo, __pyx_k_tocoo, sizeof(__pyx_k_tocoo), 0, 0, 1, 1}, - {&__pyx_n_s_tryPlusMinusOne, __pyx_k_tryPlusMinusOne, sizeof(__pyx_k_tryPlusMinusOne), 0, 0, 1, 1}, -- {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, - {&__pyx_kp_s_unrecognised_extension_s, __pyx_k_unrecognised_extension_s, sizeof(__pyx_k_unrecognised_extension_s), 0, 0, 1, 0}, - {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1}, - {&__pyx_n_s_updateStatus, __pyx_k_updateStatus, sizeof(__pyx_k_updateStatus), 0, 0, 1, 1}, -@@ -41491,8 +40174,6 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 314, __pyx_L1_error) - __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 1500, __pyx_L1_error) - __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(0, 1807, __pyx_L1_error) -- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error) -- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 855, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -@@ -41730,82 +40411,27 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_GOTREF(__pyx_slice__26); - __Pyx_GIVEREF(__pyx_slice__26); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__29); -- __Pyx_GIVEREF(__pyx_tuple__29); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__30); -- __Pyx_GIVEREF(__pyx_tuple__30); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__31); -- __Pyx_GIVEREF(__pyx_tuple__31); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__32); -- __Pyx_GIVEREF(__pyx_tuple__32); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(2, 879, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__33); -- __Pyx_GIVEREF(__pyx_tuple__33); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1037 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(2, 1037, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__34); -- __Pyx_GIVEREF(__pyx_tuple__34); -+ __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(2, 945, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__29); -+ __Pyx_GIVEREF(__pyx_tuple__29); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1043 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(2, 1043, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__35); -- __Pyx_GIVEREF(__pyx_tuple__35); -+ __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(2, 951, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__30); -+ __Pyx_GIVEREF(__pyx_tuple__30); - - /* "cylp/cy/CyClpSimplex.pyx":2178 - * -@@ -41814,10 +40440,10 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - * ''' - * Return a model example to be used in doctests. - */ -- __pyx_tuple__36 = PyTuple_Pack(14, __pyx_n_s_np, __pyx_n_s_CyLPModel, __pyx_n_s_CyLPArray, __pyx_n_s_CyClpSimplex, __pyx_n_s_model, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_A, __pyx_n_s_B, __pyx_n_s_D, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_x_u, __pyx_n_s_c); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 2178, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__36); -- __Pyx_GIVEREF(__pyx_tuple__36); -- __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(0, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cylp_cy_CyClpSimplex_pyx, __pyx_n_s_getModelExample, 2178, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 2178, __pyx_L1_error) -+ __pyx_tuple__31 = PyTuple_Pack(14, __pyx_n_s_np, __pyx_n_s_CyLPModel, __pyx_n_s_CyLPArray, __pyx_n_s_CyClpSimplex, __pyx_n_s_model, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_A, __pyx_n_s_B, __pyx_n_s_D, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_x_u, __pyx_n_s_c); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 2178, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__31); -+ __Pyx_GIVEREF(__pyx_tuple__31); -+ __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(0, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cylp_cy_CyClpSimplex_pyx, __pyx_n_s_getModelExample, 2178, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 2178, __pyx_L1_error) - - /* "cylp/cy/CyClpSimplex.pyx":2212 - * -@@ -41826,20 +40452,20 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - * ''' - * Return full path to an MPS example file for doctests - */ -- __pyx_tuple__37 = PyTuple_Pack(3, __pyx_n_s_os, __pyx_n_s_inspect, __pyx_n_s_curpath); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 2212, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__37); -- __Pyx_GIVEREF(__pyx_tuple__37); -- __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cylp_cy_CyClpSimplex_pyx, __pyx_n_s_getMpsExample, 2212, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 2212, __pyx_L1_error) -+ __pyx_tuple__32 = PyTuple_Pack(3, __pyx_n_s_os, __pyx_n_s_inspect, __pyx_n_s_curpath); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 2212, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__32); -+ __Pyx_GIVEREF(__pyx_tuple__32); -+ __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cylp_cy_CyClpSimplex_pyx, __pyx_n_s_getMpsExample, 2212, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 2212, __pyx_L1_error) - - /* "(tree fragment)":1 - * def __pyx_unpickle_VarStatus(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * cdef object __pyx_PickleError - * cdef object __pyx_result - */ -- __pyx_tuple__38 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(1, 1, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__38); -- __Pyx_GIVEREF(__pyx_tuple__38); -- __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_VarStatus, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(1, 1, __pyx_L1_error) -+ __pyx_tuple__33 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(1, 1, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__33); -+ __Pyx_GIVEREF(__pyx_tuple__33); -+ __pyx_codeobj__28 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_VarStatus, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__28)) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -42017,18 +40643,38 @@ static int __Pyx_modinit_type_import_code(void) { - if (!__pyx_ptype_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase) __PYX_ERR(7, 67, __pyx_L1_error) - __pyx_vtabptr_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase = (struct __pyx_vtabstruct_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase)) __PYX_ERR(7, 67, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) -+ __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error) -- __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error) -- __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error) -+ __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error) -+ __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error) -- __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 917, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error) -+ __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error) -+ __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error) -+ __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error) -+ __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error) -+ __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error) -+ __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error) -+ __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error) -+ __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error) -+ __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error) -+ __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error) -+ __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpDualRowPivotBase"); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); -@@ -42315,11 +40961,9 @@ if (!__Pyx_RefNanny) { - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ -- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS -- #ifdef WITH_THREAD /* Python build with threading support? */ -+ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - PyEval_InitThreads(); - #endif -- #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; -@@ -43083,12 +41727,12 @@ if (!__Pyx_RefNanny) { - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1045 -- * raise ImportError("numpy.core.umath failed to import") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - __Pyx_TraceReturn(Py_None, 0); - -@@ -43367,10 +42011,9 @@ static int __Pyx_TraceSetupAndCall(PyCodeObject** code, - (*frame)->f_tstate = tstate; - #endif - } -- __Pyx_PyFrame_SetLineNumber(*frame, firstlineno); -+ __Pyx_PyFrame_SetLineNumber(*frame, firstlineno); - retval = 1; -- tstate->tracing++; -- tstate->use_tracing = 0; -+ __Pyx_EnterTracing(tstate); - __Pyx_ErrFetchInState(tstate, &type, &value, &traceback); - #if CYTHON_TRACE - if (tstate->c_tracefunc) -@@ -43378,12 +42021,10 @@ static int __Pyx_TraceSetupAndCall(PyCodeObject** code, - if (retval && tstate->c_profilefunc) - #endif - retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0; -- tstate->use_tracing = (tstate->c_profilefunc || -- (CYTHON_TRACE && tstate->c_tracefunc)); -- tstate->tracing--; -+ __Pyx_LeaveTracing(tstate); - if (retval) { - __Pyx_ErrRestoreInState(tstate, type, value, traceback); -- return tstate->use_tracing && retval; -+ return __Pyx_IsTracing(tstate, 0, 0) && retval; - } else { - Py_XDECREF(type); - Py_XDECREF(value); -@@ -43552,7 +42193,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #if CYTHON_COMPILING_IN_CPYTHON - static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; -- ternaryfunc call = func->ob_type->tp_call; -+ ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -@@ -43745,7 +42386,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec - if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { - return __Pyx_PyObject_CallMethO(func, arg); - #if CYTHON_FAST_PYCCALL -- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { -+ } else if (__Pyx_PyFastCFunction_Check(func)) { - return __Pyx_PyCFunction_FastCall(func, &arg, 1); - #endif - } -@@ -45623,11 +44264,6 @@ static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject - } - } - --/* RaiseNoneIterError */ -- static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); --} -- - /* PyObject_GenericGetAttrNoDict */ - #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 - static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { -@@ -45935,7 +44571,7 @@ static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int - } - if (!use_cline) { - c_line = 0; -- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); -+ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; -@@ -46032,30 +44668,31 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { -- PyCodeObject *py_code = 0; -- PyObject *py_srcfile = 0; -- PyObject *py_funcname = 0; -+ PyCodeObject *py_code = NULL; -+ PyObject *py_funcname = NULL; - #if PY_MAJOR_VERSION < 3 -+ PyObject *py_srcfile = NULL; - py_srcfile = PyString_FromString(filename); -- #else -- py_srcfile = PyUnicode_FromString(filename); -- #endif - if (!py_srcfile) goto bad; -+ #endif - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; -+ funcname = PyUnicode_AsUTF8(py_funcname); -+ if (!funcname) goto bad; - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); -- #else -- py_funcname = PyUnicode_FromString(funcname); -+ if (!py_funcname) goto bad; - #endif - } -- if (!py_funcname) goto bad; -+ #if PY_MAJOR_VERSION < 3 - py_code = __Pyx_PyCode_New( - 0, - 0, -@@ -46074,11 +44711,16 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - __pyx_empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); -- Py_DECREF(py_funcname); -+ #else -+ py_code = PyCode_NewEmpty(filename, funcname, py_line); -+ #endif -+ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline - return py_code; - bad: -- Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -+ #if PY_MAJOR_VERSION < 3 -+ Py_XDECREF(py_srcfile); -+ #endif - return NULL; - } - static void __Pyx_AddTraceback(const char *funcname, int c_line, -@@ -46113,7 +44755,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - #if PY_MAJOR_VERSION < 3 - static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { - if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); -- if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); - PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); - return -1; - } -@@ -46125,7 +44766,6 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - return; - } - if ((0)) {} -- else if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); - view->obj = NULL; - Py_DECREF(obj); - } -@@ -46181,99 +44821,6 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - return t; - } - --/* CIntToPy */ -- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(long) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(long) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(long) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(long), -- little, !is_unsigned); -- } --} -- --/* CIntToPy */ -- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(int) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(int) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(int) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(int), -- little, !is_unsigned); -- } --} -- --/* CIntToPy */ -- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__IClpSimplex_3a__3a_Status(enum IClpSimplex::Status value) { -- const enum IClpSimplex::Status neg_one = (enum IClpSimplex::Status) ((enum IClpSimplex::Status) 0 - (enum IClpSimplex::Status) 1), const_zero = (enum IClpSimplex::Status) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(enum IClpSimplex::Status) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(enum IClpSimplex::Status) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum IClpSimplex::Status) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(enum IClpSimplex::Status) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum IClpSimplex::Status) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(enum IClpSimplex::Status), -- little, !is_unsigned); -- } --} -- - /* Declarations */ - #if CYTHON_CCOMPLEX - #ifdef __cplusplus -@@ -46582,40 +45129,16 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - #endif - #endif - --/* CIntToPy */ -- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { -- const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(enum NPY_TYPES) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(enum NPY_TYPES) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), -- little, !is_unsigned); -- } --} -- - /* CIntFromPy */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -46802,9 +45325,54 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - return (int) -1; - } - -+/* CIntToPy */ -+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif -+ const int is_unsigned = neg_one > const_zero; -+ if (is_unsigned) { -+ if (sizeof(long) < sizeof(long)) { -+ return PyInt_FromLong((long) value); -+ } else if (sizeof(long) <= sizeof(unsigned long)) { -+ return PyLong_FromUnsignedLong((unsigned long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+#endif -+ } -+ } else { -+ if (sizeof(long) <= sizeof(long)) { -+ return PyInt_FromLong((long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -+ return PyLong_FromLongLong((PY_LONG_LONG) value); -+#endif -+ } -+ } -+ { -+ int one = 1; int little = (int)*(unsigned char *)&one; -+ unsigned char *bytes = (unsigned char *)&value; -+ return _PyLong_FromByteArray(bytes, sizeof(long), -+ little, !is_unsigned); -+ } -+} -+ - /* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -46991,9 +45559,54 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - return (long) -1; - } - -+/* CIntToPy */ -+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif -+ const int is_unsigned = neg_one > const_zero; -+ if (is_unsigned) { -+ if (sizeof(int) < sizeof(long)) { -+ return PyInt_FromLong((long) value); -+ } else if (sizeof(int) <= sizeof(unsigned long)) { -+ return PyLong_FromUnsignedLong((unsigned long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+#endif -+ } -+ } else { -+ if (sizeof(int) <= sizeof(long)) { -+ return PyInt_FromLong((long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ return PyLong_FromLongLong((PY_LONG_LONG) value); -+#endif -+ } -+ } -+ { -+ int one = 1; int little = (int)*(unsigned char *)&one; -+ unsigned char *bytes = (unsigned char *)&value; -+ return _PyLong_FromByteArray(bytes, sizeof(int), -+ little, !is_unsigned); -+ } -+} -+ - /* CIntFromPy */ - static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { -- const size_t neg_one = (size_t) ((size_t) 0 - (size_t) 1), const_zero = (size_t) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const size_t neg_one = (size_t) -1, const_zero = (size_t) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -47180,9 +45793,54 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - return (size_t) -1; - } - -+/* CIntToPy */ -+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__IClpSimplex_3a__3a_Status(enum IClpSimplex::Status value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const enum IClpSimplex::Status neg_one = (enum IClpSimplex::Status) -1, const_zero = (enum IClpSimplex::Status) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif -+ const int is_unsigned = neg_one > const_zero; -+ if (is_unsigned) { -+ if (sizeof(enum IClpSimplex::Status) < sizeof(long)) { -+ return PyInt_FromLong((long) value); -+ } else if (sizeof(enum IClpSimplex::Status) <= sizeof(unsigned long)) { -+ return PyLong_FromUnsignedLong((unsigned long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(enum IClpSimplex::Status) <= sizeof(unsigned PY_LONG_LONG)) { -+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+#endif -+ } -+ } else { -+ if (sizeof(enum IClpSimplex::Status) <= sizeof(long)) { -+ return PyInt_FromLong((long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(enum IClpSimplex::Status) <= sizeof(PY_LONG_LONG)) { -+ return PyLong_FromLongLong((PY_LONG_LONG) value); -+#endif -+ } -+ } -+ { -+ int one = 1; int little = (int)*(unsigned char *)&one; -+ unsigned char *bytes = (unsigned char *)&value; -+ return _PyLong_FromByteArray(bytes, sizeof(enum IClpSimplex::Status), -+ little, !is_unsigned); -+ } -+} -+ - /* CIntFromPy */ - static CYTHON_INLINE enum IClpSimplex::Status __Pyx_PyInt_As_enum__IClpSimplex_3a__3a_Status(PyObject *x) { -- const enum IClpSimplex::Status neg_one = (enum IClpSimplex::Status) ((enum IClpSimplex::Status) 0 - (enum IClpSimplex::Status) 1), const_zero = (enum IClpSimplex::Status) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const enum IClpSimplex::Status neg_one = (enum IClpSimplex::Status) -1, const_zero = (enum IClpSimplex::Status) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -47371,7 +46029,14 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - - /* CIntFromPy */ - static CYTHON_INLINE Py_intptr_t __Pyx_PyInt_As_Py_intptr_t(PyObject *x) { -- const Py_intptr_t neg_one = (Py_intptr_t) ((Py_intptr_t) 0 - (Py_intptr_t) 1), const_zero = (Py_intptr_t) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const Py_intptr_t neg_one = (Py_intptr_t) -1, const_zero = (Py_intptr_t) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -47959,6 +46624,23 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_DECREF(x); - return ival; - } -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { -+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { -+ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); -+#if PY_MAJOR_VERSION < 3 -+ } else if (likely(PyInt_CheckExact(o))) { -+ return PyInt_AS_LONG(o); -+#endif -+ } else { -+ Py_ssize_t ival; -+ PyObject *x; -+ x = PyNumber_Index(o); -+ if (!x) return -1; -+ ival = PyInt_AsLong(x); -+ Py_DECREF(x); -+ return ival; -+ } -+} - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); - } -diff --git a/cylp/cy/CyCoinIndexedVector.cpp b/cylp/cy/CyCoinIndexedVector.cpp -index d2f3446..c247ad2 100644 ---- a/cylp/cy/CyCoinIndexedVector.cpp -+++ b/cylp/cy/CyCoinIndexedVector.cpp -@@ -1,14 +1,16 @@ --/* Generated by Cython 0.29.12 */ -+/* Generated by Cython 0.29.25 */ - -+#ifndef PY_SSIZE_T_CLEAN - #define PY_SSIZE_T_CLEAN -+#endif /* PY_SSIZE_T_CLEAN */ - #include "Python.h" - #ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. - #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. - #else --#define CYTHON_ABI "0_29_12" --#define CYTHON_HEX_VERSION 0x001D0CF0 -+#define CYTHON_ABI "0_29_25" -+#define CYTHON_HEX_VERSION 0x001D19F0 - #define CYTHON_FUTURE_DIVISION 0 - #include - #ifndef offsetof -@@ -155,7 +157,7 @@ - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif -- #if PY_VERSION_HEX < 0x030300F0 -+ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) -@@ -174,7 +176,7 @@ - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL -- #define CYTHON_FAST_PYCALL 1 -+ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1) - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) -@@ -193,7 +195,9 @@ - #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) - #endif - #if CYTHON_USE_PYLONG_INTERNALS -- #include "longintrepr.h" -+ #if PY_MAJOR_VERSION < 3 -+ #include "longintrepr.h" -+ #endif - #undef SHIFT - #undef BASE - #undef MASK -@@ -324,9 +328,68 @@ class __Pyx_FakeReference { - #define __Pyx_DefaultClassType PyClass_Type - #else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" --#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 -- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ -- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -+ #define __Pyx_DefaultClassType PyType_Type -+#if PY_VERSION_HEX >= 0x030B00A1 -+ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, -+ PyObject *code, PyObject *c, PyObject* n, PyObject *v, -+ PyObject *fv, PyObject *cell, PyObject* fn, -+ PyObject *name, int fline, PyObject *lnos) { -+ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; -+ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; -+ const char *fn_cstr=NULL; -+ const char *name_cstr=NULL; -+ PyCodeObject* co=NULL; -+ PyObject *type, *value, *traceback; -+ PyErr_Fetch(&type, &value, &traceback); -+ if (!(kwds=PyDict_New())) goto end; -+ if (!(argcount=PyLong_FromLong(a))) goto end; -+ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; -+ if (!(posonlyargcount=PyLong_FromLong(0))) goto end; -+ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; -+ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; -+ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; -+ if (!(nlocals=PyLong_FromLong(l))) goto end; -+ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; -+ if (!(stacksize=PyLong_FromLong(s))) goto end; -+ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; -+ if (!(flags=PyLong_FromLong(f))) goto end; -+ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; -+ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; -+ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; -+ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; -+ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; -+ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here -+ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; -+ Py_XDECREF((PyObject*)co); -+ co = (PyCodeObject*)call_result; -+ call_result = NULL; -+ if (0) { -+ cleanup_code_too: -+ Py_XDECREF((PyObject*)co); -+ co = NULL; -+ } -+ end: -+ Py_XDECREF(kwds); -+ Py_XDECREF(argcount); -+ Py_XDECREF(posonlyargcount); -+ Py_XDECREF(kwonlyargcount); -+ Py_XDECREF(nlocals); -+ Py_XDECREF(stacksize); -+ Py_XDECREF(replace); -+ Py_XDECREF(call_result); -+ Py_XDECREF(empty); -+ if (type) { -+ PyErr_Restore(type, value, traceback); -+ } -+ return co; -+ } - #else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -@@ -440,8 +503,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #endif - #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 -+ #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) -+ #else -+ #define __Pyx_PyUnicode_READY(op) (0) -+ #endif - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) -@@ -449,7 +516,15 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) -+ #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) -+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) -+ #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) -+ #endif -+ #else -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) -+ #endif - #else - #define CYTHON_PEP393_ENABLED 0 - #define PyUnicode_1BYTE_KIND 1 -@@ -498,8 +573,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define PyString_Type PyUnicode_Type - #define PyString_Check PyUnicode_Check - #define PyString_CheckExact PyUnicode_CheckExact -+#ifndef PyObject_Unicode - #define PyObject_Unicode PyObject_Str - #endif -+#endif - #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) - #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) -@@ -510,6 +587,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #ifndef PySet_CheckExact - #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) - #endif -+#if PY_VERSION_HEX >= 0x030900A4 -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) -+#else -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) -+#endif - #if CYTHON_ASSUME_SAFE_MACROS - #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) - #else -@@ -543,13 +627,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong -- #define __Pyx_PyInt_AsHash_t PyInt_AsLong -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t - #else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t -- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t - #endif - #if PY_MAJOR_VERSION >= 3 -- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) -+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) - #else - #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) - #endif -@@ -590,11 +674,10 @@ static CYTHON_INLINE float __PYX_NAN() { - #define __Pyx_truncl truncl - #endif - -- -+#define __PYX_MARK_ERR_POS(f_index, lineno) \ -+ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } - #define __PYX_ERR(f_index, lineno, Ln_error) \ --{ \ -- __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ --} -+ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } - - #ifndef __PYX_EXTERN_C - #ifdef __cplusplus -@@ -706,6 +789,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); - static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); - #if CYTHON_ASSUME_SAFE_MACROS - #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) - #else -@@ -819,7 +903,7 @@ static const char *__pyx_filename; - - static const char *__pyx_f[] = { - "stringsource", -- "cylp\\cy\\CyCoinIndexedVector.pyx", -+ "cylp/cy/CyCoinIndexedVector.pyx", - "type.pxd", - }; - -@@ -984,6 +1068,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #ifndef Py_MEMBER_SIZE - #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) - #endif -+#if CYTHON_FAST_PYCALL - static size_t __pyx_pyframe_localsplus_offset = 0; - #include "frameobject.h" - #define __Pxy_PyFrame_Initialize_Offsets()\ -@@ -991,6 +1076,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) - #define __Pyx_PyFrame_GetLocalsplus(frame)\ - (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) -+#endif // CYTHON_FAST_PYCALL - #endif - - /* PyObjectCall.proto */ -@@ -1075,6 +1161,17 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - /* SetVTable.proto */ - static int __Pyx_SetVtable(PyObject *dict, void *vtable); - -+/* PyErrExceptionMatches.proto */ -+#if CYTHON_FAST_THREAD_STATE -+#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) -+static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); -+#else -+#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) -+#endif -+ -+/* PyObjectGetAttrStrNoError.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); -+ - /* SetupReduce.proto */ - static int __Pyx_setup_reduce(PyObject* type_obj); - -@@ -1115,12 +1212,17 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); - static void __Pyx_AddTraceback(const char *funcname, int c_line, - int py_line, const char *filename); - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -+/* GCCDiagnostics.proto */ -+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -+#define __Pyx_HAS_GCC_DIAGNOSTIC -+#endif - - /* CIntFromPy.proto */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); - -+/* CIntToPy.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -+ - /* CIntToPy.proto */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); - -@@ -1395,6 +1497,9 @@ static PyObject *__pyx_f_4cylp_2cy_19CyCoinIndexedVector_19CyCoinIndexedVector_r - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("reserve", 0); - /* Check if called by wrapper */ - if (unlikely(__pyx_skip_dispatch)) ; -@@ -1495,6 +1600,9 @@ static PyObject *__pyx_pf_4cylp_2cy_19CyCoinIndexedVector_19CyCoinIndexedVector_ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("reserve", 0); - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4cylp_2cy_19CyCoinIndexedVector_19CyCoinIndexedVector_reserve(__pyx_v_self, __pyx_v_n, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 38, __pyx_L1_error) -@@ -1540,6 +1648,9 @@ static PyObject *__pyx_pf_4cylp_2cy_19CyCoinIndexedVector_19CyCoinIndexedVector_ - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__getitem__", 0); - - /* "cylp/cy/CyCoinIndexedVector.pyx":42 -@@ -1601,6 +1712,9 @@ static int __pyx_pf_4cylp_2cy_19CyCoinIndexedVector_19CyCoinIndexedVector_8__set - int __pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setitem__", 0); - - /* "cylp/cy/CyCoinIndexedVector.pyx":45 -@@ -1754,6 +1868,9 @@ static PyObject *__pyx_f_4cylp_2cy_19CyCoinIndexedVector_19CyCoinIndexedVector_a - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - PyObject *__pyx_t_6 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("assign", 0); - /* Check if called by wrapper */ - if (unlikely(__pyx_skip_dispatch)) ; -@@ -1872,6 +1989,9 @@ static char __pyx_doc_4cylp_2cy_19CyCoinIndexedVector_19CyCoinIndexedVector_14as - static PyObject *__pyx_pw_4cylp_2cy_19CyCoinIndexedVector_19CyCoinIndexedVector_15assign(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_ind = 0; - PyObject *__pyx_v_other = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("assign (wrapper)", 0); -@@ -1932,6 +2052,9 @@ static PyObject *__pyx_pf_4cylp_2cy_19CyCoinIndexedVector_19CyCoinIndexedVector_ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("assign", 0); - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_4cylp_2cy_19CyCoinIndexedVector_19CyCoinIndexedVector_assign(__pyx_v_self, __pyx_v_ind, __pyx_v_other, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 58, __pyx_L1_error) -@@ -2086,6 +2209,9 @@ static PyObject *__pyx_pf_4cylp_2cy_19CyCoinIndexedVector_19CyCoinIndexedVector_ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyCoinIndexedVector.pyx":71 -@@ -2146,6 +2272,9 @@ static int __pyx_pf_4cylp_2cy_19CyCoinIndexedVector_19CyCoinIndexedVector_9nElem - int __pyx_r; - __Pyx_RefNannyDeclarations - int __pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__set__", 0); - - /* "cylp/cy/CyCoinIndexedVector.pyx":74 -@@ -2201,6 +2330,9 @@ static PyObject *__pyx_pf_4cylp_2cy_19CyCoinIndexedVector_19CyCoinIndexedVector_ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyCoinIndexedVector.pyx":78 -@@ -2257,6 +2389,9 @@ static PyObject *__pyx_pf_4cylp_2cy_19CyCoinIndexedVector_19CyCoinIndexedVector_ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -2312,6 +2447,9 @@ static PyObject *__pyx_pf_4cylp_2cy_19CyCoinIndexedVector_19CyCoinIndexedVector_ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -2458,7 +2596,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVect - sizeof(struct __pyx_obj_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -2511,6 +2654,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVect - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyMethodDef __pyx_methods[] = { -@@ -2656,6 +2805,9 @@ static int __Pyx_modinit_function_export_code(void) { - - static int __Pyx_modinit_type_init_code(void) { - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); - /*--- Type init code ---*/ - __pyx_vtabptr_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector = &__pyx_vtable_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector; -@@ -2683,6 +2835,9 @@ static int __Pyx_modinit_type_init_code(void) { - static int __Pyx_modinit_type_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); - /*--- Type import code ---*/ - __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 9, __pyx_L1_error) -@@ -2721,17 +2876,19 @@ static int __Pyx_modinit_function_import_code(void) { - } - - --#if PY_MAJOR_VERSION < 3 --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC void --#else -+#ifndef CYTHON_NO_PYINIT_EXPORT - #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#elif PY_MAJOR_VERSION < 3 -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" void -+#else -+#define __Pyx_PyMODINIT_FUNC void - #endif - #else --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC PyObject * -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * - #else --#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#define __Pyx_PyMODINIT_FUNC PyObject * - #endif - #endif - -@@ -2813,6 +2970,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_CyCoinIndexedVector(PyObject *__py - #endif - { - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannyDeclarations - #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m) { -@@ -2860,11 +3020,9 @@ if (!__Pyx_RefNanny) { - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ -- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS -- #ifdef WITH_THREAD /* Python build with threading support? */ -+ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - PyEval_InitThreads(); - #endif -- #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; -@@ -2901,15 +3059,15 @@ if (!__Pyx_RefNanny) { - } - #endif - /*--- Builtin init code ---*/ -- if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Constants init code ---*/ -- if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Global type/function init code ---*/ - (void)__Pyx_modinit_global_init_code(); - (void)__Pyx_modinit_variable_export_code(); - (void)__Pyx_modinit_function_export_code(); -- if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; -- if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) -+ if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) - (void)__Pyx_modinit_variable_import_code(); - (void)__Pyx_modinit_function_import_code(); - /*--- Execution code ---*/ -@@ -3235,7 +3393,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #if CYTHON_COMPILING_IN_CPYTHON - static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; -- ternaryfunc call = func->ob_type->tp_call; -+ ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -@@ -3322,7 +3480,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec - if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { - return __Pyx_PyObject_CallMethO(func, arg); - #if CYTHON_FAST_PYCCALL -- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { -+ } else if (__Pyx_PyFastCFunction_Check(func)) { - return __Pyx_PyCFunction_FastCall(func, &arg, 1); - #endif - } -@@ -3376,7 +3534,7 @@ static int __Pyx_ParseOptionalKeywords( - } - name = first_kw_arg; - #if PY_MAJOR_VERSION < 3 -- if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { -+ if (likely(PyString_Check(key))) { - while (*name) { - if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) - && _PyString_Eq(**name, key)) { -@@ -3403,7 +3561,7 @@ static int __Pyx_ParseOptionalKeywords( - while (*name) { - int cmp = (**name == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 -- (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : -+ (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**name, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; -@@ -3419,7 +3577,7 @@ static int __Pyx_ParseOptionalKeywords( - while (argname != first_kw_arg) { - int cmp = (**argname == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 -- (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : -+ (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**argname, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; -@@ -3707,6 +3865,53 @@ static int __Pyx_SetVtable(PyObject *dict, void *vtable) { - return -1; - } - -+/* PyErrExceptionMatches */ -+#if CYTHON_FAST_THREAD_STATE -+static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { -+ Py_ssize_t i, n; -+ n = PyTuple_GET_SIZE(tuple); -+#if PY_MAJOR_VERSION >= 3 -+ for (i=0; icurexc_type; -+ if (exc_type == err) return 1; -+ if (unlikely(!exc_type)) return 0; -+ if (unlikely(PyTuple_Check(err))) -+ return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); -+ return __Pyx_PyErr_GivenExceptionMatches(exc_type, err); -+} -+#endif -+ -+/* PyObjectGetAttrStrNoError */ -+static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { -+ __Pyx_PyThreadState_declare -+ __Pyx_PyThreadState_assign -+ if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) -+ __Pyx_PyErr_Clear(); -+} -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { -+ PyObject *result; -+#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 -+ PyTypeObject* tp = Py_TYPE(obj); -+ if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { -+ return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); -+ } -+#endif -+ result = __Pyx_PyObject_GetAttrStr(obj, attr_name); -+ if (unlikely(!result)) { -+ __Pyx_PyObject_GetAttrStr_ClearAttributeError(); -+ } -+ return result; -+} -+ - /* SetupReduce */ - static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { - int ret; -@@ -3734,43 +3939,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { - PyObject *setstate = NULL; - PyObject *setstate_cython = NULL; - #if CYTHON_USE_PYTYPE_LOOKUP -- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #else -- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #endif - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #else -- object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #endif -- reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; -+ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; - if (reduce_ex == object_reduce_ex) { - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #else -- object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #endif -- reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; -+ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; - if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { -- reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; -+ reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); -+ if (likely(reduce_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (reduce == object_reduce || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); - if (!setstate) PyErr_Clear(); - if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { -- setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; -+ setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); -+ if (likely(setstate_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (!setstate || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - } - PyType_Modified((PyTypeObject*)type_obj); - } - } -- goto GOOD; --BAD: -+ goto __PYX_GOOD; -+__PYX_BAD: - if (!PyErr_Occurred()) - PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); - ret = -1; --GOOD: -+__PYX_GOOD: - #if !CYTHON_USE_PYTYPE_LOOKUP - Py_XDECREF(object_reduce); - Py_XDECREF(object_reduce_ex); -@@ -3846,7 +4059,7 @@ static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, - - /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK --static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { -+static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { - PyObject *use_cline; - PyObject *ptype, *pvalue, *ptraceback; - #if CYTHON_COMPILING_IN_CPYTHON -@@ -3876,7 +4089,7 @@ static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { - } - if (!use_cline) { - c_line = 0; -- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); -+ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; -@@ -3950,7 +4163,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - if (__pyx_code_cache.count == __pyx_code_cache.max_count) { - int new_max = __pyx_code_cache.max_count + 64; - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( -- __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); -+ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); - if (unlikely(!entries)) { - return; - } -@@ -3973,30 +4186,31 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { -- PyCodeObject *py_code = 0; -- PyObject *py_srcfile = 0; -- PyObject *py_funcname = 0; -+ PyCodeObject *py_code = NULL; -+ PyObject *py_funcname = NULL; - #if PY_MAJOR_VERSION < 3 -+ PyObject *py_srcfile = NULL; - py_srcfile = PyString_FromString(filename); -- #else -- py_srcfile = PyUnicode_FromString(filename); -- #endif - if (!py_srcfile) goto bad; -+ #endif - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; -+ funcname = PyUnicode_AsUTF8(py_funcname); -+ if (!funcname) goto bad; - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); -- #else -- py_funcname = PyUnicode_FromString(funcname); -+ if (!py_funcname) goto bad; - #endif - } -- if (!py_funcname) goto bad; -+ #if PY_MAJOR_VERSION < 3 - py_code = __Pyx_PyCode_New( - 0, - 0, -@@ -4015,11 +4229,16 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - __pyx_empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); -- Py_DECREF(py_funcname); -+ #else -+ py_code = PyCode_NewEmpty(filename, funcname, py_line); -+ #endif -+ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline - return py_code; - bad: -- Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -+ #if PY_MAJOR_VERSION < 3 -+ Py_XDECREF(py_srcfile); -+ #endif - return NULL; - } - static void __Pyx_AddTraceback(const char *funcname, int c_line, -@@ -4073,40 +4292,16 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - return (target_type) value;\ - } - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(int) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(int) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(int) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(int), -- little, !is_unsigned); -- } --} -- - /* CIntFromPy */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -4293,9 +4488,54 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - return (int) -1; - } - -+/* CIntToPy */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif -+ const int is_unsigned = neg_one > const_zero; -+ if (is_unsigned) { -+ if (sizeof(int) < sizeof(long)) { -+ return PyInt_FromLong((long) value); -+ } else if (sizeof(int) <= sizeof(unsigned long)) { -+ return PyLong_FromUnsignedLong((unsigned long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+#endif -+ } -+ } else { -+ if (sizeof(int) <= sizeof(long)) { -+ return PyInt_FromLong((long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ return PyLong_FromLongLong((PY_LONG_LONG) value); -+#endif -+ } -+ } -+ { -+ int one = 1; int little = (int)*(unsigned char *)&one; -+ unsigned char *bytes = (unsigned char *)&value; -+ return _PyLong_FromByteArray(bytes, sizeof(int), -+ little, !is_unsigned); -+ } -+} -+ - /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(long) < sizeof(long)) { -@@ -4326,7 +4566,14 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - - /* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -4877,6 +5124,23 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_DECREF(x); - return ival; - } -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { -+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { -+ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); -+#if PY_MAJOR_VERSION < 3 -+ } else if (likely(PyInt_CheckExact(o))) { -+ return PyInt_AS_LONG(o); -+#endif -+ } else { -+ Py_ssize_t ival; -+ PyObject *x; -+ x = PyNumber_Index(o); -+ if (!x) return -1; -+ ival = PyInt_AsLong(x); -+ Py_DECREF(x); -+ return ival; -+ } -+} - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); - } -diff --git a/cylp/cy/CyCoinModel.cpp b/cylp/cy/CyCoinModel.cpp -index af39332..7fdaea8 100644 ---- a/cylp/cy/CyCoinModel.cpp -+++ b/cylp/cy/CyCoinModel.cpp -@@ -1,14 +1,16 @@ --/* Generated by Cython 0.29.12 */ -+/* Generated by Cython 0.29.25 */ - -+#ifndef PY_SSIZE_T_CLEAN - #define PY_SSIZE_T_CLEAN -+#endif /* PY_SSIZE_T_CLEAN */ - #include "Python.h" - #ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. - #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. - #else --#define CYTHON_ABI "0_29_12" --#define CYTHON_HEX_VERSION 0x001D0CF0 -+#define CYTHON_ABI "0_29_25" -+#define CYTHON_HEX_VERSION 0x001D19F0 - #define CYTHON_FUTURE_DIVISION 0 - #include - #ifndef offsetof -@@ -155,7 +157,7 @@ - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif -- #if PY_VERSION_HEX < 0x030300F0 -+ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) -@@ -174,7 +176,7 @@ - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL -- #define CYTHON_FAST_PYCALL 1 -+ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1) - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) -@@ -193,7 +195,9 @@ - #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) - #endif - #if CYTHON_USE_PYLONG_INTERNALS -- #include "longintrepr.h" -+ #if PY_MAJOR_VERSION < 3 -+ #include "longintrepr.h" -+ #endif - #undef SHIFT - #undef BASE - #undef MASK -@@ -324,9 +328,68 @@ class __Pyx_FakeReference { - #define __Pyx_DefaultClassType PyClass_Type - #else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" --#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 -- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ -- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -+ #define __Pyx_DefaultClassType PyType_Type -+#if PY_VERSION_HEX >= 0x030B00A1 -+ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, -+ PyObject *code, PyObject *c, PyObject* n, PyObject *v, -+ PyObject *fv, PyObject *cell, PyObject* fn, -+ PyObject *name, int fline, PyObject *lnos) { -+ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; -+ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; -+ const char *fn_cstr=NULL; -+ const char *name_cstr=NULL; -+ PyCodeObject* co=NULL; -+ PyObject *type, *value, *traceback; -+ PyErr_Fetch(&type, &value, &traceback); -+ if (!(kwds=PyDict_New())) goto end; -+ if (!(argcount=PyLong_FromLong(a))) goto end; -+ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; -+ if (!(posonlyargcount=PyLong_FromLong(0))) goto end; -+ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; -+ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; -+ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; -+ if (!(nlocals=PyLong_FromLong(l))) goto end; -+ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; -+ if (!(stacksize=PyLong_FromLong(s))) goto end; -+ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; -+ if (!(flags=PyLong_FromLong(f))) goto end; -+ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; -+ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; -+ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; -+ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; -+ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; -+ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here -+ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; -+ Py_XDECREF((PyObject*)co); -+ co = (PyCodeObject*)call_result; -+ call_result = NULL; -+ if (0) { -+ cleanup_code_too: -+ Py_XDECREF((PyObject*)co); -+ co = NULL; -+ } -+ end: -+ Py_XDECREF(kwds); -+ Py_XDECREF(argcount); -+ Py_XDECREF(posonlyargcount); -+ Py_XDECREF(kwonlyargcount); -+ Py_XDECREF(nlocals); -+ Py_XDECREF(stacksize); -+ Py_XDECREF(replace); -+ Py_XDECREF(call_result); -+ Py_XDECREF(empty); -+ if (type) { -+ PyErr_Restore(type, value, traceback); -+ } -+ return co; -+ } - #else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -@@ -440,8 +503,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #endif - #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 -+ #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) -+ #else -+ #define __Pyx_PyUnicode_READY(op) (0) -+ #endif - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) -@@ -449,7 +516,15 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) -+ #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) -+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) -+ #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) -+ #endif -+ #else -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) -+ #endif - #else - #define CYTHON_PEP393_ENABLED 0 - #define PyUnicode_1BYTE_KIND 1 -@@ -498,8 +573,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define PyString_Type PyUnicode_Type - #define PyString_Check PyUnicode_Check - #define PyString_CheckExact PyUnicode_CheckExact -+#ifndef PyObject_Unicode - #define PyObject_Unicode PyObject_Str - #endif -+#endif - #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) - #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) -@@ -510,6 +587,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #ifndef PySet_CheckExact - #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) - #endif -+#if PY_VERSION_HEX >= 0x030900A4 -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) -+#else -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) -+#endif - #if CYTHON_ASSUME_SAFE_MACROS - #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) - #else -@@ -543,13 +627,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong -- #define __Pyx_PyInt_AsHash_t PyInt_AsLong -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t - #else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t -- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t - #endif - #if PY_MAJOR_VERSION >= 3 -- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) -+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) - #else - #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) - #endif -@@ -590,11 +674,10 @@ static CYTHON_INLINE float __PYX_NAN() { - #define __Pyx_truncl truncl - #endif - -- -+#define __PYX_MARK_ERR_POS(f_index, lineno) \ -+ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } - #define __PYX_ERR(f_index, lineno, Ln_error) \ --{ \ -- __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ --} -+ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } - - #ifndef __PYX_EXTERN_C - #ifdef __cplusplus -@@ -610,7 +693,13 @@ static CYTHON_INLINE float __PYX_NAN() { - #include - #include - #include "numpy/arrayobject.h" -+#include "numpy/ndarrayobject.h" -+#include "numpy/ndarraytypes.h" -+#include "numpy/arrayscalars.h" - #include "numpy/ufuncobject.h" -+ -+ /* NumPy API declarations from "numpy/__init__.pxd" */ -+ - #include "CoinModel.hpp" - #ifdef _OPENMP - #include -@@ -708,6 +797,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); - static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); - #if CYTHON_ASSUME_SAFE_MACROS - #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) - #else -@@ -843,7 +933,7 @@ static const char *__pyx_filename; - - static const char *__pyx_f[] = { - "stringsource", -- "cylp\\cy\\CyCoinModel.pyx", -+ "cylp/cy/CyCoinModel.pyx", - "__init__.pxd", - "type.pxd", - }; -@@ -884,7 +974,7 @@ typedef struct { - } __Pyx_BufFmt_Context; - - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":776 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":690 - * # in Cython to enable them only on the right systems. - * - * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< -@@ -893,7 +983,7 @@ typedef struct { - */ - typedef npy_int8 __pyx_t_5numpy_int8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":777 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":691 - * - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< -@@ -902,7 +992,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; - */ - typedef npy_int16 __pyx_t_5numpy_int16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":778 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":692 - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< -@@ -911,7 +1001,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; - */ - typedef npy_int32 __pyx_t_5numpy_int32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":779 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":693 - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t - * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< -@@ -920,7 +1010,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; - */ - typedef npy_int64 __pyx_t_5numpy_int64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":783 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":697 - * #ctypedef npy_int128 int128_t - * - * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< -@@ -929,7 +1019,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; - */ - typedef npy_uint8 __pyx_t_5numpy_uint8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":784 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":698 - * - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< -@@ -938,7 +1028,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; - */ - typedef npy_uint16 __pyx_t_5numpy_uint16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":785 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":699 - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< -@@ -947,7 +1037,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; - */ - typedef npy_uint32 __pyx_t_5numpy_uint32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":786 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":700 - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t - * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< -@@ -956,7 +1046,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; - */ - typedef npy_uint64 __pyx_t_5numpy_uint64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":790 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":704 - * #ctypedef npy_uint128 uint128_t - * - * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< -@@ -965,7 +1055,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; - */ - typedef npy_float32 __pyx_t_5numpy_float32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":791 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":705 - * - * ctypedef npy_float32 float32_t - * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< -@@ -974,7 +1064,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; - */ - typedef npy_float64 __pyx_t_5numpy_float64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":800 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":714 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< -@@ -983,7 +1073,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; - */ - typedef npy_long __pyx_t_5numpy_int_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":801 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":715 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< -@@ -992,7 +1082,7 @@ typedef npy_long __pyx_t_5numpy_int_t; - */ - typedef npy_longlong __pyx_t_5numpy_long_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":802 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":716 - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t - * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< -@@ -1001,7 +1091,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; - */ - typedef npy_longlong __pyx_t_5numpy_longlong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":804 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":718 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< -@@ -1010,7 +1100,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; - */ - typedef npy_ulong __pyx_t_5numpy_uint_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":805 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":719 - * - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< -@@ -1019,7 +1109,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":806 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":720 - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t - * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< -@@ -1028,7 +1118,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":808 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":722 - * ctypedef npy_ulonglong ulonglong_t - * - * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< -@@ -1037,7 +1127,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - */ - typedef npy_intp __pyx_t_5numpy_intp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":809 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":723 - * - * ctypedef npy_intp intp_t - * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< -@@ -1046,7 +1136,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; - */ - typedef npy_uintp __pyx_t_5numpy_uintp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":811 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":725 - * ctypedef npy_uintp uintp_t - * - * ctypedef npy_double float_t # <<<<<<<<<<<<<< -@@ -1055,7 +1145,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; - */ - typedef npy_double __pyx_t_5numpy_float_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":812 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":726 - * - * ctypedef npy_double float_t - * ctypedef npy_double double_t # <<<<<<<<<<<<<< -@@ -1064,7 +1154,7 @@ typedef npy_double __pyx_t_5numpy_float_t; - */ - typedef npy_double __pyx_t_5numpy_double_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":813 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":727 - * ctypedef npy_double float_t - * ctypedef npy_double double_t - * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< -@@ -1100,7 +1190,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(do - /*--- Type declarations ---*/ - struct __pyx_obj_4cylp_2cy_11CyCoinModel_CyCoinModel; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":815 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":729 - * ctypedef npy_longdouble longdouble_t - * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< -@@ -1109,7 +1199,7 @@ struct __pyx_obj_4cylp_2cy_11CyCoinModel_CyCoinModel; - */ - typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":816 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":730 - * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< -@@ -1118,7 +1208,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - */ - typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":817 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":731 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< -@@ -1127,7 +1217,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - */ - typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":819 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":733 - * ctypedef npy_clongdouble clongdouble_t - * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< -@@ -1327,67 +1417,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg - /* RaiseException.proto */ - static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); - --/* PyCFunctionFastCall.proto */ --#if CYTHON_FAST_PYCCALL --static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); --#else --#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) --#endif -- --/* PyFunctionFastCall.proto */ --#if CYTHON_FAST_PYCALL --#define __Pyx_PyFunction_FastCall(func, args, nargs)\ -- __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) --#if 1 || PY_VERSION_HEX < 0x030600B1 --static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); --#else --#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) --#endif --#define __Pyx_BUILD_ASSERT_EXPR(cond)\ -- (sizeof(char [1 - 2*!(cond)]) - 1) --#ifndef Py_MEMBER_SIZE --#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) --#endif -- static size_t __pyx_pyframe_localsplus_offset = 0; -- #include "frameobject.h" -- #define __Pxy_PyFrame_Initialize_Offsets()\ -- ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ -- (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) -- #define __Pyx_PyFrame_GetLocalsplus(frame)\ -- (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) --#endif -- --/* PyObjectCallMethO.proto */ --#if CYTHON_COMPILING_IN_CPYTHON --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); --#endif -- --/* PyObjectCallOneArg.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); -- --/* DictGetItem.proto */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); --#define __Pyx_PyObject_Dict_GetItem(obj, name)\ -- (likely(PyDict_CheckExact(obj)) ?\ -- __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) --#else --#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) --#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) --#endif -- --/* RaiseTooManyValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); -- --/* RaiseNeedMoreValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); -- --/* RaiseNoneIterError.proto */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -- --/* ExtTypeTest.proto */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); -- - /* GetTopmostException.proto */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); -@@ -1437,6 +1466,9 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - /* SetVTable.proto */ - static int __Pyx_SetVtable(PyObject *dict, void *vtable); - -+/* PyObjectGetAttrStrNoError.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); -+ - /* SetupReduce.proto */ - static int __Pyx_setup_reduce(PyObject* type_obj); - -@@ -1568,8 +1600,10 @@ static void __Pyx_CppExn2PyErr() { - } - #endif - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -+/* GCCDiagnostics.proto */ -+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -+#define __Pyx_HAS_GCC_DIAGNOSTIC -+#endif - - /* RealImag.proto */ - #if CYTHON_CCOMPLEX -@@ -1669,12 +1703,12 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); - #endif - #endif - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); -- - /* CIntFromPy.proto */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); - -+/* CIntToPy.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -+ - /* CIntToPy.proto */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); - -@@ -1729,8 +1763,17 @@ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; - static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; - static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; - static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -+static PyTypeObject *__pyx_ptype_5numpy_generic = 0; -+static PyTypeObject *__pyx_ptype_5numpy_number = 0; -+static PyTypeObject *__pyx_ptype_5numpy_integer = 0; -+static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; -+static PyTypeObject *__pyx_ptype_5numpy_floating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; -+static PyTypeObject *__pyx_ptype_5numpy_character = 0; - static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ - - /* Module declarations from 'cylp.cy' */ - -@@ -1744,9 +1787,6 @@ int __pyx_module_is_main_cylp__cy__CyCoinModel = 0; - - /* Implementation of 'cylp.cy.CyCoinModel' */ - static PyObject *__pyx_builtin_TypeError; --static PyObject *__pyx_builtin_ValueError; --static PyObject *__pyx_builtin_range; --static PyObject *__pyx_builtin_RuntimeError; - static PyObject *__pyx_builtin_ImportError; - static const char __pyx_k_ind[] = "ind"; - static const char __pyx_k_val[] = "val"; -@@ -1754,7 +1794,6 @@ static const char __pyx_k_main[] = "__main__"; - static const char __pyx_k_name[] = "__name__"; - static const char __pyx_k_rows[] = "rows"; - static const char __pyx_k_test[] = "__test__"; --static const char __pyx_k_range[] = "range"; - static const char __pyx_k_reduce[] = "__reduce__"; - static const char __pyx_k_varInd[] = "varInd"; - static const char __pyx_k_columns[] = "columns"; -@@ -1766,35 +1805,22 @@ static const char __pyx_k_setstate[] = "__setstate__"; - static const char __pyx_k_TypeError[] = "TypeError"; - static const char __pyx_k_objective[] = "objective"; - static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; --static const char __pyx_k_ValueError[] = "ValueError"; - static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; - static const char __pyx_k_CyCoinModel[] = "CyCoinModel"; - static const char __pyx_k_ImportError[] = "ImportError"; - static const char __pyx_k_columnLower[] = "columnLower"; - static const char __pyx_k_columnUpper[] = "columnUpper"; - static const char __pyx_k_numberInRow[] = "numberInRow"; --static const char __pyx_k_RuntimeError[] = "RuntimeError"; - static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; - static const char __pyx_k_numberInColumn[] = "numberInColumn"; - static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; - static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; --static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; - static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; --static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; --static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; --static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; --static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; - static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; - static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; --static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; - static PyObject *__pyx_n_s_CyCoinModel; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; - static PyObject *__pyx_n_s_ImportError; --static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; --static PyObject *__pyx_n_s_RuntimeError; - static PyObject *__pyx_n_s_TypeError; --static PyObject *__pyx_n_s_ValueError; - static PyObject *__pyx_n_s_cline_in_traceback; - static PyObject *__pyx_n_s_columnLower; - static PyObject *__pyx_n_s_columnUpper; -@@ -1804,8 +1830,6 @@ static PyObject *__pyx_n_s_getstate; - static PyObject *__pyx_n_s_ind; - static PyObject *__pyx_n_s_main; - static PyObject *__pyx_n_s_name; --static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; --static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; - static PyObject *__pyx_kp_s_no_default___reduce___due_to_non; - static PyObject *__pyx_n_s_numberInColumn; - static PyObject *__pyx_n_s_numberInRow; -@@ -1813,7 +1837,6 @@ static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; - static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; - static PyObject *__pyx_n_s_objective; - static PyObject *__pyx_n_s_pyx_vtable; --static PyObject *__pyx_n_s_range; - static PyObject *__pyx_n_s_reduce; - static PyObject *__pyx_n_s_reduce_cython; - static PyObject *__pyx_n_s_reduce_ex; -@@ -1823,7 +1846,6 @@ static PyObject *__pyx_n_s_rows; - static PyObject *__pyx_n_s_setstate; - static PyObject *__pyx_n_s_setstate_cython; - static PyObject *__pyx_n_s_test; --static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; - static PyObject *__pyx_n_s_val; - static PyObject *__pyx_n_s_varInd; - static int __pyx_pf_4cylp_2cy_11CyCoinModel_11CyCoinModel___cinit__(struct __pyx_obj_4cylp_2cy_11CyCoinModel_CyCoinModel *__pyx_v_self); /* proto */ -@@ -1838,18 +1860,11 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinModel_11CyCoinModel_16getNumVariable - static PyObject *__pyx_pf_4cylp_2cy_11CyCoinModel_11CyCoinModel_18getNumConstraints(struct __pyx_obj_4cylp_2cy_11CyCoinModel_CyCoinModel *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_11CyCoinModel_11CyCoinModel_20__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_11CyCoinModel_CyCoinModel *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_11CyCoinModel_11CyCoinModel_22__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_11CyCoinModel_CyCoinModel *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ - static PyObject *__pyx_tp_new_4cylp_2cy_11CyCoinModel_CyCoinModel(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ - static PyObject *__pyx_tuple_; - static PyObject *__pyx_tuple__2; - static PyObject *__pyx_tuple__3; - static PyObject *__pyx_tuple__4; --static PyObject *__pyx_tuple__5; --static PyObject *__pyx_tuple__6; --static PyObject *__pyx_tuple__7; --static PyObject *__pyx_tuple__8; --static PyObject *__pyx_tuple__9; - /* Late includes */ - - /* "cylp/cy/CyCoinModel.pyx":42 -@@ -1880,6 +1895,9 @@ static int __pyx_pf_4cylp_2cy_11CyCoinModel_11CyCoinModel___cinit__(struct __pyx - int __pyx_r; - __Pyx_RefNannyDeclarations - CoinModel *__pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - - /* "cylp/cy/CyCoinModel.pyx":43 -@@ -1967,6 +1985,9 @@ static PyObject *__pyx_pw_4cylp_2cy_11CyCoinModel_11CyCoinModel_3addVariable(PyO - PyObject *__pyx_v_columnLower = 0; - PyObject *__pyx_v_columnUpper = 0; - PyObject *__pyx_v_objective = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("addVariable (wrapper)", 0); -@@ -2080,6 +2101,9 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinModel_11CyCoinModel_2addVariable(str - double __pyx_t_2; - double __pyx_t_3; - double __pyx_t_4; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("addVariable", 0); - __pyx_pybuffer_rows.pybuffer.buf = NULL; - __pyx_pybuffer_rows.refcount = 0; -@@ -2218,6 +2242,9 @@ static PyObject *__pyx_pw_4cylp_2cy_11CyCoinModel_11CyCoinModel_5addConstraint(P - PyArrayObject *__pyx_v_elements = 0; - PyObject *__pyx_v_rowLower = 0; - PyObject *__pyx_v_rowUpper = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("addConstraint (wrapper)", 0); -@@ -2320,6 +2347,9 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinModel_11CyCoinModel_4addConstraint(s - int __pyx_t_1; - double __pyx_t_2; - double __pyx_t_3; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("addConstraint", 0); - __pyx_pybuffer_columns.pybuffer.buf = NULL; - __pyx_pybuffer_columns.refcount = 0; -@@ -2413,6 +2443,9 @@ static char __pyx_doc_4cylp_2cy_11CyCoinModel_11CyCoinModel_6setVariableLower[] - static PyObject *__pyx_pw_4cylp_2cy_11CyCoinModel_11CyCoinModel_7setVariableLower(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_ind = 0; - PyObject *__pyx_v_val = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("setVariableLower (wrapper)", 0); -@@ -2474,6 +2507,9 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinModel_11CyCoinModel_6setVariableLowe - __Pyx_RefNannyDeclarations - int __pyx_t_1; - double __pyx_t_2; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("setVariableLower", 0); - - /* "cylp/cy/CyCoinModel.pyx":124 -@@ -2521,6 +2557,9 @@ static char __pyx_doc_4cylp_2cy_11CyCoinModel_11CyCoinModel_8setVariableUpper[] - static PyObject *__pyx_pw_4cylp_2cy_11CyCoinModel_11CyCoinModel_9setVariableUpper(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_ind = 0; - PyObject *__pyx_v_val = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("setVariableUpper (wrapper)", 0); -@@ -2582,6 +2621,9 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinModel_11CyCoinModel_8setVariableUppe - __Pyx_RefNannyDeclarations - int __pyx_t_1; - double __pyx_t_2; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("setVariableUpper", 0); - - /* "cylp/cy/CyCoinModel.pyx":127 -@@ -2629,6 +2671,9 @@ static char __pyx_doc_4cylp_2cy_11CyCoinModel_11CyCoinModel_10setConstraintLower - static PyObject *__pyx_pw_4cylp_2cy_11CyCoinModel_11CyCoinModel_11setConstraintLower(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_ind = 0; - PyObject *__pyx_v_val = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("setConstraintLower (wrapper)", 0); -@@ -2690,6 +2735,9 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinModel_11CyCoinModel_10setConstraintL - __Pyx_RefNannyDeclarations - int __pyx_t_1; - double __pyx_t_2; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("setConstraintLower", 0); - - /* "cylp/cy/CyCoinModel.pyx":130 -@@ -2737,6 +2785,9 @@ static char __pyx_doc_4cylp_2cy_11CyCoinModel_11CyCoinModel_12setConstraintUpper - static PyObject *__pyx_pw_4cylp_2cy_11CyCoinModel_11CyCoinModel_13setConstraintUpper(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_ind = 0; - PyObject *__pyx_v_val = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("setConstraintUpper (wrapper)", 0); -@@ -2798,6 +2849,9 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinModel_11CyCoinModel_12setConstraintU - __Pyx_RefNannyDeclarations - int __pyx_t_1; - double __pyx_t_2; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("setConstraintUpper", 0); - - /* "cylp/cy/CyCoinModel.pyx":133 -@@ -2845,6 +2899,9 @@ static char __pyx_doc_4cylp_2cy_11CyCoinModel_11CyCoinModel_14setObjective[] = " - static PyObject *__pyx_pw_4cylp_2cy_11CyCoinModel_11CyCoinModel_15setObjective(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_varInd = 0; - PyObject *__pyx_v_val = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("setObjective (wrapper)", 0); -@@ -2906,6 +2963,9 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinModel_11CyCoinModel_14setObjective(s - __Pyx_RefNannyDeclarations - int __pyx_t_1; - double __pyx_t_2; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("setObjective", 0); - - /* "cylp/cy/CyCoinModel.pyx":136 -@@ -2965,6 +3025,9 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinModel_11CyCoinModel_16getNumVariable - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("getNumVariables", 0); - - /* "cylp/cy/CyCoinModel.pyx":139 -@@ -3025,6 +3088,9 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinModel_11CyCoinModel_18getNumConstrai - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("getNumConstraints", 0); - - /* "cylp/cy/CyCoinModel.pyx":142 -@@ -3081,6 +3147,9 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinModel_11CyCoinModel_20__reduce_cytho - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -3136,6 +3205,9 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinModel_11CyCoinModel_22__setstate_cyt - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -3166,863 +3238,7 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinModel_11CyCoinModel_22__setstate_cyt - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); -- __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_v_i; -- int __pyx_v_ndim; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- int __pyx_v_t; -- char *__pyx_v_f; -- PyArray_Descr *__pyx_v_descr = 0; -- int __pyx_v_offset; -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- int __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- int __pyx_t_4; -- int __pyx_t_5; -- int __pyx_t_6; -- PyArray_Descr *__pyx_t_7; -- PyObject *__pyx_t_8 = NULL; -- char *__pyx_t_9; -- if (__pyx_v_info == NULL) { -- PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); -- return -1; -- } -- __Pyx_RefNannySetupContext("__getbuffer__", 0); -- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); -- __Pyx_GIVEREF(__pyx_v_info->obj); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":265 -- * -- * cdef int i, ndim -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":266 -- * cdef int i, ndim -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * -- * ndim = PyArray_NDIM(self) -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":268 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- */ -- __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L4_bool_binop_done; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":271 -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not C contiguous") -- * -- */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L4_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 272, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L7_bool_binop_done; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":275 -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not Fortran contiguous") -- * -- */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 276, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":278 -- * raise ValueError(u"ndarray is not Fortran contiguous") -- * -- * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":279 -- * -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * # Allocate new buffer for strides and shape info. -- */ -- __pyx_v_info->ndim = __pyx_v_ndim; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":283 -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- */ -- __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":284 -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim # <<<<<<<<<<<<<< -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- */ -- __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":285 -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim -- * for i in range(ndim): # <<<<<<<<<<<<<< -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] -- */ -- __pyx_t_4 = __pyx_v_ndim; -- __pyx_t_5 = __pyx_t_4; -- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { -- __pyx_v_i = __pyx_t_6; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":286 -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- */ -- (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":287 -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< -- * else: -- * info.strides = PyArray_STRIDES(self) -- */ -- (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- goto __pyx_L9; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":289 -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- */ -- /*else*/ { -- __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":290 -- * else: -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- */ -- __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); -- } -- __pyx_L9:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":291 -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL # <<<<<<<<<<<<<< -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) -- */ -- __pyx_v_info->suboffsets = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":292 -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< -- * info.readonly = not PyArray_ISWRITEABLE(self) -- * -- */ -- __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":293 -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< -- * -- * cdef int t -- */ -- __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":296 -- * -- * cdef int t -- * cdef char* f = NULL # <<<<<<<<<<<<<< -- * cdef dtype descr = PyArray_DESCR(self) -- * cdef int offset -- */ -- __pyx_v_f = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":297 -- * cdef int t -- * cdef char* f = NULL -- * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< -- * cdef int offset -- * -- */ -- __pyx_t_7 = PyArray_DESCR(__pyx_v_self); -- __pyx_t_3 = ((PyObject *)__pyx_t_7); -- __Pyx_INCREF(__pyx_t_3); -- __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":300 -- * cdef int offset -- * -- * info.obj = self # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(descr): -- */ -- __Pyx_INCREF(((PyObject *)__pyx_v_self)); -- __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); -- __pyx_v_info->obj = ((PyObject *)__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":303 -- * -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num # <<<<<<<<<<<<<< -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- */ -- __pyx_t_4 = __pyx_v_descr->type_num; -- __pyx_v_t = __pyx_t_4; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); -- if (!__pyx_t_2) { -- goto __pyx_L15_next_or; -- } else { -- } -- __pyx_t_2 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_L15_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":305 -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L14_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 306, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":307 -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- */ -- switch (__pyx_v_t) { -- case NPY_BYTE: -- __pyx_v_f = ((char *)"b"); -- break; -- case NPY_UBYTE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":308 -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- */ -- __pyx_v_f = ((char *)"B"); -- break; -- case NPY_SHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":309 -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- */ -- __pyx_v_f = ((char *)"h"); -- break; -- case NPY_USHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":310 -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- */ -- __pyx_v_f = ((char *)"H"); -- break; -- case NPY_INT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":311 -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- */ -- __pyx_v_f = ((char *)"i"); -- break; -- case NPY_UINT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":312 -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- */ -- __pyx_v_f = ((char *)"I"); -- break; -- case NPY_LONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":313 -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- */ -- __pyx_v_f = ((char *)"l"); -- break; -- case NPY_ULONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":314 -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- */ -- __pyx_v_f = ((char *)"L"); -- break; -- case NPY_LONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":315 -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- */ -- __pyx_v_f = ((char *)"q"); -- break; -- case NPY_ULONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":316 -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- */ -- __pyx_v_f = ((char *)"Q"); -- break; -- case NPY_FLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":317 -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- */ -- __pyx_v_f = ((char *)"f"); -- break; -- case NPY_DOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":318 -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- */ -- __pyx_v_f = ((char *)"d"); -- break; -- case NPY_LONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":319 -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- */ -- __pyx_v_f = ((char *)"g"); -- break; -- case NPY_CFLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":320 -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- */ -- __pyx_v_f = ((char *)"Zf"); -- break; -- case NPY_CDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":321 -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" -- */ -- __pyx_v_f = ((char *)"Zd"); -- break; -- case NPY_CLONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":322 -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f = "O" -- * else: -- */ -- __pyx_v_f = ((char *)"Zg"); -- break; -- case NPY_OBJECT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":323 -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_v_f = ((char *)"O"); -- break; -- default: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":325 -- * elif t == NPY_OBJECT: f = "O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * info.format = f -- * return -- */ -- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_8); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 325, __pyx_L1_error) -- break; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":326 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f # <<<<<<<<<<<<<< -- * return -- * else: -- */ -- __pyx_v_info->format = __pyx_v_f; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":327 -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f -- * return # <<<<<<<<<<<<<< -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- */ -- __pyx_r = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":329 -- * return -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- */ -- /*else*/ { -- __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":330 -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, -- */ -- (__pyx_v_info->format[0]) = '^'; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":331 -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 # <<<<<<<<<<<<<< -- * f = _util_dtypestring(descr, info.format + 1, -- * info.format + _buffer_format_string_len, -- */ -- __pyx_v_offset = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":332 -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< -- * info.format + _buffer_format_string_len, -- * &offset) -- */ -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":335 -- * info.format + _buffer_format_string_len, -- * &offset) -- * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- */ -- (__pyx_v_f[0]) = '\x00'; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- -- /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; -- if (__pyx_v_info->obj != NULL) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- goto __pyx_L2; -- __pyx_L0:; -- if (__pyx_v_info->obj == Py_None) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- __pyx_L2:; -- __Pyx_XDECREF((PyObject *)__pyx_v_descr); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); -- __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("__releasebuffer__", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":339 -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) -- */ -- PyObject_Free(__pyx_v_info->format); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":341 -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) # <<<<<<<<<<<<<< -- * # info.shape was stored after info.strides in the same block -- * -- */ -- PyObject_Free(__pyx_v_info->strides); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -@@ -4034,9 +3250,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":822 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":736 - * - * cdef inline object PyArray_MultiIterNew1(a): - * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< -@@ -4044,13 +3263,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - * cdef inline object PyArray_MultiIterNew2(a, b): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -@@ -4069,7 +3288,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -@@ -4081,9 +3300,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":825 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":739 - * - * cdef inline object PyArray_MultiIterNew2(a, b): - * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< -@@ -4091,13 +3313,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - * cdef inline object PyArray_MultiIterNew3(a, b, c): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -@@ -4116,7 +3338,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -@@ -4128,9 +3350,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":828 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":742 - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): - * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< -@@ -4138,13 +3363,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -@@ -4163,7 +3388,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -4175,9 +3400,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":831 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":745 - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -@@ -4185,13 +3413,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -4210,7 +3438,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -4222,9 +3450,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":834 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":748 - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< -@@ -4232,13 +3463,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - * cdef inline tuple PyDataType_SHAPE(dtype d): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -4257,7 +3488,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -4271,7 +3502,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - int __pyx_t_1; - __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -4281,7 +3512,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":838 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":752 - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): - * return d.subarray.shape # <<<<<<<<<<<<<< -@@ -4293,7 +3524,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -4302,12 +3533,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":840 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":754 - * return d.subarray.shape - * else: - * return () # <<<<<<<<<<<<<< - * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: -+ * - */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); -@@ -4316,7 +3547,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - goto __pyx_L0; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -4331,754 +3562,8 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { -- PyArray_Descr *__pyx_v_child = 0; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- PyObject *__pyx_v_fields = 0; -- PyObject *__pyx_v_childname = NULL; -- PyObject *__pyx_v_new_offset = NULL; -- PyObject *__pyx_v_t = NULL; -- char *__pyx_r; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- Py_ssize_t __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- PyObject *__pyx_t_4 = NULL; -- int __pyx_t_5; -- int __pyx_t_6; -- int __pyx_t_7; -- long __pyx_t_8; -- char *__pyx_t_9; -- __Pyx_RefNannySetupContext("_util_dtypestring", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":847 -- * -- * cdef dtype child -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * cdef tuple fields -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":848 -- * cdef dtype child -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * cdef tuple fields -- * -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- if (unlikely(__pyx_v_descr->names == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -- __PYX_ERR(2, 851, __pyx_L1_error) -- } -- __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; -- for (;;) { -- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 851, __pyx_L1_error) -- #else -- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- #endif -- __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":852 -- * -- * for childname in descr.names: -- * fields = descr.fields[childname] # <<<<<<<<<<<<<< -- * child, new_offset = fields -- * -- */ -- if (unlikely(__pyx_v_descr->fields == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); -- __PYX_ERR(2, 852, __pyx_L1_error) -- } -- __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":853 -- * for childname in descr.names: -- * fields = descr.fields[childname] -- * child, new_offset = fields # <<<<<<<<<<<<<< -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- */ -- if (likely(__pyx_v_fields != Py_None)) { -- PyObject* sequence = __pyx_v_fields; -- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); -- if (unlikely(size != 2)) { -- if (size > 2) __Pyx_RaiseTooManyValuesError(2); -- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); -- __PYX_ERR(2, 853, __pyx_L1_error) -- } -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); -- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); -- __Pyx_INCREF(__pyx_t_3); -- __Pyx_INCREF(__pyx_t_4); -- #else -- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- #endif -- } else { -- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error) -- } -- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); -- __pyx_t_3 = 0; -- __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 856, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); -- if (!__pyx_t_7) { -- goto __pyx_L8_next_or; -- } else { -- } -- __pyx_t_7 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_L8_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":859 -- * -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * # One could encode it in the format string and have Cython -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); -- if (__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_6 = __pyx_t_7; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":860 -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * # One could encode it in the format string and have Cython -- * # complain instead, BUT: < and > in format strings also imply -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 860, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":870 -- * -- * # Output padding bytes -- * while offset[0] < new_offset: # <<<<<<<<<<<<<< -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- */ -- while (1) { -- __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (!__pyx_t_6) break; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":871 -- * # Output padding bytes -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< -- * f += 1 -- * offset[0] += 1 -- */ -- (__pyx_v_f[0]) = 0x78; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":872 -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte -- * f += 1 # <<<<<<<<<<<<<< -- * offset[0] += 1 -- * -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":873 -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- * offset[0] += 1 # <<<<<<<<<<<<<< -- * -- * offset[0] += child.itemsize -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":875 -- * offset[0] += 1 -- * -- * offset[0] += child.itemsize # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(child): -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); -- if (__pyx_t_6) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":878 -- * -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num # <<<<<<<<<<<<<< -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 880, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":883 -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 98; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":884 -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":885 -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x68; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":886 -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 72; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":887 -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x69; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":888 -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 73; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":889 -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x6C; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":890 -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 76; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":891 -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x71; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":892 -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 81; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":893 -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":894 -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x64; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":895 -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x67; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":896 -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x66; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":897 -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x64; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":898 -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x67; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":899 -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (likely(__pyx_t_6)) { -- (__pyx_v_f[0]) = 79; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":901 -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * f += 1 -- * else: -- */ -- /*else*/ { -- __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 901, __pyx_L1_error) -- } -- __pyx_L15:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":902 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * f += 1 # <<<<<<<<<<<<<< -- * else: -- * # Cython ignores struct boundary information ("T{...}"), -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- goto __pyx_L13; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":906 -- * # Cython ignores struct boundary information ("T{...}"), -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< -- * return f -- * -- */ -- /*else*/ { -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 906, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- } -- __pyx_L13:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- } -- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":907 -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) -- * return f # <<<<<<<<<<<<<< -- * -- * -- */ -- __pyx_r = __pyx_v_f; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_4); -- __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = NULL; -- __pyx_L0:; -- __Pyx_XDECREF((PyObject *)__pyx_v_child); -- __Pyx_XDECREF(__pyx_v_fields); -- __Pyx_XDECREF(__pyx_v_childname); -- __Pyx_XDECREF(__pyx_v_new_offset); -- __Pyx_XDECREF(__pyx_v_t); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -- * int _import_umath() except -1 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 -+ * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< - * Py_INCREF(base) # important to do this before stealing the reference below! -@@ -5089,7 +3574,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("set_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1023 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":930 - * - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< -@@ -5098,7 +3583,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - Py_INCREF(__pyx_v_base); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1024 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":931 - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< -@@ -5107,7 +3592,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -5119,7 +3604,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyFinishContext(); - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5134,7 +3619,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - int __pyx_t_1; - __Pyx_RefNannySetupContext("get_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1027 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":934 - * - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< -@@ -5143,7 +3628,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - __pyx_v_base = PyArray_BASE(__pyx_v_arr); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5153,7 +3638,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_t_1 = ((__pyx_v_base == NULL) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1029 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":936 - * base = PyArray_BASE(arr) - * if base is NULL: - * return None # <<<<<<<<<<<<<< -@@ -5164,7 +3649,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5173,7 +3658,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1030 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":937 - * if base is NULL: - * return None - * return base # <<<<<<<<<<<<<< -@@ -5185,7 +3670,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = ((PyObject *)__pyx_v_base); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5200,12 +3685,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { -@@ -5219,13 +3704,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_array", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - { -@@ -5237,20 +3725,20 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1036 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":943 - * cdef inline int import_array() except -1: - * try: -- * _import_array() # <<<<<<<<<<<<<< -+ * __pyx_import_array() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") - */ -- __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error) -+ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - } -@@ -5260,9 +3748,9 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1037 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":944 - * try: -- * _import_array() -+ * __pyx_import_array() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.multiarray failed to import") - * -@@ -5270,32 +3758,32 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __PYX_ERR(2, 945, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - __Pyx_XGIVEREF(__pyx_t_1); -@@ -5306,12 +3794,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - /* function exit code */ -@@ -5329,7 +3817,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -5348,9 +3836,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_umath", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5366,16 +3857,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1042 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":949 - * cdef inline int import_umath() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5389,7 +3880,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1043 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":950 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< -@@ -5399,28 +3890,28 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __PYX_ERR(2, 951, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5435,7 +3926,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -5458,7 +3949,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -5477,9 +3968,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_ufunc", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5495,16 +3989,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1048 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":955 - * cdef inline int import_ufunc() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5518,35 +4012,38 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1049 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":956 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") -+ * - */ - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1050 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":957 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -+ * -+ * cdef extern from *: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __PYX_ERR(2, 957, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5561,7 +4058,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -5583,6 +4080,180 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_RefNannyFinishContext(); - return __pyx_r; - } -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_timedelta64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":979 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_datetime64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":994 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { -+ npy_datetime __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1004 -+ * also needed. That can be found using `get_datetime64_unit`. -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { -+ npy_timedelta __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1011 -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { -+ NPY_DATETIMEUNIT __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1018 -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ * """ -+ * return (obj).obmeta.base # <<<<<<<<<<<<<< -+ */ -+ __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} - static struct __pyx_vtabstruct_4cylp_2cy_11CyCoinModel_CyCoinModel __pyx_vtable_4cylp_2cy_11CyCoinModel_CyCoinModel; - - static PyObject *__pyx_tp_new_4cylp_2cy_11CyCoinModel_CyCoinModel(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { -@@ -5633,7 +4304,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_11CyCoinModel_CyCoinModel = { - sizeof(struct __pyx_obj_4cylp_2cy_11CyCoinModel_CyCoinModel), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_11CyCoinModel_CyCoinModel, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -5686,6 +4362,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_11CyCoinModel_CyCoinModel = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyMethodDef __pyx_methods[] = { -@@ -5735,13 +4417,8 @@ static struct PyModuleDef __pyx_moduledef = { - - static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_CyCoinModel, __pyx_k_CyCoinModel, sizeof(__pyx_k_CyCoinModel), 0, 0, 1, 1}, -- {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, - {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, -- {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, -- {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, - {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, -- {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, - {&__pyx_n_s_columnLower, __pyx_k_columnLower, sizeof(__pyx_k_columnLower), 0, 0, 1, 1}, - {&__pyx_n_s_columnUpper, __pyx_k_columnUpper, sizeof(__pyx_k_columnUpper), 0, 0, 1, 1}, -@@ -5751,8 +4428,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_ind, __pyx_k_ind, sizeof(__pyx_k_ind), 0, 0, 1, 1}, - {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, - {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, -- {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, -- {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, - {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, - {&__pyx_n_s_numberInColumn, __pyx_k_numberInColumn, sizeof(__pyx_k_numberInColumn), 0, 0, 1, 1}, - {&__pyx_n_s_numberInRow, __pyx_k_numberInRow, sizeof(__pyx_k_numberInRow), 0, 0, 1, 1}, -@@ -5760,7 +4435,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, - {&__pyx_n_s_objective, __pyx_k_objective, sizeof(__pyx_k_objective), 0, 0, 1, 1}, - {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, -- {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, - {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, -@@ -5770,17 +4444,13 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, - {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, - {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, -- {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, - {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1}, - {&__pyx_n_s_varInd, __pyx_k_varInd, sizeof(__pyx_k_varInd), 0, 0, 1, 1}, - {0, 0, 0, 0, 0, 0, 0} - }; - static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error) -- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error) -- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(2, 285, __pyx_L1_error) -- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 856, __pyx_L1_error) -- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error) -+ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 945, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -@@ -5790,101 +4460,46 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - -- /* "(tree fragment)":2 -- * def __reduce_cython__(self): -- * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< -- * def __setstate_cython__(self, __pyx_state): -- * raise TypeError("no default __reduce__ due to non-trivial __cinit__") -- */ -- __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 2, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple_); -- __Pyx_GIVEREF(__pyx_tuple_); -- -- /* "(tree fragment)":4 -- * raise TypeError("no default __reduce__ due to non-trivial __cinit__") -- * def __setstate_cython__(self, __pyx_state): -- * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< -- */ -- __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 4, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__2); -- __Pyx_GIVEREF(__pyx_tuple__2); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__3); -- __Pyx_GIVEREF(__pyx_tuple__3); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__4); -- __Pyx_GIVEREF(__pyx_tuple__4); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__5); -- __Pyx_GIVEREF(__pyx_tuple__5); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -+ /* "(tree fragment)":2 -+ * def __reduce_cython__(self): -+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< -+ * def __setstate_cython__(self, __pyx_state): -+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") - */ -- __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__6); -- __Pyx_GIVEREF(__pyx_tuple__6); -+ __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 2, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple_); -+ __Pyx_GIVEREF(__pyx_tuple_); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -+ /* "(tree fragment)":4 -+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") -+ * def __setstate_cython__(self, __pyx_state): -+ * raise TypeError("no default __reduce__ due to non-trivial __cinit__") # <<<<<<<<<<<<<< - */ -- __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__7); -- __Pyx_GIVEREF(__pyx_tuple__7); -+ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_no_default___reduce___due_to_non); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 4, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__2); -+ __Pyx_GIVEREF(__pyx_tuple__2); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 1038, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__8); -- __Pyx_GIVEREF(__pyx_tuple__8); -+ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 945, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__3); -+ __Pyx_GIVEREF(__pyx_tuple__3); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 1044, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__9); -- __Pyx_GIVEREF(__pyx_tuple__9); -+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 951, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__4); -+ __Pyx_GIVEREF(__pyx_tuple__4); - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -5933,6 +4548,9 @@ static int __Pyx_modinit_function_export_code(void) { - - static int __Pyx_modinit_type_init_code(void) { - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); - /*--- Type init code ---*/ - __pyx_vtabptr_4cylp_2cy_11CyCoinModel_CyCoinModel = &__pyx_vtable_4cylp_2cy_11CyCoinModel_CyCoinModel; -@@ -5959,6 +4577,9 @@ static int __Pyx_modinit_type_init_code(void) { - static int __Pyx_modinit_type_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); - /*--- Type import code ---*/ - __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) -@@ -5972,18 +4593,38 @@ static int __Pyx_modinit_type_import_code(void) { - __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) -+ __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error) -- __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error) -- __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error) -+ __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error) -+ __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error) -- __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error) -+ __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error) -+ __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error) -+ __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error) -+ __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error) -+ __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error) -+ __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error) -+ __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error) -+ __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error) -+ __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error) -+ __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error) -+ __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_RefNannyFinishContext(); - return 0; -@@ -6010,17 +4651,19 @@ static int __Pyx_modinit_function_import_code(void) { - } - - --#if PY_MAJOR_VERSION < 3 --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC void --#else -+#ifndef CYTHON_NO_PYINIT_EXPORT - #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#elif PY_MAJOR_VERSION < 3 -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" void -+#else -+#define __Pyx_PyMODINIT_FUNC void - #endif - #else --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC PyObject * -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * - #else --#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#define __Pyx_PyMODINIT_FUNC PyObject * - #endif - #endif - -@@ -6102,6 +4745,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_CyCoinModel(PyObject *__pyx_pyinit - #endif - { - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannyDeclarations - #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m) { -@@ -6149,11 +4795,9 @@ if (!__Pyx_RefNanny) { - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ -- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS -- #ifdef WITH_THREAD /* Python build with threading support? */ -+ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - PyEval_InitThreads(); - #endif -- #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; -@@ -6190,15 +4834,15 @@ if (!__Pyx_RefNanny) { - } - #endif - /*--- Builtin init code ---*/ -- if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Constants init code ---*/ -- if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Global type/function init code ---*/ - (void)__Pyx_modinit_global_init_code(); - (void)__Pyx_modinit_variable_export_code(); - (void)__Pyx_modinit_function_export_code(); -- if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; -- if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) -+ if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) - (void)__Pyx_modinit_variable_import_code(); - (void)__Pyx_modinit_function_import_code(); - /*--- Execution code ---*/ -@@ -6216,12 +4860,12 @@ if (!__Pyx_RefNanny) { - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -- * raise ImportError("numpy.core.umath failed to import") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - - /*--- Wrapped vars code ---*/ -@@ -6396,7 +5040,7 @@ static int __Pyx_ParseOptionalKeywords( - } - name = first_kw_arg; - #if PY_MAJOR_VERSION < 3 -- if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { -+ if (likely(PyString_Check(key))) { - while (*name) { - if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) - && _PyString_Eq(**name, key)) { -@@ -6423,7 +5067,7 @@ static int __Pyx_ParseOptionalKeywords( - while (*name) { - int cmp = (**name == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 -- (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : -+ (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**name, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; -@@ -6439,7 +5083,7 @@ static int __Pyx_ParseOptionalKeywords( - while (argname != first_kw_arg) { - int cmp = (**argname == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 -- (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : -+ (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**argname, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; -@@ -6564,6 +5208,7 @@ static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { - } - static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { - switch (ch) { -+ case '?': return "'bool'"; - case 'c': return "'char'"; - case 'b': return "'signed char'"; - case 'B': return "'unsigned char'"; -@@ -6606,7 +5251,7 @@ static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { - } - static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { - switch (ch) { -- case 'c': case 'b': case 'B': case 's': case 'p': return 1; -+ case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; - case 'h': case 'H': return sizeof(short); - case 'i': case 'I': return sizeof(int); - case 'l': case 'L': return sizeof(long); -@@ -6690,7 +5335,7 @@ static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { - case 'b': case 'h': case 'i': - case 'l': case 'q': case 's': case 'p': - return 'I'; -- case 'B': case 'H': case 'I': case 'L': case 'Q': -+ case '?': case 'B': case 'H': case 'I': case 'L': case 'Q': - return 'U'; - case 'f': case 'd': case 'g': - return (is_complex ? 'C' : 'R'); -@@ -6834,9 +5479,7 @@ static PyObject * - __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) - { - const char *ts = *tsp; -- int i = 0, number; -- int ndim = ctx->head->field->type->ndim; --; -+ int i = 0, number, ndim; - ++ts; - if (ctx->new_count != 1) { - PyErr_SetString(PyExc_ValueError, -@@ -6844,6 +5487,7 @@ __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) - return NULL; - } - if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; -+ ndim = ctx->head->field->type->ndim; - while (*ts && *ts != ')') { - switch (*ts) { - case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; -@@ -6969,12 +5613,12 @@ static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const cha - return NULL; - } - CYTHON_FALLTHROUGH; -- case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': -+ case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': - case 'l': case 'L': case 'q': case 'Q': - case 'f': case 'd': case 'g': - case 'O': case 'p': -- if (ctx->enc_type == *ts && got_Z == ctx->is_complex && -- ctx->enc_packmode == ctx->new_packmode) { -+ if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) && -+ (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) { - ctx->enc_count += ctx->new_count; - ctx->new_count = 1; - got_Z = 0; -@@ -7085,7 +5729,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - #if CYTHON_COMPILING_IN_CPYTHON - static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; -- ternaryfunc call = func->ob_type->tp_call; -+ ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -@@ -7260,263 +5904,6 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject - } - #endif - --/* PyCFunctionFastCall */ -- #if CYTHON_FAST_PYCCALL --static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { -- PyCFunctionObject *func = (PyCFunctionObject*)func_obj; -- PyCFunction meth = PyCFunction_GET_FUNCTION(func); -- PyObject *self = PyCFunction_GET_SELF(func); -- int flags = PyCFunction_GET_FLAGS(func); -- assert(PyCFunction_Check(func)); -- assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); -- assert(nargs >= 0); -- assert(nargs == 0 || args != NULL); -- /* _PyCFunction_FastCallDict() must not be called with an exception set, -- because it may clear it (directly or indirectly) and so the -- caller loses its exception */ -- assert(!PyErr_Occurred()); -- if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { -- return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); -- } else { -- return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); -- } --} --#endif -- --/* PyFunctionFastCall */ -- #if CYTHON_FAST_PYCALL --static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, -- PyObject *globals) { -- PyFrameObject *f; -- PyThreadState *tstate = __Pyx_PyThreadState_Current; -- PyObject **fastlocals; -- Py_ssize_t i; -- PyObject *result; -- assert(globals != NULL); -- /* XXX Perhaps we should create a specialized -- PyFrame_New() that doesn't take locals, but does -- take builtins without sanity checking them. -- */ -- assert(tstate != NULL); -- f = PyFrame_New(tstate, co, globals, NULL); -- if (f == NULL) { -- return NULL; -- } -- fastlocals = __Pyx_PyFrame_GetLocalsplus(f); -- for (i = 0; i < na; i++) { -- Py_INCREF(*args); -- fastlocals[i] = *args++; -- } -- result = PyEval_EvalFrameEx(f,0); -- ++tstate->recursion_depth; -- Py_DECREF(f); -- --tstate->recursion_depth; -- return result; --} --#if 1 || PY_VERSION_HEX < 0x030600B1 --static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { -- PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); -- PyObject *globals = PyFunction_GET_GLOBALS(func); -- PyObject *argdefs = PyFunction_GET_DEFAULTS(func); -- PyObject *closure; --#if PY_MAJOR_VERSION >= 3 -- PyObject *kwdefs; --#endif -- PyObject *kwtuple, **k; -- PyObject **d; -- Py_ssize_t nd; -- Py_ssize_t nk; -- PyObject *result; -- assert(kwargs == NULL || PyDict_Check(kwargs)); -- nk = kwargs ? PyDict_Size(kwargs) : 0; -- if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { -- return NULL; -- } -- if ( --#if PY_MAJOR_VERSION >= 3 -- co->co_kwonlyargcount == 0 && --#endif -- likely(kwargs == NULL || nk == 0) && -- co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { -- if (argdefs == NULL && co->co_argcount == nargs) { -- result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); -- goto done; -- } -- else if (nargs == 0 && argdefs != NULL -- && co->co_argcount == Py_SIZE(argdefs)) { -- /* function called with no arguments, but all parameters have -- a default value: use default values as arguments .*/ -- args = &PyTuple_GET_ITEM(argdefs, 0); -- result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); -- goto done; -- } -- } -- if (kwargs != NULL) { -- Py_ssize_t pos, i; -- kwtuple = PyTuple_New(2 * nk); -- if (kwtuple == NULL) { -- result = NULL; -- goto done; -- } -- k = &PyTuple_GET_ITEM(kwtuple, 0); -- pos = i = 0; -- while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { -- Py_INCREF(k[i]); -- Py_INCREF(k[i+1]); -- i += 2; -- } -- nk = i / 2; -- } -- else { -- kwtuple = NULL; -- k = NULL; -- } -- closure = PyFunction_GET_CLOSURE(func); --#if PY_MAJOR_VERSION >= 3 -- kwdefs = PyFunction_GET_KW_DEFAULTS(func); --#endif -- if (argdefs != NULL) { -- d = &PyTuple_GET_ITEM(argdefs, 0); -- nd = Py_SIZE(argdefs); -- } -- else { -- d = NULL; -- nd = 0; -- } --#if PY_MAJOR_VERSION >= 3 -- result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, -- args, (int)nargs, -- k, (int)nk, -- d, (int)nd, kwdefs, closure); --#else -- result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, -- args, (int)nargs, -- k, (int)nk, -- d, (int)nd, closure); --#endif -- Py_XDECREF(kwtuple); --done: -- Py_LeaveRecursiveCall(); -- return result; --} --#endif --#endif -- --/* PyObjectCallMethO */ -- #if CYTHON_COMPILING_IN_CPYTHON --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { -- PyObject *self, *result; -- PyCFunction cfunc; -- cfunc = PyCFunction_GET_FUNCTION(func); -- self = PyCFunction_GET_SELF(func); -- if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -- return NULL; -- result = cfunc(self, arg); -- Py_LeaveRecursiveCall(); -- if (unlikely(!result) && unlikely(!PyErr_Occurred())) { -- PyErr_SetString( -- PyExc_SystemError, -- "NULL result without error in PyObject_Call"); -- } -- return result; --} --#endif -- --/* PyObjectCallOneArg */ -- #if CYTHON_COMPILING_IN_CPYTHON --static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { -- PyObject *result; -- PyObject *args = PyTuple_New(1); -- if (unlikely(!args)) return NULL; -- Py_INCREF(arg); -- PyTuple_SET_ITEM(args, 0, arg); -- result = __Pyx_PyObject_Call(func, args, NULL); -- Py_DECREF(args); -- return result; --} --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { --#if CYTHON_FAST_PYCALL -- if (PyFunction_Check(func)) { -- return __Pyx_PyFunction_FastCall(func, &arg, 1); -- } --#endif -- if (likely(PyCFunction_Check(func))) { -- if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { -- return __Pyx_PyObject_CallMethO(func, arg); --#if CYTHON_FAST_PYCCALL -- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { -- return __Pyx_PyCFunction_FastCall(func, &arg, 1); --#endif -- } -- } -- return __Pyx__PyObject_CallOneArg(func, arg); --} --#else --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { -- PyObject *result; -- PyObject *args = PyTuple_Pack(1, arg); -- if (unlikely(!args)) return NULL; -- result = __Pyx_PyObject_Call(func, args, NULL); -- Py_DECREF(args); -- return result; --} --#endif -- --/* DictGetItem */ -- #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { -- PyObject *value; -- value = PyDict_GetItemWithError(d, key); -- if (unlikely(!value)) { -- if (!PyErr_Occurred()) { -- if (unlikely(PyTuple_Check(key))) { -- PyObject* args = PyTuple_Pack(1, key); -- if (likely(args)) { -- PyErr_SetObject(PyExc_KeyError, args); -- Py_DECREF(args); -- } -- } else { -- PyErr_SetObject(PyExc_KeyError, key); -- } -- } -- return NULL; -- } -- Py_INCREF(value); -- return value; --} --#endif -- --/* RaiseTooManyValuesToUnpack */ -- static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { -- PyErr_Format(PyExc_ValueError, -- "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); --} -- --/* RaiseNeedMoreValuesToUnpack */ -- static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { -- PyErr_Format(PyExc_ValueError, -- "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", -- index, (index == 1) ? "" : "s"); --} -- --/* RaiseNoneIterError */ -- static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); --} -- --/* ExtTypeTest */ -- static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { -- if (unlikely(!type)) { -- PyErr_SetString(PyExc_SystemError, "Missing type object"); -- return 0; -- } -- if (likely(__Pyx_TypeCheck(obj, type))) -- return 1; -- PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", -- Py_TYPE(obj)->tp_name, type->tp_name); -- return 0; --} -- - /* GetTopmostException */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * -@@ -7740,6 +6127,28 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - return -1; - } - -+/* PyObjectGetAttrStrNoError */ -+ static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { -+ __Pyx_PyThreadState_declare -+ __Pyx_PyThreadState_assign -+ if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) -+ __Pyx_PyErr_Clear(); -+} -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { -+ PyObject *result; -+#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 -+ PyTypeObject* tp = Py_TYPE(obj); -+ if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { -+ return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); -+ } -+#endif -+ result = __Pyx_PyObject_GetAttrStr(obj, attr_name); -+ if (unlikely(!result)) { -+ __Pyx_PyObject_GetAttrStr_ClearAttributeError(); -+ } -+ return result; -+} -+ - /* SetupReduce */ - static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { - int ret; -@@ -7767,43 +6176,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { - PyObject *setstate = NULL; - PyObject *setstate_cython = NULL; - #if CYTHON_USE_PYTYPE_LOOKUP -- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #else -- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #endif - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #else -- object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #endif -- reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; -+ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; - if (reduce_ex == object_reduce_ex) { - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #else -- object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #endif -- reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; -+ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; - if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { -- reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; -+ reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); -+ if (likely(reduce_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (reduce == object_reduce || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); - if (!setstate) PyErr_Clear(); - if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { -- setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; -+ setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); -+ if (likely(setstate_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (!setstate || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - } - PyType_Modified((PyTypeObject*)type_obj); - } - } -- goto GOOD; --BAD: -+ goto __PYX_GOOD; -+__PYX_BAD: - if (!PyErr_Occurred()) - PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); - ret = -1; --GOOD: -+__PYX_GOOD: - #if !CYTHON_USE_PYTYPE_LOOKUP - Py_XDECREF(object_reduce); - Py_XDECREF(object_reduce_ex); -@@ -7905,7 +6322,7 @@ static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UIN - - /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK --static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { -+static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { - PyObject *use_cline; - PyObject *ptype, *pvalue, *ptraceback; - #if CYTHON_COMPILING_IN_CPYTHON -@@ -7935,7 +6352,7 @@ static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { - } - if (!use_cline) { - c_line = 0; -- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); -+ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; -@@ -8009,7 +6426,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - if (__pyx_code_cache.count == __pyx_code_cache.max_count) { - int new_max = __pyx_code_cache.max_count + 64; - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( -- __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); -+ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); - if (unlikely(!entries)) { - return; - } -@@ -8032,30 +6449,31 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { -- PyCodeObject *py_code = 0; -- PyObject *py_srcfile = 0; -- PyObject *py_funcname = 0; -+ PyCodeObject *py_code = NULL; -+ PyObject *py_funcname = NULL; - #if PY_MAJOR_VERSION < 3 -+ PyObject *py_srcfile = NULL; - py_srcfile = PyString_FromString(filename); -- #else -- py_srcfile = PyUnicode_FromString(filename); -- #endif - if (!py_srcfile) goto bad; -+ #endif - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; -+ funcname = PyUnicode_AsUTF8(py_funcname); -+ if (!funcname) goto bad; - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); -- #else -- py_funcname = PyUnicode_FromString(funcname); -+ if (!py_funcname) goto bad; - #endif - } -- if (!py_funcname) goto bad; -+ #if PY_MAJOR_VERSION < 3 - py_code = __Pyx_PyCode_New( - 0, - 0, -@@ -8074,11 +6492,16 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - __pyx_empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); -- Py_DECREF(py_funcname); -+ #else -+ py_code = PyCode_NewEmpty(filename, funcname, py_line); -+ #endif -+ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline - return py_code; - bad: -- Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -+ #if PY_MAJOR_VERSION < 3 -+ Py_XDECREF(py_srcfile); -+ #endif - return NULL; - } - static void __Pyx_AddTraceback(const char *funcname, int c_line, -@@ -8113,7 +6536,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - #if PY_MAJOR_VERSION < 3 - static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { - if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); -- if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); - PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); - return -1; - } -@@ -8125,7 +6547,6 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - return; - } - if ((0)) {} -- else if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); - view->obj = NULL; - Py_DECREF(obj); - } -@@ -8154,37 +6575,6 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - return (target_type) value;\ - } - --/* CIntToPy */ -- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(int) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(int) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(int) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(int), -- little, !is_unsigned); -- } --} -- - /* Declarations */ - #if CYTHON_CCOMPLEX - #ifdef __cplusplus -@@ -8302,7 +6692,6 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_float(a, a); - return __Pyx_c_prod_float(a, a); - case 3: - z = __Pyx_c_prod_float(a, a); -@@ -8457,7 +6846,6 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_double(a, a); - return __Pyx_c_prod_double(a, a); - case 3: - z = __Pyx_c_prod_double(a, a); -@@ -8495,40 +6883,16 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - #endif - #endif - --/* CIntToPy */ -- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { -- const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(enum NPY_TYPES) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(enum NPY_TYPES) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), -- little, !is_unsigned); -- } --} -- - /* CIntFromPy */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -8715,9 +7079,54 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - return (int) -1; - } - -+/* CIntToPy */ -+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif -+ const int is_unsigned = neg_one > const_zero; -+ if (is_unsigned) { -+ if (sizeof(int) < sizeof(long)) { -+ return PyInt_FromLong((long) value); -+ } else if (sizeof(int) <= sizeof(unsigned long)) { -+ return PyLong_FromUnsignedLong((unsigned long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+#endif -+ } -+ } else { -+ if (sizeof(int) <= sizeof(long)) { -+ return PyInt_FromLong((long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ return PyLong_FromLongLong((PY_LONG_LONG) value); -+#endif -+ } -+ } -+ { -+ int one = 1; int little = (int)*(unsigned char *)&one; -+ unsigned char *bytes = (unsigned char *)&value; -+ return _PyLong_FromByteArray(bytes, sizeof(int), -+ little, !is_unsigned); -+ } -+} -+ - /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(long) < sizeof(long)) { -@@ -8748,7 +7157,14 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - - /* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -9299,6 +7715,23 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_DECREF(x); - return ival; - } -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { -+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { -+ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); -+#if PY_MAJOR_VERSION < 3 -+ } else if (likely(PyInt_CheckExact(o))) { -+ return PyInt_AS_LONG(o); -+#endif -+ } else { -+ Py_ssize_t ival; -+ PyObject *x; -+ x = PyNumber_Index(o); -+ if (!x) return -1; -+ ival = PyInt_AsLong(x); -+ Py_DECREF(x); -+ return ival; -+ } -+} - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); - } -diff --git a/cylp/cy/CyCoinMpsIO.cpp b/cylp/cy/CyCoinMpsIO.cpp -index 268873e..67226b6 100644 ---- a/cylp/cy/CyCoinMpsIO.cpp -+++ b/cylp/cy/CyCoinMpsIO.cpp -@@ -1,14 +1,16 @@ --/* Generated by Cython 0.29.12 */ -+/* Generated by Cython 0.29.25 */ - -+#ifndef PY_SSIZE_T_CLEAN - #define PY_SSIZE_T_CLEAN -+#endif /* PY_SSIZE_T_CLEAN */ - #include "Python.h" - #ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. - #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. - #else --#define CYTHON_ABI "0_29_12" --#define CYTHON_HEX_VERSION 0x001D0CF0 -+#define CYTHON_ABI "0_29_25" -+#define CYTHON_HEX_VERSION 0x001D19F0 - #define CYTHON_FUTURE_DIVISION 0 - #include - #ifndef offsetof -@@ -155,7 +157,7 @@ - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif -- #if PY_VERSION_HEX < 0x030300F0 -+ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) -@@ -174,7 +176,7 @@ - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL -- #define CYTHON_FAST_PYCALL 1 -+ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1) - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) -@@ -193,7 +195,9 @@ - #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) - #endif - #if CYTHON_USE_PYLONG_INTERNALS -- #include "longintrepr.h" -+ #if PY_MAJOR_VERSION < 3 -+ #include "longintrepr.h" -+ #endif - #undef SHIFT - #undef BASE - #undef MASK -@@ -324,9 +328,68 @@ class __Pyx_FakeReference { - #define __Pyx_DefaultClassType PyClass_Type - #else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" --#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 -- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ -- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -+ #define __Pyx_DefaultClassType PyType_Type -+#if PY_VERSION_HEX >= 0x030B00A1 -+ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, -+ PyObject *code, PyObject *c, PyObject* n, PyObject *v, -+ PyObject *fv, PyObject *cell, PyObject* fn, -+ PyObject *name, int fline, PyObject *lnos) { -+ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; -+ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; -+ const char *fn_cstr=NULL; -+ const char *name_cstr=NULL; -+ PyCodeObject* co=NULL; -+ PyObject *type, *value, *traceback; -+ PyErr_Fetch(&type, &value, &traceback); -+ if (!(kwds=PyDict_New())) goto end; -+ if (!(argcount=PyLong_FromLong(a))) goto end; -+ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; -+ if (!(posonlyargcount=PyLong_FromLong(0))) goto end; -+ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; -+ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; -+ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; -+ if (!(nlocals=PyLong_FromLong(l))) goto end; -+ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; -+ if (!(stacksize=PyLong_FromLong(s))) goto end; -+ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; -+ if (!(flags=PyLong_FromLong(f))) goto end; -+ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; -+ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; -+ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; -+ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; -+ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; -+ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here -+ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; -+ Py_XDECREF((PyObject*)co); -+ co = (PyCodeObject*)call_result; -+ call_result = NULL; -+ if (0) { -+ cleanup_code_too: -+ Py_XDECREF((PyObject*)co); -+ co = NULL; -+ } -+ end: -+ Py_XDECREF(kwds); -+ Py_XDECREF(argcount); -+ Py_XDECREF(posonlyargcount); -+ Py_XDECREF(kwonlyargcount); -+ Py_XDECREF(nlocals); -+ Py_XDECREF(stacksize); -+ Py_XDECREF(replace); -+ Py_XDECREF(call_result); -+ Py_XDECREF(empty); -+ if (type) { -+ PyErr_Restore(type, value, traceback); -+ } -+ return co; -+ } - #else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -@@ -440,8 +503,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #endif - #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 -+ #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) -+ #else -+ #define __Pyx_PyUnicode_READY(op) (0) -+ #endif - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) -@@ -449,7 +516,15 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) -+ #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) -+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) -+ #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) -+ #endif -+ #else -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) -+ #endif - #else - #define CYTHON_PEP393_ENABLED 0 - #define PyUnicode_1BYTE_KIND 1 -@@ -498,8 +573,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define PyString_Type PyUnicode_Type - #define PyString_Check PyUnicode_Check - #define PyString_CheckExact PyUnicode_CheckExact -+#ifndef PyObject_Unicode - #define PyObject_Unicode PyObject_Str - #endif -+#endif - #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) - #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) -@@ -510,6 +587,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #ifndef PySet_CheckExact - #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) - #endif -+#if PY_VERSION_HEX >= 0x030900A4 -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) -+#else -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) -+#endif - #if CYTHON_ASSUME_SAFE_MACROS - #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) - #else -@@ -543,13 +627,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong -- #define __Pyx_PyInt_AsHash_t PyInt_AsLong -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t - #else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t -- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t - #endif - #if PY_MAJOR_VERSION >= 3 -- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) -+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) - #else - #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) - #endif -@@ -590,11 +674,10 @@ static CYTHON_INLINE float __PYX_NAN() { - #define __Pyx_truncl truncl - #endif - -- -+#define __PYX_MARK_ERR_POS(f_index, lineno) \ -+ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } - #define __PYX_ERR(f_index, lineno, Ln_error) \ --{ \ -- __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ --} -+ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } - - #ifndef __PYX_EXTERN_C - #ifdef __cplusplus -@@ -610,7 +693,13 @@ static CYTHON_INLINE float __PYX_NAN() { - #include - #include - #include "numpy/arrayobject.h" -+#include "numpy/ndarrayobject.h" -+#include "numpy/ndarraytypes.h" -+#include "numpy/arrayscalars.h" - #include "numpy/ufuncobject.h" -+ -+ /* NumPy API declarations from "numpy/__init__.pxd" */ -+ - #include "ICoinPackedMatrix.hpp" - #include "ICoinMpsIO.hpp" - #ifdef _OPENMP -@@ -709,6 +798,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); - static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); - #if CYTHON_ASSUME_SAFE_MACROS - #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) - #else -@@ -844,13 +934,13 @@ static const char *__pyx_filename; - - static const char *__pyx_f[] = { - "stringsource", -- "cylp\\cy\\CyCoinMpsIO.pyx", -+ "cylp/cy/CyCoinMpsIO.pyx", - "__init__.pxd", - "type.pxd", -- "cylp\\cy\\CyCoinPackedMatrix.pxd", -+ "cylp/cy/CyCoinPackedMatrix.pxd", - }; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":776 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":690 - * # in Cython to enable them only on the right systems. - * - * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< -@@ -859,7 +949,7 @@ static const char *__pyx_f[] = { - */ - typedef npy_int8 __pyx_t_5numpy_int8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":777 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":691 - * - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< -@@ -868,7 +958,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; - */ - typedef npy_int16 __pyx_t_5numpy_int16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":778 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":692 - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< -@@ -877,7 +967,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; - */ - typedef npy_int32 __pyx_t_5numpy_int32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":779 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":693 - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t - * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< -@@ -886,7 +976,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; - */ - typedef npy_int64 __pyx_t_5numpy_int64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":783 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":697 - * #ctypedef npy_int128 int128_t - * - * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< -@@ -895,7 +985,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; - */ - typedef npy_uint8 __pyx_t_5numpy_uint8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":784 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":698 - * - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< -@@ -904,7 +994,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; - */ - typedef npy_uint16 __pyx_t_5numpy_uint16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":785 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":699 - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< -@@ -913,7 +1003,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; - */ - typedef npy_uint32 __pyx_t_5numpy_uint32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":786 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":700 - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t - * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< -@@ -922,7 +1012,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; - */ - typedef npy_uint64 __pyx_t_5numpy_uint64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":790 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":704 - * #ctypedef npy_uint128 uint128_t - * - * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< -@@ -931,7 +1021,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; - */ - typedef npy_float32 __pyx_t_5numpy_float32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":791 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":705 - * - * ctypedef npy_float32 float32_t - * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< -@@ -940,7 +1030,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; - */ - typedef npy_float64 __pyx_t_5numpy_float64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":800 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":714 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< -@@ -949,7 +1039,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; - */ - typedef npy_long __pyx_t_5numpy_int_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":801 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":715 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< -@@ -958,7 +1048,7 @@ typedef npy_long __pyx_t_5numpy_int_t; - */ - typedef npy_longlong __pyx_t_5numpy_long_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":802 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":716 - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t - * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< -@@ -967,7 +1057,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; - */ - typedef npy_longlong __pyx_t_5numpy_longlong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":804 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":718 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< -@@ -976,7 +1066,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; - */ - typedef npy_ulong __pyx_t_5numpy_uint_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":805 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":719 - * - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< -@@ -985,7 +1075,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":806 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":720 - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t - * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< -@@ -994,7 +1084,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":808 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":722 - * ctypedef npy_ulonglong ulonglong_t - * - * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< -@@ -1003,7 +1093,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - */ - typedef npy_intp __pyx_t_5numpy_intp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":809 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":723 - * - * ctypedef npy_intp intp_t - * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< -@@ -1012,7 +1102,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; - */ - typedef npy_uintp __pyx_t_5numpy_uintp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":811 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":725 - * ctypedef npy_uintp uintp_t - * - * ctypedef npy_double float_t # <<<<<<<<<<<<<< -@@ -1021,7 +1111,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; - */ - typedef npy_double __pyx_t_5numpy_float_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":812 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":726 - * - * ctypedef npy_double float_t - * ctypedef npy_double double_t # <<<<<<<<<<<<<< -@@ -1030,7 +1120,7 @@ typedef npy_double __pyx_t_5numpy_float_t; - */ - typedef npy_double __pyx_t_5numpy_double_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":813 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":727 - * ctypedef npy_double float_t - * ctypedef npy_double double_t - * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< -@@ -1067,7 +1157,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(do - struct __pyx_obj_4cylp_2cy_18CyCoinPackedMatrix_CyCoinPackedMatrix; - struct __pyx_obj_4cylp_2cy_11CyCoinMpsIO_CyCoinMpsIO; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":815 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":729 - * ctypedef npy_longdouble longdouble_t - * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< -@@ -1076,7 +1166,7 @@ struct __pyx_obj_4cylp_2cy_11CyCoinMpsIO_CyCoinMpsIO; - */ - typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":816 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":730 - * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< -@@ -1085,7 +1175,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - */ - typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":817 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":731 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< -@@ -1094,7 +1184,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - */ - typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":819 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":733 - * ctypedef npy_clongdouble clongdouble_t - * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< -@@ -1232,6 +1322,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #ifndef Py_MEMBER_SIZE - #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) - #endif -+#if CYTHON_FAST_PYCALL - static size_t __pyx_pyframe_localsplus_offset = 0; - #include "frameobject.h" - #define __Pxy_PyFrame_Initialize_Offsets()\ -@@ -1239,6 +1330,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) - #define __Pyx_PyFrame_GetLocalsplus(frame)\ - (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) -+#endif // CYTHON_FAST_PYCALL - #endif - - /* PyObjectCall.proto */ -@@ -1369,29 +1461,6 @@ static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_c - /* PatchInspect.proto */ - static PyObject* __Pyx_patch_inspect(PyObject* module); - --/* DictGetItem.proto */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); --#define __Pyx_PyObject_Dict_GetItem(obj, name)\ -- (likely(PyDict_CheckExact(obj)) ?\ -- __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) --#else --#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) --#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) --#endif -- --/* RaiseTooManyValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); -- --/* RaiseNeedMoreValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); -- --/* RaiseNoneIterError.proto */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -- --/* ExtTypeTest.proto */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); -- - /* GetTopmostException.proto */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); -@@ -1438,6 +1507,9 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr - #endif - -+/* PyObjectGetAttrStrNoError.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); -+ - /* SetupReduce.proto */ - static int __Pyx_setup_reduce(PyObject* type_obj); - -@@ -1523,8 +1595,10 @@ static void __Pyx_CppExn2PyErr() { - } - #endif - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -+/* GCCDiagnostics.proto */ -+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -+#define __Pyx_HAS_GCC_DIAGNOSTIC -+#endif - - /* RealImag.proto */ - #if CYTHON_CCOMPLEX -@@ -1625,7 +1699,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); - #endif - - /* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); - - /* CIntFromPy.proto */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); -@@ -1682,8 +1756,17 @@ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; - static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; - static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; - static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -+static PyTypeObject *__pyx_ptype_5numpy_generic = 0; -+static PyTypeObject *__pyx_ptype_5numpy_number = 0; -+static PyTypeObject *__pyx_ptype_5numpy_integer = 0; -+static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; -+static PyTypeObject *__pyx_ptype_5numpy_floating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; -+static PyTypeObject *__pyx_ptype_5numpy_character = 0; - static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ - - /* Module declarations from 'cylp.cy.CyCoinPackedMatrix' */ - static PyTypeObject *__pyx_ptype_4cylp_2cy_18CyCoinPackedMatrix_CyCoinPackedMatrix = 0; -@@ -1696,9 +1779,6 @@ int __pyx_module_is_main_cylp__cy__CyCoinMpsIO = 0; - - /* Implementation of 'cylp.cy.CyCoinMpsIO' */ - static PyObject *__pyx_builtin_TypeError; --static PyObject *__pyx_builtin_ValueError; --static PyObject *__pyx_builtin_range; --static PyObject *__pyx_builtin_RuntimeError; - static PyObject *__pyx_builtin_ImportError; - static const char __pyx_k_T[] = "T"; - static const char __pyx_k_np[] = "np"; -@@ -1709,7 +1789,6 @@ static const char __pyx_k_name[] = "__name__"; - static const char __pyx_k_path[] = "path"; - static const char __pyx_k_test[] = "__test__"; - static const char __pyx_k_numpy[] = "numpy"; --static const char __pyx_k_range[] = "range"; - static const char __pyx_k_scipy[] = "scipy"; - static const char __pyx_k_shape[] = "shape"; - static const char __pyx_k_utf_8[] = "utf-8"; -@@ -1730,12 +1809,10 @@ static const char __pyx_k_QPColumns[] = "QPColumns"; - static const char __pyx_k_TypeError[] = "TypeError"; - static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; - static const char __pyx_k_QPElements[] = "QPElements"; --static const char __pyx_k_ValueError[] = "ValueError"; - static const char __pyx_k_dia_matrix[] = "dia_matrix"; - static const char __pyx_k_nVariables[] = "nVariables"; - static const char __pyx_k_CyCoinMpsIO[] = "CyCoinMpsIO"; - static const char __pyx_k_ImportError[] = "ImportError"; --static const char __pyx_k_RuntimeError[] = "RuntimeError"; - static const char __pyx_k_currentframe[] = "currentframe"; - static const char __pyx_k_nConstraints[] = "nConstraints"; - static const char __pyx_k_scipy_sparse[] = "scipy.sparse"; -@@ -1749,34 +1826,23 @@ static const char __pyx_k_input_hs268_qps[] = "../input/hs268.qps"; - static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; - static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; - static const char __pyx_k_cylp_cy_CyCoinMpsIO[] = "cylp.cy.CyCoinMpsIO"; --static const char __pyx_k_cylp_cy_CyCoinMpsIO_pyx[] = "cylp\\cy\\CyCoinMpsIO.pyx"; -+static const char __pyx_k_cylp_cy_CyCoinMpsIO_pyx[] = "cylp/cy/CyCoinMpsIO.pyx"; - static const char __pyx_k_cylp_py_utils_sparseUtil[] = "cylp.py.utils.sparseUtil"; - static const char __pyx_k_CyCoinMpsIO_readMps_line_21[] = "CyCoinMpsIO.readMps (line 21)"; --static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; - static const char __pyx_k_Read_an_mps_file_Check_if_the_f[] = "\n Read an mps file. Check if the file is a QP symmetrisize its Hessian\n and store it.\n\n >>> import numpy as np\n >>> from cylp.cy import CyCoinMpsIO\n >>> from cylp.cy.CyCoinMpsIO import getQpsExample\n >>> problem = CyCoinMpsIO()\n >>> problem.readMps(getQpsExample())\n 0\n >>> problem.nVariables\n 5\n >>> problem.nConstraints\n 5\n >>> signs = problem.constraintSigns\n >>> [chr(i) for i in signs] == problem.nConstraints * ['G']\n True\n >>> c = problem.matrixByRow\n >>> (abs(c.elements -\n ... np.array([-1., -1., -1., -1., -1., 10., 10., -3.,\n ... 5., 4., -8., 1., -2., -5., 3., 8., -1., 2.,\n ... 5., -3., -4., -2., 3., -5., 1.])) <\n ... 10 ** -8).all()\n True\n >>> (c.indices ==\n ... np.array([0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1,\n ... 2, 3, 4, 0, 1, 2, 3, 4], dtype=np.int32)).all()\n True\n >>> (c.vectorStarts ==\n ... np.array([0, 5, 10, 15, 20, 25], dtype=np.int32)).all()\n True\n >>> (problem.rightHandSide ==\n ... np.array([-5., 20., -40., 11., -30.])).all()\n True\n >>> H = problem.Hessian.todense()\n >>> (abs(H -\n ... np.matrix([[20394., -24908., -2026., 3896., 658.],\n ... [-24908., 41818., -3466., -9828., -372.],\n ... [-2026., -3466., 3510., 2178., -348.],\n ... [3896., -9828., 2178., 3030., -44.],\n ... [658., -372., -348., -44., 54.]])) <\n ... 10 ** -8).all()\n True\n\n "; - static const char __pyx_k_This_module_interface_COIN_OR_s[] = "\nThis module interface COIN-OR's ``CoinMpsIO``. When you call\n:func:`cylp.cy.CyClpSimplex.readMps` then ``CoinMpsIO``'s ``readMps`` is\ncalled. The main reason why cylp interfaces this class is to be able to read\nan ``mps`` file without creating a Simplex object. This way it is possible to\nread a QP using CoinMpsIO and work on the elements of the problem, e.g. the\nHessian,...\n"; - static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; --static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; --static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; --static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; --static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; - static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; - static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; --static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; - static PyObject *__pyx_n_s_CyCoinMpsIO; - static PyObject *__pyx_kp_u_CyCoinMpsIO_readMps_line_21; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; - static PyObject *__pyx_n_s_ImportError; --static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; - static PyObject *__pyx_n_s_QPColumnStarts; - static PyObject *__pyx_n_s_QPColumns; - static PyObject *__pyx_n_s_QPElements; - static PyObject *__pyx_kp_u_Read_an_mps_file_Check_if_the_f; --static PyObject *__pyx_n_s_RuntimeError; - static PyObject *__pyx_n_s_T; - static PyObject *__pyx_n_s_TypeError; --static PyObject *__pyx_n_s_ValueError; - static PyObject *__pyx_n_s_checkSymmetry; - static PyObject *__pyx_n_s_cline_in_traceback; - static PyObject *__pyx_n_s_csc_matrixPlus; -@@ -1803,8 +1869,6 @@ static PyObject *__pyx_n_s_main; - static PyObject *__pyx_n_s_nConstraints; - static PyObject *__pyx_n_s_nVariables; - static PyObject *__pyx_n_s_name; --static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; --static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; - static PyObject *__pyx_kp_s_no_default___reduce___due_to_non; - static PyObject *__pyx_n_s_np; - static PyObject *__pyx_n_s_numpy; -@@ -1812,7 +1876,6 @@ static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; - static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; - static PyObject *__pyx_n_s_os; - static PyObject *__pyx_n_s_path; --static PyObject *__pyx_n_s_range; - static PyObject *__pyx_n_s_reduce; - static PyObject *__pyx_n_s_reduce_cython; - static PyObject *__pyx_n_s_reduce_ex; -@@ -1823,7 +1886,6 @@ static PyObject *__pyx_n_s_setstate_cython; - static PyObject *__pyx_n_s_shape; - static PyObject *__pyx_n_s_sparse; - static PyObject *__pyx_n_s_test; --static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; - static PyObject *__pyx_kp_s_utf_8; - static int __pyx_pf_4cylp_2cy_11CyCoinMpsIO_11CyCoinMpsIO___cinit__(struct __pyx_obj_4cylp_2cy_11CyCoinMpsIO_CyCoinMpsIO *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_11CyCoinMpsIO_11CyCoinMpsIO_2readMps(struct __pyx_obj_4cylp_2cy_11CyCoinMpsIO_CyCoinMpsIO *__pyx_v_self, PyObject *__pyx_v_filename); /* proto */ -@@ -1850,8 +1912,6 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinMpsIO_11CyCoinMpsIO_12nConstraints__ - static PyObject *__pyx_pf_4cylp_2cy_11CyCoinMpsIO_11CyCoinMpsIO_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_11CyCoinMpsIO_CyCoinMpsIO *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_11CyCoinMpsIO_11CyCoinMpsIO_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_11CyCoinMpsIO_CyCoinMpsIO *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_11CyCoinMpsIO_getQpsExample(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ - static PyObject *__pyx_tp_new_4cylp_2cy_11CyCoinMpsIO_CyCoinMpsIO(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ - static PyObject *__pyx_int_0; - static PyObject *__pyx_tuple_; -@@ -1859,12 +1919,7 @@ static PyObject *__pyx_tuple__2; - static PyObject *__pyx_tuple__3; - static PyObject *__pyx_tuple__4; - static PyObject *__pyx_tuple__5; --static PyObject *__pyx_tuple__6; --static PyObject *__pyx_tuple__7; --static PyObject *__pyx_tuple__8; --static PyObject *__pyx_tuple__9; --static PyObject *__pyx_tuple__10; --static PyObject *__pyx_codeobj__11; -+static PyObject *__pyx_codeobj__6; - /* Late includes */ - - /* "cylp/cy/CyCoinMpsIO.pyx":17 -@@ -1895,6 +1950,9 @@ static int __pyx_pf_4cylp_2cy_11CyCoinMpsIO_11CyCoinMpsIO___cinit__(struct __pyx - int __pyx_r; - __Pyx_RefNannyDeclarations - ICoinMpsIO *__pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - - /* "cylp/cy/CyCoinMpsIO.pyx":18 -@@ -1984,6 +2042,9 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinMpsIO_11CyCoinMpsIO_2readMps(struct - char *__pyx_t_6; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("readMps", 0); - __Pyx_INCREF(__pyx_v_filename); - -@@ -2319,6 +2380,9 @@ static PyObject *__pyx_pw_4cylp_2cy_11CyCoinMpsIO_11CyCoinMpsIO_5readQuadraticMp - static PyObject *__pyx_pw_4cylp_2cy_11CyCoinMpsIO_11CyCoinMpsIO_5readQuadraticMps(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - CYTHON_UNUSED PyObject *__pyx_v_filename = 0; - PyObject *__pyx_v_checkSymmetry = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("readQuadraticMps (wrapper)", 0); -@@ -2380,6 +2444,9 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinMpsIO_11CyCoinMpsIO_4readQuadraticMp - __Pyx_RefNannyDeclarations - int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("readQuadraticMps", 0); - - /* "cylp/cy/CyCoinMpsIO.pyx":88 -@@ -3209,6 +3276,9 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinMpsIO_11CyCoinMpsIO_11matrixByRow___ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyCoinMpsIO.pyx":147 -@@ -3300,6 +3370,9 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinMpsIO_11CyCoinMpsIO_11matrixByCol___ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyCoinMpsIO.pyx":154 -@@ -3389,6 +3462,9 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinMpsIO_11CyCoinMpsIO_15objectiveOffse - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyCoinMpsIO.pyx":161 -@@ -3449,6 +3525,9 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinMpsIO_11CyCoinMpsIO_10nVariables___g - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyCoinMpsIO.pyx":165 -@@ -3509,6 +3588,9 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinMpsIO_11CyCoinMpsIO_12nConstraints__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyCoinMpsIO.pyx":169 -@@ -3567,6 +3649,9 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinMpsIO_11CyCoinMpsIO_6__reduce_cython - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -3621,6 +3706,9 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinMpsIO_11CyCoinMpsIO_8__setstate_cyth - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -3688,6 +3776,9 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinMpsIO_getQpsExample(CYTHON_UNUSED Py - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("getQpsExample", 0); - - /* "cylp/cy/CyCoinMpsIO.pyx":176 -@@ -3870,863 +3961,7 @@ static PyObject *__pyx_pf_4cylp_2cy_11CyCoinMpsIO_getQpsExample(CYTHON_UNUSED Py - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); -- __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_v_i; -- int __pyx_v_ndim; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- int __pyx_v_t; -- char *__pyx_v_f; -- PyArray_Descr *__pyx_v_descr = 0; -- int __pyx_v_offset; -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- int __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- int __pyx_t_4; -- int __pyx_t_5; -- int __pyx_t_6; -- PyArray_Descr *__pyx_t_7; -- PyObject *__pyx_t_8 = NULL; -- char *__pyx_t_9; -- if (__pyx_v_info == NULL) { -- PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); -- return -1; -- } -- __Pyx_RefNannySetupContext("__getbuffer__", 0); -- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); -- __Pyx_GIVEREF(__pyx_v_info->obj); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":265 -- * -- * cdef int i, ndim -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":266 -- * cdef int i, ndim -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * -- * ndim = PyArray_NDIM(self) -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":268 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- */ -- __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L4_bool_binop_done; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":271 -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not C contiguous") -- * -- */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L4_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 272, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L7_bool_binop_done; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":275 -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not Fortran contiguous") -- * -- */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 276, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":278 -- * raise ValueError(u"ndarray is not Fortran contiguous") -- * -- * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":279 -- * -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * # Allocate new buffer for strides and shape info. -- */ -- __pyx_v_info->ndim = __pyx_v_ndim; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":283 -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- */ -- __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":284 -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim # <<<<<<<<<<<<<< -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- */ -- __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":285 -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim -- * for i in range(ndim): # <<<<<<<<<<<<<< -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] -- */ -- __pyx_t_4 = __pyx_v_ndim; -- __pyx_t_5 = __pyx_t_4; -- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { -- __pyx_v_i = __pyx_t_6; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":286 -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- */ -- (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":287 -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< -- * else: -- * info.strides = PyArray_STRIDES(self) -- */ -- (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- goto __pyx_L9; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":289 -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- */ -- /*else*/ { -- __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":290 -- * else: -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- */ -- __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); -- } -- __pyx_L9:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":291 -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL # <<<<<<<<<<<<<< -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) -- */ -- __pyx_v_info->suboffsets = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":292 -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< -- * info.readonly = not PyArray_ISWRITEABLE(self) -- * -- */ -- __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":293 -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< -- * -- * cdef int t -- */ -- __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":296 -- * -- * cdef int t -- * cdef char* f = NULL # <<<<<<<<<<<<<< -- * cdef dtype descr = PyArray_DESCR(self) -- * cdef int offset -- */ -- __pyx_v_f = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":297 -- * cdef int t -- * cdef char* f = NULL -- * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< -- * cdef int offset -- * -- */ -- __pyx_t_7 = PyArray_DESCR(__pyx_v_self); -- __pyx_t_3 = ((PyObject *)__pyx_t_7); -- __Pyx_INCREF(__pyx_t_3); -- __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":300 -- * cdef int offset -- * -- * info.obj = self # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(descr): -- */ -- __Pyx_INCREF(((PyObject *)__pyx_v_self)); -- __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); -- __pyx_v_info->obj = ((PyObject *)__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":303 -- * -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num # <<<<<<<<<<<<<< -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- */ -- __pyx_t_4 = __pyx_v_descr->type_num; -- __pyx_v_t = __pyx_t_4; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); -- if (!__pyx_t_2) { -- goto __pyx_L15_next_or; -- } else { -- } -- __pyx_t_2 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_L15_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":305 -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L14_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 306, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":307 -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- */ -- switch (__pyx_v_t) { -- case NPY_BYTE: -- __pyx_v_f = ((char *)"b"); -- break; -- case NPY_UBYTE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":308 -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- */ -- __pyx_v_f = ((char *)"B"); -- break; -- case NPY_SHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":309 -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- */ -- __pyx_v_f = ((char *)"h"); -- break; -- case NPY_USHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":310 -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- */ -- __pyx_v_f = ((char *)"H"); -- break; -- case NPY_INT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":311 -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- */ -- __pyx_v_f = ((char *)"i"); -- break; -- case NPY_UINT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":312 -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- */ -- __pyx_v_f = ((char *)"I"); -- break; -- case NPY_LONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":313 -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- */ -- __pyx_v_f = ((char *)"l"); -- break; -- case NPY_ULONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":314 -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- */ -- __pyx_v_f = ((char *)"L"); -- break; -- case NPY_LONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":315 -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- */ -- __pyx_v_f = ((char *)"q"); -- break; -- case NPY_ULONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":316 -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- */ -- __pyx_v_f = ((char *)"Q"); -- break; -- case NPY_FLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":317 -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- */ -- __pyx_v_f = ((char *)"f"); -- break; -- case NPY_DOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":318 -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- */ -- __pyx_v_f = ((char *)"d"); -- break; -- case NPY_LONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":319 -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- */ -- __pyx_v_f = ((char *)"g"); -- break; -- case NPY_CFLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":320 -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- */ -- __pyx_v_f = ((char *)"Zf"); -- break; -- case NPY_CDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":321 -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" -- */ -- __pyx_v_f = ((char *)"Zd"); -- break; -- case NPY_CLONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":322 -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f = "O" -- * else: -- */ -- __pyx_v_f = ((char *)"Zg"); -- break; -- case NPY_OBJECT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":323 -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_v_f = ((char *)"O"); -- break; -- default: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":325 -- * elif t == NPY_OBJECT: f = "O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * info.format = f -- * return -- */ -- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_8); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 325, __pyx_L1_error) -- break; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":326 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f # <<<<<<<<<<<<<< -- * return -- * else: -- */ -- __pyx_v_info->format = __pyx_v_f; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":327 -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f -- * return # <<<<<<<<<<<<<< -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- */ -- __pyx_r = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":329 -- * return -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- */ -- /*else*/ { -- __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":330 -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, -- */ -- (__pyx_v_info->format[0]) = '^'; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":331 -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 # <<<<<<<<<<<<<< -- * f = _util_dtypestring(descr, info.format + 1, -- * info.format + _buffer_format_string_len, -- */ -- __pyx_v_offset = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":332 -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< -- * info.format + _buffer_format_string_len, -- * &offset) -- */ -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":335 -- * info.format + _buffer_format_string_len, -- * &offset) -- * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- */ -- (__pyx_v_f[0]) = '\x00'; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- -- /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; -- if (__pyx_v_info->obj != NULL) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- goto __pyx_L2; -- __pyx_L0:; -- if (__pyx_v_info->obj == Py_None) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- __pyx_L2:; -- __Pyx_XDECREF((PyObject *)__pyx_v_descr); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); -- __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("__releasebuffer__", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":339 -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) -- */ -- PyObject_Free(__pyx_v_info->format); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":341 -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) # <<<<<<<<<<<<<< -- * # info.shape was stored after info.strides in the same block -- * -- */ -- PyObject_Free(__pyx_v_info->strides); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -@@ -4738,9 +3973,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":822 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":736 - * - * cdef inline object PyArray_MultiIterNew1(a): - * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< -@@ -4748,13 +3986,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - * cdef inline object PyArray_MultiIterNew2(a, b): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -@@ -4773,7 +4011,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -@@ -4785,9 +4023,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":825 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":739 - * - * cdef inline object PyArray_MultiIterNew2(a, b): - * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< -@@ -4795,13 +4036,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - * cdef inline object PyArray_MultiIterNew3(a, b, c): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -@@ -4820,7 +4061,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -@@ -4832,9 +4073,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":828 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":742 - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): - * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< -@@ -4842,13 +4086,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -@@ -4867,7 +4111,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -4879,9 +4123,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":831 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":745 - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -@@ -4889,13 +4136,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -4914,7 +4161,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -4926,9 +4173,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":834 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":748 - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< -@@ -4936,13 +4186,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - * cdef inline tuple PyDataType_SHAPE(dtype d): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -4961,7 +4211,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -4975,7 +4225,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - int __pyx_t_1; - __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -4985,7 +4235,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":838 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":752 - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): - * return d.subarray.shape # <<<<<<<<<<<<<< -@@ -4997,7 +4247,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -5006,12 +4256,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":840 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":754 - * return d.subarray.shape - * else: - * return () # <<<<<<<<<<<<<< - * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: -+ * - */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); -@@ -5020,7 +4270,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - goto __pyx_L0; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -5035,774 +4285,28 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 -+ * int _import_umath() except -1 - * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -+ * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -+ * Py_INCREF(base) # important to do this before stealing the reference below! -+ * PyArray_SetBaseObject(arr, base) - */ - --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { -- PyArray_Descr *__pyx_v_child = 0; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- PyObject *__pyx_v_fields = 0; -- PyObject *__pyx_v_childname = NULL; -- PyObject *__pyx_v_new_offset = NULL; -- PyObject *__pyx_v_t = NULL; -- char *__pyx_r; -+static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { - __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- Py_ssize_t __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- PyObject *__pyx_t_4 = NULL; -- int __pyx_t_5; -- int __pyx_t_6; -- int __pyx_t_7; -- long __pyx_t_8; -- char *__pyx_t_9; -- __Pyx_RefNannySetupContext("_util_dtypestring", 0); -+ __Pyx_RefNannySetupContext("set_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":847 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":930 - * -- * cdef dtype child -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * cdef tuple fields -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":848 -- * cdef dtype child -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * cdef tuple fields -- * -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- if (unlikely(__pyx_v_descr->names == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -- __PYX_ERR(2, 851, __pyx_L1_error) -- } -- __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; -- for (;;) { -- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 851, __pyx_L1_error) -- #else -- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- #endif -- __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":852 -- * -- * for childname in descr.names: -- * fields = descr.fields[childname] # <<<<<<<<<<<<<< -- * child, new_offset = fields -- * -- */ -- if (unlikely(__pyx_v_descr->fields == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); -- __PYX_ERR(2, 852, __pyx_L1_error) -- } -- __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":853 -- * for childname in descr.names: -- * fields = descr.fields[childname] -- * child, new_offset = fields # <<<<<<<<<<<<<< -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- */ -- if (likely(__pyx_v_fields != Py_None)) { -- PyObject* sequence = __pyx_v_fields; -- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); -- if (unlikely(size != 2)) { -- if (size > 2) __Pyx_RaiseTooManyValuesError(2); -- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); -- __PYX_ERR(2, 853, __pyx_L1_error) -- } -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); -- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); -- __Pyx_INCREF(__pyx_t_3); -- __Pyx_INCREF(__pyx_t_4); -- #else -- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- #endif -- } else { -- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error) -- } -- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); -- __pyx_t_3 = 0; -- __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 856, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); -- if (!__pyx_t_7) { -- goto __pyx_L8_next_or; -- } else { -- } -- __pyx_t_7 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_L8_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":859 -- * -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * # One could encode it in the format string and have Cython -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); -- if (__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_6 = __pyx_t_7; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":860 -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * # One could encode it in the format string and have Cython -- * # complain instead, BUT: < and > in format strings also imply -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 860, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":870 -- * -- * # Output padding bytes -- * while offset[0] < new_offset: # <<<<<<<<<<<<<< -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- */ -- while (1) { -- __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (!__pyx_t_6) break; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":871 -- * # Output padding bytes -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< -- * f += 1 -- * offset[0] += 1 -- */ -- (__pyx_v_f[0]) = 0x78; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":872 -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte -- * f += 1 # <<<<<<<<<<<<<< -- * offset[0] += 1 -- * -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":873 -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- * offset[0] += 1 # <<<<<<<<<<<<<< -- * -- * offset[0] += child.itemsize -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":875 -- * offset[0] += 1 -- * -- * offset[0] += child.itemsize # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(child): -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); -- if (__pyx_t_6) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":878 -- * -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num # <<<<<<<<<<<<<< -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 880, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":883 -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 98; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":884 -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":885 -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x68; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":886 -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 72; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":887 -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x69; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":888 -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 73; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":889 -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x6C; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":890 -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 76; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":891 -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x71; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":892 -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 81; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":893 -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":894 -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x64; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":895 -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x67; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":896 -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x66; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":897 -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x64; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":898 -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x67; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":899 -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (likely(__pyx_t_6)) { -- (__pyx_v_f[0]) = 79; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":901 -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * f += 1 -- * else: -- */ -- /*else*/ { -- __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 901, __pyx_L1_error) -- } -- __pyx_L15:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":902 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * f += 1 # <<<<<<<<<<<<<< -- * else: -- * # Cython ignores struct boundary information ("T{...}"), -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- goto __pyx_L13; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":906 -- * # Cython ignores struct boundary information ("T{...}"), -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< -- * return f -- * -- */ -- /*else*/ { -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 906, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- } -- __pyx_L13:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- } -- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":907 -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) -- * return f # <<<<<<<<<<<<<< -- * -- * -- */ -- __pyx_r = __pyx_v_f; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_4); -- __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = NULL; -- __pyx_L0:; -- __Pyx_XDECREF((PyObject *)__pyx_v_child); -- __Pyx_XDECREF(__pyx_v_fields); -- __Pyx_XDECREF(__pyx_v_childname); -- __Pyx_XDECREF(__pyx_v_new_offset); -- __Pyx_XDECREF(__pyx_v_t); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -- * int _import_umath() except -1 -- * -- * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -- * Py_INCREF(base) # important to do this before stealing the reference below! -- * PyArray_SetBaseObject(arr, base) -- */ -- --static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("set_array_base", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1023 -- * -- * cdef inline void set_array_base(ndarray arr, object base): -- * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< -- * PyArray_SetBaseObject(arr, base) -+ * cdef inline void set_array_base(ndarray arr, object base): -+ * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< -+ * PyArray_SetBaseObject(arr, base) - * - */ - Py_INCREF(__pyx_v_base); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1024 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":931 - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< -@@ -5811,7 +4315,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -5823,7 +4327,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyFinishContext(); - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5838,7 +4342,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - int __pyx_t_1; - __Pyx_RefNannySetupContext("get_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1027 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":934 - * - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< -@@ -5847,7 +4351,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - __pyx_v_base = PyArray_BASE(__pyx_v_arr); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5857,7 +4361,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_t_1 = ((__pyx_v_base == NULL) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1029 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":936 - * base = PyArray_BASE(arr) - * if base is NULL: - * return None # <<<<<<<<<<<<<< -@@ -5868,7 +4372,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5877,7 +4381,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1030 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":937 - * if base is NULL: - * return None - * return base # <<<<<<<<<<<<<< -@@ -5889,7 +4393,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = ((PyObject *)__pyx_v_base); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5904,12 +4408,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { -@@ -5923,13 +4427,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_array", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - { -@@ -5941,20 +4448,20 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1036 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":943 - * cdef inline int import_array() except -1: - * try: -- * _import_array() # <<<<<<<<<<<<<< -+ * __pyx_import_array() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") - */ -- __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error) -+ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - } -@@ -5964,9 +4471,9 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1037 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":944 - * try: -- * _import_array() -+ * __pyx_import_array() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.multiarray failed to import") - * -@@ -5974,32 +4481,32 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __PYX_ERR(2, 945, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - __Pyx_XGIVEREF(__pyx_t_1); -@@ -6010,12 +4517,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - /* function exit code */ -@@ -6033,7 +4540,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -6052,9 +4559,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_umath", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -6070,16 +4580,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1042 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":949 - * cdef inline int import_umath() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -6093,7 +4603,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1043 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":950 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< -@@ -6103,28 +4613,28 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __PYX_ERR(2, 951, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -6139,7 +4649,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -6162,7 +4672,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -6181,9 +4691,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_ufunc", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -6199,16 +4712,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1048 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":955 - * cdef inline int import_ufunc() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -6222,35 +4735,38 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1049 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":956 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") -+ * - */ - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1050 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":957 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -+ * -+ * cdef extern from *: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __PYX_ERR(2, 957, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -6265,7 +4781,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -6288,6 +4804,180 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - return __pyx_r; - } - -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_timedelta64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":979 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_datetime64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":994 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { -+ npy_datetime __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1004 -+ * also needed. That can be found using `get_datetime64_unit`. -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { -+ npy_timedelta __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1011 -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { -+ NPY_DATETIMEUNIT __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1018 -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ * """ -+ * return (obj).obmeta.base # <<<<<<<<<<<<<< -+ */ -+ __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ - static PyObject *__pyx_tp_new_4cylp_2cy_11CyCoinMpsIO_CyCoinMpsIO(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_4cylp_2cy_11CyCoinMpsIO_CyCoinMpsIO *p; - PyObject *o; -@@ -6454,7 +5144,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_11CyCoinMpsIO_CyCoinMpsIO = { - sizeof(struct __pyx_obj_4cylp_2cy_11CyCoinMpsIO_CyCoinMpsIO), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_11CyCoinMpsIO_CyCoinMpsIO, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -6507,6 +5202,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_11CyCoinMpsIO_CyCoinMpsIO = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyMethodDef __pyx_methods[] = { -@@ -6557,18 +5258,13 @@ static struct PyModuleDef __pyx_moduledef = { - static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_CyCoinMpsIO, __pyx_k_CyCoinMpsIO, sizeof(__pyx_k_CyCoinMpsIO), 0, 0, 1, 1}, - {&__pyx_kp_u_CyCoinMpsIO_readMps_line_21, __pyx_k_CyCoinMpsIO_readMps_line_21, sizeof(__pyx_k_CyCoinMpsIO_readMps_line_21), 0, 1, 0, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, - {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, -- {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, - {&__pyx_n_s_QPColumnStarts, __pyx_k_QPColumnStarts, sizeof(__pyx_k_QPColumnStarts), 0, 0, 1, 1}, - {&__pyx_n_s_QPColumns, __pyx_k_QPColumns, sizeof(__pyx_k_QPColumns), 0, 0, 1, 1}, - {&__pyx_n_s_QPElements, __pyx_k_QPElements, sizeof(__pyx_k_QPElements), 0, 0, 1, 1}, - {&__pyx_kp_u_Read_an_mps_file_Check_if_the_f, __pyx_k_Read_an_mps_file_Check_if_the_f, sizeof(__pyx_k_Read_an_mps_file_Check_if_the_f), 0, 1, 0, 0}, -- {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, - {&__pyx_n_s_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 0, 1, 1}, - {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, -- {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_n_s_checkSymmetry, __pyx_k_checkSymmetry, sizeof(__pyx_k_checkSymmetry), 0, 0, 1, 1}, - {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, - {&__pyx_n_s_csc_matrixPlus, __pyx_k_csc_matrixPlus, sizeof(__pyx_k_csc_matrixPlus), 0, 0, 1, 1}, -@@ -6595,8 +5291,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_nConstraints, __pyx_k_nConstraints, sizeof(__pyx_k_nConstraints), 0, 0, 1, 1}, - {&__pyx_n_s_nVariables, __pyx_k_nVariables, sizeof(__pyx_k_nVariables), 0, 0, 1, 1}, - {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, -- {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, -- {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, - {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, - {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, - {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, -@@ -6604,7 +5298,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, - {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1}, - {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1}, -- {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, - {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, -@@ -6615,16 +5308,12 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1}, - {&__pyx_n_s_sparse, __pyx_k_sparse, sizeof(__pyx_k_sparse), 0, 0, 1, 1}, - {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, -- {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, - {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0}, - {0, 0, 0, 0, 0, 0, 0} - }; - static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error) -- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error) -- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(2, 285, __pyx_L1_error) -- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 856, __pyx_L1_error) -- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error) -+ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 945, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -@@ -6653,82 +5342,27 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_GOTREF(__pyx_tuple__2); - __Pyx_GIVEREF(__pyx_tuple__2); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__3); -- __Pyx_GIVEREF(__pyx_tuple__3); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__4); -- __Pyx_GIVEREF(__pyx_tuple__4); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__5); -- __Pyx_GIVEREF(__pyx_tuple__5); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__6); -- __Pyx_GIVEREF(__pyx_tuple__6); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__7); -- __Pyx_GIVEREF(__pyx_tuple__7); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 1038, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__8); -- __Pyx_GIVEREF(__pyx_tuple__8); -+ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 945, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__3); -+ __Pyx_GIVEREF(__pyx_tuple__3); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 1044, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__9); -- __Pyx_GIVEREF(__pyx_tuple__9); -+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 951, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__4); -+ __Pyx_GIVEREF(__pyx_tuple__4); - - /* "cylp/cy/CyCoinMpsIO.pyx":172 - * -@@ -6737,10 +5371,10 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - * ''' - * Return full path to a QPS example file for doctests - */ -- __pyx_tuple__10 = PyTuple_Pack(3, __pyx_n_s_os, __pyx_n_s_inspect, __pyx_n_s_curpath); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(1, 172, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__10); -- __Pyx_GIVEREF(__pyx_tuple__10); -- __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cylp_cy_CyCoinMpsIO_pyx, __pyx_n_s_getQpsExample, 172, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(1, 172, __pyx_L1_error) -+ __pyx_tuple__5 = PyTuple_Pack(3, __pyx_n_s_os, __pyx_n_s_inspect, __pyx_n_s_curpath); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(1, 172, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__5); -+ __Pyx_GIVEREF(__pyx_tuple__5); -+ __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__5, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cylp_cy_CyCoinMpsIO_pyx, __pyx_n_s_getQpsExample, 172, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(1, 172, __pyx_L1_error) - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -6790,6 +5424,9 @@ static int __Pyx_modinit_function_export_code(void) { - - static int __Pyx_modinit_type_init_code(void) { - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); - /*--- Type init code ---*/ - if (PyType_Ready(&__pyx_type_4cylp_2cy_11CyCoinMpsIO_CyCoinMpsIO) < 0) __PYX_ERR(1, 16, __pyx_L1_error) -@@ -6812,6 +5449,9 @@ static int __Pyx_modinit_type_init_code(void) { - static int __Pyx_modinit_type_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); - /*--- Type import code ---*/ - __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) -@@ -6825,18 +5465,38 @@ static int __Pyx_modinit_type_import_code(void) { - __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) -+ __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error) -- __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error) -- __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error) -+ __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error) -+ __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error) -- __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error) -+ __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error) -+ __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error) -+ __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error) -+ __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error) -+ __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error) -+ __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error) -+ __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error) -+ __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error) -+ __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error) -+ __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error) -+ __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyCoinPackedMatrix"); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 27, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); -@@ -6868,17 +5528,19 @@ static int __Pyx_modinit_function_import_code(void) { - } - - --#if PY_MAJOR_VERSION < 3 --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC void --#else -+#ifndef CYTHON_NO_PYINIT_EXPORT - #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#elif PY_MAJOR_VERSION < 3 -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" void -+#else -+#define __Pyx_PyMODINIT_FUNC void - #endif - #else --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC PyObject * -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * - #else --#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#define __Pyx_PyMODINIT_FUNC PyObject * - #endif - #endif - -@@ -6961,6 +5623,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_CyCoinMpsIO(PyObject *__pyx_pyinit - { - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannyDeclarations - #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m) { -@@ -7008,11 +5673,9 @@ if (!__Pyx_RefNanny) { - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ -- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS -- #ifdef WITH_THREAD /* Python build with threading support? */ -+ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - PyEval_InitThreads(); - #endif -- #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; -@@ -7049,15 +5712,15 @@ if (!__Pyx_RefNanny) { - } - #endif - /*--- Builtin init code ---*/ -- if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Constants init code ---*/ -- if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Global type/function init code ---*/ - (void)__Pyx_modinit_global_init_code(); - (void)__Pyx_modinit_variable_export_code(); - (void)__Pyx_modinit_function_export_code(); -- if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; -- if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) -+ if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) - (void)__Pyx_modinit_variable_import_code(); - (void)__Pyx_modinit_function_import_code(); - /*--- Execution code ---*/ -@@ -7177,12 +5840,12 @@ if (!__Pyx_RefNanny) { - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -- * raise ImportError("numpy.core.umath failed to import") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - - /*--- Wrapped vars code ---*/ -@@ -7468,7 +6131,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #if CYTHON_COMPILING_IN_CPYTHON - static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; -- ternaryfunc call = func->ob_type->tp_call; -+ ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -@@ -7555,7 +6218,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec - if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { - return __Pyx_PyObject_CallMethO(func, arg); - #if CYTHON_FAST_PYCCALL -- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { -+ } else if (__Pyx_PyFastCFunction_Check(func)) { - return __Pyx_PyCFunction_FastCall(func, &arg, 1); - #endif - } -@@ -7692,7 +6355,7 @@ static int __Pyx_ParseOptionalKeywords( - } - name = first_kw_arg; - #if PY_MAJOR_VERSION < 3 -- if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { -+ if (likely(PyString_Check(key))) { - while (*name) { - if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) - && _PyString_Eq(**name, key)) { -@@ -7719,7 +6382,7 @@ static int __Pyx_ParseOptionalKeywords( - while (*name) { - int cmp = (**name == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 -- (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : -+ (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**name, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; -@@ -7735,7 +6398,7 @@ static int __Pyx_ParseOptionalKeywords( - while (argname != first_kw_arg) { - int cmp = (**argname == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 -- (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : -+ (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**argname, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; -@@ -7985,7 +6648,7 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { - { - #if PY_MAJOR_VERSION >= 3 - if (level == -1) { -- if (strchr(__Pyx_MODULE_NAME, '.')) { -+ if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { - module = PyImport_ImportModuleLevelObject( - name, global_dict, empty_dict, list, 1); - if (!module) { -@@ -8085,61 +6748,6 @@ static PyObject* __Pyx_patch_inspect(PyObject* module) { - return module; - } - --/* DictGetItem */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { -- PyObject *value; -- value = PyDict_GetItemWithError(d, key); -- if (unlikely(!value)) { -- if (!PyErr_Occurred()) { -- if (unlikely(PyTuple_Check(key))) { -- PyObject* args = PyTuple_Pack(1, key); -- if (likely(args)) { -- PyErr_SetObject(PyExc_KeyError, args); -- Py_DECREF(args); -- } -- } else { -- PyErr_SetObject(PyExc_KeyError, key); -- } -- } -- return NULL; -- } -- Py_INCREF(value); -- return value; --} --#endif -- --/* RaiseTooManyValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { -- PyErr_Format(PyExc_ValueError, -- "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); --} -- --/* RaiseNeedMoreValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { -- PyErr_Format(PyExc_ValueError, -- "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", -- index, (index == 1) ? "" : "s"); --} -- --/* RaiseNoneIterError */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); --} -- --/* ExtTypeTest */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { -- if (unlikely(!type)) { -- PyErr_SetString(PyExc_SystemError, "Missing type object"); -- return 0; -- } -- if (likely(__Pyx_TypeCheck(obj, type))) -- return 1; -- PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", -- Py_TYPE(obj)->tp_name, type->tp_name); -- return 0; --} -- - /* GetTopmostException */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * -@@ -8345,6 +6953,28 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - } - #endif - -+/* PyObjectGetAttrStrNoError */ -+static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { -+ __Pyx_PyThreadState_declare -+ __Pyx_PyThreadState_assign -+ if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) -+ __Pyx_PyErr_Clear(); -+} -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { -+ PyObject *result; -+#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 -+ PyTypeObject* tp = Py_TYPE(obj); -+ if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { -+ return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); -+ } -+#endif -+ result = __Pyx_PyObject_GetAttrStr(obj, attr_name); -+ if (unlikely(!result)) { -+ __Pyx_PyObject_GetAttrStr_ClearAttributeError(); -+ } -+ return result; -+} -+ - /* SetupReduce */ - static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { - int ret; -@@ -8372,43 +7002,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { - PyObject *setstate = NULL; - PyObject *setstate_cython = NULL; - #if CYTHON_USE_PYTYPE_LOOKUP -- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #else -- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #endif - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #else -- object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #endif -- reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; -+ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; - if (reduce_ex == object_reduce_ex) { - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #else -- object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #endif -- reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; -+ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; - if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { -- reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; -+ reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); -+ if (likely(reduce_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (reduce == object_reduce || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); - if (!setstate) PyErr_Clear(); - if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { -- setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; -+ setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); -+ if (likely(setstate_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (!setstate || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - } - PyType_Modified((PyTypeObject*)type_obj); - } - } -- goto GOOD; --BAD: -+ goto __PYX_GOOD; -+__PYX_BAD: - if (!PyErr_Occurred()) - PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); - ret = -1; --GOOD: -+__PYX_GOOD: - #if !CYTHON_USE_PYTYPE_LOOKUP - Py_XDECREF(object_reduce); - Py_XDECREF(object_reduce_ex); -@@ -8498,7 +7136,7 @@ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { - - /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK --static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { -+static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { - PyObject *use_cline; - PyObject *ptype, *pvalue, *ptraceback; - #if CYTHON_COMPILING_IN_CPYTHON -@@ -8528,7 +7166,7 @@ static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { - } - if (!use_cline) { - c_line = 0; -- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); -+ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; -@@ -8602,7 +7240,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - if (__pyx_code_cache.count == __pyx_code_cache.max_count) { - int new_max = __pyx_code_cache.max_count + 64; - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( -- __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); -+ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); - if (unlikely(!entries)) { - return; - } -@@ -8625,30 +7263,31 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { -- PyCodeObject *py_code = 0; -- PyObject *py_srcfile = 0; -- PyObject *py_funcname = 0; -+ PyCodeObject *py_code = NULL; -+ PyObject *py_funcname = NULL; - #if PY_MAJOR_VERSION < 3 -+ PyObject *py_srcfile = NULL; - py_srcfile = PyString_FromString(filename); -- #else -- py_srcfile = PyUnicode_FromString(filename); -- #endif - if (!py_srcfile) goto bad; -+ #endif - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; -+ funcname = PyUnicode_AsUTF8(py_funcname); -+ if (!funcname) goto bad; - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); -- #else -- py_funcname = PyUnicode_FromString(funcname); -+ if (!py_funcname) goto bad; - #endif - } -- if (!py_funcname) goto bad; -+ #if PY_MAJOR_VERSION < 3 - py_code = __Pyx_PyCode_New( - 0, - 0, -@@ -8667,11 +7306,16 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - __pyx_empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); -- Py_DECREF(py_funcname); -+ #else -+ py_code = PyCode_NewEmpty(filename, funcname, py_line); -+ #endif -+ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline - return py_code; - bad: -- Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -+ #if PY_MAJOR_VERSION < 3 -+ Py_XDECREF(py_srcfile); -+ #endif - return NULL; - } - static void __Pyx_AddTraceback(const char *funcname, int c_line, -@@ -8703,37 +7347,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - Py_XDECREF(py_frame); - } - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(int) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(int) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(int) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(int), -- little, !is_unsigned); -- } --} -- - /* CIntFromPyVerify */ - #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ - __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) -@@ -8873,7 +7486,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_float(a, a); - return __Pyx_c_prod_float(a, a); - case 3: - z = __Pyx_c_prod_float(a, a); -@@ -9028,7 +7640,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_double(a, a); - return __Pyx_c_prod_double(a, a); - case 3: - z = __Pyx_c_prod_double(a, a); -@@ -9067,24 +7678,31 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - #endif - - /* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { -- const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { -- if (sizeof(enum NPY_TYPES) < sizeof(long)) { -+ if (sizeof(int) < sizeof(long)) { - return PyInt_FromLong((long) value); -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { -+ } else if (sizeof(int) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); - #ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); - #endif - } - } else { -- if (sizeof(enum NPY_TYPES) <= sizeof(long)) { -+ if (sizeof(int) <= sizeof(long)) { - return PyInt_FromLong((long) value); - #ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); - #endif - } -@@ -9092,14 +7710,21 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES v - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), -+ return _PyLong_FromByteArray(bytes, sizeof(int), - little, !is_unsigned); - } - } - - /* CIntFromPy */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -9288,7 +7913,14 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - - /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(long) < sizeof(long)) { -@@ -9319,7 +7951,14 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - - /* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -9870,6 +8509,23 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_DECREF(x); - return ival; - } -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { -+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { -+ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); -+#if PY_MAJOR_VERSION < 3 -+ } else if (likely(PyInt_CheckExact(o))) { -+ return PyInt_AS_LONG(o); -+#endif -+ } else { -+ Py_ssize_t ival; -+ PyObject *x; -+ x = PyNumber_Index(o); -+ if (!x) return -1; -+ ival = PyInt_AsLong(x); -+ Py_DECREF(x); -+ return ival; -+ } -+} - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); - } -diff --git a/cylp/cy/CyCoinPackedMatrix.cpp b/cylp/cy/CyCoinPackedMatrix.cpp -index 536b013..df2b688 100644 ---- a/cylp/cy/CyCoinPackedMatrix.cpp -+++ b/cylp/cy/CyCoinPackedMatrix.cpp -@@ -1,14 +1,16 @@ --/* Generated by Cython 0.29.12 */ -+/* Generated by Cython 0.29.25 */ - -+#ifndef PY_SSIZE_T_CLEAN - #define PY_SSIZE_T_CLEAN -+#endif /* PY_SSIZE_T_CLEAN */ - #include "Python.h" - #ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. - #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. - #else --#define CYTHON_ABI "0_29_12" --#define CYTHON_HEX_VERSION 0x001D0CF0 -+#define CYTHON_ABI "0_29_25" -+#define CYTHON_HEX_VERSION 0x001D19F0 - #define CYTHON_FUTURE_DIVISION 0 - #include - #ifndef offsetof -@@ -155,7 +157,7 @@ - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif -- #if PY_VERSION_HEX < 0x030300F0 -+ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) -@@ -174,7 +176,7 @@ - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL -- #define CYTHON_FAST_PYCALL 1 -+ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1) - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) -@@ -193,7 +195,9 @@ - #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) - #endif - #if CYTHON_USE_PYLONG_INTERNALS -- #include "longintrepr.h" -+ #if PY_MAJOR_VERSION < 3 -+ #include "longintrepr.h" -+ #endif - #undef SHIFT - #undef BASE - #undef MASK -@@ -324,9 +328,68 @@ class __Pyx_FakeReference { - #define __Pyx_DefaultClassType PyClass_Type - #else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" --#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 -- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ -- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -+ #define __Pyx_DefaultClassType PyType_Type -+#if PY_VERSION_HEX >= 0x030B00A1 -+ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, -+ PyObject *code, PyObject *c, PyObject* n, PyObject *v, -+ PyObject *fv, PyObject *cell, PyObject* fn, -+ PyObject *name, int fline, PyObject *lnos) { -+ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; -+ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; -+ const char *fn_cstr=NULL; -+ const char *name_cstr=NULL; -+ PyCodeObject* co=NULL; -+ PyObject *type, *value, *traceback; -+ PyErr_Fetch(&type, &value, &traceback); -+ if (!(kwds=PyDict_New())) goto end; -+ if (!(argcount=PyLong_FromLong(a))) goto end; -+ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; -+ if (!(posonlyargcount=PyLong_FromLong(0))) goto end; -+ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; -+ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; -+ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; -+ if (!(nlocals=PyLong_FromLong(l))) goto end; -+ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; -+ if (!(stacksize=PyLong_FromLong(s))) goto end; -+ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; -+ if (!(flags=PyLong_FromLong(f))) goto end; -+ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; -+ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; -+ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; -+ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; -+ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; -+ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here -+ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; -+ Py_XDECREF((PyObject*)co); -+ co = (PyCodeObject*)call_result; -+ call_result = NULL; -+ if (0) { -+ cleanup_code_too: -+ Py_XDECREF((PyObject*)co); -+ co = NULL; -+ } -+ end: -+ Py_XDECREF(kwds); -+ Py_XDECREF(argcount); -+ Py_XDECREF(posonlyargcount); -+ Py_XDECREF(kwonlyargcount); -+ Py_XDECREF(nlocals); -+ Py_XDECREF(stacksize); -+ Py_XDECREF(replace); -+ Py_XDECREF(call_result); -+ Py_XDECREF(empty); -+ if (type) { -+ PyErr_Restore(type, value, traceback); -+ } -+ return co; -+ } - #else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -@@ -440,8 +503,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #endif - #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 -+ #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) -+ #else -+ #define __Pyx_PyUnicode_READY(op) (0) -+ #endif - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) -@@ -449,7 +516,15 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) -+ #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) -+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) -+ #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) -+ #endif -+ #else -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) -+ #endif - #else - #define CYTHON_PEP393_ENABLED 0 - #define PyUnicode_1BYTE_KIND 1 -@@ -498,8 +573,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define PyString_Type PyUnicode_Type - #define PyString_Check PyUnicode_Check - #define PyString_CheckExact PyUnicode_CheckExact -+#ifndef PyObject_Unicode - #define PyObject_Unicode PyObject_Str - #endif -+#endif - #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) - #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) -@@ -510,6 +587,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #ifndef PySet_CheckExact - #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) - #endif -+#if PY_VERSION_HEX >= 0x030900A4 -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) -+#else -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) -+#endif - #if CYTHON_ASSUME_SAFE_MACROS - #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) - #else -@@ -543,13 +627,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong -- #define __Pyx_PyInt_AsHash_t PyInt_AsLong -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t - #else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t -- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t - #endif - #if PY_MAJOR_VERSION >= 3 -- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) -+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) - #else - #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) - #endif -@@ -590,11 +674,10 @@ static CYTHON_INLINE float __PYX_NAN() { - #define __Pyx_truncl truncl - #endif - -- -+#define __PYX_MARK_ERR_POS(f_index, lineno) \ -+ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } - #define __PYX_ERR(f_index, lineno, Ln_error) \ --{ \ -- __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ --} -+ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } - - #ifndef __PYX_EXTERN_C - #ifdef __cplusplus -@@ -611,7 +694,13 @@ static CYTHON_INLINE float __PYX_NAN() { - #include - #include "ICoinPackedMatrix.hpp" - #include "numpy/arrayobject.h" -+#include "numpy/ndarrayobject.h" -+#include "numpy/ndarraytypes.h" -+#include "numpy/arrayscalars.h" - #include "numpy/ufuncobject.h" -+ -+ /* NumPy API declarations from "numpy/__init__.pxd" */ -+ - #ifdef _OPENMP - #include - #endif /* _OPENMP */ -@@ -708,6 +797,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); - static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); - #if CYTHON_ASSUME_SAFE_MACROS - #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) - #else -@@ -843,7 +933,7 @@ static const char *__pyx_filename; - - static const char *__pyx_f[] = { - "stringsource", -- "cylp\\cy\\CyCoinPackedMatrix.pyx", -+ "cylp/cy/CyCoinPackedMatrix.pyx", - "__init__.pxd", - "type.pxd", - }; -@@ -884,7 +974,7 @@ typedef struct { - } __Pyx_BufFmt_Context; - - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":776 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":690 - * # in Cython to enable them only on the right systems. - * - * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< -@@ -893,7 +983,7 @@ typedef struct { - */ - typedef npy_int8 __pyx_t_5numpy_int8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":777 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":691 - * - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< -@@ -902,7 +992,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; - */ - typedef npy_int16 __pyx_t_5numpy_int16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":778 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":692 - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< -@@ -911,7 +1001,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; - */ - typedef npy_int32 __pyx_t_5numpy_int32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":779 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":693 - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t - * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< -@@ -920,7 +1010,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; - */ - typedef npy_int64 __pyx_t_5numpy_int64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":783 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":697 - * #ctypedef npy_int128 int128_t - * - * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< -@@ -929,7 +1019,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; - */ - typedef npy_uint8 __pyx_t_5numpy_uint8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":784 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":698 - * - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< -@@ -938,7 +1028,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; - */ - typedef npy_uint16 __pyx_t_5numpy_uint16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":785 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":699 - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< -@@ -947,7 +1037,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; - */ - typedef npy_uint32 __pyx_t_5numpy_uint32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":786 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":700 - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t - * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< -@@ -956,7 +1046,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; - */ - typedef npy_uint64 __pyx_t_5numpy_uint64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":790 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":704 - * #ctypedef npy_uint128 uint128_t - * - * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< -@@ -965,7 +1055,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; - */ - typedef npy_float32 __pyx_t_5numpy_float32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":791 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":705 - * - * ctypedef npy_float32 float32_t - * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< -@@ -974,7 +1064,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; - */ - typedef npy_float64 __pyx_t_5numpy_float64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":800 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":714 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< -@@ -983,7 +1073,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; - */ - typedef npy_long __pyx_t_5numpy_int_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":801 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":715 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< -@@ -992,7 +1082,7 @@ typedef npy_long __pyx_t_5numpy_int_t; - */ - typedef npy_longlong __pyx_t_5numpy_long_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":802 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":716 - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t - * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< -@@ -1001,7 +1091,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; - */ - typedef npy_longlong __pyx_t_5numpy_longlong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":804 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":718 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< -@@ -1010,7 +1100,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; - */ - typedef npy_ulong __pyx_t_5numpy_uint_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":805 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":719 - * - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< -@@ -1019,7 +1109,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":806 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":720 - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t - * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< -@@ -1028,7 +1118,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":808 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":722 - * ctypedef npy_ulonglong ulonglong_t - * - * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< -@@ -1037,7 +1127,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - */ - typedef npy_intp __pyx_t_5numpy_intp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":809 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":723 - * - * ctypedef npy_intp intp_t - * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< -@@ -1046,7 +1136,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; - */ - typedef npy_uintp __pyx_t_5numpy_uintp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":811 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":725 - * ctypedef npy_uintp uintp_t - * - * ctypedef npy_double float_t # <<<<<<<<<<<<<< -@@ -1055,7 +1145,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; - */ - typedef npy_double __pyx_t_5numpy_float_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":812 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":726 - * - * ctypedef npy_double float_t - * ctypedef npy_double double_t # <<<<<<<<<<<<<< -@@ -1064,7 +1154,7 @@ typedef npy_double __pyx_t_5numpy_float_t; - */ - typedef npy_double __pyx_t_5numpy_double_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":813 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":727 - * ctypedef npy_double float_t - * ctypedef npy_double double_t - * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< -@@ -1100,7 +1190,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(do - /*--- Type declarations ---*/ - struct __pyx_obj_4cylp_2cy_18CyCoinPackedMatrix_CyCoinPackedMatrix; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":815 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":729 - * ctypedef npy_longdouble longdouble_t - * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< -@@ -1109,7 +1199,7 @@ struct __pyx_obj_4cylp_2cy_18CyCoinPackedMatrix_CyCoinPackedMatrix; - */ - typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":816 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":730 - * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< -@@ -1118,7 +1208,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - */ - typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":817 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":731 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< -@@ -1127,7 +1217,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - */ - typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":819 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":733 - * ctypedef npy_clongdouble clongdouble_t - * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< -@@ -1308,67 +1398,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg - /* RaiseException.proto */ - static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); - --/* PyCFunctionFastCall.proto */ --#if CYTHON_FAST_PYCCALL --static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); --#else --#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) --#endif -- --/* PyFunctionFastCall.proto */ --#if CYTHON_FAST_PYCALL --#define __Pyx_PyFunction_FastCall(func, args, nargs)\ -- __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL) --#if 1 || PY_VERSION_HEX < 0x030600B1 --static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs); --#else --#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) --#endif --#define __Pyx_BUILD_ASSERT_EXPR(cond)\ -- (sizeof(char [1 - 2*!(cond)]) - 1) --#ifndef Py_MEMBER_SIZE --#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) --#endif -- static size_t __pyx_pyframe_localsplus_offset = 0; -- #include "frameobject.h" -- #define __Pxy_PyFrame_Initialize_Offsets()\ -- ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ -- (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) -- #define __Pyx_PyFrame_GetLocalsplus(frame)\ -- (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) --#endif -- --/* PyObjectCallMethO.proto */ --#if CYTHON_COMPILING_IN_CPYTHON --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); --#endif -- --/* PyObjectCallOneArg.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); -- --/* DictGetItem.proto */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); --#define __Pyx_PyObject_Dict_GetItem(obj, name)\ -- (likely(PyDict_CheckExact(obj)) ?\ -- __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) --#else --#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) --#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) --#endif -- --/* RaiseTooManyValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); -- --/* RaiseNeedMoreValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); -- --/* RaiseNoneIterError.proto */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -- --/* ExtTypeTest.proto */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); -- - /* GetTopmostException.proto */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); -@@ -1415,6 +1444,9 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr - #endif - -+/* PyObjectGetAttrStrNoError.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); -+ - /* SetupReduce.proto */ - static int __Pyx_setup_reduce(PyObject* type_obj); - -@@ -1507,8 +1539,10 @@ typedef struct { - #endif - - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -+/* GCCDiagnostics.proto */ -+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -+#define __Pyx_HAS_GCC_DIAGNOSTIC -+#endif - - /* RealImag.proto */ - #if CYTHON_CCOMPLEX -@@ -1609,7 +1643,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); - #endif - - /* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); - - /* CIntFromPy.proto */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); -@@ -1666,8 +1700,17 @@ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; - static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; - static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; - static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -+static PyTypeObject *__pyx_ptype_5numpy_generic = 0; -+static PyTypeObject *__pyx_ptype_5numpy_number = 0; -+static PyTypeObject *__pyx_ptype_5numpy_integer = 0; -+static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; -+static PyTypeObject *__pyx_ptype_5numpy_floating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; -+static PyTypeObject *__pyx_ptype_5numpy_character = 0; - static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ - - /* Module declarations from 'cylp.cy.CyCoinPackedMatrix' */ - static PyTypeObject *__pyx_ptype_4cylp_2cy_18CyCoinPackedMatrix_CyCoinPackedMatrix = 0; -@@ -1679,16 +1722,12 @@ int __pyx_module_is_main_cylp__cy__CyCoinPackedMatrix = 0; - - /* Implementation of 'cylp.cy.CyCoinPackedMatrix' */ - static PyObject *__pyx_builtin_TypeError; --static PyObject *__pyx_builtin_ValueError; --static PyObject *__pyx_builtin_range; --static PyObject *__pyx_builtin_RuntimeError; - static PyObject *__pyx_builtin_ImportError; - static const char __pyx_k_np[] = "np"; - static const char __pyx_k_main[] = "__main__"; - static const char __pyx_k_name[] = "__name__"; - static const char __pyx_k_test[] = "__test__"; - static const char __pyx_k_numpy[] = "numpy"; --static const char __pyx_k_range[] = "range"; - static const char __pyx_k_create[] = "create"; - static const char __pyx_k_import[] = "__import__"; - static const char __pyx_k_reduce[] = "__reduce__"; -@@ -1698,36 +1737,23 @@ static const char __pyx_k_getstate[] = "__getstate__"; - static const char __pyx_k_setstate[] = "__setstate__"; - static const char __pyx_k_TypeError[] = "TypeError"; - static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; --static const char __pyx_k_ValueError[] = "ValueError"; - static const char __pyx_k_colIndices[] = "colIndices"; - static const char __pyx_k_colOrdered[] = "colOrdered"; - static const char __pyx_k_newMaxSize[] = "newMaxSize"; - static const char __pyx_k_rowIndices[] = "rowIndices"; - static const char __pyx_k_ImportError[] = "ImportError"; - static const char __pyx_k_removeValue[] = "removeValue"; --static const char __pyx_k_RuntimeError[] = "RuntimeError"; - static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; - static const char __pyx_k_newMaxMajorDim[] = "newMaxMajorDim"; - static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; - static const char __pyx_k_CyCoinPackedMatrix[] = "CyCoinPackedMatrix"; - static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; --static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; - static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; --static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; --static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; --static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; --static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; - static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; - static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; --static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; - static PyObject *__pyx_n_s_CyCoinPackedMatrix; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; - static PyObject *__pyx_n_s_ImportError; --static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; --static PyObject *__pyx_n_s_RuntimeError; - static PyObject *__pyx_n_s_TypeError; --static PyObject *__pyx_n_s_ValueError; - static PyObject *__pyx_n_s_cline_in_traceback; - static PyObject *__pyx_n_s_colIndices; - static PyObject *__pyx_n_s_colOrdered; -@@ -1737,8 +1763,6 @@ static PyObject *__pyx_n_s_getstate; - static PyObject *__pyx_n_s_import; - static PyObject *__pyx_n_s_main; - static PyObject *__pyx_n_s_name; --static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; --static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; - static PyObject *__pyx_n_s_newMaxMajorDim; - static PyObject *__pyx_n_s_newMaxSize; - static PyObject *__pyx_kp_s_no_default___reduce___due_to_non; -@@ -1746,7 +1770,6 @@ static PyObject *__pyx_n_s_np; - static PyObject *__pyx_n_s_numpy; - static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; - static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; --static PyObject *__pyx_n_s_range; - static PyObject *__pyx_n_s_reduce; - static PyObject *__pyx_n_s_reduce_cython; - static PyObject *__pyx_n_s_reduce_ex; -@@ -1755,7 +1778,6 @@ static PyObject *__pyx_n_s_rowIndices; - static PyObject *__pyx_n_s_setstate; - static PyObject *__pyx_n_s_setstate_cython; - static PyObject *__pyx_n_s_test; --static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; - static PyObject *__pyx_n_s_vecInd; - static int __pyx_pf_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix___cinit__(struct __pyx_obj_4cylp_2cy_18CyCoinPackedMatrix_CyCoinPackedMatrix *__pyx_v_self, PyObject *__pyx_v_colOrdered, PyArrayObject *__pyx_v_rowIndices, PyArrayObject *__pyx_v_colIndices, PyArrayObject *__pyx_v_elements); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_7indices___get__(struct __pyx_obj_4cylp_2cy_18CyCoinPackedMatrix_CyCoinPackedMatrix *__pyx_v_self); /* proto */ -@@ -1773,8 +1795,6 @@ static PyObject *__pyx_pf_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_10 - static PyObject *__pyx_pf_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_12removeGaps(struct __pyx_obj_4cylp_2cy_18CyCoinPackedMatrix_CyCoinPackedMatrix *__pyx_v_self, PyObject *__pyx_v_removeValue); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_14__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_18CyCoinPackedMatrix_CyCoinPackedMatrix *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_16__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_18CyCoinPackedMatrix_CyCoinPackedMatrix *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ - static PyObject *__pyx_tp_new_4cylp_2cy_18CyCoinPackedMatrix_CyCoinPackedMatrix(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ - static PyObject *__pyx_float_neg_1_0; - static PyObject *__pyx_int_0; -@@ -1782,11 +1802,6 @@ static PyObject *__pyx_tuple_; - static PyObject *__pyx_tuple__2; - static PyObject *__pyx_tuple__3; - static PyObject *__pyx_tuple__4; --static PyObject *__pyx_tuple__5; --static PyObject *__pyx_tuple__6; --static PyObject *__pyx_tuple__7; --static PyObject *__pyx_tuple__8; --static PyObject *__pyx_tuple__9; - /* Late includes */ - - /* "cylp/cy/CyCoinPackedMatrix.pyx":26 -@@ -1804,6 +1819,9 @@ static int __pyx_pw_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_1__cinit - PyArrayObject *__pyx_v_rowIndices = 0; - PyArrayObject *__pyx_v_colIndices = 0; - PyArrayObject *__pyx_v_elements = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - int __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); -@@ -1943,6 +1961,9 @@ static int __pyx_pf_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix___cinit_ - int __pyx_t_1; - int __pyx_t_2; - Py_ssize_t __pyx_t_3; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - __pyx_pybuffer_rowIndices.pybuffer.buf = NULL; - __pyx_pybuffer_rowIndices.refcount = 0; -@@ -2254,6 +2275,9 @@ static PyObject *__pyx_pf_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_9n - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyCoinPackedMatrix.pyx":56 -@@ -2314,6 +2338,9 @@ static PyObject *__pyx_pf_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_8m - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyCoinPackedMatrix.pyx":60 -@@ -2374,6 +2401,9 @@ static PyObject *__pyx_pf_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_8m - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyCoinPackedMatrix.pyx":64 -@@ -2434,6 +2464,9 @@ static PyObject *__pyx_pf_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_12 - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyCoinPackedMatrix.pyx":68 -@@ -2484,6 +2517,9 @@ static PyObject *__pyx_pw_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_3r - PyObject *__pyx_v_newMaxMajorDim = 0; - PyObject *__pyx_v_newMaxSize = 0; - PyObject *__pyx_v_create = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("reserve (wrapper)", 0); -@@ -2560,6 +2596,9 @@ static PyObject *__pyx_pf_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_2r - int __pyx_t_1; - int __pyx_t_2; - int __pyx_t_3; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("reserve", 0); - - /* "cylp/cy/CyCoinPackedMatrix.pyx":71 -@@ -2608,6 +2647,9 @@ static char __pyx_doc_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_4appen - static PyObject *__pyx_pw_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_5appendRow(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyArrayObject *__pyx_v_vecInd = 0; - PyArrayObject *__pyx_v_elements = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("appendRow (wrapper)", 0); -@@ -2705,6 +2747,9 @@ static PyObject *__pyx_pf_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_4a - __Pyx_RefNannyDeclarations - int __pyx_t_1; - Py_ssize_t __pyx_t_2; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("appendRow", 0); - __pyx_pybuffer_vecInd.pybuffer.buf = NULL; - __pyx_pybuffer_vecInd.refcount = 0; -@@ -2820,6 +2865,9 @@ static char __pyx_doc_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_6appen - static PyObject *__pyx_pw_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_7appendCol(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyArrayObject *__pyx_v_vecInd = 0; - PyArrayObject *__pyx_v_elements = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("appendCol (wrapper)", 0); -@@ -2917,6 +2965,9 @@ static PyObject *__pyx_pf_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_6a - __Pyx_RefNannyDeclarations - int __pyx_t_1; - Py_ssize_t __pyx_t_2; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("appendCol", 0); - __pyx_pybuffer_vecInd.pybuffer.buf = NULL; - __pyx_pybuffer_vecInd.refcount = 0; -@@ -3031,6 +3082,9 @@ static PyObject *__pyx_pw_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_9d - static char __pyx_doc_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_8dumpMatrix[] = "CyCoinPackedMatrix.dumpMatrix(self, char *s)"; - static PyObject *__pyx_pw_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_9dumpMatrix(PyObject *__pyx_v_self, PyObject *__pyx_arg_s) { - char *__pyx_v_s; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("dumpMatrix (wrapper)", 0); -@@ -3105,6 +3159,9 @@ static PyObject *__pyx_pf_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_10 - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("hasGaps", 0); - - /* "cylp/cy/CyCoinPackedMatrix.pyx":102 -@@ -3153,6 +3210,9 @@ static PyObject *__pyx_pw_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_13 - static char __pyx_doc_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_12removeGaps[] = "CyCoinPackedMatrix.removeGaps(self, removeValue=-1.0)"; - static PyObject *__pyx_pw_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_13removeGaps(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_removeValue = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("removeGaps (wrapper)", 0); -@@ -3209,6 +3269,9 @@ static PyObject *__pyx_pf_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_12 - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - double __pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("removeGaps", 0); - - /* "cylp/cy/CyCoinPackedMatrix.pyx":105 -@@ -3265,6 +3328,9 @@ static PyObject *__pyx_pf_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_14 - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -3320,6 +3386,9 @@ static PyObject *__pyx_pf_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_16 - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -3350,863 +3419,7 @@ static PyObject *__pyx_pf_4cylp_2cy_18CyCoinPackedMatrix_18CyCoinPackedMatrix_16 - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); -- __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_v_i; -- int __pyx_v_ndim; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- int __pyx_v_t; -- char *__pyx_v_f; -- PyArray_Descr *__pyx_v_descr = 0; -- int __pyx_v_offset; -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- int __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- int __pyx_t_4; -- int __pyx_t_5; -- int __pyx_t_6; -- PyArray_Descr *__pyx_t_7; -- PyObject *__pyx_t_8 = NULL; -- char *__pyx_t_9; -- if (__pyx_v_info == NULL) { -- PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); -- return -1; -- } -- __Pyx_RefNannySetupContext("__getbuffer__", 0); -- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); -- __Pyx_GIVEREF(__pyx_v_info->obj); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":265 -- * -- * cdef int i, ndim -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":266 -- * cdef int i, ndim -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * -- * ndim = PyArray_NDIM(self) -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":268 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- */ -- __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L4_bool_binop_done; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":271 -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not C contiguous") -- * -- */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L4_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 272, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L7_bool_binop_done; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":275 -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not Fortran contiguous") -- * -- */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 276, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":278 -- * raise ValueError(u"ndarray is not Fortran contiguous") -- * -- * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":279 -- * -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * # Allocate new buffer for strides and shape info. -- */ -- __pyx_v_info->ndim = __pyx_v_ndim; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":283 -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- */ -- __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":284 -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim # <<<<<<<<<<<<<< -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- */ -- __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":285 -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim -- * for i in range(ndim): # <<<<<<<<<<<<<< -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] -- */ -- __pyx_t_4 = __pyx_v_ndim; -- __pyx_t_5 = __pyx_t_4; -- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { -- __pyx_v_i = __pyx_t_6; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":286 -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- */ -- (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":287 -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< -- * else: -- * info.strides = PyArray_STRIDES(self) -- */ -- (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- goto __pyx_L9; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":289 -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- */ -- /*else*/ { -- __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":290 -- * else: -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- */ -- __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); -- } -- __pyx_L9:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":291 -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL # <<<<<<<<<<<<<< -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) -- */ -- __pyx_v_info->suboffsets = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":292 -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< -- * info.readonly = not PyArray_ISWRITEABLE(self) -- * -- */ -- __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":293 -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< -- * -- * cdef int t -- */ -- __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":296 -- * -- * cdef int t -- * cdef char* f = NULL # <<<<<<<<<<<<<< -- * cdef dtype descr = PyArray_DESCR(self) -- * cdef int offset -- */ -- __pyx_v_f = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":297 -- * cdef int t -- * cdef char* f = NULL -- * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< -- * cdef int offset -- * -- */ -- __pyx_t_7 = PyArray_DESCR(__pyx_v_self); -- __pyx_t_3 = ((PyObject *)__pyx_t_7); -- __Pyx_INCREF(__pyx_t_3); -- __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":300 -- * cdef int offset -- * -- * info.obj = self # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(descr): -- */ -- __Pyx_INCREF(((PyObject *)__pyx_v_self)); -- __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); -- __pyx_v_info->obj = ((PyObject *)__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":303 -- * -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num # <<<<<<<<<<<<<< -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- */ -- __pyx_t_4 = __pyx_v_descr->type_num; -- __pyx_v_t = __pyx_t_4; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); -- if (!__pyx_t_2) { -- goto __pyx_L15_next_or; -- } else { -- } -- __pyx_t_2 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_L15_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":305 -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L14_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 306, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":307 -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- */ -- switch (__pyx_v_t) { -- case NPY_BYTE: -- __pyx_v_f = ((char *)"b"); -- break; -- case NPY_UBYTE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":308 -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- */ -- __pyx_v_f = ((char *)"B"); -- break; -- case NPY_SHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":309 -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- */ -- __pyx_v_f = ((char *)"h"); -- break; -- case NPY_USHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":310 -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- */ -- __pyx_v_f = ((char *)"H"); -- break; -- case NPY_INT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":311 -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- */ -- __pyx_v_f = ((char *)"i"); -- break; -- case NPY_UINT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":312 -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- */ -- __pyx_v_f = ((char *)"I"); -- break; -- case NPY_LONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":313 -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- */ -- __pyx_v_f = ((char *)"l"); -- break; -- case NPY_ULONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":314 -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- */ -- __pyx_v_f = ((char *)"L"); -- break; -- case NPY_LONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":315 -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- */ -- __pyx_v_f = ((char *)"q"); -- break; -- case NPY_ULONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":316 -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- */ -- __pyx_v_f = ((char *)"Q"); -- break; -- case NPY_FLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":317 -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- */ -- __pyx_v_f = ((char *)"f"); -- break; -- case NPY_DOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":318 -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- */ -- __pyx_v_f = ((char *)"d"); -- break; -- case NPY_LONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":319 -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- */ -- __pyx_v_f = ((char *)"g"); -- break; -- case NPY_CFLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":320 -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- */ -- __pyx_v_f = ((char *)"Zf"); -- break; -- case NPY_CDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":321 -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" -- */ -- __pyx_v_f = ((char *)"Zd"); -- break; -- case NPY_CLONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":322 -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f = "O" -- * else: -- */ -- __pyx_v_f = ((char *)"Zg"); -- break; -- case NPY_OBJECT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":323 -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_v_f = ((char *)"O"); -- break; -- default: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":325 -- * elif t == NPY_OBJECT: f = "O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * info.format = f -- * return -- */ -- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_8); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 325, __pyx_L1_error) -- break; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":326 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f # <<<<<<<<<<<<<< -- * return -- * else: -- */ -- __pyx_v_info->format = __pyx_v_f; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":327 -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f -- * return # <<<<<<<<<<<<<< -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- */ -- __pyx_r = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":329 -- * return -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- */ -- /*else*/ { -- __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":330 -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, -- */ -- (__pyx_v_info->format[0]) = '^'; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":331 -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 # <<<<<<<<<<<<<< -- * f = _util_dtypestring(descr, info.format + 1, -- * info.format + _buffer_format_string_len, -- */ -- __pyx_v_offset = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":332 -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< -- * info.format + _buffer_format_string_len, -- * &offset) -- */ -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":335 -- * info.format + _buffer_format_string_len, -- * &offset) -- * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- */ -- (__pyx_v_f[0]) = '\x00'; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- -- /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; -- if (__pyx_v_info->obj != NULL) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- goto __pyx_L2; -- __pyx_L0:; -- if (__pyx_v_info->obj == Py_None) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- __pyx_L2:; -- __Pyx_XDECREF((PyObject *)__pyx_v_descr); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); -- __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("__releasebuffer__", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":339 -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) -- */ -- PyObject_Free(__pyx_v_info->format); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":341 -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) # <<<<<<<<<<<<<< -- * # info.shape was stored after info.strides in the same block -- * -- */ -- PyObject_Free(__pyx_v_info->strides); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -@@ -4218,9 +3431,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":822 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":736 - * - * cdef inline object PyArray_MultiIterNew1(a): - * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< -@@ -4228,13 +3444,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - * cdef inline object PyArray_MultiIterNew2(a, b): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -@@ -4253,7 +3469,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -@@ -4265,9 +3481,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":825 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":739 - * - * cdef inline object PyArray_MultiIterNew2(a, b): - * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< -@@ -4275,13 +3494,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - * cdef inline object PyArray_MultiIterNew3(a, b, c): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -@@ -4300,7 +3519,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -@@ -4312,9 +3531,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":828 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":742 - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): - * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< -@@ -4322,13 +3544,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -@@ -4347,7 +3569,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -4359,9 +3581,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":831 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":745 - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -@@ -4369,13 +3594,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -4394,7 +3619,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -4406,9 +3631,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":834 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":748 - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< -@@ -4416,13 +3644,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - * cdef inline tuple PyDataType_SHAPE(dtype d): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -4441,7 +3669,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -4455,7 +3683,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - int __pyx_t_1; - __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -4465,7 +3693,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":838 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":752 - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): - * return d.subarray.shape # <<<<<<<<<<<<<< -@@ -4477,7 +3705,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -4486,12 +3714,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":840 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":754 - * return d.subarray.shape - * else: - * return () # <<<<<<<<<<<<<< - * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: -+ * - */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); -@@ -4500,7 +3728,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - goto __pyx_L0; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -4515,754 +3743,8 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { -- PyArray_Descr *__pyx_v_child = 0; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- PyObject *__pyx_v_fields = 0; -- PyObject *__pyx_v_childname = NULL; -- PyObject *__pyx_v_new_offset = NULL; -- PyObject *__pyx_v_t = NULL; -- char *__pyx_r; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- Py_ssize_t __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- PyObject *__pyx_t_4 = NULL; -- int __pyx_t_5; -- int __pyx_t_6; -- int __pyx_t_7; -- long __pyx_t_8; -- char *__pyx_t_9; -- __Pyx_RefNannySetupContext("_util_dtypestring", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":847 -- * -- * cdef dtype child -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * cdef tuple fields -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":848 -- * cdef dtype child -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * cdef tuple fields -- * -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- if (unlikely(__pyx_v_descr->names == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -- __PYX_ERR(2, 851, __pyx_L1_error) -- } -- __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; -- for (;;) { -- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 851, __pyx_L1_error) -- #else -- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- #endif -- __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":852 -- * -- * for childname in descr.names: -- * fields = descr.fields[childname] # <<<<<<<<<<<<<< -- * child, new_offset = fields -- * -- */ -- if (unlikely(__pyx_v_descr->fields == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); -- __PYX_ERR(2, 852, __pyx_L1_error) -- } -- __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":853 -- * for childname in descr.names: -- * fields = descr.fields[childname] -- * child, new_offset = fields # <<<<<<<<<<<<<< -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- */ -- if (likely(__pyx_v_fields != Py_None)) { -- PyObject* sequence = __pyx_v_fields; -- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); -- if (unlikely(size != 2)) { -- if (size > 2) __Pyx_RaiseTooManyValuesError(2); -- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); -- __PYX_ERR(2, 853, __pyx_L1_error) -- } -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); -- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); -- __Pyx_INCREF(__pyx_t_3); -- __Pyx_INCREF(__pyx_t_4); -- #else -- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- #endif -- } else { -- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error) -- } -- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); -- __pyx_t_3 = 0; -- __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 856, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); -- if (!__pyx_t_7) { -- goto __pyx_L8_next_or; -- } else { -- } -- __pyx_t_7 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_L8_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":859 -- * -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * # One could encode it in the format string and have Cython -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); -- if (__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_6 = __pyx_t_7; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":860 -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * # One could encode it in the format string and have Cython -- * # complain instead, BUT: < and > in format strings also imply -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 860, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":870 -- * -- * # Output padding bytes -- * while offset[0] < new_offset: # <<<<<<<<<<<<<< -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- */ -- while (1) { -- __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (!__pyx_t_6) break; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":871 -- * # Output padding bytes -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< -- * f += 1 -- * offset[0] += 1 -- */ -- (__pyx_v_f[0]) = 0x78; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":872 -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte -- * f += 1 # <<<<<<<<<<<<<< -- * offset[0] += 1 -- * -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":873 -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- * offset[0] += 1 # <<<<<<<<<<<<<< -- * -- * offset[0] += child.itemsize -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":875 -- * offset[0] += 1 -- * -- * offset[0] += child.itemsize # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(child): -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); -- if (__pyx_t_6) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":878 -- * -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num # <<<<<<<<<<<<<< -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 880, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":883 -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 98; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":884 -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":885 -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x68; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":886 -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 72; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":887 -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x69; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":888 -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 73; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":889 -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x6C; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":890 -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 76; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":891 -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x71; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":892 -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 81; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":893 -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":894 -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x64; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":895 -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x67; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":896 -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x66; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":897 -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x64; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":898 -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x67; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":899 -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (likely(__pyx_t_6)) { -- (__pyx_v_f[0]) = 79; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":901 -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * f += 1 -- * else: -- */ -- /*else*/ { -- __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 901, __pyx_L1_error) -- } -- __pyx_L15:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":902 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * f += 1 # <<<<<<<<<<<<<< -- * else: -- * # Cython ignores struct boundary information ("T{...}"), -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- goto __pyx_L13; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":906 -- * # Cython ignores struct boundary information ("T{...}"), -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< -- * return f -- * -- */ -- /*else*/ { -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 906, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- } -- __pyx_L13:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- } -- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":907 -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) -- * return f # <<<<<<<<<<<<<< -- * -- * -- */ -- __pyx_r = __pyx_v_f; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_4); -- __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = NULL; -- __pyx_L0:; -- __Pyx_XDECREF((PyObject *)__pyx_v_child); -- __Pyx_XDECREF(__pyx_v_fields); -- __Pyx_XDECREF(__pyx_v_childname); -- __Pyx_XDECREF(__pyx_v_new_offset); -- __Pyx_XDECREF(__pyx_v_t); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -- * int _import_umath() except -1 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 -+ * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< - * Py_INCREF(base) # important to do this before stealing the reference below! -@@ -5273,7 +3755,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("set_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1023 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":930 - * - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< -@@ -5282,7 +3764,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - Py_INCREF(__pyx_v_base); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1024 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":931 - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< -@@ -5291,7 +3773,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -5303,7 +3785,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyFinishContext(); - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5318,7 +3800,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - int __pyx_t_1; - __Pyx_RefNannySetupContext("get_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1027 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":934 - * - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< -@@ -5327,7 +3809,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - __pyx_v_base = PyArray_BASE(__pyx_v_arr); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5337,7 +3819,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_t_1 = ((__pyx_v_base == NULL) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1029 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":936 - * base = PyArray_BASE(arr) - * if base is NULL: - * return None # <<<<<<<<<<<<<< -@@ -5348,7 +3830,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5357,7 +3839,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1030 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":937 - * if base is NULL: - * return None - * return base # <<<<<<<<<<<<<< -@@ -5369,7 +3851,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = ((PyObject *)__pyx_v_base); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5384,12 +3866,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { -@@ -5403,13 +3885,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_array", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - { -@@ -5421,20 +3906,20 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1036 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":943 - * cdef inline int import_array() except -1: - * try: -- * _import_array() # <<<<<<<<<<<<<< -+ * __pyx_import_array() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") - */ -- __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error) -+ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - } -@@ -5444,9 +3929,9 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1037 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":944 - * try: -- * _import_array() -+ * __pyx_import_array() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.multiarray failed to import") - * -@@ -5454,32 +3939,32 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __PYX_ERR(2, 945, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - __Pyx_XGIVEREF(__pyx_t_1); -@@ -5490,12 +3975,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - /* function exit code */ -@@ -5513,7 +3998,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -5532,9 +4017,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_umath", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5550,16 +4038,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1042 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":949 - * cdef inline int import_umath() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5573,7 +4061,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1043 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":950 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< -@@ -5583,28 +4071,28 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __PYX_ERR(2, 951, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5619,7 +4107,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -5642,7 +4130,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -5661,9 +4149,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_ufunc", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5679,16 +4170,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1048 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":955 - * cdef inline int import_ufunc() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5702,69 +4193,246 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1049 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":956 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") -+ * - */ - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1050 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":957 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -+ * -+ * cdef extern from *: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __PYX_ERR(2, 957, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 -+ * -+ * cdef inline int import_ufunc() except -1: -+ * try: # <<<<<<<<<<<<<< -+ * _import_umath() -+ * except Exception: -+ */ -+ __Pyx_XGIVEREF(__pyx_t_1); -+ __Pyx_XGIVEREF(__pyx_t_2); -+ __Pyx_XGIVEREF(__pyx_t_3); -+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); -+ goto __pyx_L1_error; -+ __pyx_L8_try_end:; -+ } -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 -+ * raise ImportError("numpy.core.umath failed to import") -+ * -+ * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -+ * try: -+ * _import_umath() -+ */ -+ -+ /* function exit code */ -+ __pyx_r = 0; -+ goto __pyx_L0; -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_5); -+ __Pyx_XDECREF(__pyx_t_6); -+ __Pyx_XDECREF(__pyx_t_7); -+ __Pyx_XDECREF(__pyx_t_8); -+ __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = -1; -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_timedelta64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":979 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_datetime64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":994 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { -+ npy_datetime __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1004 -+ * also needed. That can be found using `get_datetime64_unit`. -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { -+ npy_timedelta __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1011 -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: -- * try: # <<<<<<<<<<<<<< -- * _import_umath() -- * except Exception: -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ -- __Pyx_XGIVEREF(__pyx_t_1); -- __Pyx_XGIVEREF(__pyx_t_2); -- __Pyx_XGIVEREF(__pyx_t_3); -- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); -- goto __pyx_L1_error; -- __pyx_L8_try_end:; -- } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -- * raise ImportError("numpy.core.umath failed to import") -+static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { -+ NPY_DATETIMEUNIT __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1018 -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ * """ -+ * return (obj).obmeta.base # <<<<<<<<<<<<<< -+ */ -+ __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - - /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_5); -- __Pyx_XDECREF(__pyx_t_6); -- __Pyx_XDECREF(__pyx_t_7); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; - __pyx_L0:; -- __Pyx_RefNannyFinishContext(); - return __pyx_r; - } - -@@ -5849,7 +4517,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_18CyCoinPackedMatrix_CyCoinPackedMatrix - sizeof(struct __pyx_obj_4cylp_2cy_18CyCoinPackedMatrix_CyCoinPackedMatrix), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_18CyCoinPackedMatrix_CyCoinPackedMatrix, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -5902,6 +4575,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_18CyCoinPackedMatrix_CyCoinPackedMatrix - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyMethodDef __pyx_methods[] = { -@@ -5951,13 +4630,8 @@ static struct PyModuleDef __pyx_moduledef = { - - static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_CyCoinPackedMatrix, __pyx_k_CyCoinPackedMatrix, sizeof(__pyx_k_CyCoinPackedMatrix), 0, 0, 1, 1}, -- {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, - {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, -- {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, -- {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, - {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, -- {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, - {&__pyx_n_s_colIndices, __pyx_k_colIndices, sizeof(__pyx_k_colIndices), 0, 0, 1, 1}, - {&__pyx_n_s_colOrdered, __pyx_k_colOrdered, sizeof(__pyx_k_colOrdered), 0, 0, 1, 1}, -@@ -5967,8 +4641,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, - {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, - {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, -- {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, -- {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, - {&__pyx_n_s_newMaxMajorDim, __pyx_k_newMaxMajorDim, sizeof(__pyx_k_newMaxMajorDim), 0, 0, 1, 1}, - {&__pyx_n_s_newMaxSize, __pyx_k_newMaxSize, sizeof(__pyx_k_newMaxSize), 0, 0, 1, 1}, - {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, -@@ -5976,7 +4648,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, - {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0}, - {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, -- {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, - {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, -@@ -5985,16 +4656,12 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, - {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, - {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, -- {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, - {&__pyx_n_s_vecInd, __pyx_k_vecInd, sizeof(__pyx_k_vecInd), 0, 0, 1, 1}, - {0, 0, 0, 0, 0, 0, 0} - }; - static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error) -- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error) -- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(2, 285, __pyx_L1_error) -- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 856, __pyx_L1_error) -- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error) -+ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 945, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -@@ -6023,82 +4690,27 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_GOTREF(__pyx_tuple__2); - __Pyx_GIVEREF(__pyx_tuple__2); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__3); -- __Pyx_GIVEREF(__pyx_tuple__3); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__4); -- __Pyx_GIVEREF(__pyx_tuple__4); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__5); -- __Pyx_GIVEREF(__pyx_tuple__5); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__6); -- __Pyx_GIVEREF(__pyx_tuple__6); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__7); -- __Pyx_GIVEREF(__pyx_tuple__7); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 1038, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__8); -- __Pyx_GIVEREF(__pyx_tuple__8); -+ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 945, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__3); -+ __Pyx_GIVEREF(__pyx_tuple__3); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 1044, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__9); -- __Pyx_GIVEREF(__pyx_tuple__9); -+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 951, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__4); -+ __Pyx_GIVEREF(__pyx_tuple__4); - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -6149,6 +4761,9 @@ static int __Pyx_modinit_function_export_code(void) { - - static int __Pyx_modinit_type_init_code(void) { - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); - /*--- Type init code ---*/ - if (PyType_Ready(&__pyx_type_4cylp_2cy_18CyCoinPackedMatrix_CyCoinPackedMatrix) < 0) __PYX_ERR(1, 7, __pyx_L1_error) -@@ -6171,6 +4786,9 @@ static int __Pyx_modinit_type_init_code(void) { - static int __Pyx_modinit_type_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); - /*--- Type import code ---*/ - __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) -@@ -6184,18 +4802,38 @@ static int __Pyx_modinit_type_import_code(void) { - __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) -+ __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error) -- __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error) -- __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error) -+ __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error) -+ __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error) -- __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error) -+ __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error) -+ __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error) -+ __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error) -+ __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error) -+ __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error) -+ __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error) -+ __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error) -+ __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error) -+ __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error) -+ __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error) -+ __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_RefNannyFinishContext(); - return 0; -@@ -6222,17 +4860,19 @@ static int __Pyx_modinit_function_import_code(void) { - } - - --#if PY_MAJOR_VERSION < 3 --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC void --#else -+#ifndef CYTHON_NO_PYINIT_EXPORT - #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#elif PY_MAJOR_VERSION < 3 -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" void -+#else -+#define __Pyx_PyMODINIT_FUNC void - #endif - #else --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC PyObject * -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * - #else --#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#define __Pyx_PyMODINIT_FUNC PyObject * - #endif - #endif - -@@ -6314,6 +4954,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_CyCoinPackedMatrix(PyObject *__pyx - #endif - { - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannyDeclarations - #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m) { -@@ -6361,11 +5004,9 @@ if (!__Pyx_RefNanny) { - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ -- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS -- #ifdef WITH_THREAD /* Python build with threading support? */ -+ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - PyEval_InitThreads(); - #endif -- #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; -@@ -6402,15 +5043,15 @@ if (!__Pyx_RefNanny) { - } - #endif - /*--- Builtin init code ---*/ -- if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Constants init code ---*/ -- if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Global type/function init code ---*/ - (void)__Pyx_modinit_global_init_code(); - (void)__Pyx_modinit_variable_export_code(); - (void)__Pyx_modinit_function_export_code(); -- if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; -- if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) -+ if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) - (void)__Pyx_modinit_variable_import_code(); - (void)__Pyx_modinit_function_import_code(); - /*--- Execution code ---*/ -@@ -6440,12 +5081,12 @@ if (!__Pyx_RefNanny) { - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -- * raise ImportError("numpy.core.umath failed to import") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - - /*--- Wrapped vars code ---*/ -@@ -6554,7 +5195,7 @@ static int __Pyx_ParseOptionalKeywords( - } - name = first_kw_arg; - #if PY_MAJOR_VERSION < 3 -- if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { -+ if (likely(PyString_Check(key))) { - while (*name) { - if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) - && _PyString_Eq(**name, key)) { -@@ -6581,7 +5222,7 @@ static int __Pyx_ParseOptionalKeywords( - while (*name) { - int cmp = (**name == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 -- (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : -+ (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**name, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; -@@ -6597,7 +5238,7 @@ static int __Pyx_ParseOptionalKeywords( - while (argname != first_kw_arg) { - int cmp = (**argname == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 -- (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : -+ (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**argname, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; -@@ -6748,6 +5389,7 @@ static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { - } - static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { - switch (ch) { -+ case '?': return "'bool'"; - case 'c': return "'char'"; - case 'b': return "'signed char'"; - case 'B': return "'unsigned char'"; -@@ -6790,7 +5432,7 @@ static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { - } - static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { - switch (ch) { -- case 'c': case 'b': case 'B': case 's': case 'p': return 1; -+ case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; - case 'h': case 'H': return sizeof(short); - case 'i': case 'I': return sizeof(int); - case 'l': case 'L': return sizeof(long); -@@ -6874,7 +5516,7 @@ static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { - case 'b': case 'h': case 'i': - case 'l': case 'q': case 's': case 'p': - return 'I'; -- case 'B': case 'H': case 'I': case 'L': case 'Q': -+ case '?': case 'B': case 'H': case 'I': case 'L': case 'Q': - return 'U'; - case 'f': case 'd': case 'g': - return (is_complex ? 'C' : 'R'); -@@ -7018,9 +5660,7 @@ static PyObject * - __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) - { - const char *ts = *tsp; -- int i = 0, number; -- int ndim = ctx->head->field->type->ndim; --; -+ int i = 0, number, ndim; - ++ts; - if (ctx->new_count != 1) { - PyErr_SetString(PyExc_ValueError, -@@ -7028,6 +5668,7 @@ __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) - return NULL; - } - if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; -+ ndim = ctx->head->field->type->ndim; - while (*ts && *ts != ')') { - switch (*ts) { - case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; -@@ -7153,12 +5794,12 @@ static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const cha - return NULL; - } - CYTHON_FALLTHROUGH; -- case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': -+ case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': - case 'l': case 'L': case 'q': case 'Q': - case 'f': case 'd': case 'g': - case 'O': case 'p': -- if (ctx->enc_type == *ts && got_Z == ctx->is_complex && -- ctx->enc_packmode == ctx->new_packmode) { -+ if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) && -+ (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) { - ctx->enc_count += ctx->new_count; - ctx->new_count = 1; - got_Z = 0; -@@ -7269,7 +5910,7 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - #if CYTHON_COMPILING_IN_CPYTHON - static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; -- ternaryfunc call = func->ob_type->tp_call; -+ ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -@@ -7444,263 +6085,6 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject - } - #endif - --/* PyCFunctionFastCall */ -- #if CYTHON_FAST_PYCCALL --static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { -- PyCFunctionObject *func = (PyCFunctionObject*)func_obj; -- PyCFunction meth = PyCFunction_GET_FUNCTION(func); -- PyObject *self = PyCFunction_GET_SELF(func); -- int flags = PyCFunction_GET_FLAGS(func); -- assert(PyCFunction_Check(func)); -- assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); -- assert(nargs >= 0); -- assert(nargs == 0 || args != NULL); -- /* _PyCFunction_FastCallDict() must not be called with an exception set, -- because it may clear it (directly or indirectly) and so the -- caller loses its exception */ -- assert(!PyErr_Occurred()); -- if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { -- return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); -- } else { -- return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); -- } --} --#endif -- --/* PyFunctionFastCall */ -- #if CYTHON_FAST_PYCALL --static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, -- PyObject *globals) { -- PyFrameObject *f; -- PyThreadState *tstate = __Pyx_PyThreadState_Current; -- PyObject **fastlocals; -- Py_ssize_t i; -- PyObject *result; -- assert(globals != NULL); -- /* XXX Perhaps we should create a specialized -- PyFrame_New() that doesn't take locals, but does -- take builtins without sanity checking them. -- */ -- assert(tstate != NULL); -- f = PyFrame_New(tstate, co, globals, NULL); -- if (f == NULL) { -- return NULL; -- } -- fastlocals = __Pyx_PyFrame_GetLocalsplus(f); -- for (i = 0; i < na; i++) { -- Py_INCREF(*args); -- fastlocals[i] = *args++; -- } -- result = PyEval_EvalFrameEx(f,0); -- ++tstate->recursion_depth; -- Py_DECREF(f); -- --tstate->recursion_depth; -- return result; --} --#if 1 || PY_VERSION_HEX < 0x030600B1 --static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) { -- PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func); -- PyObject *globals = PyFunction_GET_GLOBALS(func); -- PyObject *argdefs = PyFunction_GET_DEFAULTS(func); -- PyObject *closure; --#if PY_MAJOR_VERSION >= 3 -- PyObject *kwdefs; --#endif -- PyObject *kwtuple, **k; -- PyObject **d; -- Py_ssize_t nd; -- Py_ssize_t nk; -- PyObject *result; -- assert(kwargs == NULL || PyDict_Check(kwargs)); -- nk = kwargs ? PyDict_Size(kwargs) : 0; -- if (Py_EnterRecursiveCall((char*)" while calling a Python object")) { -- return NULL; -- } -- if ( --#if PY_MAJOR_VERSION >= 3 -- co->co_kwonlyargcount == 0 && --#endif -- likely(kwargs == NULL || nk == 0) && -- co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) { -- if (argdefs == NULL && co->co_argcount == nargs) { -- result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals); -- goto done; -- } -- else if (nargs == 0 && argdefs != NULL -- && co->co_argcount == Py_SIZE(argdefs)) { -- /* function called with no arguments, but all parameters have -- a default value: use default values as arguments .*/ -- args = &PyTuple_GET_ITEM(argdefs, 0); -- result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals); -- goto done; -- } -- } -- if (kwargs != NULL) { -- Py_ssize_t pos, i; -- kwtuple = PyTuple_New(2 * nk); -- if (kwtuple == NULL) { -- result = NULL; -- goto done; -- } -- k = &PyTuple_GET_ITEM(kwtuple, 0); -- pos = i = 0; -- while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) { -- Py_INCREF(k[i]); -- Py_INCREF(k[i+1]); -- i += 2; -- } -- nk = i / 2; -- } -- else { -- kwtuple = NULL; -- k = NULL; -- } -- closure = PyFunction_GET_CLOSURE(func); --#if PY_MAJOR_VERSION >= 3 -- kwdefs = PyFunction_GET_KW_DEFAULTS(func); --#endif -- if (argdefs != NULL) { -- d = &PyTuple_GET_ITEM(argdefs, 0); -- nd = Py_SIZE(argdefs); -- } -- else { -- d = NULL; -- nd = 0; -- } --#if PY_MAJOR_VERSION >= 3 -- result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL, -- args, (int)nargs, -- k, (int)nk, -- d, (int)nd, kwdefs, closure); --#else -- result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL, -- args, (int)nargs, -- k, (int)nk, -- d, (int)nd, closure); --#endif -- Py_XDECREF(kwtuple); --done: -- Py_LeaveRecursiveCall(); -- return result; --} --#endif --#endif -- --/* PyObjectCallMethO */ -- #if CYTHON_COMPILING_IN_CPYTHON --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) { -- PyObject *self, *result; -- PyCFunction cfunc; -- cfunc = PyCFunction_GET_FUNCTION(func); -- self = PyCFunction_GET_SELF(func); -- if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -- return NULL; -- result = cfunc(self, arg); -- Py_LeaveRecursiveCall(); -- if (unlikely(!result) && unlikely(!PyErr_Occurred())) { -- PyErr_SetString( -- PyExc_SystemError, -- "NULL result without error in PyObject_Call"); -- } -- return result; --} --#endif -- --/* PyObjectCallOneArg */ -- #if CYTHON_COMPILING_IN_CPYTHON --static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { -- PyObject *result; -- PyObject *args = PyTuple_New(1); -- if (unlikely(!args)) return NULL; -- Py_INCREF(arg); -- PyTuple_SET_ITEM(args, 0, arg); -- result = __Pyx_PyObject_Call(func, args, NULL); -- Py_DECREF(args); -- return result; --} --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { --#if CYTHON_FAST_PYCALL -- if (PyFunction_Check(func)) { -- return __Pyx_PyFunction_FastCall(func, &arg, 1); -- } --#endif -- if (likely(PyCFunction_Check(func))) { -- if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { -- return __Pyx_PyObject_CallMethO(func, arg); --#if CYTHON_FAST_PYCCALL -- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { -- return __Pyx_PyCFunction_FastCall(func, &arg, 1); --#endif -- } -- } -- return __Pyx__PyObject_CallOneArg(func, arg); --} --#else --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { -- PyObject *result; -- PyObject *args = PyTuple_Pack(1, arg); -- if (unlikely(!args)) return NULL; -- result = __Pyx_PyObject_Call(func, args, NULL); -- Py_DECREF(args); -- return result; --} --#endif -- --/* DictGetItem */ -- #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { -- PyObject *value; -- value = PyDict_GetItemWithError(d, key); -- if (unlikely(!value)) { -- if (!PyErr_Occurred()) { -- if (unlikely(PyTuple_Check(key))) { -- PyObject* args = PyTuple_Pack(1, key); -- if (likely(args)) { -- PyErr_SetObject(PyExc_KeyError, args); -- Py_DECREF(args); -- } -- } else { -- PyErr_SetObject(PyExc_KeyError, key); -- } -- } -- return NULL; -- } -- Py_INCREF(value); -- return value; --} --#endif -- --/* RaiseTooManyValuesToUnpack */ -- static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { -- PyErr_Format(PyExc_ValueError, -- "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); --} -- --/* RaiseNeedMoreValuesToUnpack */ -- static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { -- PyErr_Format(PyExc_ValueError, -- "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", -- index, (index == 1) ? "" : "s"); --} -- --/* RaiseNoneIterError */ -- static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); --} -- --/* ExtTypeTest */ -- static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { -- if (unlikely(!type)) { -- PyErr_SetString(PyExc_SystemError, "Missing type object"); -- return 0; -- } -- if (likely(__Pyx_TypeCheck(obj, type))) -- return 1; -- PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", -- Py_TYPE(obj)->tp_name, type->tp_name); -- return 0; --} -- - /* GetTopmostException */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * -@@ -7906,6 +6290,28 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - } - #endif - -+/* PyObjectGetAttrStrNoError */ -+ static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { -+ __Pyx_PyThreadState_declare -+ __Pyx_PyThreadState_assign -+ if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) -+ __Pyx_PyErr_Clear(); -+} -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { -+ PyObject *result; -+#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 -+ PyTypeObject* tp = Py_TYPE(obj); -+ if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { -+ return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); -+ } -+#endif -+ result = __Pyx_PyObject_GetAttrStr(obj, attr_name); -+ if (unlikely(!result)) { -+ __Pyx_PyObject_GetAttrStr_ClearAttributeError(); -+ } -+ return result; -+} -+ - /* SetupReduce */ - static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { - int ret; -@@ -7933,43 +6339,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { - PyObject *setstate = NULL; - PyObject *setstate_cython = NULL; - #if CYTHON_USE_PYTYPE_LOOKUP -- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #else -- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #endif - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #else -- object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #endif -- reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; -+ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; - if (reduce_ex == object_reduce_ex) { - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #else -- object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #endif -- reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; -+ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; - if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { -- reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; -+ reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); -+ if (likely(reduce_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (reduce == object_reduce || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); - if (!setstate) PyErr_Clear(); - if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { -- setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; -+ setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); -+ if (likely(setstate_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (!setstate || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - } - PyType_Modified((PyTypeObject*)type_obj); - } - } -- goto GOOD; --BAD: -+ goto __PYX_GOOD; -+__PYX_BAD: - if (!PyErr_Occurred()) - PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); - ret = -1; --GOOD: -+__PYX_GOOD: - #if !CYTHON_USE_PYTYPE_LOOKUP - Py_XDECREF(object_reduce); - Py_XDECREF(object_reduce_ex); -@@ -8073,7 +6487,7 @@ static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, - { - #if PY_MAJOR_VERSION >= 3 - if (level == -1) { -- if (strchr(__Pyx_MODULE_NAME, '.')) { -+ if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { - module = PyImport_ImportModuleLevelObject( - name, global_dict, empty_dict, list, 1); - if (!module) { -@@ -8136,7 +6550,7 @@ static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UIN - - /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK --static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { -+static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { - PyObject *use_cline; - PyObject *ptype, *pvalue, *ptraceback; - #if CYTHON_COMPILING_IN_CPYTHON -@@ -8166,7 +6580,7 @@ static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { - } - if (!use_cline) { - c_line = 0; -- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); -+ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; -@@ -8240,7 +6654,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - if (__pyx_code_cache.count == __pyx_code_cache.max_count) { - int new_max = __pyx_code_cache.max_count + 64; - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( -- __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); -+ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); - if (unlikely(!entries)) { - return; - } -@@ -8263,30 +6677,31 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { -- PyCodeObject *py_code = 0; -- PyObject *py_srcfile = 0; -- PyObject *py_funcname = 0; -+ PyCodeObject *py_code = NULL; -+ PyObject *py_funcname = NULL; - #if PY_MAJOR_VERSION < 3 -+ PyObject *py_srcfile = NULL; - py_srcfile = PyString_FromString(filename); -- #else -- py_srcfile = PyUnicode_FromString(filename); -- #endif - if (!py_srcfile) goto bad; -+ #endif - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; -+ funcname = PyUnicode_AsUTF8(py_funcname); -+ if (!funcname) goto bad; - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); -- #else -- py_funcname = PyUnicode_FromString(funcname); -+ if (!py_funcname) goto bad; - #endif - } -- if (!py_funcname) goto bad; -+ #if PY_MAJOR_VERSION < 3 - py_code = __Pyx_PyCode_New( - 0, - 0, -@@ -8305,11 +6720,16 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - __pyx_empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); -- Py_DECREF(py_funcname); -+ #else -+ py_code = PyCode_NewEmpty(filename, funcname, py_line); -+ #endif -+ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline - return py_code; - bad: -- Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -+ #if PY_MAJOR_VERSION < 3 -+ Py_XDECREF(py_srcfile); -+ #endif - return NULL; - } - static void __Pyx_AddTraceback(const char *funcname, int c_line, -@@ -8344,7 +6764,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - #if PY_MAJOR_VERSION < 3 - static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { - if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); -- if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); - PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); - return -1; - } -@@ -8356,45 +6775,13 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - return; - } - if ((0)) {} -- else if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); - view->obj = NULL; - Py_DECREF(obj); - } - #endif - - -- /* CIntToPy */ -- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(int) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(int) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(int) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(int), -- little, !is_unsigned); -- } --} -- --/* CIntFromPyVerify */ -+ /* CIntFromPyVerify */ - #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ - __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) - #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ -@@ -8533,7 +6920,6 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_float(a, a); - return __Pyx_c_prod_float(a, a); - case 3: - z = __Pyx_c_prod_float(a, a); -@@ -8688,7 +7074,6 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_double(a, a); - return __Pyx_c_prod_double(a, a); - case 3: - z = __Pyx_c_prod_double(a, a); -@@ -8727,24 +7112,31 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - #endif - - /* CIntToPy */ -- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { -- const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; -+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { -- if (sizeof(enum NPY_TYPES) < sizeof(long)) { -+ if (sizeof(int) < sizeof(long)) { - return PyInt_FromLong((long) value); -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { -+ } else if (sizeof(int) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); - #ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); - #endif - } - } else { -- if (sizeof(enum NPY_TYPES) <= sizeof(long)) { -+ if (sizeof(int) <= sizeof(long)) { - return PyInt_FromLong((long) value); - #ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); - #endif - } -@@ -8752,14 +7144,21 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), -+ return _PyLong_FromByteArray(bytes, sizeof(int), - little, !is_unsigned); - } - } - - /* CIntFromPy */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -8948,7 +7347,14 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - - /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(long) < sizeof(long)) { -@@ -8979,7 +7385,14 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - - /* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -9530,6 +7943,23 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_DECREF(x); - return ival; - } -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { -+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { -+ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); -+#if PY_MAJOR_VERSION < 3 -+ } else if (likely(PyInt_CheckExact(o))) { -+ return PyInt_AS_LONG(o); -+#endif -+ } else { -+ Py_ssize_t ival; -+ PyObject *x; -+ x = PyNumber_Index(o); -+ if (!x) return -1; -+ ival = PyInt_AsLong(x); -+ Py_DECREF(x); -+ return ival; -+ } -+} - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); - } -diff --git a/cylp/cy/CyCutGeneratorPythonBase.cpp b/cylp/cy/CyCutGeneratorPythonBase.cpp -index 85efdde..55d29ea 100644 ---- a/cylp/cy/CyCutGeneratorPythonBase.cpp -+++ b/cylp/cy/CyCutGeneratorPythonBase.cpp -@@ -1,14 +1,16 @@ --/* Generated by Cython 0.29.12 */ -+/* Generated by Cython 0.29.25 */ - -+#ifndef PY_SSIZE_T_CLEAN - #define PY_SSIZE_T_CLEAN -+#endif /* PY_SSIZE_T_CLEAN */ - #include "Python.h" - #ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. - #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. - #else --#define CYTHON_ABI "0_29_12" --#define CYTHON_HEX_VERSION 0x001D0CF0 -+#define CYTHON_ABI "0_29_25" -+#define CYTHON_HEX_VERSION 0x001D19F0 - #define CYTHON_FUTURE_DIVISION 0 - #include - #ifndef offsetof -@@ -155,7 +157,7 @@ - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif -- #if PY_VERSION_HEX < 0x030300F0 -+ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) -@@ -174,7 +176,7 @@ - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL -- #define CYTHON_FAST_PYCALL 1 -+ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1) - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) -@@ -193,7 +195,9 @@ - #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) - #endif - #if CYTHON_USE_PYLONG_INTERNALS -- #include "longintrepr.h" -+ #if PY_MAJOR_VERSION < 3 -+ #include "longintrepr.h" -+ #endif - #undef SHIFT - #undef BASE - #undef MASK -@@ -324,9 +328,68 @@ class __Pyx_FakeReference { - #define __Pyx_DefaultClassType PyClass_Type - #else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" --#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 -- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ -- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -+ #define __Pyx_DefaultClassType PyType_Type -+#if PY_VERSION_HEX >= 0x030B00A1 -+ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, -+ PyObject *code, PyObject *c, PyObject* n, PyObject *v, -+ PyObject *fv, PyObject *cell, PyObject* fn, -+ PyObject *name, int fline, PyObject *lnos) { -+ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; -+ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; -+ const char *fn_cstr=NULL; -+ const char *name_cstr=NULL; -+ PyCodeObject* co=NULL; -+ PyObject *type, *value, *traceback; -+ PyErr_Fetch(&type, &value, &traceback); -+ if (!(kwds=PyDict_New())) goto end; -+ if (!(argcount=PyLong_FromLong(a))) goto end; -+ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; -+ if (!(posonlyargcount=PyLong_FromLong(0))) goto end; -+ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; -+ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; -+ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; -+ if (!(nlocals=PyLong_FromLong(l))) goto end; -+ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; -+ if (!(stacksize=PyLong_FromLong(s))) goto end; -+ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; -+ if (!(flags=PyLong_FromLong(f))) goto end; -+ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; -+ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; -+ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; -+ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; -+ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; -+ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here -+ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; -+ Py_XDECREF((PyObject*)co); -+ co = (PyCodeObject*)call_result; -+ call_result = NULL; -+ if (0) { -+ cleanup_code_too: -+ Py_XDECREF((PyObject*)co); -+ co = NULL; -+ } -+ end: -+ Py_XDECREF(kwds); -+ Py_XDECREF(argcount); -+ Py_XDECREF(posonlyargcount); -+ Py_XDECREF(kwonlyargcount); -+ Py_XDECREF(nlocals); -+ Py_XDECREF(stacksize); -+ Py_XDECREF(replace); -+ Py_XDECREF(call_result); -+ Py_XDECREF(empty); -+ if (type) { -+ PyErr_Restore(type, value, traceback); -+ } -+ return co; -+ } - #else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -@@ -440,8 +503,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #endif - #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 -+ #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) -+ #else -+ #define __Pyx_PyUnicode_READY(op) (0) -+ #endif - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) -@@ -449,7 +516,15 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) -+ #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) -+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) -+ #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) -+ #endif -+ #else -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) -+ #endif - #else - #define CYTHON_PEP393_ENABLED 0 - #define PyUnicode_1BYTE_KIND 1 -@@ -498,8 +573,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define PyString_Type PyUnicode_Type - #define PyString_Check PyUnicode_Check - #define PyString_CheckExact PyUnicode_CheckExact -+#ifndef PyObject_Unicode - #define PyObject_Unicode PyObject_Str - #endif -+#endif - #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) - #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) -@@ -510,6 +587,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #ifndef PySet_CheckExact - #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) - #endif -+#if PY_VERSION_HEX >= 0x030900A4 -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) -+#else -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) -+#endif - #if CYTHON_ASSUME_SAFE_MACROS - #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) - #else -@@ -543,13 +627,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong -- #define __Pyx_PyInt_AsHash_t PyInt_AsLong -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t - #else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t -- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t - #endif - #if PY_MAJOR_VERSION >= 3 -- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) -+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) - #else - #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) - #endif -@@ -590,11 +674,10 @@ static CYTHON_INLINE float __PYX_NAN() { - #define __Pyx_truncl truncl - #endif - -- -+#define __PYX_MARK_ERR_POS(f_index, lineno) \ -+ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } - #define __PYX_ERR(f_index, lineno, Ln_error) \ --{ \ -- __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ --} -+ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } - - #ifndef __PYX_EXTERN_C - #ifdef __cplusplus -@@ -615,7 +698,13 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "ClpFactorization.hpp" - #include "IClpPrimalColumnPivotBase.h" - #include "numpy/arrayobject.h" -+#include "numpy/ndarrayobject.h" -+#include "numpy/ndarraytypes.h" -+#include "numpy/arrayscalars.h" - #include "numpy/ufuncobject.h" -+ -+ /* NumPy API declarations from "numpy/__init__.pxd" */ -+ - #include "ClpDualRowPivot.hpp" - #include "IClpDualRowPivotBase.h" - #include "CoinModel.hpp" -@@ -643,11 +732,11 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "OsiSolverInterface.hpp" - #include "CbcCompareUser.hpp" - #include "ICbcModel.hpp" -+#include - #include "ios" - #include "new" - #include "stdexcept" - #include "typeinfo" --#include - #include - #include "IClpSimplex.hpp" - #include "IOsiCuts.hpp" -@@ -749,6 +838,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); - static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); - #if CYTHON_ASSUME_SAFE_MACROS - #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) - #else -@@ -884,26 +974,26 @@ static const char *__pyx_filename; - - static const char *__pyx_f[] = { - "stringsource", -- "cylp\\cy\\CyCutGeneratorPythonBase.pyx", -+ "cylp/cy/CyCutGeneratorPythonBase.pyx", - "__init__.pxd", - "type.pxd", - "bool.pxd", - "complex.pxd", -- "cylp\\cy\\CyCoinIndexedVector.pxd", -- "cylp\\cy\\CyClpPrimalColumnPivotBase.pxd", -- "cylp\\cy\\CyClpDualRowPivotBase.pxd", -- "cylp\\cy\\CyCoinModel.pxd", -- "cylp\\cy\\CyCoinPackedMatrix.pxd", -- "cylp\\cy\\CyCgl.pxd", -- "cylp\\cy\\CyCbcNode.pxd", -- "cylp\\cy\\CyOsiSolverInterface.pxd", -- "cylp\\cy\\CyCbcModel.pxd", -- "cylp\\cy\\CyClpSimplex.pxd", -- "cylp\\cy\\CyOsiCuts.pxd", -- "cylp\\cy\\CyCglTreeInfo.pxd", -+ "cylp/cy/CyCoinIndexedVector.pxd", -+ "cylp/cy/CyClpPrimalColumnPivotBase.pxd", -+ "cylp/cy/CyClpDualRowPivotBase.pxd", -+ "cylp/cy/CyCoinModel.pxd", -+ "cylp/cy/CyCoinPackedMatrix.pxd", -+ "cylp/cy/CyCgl.pxd", -+ "cylp/cy/CyCbcNode.pxd", -+ "cylp/cy/CyOsiSolverInterface.pxd", -+ "cylp/cy/CyCbcModel.pxd", -+ "cylp/cy/CyClpSimplex.pxd", -+ "cylp/cy/CyOsiCuts.pxd", -+ "cylp/cy/CyCglTreeInfo.pxd", - }; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":776 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":690 - * # in Cython to enable them only on the right systems. - * - * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< -@@ -912,7 +1002,7 @@ static const char *__pyx_f[] = { - */ - typedef npy_int8 __pyx_t_5numpy_int8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":777 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":691 - * - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< -@@ -921,7 +1011,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; - */ - typedef npy_int16 __pyx_t_5numpy_int16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":778 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":692 - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< -@@ -930,7 +1020,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; - */ - typedef npy_int32 __pyx_t_5numpy_int32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":779 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":693 - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t - * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< -@@ -939,7 +1029,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; - */ - typedef npy_int64 __pyx_t_5numpy_int64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":783 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":697 - * #ctypedef npy_int128 int128_t - * - * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< -@@ -948,7 +1038,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; - */ - typedef npy_uint8 __pyx_t_5numpy_uint8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":784 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":698 - * - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< -@@ -957,7 +1047,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; - */ - typedef npy_uint16 __pyx_t_5numpy_uint16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":785 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":699 - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< -@@ -966,7 +1056,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; - */ - typedef npy_uint32 __pyx_t_5numpy_uint32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":786 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":700 - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t - * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< -@@ -975,7 +1065,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; - */ - typedef npy_uint64 __pyx_t_5numpy_uint64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":790 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":704 - * #ctypedef npy_uint128 uint128_t - * - * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< -@@ -984,7 +1074,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; - */ - typedef npy_float32 __pyx_t_5numpy_float32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":791 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":705 - * - * ctypedef npy_float32 float32_t - * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< -@@ -993,7 +1083,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; - */ - typedef npy_float64 __pyx_t_5numpy_float64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":800 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":714 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< -@@ -1002,7 +1092,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; - */ - typedef npy_long __pyx_t_5numpy_int_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":801 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":715 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< -@@ -1011,7 +1101,7 @@ typedef npy_long __pyx_t_5numpy_int_t; - */ - typedef npy_longlong __pyx_t_5numpy_long_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":802 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":716 - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t - * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< -@@ -1020,7 +1110,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; - */ - typedef npy_longlong __pyx_t_5numpy_longlong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":804 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":718 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< -@@ -1029,7 +1119,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; - */ - typedef npy_ulong __pyx_t_5numpy_uint_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":805 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":719 - * - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< -@@ -1038,7 +1128,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":806 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":720 - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t - * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< -@@ -1047,7 +1137,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":808 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":722 - * ctypedef npy_ulonglong ulonglong_t - * - * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< -@@ -1056,7 +1146,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - */ - typedef npy_intp __pyx_t_5numpy_intp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":809 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":723 - * - * ctypedef npy_intp intp_t - * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< -@@ -1065,7 +1155,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; - */ - typedef npy_uintp __pyx_t_5numpy_uintp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":811 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":725 - * ctypedef npy_uintp uintp_t - * - * ctypedef npy_double float_t # <<<<<<<<<<<<<< -@@ -1074,7 +1164,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; - */ - typedef npy_double __pyx_t_5numpy_float_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":812 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":726 - * - * ctypedef npy_double float_t - * ctypedef npy_double double_t # <<<<<<<<<<<<<< -@@ -1083,7 +1173,7 @@ typedef npy_double __pyx_t_5numpy_float_t; - */ - typedef npy_double __pyx_t_5numpy_double_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":813 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":727 - * ctypedef npy_double float_t - * ctypedef npy_double double_t - * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< -@@ -1149,7 +1239,7 @@ struct __pyx_obj_4cylp_2cy_13CyCglTreeInfo_CyCglTreeInfo; - struct __pyx_obj_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase; - struct __pyx_obj_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":815 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":729 - * ctypedef npy_longdouble longdouble_t - * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< -@@ -1158,7 +1248,7 @@ struct __pyx_obj_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase; - */ - typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":816 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":730 - * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< -@@ -1167,7 +1257,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - */ - typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":817 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":731 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< -@@ -1176,7 +1266,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - */ - typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":819 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":733 - * ctypedef npy_clongdouble clongdouble_t - * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< -@@ -1976,6 +2066,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #ifndef Py_MEMBER_SIZE - #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) - #endif -+#if CYTHON_FAST_PYCALL - static size_t __pyx_pyframe_localsplus_offset = 0; - #include "frameobject.h" - #define __Pxy_PyFrame_Initialize_Offsets()\ -@@ -1983,6 +2074,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) - #define __Pyx_PyFrame_GetLocalsplus(frame)\ - (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) -+#endif // CYTHON_FAST_PYCALL - #endif - - /* PyObjectCall.proto */ -@@ -2049,29 +2141,6 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - /* RaiseException.proto */ - static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); - --/* DictGetItem.proto */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); --#define __Pyx_PyObject_Dict_GetItem(obj, name)\ -- (likely(PyDict_CheckExact(obj)) ?\ -- __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) --#else --#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) --#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) --#endif -- --/* RaiseTooManyValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); -- --/* RaiseNeedMoreValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); -- --/* RaiseNoneIterError.proto */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -- --/* ExtTypeTest.proto */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); -- - /* GetTopmostException.proto */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); -@@ -2144,6 +2213,9 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - /* SetVTable.proto */ - static int __Pyx_SetVtable(PyObject *dict, void *vtable); - -+/* PyObjectGetAttrStrNoError.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); -+ - /* SetupReduce.proto */ - static int __Pyx_setup_reduce(PyObject* type_obj); - -@@ -2297,14 +2369,10 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - #endif - #endif - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -- --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); -- --/* CIntFromPy.proto */ --static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); -+/* GCCDiagnostics.proto */ -+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -+#define __Pyx_HAS_GCC_DIAGNOSTIC -+#endif - - /* CIntToPy.proto */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); -@@ -2312,6 +2380,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); - /* CIntFromPy.proto */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); - -+/* CIntFromPy.proto */ -+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); -+ - /* FastTypeChecks.proto */ - #if CYTHON_COMPILING_IN_CPYTHON - #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) -@@ -2435,8 +2506,17 @@ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; - static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; - static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; - static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -+static PyTypeObject *__pyx_ptype_5numpy_generic = 0; -+static PyTypeObject *__pyx_ptype_5numpy_number = 0; -+static PyTypeObject *__pyx_ptype_5numpy_integer = 0; -+static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; -+static PyTypeObject *__pyx_ptype_5numpy_floating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; -+static PyTypeObject *__pyx_ptype_5numpy_character = 0; - static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ - - /* Module declarations from 'cylp.cy.CyClpDualRowPivotBase' */ - static PyTypeObject *__pyx_ptype_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase = 0; -@@ -2502,16 +2582,12 @@ int __pyx_module_is_main_cylp__cy__CyCutGeneratorPythonBase = 0; - - /* Implementation of 'cylp.cy.CyCutGeneratorPythonBase' */ - static PyObject *__pyx_builtin_TypeError; --static PyObject *__pyx_builtin_ValueError; --static PyObject *__pyx_builtin_range; --static PyObject *__pyx_builtin_RuntimeError; - static PyObject *__pyx_builtin_ImportError; - static const char __pyx_k_cut[] = "cut"; - static const char __pyx_k_init[] = "__init__"; - static const char __pyx_k_main[] = "__main__"; - static const char __pyx_k_name[] = "__name__"; - static const char __pyx_k_test[] = "__test__"; --static const char __pyx_k_range[] = "range"; - static const char __pyx_k_reduce[] = "__reduce__"; - static const char __pyx_k_isRange[] = "isRange"; - static const char __pyx_k_evaluate[] = "evaluate"; -@@ -2521,10 +2597,8 @@ static const char __pyx_k_TypeError[] = "TypeError"; - static const char __pyx_k_addRowCut[] = "addRowCut"; - static const char __pyx_k_cyLPModel[] = "cyLPModel"; - static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; --static const char __pyx_k_ValueError[] = "ValueError"; - static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; - static const char __pyx_k_ImportError[] = "ImportError"; --static const char __pyx_k_RuntimeError[] = "RuntimeError"; - static const char __pyx_k_addColumnCut[] = "addColumnCut"; - static const char __pyx_k_generateCuts[] = "generateCuts"; - static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; -@@ -2532,23 +2606,12 @@ static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; - static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; - static const char __pyx_k_cutGeneratorObject[] = "cutGeneratorObject"; - static const char __pyx_k_CyCutGeneratorPythonBase[] = "CyCutGeneratorPythonBase"; --static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; - static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; --static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; --static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; --static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; --static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; - static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; - static const char __pyx_k_self_CppSelf_cannot_be_converted[] = "self.CppSelf cannot be converted to a Python object for pickling"; --static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; - static PyObject *__pyx_n_s_CyCutGeneratorPythonBase; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; - static PyObject *__pyx_n_s_ImportError; --static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; --static PyObject *__pyx_n_s_RuntimeError; - static PyObject *__pyx_n_s_TypeError; --static PyObject *__pyx_n_s_ValueError; - static PyObject *__pyx_n_s_addColumnCut; - static PyObject *__pyx_n_s_addRowCut; - static PyObject *__pyx_n_s_cline_in_traceback; -@@ -2562,12 +2625,9 @@ static PyObject *__pyx_n_s_init; - static PyObject *__pyx_n_s_isRange; - static PyObject *__pyx_n_s_main; - static PyObject *__pyx_n_s_name; --static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; --static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; - static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; - static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; - static PyObject *__pyx_n_s_pyx_vtable; --static PyObject *__pyx_n_s_range; - static PyObject *__pyx_n_s_reduce; - static PyObject *__pyx_n_s_reduce_cython; - static PyObject *__pyx_n_s_reduce_ex; -@@ -2575,23 +2635,15 @@ static PyObject *__pyx_kp_s_self_CppSelf_cannot_be_converted; - static PyObject *__pyx_n_s_setstate; - static PyObject *__pyx_n_s_setstate_cython; - static PyObject *__pyx_n_s_test; --static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; - static int __pyx_pf_4cylp_2cy_24CyCutGeneratorPythonBase_24CyCutGeneratorPythonBase___init__(struct __pyx_obj_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase *__pyx_v_self, PyObject *__pyx_v_cutGeneratorObject, PyObject *__pyx_v_cyLPModel); /* proto */ - static void __pyx_pf_4cylp_2cy_24CyCutGeneratorPythonBase_24CyCutGeneratorPythonBase_2__dealloc__(struct __pyx_obj_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_24CyCutGeneratorPythonBase_24CyCutGeneratorPythonBase_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_24CyCutGeneratorPythonBase_24CyCutGeneratorPythonBase_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ - static PyObject *__pyx_tp_new_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ - static PyObject *__pyx_tuple_; - static PyObject *__pyx_tuple__2; - static PyObject *__pyx_tuple__3; - static PyObject *__pyx_tuple__4; --static PyObject *__pyx_tuple__5; --static PyObject *__pyx_tuple__6; --static PyObject *__pyx_tuple__7; --static PyObject *__pyx_tuple__8; --static PyObject *__pyx_tuple__9; - /* Late includes */ - - /* "cylp/cy/CyCutGeneratorPythonBase.pyx":8 -@@ -2607,6 +2659,9 @@ static int __pyx_pw_4cylp_2cy_24CyCutGeneratorPythonBase_24CyCutGeneratorPythonB - static int __pyx_pw_4cylp_2cy_24CyCutGeneratorPythonBase_24CyCutGeneratorPythonBase_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_cutGeneratorObject = 0; - PyObject *__pyx_v_cyLPModel = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - int __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); -@@ -2673,6 +2728,9 @@ static int __pyx_pf_4cylp_2cy_24CyCutGeneratorPythonBase_24CyCutGeneratorPythonB - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__init__", 0); - - /* "cylp/cy/CyCutGeneratorPythonBase.pyx":9 -@@ -2833,6 +2891,9 @@ static PyObject *__pyx_f_4cylp_2cy_24CyCutGeneratorPythonBase_24CyCutGeneratorPy - Py_ssize_t __pyx_t_8; - PyObject *(*__pyx_t_9)(PyObject *); - PyObject *__pyx_t_10 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("generateCuts", 0); - - /* "cylp/cy/CyCutGeneratorPythonBase.pyx":20 -@@ -3322,6 +3383,9 @@ static PyObject *__pyx_pf_4cylp_2cy_24CyCutGeneratorPythonBase_24CyCutGeneratorP - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -3377,6 +3441,9 @@ static PyObject *__pyx_pf_4cylp_2cy_24CyCutGeneratorPythonBase_24CyCutGeneratorP - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -3407,863 +3474,7 @@ static PyObject *__pyx_pf_4cylp_2cy_24CyCutGeneratorPythonBase_24CyCutGeneratorP - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); -- __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_v_i; -- int __pyx_v_ndim; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- int __pyx_v_t; -- char *__pyx_v_f; -- PyArray_Descr *__pyx_v_descr = 0; -- int __pyx_v_offset; -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- int __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- int __pyx_t_4; -- int __pyx_t_5; -- int __pyx_t_6; -- PyArray_Descr *__pyx_t_7; -- PyObject *__pyx_t_8 = NULL; -- char *__pyx_t_9; -- if (__pyx_v_info == NULL) { -- PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); -- return -1; -- } -- __Pyx_RefNannySetupContext("__getbuffer__", 0); -- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); -- __Pyx_GIVEREF(__pyx_v_info->obj); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":265 -- * -- * cdef int i, ndim -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":266 -- * cdef int i, ndim -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * -- * ndim = PyArray_NDIM(self) -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":268 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- */ -- __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L4_bool_binop_done; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":271 -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not C contiguous") -- * -- */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L4_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 272, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L7_bool_binop_done; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":275 -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not Fortran contiguous") -- * -- */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 276, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":278 -- * raise ValueError(u"ndarray is not Fortran contiguous") -- * -- * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":279 -- * -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * # Allocate new buffer for strides and shape info. -- */ -- __pyx_v_info->ndim = __pyx_v_ndim; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":283 -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- */ -- __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":284 -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim # <<<<<<<<<<<<<< -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- */ -- __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":285 -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim -- * for i in range(ndim): # <<<<<<<<<<<<<< -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] -- */ -- __pyx_t_4 = __pyx_v_ndim; -- __pyx_t_5 = __pyx_t_4; -- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { -- __pyx_v_i = __pyx_t_6; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":286 -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- */ -- (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":287 -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< -- * else: -- * info.strides = PyArray_STRIDES(self) -- */ -- (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- goto __pyx_L9; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":289 -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- */ -- /*else*/ { -- __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":290 -- * else: -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- */ -- __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); -- } -- __pyx_L9:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":291 -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL # <<<<<<<<<<<<<< -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) -- */ -- __pyx_v_info->suboffsets = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":292 -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< -- * info.readonly = not PyArray_ISWRITEABLE(self) -- * -- */ -- __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":293 -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< -- * -- * cdef int t -- */ -- __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":296 -- * -- * cdef int t -- * cdef char* f = NULL # <<<<<<<<<<<<<< -- * cdef dtype descr = PyArray_DESCR(self) -- * cdef int offset -- */ -- __pyx_v_f = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":297 -- * cdef int t -- * cdef char* f = NULL -- * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< -- * cdef int offset -- * -- */ -- __pyx_t_7 = PyArray_DESCR(__pyx_v_self); -- __pyx_t_3 = ((PyObject *)__pyx_t_7); -- __Pyx_INCREF(__pyx_t_3); -- __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":300 -- * cdef int offset -- * -- * info.obj = self # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(descr): -- */ -- __Pyx_INCREF(((PyObject *)__pyx_v_self)); -- __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); -- __pyx_v_info->obj = ((PyObject *)__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":303 -- * -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num # <<<<<<<<<<<<<< -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- */ -- __pyx_t_4 = __pyx_v_descr->type_num; -- __pyx_v_t = __pyx_t_4; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); -- if (!__pyx_t_2) { -- goto __pyx_L15_next_or; -- } else { -- } -- __pyx_t_2 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_L15_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":305 -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L14_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 306, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":307 -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- */ -- switch (__pyx_v_t) { -- case NPY_BYTE: -- __pyx_v_f = ((char *)"b"); -- break; -- case NPY_UBYTE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":308 -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- */ -- __pyx_v_f = ((char *)"B"); -- break; -- case NPY_SHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":309 -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- */ -- __pyx_v_f = ((char *)"h"); -- break; -- case NPY_USHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":310 -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- */ -- __pyx_v_f = ((char *)"H"); -- break; -- case NPY_INT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":311 -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- */ -- __pyx_v_f = ((char *)"i"); -- break; -- case NPY_UINT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":312 -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- */ -- __pyx_v_f = ((char *)"I"); -- break; -- case NPY_LONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":313 -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- */ -- __pyx_v_f = ((char *)"l"); -- break; -- case NPY_ULONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":314 -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- */ -- __pyx_v_f = ((char *)"L"); -- break; -- case NPY_LONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":315 -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- */ -- __pyx_v_f = ((char *)"q"); -- break; -- case NPY_ULONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":316 -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- */ -- __pyx_v_f = ((char *)"Q"); -- break; -- case NPY_FLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":317 -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- */ -- __pyx_v_f = ((char *)"f"); -- break; -- case NPY_DOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":318 -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- */ -- __pyx_v_f = ((char *)"d"); -- break; -- case NPY_LONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":319 -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- */ -- __pyx_v_f = ((char *)"g"); -- break; -- case NPY_CFLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":320 -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- */ -- __pyx_v_f = ((char *)"Zf"); -- break; -- case NPY_CDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":321 -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" -- */ -- __pyx_v_f = ((char *)"Zd"); -- break; -- case NPY_CLONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":322 -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f = "O" -- * else: -- */ -- __pyx_v_f = ((char *)"Zg"); -- break; -- case NPY_OBJECT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":323 -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_v_f = ((char *)"O"); -- break; -- default: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":325 -- * elif t == NPY_OBJECT: f = "O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * info.format = f -- * return -- */ -- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_8); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 325, __pyx_L1_error) -- break; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":326 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f # <<<<<<<<<<<<<< -- * return -- * else: -- */ -- __pyx_v_info->format = __pyx_v_f; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":327 -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f -- * return # <<<<<<<<<<<<<< -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- */ -- __pyx_r = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":329 -- * return -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- */ -- /*else*/ { -- __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":330 -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, -- */ -- (__pyx_v_info->format[0]) = '^'; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":331 -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 # <<<<<<<<<<<<<< -- * f = _util_dtypestring(descr, info.format + 1, -- * info.format + _buffer_format_string_len, -- */ -- __pyx_v_offset = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":332 -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< -- * info.format + _buffer_format_string_len, -- * &offset) -- */ -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":335 -- * info.format + _buffer_format_string_len, -- * &offset) -- * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- */ -- (__pyx_v_f[0]) = '\x00'; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- -- /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; -- if (__pyx_v_info->obj != NULL) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- goto __pyx_L2; -- __pyx_L0:; -- if (__pyx_v_info->obj == Py_None) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- __pyx_L2:; -- __Pyx_XDECREF((PyObject *)__pyx_v_descr); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); -- __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("__releasebuffer__", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":339 -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) -- */ -- PyObject_Free(__pyx_v_info->format); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":341 -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) # <<<<<<<<<<<<<< -- * # info.shape was stored after info.strides in the same block -- * -- */ -- PyObject_Free(__pyx_v_info->strides); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -@@ -4275,9 +3486,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":822 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":736 - * - * cdef inline object PyArray_MultiIterNew1(a): - * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< -@@ -4285,13 +3499,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - * cdef inline object PyArray_MultiIterNew2(a, b): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -@@ -4310,7 +3524,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -@@ -4322,9 +3536,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":825 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":739 - * - * cdef inline object PyArray_MultiIterNew2(a, b): - * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< -@@ -4332,13 +3549,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - * cdef inline object PyArray_MultiIterNew3(a, b, c): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -@@ -4357,7 +3574,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -@@ -4369,9 +3586,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":828 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":742 - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): - * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< -@@ -4379,13 +3599,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -@@ -4404,7 +3624,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -4416,9 +3636,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":831 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":745 - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -@@ -4426,13 +3649,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -4451,7 +3674,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -4463,9 +3686,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":834 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":748 - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< -@@ -4473,13 +3699,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - * cdef inline tuple PyDataType_SHAPE(dtype d): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -4498,7 +3724,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -4512,7 +3738,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - int __pyx_t_1; - __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -4522,7 +3748,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":838 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":752 - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): - * return d.subarray.shape # <<<<<<<<<<<<<< -@@ -4534,7 +3760,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -4543,12 +3769,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":840 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":754 - * return d.subarray.shape - * else: - * return () # <<<<<<<<<<<<<< - * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: -+ * - */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); -@@ -4557,7 +3783,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - goto __pyx_L0; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -4572,753 +3798,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { -- PyArray_Descr *__pyx_v_child = 0; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- PyObject *__pyx_v_fields = 0; -- PyObject *__pyx_v_childname = NULL; -- PyObject *__pyx_v_new_offset = NULL; -- PyObject *__pyx_v_t = NULL; -- char *__pyx_r; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- Py_ssize_t __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- PyObject *__pyx_t_4 = NULL; -- int __pyx_t_5; -- int __pyx_t_6; -- int __pyx_t_7; -- long __pyx_t_8; -- char *__pyx_t_9; -- __Pyx_RefNannySetupContext("_util_dtypestring", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":847 -- * -- * cdef dtype child -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * cdef tuple fields -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":848 -- * cdef dtype child -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * cdef tuple fields -- * -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- if (unlikely(__pyx_v_descr->names == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -- __PYX_ERR(2, 851, __pyx_L1_error) -- } -- __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; -- for (;;) { -- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 851, __pyx_L1_error) -- #else -- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- #endif -- __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":852 -- * -- * for childname in descr.names: -- * fields = descr.fields[childname] # <<<<<<<<<<<<<< -- * child, new_offset = fields -- * -- */ -- if (unlikely(__pyx_v_descr->fields == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); -- __PYX_ERR(2, 852, __pyx_L1_error) -- } -- __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":853 -- * for childname in descr.names: -- * fields = descr.fields[childname] -- * child, new_offset = fields # <<<<<<<<<<<<<< -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- */ -- if (likely(__pyx_v_fields != Py_None)) { -- PyObject* sequence = __pyx_v_fields; -- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); -- if (unlikely(size != 2)) { -- if (size > 2) __Pyx_RaiseTooManyValuesError(2); -- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); -- __PYX_ERR(2, 853, __pyx_L1_error) -- } -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); -- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); -- __Pyx_INCREF(__pyx_t_3); -- __Pyx_INCREF(__pyx_t_4); -- #else -- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- #endif -- } else { -- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error) -- } -- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); -- __pyx_t_3 = 0; -- __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 856, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); -- if (!__pyx_t_7) { -- goto __pyx_L8_next_or; -- } else { -- } -- __pyx_t_7 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_L8_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":859 -- * -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * # One could encode it in the format string and have Cython -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); -- if (__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_6 = __pyx_t_7; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":860 -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * # One could encode it in the format string and have Cython -- * # complain instead, BUT: < and > in format strings also imply -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 860, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":870 -- * -- * # Output padding bytes -- * while offset[0] < new_offset: # <<<<<<<<<<<<<< -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- */ -- while (1) { -- __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (!__pyx_t_6) break; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":871 -- * # Output padding bytes -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< -- * f += 1 -- * offset[0] += 1 -- */ -- (__pyx_v_f[0]) = 0x78; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":872 -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte -- * f += 1 # <<<<<<<<<<<<<< -- * offset[0] += 1 -- * -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":873 -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- * offset[0] += 1 # <<<<<<<<<<<<<< -- * -- * offset[0] += child.itemsize -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":875 -- * offset[0] += 1 -- * -- * offset[0] += child.itemsize # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(child): -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); -- if (__pyx_t_6) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":878 -- * -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num # <<<<<<<<<<<<<< -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 880, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":883 -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 98; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":884 -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":885 -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x68; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":886 -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 72; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":887 -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x69; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":888 -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 73; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":889 -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x6C; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":890 -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 76; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":891 -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x71; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":892 -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 81; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":893 -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":894 -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x64; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":895 -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x67; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":896 -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x66; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":897 -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x64; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":898 -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x67; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":899 -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (likely(__pyx_t_6)) { -- (__pyx_v_f[0]) = 79; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":901 -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * f += 1 -- * else: -- */ -- /*else*/ { -- __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 901, __pyx_L1_error) -- } -- __pyx_L15:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":902 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * f += 1 # <<<<<<<<<<<<<< -- * else: -- * # Cython ignores struct boundary information ("T{...}"), -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- goto __pyx_L13; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":906 -- * # Cython ignores struct boundary information ("T{...}"), -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< -- * return f -- * -- */ -- /*else*/ { -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 906, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- } -- __pyx_L13:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- } -- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":907 -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) -- * return f # <<<<<<<<<<<<<< -- * -- * -- */ -- __pyx_r = __pyx_v_f; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_4); -- __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = NULL; -- __pyx_L0:; -- __Pyx_XDECREF((PyObject *)__pyx_v_child); -- __Pyx_XDECREF(__pyx_v_fields); -- __Pyx_XDECREF(__pyx_v_childname); -- __Pyx_XDECREF(__pyx_v_new_offset); -- __Pyx_XDECREF(__pyx_v_t); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -5330,7 +3810,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("set_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1023 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":930 - * - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< -@@ -5339,7 +3819,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - Py_INCREF(__pyx_v_base); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1024 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":931 - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< -@@ -5348,7 +3828,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -5360,7 +3840,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyFinishContext(); - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5375,7 +3855,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - int __pyx_t_1; - __Pyx_RefNannySetupContext("get_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1027 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":934 - * - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< -@@ -5384,7 +3864,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - __pyx_v_base = PyArray_BASE(__pyx_v_arr); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5394,7 +3874,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_t_1 = ((__pyx_v_base == NULL) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1029 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":936 - * base = PyArray_BASE(arr) - * if base is NULL: - * return None # <<<<<<<<<<<<<< -@@ -5405,7 +3885,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5414,7 +3894,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1030 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":937 - * if base is NULL: - * return None - * return base # <<<<<<<<<<<<<< -@@ -5426,7 +3906,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = ((PyObject *)__pyx_v_base); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5441,12 +3921,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { -@@ -5460,13 +3940,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_array", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - { -@@ -5478,20 +3961,20 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1036 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":943 - * cdef inline int import_array() except -1: - * try: -- * _import_array() # <<<<<<<<<<<<<< -+ * __pyx_import_array() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") - */ -- __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error) -+ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - } -@@ -5501,9 +3984,9 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1037 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":944 - * try: -- * _import_array() -+ * __pyx_import_array() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.multiarray failed to import") - * -@@ -5511,32 +3994,32 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __PYX_ERR(2, 945, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - __Pyx_XGIVEREF(__pyx_t_1); -@@ -5547,12 +4030,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - /* function exit code */ -@@ -5570,7 +4053,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -5589,9 +4072,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_umath", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5607,16 +4093,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1042 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":949 - * cdef inline int import_umath() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5630,7 +4116,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1043 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":950 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< -@@ -5640,28 +4126,28 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __PYX_ERR(2, 951, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5676,7 +4162,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -5699,7 +4185,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -5718,9 +4204,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_ufunc", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5736,16 +4225,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1048 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":955 - * cdef inline int import_ufunc() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5759,35 +4248,38 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1049 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":956 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") -+ * - */ - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1050 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":957 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -+ * -+ * cdef extern from *: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __PYX_ERR(2, 957, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5802,7 +4294,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -5824,6 +4316,180 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_RefNannyFinishContext(); - return __pyx_r; - } -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_timedelta64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":979 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_datetime64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":994 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { -+ npy_datetime __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1004 -+ * also needed. That can be found using `get_datetime64_unit`. -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { -+ npy_timedelta __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1011 -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { -+ NPY_DATETIMEUNIT __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1018 -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ * """ -+ * return (obj).obmeta.base # <<<<<<<<<<<<<< -+ */ -+ __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} - static struct __pyx_vtabstruct_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase __pyx_vtable_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase; - - static PyObject *__pyx_tp_new_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase(PyTypeObject *t, PyObject *a, PyObject *k) { -@@ -5848,9 +4514,9 @@ static void __pyx_tp_dealloc_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGenerator - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); -- ++Py_REFCNT(o); -+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); - __pyx_pw_4cylp_2cy_24CyCutGeneratorPythonBase_24CyCutGeneratorPythonBase_3__dealloc__(o); -- --Py_REFCNT(o); -+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); - PyErr_Restore(etype, eval, etb); - } - Py_CLEAR(p->cutGeneratorObject); -@@ -5897,7 +4563,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGenerat - sizeof(struct __pyx_obj_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -5950,6 +4621,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGenerat - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyMethodDef __pyx_methods[] = { -@@ -5999,13 +4676,8 @@ static struct PyModuleDef __pyx_moduledef = { - - static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_CyCutGeneratorPythonBase, __pyx_k_CyCutGeneratorPythonBase, sizeof(__pyx_k_CyCutGeneratorPythonBase), 0, 0, 1, 1}, -- {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, - {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, -- {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, -- {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, - {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, -- {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_n_s_addColumnCut, __pyx_k_addColumnCut, sizeof(__pyx_k_addColumnCut), 0, 0, 1, 1}, - {&__pyx_n_s_addRowCut, __pyx_k_addRowCut, sizeof(__pyx_k_addRowCut), 0, 0, 1, 1}, - {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, -@@ -6019,12 +4691,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_isRange, __pyx_k_isRange, sizeof(__pyx_k_isRange), 0, 0, 1, 1}, - {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, - {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, -- {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, -- {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, - {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0}, - {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, - {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, -- {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, - {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, -@@ -6032,15 +4701,11 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, - {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, - {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, -- {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, - {0, 0, 0, 0, 0, 0, 0} - }; - static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error) -- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error) -- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(2, 285, __pyx_L1_error) -- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 856, __pyx_L1_error) -- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error) -+ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 945, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -@@ -6069,82 +4734,27 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_GOTREF(__pyx_tuple__2); - __Pyx_GIVEREF(__pyx_tuple__2); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__3); -- __Pyx_GIVEREF(__pyx_tuple__3); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__4); -- __Pyx_GIVEREF(__pyx_tuple__4); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__5); -- __Pyx_GIVEREF(__pyx_tuple__5); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__6); -- __Pyx_GIVEREF(__pyx_tuple__6); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__7); -- __Pyx_GIVEREF(__pyx_tuple__7); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 1038, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__8); -- __Pyx_GIVEREF(__pyx_tuple__8); -+ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 945, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__3); -+ __Pyx_GIVEREF(__pyx_tuple__3); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 1044, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__9); -- __Pyx_GIVEREF(__pyx_tuple__9); -+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 951, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__4); -+ __Pyx_GIVEREF(__pyx_tuple__4); - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -6194,6 +4804,9 @@ static int __Pyx_modinit_function_export_code(void) { - static int __Pyx_modinit_type_init_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); - /*--- Type init code ---*/ - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyCglCutGeneratorBase"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error) -@@ -6229,6 +4842,9 @@ static int __Pyx_modinit_type_init_code(void) { - static int __Pyx_modinit_type_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); - /*--- Type import code ---*/ - __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) -@@ -6264,18 +4880,38 @@ static int __Pyx_modinit_type_import_code(void) { - if (!__pyx_ptype_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase) __PYX_ERR(7, 67, __pyx_L1_error) - __pyx_vtabptr_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase = (struct __pyx_vtabstruct_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase)) __PYX_ERR(7, 67, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) -+ __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error) -- __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error) -- __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error) -+ __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error) -+ __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error) -- __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error) -+ __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error) -+ __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error) -+ __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error) -+ __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error) -+ __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error) -+ __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error) -+ __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error) -+ __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error) -+ __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error) -+ __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error) -+ __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpDualRowPivotBase"); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); -@@ -6390,12 +5026,16 @@ static int __Pyx_modinit_variable_import_code(void) { - static int __Pyx_modinit_function_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); - /*--- Function import code ---*/ - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyCglCutGeneratorBase"); if (!__pyx_t_1) __PYX_ERR(1, 1, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_ImportFunction(__pyx_t_1, "RunGenerateCuts", (void (**)(void))&__pyx_f_4cylp_2cy_21CyCglCutGeneratorBase_RunGenerateCuts, "void (void *, OsiSolverInterface *, CppOsiCuts *, CglTreeInfo)") < 0) __PYX_ERR(1, 1, __pyx_L1_error) - if (__Pyx_ImportFunction(__pyx_t_1, "RunCglClone", (void (**)(void))&__pyx_f_4cylp_2cy_21CyCglCutGeneratorBase_RunCglClone, "CglCutGenerator *(void *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error) -- Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; -+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -6405,17 +5045,19 @@ static int __Pyx_modinit_function_import_code(void) { - } - - --#if PY_MAJOR_VERSION < 3 --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC void --#else -+#ifndef CYTHON_NO_PYINIT_EXPORT - #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#elif PY_MAJOR_VERSION < 3 -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" void -+#else -+#define __Pyx_PyMODINIT_FUNC void - #endif - #else --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC PyObject * -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * - #else --#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#define __Pyx_PyMODINIT_FUNC PyObject * - #endif - #endif - -@@ -6497,6 +5139,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_CyCutGeneratorPythonBase(PyObject - #endif - { - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannyDeclarations - #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m) { -@@ -6544,11 +5189,9 @@ if (!__Pyx_RefNanny) { - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ -- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS -- #ifdef WITH_THREAD /* Python build with threading support? */ -+ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - PyEval_InitThreads(); - #endif -- #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; -@@ -6585,17 +5228,17 @@ if (!__Pyx_RefNanny) { - } - #endif - /*--- Builtin init code ---*/ -- if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Constants init code ---*/ -- if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Global type/function init code ---*/ - (void)__Pyx_modinit_global_init_code(); - (void)__Pyx_modinit_variable_export_code(); - (void)__Pyx_modinit_function_export_code(); -- if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; -- if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) -+ if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) - (void)__Pyx_modinit_variable_import_code(); -- if (unlikely(__Pyx_modinit_function_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_function_import_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Execution code ---*/ - #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) - if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error) -@@ -6611,12 +5254,12 @@ if (!__Pyx_RefNanny) { - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -- * raise ImportError("numpy.core.umath failed to import") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - - /*--- Wrapped vars code ---*/ -@@ -6725,7 +5368,7 @@ static int __Pyx_ParseOptionalKeywords( - } - name = first_kw_arg; - #if PY_MAJOR_VERSION < 3 -- if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { -+ if (likely(PyString_Check(key))) { - while (*name) { - if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) - && _PyString_Eq(**name, key)) { -@@ -6752,7 +5395,7 @@ static int __Pyx_ParseOptionalKeywords( - while (*name) { - int cmp = (**name == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 -- (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : -+ (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**name, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; -@@ -6768,7 +5411,7 @@ static int __Pyx_ParseOptionalKeywords( - while (argname != first_kw_arg) { - int cmp = (**argname == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 -- (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : -+ (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**argname, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; -@@ -6977,7 +5620,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #if CYTHON_COMPILING_IN_CPYTHON - static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; -- ternaryfunc call = func->ob_type->tp_call; -+ ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -@@ -7064,7 +5707,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec - if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { - return __Pyx_PyObject_CallMethO(func, arg); - #if CYTHON_FAST_PYCCALL -- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { -+ } else if (__Pyx_PyFastCFunction_Check(func)) { - return __Pyx_PyCFunction_FastCall(func, &arg, 1); - #endif - } -@@ -7287,61 +5930,6 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject - } - #endif - --/* DictGetItem */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { -- PyObject *value; -- value = PyDict_GetItemWithError(d, key); -- if (unlikely(!value)) { -- if (!PyErr_Occurred()) { -- if (unlikely(PyTuple_Check(key))) { -- PyObject* args = PyTuple_Pack(1, key); -- if (likely(args)) { -- PyErr_SetObject(PyExc_KeyError, args); -- Py_DECREF(args); -- } -- } else { -- PyErr_SetObject(PyExc_KeyError, key); -- } -- } -- return NULL; -- } -- Py_INCREF(value); -- return value; --} --#endif -- --/* RaiseTooManyValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { -- PyErr_Format(PyExc_ValueError, -- "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); --} -- --/* RaiseNeedMoreValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { -- PyErr_Format(PyExc_ValueError, -- "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", -- index, (index == 1) ? "" : "s"); --} -- --/* RaiseNoneIterError */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); --} -- --/* ExtTypeTest */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { -- if (unlikely(!type)) { -- PyErr_SetString(PyExc_SystemError, "Missing type object"); -- return 0; -- } -- if (likely(__Pyx_TypeCheck(obj, type))) -- return 1; -- PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", -- Py_TYPE(obj)->tp_name, type->tp_name); -- return 0; --} -- - /* GetTopmostException */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * -@@ -7680,6 +6268,28 @@ static int __Pyx_SetVtable(PyObject *dict, void *vtable) { - return -1; - } - -+/* PyObjectGetAttrStrNoError */ -+static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { -+ __Pyx_PyThreadState_declare -+ __Pyx_PyThreadState_assign -+ if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) -+ __Pyx_PyErr_Clear(); -+} -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { -+ PyObject *result; -+#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 -+ PyTypeObject* tp = Py_TYPE(obj); -+ if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { -+ return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); -+ } -+#endif -+ result = __Pyx_PyObject_GetAttrStr(obj, attr_name); -+ if (unlikely(!result)) { -+ __Pyx_PyObject_GetAttrStr_ClearAttributeError(); -+ } -+ return result; -+} -+ - /* SetupReduce */ - static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { - int ret; -@@ -7707,43 +6317,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { - PyObject *setstate = NULL; - PyObject *setstate_cython = NULL; - #if CYTHON_USE_PYTYPE_LOOKUP -- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #else -- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #endif - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #else -- object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #endif -- reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; -+ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; - if (reduce_ex == object_reduce_ex) { - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #else -- object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #endif -- reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; -+ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; - if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { -- reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; -+ reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); -+ if (likely(reduce_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (reduce == object_reduce || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); - if (!setstate) PyErr_Clear(); - if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { -- setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; -+ setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); -+ if (likely(setstate_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (!setstate || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - } - PyType_Modified((PyTypeObject*)type_obj); - } - } -- goto GOOD; --BAD: -+ goto __PYX_GOOD; -+__PYX_BAD: - if (!PyErr_Occurred()) - PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); - ret = -1; --GOOD: -+__PYX_GOOD: - #if !CYTHON_USE_PYTYPE_LOOKUP - Py_XDECREF(object_reduce); - Py_XDECREF(object_reduce_ex); -@@ -7784,7 +6402,7 @@ static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UIN - - /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK --static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { -+static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { - PyObject *use_cline; - PyObject *ptype, *pvalue, *ptraceback; - #if CYTHON_COMPILING_IN_CPYTHON -@@ -7814,7 +6432,7 @@ static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { - } - if (!use_cline) { - c_line = 0; -- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); -+ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; -@@ -7888,7 +6506,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - if (__pyx_code_cache.count == __pyx_code_cache.max_count) { - int new_max = __pyx_code_cache.max_count + 64; - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( -- __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); -+ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); - if (unlikely(!entries)) { - return; - } -@@ -7911,30 +6529,31 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { -- PyCodeObject *py_code = 0; -- PyObject *py_srcfile = 0; -- PyObject *py_funcname = 0; -+ PyCodeObject *py_code = NULL; -+ PyObject *py_funcname = NULL; - #if PY_MAJOR_VERSION < 3 -+ PyObject *py_srcfile = NULL; - py_srcfile = PyString_FromString(filename); -- #else -- py_srcfile = PyUnicode_FromString(filename); -- #endif - if (!py_srcfile) goto bad; -+ #endif - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; -+ funcname = PyUnicode_AsUTF8(py_funcname); -+ if (!funcname) goto bad; - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); -- #else -- py_funcname = PyUnicode_FromString(funcname); -+ if (!py_funcname) goto bad; - #endif - } -- if (!py_funcname) goto bad; -+ #if PY_MAJOR_VERSION < 3 - py_code = __Pyx_PyCode_New( - 0, - 0, -@@ -7953,11 +6572,16 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - __pyx_empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); -- Py_DECREF(py_funcname); -+ #else -+ py_code = PyCode_NewEmpty(filename, funcname, py_line); -+ #endif -+ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline - return py_code; - bad: -- Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -+ #if PY_MAJOR_VERSION < 3 -+ Py_XDECREF(py_srcfile); -+ #endif - return NULL; - } - static void __Pyx_AddTraceback(const char *funcname, int c_line, -@@ -8106,7 +6730,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - case 1: - return a; - case 2: -- z = __Pyx_c_prod_float(a, a); - return __Pyx_c_prod_float(a, a); - case 3: - z = __Pyx_c_prod_float(a, a); -@@ -8261,7 +6884,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - case 1: - return a; - case 2: -- z = __Pyx_c_prod_double(a, a); - return __Pyx_c_prod_double(a, a); - case 3: - z = __Pyx_c_prod_double(a, a); -@@ -8300,24 +6922,31 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - #endif - - /* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { -- if (sizeof(int) < sizeof(long)) { -+ if (sizeof(long) < sizeof(long)) { - return PyInt_FromLong((long) value); -- } else if (sizeof(int) <= sizeof(unsigned long)) { -+ } else if (sizeof(long) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); - #ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); - #endif - } - } else { -- if (sizeof(int) <= sizeof(long)) { -+ if (sizeof(long) <= sizeof(long)) { - return PyInt_FromLong((long) value); - #ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); - #endif - } -@@ -8325,7 +6954,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(int), -+ return _PyLong_FromByteArray(bytes, sizeof(long), - little, !is_unsigned); - } - } -@@ -8352,51 +6981,27 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - return (target_type) value;\ - } - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { -- const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(enum NPY_TYPES) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+/* CIntFromPy */ -+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" - #endif -- } -- } else { -- if (sizeof(enum NPY_TYPES) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop - #endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), -- little, !is_unsigned); -- } --} -- --/* CIntFromPy */ --static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -- if (sizeof(int) < sizeof(long)) { -- __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) -+ if (sizeof(long) < sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } -- return (int) val; -+ return (long) val; - } - } else - #endif -@@ -8405,32 +7010,32 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (int) 0; -- case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) -+ case 0: return (long) 0; -+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) - case 2: -- if (8 * sizeof(int) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { -- return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { -+ return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - case 3: -- if (8 * sizeof(int) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { -- return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { -+ return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - case 4: -- if (8 * sizeof(int) > 3 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { -- return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { -+ return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; -@@ -8444,86 +7049,86 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) -- return (int) -1; -+ return (long) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } - #endif -- if (sizeof(int) <= sizeof(unsigned long)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) -+ if (sizeof(long) <= sizeof(unsigned long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) - #endif - } - } else { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (int) 0; -- case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) -- case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) -+ case 0: return (long) 0; -+ case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) -+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) - case -2: -- if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -+ return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 2: -- if (8 * sizeof(int) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -- return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -+ return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case -3: -- if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -+ return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 3: -- if (8 * sizeof(int) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -- return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -+ return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case -4: -- if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -+ return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 4: -- if (8 * sizeof(int) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -- return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -+ return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - } - #endif -- if (sizeof(int) <= sizeof(long)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) -+ if (sizeof(long) <= sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) -+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) - #endif - } - } -@@ -8532,7 +7137,7 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); - #else -- int val; -+ long val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); - #if PY_MAJOR_VERSION < 3 - if (likely(v) && !PyLong_Check(v)) { -@@ -8552,71 +7157,47 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - return val; - } - #endif -- return (int) -1; -+ return (long) -1; - } - } else { -- int val; -+ long val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); -- if (!tmp) return (int) -1; -- val = __Pyx_PyInt_As_int(tmp); -+ if (!tmp) return (long) -1; -+ val = __Pyx_PyInt_As_long(tmp); - Py_DECREF(tmp); - return val; - } - raise_overflow: - PyErr_SetString(PyExc_OverflowError, -- "value too large to convert to int"); -- return (int) -1; -+ "value too large to convert to long"); -+ return (long) -1; - raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, -- "can't convert negative value to int"); -- return (int) -1; -+ "can't convert negative value to long"); -+ return (long) -1; - } - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(long) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(long) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+/* CIntFromPy */ -+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" - #endif -- } -- } else { -- if (sizeof(long) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop - #endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(long), -- little, !is_unsigned); -- } --} -- --/* CIntFromPy */ --static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -- if (sizeof(long) < sizeof(long)) { -- __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) -+ if (sizeof(int) < sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } -- return (long) val; -+ return (int) val; - } - } else - #endif -@@ -8625,32 +7206,32 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (long) 0; -- case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) -+ case 0: return (int) 0; -+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) - case 2: -- if (8 * sizeof(long) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { -- return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { -+ return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; - case 3: -- if (8 * sizeof(long) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { -- return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { -+ return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; - case 4: -- if (8 * sizeof(long) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { -- return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { -+ return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; -@@ -8664,86 +7245,86 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) -- return (long) -1; -+ return (int) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } - #endif -- if (sizeof(long) <= sizeof(unsigned long)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) -+ if (sizeof(int) <= sizeof(unsigned long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) - #endif - } - } else { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (long) 0; -- case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) -- case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) -+ case 0: return (int) 0; -+ case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) -+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) - case -2: -- if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -- return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 2: -- if (8 * sizeof(long) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -- return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case -3: -- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -- return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 3: -- if (8 * sizeof(long) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -- return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case -4: -- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -- return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 4: -- if (8 * sizeof(long) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -- return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -+ return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - } - #endif -- if (sizeof(long) <= sizeof(long)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) -+ if (sizeof(int) <= sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) - #endif - } - } -@@ -8752,7 +7333,7 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); - #else -- long val; -+ int val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); - #if PY_MAJOR_VERSION < 3 - if (likely(v) && !PyLong_Check(v)) { -@@ -8772,24 +7353,24 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - return val; - } - #endif -- return (long) -1; -+ return (int) -1; - } - } else { -- long val; -+ int val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); -- if (!tmp) return (long) -1; -- val = __Pyx_PyInt_As_long(tmp); -+ if (!tmp) return (int) -1; -+ val = __Pyx_PyInt_As_int(tmp); - Py_DECREF(tmp); - return val; - } - raise_overflow: - PyErr_SetString(PyExc_OverflowError, -- "value too large to convert to long"); -- return (long) -1; -+ "value too large to convert to int"); -+ return (int) -1; - raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, -- "can't convert negative value to long"); -- return (long) -1; -+ "can't convert negative value to int"); -+ return (int) -1; - } - - /* FastTypeChecks */ -@@ -9210,6 +7791,23 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_DECREF(x); - return ival; - } -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { -+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { -+ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); -+#if PY_MAJOR_VERSION < 3 -+ } else if (likely(PyInt_CheckExact(o))) { -+ return PyInt_AS_LONG(o); -+#endif -+ } else { -+ Py_ssize_t ival; -+ PyObject *x; -+ x = PyNumber_Index(o); -+ if (!x) return -1; -+ ival = PyInt_AsLong(x); -+ Py_DECREF(x); -+ return ival; -+ } -+} - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); - } -diff --git a/cylp/cy/CyDantzigPivot.cpp b/cylp/cy/CyDantzigPivot.cpp -index 93b3950..9b50d3b 100644 ---- a/cylp/cy/CyDantzigPivot.cpp -+++ b/cylp/cy/CyDantzigPivot.cpp -@@ -1,14 +1,16 @@ --/* Generated by Cython 0.29.12 */ -+/* Generated by Cython 0.29.25 */ - -+#ifndef PY_SSIZE_T_CLEAN - #define PY_SSIZE_T_CLEAN -+#endif /* PY_SSIZE_T_CLEAN */ - #include "Python.h" - #ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. - #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. - #else --#define CYTHON_ABI "0_29_12" --#define CYTHON_HEX_VERSION 0x001D0CF0 -+#define CYTHON_ABI "0_29_25" -+#define CYTHON_HEX_VERSION 0x001D19F0 - #define CYTHON_FUTURE_DIVISION 0 - #include - #ifndef offsetof -@@ -155,7 +157,7 @@ - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif -- #if PY_VERSION_HEX < 0x030300F0 -+ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) -@@ -174,7 +176,7 @@ - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL -- #define CYTHON_FAST_PYCALL 1 -+ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1) - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) -@@ -193,7 +195,9 @@ - #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) - #endif - #if CYTHON_USE_PYLONG_INTERNALS -- #include "longintrepr.h" -+ #if PY_MAJOR_VERSION < 3 -+ #include "longintrepr.h" -+ #endif - #undef SHIFT - #undef BASE - #undef MASK -@@ -324,9 +328,68 @@ class __Pyx_FakeReference { - #define __Pyx_DefaultClassType PyClass_Type - #else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" --#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 -- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ -- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -+ #define __Pyx_DefaultClassType PyType_Type -+#if PY_VERSION_HEX >= 0x030B00A1 -+ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, -+ PyObject *code, PyObject *c, PyObject* n, PyObject *v, -+ PyObject *fv, PyObject *cell, PyObject* fn, -+ PyObject *name, int fline, PyObject *lnos) { -+ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; -+ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; -+ const char *fn_cstr=NULL; -+ const char *name_cstr=NULL; -+ PyCodeObject* co=NULL; -+ PyObject *type, *value, *traceback; -+ PyErr_Fetch(&type, &value, &traceback); -+ if (!(kwds=PyDict_New())) goto end; -+ if (!(argcount=PyLong_FromLong(a))) goto end; -+ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; -+ if (!(posonlyargcount=PyLong_FromLong(0))) goto end; -+ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; -+ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; -+ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; -+ if (!(nlocals=PyLong_FromLong(l))) goto end; -+ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; -+ if (!(stacksize=PyLong_FromLong(s))) goto end; -+ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; -+ if (!(flags=PyLong_FromLong(f))) goto end; -+ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; -+ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; -+ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; -+ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; -+ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; -+ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here -+ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; -+ Py_XDECREF((PyObject*)co); -+ co = (PyCodeObject*)call_result; -+ call_result = NULL; -+ if (0) { -+ cleanup_code_too: -+ Py_XDECREF((PyObject*)co); -+ co = NULL; -+ } -+ end: -+ Py_XDECREF(kwds); -+ Py_XDECREF(argcount); -+ Py_XDECREF(posonlyargcount); -+ Py_XDECREF(kwonlyargcount); -+ Py_XDECREF(nlocals); -+ Py_XDECREF(stacksize); -+ Py_XDECREF(replace); -+ Py_XDECREF(call_result); -+ Py_XDECREF(empty); -+ if (type) { -+ PyErr_Restore(type, value, traceback); -+ } -+ return co; -+ } - #else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -@@ -440,8 +503,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #endif - #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 -+ #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) -+ #else -+ #define __Pyx_PyUnicode_READY(op) (0) -+ #endif - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) -@@ -449,7 +516,15 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) -+ #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) -+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) -+ #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) -+ #endif -+ #else -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) -+ #endif - #else - #define CYTHON_PEP393_ENABLED 0 - #define PyUnicode_1BYTE_KIND 1 -@@ -498,8 +573,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define PyString_Type PyUnicode_Type - #define PyString_Check PyUnicode_Check - #define PyString_CheckExact PyUnicode_CheckExact -+#ifndef PyObject_Unicode - #define PyObject_Unicode PyObject_Str - #endif -+#endif - #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) - #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) -@@ -510,6 +587,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #ifndef PySet_CheckExact - #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) - #endif -+#if PY_VERSION_HEX >= 0x030900A4 -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) -+#else -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) -+#endif - #if CYTHON_ASSUME_SAFE_MACROS - #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) - #else -@@ -543,13 +627,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong -- #define __Pyx_PyInt_AsHash_t PyInt_AsLong -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t - #else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t -- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t - #endif - #if PY_MAJOR_VERSION >= 3 -- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) -+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) - #else - #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) - #endif -@@ -590,11 +674,10 @@ static CYTHON_INLINE float __PYX_NAN() { - #define __Pyx_truncl truncl - #endif - -- -+#define __PYX_MARK_ERR_POS(f_index, lineno) \ -+ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } - #define __PYX_ERR(f_index, lineno, Ln_error) \ --{ \ -- __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ --} -+ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } - - #ifndef __PYX_EXTERN_C - #ifdef __cplusplus -@@ -612,7 +695,13 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "pythread.h" - #include "ICoinIndexedVector.hpp" - #include "numpy/arrayobject.h" -+#include "numpy/ndarrayobject.h" -+#include "numpy/ndarraytypes.h" -+#include "numpy/arrayscalars.h" - #include "numpy/ufuncobject.h" -+ -+ /* NumPy API declarations from "numpy/__init__.pxd" */ -+ - #include "ClpDualRowPivot.hpp" - #include "ClpFactorization.hpp" - #include "IClpDualRowPivotBase.h" -@@ -641,11 +730,11 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "OsiSolverInterface.hpp" - #include "CbcCompareUser.hpp" - #include "ICbcModel.hpp" -+#include - #include "ios" - #include "new" - #include "stdexcept" - #include "typeinfo" --#include - #include - #include "IClpPrimalColumnPivotBase.h" - #include "ClpPrimalColumnPivot.hpp" -@@ -746,6 +835,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); - static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); - #if CYTHON_ASSUME_SAFE_MACROS - #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) - #else -@@ -881,23 +971,23 @@ static const char *__pyx_filename; - - static const char *__pyx_f[] = { - "stringsource", -- "cylp\\cy\\CyDantzigPivot.pyx", -+ "cylp/cy/CyDantzigPivot.pyx", - "__init__.pxd", - "type.pxd", - "bool.pxd", - "complex.pxd", -- "cylp\\cy\\CyCoinIndexedVector.pxd", -- "cylp\\cy\\CyClpDualRowPivotBase.pxd", -- "cylp\\cy\\CyCoinModel.pxd", -- "cylp\\cy\\CyCoinPackedMatrix.pxd", -- "cylp\\cy\\CyCgl.pxd", -- "cylp\\cy\\CyCbcNode.pxd", -- "cylp\\cy\\CyOsiSolverInterface.pxd", -- "cylp\\cy\\CyCbcModel.pxd", -- "cylp\\cy\\CyClpSimplex.pxd", -+ "cylp/cy/CyCoinIndexedVector.pxd", -+ "cylp/cy/CyClpDualRowPivotBase.pxd", -+ "cylp/cy/CyCoinModel.pxd", -+ "cylp/cy/CyCoinPackedMatrix.pxd", -+ "cylp/cy/CyCgl.pxd", -+ "cylp/cy/CyCbcNode.pxd", -+ "cylp/cy/CyOsiSolverInterface.pxd", -+ "cylp/cy/CyCbcModel.pxd", -+ "cylp/cy/CyClpSimplex.pxd", - }; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":776 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":690 - * # in Cython to enable them only on the right systems. - * - * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< -@@ -906,7 +996,7 @@ static const char *__pyx_f[] = { - */ - typedef npy_int8 __pyx_t_5numpy_int8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":777 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":691 - * - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< -@@ -915,7 +1005,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; - */ - typedef npy_int16 __pyx_t_5numpy_int16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":778 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":692 - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< -@@ -924,7 +1014,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; - */ - typedef npy_int32 __pyx_t_5numpy_int32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":779 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":693 - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t - * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< -@@ -933,7 +1023,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; - */ - typedef npy_int64 __pyx_t_5numpy_int64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":783 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":697 - * #ctypedef npy_int128 int128_t - * - * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< -@@ -942,7 +1032,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; - */ - typedef npy_uint8 __pyx_t_5numpy_uint8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":784 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":698 - * - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< -@@ -951,7 +1041,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; - */ - typedef npy_uint16 __pyx_t_5numpy_uint16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":785 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":699 - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< -@@ -960,7 +1050,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; - */ - typedef npy_uint32 __pyx_t_5numpy_uint32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":786 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":700 - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t - * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< -@@ -969,7 +1059,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; - */ - typedef npy_uint64 __pyx_t_5numpy_uint64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":790 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":704 - * #ctypedef npy_uint128 uint128_t - * - * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< -@@ -978,7 +1068,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; - */ - typedef npy_float32 __pyx_t_5numpy_float32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":791 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":705 - * - * ctypedef npy_float32 float32_t - * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< -@@ -987,7 +1077,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; - */ - typedef npy_float64 __pyx_t_5numpy_float64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":800 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":714 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< -@@ -996,7 +1086,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; - */ - typedef npy_long __pyx_t_5numpy_int_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":801 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":715 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< -@@ -1005,7 +1095,7 @@ typedef npy_long __pyx_t_5numpy_int_t; - */ - typedef npy_longlong __pyx_t_5numpy_long_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":802 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":716 - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t - * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< -@@ -1014,7 +1104,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; - */ - typedef npy_longlong __pyx_t_5numpy_longlong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":804 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":718 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< -@@ -1023,7 +1113,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; - */ - typedef npy_ulong __pyx_t_5numpy_uint_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":805 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":719 - * - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< -@@ -1032,7 +1122,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":806 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":720 - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t - * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< -@@ -1041,7 +1131,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":808 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":722 - * ctypedef npy_ulonglong ulonglong_t - * - * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< -@@ -1050,7 +1140,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - */ - typedef npy_intp __pyx_t_5numpy_intp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":809 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":723 - * - * ctypedef npy_intp intp_t - * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< -@@ -1059,7 +1149,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; - */ - typedef npy_uintp __pyx_t_5numpy_uintp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":811 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":725 - * ctypedef npy_uintp uintp_t - * - * ctypedef npy_double float_t # <<<<<<<<<<<<<< -@@ -1068,7 +1158,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; - */ - typedef npy_double __pyx_t_5numpy_float_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":812 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":726 - * - * ctypedef npy_double float_t - * ctypedef npy_double double_t # <<<<<<<<<<<<<< -@@ -1077,7 +1167,7 @@ typedef npy_double __pyx_t_5numpy_float_t; - */ - typedef npy_double __pyx_t_5numpy_double_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":813 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":727 - * ctypedef npy_double float_t - * ctypedef npy_double double_t - * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< -@@ -1140,7 +1230,7 @@ struct __pyx_obj_4cylp_2cy_12CyClpSimplex_VarStatus; - struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase; - struct __pyx_obj_4cylp_2cy_14CyDantzigPivot_CyDantzigPivot; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":815 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":729 - * ctypedef npy_longdouble longdouble_t - * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< -@@ -1149,7 +1239,7 @@ struct __pyx_obj_4cylp_2cy_14CyDantzigPivot_CyDantzigPivot; - */ - typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":816 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":730 - * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< -@@ -1158,7 +1248,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - */ - typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":817 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":731 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< -@@ -1167,7 +1257,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - */ - typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":819 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":733 - * ctypedef npy_clongdouble clongdouble_t - * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< -@@ -1882,6 +1972,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #ifndef Py_MEMBER_SIZE - #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) - #endif -+#if CYTHON_FAST_PYCALL - static size_t __pyx_pyframe_localsplus_offset = 0; - #include "frameobject.h" - #define __Pxy_PyFrame_Initialize_Offsets()\ -@@ -1889,6 +1980,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) - #define __Pyx_PyFrame_GetLocalsplus(frame)\ - (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) -+#endif // CYTHON_FAST_PYCALL - #endif - - /* PyObjectCall.proto */ -@@ -2048,26 +2140,6 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - /* RaiseException.proto */ - static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); - --/* DictGetItem.proto */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); --#define __Pyx_PyObject_Dict_GetItem(obj, name)\ -- (likely(PyDict_CheckExact(obj)) ?\ -- __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) --#else --#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) --#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) --#endif -- --/* RaiseTooManyValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); -- --/* RaiseNeedMoreValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); -- --/* RaiseNoneIterError.proto */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -- - /* GetTopmostException.proto */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); -@@ -2140,6 +2212,9 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - /* SetVTable.proto */ - static int __Pyx_SetVtable(PyObject *dict, void *vtable); - -+/* PyObjectGetAttrStrNoError.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); -+ - /* SetupReduce.proto */ - static int __Pyx_setup_reduce(PyObject* type_obj); - -@@ -2172,11 +2247,10 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); - static void __Pyx_AddTraceback(const char *funcname, int c_line, - int py_line, const char *filename); - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); -- --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -+/* GCCDiagnostics.proto */ -+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -+#define __Pyx_HAS_GCC_DIAGNOSTIC -+#endif - - /* RealImag.proto */ - #if CYTHON_CCOMPLEX -@@ -2277,11 +2351,14 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); - #endif - - /* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); - - /* CIntFromPy.proto */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); - -+/* CIntToPy.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -+ - /* CIntFromPy.proto */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); - -@@ -2406,8 +2483,17 @@ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; - static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; - static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; - static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -+static PyTypeObject *__pyx_ptype_5numpy_generic = 0; -+static PyTypeObject *__pyx_ptype_5numpy_number = 0; -+static PyTypeObject *__pyx_ptype_5numpy_integer = 0; -+static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; -+static PyTypeObject *__pyx_ptype_5numpy_floating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; -+static PyTypeObject *__pyx_ptype_5numpy_character = 0; - static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ - - /* Module declarations from 'cylp.cy.CyClpDualRowPivotBase' */ - static PyTypeObject *__pyx_ptype_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase = 0; -@@ -2468,9 +2554,6 @@ int __pyx_module_is_main_cylp__cy__CyDantzigPivot = 0; - - /* Implementation of 'cylp.cy.CyDantzigPivot' */ - static PyObject *__pyx_builtin_TypeError; --static PyObject *__pyx_builtin_ValueError; --static PyObject *__pyx_builtin_range; --static PyObject *__pyx_builtin_RuntimeError; - static PyObject *__pyx_builtin_ImportError; - static const char __pyx_k_np[] = "np"; - static const char __pyx_k_init[] = "__init__"; -@@ -2480,7 +2563,6 @@ static const char __pyx_k_test[] = "__test__"; - static const char __pyx_k_basic[] = "basic"; - static const char __pyx_k_clear[] = "clear"; - static const char __pyx_k_numpy[] = "numpy"; --static const char __pyx_k_range[] = "range"; - static const char __pyx_k_shape[] = "shape"; - static const char __pyx_k_where[] = "where"; - static const char __pyx_k_argmax[] = "argmax"; -@@ -2498,14 +2580,12 @@ static const char __pyx_k_nElements[] = "nElements"; - static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; - static const char __pyx_k_varIsFree[] = "varIsFree"; - static const char __pyx_k_varStatus[] = "varStatus"; --static const char __pyx_k_ValueError[] = "ValueError"; - static const char __pyx_k_nVariables[] = "nVariables"; - static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; - static const char __pyx_k_superBasic[] = "superBasic"; - static const char __pyx_k_ImportError[] = "ImportError"; - static const char __pyx_k_varNotBasic[] = "varNotBasic"; - static const char __pyx_k_varNotFixed[] = "varNotFixed"; --static const char __pyx_k_RuntimeError[] = "RuntimeError"; - static const char __pyx_k_atLowerBound[] = "atLowerBound"; - static const char __pyx_k_atUpperBound[] = "atUpperBound"; - static const char __pyx_k_reducedCosts[] = "reducedCosts"; -@@ -2520,23 +2600,12 @@ static const char __pyx_k_varIsAtLowerBound[] = "varIsAtLowerBound"; - static const char __pyx_k_varIsAtUpperBound[] = "varIsAtUpperBound"; - static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; - static const char __pyx_k_updateColumnTranspose[] = "updateColumnTranspose"; --static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; - static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; --static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; --static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; --static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; --static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; - static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; - static const char __pyx_k_self_CppSelf_cannot_be_converted[] = "self.CppSelf cannot be converted to a Python object for pickling"; --static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; - static PyObject *__pyx_n_s_CyDantzigPivot; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; - static PyObject *__pyx_n_s_ImportError; --static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; --static PyObject *__pyx_n_s_RuntimeError; - static PyObject *__pyx_n_s_TypeError; --static PyObject *__pyx_n_s_ValueError; - static PyObject *__pyx_n_s_argWeightedMax; - static PyObject *__pyx_n_s_argmax; - static PyObject *__pyx_n_s_atLowerBound; -@@ -2557,14 +2626,11 @@ static PyObject *__pyx_n_s_main; - static PyObject *__pyx_n_s_nElements; - static PyObject *__pyx_n_s_nVariables; - static PyObject *__pyx_n_s_name; --static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; --static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; - static PyObject *__pyx_n_s_np; - static PyObject *__pyx_n_s_numpy; - static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; - static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; - static PyObject *__pyx_n_s_pyx_vtable; --static PyObject *__pyx_n_s_range; - static PyObject *__pyx_n_s_reduce; - static PyObject *__pyx_n_s_reduce_cython; - static PyObject *__pyx_n_s_reduce_ex; -@@ -2576,7 +2642,6 @@ static PyObject *__pyx_n_s_shape; - static PyObject *__pyx_n_s_superBasic; - static PyObject *__pyx_n_s_test; - static PyObject *__pyx_n_s_transposeTimes; --static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; - static PyObject *__pyx_n_s_updateColumnTranspose; - static PyObject *__pyx_n_s_varIsAtLowerBound; - static PyObject *__pyx_n_s_varIsAtUpperBound; -@@ -2589,8 +2654,6 @@ static PyObject *__pyx_n_s_where; - static int __pyx_pf_4cylp_2cy_14CyDantzigPivot_14CyDantzigPivot___init__(struct __pyx_obj_4cylp_2cy_14CyDantzigPivot_CyDantzigPivot *__pyx_v_self, PyObject *__pyx_v_cyModel); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_14CyDantzigPivot_14CyDantzigPivot_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_14CyDantzigPivot_CyDantzigPivot *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_14CyDantzigPivot_14CyDantzigPivot_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_14CyDantzigPivot_CyDantzigPivot *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ - static PyObject *__pyx_tp_new_4cylp_2cy_14CyDantzigPivot_CyDantzigPivot(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ - static PyObject *__pyx_int_0; - static PyObject *__pyx_int_1; -@@ -2599,11 +2662,6 @@ static PyObject *__pyx_tuple_; - static PyObject *__pyx_tuple__2; - static PyObject *__pyx_tuple__3; - static PyObject *__pyx_tuple__4; --static PyObject *__pyx_tuple__5; --static PyObject *__pyx_tuple__6; --static PyObject *__pyx_tuple__7; --static PyObject *__pyx_tuple__8; --static PyObject *__pyx_tuple__9; - /* Late includes */ - - /* "cylp/cy/CyDantzigPivot.pyx":15 -@@ -2618,6 +2676,9 @@ static PyObject *__pyx_tuple__9; - static int __pyx_pw_4cylp_2cy_14CyDantzigPivot_14CyDantzigPivot_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ - static int __pyx_pw_4cylp_2cy_14CyDantzigPivot_14CyDantzigPivot_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_cyModel = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - int __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); -@@ -2670,6 +2731,9 @@ static int __pyx_pf_4cylp_2cy_14CyDantzigPivot_14CyDantzigPivot___init__(struct - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__init__", 0); - - /* "cylp/cy/CyDantzigPivot.pyx":16 -@@ -2770,6 +2834,9 @@ static PyObject *__pyx_f_4cylp_2cy_14CyDantzigPivot_14CyDantzigPivot_pivotColumn - PyObject *__pyx_t_8 = NULL; - double __pyx_t_9; - PyObject *__pyx_t_10 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("pivotColumn", 0); - - /* "cylp/cy/CyDantzigPivot.pyx":22 -@@ -3764,6 +3831,9 @@ static PyObject *__pyx_pf_4cylp_2cy_14CyDantzigPivot_14CyDantzigPivot_2__reduce_ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -3819,6 +3889,9 @@ static PyObject *__pyx_pf_4cylp_2cy_14CyDantzigPivot_14CyDantzigPivot_4__setstat - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -3849,1918 +3922,331 @@ static PyObject *__pyx_pf_4cylp_2cy_14CyDantzigPivot_14CyDantzigPivot_4__setstat - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 -+ * ctypedef npy_cdouble complex_t -+ * -+ * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(1, a) -+ * - */ - --/* Python wrapper */ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); -- __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_v_i; -- int __pyx_v_ndim; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- int __pyx_v_t; -- char *__pyx_v_f; -- PyArray_Descr *__pyx_v_descr = 0; -- int __pyx_v_offset; -- int __pyx_r; -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { -+ PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- int __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- int __pyx_t_4; -- int __pyx_t_5; -- int __pyx_t_6; -- PyArray_Descr *__pyx_t_7; -- PyObject *__pyx_t_8 = NULL; -- char *__pyx_t_9; -- if (__pyx_v_info == NULL) { -- PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); -- return -1; -- } -- __Pyx_RefNannySetupContext("__getbuffer__", 0); -- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); -- __Pyx_GIVEREF(__pyx_v_info->obj); -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":265 -- * -- * cdef int i, ndim -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":736 - * -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":266 -- * cdef int i, ndim -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew1(a): -+ * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< - * -- * ndim = PyArray_NDIM(self) -+ * cdef inline object PyArray_MultiIterNew2(a, b): - */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":268 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 -+ * ctypedef npy_cdouble complex_t - * -- * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(1, a) - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) - */ -- __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L4_bool_binop_done; -- } -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":271 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 -+ * return PyArray_MultiIterNew(1, a) - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not C contiguous") -+ * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(2, a, b) - * - */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L4_bool_binop_done:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":739 - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 272, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -+ * cdef inline object PyArray_MultiIterNew2(a, b): -+ * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): - */ -- } -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 -+ * return PyArray_MultiIterNew(1, a) -+ * -+ * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(2, a, b) - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") - */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L7_bool_binop_done; -- } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":275 -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 -+ * return PyArray_MultiIterNew(2, a, b) - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not Fortran contiguous") -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(3, a, b, c) - * - */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L7_bool_binop_done:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":742 - * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 276, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): -+ * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - */ -- } -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":278 -- * raise ValueError(u"ndarray is not Fortran contiguous") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 -+ * return PyArray_MultiIterNew(2, a, b) - * -- * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":279 -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(3, a, b, c) - * -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * # Allocate new buffer for strides and shape info. -- */ -- __pyx_v_info->ndim = __pyx_v_ndim; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":283 -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- */ -- __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":284 -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim # <<<<<<<<<<<<<< -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- */ -- __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":285 -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim -- * for i in range(ndim): # <<<<<<<<<<<<<< -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] -- */ -- __pyx_t_4 = __pyx_v_ndim; -- __pyx_t_5 = __pyx_t_4; -- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { -- __pyx_v_i = __pyx_t_6; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":286 -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- */ -- (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":287 -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< -- * else: -- * info.strides = PyArray_STRIDES(self) -- */ -- (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. - */ -- goto __pyx_L9; -- } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":289 -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- */ -- /*else*/ { -- __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":290 -- * else: -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 -+ * return PyArray_MultiIterNew(3, a, b, c) -+ * -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(4, a, b, c, d) -+ * - */ -- __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); -- } -- __pyx_L9:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":291 -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL # <<<<<<<<<<<<<< -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) -- */ -- __pyx_v_info->suboffsets = NULL; -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":292 -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< -- * info.readonly = not PyArray_ISWRITEABLE(self) -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":745 - * -- */ -- __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":293 -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -+ * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< - * -- * cdef int t -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - */ -- __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":296 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 -+ * return PyArray_MultiIterNew(3, a, b, c) - * -- * cdef int t -- * cdef char* f = NULL # <<<<<<<<<<<<<< -- * cdef dtype descr = PyArray_DESCR(self) -- * cdef int offset -- */ -- __pyx_v_f = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":297 -- * cdef int t -- * cdef char* f = NULL -- * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< -- * cdef int offset -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(4, a, b, c, d) - * - */ -- __pyx_t_7 = PyArray_DESCR(__pyx_v_self); -- __pyx_t_3 = ((PyObject *)__pyx_t_7); -- __Pyx_INCREF(__pyx_t_3); -- __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); -- __pyx_t_3 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":300 -- * cdef int offset -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 -+ * return PyArray_MultiIterNew(4, a, b, c, d) - * -- * info.obj = self # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * if not PyDataType_HASFIELDS(descr): - */ -- __Pyx_INCREF(((PyObject *)__pyx_v_self)); -- __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); -- __pyx_v_info->obj = ((PyObject *)__pyx_v_self); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":748 -+ * -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< - * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -+ * cdef inline tuple PyDataType_SHAPE(dtype d): - */ -- __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); -- if (__pyx_t_1) { -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":303 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 -+ * return PyArray_MultiIterNew(4, a, b, c, d) -+ * -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num # <<<<<<<<<<<<<< -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): - */ -- __pyx_t_4 = __pyx_v_descr->type_num; -- __pyx_v_t = __pyx_t_4; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); -- if (!__pyx_t_2) { -- goto __pyx_L15_next_or; -- } else { -- } -- __pyx_t_2 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_L15_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":305 -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L14_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 306, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":307 -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- */ -- switch (__pyx_v_t) { -- case NPY_BYTE: -- __pyx_v_f = ((char *)"b"); -- break; -- case NPY_UBYTE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":308 -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- */ -- __pyx_v_f = ((char *)"B"); -- break; -- case NPY_SHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":309 -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- */ -- __pyx_v_f = ((char *)"h"); -- break; -- case NPY_USHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":310 -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- */ -- __pyx_v_f = ((char *)"H"); -- break; -- case NPY_INT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":311 -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- */ -- __pyx_v_f = ((char *)"i"); -- break; -- case NPY_UINT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":312 -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- */ -- __pyx_v_f = ((char *)"I"); -- break; -- case NPY_LONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":313 -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- */ -- __pyx_v_f = ((char *)"l"); -- break; -- case NPY_ULONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":314 -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- */ -- __pyx_v_f = ((char *)"L"); -- break; -- case NPY_LONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":315 -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- */ -- __pyx_v_f = ((char *)"q"); -- break; -- case NPY_ULONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":316 -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- */ -- __pyx_v_f = ((char *)"Q"); -- break; -- case NPY_FLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":317 -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- */ -- __pyx_v_f = ((char *)"f"); -- break; -- case NPY_DOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":318 -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- */ -- __pyx_v_f = ((char *)"d"); -- break; -- case NPY_LONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":319 -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- */ -- __pyx_v_f = ((char *)"g"); -- break; -- case NPY_CFLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":320 -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- */ -- __pyx_v_f = ((char *)"Zf"); -- break; -- case NPY_CDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":321 -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" -- */ -- __pyx_v_f = ((char *)"Zd"); -- break; -- case NPY_CLONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":322 -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f = "O" -- * else: -- */ -- __pyx_v_f = ((char *)"Zg"); -- break; -- case NPY_OBJECT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":323 -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_v_f = ((char *)"O"); -- break; -- default: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":325 -- * elif t == NPY_OBJECT: f = "O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * info.format = f -- * return -- */ -- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_8); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 325, __pyx_L1_error) -- break; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":326 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f # <<<<<<<<<<<<<< -- * return -- * else: -- */ -- __pyx_v_info->format = __pyx_v_f; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":327 -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f -- * return # <<<<<<<<<<<<<< -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- */ -- __pyx_r = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":329 -- * return -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- */ -- /*else*/ { -- __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":330 -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, -- */ -- (__pyx_v_info->format[0]) = '^'; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":331 -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 # <<<<<<<<<<<<<< -- * f = _util_dtypestring(descr, info.format + 1, -- * info.format + _buffer_format_string_len, -- */ -- __pyx_v_offset = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":332 -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< -- * info.format + _buffer_format_string_len, -- * &offset) -- */ -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":335 -- * info.format + _buffer_format_string_len, -- * &offset) -- * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- */ -- (__pyx_v_f[0]) = '\x00'; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- -- /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; -- if (__pyx_v_info->obj != NULL) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- goto __pyx_L2; -- __pyx_L0:; -- if (__pyx_v_info->obj == Py_None) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- __pyx_L2:; -- __Pyx_XDECREF((PyObject *)__pyx_v_descr); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); -- __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("__releasebuffer__", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":339 -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) -- */ -- PyObject_Free(__pyx_v_info->format); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":341 -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) # <<<<<<<<<<<<<< -- * # info.shape was stored after info.strides in the same block -- * -- */ -- PyObject_Free(__pyx_v_info->strides); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -- * ctypedef npy_cdouble complex_t -- * -- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(1, a) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":822 -- * -- * cdef inline object PyArray_MultiIterNew1(a): -- * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -- * ctypedef npy_cdouble complex_t -- * -- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(1, a) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -- * return PyArray_MultiIterNew(1, a) -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(2, a, b) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":825 -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): -- * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -- * return PyArray_MultiIterNew(1, a) -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(2, a, b) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -- * return PyArray_MultiIterNew(2, a, b) -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":828 -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): -- * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -- * return PyArray_MultiIterNew(2, a, b) -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":831 -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -- * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":834 -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -- * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -- * return d.subarray.shape -- * else: -- */ -- __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":838 -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape # <<<<<<<<<<<<<< -- * else: -- * return () -- */ -- __Pyx_XDECREF(__pyx_r); -- __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); -- __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -- * return d.subarray.shape -- * else: -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":840 -- * return d.subarray.shape -- * else: -- * return () # <<<<<<<<<<<<<< -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: -- */ -- /*else*/ { -- __Pyx_XDECREF(__pyx_r); -- __Pyx_INCREF(__pyx_empty_tuple); -- __pyx_r = __pyx_empty_tuple; -- goto __pyx_L0; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape -- */ -- -- /* function exit code */ -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { -- PyArray_Descr *__pyx_v_child = 0; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- PyObject *__pyx_v_fields = 0; -- PyObject *__pyx_v_childname = NULL; -- PyObject *__pyx_v_new_offset = NULL; -- PyObject *__pyx_v_t = NULL; -- char *__pyx_r; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- Py_ssize_t __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- PyObject *__pyx_t_4 = NULL; -- int __pyx_t_5; -- int __pyx_t_6; -- int __pyx_t_7; -- long __pyx_t_8; -- char *__pyx_t_9; -- __Pyx_RefNannySetupContext("_util_dtypestring", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":847 -- * -- * cdef dtype child -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * cdef tuple fields -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":848 -- * cdef dtype child -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * cdef tuple fields -- * -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- if (unlikely(__pyx_v_descr->names == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -- __PYX_ERR(2, 851, __pyx_L1_error) -- } -- __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; -- for (;;) { -- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 851, __pyx_L1_error) -- #else -- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- #endif -- __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":852 -- * -- * for childname in descr.names: -- * fields = descr.fields[childname] # <<<<<<<<<<<<<< -- * child, new_offset = fields -- * -- */ -- if (unlikely(__pyx_v_descr->fields == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); -- __PYX_ERR(2, 852, __pyx_L1_error) -- } -- __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":853 -- * for childname in descr.names: -- * fields = descr.fields[childname] -- * child, new_offset = fields # <<<<<<<<<<<<<< -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- */ -- if (likely(__pyx_v_fields != Py_None)) { -- PyObject* sequence = __pyx_v_fields; -- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); -- if (unlikely(size != 2)) { -- if (size > 2) __Pyx_RaiseTooManyValuesError(2); -- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); -- __PYX_ERR(2, 853, __pyx_L1_error) -- } -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); -- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); -- __Pyx_INCREF(__pyx_t_3); -- __Pyx_INCREF(__pyx_t_4); -- #else -- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- #endif -- } else { -- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error) -- } -- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); -- __pyx_t_3 = 0; -- __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 856, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); -- if (!__pyx_t_7) { -- goto __pyx_L8_next_or; -- } else { -- } -- __pyx_t_7 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_L8_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":859 -- * -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * # One could encode it in the format string and have Cython -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); -- if (__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_6 = __pyx_t_7; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":860 -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * # One could encode it in the format string and have Cython -- * # complain instead, BUT: < and > in format strings also imply -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 860, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":870 -- * -- * # Output padding bytes -- * while offset[0] < new_offset: # <<<<<<<<<<<<<< -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- */ -- while (1) { -- __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (!__pyx_t_6) break; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":871 -- * # Output padding bytes -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< -- * f += 1 -- * offset[0] += 1 -- */ -- (__pyx_v_f[0]) = 0x78; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":872 -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte -- * f += 1 # <<<<<<<<<<<<<< -- * offset[0] += 1 -- * -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":873 -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- * offset[0] += 1 # <<<<<<<<<<<<<< -- * -- * offset[0] += child.itemsize -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":875 -- * offset[0] += 1 -- * -- * offset[0] += child.itemsize # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(child): -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); -- if (__pyx_t_6) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":878 -- * -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num # <<<<<<<<<<<<<< -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 880, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":883 -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 98; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":884 -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":885 -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x68; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":886 -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 72; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":887 -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x69; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":888 -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 73; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":889 -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x6C; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":890 -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 76; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":891 -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x71; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":892 -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 81; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":893 -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":894 -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x64; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":895 -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x67; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":896 -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x66; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":897 -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x64; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":898 -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x67; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":899 -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (likely(__pyx_t_6)) { -- (__pyx_v_f[0]) = 79; -- goto __pyx_L15; -- } -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":901 -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * f += 1 -- * else: -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) -+ * -+ * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape - */ -- /*else*/ { -- __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 901, __pyx_L1_error) -- } -- __pyx_L15:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":902 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * f += 1 # <<<<<<<<<<<<<< -- * else: -- * # Cython ignores struct boundary information ("T{...}"), -- */ -- __pyx_v_f = (__pyx_v_f + 1); -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ int __pyx_t_1; -+ __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -+ * return d.subarray.shape -+ * else: - */ -- goto __pyx_L13; -- } -+ __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); -+ if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":906 -- * # Cython ignores struct boundary information ("T{...}"), -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< -- * return f -- * -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":752 -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape # <<<<<<<<<<<<<< -+ * else: -+ * return () - */ -- /*else*/ { -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 906, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- } -- __pyx_L13:; -+ __Pyx_XDECREF(__pyx_r); -+ __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); -+ __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -+ * return d.subarray.shape -+ * else: - */ - } -- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":907 -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) -- * return f # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":754 -+ * return d.subarray.shape -+ * else: -+ * return () # <<<<<<<<<<<<<< - * - * - */ -- __pyx_r = __pyx_v_f; -- goto __pyx_L0; -+ /*else*/ { -+ __Pyx_XDECREF(__pyx_r); -+ __Pyx_INCREF(__pyx_empty_tuple); -+ __pyx_r = __pyx_empty_tuple; -+ goto __pyx_L0; -+ } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -+ * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape - */ - - /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_4); -- __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = NULL; - __pyx_L0:; -- __Pyx_XDECREF((PyObject *)__pyx_v_child); -- __Pyx_XDECREF(__pyx_v_fields); -- __Pyx_XDECREF(__pyx_v_childname); -- __Pyx_XDECREF(__pyx_v_new_offset); -- __Pyx_XDECREF(__pyx_v_t); -+ __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -5772,7 +4258,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("set_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1023 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":930 - * - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< -@@ -5781,7 +4267,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - Py_INCREF(__pyx_v_base); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1024 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":931 - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< -@@ -5790,7 +4276,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -5802,7 +4288,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyFinishContext(); - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5817,7 +4303,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - int __pyx_t_1; - __Pyx_RefNannySetupContext("get_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1027 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":934 - * - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< -@@ -5826,7 +4312,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - __pyx_v_base = PyArray_BASE(__pyx_v_arr); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5836,7 +4322,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_t_1 = ((__pyx_v_base == NULL) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1029 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":936 - * base = PyArray_BASE(arr) - * if base is NULL: - * return None # <<<<<<<<<<<<<< -@@ -5847,7 +4333,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5856,7 +4342,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1030 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":937 - * if base is NULL: - * return None - * return base # <<<<<<<<<<<<<< -@@ -5868,7 +4354,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = ((PyObject *)__pyx_v_base); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5883,12 +4369,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { -@@ -5902,13 +4388,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_array", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - { -@@ -5920,20 +4409,20 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1036 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":943 - * cdef inline int import_array() except -1: - * try: -- * _import_array() # <<<<<<<<<<<<<< -+ * __pyx_import_array() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") - */ -- __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error) -+ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - } -@@ -5943,9 +4432,9 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1037 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":944 - * try: -- * _import_array() -+ * __pyx_import_array() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.multiarray failed to import") - * -@@ -5953,32 +4442,32 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __PYX_ERR(2, 945, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - __Pyx_XGIVEREF(__pyx_t_1); -@@ -5989,12 +4478,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - /* function exit code */ -@@ -6012,7 +4501,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -6031,9 +4520,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_umath", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -6049,16 +4541,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1042 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":949 - * cdef inline int import_umath() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -6072,7 +4564,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1043 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":950 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< -@@ -6082,28 +4574,28 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __PYX_ERR(2, 951, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -6118,7 +4610,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -6141,7 +4633,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -6160,9 +4652,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_ufunc", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -6178,16 +4673,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1048 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":955 - * cdef inline int import_ufunc() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -6201,69 +4696,246 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1049 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":956 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") -+ * - */ - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1050 -- * _import_umath() -- * except Exception: -- * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":957 -+ * _import_umath() -+ * except Exception: -+ * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -+ * -+ * cdef extern from *: -+ */ -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error) -+ __Pyx_GOTREF(__pyx_t_8); -+ __Pyx_Raise(__pyx_t_8, 0, 0, 0); -+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -+ __PYX_ERR(2, 957, __pyx_L5_except_error) -+ } -+ goto __pyx_L5_except_error; -+ __pyx_L5_except_error:; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 -+ * -+ * cdef inline int import_ufunc() except -1: -+ * try: # <<<<<<<<<<<<<< -+ * _import_umath() -+ * except Exception: -+ */ -+ __Pyx_XGIVEREF(__pyx_t_1); -+ __Pyx_XGIVEREF(__pyx_t_2); -+ __Pyx_XGIVEREF(__pyx_t_3); -+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); -+ goto __pyx_L1_error; -+ __pyx_L8_try_end:; -+ } -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 -+ * raise ImportError("numpy.core.umath failed to import") -+ * -+ * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -+ * try: -+ * _import_umath() -+ */ -+ -+ /* function exit code */ -+ __pyx_r = 0; -+ goto __pyx_L0; -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_5); -+ __Pyx_XDECREF(__pyx_t_6); -+ __Pyx_XDECREF(__pyx_t_7); -+ __Pyx_XDECREF(__pyx_t_8); -+ __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = -1; -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_timedelta64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":979 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_datetime64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":994 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { -+ npy_datetime __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1004 -+ * also needed. That can be found using `get_datetime64_unit`. -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error) -- __Pyx_GOTREF(__pyx_t_8); -- __Pyx_Raise(__pyx_t_8, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1050, __pyx_L5_except_error) -- } -- goto __pyx_L5_except_error; -- __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { -+ npy_timedelta __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1011 -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * - * -- * cdef inline int import_ufunc() except -1: -- * try: # <<<<<<<<<<<<<< -- * _import_umath() -- * except Exception: - */ -- __Pyx_XGIVEREF(__pyx_t_1); -- __Pyx_XGIVEREF(__pyx_t_2); -- __Pyx_XGIVEREF(__pyx_t_3); -- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); -- goto __pyx_L1_error; -- __pyx_L8_try_end:; -- } -+ __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -- * raise ImportError("numpy.core.umath failed to import") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object - */ - - /* function exit code */ -- __pyx_r = 0; -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { -+ NPY_DATETIMEUNIT __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1018 -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ * """ -+ * return (obj).obmeta.base # <<<<<<<<<<<<<< -+ */ -+ __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); - goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_5); -- __Pyx_XDECREF(__pyx_t_6); -- __Pyx_XDECREF(__pyx_t_7); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+ /* function exit code */ - __pyx_L0:; -- __Pyx_RefNannyFinishContext(); - return __pyx_r; - } - static struct __pyx_vtabstruct_4cylp_2cy_14CyDantzigPivot_CyDantzigPivot __pyx_vtable_4cylp_2cy_14CyDantzigPivot_CyDantzigPivot; -@@ -6311,7 +4983,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_14CyDantzigPivot_CyDantzigPivot = { - sizeof(struct __pyx_obj_4cylp_2cy_14CyDantzigPivot_CyDantzigPivot), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_14CyDantzigPivot_CyDantzigPivot, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -6364,6 +5041,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_14CyDantzigPivot_CyDantzigPivot = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyMethodDef __pyx_methods[] = { -@@ -6413,13 +5096,8 @@ static struct PyModuleDef __pyx_moduledef = { - - static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_CyDantzigPivot, __pyx_k_CyDantzigPivot, sizeof(__pyx_k_CyDantzigPivot), 0, 0, 1, 1}, -- {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, - {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, -- {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, -- {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, - {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, -- {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_n_s_argWeightedMax, __pyx_k_argWeightedMax, sizeof(__pyx_k_argWeightedMax), 0, 0, 1, 1}, - {&__pyx_n_s_argmax, __pyx_k_argmax, sizeof(__pyx_k_argmax), 0, 0, 1, 1}, - {&__pyx_n_s_atLowerBound, __pyx_k_atLowerBound, sizeof(__pyx_k_atLowerBound), 0, 0, 1, 1}, -@@ -6440,14 +5118,11 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_nElements, __pyx_k_nElements, sizeof(__pyx_k_nElements), 0, 0, 1, 1}, - {&__pyx_n_s_nVariables, __pyx_k_nVariables, sizeof(__pyx_k_nVariables), 0, 0, 1, 1}, - {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, -- {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, -- {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, - {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, - {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, - {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0}, - {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, - {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, -- {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, - {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, -@@ -6459,7 +5134,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_superBasic, __pyx_k_superBasic, sizeof(__pyx_k_superBasic), 0, 0, 1, 1}, - {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, - {&__pyx_n_s_transposeTimes, __pyx_k_transposeTimes, sizeof(__pyx_k_transposeTimes), 0, 0, 1, 1}, -- {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, - {&__pyx_n_s_updateColumnTranspose, __pyx_k_updateColumnTranspose, sizeof(__pyx_k_updateColumnTranspose), 0, 0, 1, 1}, - {&__pyx_n_s_varIsAtLowerBound, __pyx_k_varIsAtLowerBound, sizeof(__pyx_k_varIsAtLowerBound), 0, 0, 1, 1}, - {&__pyx_n_s_varIsAtUpperBound, __pyx_k_varIsAtUpperBound, sizeof(__pyx_k_varIsAtUpperBound), 0, 0, 1, 1}, -@@ -6473,10 +5147,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - }; - static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error) -- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error) -- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(2, 285, __pyx_L1_error) -- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 856, __pyx_L1_error) -- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error) -+ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 945, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -@@ -6505,82 +5176,27 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_GOTREF(__pyx_tuple__2); - __Pyx_GIVEREF(__pyx_tuple__2); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__3); -- __Pyx_GIVEREF(__pyx_tuple__3); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__4); -- __Pyx_GIVEREF(__pyx_tuple__4); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__5); -- __Pyx_GIVEREF(__pyx_tuple__5); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__6); -- __Pyx_GIVEREF(__pyx_tuple__6); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__7); -- __Pyx_GIVEREF(__pyx_tuple__7); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 1038, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__8); -- __Pyx_GIVEREF(__pyx_tuple__8); -+ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 945, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__3); -+ __Pyx_GIVEREF(__pyx_tuple__3); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 1044, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__9); -- __Pyx_GIVEREF(__pyx_tuple__9); -+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 951, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__4); -+ __Pyx_GIVEREF(__pyx_tuple__4); - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -6633,6 +5249,9 @@ static int __Pyx_modinit_function_export_code(void) { - static int __Pyx_modinit_type_init_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); - /*--- Type init code ---*/ - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpPrimalColumnPivotBase"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error) -@@ -6669,6 +5288,9 @@ static int __Pyx_modinit_type_init_code(void) { - static int __Pyx_modinit_type_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); - /*--- Type import code ---*/ - __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) -@@ -6698,18 +5320,38 @@ static int __Pyx_modinit_type_import_code(void) { - if (!__pyx_ptype_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector) __PYX_ERR(6, 22, __pyx_L1_error) - __pyx_vtabptr_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector = (struct __pyx_vtabstruct_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector)) __PYX_ERR(6, 22, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) -+ __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error) -- __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error) -- __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error) -+ __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error) -+ __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error) -- __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error) -+ __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error) -+ __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error) -+ __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error) -+ __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error) -+ __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error) -+ __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error) -+ __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error) -+ __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error) -+ __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error) -+ __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error) -+ __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpDualRowPivotBase"); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); -@@ -6812,13 +5454,17 @@ static int __Pyx_modinit_variable_import_code(void) { - static int __Pyx_modinit_function_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); - /*--- Function import code ---*/ - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpPrimalColumnPivotBase"); if (!__pyx_t_1) __PYX_ERR(1, 1, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_ImportFunction(__pyx_t_1, "RunPivotColumn", (void (**)(void))&__pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_RunPivotColumn, "int (void *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error) - if (__Pyx_ImportFunction(__pyx_t_1, "RunClone", (void (**)(void))&__pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_RunClone, "ClpPrimalColumnPivot *(void *, int)") < 0) __PYX_ERR(1, 1, __pyx_L1_error) - if (__Pyx_ImportFunction(__pyx_t_1, "RunSaveWeights", (void (**)(void))&__pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_RunSaveWeights, "void (void *, IClpSimplex *, int)") < 0) __PYX_ERR(1, 1, __pyx_L1_error) -- Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; -+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -6828,17 +5474,19 @@ static int __Pyx_modinit_function_import_code(void) { - } - - --#if PY_MAJOR_VERSION < 3 --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC void --#else -+#ifndef CYTHON_NO_PYINIT_EXPORT - #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#elif PY_MAJOR_VERSION < 3 -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" void -+#else -+#define __Pyx_PyMODINIT_FUNC void - #endif - #else --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC PyObject * -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * - #else --#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#define __Pyx_PyMODINIT_FUNC PyObject * - #endif - #endif - -@@ -6920,6 +5568,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_CyDantzigPivot(PyObject *__pyx_pyi - #endif - { - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannyDeclarations - #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m) { -@@ -6967,11 +5618,9 @@ if (!__Pyx_RefNanny) { - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ -- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS -- #ifdef WITH_THREAD /* Python build with threading support? */ -+ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - PyEval_InitThreads(); - #endif -- #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; -@@ -7008,17 +5657,17 @@ if (!__Pyx_RefNanny) { - } - #endif - /*--- Builtin init code ---*/ -- if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Constants init code ---*/ -- if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Global type/function init code ---*/ - (void)__Pyx_modinit_global_init_code(); - (void)__Pyx_modinit_variable_export_code(); - (void)__Pyx_modinit_function_export_code(); -- if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; -- if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) -+ if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) - (void)__Pyx_modinit_variable_import_code(); -- if (unlikely(__Pyx_modinit_function_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_function_import_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Execution code ---*/ - #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) - if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error) -@@ -7076,12 +5725,12 @@ if (!__Pyx_RefNanny) { - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -- * raise ImportError("numpy.core.umath failed to import") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - - /*--- Wrapped vars code ---*/ -@@ -7190,7 +5839,7 @@ static int __Pyx_ParseOptionalKeywords( - } - name = first_kw_arg; - #if PY_MAJOR_VERSION < 3 -- if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { -+ if (likely(PyString_Check(key))) { - while (*name) { - if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) - && _PyString_Eq(**name, key)) { -@@ -7217,7 +5866,7 @@ static int __Pyx_ParseOptionalKeywords( - while (*name) { - int cmp = (**name == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 -- (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : -+ (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**name, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; -@@ -7233,7 +5882,7 @@ static int __Pyx_ParseOptionalKeywords( - while (argname != first_kw_arg) { - int cmp = (**argname == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 -- (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : -+ (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**argname, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; -@@ -7455,7 +6104,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #if CYTHON_COMPILING_IN_CPYTHON - static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; -- ternaryfunc call = func->ob_type->tp_call; -+ ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -@@ -7542,7 +6191,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec - if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { - return __Pyx_PyObject_CallMethO(func, arg); - #if CYTHON_FAST_PYCCALL -- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { -+ } else if (__Pyx_PyFastCFunction_Check(func)) { - return __Pyx_PyCFunction_FastCall(func, &arg, 1); - #endif - } -@@ -7866,7 +6515,7 @@ static PyObject *__Pyx_PyLong_AbsNeg(PyObject *n) { - { - PyObject *copy = _PyLong_Copy((PyLongObject*)n); - if (likely(copy)) { -- Py_SIZE(copy) = -(Py_SIZE(copy)); -+ __Pyx_SET_SIZE(copy, -Py_SIZE(copy)); - } - return copy; - } -@@ -8059,48 +6708,6 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject - } - #endif - --/* DictGetItem */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { -- PyObject *value; -- value = PyDict_GetItemWithError(d, key); -- if (unlikely(!value)) { -- if (!PyErr_Occurred()) { -- if (unlikely(PyTuple_Check(key))) { -- PyObject* args = PyTuple_Pack(1, key); -- if (likely(args)) { -- PyErr_SetObject(PyExc_KeyError, args); -- Py_DECREF(args); -- } -- } else { -- PyErr_SetObject(PyExc_KeyError, key); -- } -- } -- return NULL; -- } -- Py_INCREF(value); -- return value; --} --#endif -- --/* RaiseTooManyValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { -- PyErr_Format(PyExc_ValueError, -- "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); --} -- --/* RaiseNeedMoreValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { -- PyErr_Format(PyExc_ValueError, -- "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", -- index, (index == 1) ? "" : "s"); --} -- --/* RaiseNoneIterError */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); --} -- - /* GetTopmostException */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * -@@ -8439,6 +7046,28 @@ static int __Pyx_SetVtable(PyObject *dict, void *vtable) { - return -1; - } - -+/* PyObjectGetAttrStrNoError */ -+static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { -+ __Pyx_PyThreadState_declare -+ __Pyx_PyThreadState_assign -+ if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) -+ __Pyx_PyErr_Clear(); -+} -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { -+ PyObject *result; -+#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 -+ PyTypeObject* tp = Py_TYPE(obj); -+ if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { -+ return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); -+ } -+#endif -+ result = __Pyx_PyObject_GetAttrStr(obj, attr_name); -+ if (unlikely(!result)) { -+ __Pyx_PyObject_GetAttrStr_ClearAttributeError(); -+ } -+ return result; -+} -+ - /* SetupReduce */ - static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { - int ret; -@@ -8466,43 +7095,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { - PyObject *setstate = NULL; - PyObject *setstate_cython = NULL; - #if CYTHON_USE_PYTYPE_LOOKUP -- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #else -- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #endif - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #else -- object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #endif -- reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; -+ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; - if (reduce_ex == object_reduce_ex) { - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #else -- object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #endif -- reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; -+ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; - if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { -- reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; -+ reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); -+ if (likely(reduce_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (reduce == object_reduce || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); - if (!setstate) PyErr_Clear(); - if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { -- setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; -+ setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); -+ if (likely(setstate_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (!setstate || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - } - PyType_Modified((PyTypeObject*)type_obj); - } - } -- goto GOOD; --BAD: -+ goto __PYX_GOOD; -+__PYX_BAD: - if (!PyErr_Occurred()) - PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); - ret = -1; --GOOD: -+__PYX_GOOD: - #if !CYTHON_USE_PYTYPE_LOOKUP - Py_XDECREF(object_reduce); - Py_XDECREF(object_reduce_ex); -@@ -8545,7 +7182,7 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { - { - #if PY_MAJOR_VERSION >= 3 - if (level == -1) { -- if (strchr(__Pyx_MODULE_NAME, '.')) { -+ if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { - module = PyImport_ImportModuleLevelObject( - name, global_dict, empty_dict, list, 1); - if (!module) { -@@ -8582,7 +7219,7 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { - - /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK --static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { -+static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { - PyObject *use_cline; - PyObject *ptype, *pvalue, *ptraceback; - #if CYTHON_COMPILING_IN_CPYTHON -@@ -8612,7 +7249,7 @@ static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { - } - if (!use_cline) { - c_line = 0; -- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); -+ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; -@@ -8686,7 +7323,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - if (__pyx_code_cache.count == __pyx_code_cache.max_count) { - int new_max = __pyx_code_cache.max_count + 64; - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( -- __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); -+ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); - if (unlikely(!entries)) { - return; - } -@@ -8709,30 +7346,31 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { -- PyCodeObject *py_code = 0; -- PyObject *py_srcfile = 0; -- PyObject *py_funcname = 0; -+ PyCodeObject *py_code = NULL; -+ PyObject *py_funcname = NULL; - #if PY_MAJOR_VERSION < 3 -+ PyObject *py_srcfile = NULL; - py_srcfile = PyString_FromString(filename); -- #else -- py_srcfile = PyUnicode_FromString(filename); -- #endif - if (!py_srcfile) goto bad; -+ #endif - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; -+ funcname = PyUnicode_AsUTF8(py_funcname); -+ if (!funcname) goto bad; - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); -- #else -- py_funcname = PyUnicode_FromString(funcname); -+ if (!py_funcname) goto bad; - #endif - } -- if (!py_funcname) goto bad; -+ #if PY_MAJOR_VERSION < 3 - py_code = __Pyx_PyCode_New( - 0, - 0, -@@ -8751,11 +7389,16 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - __pyx_empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); -- Py_DECREF(py_funcname); -+ #else -+ py_code = PyCode_NewEmpty(filename, funcname, py_line); -+ #endif -+ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline - return py_code; - bad: -- Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -+ #if PY_MAJOR_VERSION < 3 -+ Py_XDECREF(py_srcfile); -+ #endif - return NULL; - } - static void __Pyx_AddTraceback(const char *funcname, int c_line, -@@ -8787,37 +7430,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - Py_XDECREF(py_frame); - } - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(long) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(long) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(long) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(long), -- little, !is_unsigned); -- } --} -- - /* CIntFromPyVerify */ - #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ - __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) -@@ -8840,37 +7452,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - return (target_type) value;\ - } - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(int) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(int) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(int) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(int), -- little, !is_unsigned); -- } --} -- - /* Declarations */ - #if CYTHON_CCOMPLEX - #ifdef __cplusplus -@@ -8988,7 +7569,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_float(a, a); - return __Pyx_c_prod_float(a, a); - case 3: - z = __Pyx_c_prod_float(a, a); -@@ -9143,7 +7723,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_double(a, a); - return __Pyx_c_prod_double(a, a); - case 3: - z = __Pyx_c_prod_double(a, a); -@@ -9182,24 +7761,31 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - #endif - - /* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { -- const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { -- if (sizeof(enum NPY_TYPES) < sizeof(long)) { -+ if (sizeof(long) < sizeof(long)) { - return PyInt_FromLong((long) value); -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { -+ } else if (sizeof(long) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); - #ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { -+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); - #endif - } - } else { -- if (sizeof(enum NPY_TYPES) <= sizeof(long)) { -+ if (sizeof(long) <= sizeof(long)) { - return PyInt_FromLong((long) value); - #ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { -+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); - #endif - } -@@ -9207,14 +7793,21 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES v - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), -+ return _PyLong_FromByteArray(bytes, sizeof(long), - little, !is_unsigned); - } - } - - /* CIntFromPy */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -9401,9 +7994,54 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - return (int) -1; - } - -+/* CIntToPy */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif -+ const int is_unsigned = neg_one > const_zero; -+ if (is_unsigned) { -+ if (sizeof(int) < sizeof(long)) { -+ return PyInt_FromLong((long) value); -+ } else if (sizeof(int) <= sizeof(unsigned long)) { -+ return PyLong_FromUnsignedLong((unsigned long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+#endif -+ } -+ } else { -+ if (sizeof(int) <= sizeof(long)) { -+ return PyInt_FromLong((long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ return PyLong_FromLongLong((PY_LONG_LONG) value); -+#endif -+ } -+ } -+ { -+ int one = 1; int little = (int)*(unsigned char *)&one; -+ unsigned char *bytes = (unsigned char *)&value; -+ return _PyLong_FromByteArray(bytes, sizeof(int), -+ little, !is_unsigned); -+ } -+} -+ - /* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -10008,6 +8646,23 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_DECREF(x); - return ival; - } -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { -+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { -+ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); -+#if PY_MAJOR_VERSION < 3 -+ } else if (likely(PyInt_CheckExact(o))) { -+ return PyInt_AS_LONG(o); -+#endif -+ } else { -+ Py_ssize_t ival; -+ PyObject *x; -+ x = PyNumber_Index(o); -+ if (!x) return -1; -+ ival = PyInt_AsLong(x); -+ Py_DECREF(x); -+ return ival; -+ } -+} - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); - } -diff --git a/cylp/cy/CyDualPivotPythonBase.cpp b/cylp/cy/CyDualPivotPythonBase.cpp -index df769b2..b5a8e15 100644 ---- a/cylp/cy/CyDualPivotPythonBase.cpp -+++ b/cylp/cy/CyDualPivotPythonBase.cpp -@@ -1,14 +1,16 @@ --/* Generated by Cython 0.29.12 */ -+/* Generated by Cython 0.29.25 */ - -+#ifndef PY_SSIZE_T_CLEAN - #define PY_SSIZE_T_CLEAN -+#endif /* PY_SSIZE_T_CLEAN */ - #include "Python.h" - #ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. - #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. - #else --#define CYTHON_ABI "0_29_12" --#define CYTHON_HEX_VERSION 0x001D0CF0 -+#define CYTHON_ABI "0_29_25" -+#define CYTHON_HEX_VERSION 0x001D19F0 - #define CYTHON_FUTURE_DIVISION 0 - #include - #ifndef offsetof -@@ -155,7 +157,7 @@ - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif -- #if PY_VERSION_HEX < 0x030300F0 -+ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) -@@ -174,7 +176,7 @@ - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL -- #define CYTHON_FAST_PYCALL 1 -+ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1) - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) -@@ -193,7 +195,9 @@ - #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) - #endif - #if CYTHON_USE_PYLONG_INTERNALS -- #include "longintrepr.h" -+ #if PY_MAJOR_VERSION < 3 -+ #include "longintrepr.h" -+ #endif - #undef SHIFT - #undef BASE - #undef MASK -@@ -324,9 +328,68 @@ class __Pyx_FakeReference { - #define __Pyx_DefaultClassType PyClass_Type - #else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" --#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 -- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ -- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -+ #define __Pyx_DefaultClassType PyType_Type -+#if PY_VERSION_HEX >= 0x030B00A1 -+ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, -+ PyObject *code, PyObject *c, PyObject* n, PyObject *v, -+ PyObject *fv, PyObject *cell, PyObject* fn, -+ PyObject *name, int fline, PyObject *lnos) { -+ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; -+ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; -+ const char *fn_cstr=NULL; -+ const char *name_cstr=NULL; -+ PyCodeObject* co=NULL; -+ PyObject *type, *value, *traceback; -+ PyErr_Fetch(&type, &value, &traceback); -+ if (!(kwds=PyDict_New())) goto end; -+ if (!(argcount=PyLong_FromLong(a))) goto end; -+ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; -+ if (!(posonlyargcount=PyLong_FromLong(0))) goto end; -+ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; -+ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; -+ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; -+ if (!(nlocals=PyLong_FromLong(l))) goto end; -+ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; -+ if (!(stacksize=PyLong_FromLong(s))) goto end; -+ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; -+ if (!(flags=PyLong_FromLong(f))) goto end; -+ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; -+ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; -+ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; -+ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; -+ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; -+ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here -+ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; -+ Py_XDECREF((PyObject*)co); -+ co = (PyCodeObject*)call_result; -+ call_result = NULL; -+ if (0) { -+ cleanup_code_too: -+ Py_XDECREF((PyObject*)co); -+ co = NULL; -+ } -+ end: -+ Py_XDECREF(kwds); -+ Py_XDECREF(argcount); -+ Py_XDECREF(posonlyargcount); -+ Py_XDECREF(kwonlyargcount); -+ Py_XDECREF(nlocals); -+ Py_XDECREF(stacksize); -+ Py_XDECREF(replace); -+ Py_XDECREF(call_result); -+ Py_XDECREF(empty); -+ if (type) { -+ PyErr_Restore(type, value, traceback); -+ } -+ return co; -+ } - #else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -@@ -440,8 +503,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #endif - #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 -+ #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) -+ #else -+ #define __Pyx_PyUnicode_READY(op) (0) -+ #endif - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) -@@ -449,7 +516,15 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) -+ #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) -+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) -+ #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) -+ #endif -+ #else -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) -+ #endif - #else - #define CYTHON_PEP393_ENABLED 0 - #define PyUnicode_1BYTE_KIND 1 -@@ -498,8 +573,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define PyString_Type PyUnicode_Type - #define PyString_Check PyUnicode_Check - #define PyString_CheckExact PyUnicode_CheckExact -+#ifndef PyObject_Unicode - #define PyObject_Unicode PyObject_Str - #endif -+#endif - #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) - #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) -@@ -510,6 +587,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #ifndef PySet_CheckExact - #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) - #endif -+#if PY_VERSION_HEX >= 0x030900A4 -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) -+#else -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) -+#endif - #if CYTHON_ASSUME_SAFE_MACROS - #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) - #else -@@ -543,13 +627,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong -- #define __Pyx_PyInt_AsHash_t PyInt_AsLong -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t - #else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t -- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t - #endif - #if PY_MAJOR_VERSION >= 3 -- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) -+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) - #else - #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) - #endif -@@ -590,11 +674,10 @@ static CYTHON_INLINE float __PYX_NAN() { - #define __Pyx_truncl truncl - #endif - -- -+#define __PYX_MARK_ERR_POS(f_index, lineno) \ -+ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } - #define __PYX_ERR(f_index, lineno, Ln_error) \ --{ \ -- __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ --} -+ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } - - #ifndef __PYX_EXTERN_C - #ifdef __cplusplus -@@ -610,7 +693,13 @@ static CYTHON_INLINE float __PYX_NAN() { - #include - #include - #include "numpy/arrayobject.h" -+#include "numpy/ndarrayobject.h" -+#include "numpy/ndarraytypes.h" -+#include "numpy/arrayscalars.h" - #include "numpy/ufuncobject.h" -+ -+ /* NumPy API declarations from "numpy/__init__.pxd" */ -+ - #include "pythread.h" - #include "ICoinIndexedVector.hpp" - #include "ClpPrimalColumnPivot.hpp" -@@ -641,11 +730,11 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "OsiSolverInterface.hpp" - #include "CbcCompareUser.hpp" - #include "ICbcModel.hpp" -+#include - #include "ios" - #include "new" - #include "stdexcept" - #include "typeinfo" --#include - #include - #include "ClpDualRowPivot.hpp" - #include "IClpSimplex.hpp" -@@ -746,6 +835,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); - static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); - #if CYTHON_ASSUME_SAFE_MACROS - #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) - #else -@@ -881,20 +971,20 @@ static const char *__pyx_filename; - - static const char *__pyx_f[] = { - "stringsource", -- "cylp\\cy\\CyDualPivotPythonBase.pyx", -+ "cylp/cy/CyDualPivotPythonBase.pyx", - "__init__.pxd", - "type.pxd", - "bool.pxd", - "complex.pxd", -- "cylp\\cy\\CyCoinIndexedVector.pxd", -- "cylp\\cy\\CyClpPrimalColumnPivotBase.pxd", -- "cylp\\cy\\CyCoinModel.pxd", -- "cylp\\cy\\CyCoinPackedMatrix.pxd", -- "cylp\\cy\\CyCgl.pxd", -- "cylp\\cy\\CyCbcNode.pxd", -- "cylp\\cy\\CyOsiSolverInterface.pxd", -- "cylp\\cy\\CyCbcModel.pxd", -- "cylp\\cy\\CyClpSimplex.pxd", -+ "cylp/cy/CyCoinIndexedVector.pxd", -+ "cylp/cy/CyClpPrimalColumnPivotBase.pxd", -+ "cylp/cy/CyCoinModel.pxd", -+ "cylp/cy/CyCoinPackedMatrix.pxd", -+ "cylp/cy/CyCgl.pxd", -+ "cylp/cy/CyCbcNode.pxd", -+ "cylp/cy/CyOsiSolverInterface.pxd", -+ "cylp/cy/CyCbcModel.pxd", -+ "cylp/cy/CyClpSimplex.pxd", - }; - /* BufferFormatStructs.proto */ - #define IS_UNSIGNED(type) (((type) -1) > 0) -@@ -933,7 +1023,7 @@ typedef struct { - } __Pyx_BufFmt_Context; - - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":776 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":690 - * # in Cython to enable them only on the right systems. - * - * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< -@@ -942,7 +1032,7 @@ typedef struct { - */ - typedef npy_int8 __pyx_t_5numpy_int8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":777 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":691 - * - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< -@@ -951,7 +1041,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; - */ - typedef npy_int16 __pyx_t_5numpy_int16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":778 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":692 - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< -@@ -960,7 +1050,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; - */ - typedef npy_int32 __pyx_t_5numpy_int32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":779 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":693 - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t - * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< -@@ -969,7 +1059,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; - */ - typedef npy_int64 __pyx_t_5numpy_int64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":783 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":697 - * #ctypedef npy_int128 int128_t - * - * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< -@@ -978,7 +1068,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; - */ - typedef npy_uint8 __pyx_t_5numpy_uint8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":784 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":698 - * - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< -@@ -987,7 +1077,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; - */ - typedef npy_uint16 __pyx_t_5numpy_uint16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":785 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":699 - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< -@@ -996,7 +1086,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; - */ - typedef npy_uint32 __pyx_t_5numpy_uint32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":786 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":700 - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t - * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< -@@ -1005,7 +1095,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; - */ - typedef npy_uint64 __pyx_t_5numpy_uint64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":790 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":704 - * #ctypedef npy_uint128 uint128_t - * - * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< -@@ -1014,7 +1104,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; - */ - typedef npy_float32 __pyx_t_5numpy_float32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":791 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":705 - * - * ctypedef npy_float32 float32_t - * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< -@@ -1023,7 +1113,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; - */ - typedef npy_float64 __pyx_t_5numpy_float64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":800 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":714 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< -@@ -1032,7 +1122,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; - */ - typedef npy_long __pyx_t_5numpy_int_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":801 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":715 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< -@@ -1041,7 +1131,7 @@ typedef npy_long __pyx_t_5numpy_int_t; - */ - typedef npy_longlong __pyx_t_5numpy_long_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":802 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":716 - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t - * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< -@@ -1050,7 +1140,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; - */ - typedef npy_longlong __pyx_t_5numpy_longlong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":804 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":718 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< -@@ -1059,7 +1149,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; - */ - typedef npy_ulong __pyx_t_5numpy_uint_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":805 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":719 - * - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< -@@ -1068,7 +1158,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":806 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":720 - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t - * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< -@@ -1077,7 +1167,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":808 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":722 - * ctypedef npy_ulonglong ulonglong_t - * - * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< -@@ -1086,7 +1176,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - */ - typedef npy_intp __pyx_t_5numpy_intp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":809 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":723 - * - * ctypedef npy_intp intp_t - * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< -@@ -1095,7 +1185,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; - */ - typedef npy_uintp __pyx_t_5numpy_uintp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":811 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":725 - * ctypedef npy_uintp uintp_t - * - * ctypedef npy_double float_t # <<<<<<<<<<<<<< -@@ -1104,7 +1194,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; - */ - typedef npy_double __pyx_t_5numpy_float_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":812 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":726 - * - * ctypedef npy_double float_t - * ctypedef npy_double double_t # <<<<<<<<<<<<<< -@@ -1113,7 +1203,7 @@ typedef npy_double __pyx_t_5numpy_float_t; - */ - typedef npy_double __pyx_t_5numpy_double_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":813 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":727 - * ctypedef npy_double float_t - * ctypedef npy_double double_t - * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< -@@ -1176,7 +1266,7 @@ struct __pyx_obj_4cylp_2cy_12CyClpSimplex_VarStatus; - struct __pyx_obj_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase; - struct __pyx_obj_4cylp_2cy_21CyDualPivotPythonBase_CyDualPivotPythonBase; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":815 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":729 - * ctypedef npy_longdouble longdouble_t - * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< -@@ -1185,7 +1275,7 @@ struct __pyx_obj_4cylp_2cy_21CyDualPivotPythonBase_CyDualPivotPythonBase; - */ - typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":816 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":730 - * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< -@@ -1194,7 +1284,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - */ - typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":817 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":731 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< -@@ -1203,7 +1293,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - */ - typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":819 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":733 - * ctypedef npy_clongdouble clongdouble_t - * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< -@@ -1916,6 +2006,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #ifndef Py_MEMBER_SIZE - #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) - #endif -+#if CYTHON_FAST_PYCALL - static size_t __pyx_pyframe_localsplus_offset = 0; - #include "frameobject.h" - #define __Pxy_PyFrame_Initialize_Offsets()\ -@@ -1923,6 +2014,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) - #define __Pyx_PyFrame_GetLocalsplus(frame)\ - (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) -+#endif // CYTHON_FAST_PYCALL - #endif - - /* PyObjectCall.proto */ -@@ -2019,29 +2111,6 @@ static void __Pyx_RaiseBufferIndexError(int axis); - /* RaiseException.proto */ - static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); - --/* DictGetItem.proto */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); --#define __Pyx_PyObject_Dict_GetItem(obj, name)\ -- (likely(PyDict_CheckExact(obj)) ?\ -- __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) --#else --#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) --#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) --#endif -- --/* RaiseTooManyValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); -- --/* RaiseNeedMoreValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); -- --/* RaiseNoneIterError.proto */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -- --/* ExtTypeTest.proto */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); -- - /* GetTopmostException.proto */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); -@@ -2114,6 +2183,9 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - /* SetVTable.proto */ - static int __Pyx_SetVtable(PyObject *dict, void *vtable); - -+/* PyObjectGetAttrStrNoError.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); -+ - /* SetupReduce.proto */ - static int __Pyx_setup_reduce(PyObject* type_obj); - -@@ -2290,14 +2362,10 @@ typedef struct { - #endif - #endif - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -- --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); -- --/* CIntFromPy.proto */ --static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); -+/* GCCDiagnostics.proto */ -+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -+#define __Pyx_HAS_GCC_DIAGNOSTIC -+#endif - - /* CIntToPy.proto */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); -@@ -2305,6 +2373,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); - /* CIntFromPy.proto */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); - -+/* CIntFromPy.proto */ -+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); -+ - /* FastTypeChecks.proto */ - #if CYTHON_COMPILING_IN_CPYTHON - #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) -@@ -2422,8 +2493,17 @@ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; - static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; - static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; - static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -+static PyTypeObject *__pyx_ptype_5numpy_generic = 0; -+static PyTypeObject *__pyx_ptype_5numpy_number = 0; -+static PyTypeObject *__pyx_ptype_5numpy_integer = 0; -+static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; -+static PyTypeObject *__pyx_ptype_5numpy_floating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; -+static PyTypeObject *__pyx_ptype_5numpy_character = 0; - static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ - - /* Module declarations from 'cylp.cy' */ - -@@ -2491,25 +2571,19 @@ int __pyx_module_is_main_cylp__cy__CyDualPivotPythonBase = 0; - - /* Implementation of 'cylp.cy.CyDualPivotPythonBase' */ - static PyObject *__pyx_builtin_TypeError; --static PyObject *__pyx_builtin_ValueError; --static PyObject *__pyx_builtin_range; --static PyObject *__pyx_builtin_RuntimeError; - static PyObject *__pyx_builtin_ImportError; - static const char __pyx_k_init[] = "__init__"; - static const char __pyx_k_main[] = "__main__"; - static const char __pyx_k_name[] = "__name__"; - static const char __pyx_k_test[] = "__test__"; --static const char __pyx_k_range[] = "range"; - static const char __pyx_k_reduce[] = "__reduce__"; - static const char __pyx_k_getstate[] = "__getstate__"; - static const char __pyx_k_pivotRow[] = "pivotRow"; - static const char __pyx_k_setstate[] = "__setstate__"; - static const char __pyx_k_TypeError[] = "TypeError"; - static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; --static const char __pyx_k_ValueError[] = "ValueError"; - static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; - static const char __pyx_k_ImportError[] = "ImportError"; --static const char __pyx_k_RuntimeError[] = "RuntimeError"; - static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; - static const char __pyx_k_updateWeights[] = "updateWeights"; - static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; -@@ -2517,36 +2591,22 @@ static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; - static const char __pyx_k_updatePrimalSolution[] = "updatePrimalSolution"; - static const char __pyx_k_CyDualPivotPythonBase[] = "CyDualPivotPythonBase"; - static const char __pyx_k_dualPivotMethodObject[] = "dualPivotMethodObject"; --static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; - static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; --static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; --static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; --static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; --static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; - static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; - static const char __pyx_k_self_CppSelf_cannot_be_converted[] = "self.CppSelf cannot be converted to a Python object for pickling"; --static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; - static PyObject *__pyx_n_s_CyDualPivotPythonBase; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; - static PyObject *__pyx_n_s_ImportError; --static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; --static PyObject *__pyx_n_s_RuntimeError; - static PyObject *__pyx_n_s_TypeError; --static PyObject *__pyx_n_s_ValueError; - static PyObject *__pyx_n_s_cline_in_traceback; - static PyObject *__pyx_n_s_dualPivotMethodObject; - static PyObject *__pyx_n_s_getstate; - static PyObject *__pyx_n_s_init; - static PyObject *__pyx_n_s_main; - static PyObject *__pyx_n_s_name; --static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; --static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; - static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; - static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; - static PyObject *__pyx_n_s_pivotRow; - static PyObject *__pyx_n_s_pyx_vtable; --static PyObject *__pyx_n_s_range; - static PyObject *__pyx_n_s_reduce; - static PyObject *__pyx_n_s_reduce_cython; - static PyObject *__pyx_n_s_reduce_ex; -@@ -2554,24 +2614,16 @@ static PyObject *__pyx_kp_s_self_CppSelf_cannot_be_converted; - static PyObject *__pyx_n_s_setstate; - static PyObject *__pyx_n_s_setstate_cython; - static PyObject *__pyx_n_s_test; --static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; - static PyObject *__pyx_n_s_updatePrimalSolution; - static PyObject *__pyx_n_s_updateWeights; - static int __pyx_pf_4cylp_2cy_21CyDualPivotPythonBase_21CyDualPivotPythonBase___init__(struct __pyx_obj_4cylp_2cy_21CyDualPivotPythonBase_CyDualPivotPythonBase *__pyx_v_self, PyObject *__pyx_v_dualPivotMethodObject); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_21CyDualPivotPythonBase_21CyDualPivotPythonBase_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_21CyDualPivotPythonBase_CyDualPivotPythonBase *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_21CyDualPivotPythonBase_21CyDualPivotPythonBase_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_21CyDualPivotPythonBase_CyDualPivotPythonBase *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ - static PyObject *__pyx_tp_new_4cylp_2cy_21CyDualPivotPythonBase_CyDualPivotPythonBase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ - static PyObject *__pyx_tuple_; - static PyObject *__pyx_tuple__2; - static PyObject *__pyx_tuple__3; - static PyObject *__pyx_tuple__4; --static PyObject *__pyx_tuple__5; --static PyObject *__pyx_tuple__6; --static PyObject *__pyx_tuple__7; --static PyObject *__pyx_tuple__8; --static PyObject *__pyx_tuple__9; - /* Late includes */ - - /* "cylp/cy/CyDualPivotPythonBase.pyx":7 -@@ -2586,6 +2638,9 @@ static PyObject *__pyx_tuple__9; - static int __pyx_pw_4cylp_2cy_21CyDualPivotPythonBase_21CyDualPivotPythonBase_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ - static int __pyx_pw_4cylp_2cy_21CyDualPivotPythonBase_21CyDualPivotPythonBase_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_dualPivotMethodObject = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - int __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); -@@ -2638,6 +2693,9 @@ static int __pyx_pf_4cylp_2cy_21CyDualPivotPythonBase_21CyDualPivotPythonBase___ - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__init__", 0); - - /* "cylp/cy/CyDualPivotPythonBase.pyx":8 -@@ -2724,6 +2782,9 @@ static PyObject *__pyx_f_4cylp_2cy_21CyDualPivotPythonBase_21CyDualPivotPythonBa - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("pivotRow", 0); - - /* "cylp/cy/CyDualPivotPythonBase.pyx":13 -@@ -2844,6 +2905,9 @@ static double __pyx_f_4cylp_2cy_21CyDualPivotPythonBase_21CyDualPivotPythonBase_ - int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - double __pyx_t_6; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("updateWeights", 0); - - /* "cylp/cy/CyDualPivotPythonBase.pyx":29 -@@ -3050,6 +3114,9 @@ static void __pyx_f_4cylp_2cy_21CyDualPivotPythonBase_21CyDualPivotPythonBase_up - PyObject *__pyx_t_6 = NULL; - __pyx_t_5numpy_double_t __pyx_t_7; - Py_ssize_t __pyx_t_8; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("updatePrimalSolution", 0); - __pyx_pybuffer_changeInObjective.pybuffer.buf = NULL; - __pyx_pybuffer_changeInObjective.refcount = 0; -@@ -3221,6 +3288,9 @@ static PyObject *__pyx_pf_4cylp_2cy_21CyDualPivotPythonBase_21CyDualPivotPythonB - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -3276,6 +3346,9 @@ static PyObject *__pyx_pf_4cylp_2cy_21CyDualPivotPythonBase_21CyDualPivotPythonB - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -3306,863 +3379,7 @@ static PyObject *__pyx_pf_4cylp_2cy_21CyDualPivotPythonBase_21CyDualPivotPythonB - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); -- __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_v_i; -- int __pyx_v_ndim; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- int __pyx_v_t; -- char *__pyx_v_f; -- PyArray_Descr *__pyx_v_descr = 0; -- int __pyx_v_offset; -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- int __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- int __pyx_t_4; -- int __pyx_t_5; -- int __pyx_t_6; -- PyArray_Descr *__pyx_t_7; -- PyObject *__pyx_t_8 = NULL; -- char *__pyx_t_9; -- if (__pyx_v_info == NULL) { -- PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); -- return -1; -- } -- __Pyx_RefNannySetupContext("__getbuffer__", 0); -- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); -- __Pyx_GIVEREF(__pyx_v_info->obj); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":265 -- * -- * cdef int i, ndim -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":266 -- * cdef int i, ndim -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * -- * ndim = PyArray_NDIM(self) -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":268 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- */ -- __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L4_bool_binop_done; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":271 -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not C contiguous") -- * -- */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L4_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 272, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L7_bool_binop_done; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":275 -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not Fortran contiguous") -- * -- */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 276, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":278 -- * raise ValueError(u"ndarray is not Fortran contiguous") -- * -- * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":279 -- * -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * # Allocate new buffer for strides and shape info. -- */ -- __pyx_v_info->ndim = __pyx_v_ndim; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":283 -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- */ -- __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":284 -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim # <<<<<<<<<<<<<< -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- */ -- __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":285 -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim -- * for i in range(ndim): # <<<<<<<<<<<<<< -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] -- */ -- __pyx_t_4 = __pyx_v_ndim; -- __pyx_t_5 = __pyx_t_4; -- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { -- __pyx_v_i = __pyx_t_6; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":286 -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- */ -- (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":287 -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< -- * else: -- * info.strides = PyArray_STRIDES(self) -- */ -- (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- goto __pyx_L9; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":289 -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- */ -- /*else*/ { -- __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":290 -- * else: -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- */ -- __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); -- } -- __pyx_L9:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":291 -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL # <<<<<<<<<<<<<< -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) -- */ -- __pyx_v_info->suboffsets = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":292 -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< -- * info.readonly = not PyArray_ISWRITEABLE(self) -- * -- */ -- __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":293 -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< -- * -- * cdef int t -- */ -- __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":296 -- * -- * cdef int t -- * cdef char* f = NULL # <<<<<<<<<<<<<< -- * cdef dtype descr = PyArray_DESCR(self) -- * cdef int offset -- */ -- __pyx_v_f = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":297 -- * cdef int t -- * cdef char* f = NULL -- * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< -- * cdef int offset -- * -- */ -- __pyx_t_7 = PyArray_DESCR(__pyx_v_self); -- __pyx_t_3 = ((PyObject *)__pyx_t_7); -- __Pyx_INCREF(__pyx_t_3); -- __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":300 -- * cdef int offset -- * -- * info.obj = self # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(descr): -- */ -- __Pyx_INCREF(((PyObject *)__pyx_v_self)); -- __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); -- __pyx_v_info->obj = ((PyObject *)__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":303 -- * -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num # <<<<<<<<<<<<<< -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- */ -- __pyx_t_4 = __pyx_v_descr->type_num; -- __pyx_v_t = __pyx_t_4; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); -- if (!__pyx_t_2) { -- goto __pyx_L15_next_or; -- } else { -- } -- __pyx_t_2 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_L15_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":305 -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L14_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 306, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":307 -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- */ -- switch (__pyx_v_t) { -- case NPY_BYTE: -- __pyx_v_f = ((char *)"b"); -- break; -- case NPY_UBYTE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":308 -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- */ -- __pyx_v_f = ((char *)"B"); -- break; -- case NPY_SHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":309 -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- */ -- __pyx_v_f = ((char *)"h"); -- break; -- case NPY_USHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":310 -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- */ -- __pyx_v_f = ((char *)"H"); -- break; -- case NPY_INT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":311 -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- */ -- __pyx_v_f = ((char *)"i"); -- break; -- case NPY_UINT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":312 -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- */ -- __pyx_v_f = ((char *)"I"); -- break; -- case NPY_LONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":313 -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- */ -- __pyx_v_f = ((char *)"l"); -- break; -- case NPY_ULONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":314 -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- */ -- __pyx_v_f = ((char *)"L"); -- break; -- case NPY_LONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":315 -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- */ -- __pyx_v_f = ((char *)"q"); -- break; -- case NPY_ULONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":316 -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- */ -- __pyx_v_f = ((char *)"Q"); -- break; -- case NPY_FLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":317 -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- */ -- __pyx_v_f = ((char *)"f"); -- break; -- case NPY_DOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":318 -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- */ -- __pyx_v_f = ((char *)"d"); -- break; -- case NPY_LONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":319 -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- */ -- __pyx_v_f = ((char *)"g"); -- break; -- case NPY_CFLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":320 -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- */ -- __pyx_v_f = ((char *)"Zf"); -- break; -- case NPY_CDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":321 -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" -- */ -- __pyx_v_f = ((char *)"Zd"); -- break; -- case NPY_CLONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":322 -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f = "O" -- * else: -- */ -- __pyx_v_f = ((char *)"Zg"); -- break; -- case NPY_OBJECT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":323 -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_v_f = ((char *)"O"); -- break; -- default: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":325 -- * elif t == NPY_OBJECT: f = "O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * info.format = f -- * return -- */ -- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_8); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 325, __pyx_L1_error) -- break; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":326 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f # <<<<<<<<<<<<<< -- * return -- * else: -- */ -- __pyx_v_info->format = __pyx_v_f; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":327 -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f -- * return # <<<<<<<<<<<<<< -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- */ -- __pyx_r = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":329 -- * return -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- */ -- /*else*/ { -- __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":330 -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, -- */ -- (__pyx_v_info->format[0]) = '^'; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":331 -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 # <<<<<<<<<<<<<< -- * f = _util_dtypestring(descr, info.format + 1, -- * info.format + _buffer_format_string_len, -- */ -- __pyx_v_offset = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":332 -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< -- * info.format + _buffer_format_string_len, -- * &offset) -- */ -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":335 -- * info.format + _buffer_format_string_len, -- * &offset) -- * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- */ -- (__pyx_v_f[0]) = '\x00'; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- -- /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; -- if (__pyx_v_info->obj != NULL) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- goto __pyx_L2; -- __pyx_L0:; -- if (__pyx_v_info->obj == Py_None) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- __pyx_L2:; -- __Pyx_XDECREF((PyObject *)__pyx_v_descr); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); -- __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("__releasebuffer__", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":339 -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) -- */ -- PyObject_Free(__pyx_v_info->format); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":341 -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) # <<<<<<<<<<<<<< -- * # info.shape was stored after info.strides in the same block -- * -- */ -- PyObject_Free(__pyx_v_info->strides); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -@@ -4174,9 +3391,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":822 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":736 - * - * cdef inline object PyArray_MultiIterNew1(a): - * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< -@@ -4184,13 +3404,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - * cdef inline object PyArray_MultiIterNew2(a, b): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -@@ -4209,7 +3429,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -@@ -4221,9 +3441,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":825 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":739 - * - * cdef inline object PyArray_MultiIterNew2(a, b): - * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< -@@ -4231,13 +3454,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - * cdef inline object PyArray_MultiIterNew3(a, b, c): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -@@ -4256,7 +3479,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -@@ -4268,9 +3491,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":828 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":742 - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): - * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< -@@ -4278,13 +3504,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -@@ -4303,7 +3529,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -4315,9 +3541,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":831 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":745 - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -@@ -4325,13 +3554,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -4350,7 +3579,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -4362,9 +3591,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":834 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":748 - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< -@@ -4372,13 +3604,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - * cdef inline tuple PyDataType_SHAPE(dtype d): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -4397,7 +3629,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -4411,7 +3643,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - int __pyx_t_1; - __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -4421,7 +3653,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":838 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":752 - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): - * return d.subarray.shape # <<<<<<<<<<<<<< -@@ -4433,7 +3665,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -4442,12 +3674,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":840 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":754 - * return d.subarray.shape - * else: - * return () # <<<<<<<<<<<<<< - * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: -+ * - */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); -@@ -4456,7 +3688,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - goto __pyx_L0; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -4471,765 +3703,19 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 -+ * int _import_umath() except -1 - * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -+ * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -+ * Py_INCREF(base) # important to do this before stealing the reference below! -+ * PyArray_SetBaseObject(arr, base) - */ - --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { -- PyArray_Descr *__pyx_v_child = 0; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- PyObject *__pyx_v_fields = 0; -- PyObject *__pyx_v_childname = NULL; -- PyObject *__pyx_v_new_offset = NULL; -- PyObject *__pyx_v_t = NULL; -- char *__pyx_r; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- Py_ssize_t __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- PyObject *__pyx_t_4 = NULL; -- int __pyx_t_5; -- int __pyx_t_6; -- int __pyx_t_7; -- long __pyx_t_8; -- char *__pyx_t_9; -- __Pyx_RefNannySetupContext("_util_dtypestring", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":847 -- * -- * cdef dtype child -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * cdef tuple fields -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":848 -- * cdef dtype child -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * cdef tuple fields -- * -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- if (unlikely(__pyx_v_descr->names == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -- __PYX_ERR(2, 851, __pyx_L1_error) -- } -- __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; -- for (;;) { -- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 851, __pyx_L1_error) -- #else -- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- #endif -- __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":852 -- * -- * for childname in descr.names: -- * fields = descr.fields[childname] # <<<<<<<<<<<<<< -- * child, new_offset = fields -- * -- */ -- if (unlikely(__pyx_v_descr->fields == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); -- __PYX_ERR(2, 852, __pyx_L1_error) -- } -- __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":853 -- * for childname in descr.names: -- * fields = descr.fields[childname] -- * child, new_offset = fields # <<<<<<<<<<<<<< -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- */ -- if (likely(__pyx_v_fields != Py_None)) { -- PyObject* sequence = __pyx_v_fields; -- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); -- if (unlikely(size != 2)) { -- if (size > 2) __Pyx_RaiseTooManyValuesError(2); -- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); -- __PYX_ERR(2, 853, __pyx_L1_error) -- } -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); -- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); -- __Pyx_INCREF(__pyx_t_3); -- __Pyx_INCREF(__pyx_t_4); -- #else -- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- #endif -- } else { -- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error) -- } -- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); -- __pyx_t_3 = 0; -- __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 856, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); -- if (!__pyx_t_7) { -- goto __pyx_L8_next_or; -- } else { -- } -- __pyx_t_7 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_L8_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":859 -- * -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * # One could encode it in the format string and have Cython -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); -- if (__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_6 = __pyx_t_7; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":860 -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * # One could encode it in the format string and have Cython -- * # complain instead, BUT: < and > in format strings also imply -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 860, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":870 -- * -- * # Output padding bytes -- * while offset[0] < new_offset: # <<<<<<<<<<<<<< -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- */ -- while (1) { -- __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (!__pyx_t_6) break; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":871 -- * # Output padding bytes -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< -- * f += 1 -- * offset[0] += 1 -- */ -- (__pyx_v_f[0]) = 0x78; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":872 -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte -- * f += 1 # <<<<<<<<<<<<<< -- * offset[0] += 1 -- * -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":873 -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- * offset[0] += 1 # <<<<<<<<<<<<<< -- * -- * offset[0] += child.itemsize -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":875 -- * offset[0] += 1 -- * -- * offset[0] += child.itemsize # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(child): -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); -- if (__pyx_t_6) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":878 -- * -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num # <<<<<<<<<<<<<< -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 880, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":883 -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 98; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":884 -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":885 -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x68; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":886 -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 72; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":887 -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x69; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":888 -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 73; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":889 -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x6C; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":890 -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 76; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":891 -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x71; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":892 -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 81; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":893 -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":894 -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x64; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":895 -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x67; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":896 -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x66; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":897 -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x64; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":898 -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x67; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":899 -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (likely(__pyx_t_6)) { -- (__pyx_v_f[0]) = 79; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":901 -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * f += 1 -- * else: -- */ -- /*else*/ { -- __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 901, __pyx_L1_error) -- } -- __pyx_L15:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":902 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * f += 1 # <<<<<<<<<<<<<< -- * else: -- * # Cython ignores struct boundary information ("T{...}"), -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- goto __pyx_L13; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":906 -- * # Cython ignores struct boundary information ("T{...}"), -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< -- * return f -- * -- */ -- /*else*/ { -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 906, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- } -- __pyx_L13:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- } -- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":907 -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) -- * return f # <<<<<<<<<<<<<< -- * -- * -- */ -- __pyx_r = __pyx_v_f; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_4); -- __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = NULL; -- __pyx_L0:; -- __Pyx_XDECREF((PyObject *)__pyx_v_child); -- __Pyx_XDECREF(__pyx_v_fields); -- __Pyx_XDECREF(__pyx_v_childname); -- __Pyx_XDECREF(__pyx_v_new_offset); -- __Pyx_XDECREF(__pyx_v_t); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -- * int _import_umath() except -1 -- * -- * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -- * Py_INCREF(base) # important to do this before stealing the reference below! -- * PyArray_SetBaseObject(arr, base) -- */ -- --static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { -+static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("set_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1023 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":930 - * - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< -@@ -5238,7 +3724,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - Py_INCREF(__pyx_v_base); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1024 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":931 - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< -@@ -5247,7 +3733,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -5259,7 +3745,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyFinishContext(); - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5274,7 +3760,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - int __pyx_t_1; - __Pyx_RefNannySetupContext("get_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1027 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":934 - * - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< -@@ -5283,7 +3769,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - __pyx_v_base = PyArray_BASE(__pyx_v_arr); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5293,7 +3779,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_t_1 = ((__pyx_v_base == NULL) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1029 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":936 - * base = PyArray_BASE(arr) - * if base is NULL: - * return None # <<<<<<<<<<<<<< -@@ -5304,7 +3790,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5313,7 +3799,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1030 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":937 - * if base is NULL: - * return None - * return base # <<<<<<<<<<<<<< -@@ -5325,7 +3811,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = ((PyObject *)__pyx_v_base); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5340,12 +3826,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { -@@ -5359,13 +3845,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_array", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - { -@@ -5377,20 +3866,20 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1036 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":943 - * cdef inline int import_array() except -1: - * try: -- * _import_array() # <<<<<<<<<<<<<< -+ * __pyx_import_array() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") - */ -- __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error) -+ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - } -@@ -5400,9 +3889,9 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1037 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":944 - * try: -- * _import_array() -+ * __pyx_import_array() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.multiarray failed to import") - * -@@ -5410,32 +3899,32 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __PYX_ERR(2, 945, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - __Pyx_XGIVEREF(__pyx_t_1); -@@ -5446,12 +3935,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - /* function exit code */ -@@ -5469,7 +3958,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -5488,9 +3977,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_umath", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5506,16 +3998,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1042 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":949 - * cdef inline int import_umath() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5529,7 +4021,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1043 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":950 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< -@@ -5539,28 +4031,28 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __PYX_ERR(2, 951, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5575,7 +4067,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -5598,7 +4090,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -5617,9 +4109,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_ufunc", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5635,16 +4130,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1048 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":955 - * cdef inline int import_ufunc() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5658,35 +4153,38 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1049 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":956 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") -+ * - */ - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1050 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":957 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -+ * -+ * cdef extern from *: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __PYX_ERR(2, 957, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5701,7 +4199,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -5723,6 +4221,180 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_RefNannyFinishContext(); - return __pyx_r; - } -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_timedelta64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":979 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_datetime64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":994 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { -+ npy_datetime __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1004 -+ * also needed. That can be found using `get_datetime64_unit`. -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { -+ npy_timedelta __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1011 -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { -+ NPY_DATETIMEUNIT __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1018 -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ * """ -+ * return (obj).obmeta.base # <<<<<<<<<<<<<< -+ */ -+ __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} - static struct __pyx_vtabstruct_4cylp_2cy_21CyDualPivotPythonBase_CyDualPivotPythonBase __pyx_vtable_4cylp_2cy_21CyDualPivotPythonBase_CyDualPivotPythonBase; - - static PyObject *__pyx_tp_new_4cylp_2cy_21CyDualPivotPythonBase_CyDualPivotPythonBase(PyTypeObject *t, PyObject *a, PyObject *k) { -@@ -5780,7 +4452,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_21CyDualPivotPythonBase_CyDualPivotPyth - sizeof(struct __pyx_obj_4cylp_2cy_21CyDualPivotPythonBase_CyDualPivotPythonBase), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_21CyDualPivotPythonBase_CyDualPivotPythonBase, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -5833,6 +4510,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_21CyDualPivotPythonBase_CyDualPivotPyth - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyMethodDef __pyx_methods[] = { -@@ -5882,26 +4565,18 @@ static struct PyModuleDef __pyx_moduledef = { - - static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_CyDualPivotPythonBase, __pyx_k_CyDualPivotPythonBase, sizeof(__pyx_k_CyDualPivotPythonBase), 0, 0, 1, 1}, -- {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, - {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, -- {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, -- {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, - {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, -- {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, - {&__pyx_n_s_dualPivotMethodObject, __pyx_k_dualPivotMethodObject, sizeof(__pyx_k_dualPivotMethodObject), 0, 0, 1, 1}, - {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, - {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, - {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, - {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, -- {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, -- {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, - {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0}, - {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, - {&__pyx_n_s_pivotRow, __pyx_k_pivotRow, sizeof(__pyx_k_pivotRow), 0, 0, 1, 1}, - {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, -- {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, - {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, -@@ -5909,17 +4584,13 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, - {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, - {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, -- {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, - {&__pyx_n_s_updatePrimalSolution, __pyx_k_updatePrimalSolution, sizeof(__pyx_k_updatePrimalSolution), 0, 0, 1, 1}, - {&__pyx_n_s_updateWeights, __pyx_k_updateWeights, sizeof(__pyx_k_updateWeights), 0, 0, 1, 1}, - {0, 0, 0, 0, 0, 0, 0} - }; - static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error) -- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error) -- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(2, 285, __pyx_L1_error) -- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 856, __pyx_L1_error) -- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error) -+ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 945, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -@@ -5948,82 +4619,27 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_GOTREF(__pyx_tuple__2); - __Pyx_GIVEREF(__pyx_tuple__2); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__3); -- __Pyx_GIVEREF(__pyx_tuple__3); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__4); -- __Pyx_GIVEREF(__pyx_tuple__4); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__5); -- __Pyx_GIVEREF(__pyx_tuple__5); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__6); -- __Pyx_GIVEREF(__pyx_tuple__6); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__7); -- __Pyx_GIVEREF(__pyx_tuple__7); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 1038, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__8); -- __Pyx_GIVEREF(__pyx_tuple__8); -+ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 945, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__3); -+ __Pyx_GIVEREF(__pyx_tuple__3); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 1044, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__9); -- __Pyx_GIVEREF(__pyx_tuple__9); -+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 951, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__4); -+ __Pyx_GIVEREF(__pyx_tuple__4); - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -6073,6 +4689,9 @@ static int __Pyx_modinit_function_export_code(void) { - static int __Pyx_modinit_type_init_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); - /*--- Type init code ---*/ - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpDualRowPivotBase"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error) -@@ -6110,6 +4729,9 @@ static int __Pyx_modinit_type_init_code(void) { - static int __Pyx_modinit_type_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); - /*--- Type import code ---*/ - __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) -@@ -6133,18 +4755,38 @@ static int __Pyx_modinit_type_import_code(void) { - __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(5, 15, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) -+ __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error) -- __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error) -- __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error) -+ __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error) -+ __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error) -- __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error) -+ __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error) -+ __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error) -+ __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error) -+ __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error) -+ __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error) -+ __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error) -+ __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error) -+ __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error) -+ __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error) -+ __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error) -+ __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyCoinIndexedVector"); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 22, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); -@@ -6253,14 +4895,18 @@ static int __Pyx_modinit_variable_import_code(void) { - static int __Pyx_modinit_function_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); - /*--- Function import code ---*/ - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpDualRowPivotBase"); if (!__pyx_t_1) __PYX_ERR(1, 1, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_ImportFunction(__pyx_t_1, "RunPivotRow", (void (**)(void))&__pyx_f_4cylp_2cy_21CyClpDualRowPivotBase_RunPivotRow, "int (void *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error) - if (__Pyx_ImportFunction(__pyx_t_1, "RunDualPivotClone", (void (**)(void))&__pyx_f_4cylp_2cy_21CyClpDualRowPivotBase_RunDualPivotClone, "ClpDualRowPivot *(void *, int)") < 0) __PYX_ERR(1, 1, __pyx_L1_error) - if (__Pyx_ImportFunction(__pyx_t_1, "RunUpdateWeights", (void (**)(void))&__pyx_f_4cylp_2cy_21CyClpDualRowPivotBase_RunUpdateWeights, "double (void *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error) - if (__Pyx_ImportFunction(__pyx_t_1, "RunUpdatePrimalSolution", (void (**)(void))&__pyx_f_4cylp_2cy_21CyClpDualRowPivotBase_RunUpdatePrimalSolution, "void (void *, ICoinIndexedVector *, double, double *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error) -- Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; -+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -6270,17 +4916,19 @@ static int __Pyx_modinit_function_import_code(void) { - } - - --#if PY_MAJOR_VERSION < 3 --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC void --#else -+#ifndef CYTHON_NO_PYINIT_EXPORT - #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#elif PY_MAJOR_VERSION < 3 -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" void -+#else -+#define __Pyx_PyMODINIT_FUNC void - #endif - #else --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC PyObject * -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * - #else --#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#define __Pyx_PyMODINIT_FUNC PyObject * - #endif - #endif - -@@ -6362,6 +5010,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_CyDualPivotPythonBase(PyObject *__ - #endif - { - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannyDeclarations - #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m) { -@@ -6409,11 +5060,9 @@ if (!__Pyx_RefNanny) { - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ -- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS -- #ifdef WITH_THREAD /* Python build with threading support? */ -+ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - PyEval_InitThreads(); - #endif -- #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; -@@ -6450,17 +5099,17 @@ if (!__Pyx_RefNanny) { - } - #endif - /*--- Builtin init code ---*/ -- if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Constants init code ---*/ -- if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Global type/function init code ---*/ - (void)__Pyx_modinit_global_init_code(); - (void)__Pyx_modinit_variable_export_code(); - (void)__Pyx_modinit_function_export_code(); -- if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; -- if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) -+ if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) - (void)__Pyx_modinit_variable_import_code(); -- if (unlikely(__Pyx_modinit_function_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_function_import_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Execution code ---*/ - #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) - if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error) -@@ -6476,12 +5125,12 @@ if (!__Pyx_RefNanny) { - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -- * raise ImportError("numpy.core.umath failed to import") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - - /*--- Wrapped vars code ---*/ -@@ -6590,7 +5239,7 @@ static int __Pyx_ParseOptionalKeywords( - } - name = first_kw_arg; - #if PY_MAJOR_VERSION < 3 -- if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { -+ if (likely(PyString_Check(key))) { - while (*name) { - if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) - && _PyString_Eq(**name, key)) { -@@ -6617,7 +5266,7 @@ static int __Pyx_ParseOptionalKeywords( - while (*name) { - int cmp = (**name == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 -- (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : -+ (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**name, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; -@@ -6633,7 +5282,7 @@ static int __Pyx_ParseOptionalKeywords( - while (argname != first_kw_arg) { - int cmp = (**argname == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 -- (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : -+ (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**argname, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; -@@ -6842,7 +5491,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #if CYTHON_COMPILING_IN_CPYTHON - static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; -- ternaryfunc call = func->ob_type->tp_call; -+ ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -@@ -6929,7 +5578,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec - if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { - return __Pyx_PyObject_CallMethO(func, arg); - #if CYTHON_FAST_PYCCALL -- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { -+ } else if (__Pyx_PyFastCFunction_Check(func)) { - return __Pyx_PyCFunction_FastCall(func, &arg, 1); - #endif - } -@@ -7102,6 +5751,7 @@ static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { - } - static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { - switch (ch) { -+ case '?': return "'bool'"; - case 'c': return "'char'"; - case 'b': return "'signed char'"; - case 'B': return "'unsigned char'"; -@@ -7144,7 +5794,7 @@ static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { - } - static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { - switch (ch) { -- case 'c': case 'b': case 'B': case 's': case 'p': return 1; -+ case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; - case 'h': case 'H': return sizeof(short); - case 'i': case 'I': return sizeof(int); - case 'l': case 'L': return sizeof(long); -@@ -7228,7 +5878,7 @@ static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { - case 'b': case 'h': case 'i': - case 'l': case 'q': case 's': case 'p': - return 'I'; -- case 'B': case 'H': case 'I': case 'L': case 'Q': -+ case '?': case 'B': case 'H': case 'I': case 'L': case 'Q': - return 'U'; - case 'f': case 'd': case 'g': - return (is_complex ? 'C' : 'R'); -@@ -7372,9 +6022,7 @@ static PyObject * - __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) - { - const char *ts = *tsp; -- int i = 0, number; -- int ndim = ctx->head->field->type->ndim; --; -+ int i = 0, number, ndim; - ++ts; - if (ctx->new_count != 1) { - PyErr_SetString(PyExc_ValueError, -@@ -7382,6 +6030,7 @@ __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) - return NULL; - } - if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; -+ ndim = ctx->head->field->type->ndim; - while (*ts && *ts != ')') { - switch (*ts) { - case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; -@@ -7507,12 +6156,12 @@ static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const cha - return NULL; - } - CYTHON_FALLTHROUGH; -- case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': -+ case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': - case 'l': case 'L': case 'q': case 'Q': - case 'f': case 'd': case 'g': - case 'O': case 'p': -- if (ctx->enc_type == *ts && got_Z == ctx->is_complex && -- ctx->enc_packmode == ctx->new_packmode) { -+ if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) && -+ (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) { - ctx->enc_count += ctx->new_count; - ctx->new_count = 1; - got_Z = 0; -@@ -7760,61 +6409,6 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject - } - #endif - --/* DictGetItem */ -- #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { -- PyObject *value; -- value = PyDict_GetItemWithError(d, key); -- if (unlikely(!value)) { -- if (!PyErr_Occurred()) { -- if (unlikely(PyTuple_Check(key))) { -- PyObject* args = PyTuple_Pack(1, key); -- if (likely(args)) { -- PyErr_SetObject(PyExc_KeyError, args); -- Py_DECREF(args); -- } -- } else { -- PyErr_SetObject(PyExc_KeyError, key); -- } -- } -- return NULL; -- } -- Py_INCREF(value); -- return value; --} --#endif -- --/* RaiseTooManyValuesToUnpack */ -- static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { -- PyErr_Format(PyExc_ValueError, -- "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); --} -- --/* RaiseNeedMoreValuesToUnpack */ -- static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { -- PyErr_Format(PyExc_ValueError, -- "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", -- index, (index == 1) ? "" : "s"); --} -- --/* RaiseNoneIterError */ -- static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); --} -- --/* ExtTypeTest */ -- static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { -- if (unlikely(!type)) { -- PyErr_SetString(PyExc_SystemError, "Missing type object"); -- return 0; -- } -- if (likely(__Pyx_TypeCheck(obj, type))) -- return 1; -- PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", -- Py_TYPE(obj)->tp_name, type->tp_name); -- return 0; --} -- - /* GetTopmostException */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * -@@ -8153,6 +6747,28 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - return -1; - } - -+/* PyObjectGetAttrStrNoError */ -+ static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { -+ __Pyx_PyThreadState_declare -+ __Pyx_PyThreadState_assign -+ if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) -+ __Pyx_PyErr_Clear(); -+} -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { -+ PyObject *result; -+#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 -+ PyTypeObject* tp = Py_TYPE(obj); -+ if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { -+ return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); -+ } -+#endif -+ result = __Pyx_PyObject_GetAttrStr(obj, attr_name); -+ if (unlikely(!result)) { -+ __Pyx_PyObject_GetAttrStr_ClearAttributeError(); -+ } -+ return result; -+} -+ - /* SetupReduce */ - static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { - int ret; -@@ -8180,43 +6796,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { - PyObject *setstate = NULL; - PyObject *setstate_cython = NULL; - #if CYTHON_USE_PYTYPE_LOOKUP -- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #else -- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #endif - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #else -- object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #endif -- reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; -+ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; - if (reduce_ex == object_reduce_ex) { - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #else -- object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #endif -- reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; -+ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; - if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { -- reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; -+ reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); -+ if (likely(reduce_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (reduce == object_reduce || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); - if (!setstate) PyErr_Clear(); - if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { -- setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; -+ setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); -+ if (likely(setstate_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (!setstate || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - } - PyType_Modified((PyTypeObject*)type_obj); - } - } -- goto GOOD; --BAD: -+ goto __PYX_GOOD; -+__PYX_BAD: - if (!PyErr_Occurred()) - PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); - ret = -1; --GOOD: -+__PYX_GOOD: - #if !CYTHON_USE_PYTYPE_LOOKUP - Py_XDECREF(object_reduce); - Py_XDECREF(object_reduce_ex); -@@ -8257,7 +6881,7 @@ static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UIN - - /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK --static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { -+static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { - PyObject *use_cline; - PyObject *ptype, *pvalue, *ptraceback; - #if CYTHON_COMPILING_IN_CPYTHON -@@ -8287,7 +6911,7 @@ static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { - } - if (!use_cline) { - c_line = 0; -- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); -+ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; -@@ -8361,7 +6985,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - if (__pyx_code_cache.count == __pyx_code_cache.max_count) { - int new_max = __pyx_code_cache.max_count + 64; - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( -- __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); -+ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); - if (unlikely(!entries)) { - return; - } -@@ -8384,30 +7008,31 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { -- PyCodeObject *py_code = 0; -- PyObject *py_srcfile = 0; -- PyObject *py_funcname = 0; -+ PyCodeObject *py_code = NULL; -+ PyObject *py_funcname = NULL; - #if PY_MAJOR_VERSION < 3 -+ PyObject *py_srcfile = NULL; - py_srcfile = PyString_FromString(filename); -- #else -- py_srcfile = PyUnicode_FromString(filename); -- #endif - if (!py_srcfile) goto bad; -+ #endif - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; -+ funcname = PyUnicode_AsUTF8(py_funcname); -+ if (!funcname) goto bad; - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); -- #else -- py_funcname = PyUnicode_FromString(funcname); -+ if (!py_funcname) goto bad; - #endif - } -- if (!py_funcname) goto bad; -+ #if PY_MAJOR_VERSION < 3 - py_code = __Pyx_PyCode_New( - 0, - 0, -@@ -8426,11 +7051,16 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - __pyx_empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); -- Py_DECREF(py_funcname); -+ #else -+ py_code = PyCode_NewEmpty(filename, funcname, py_line); -+ #endif -+ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline - return py_code; - bad: -- Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -+ #if PY_MAJOR_VERSION < 3 -+ Py_XDECREF(py_srcfile); -+ #endif - return NULL; - } - static void __Pyx_AddTraceback(const char *funcname, int c_line, -@@ -8465,7 +7095,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - #if PY_MAJOR_VERSION < 3 - static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { - if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); -- if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); - PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); - return -1; - } -@@ -8477,7 +7106,6 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - return; - } - if ((0)) {} -- else if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); - view->obj = NULL; - Py_DECREF(obj); - } -@@ -8601,7 +7229,6 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_float(a, a); - return __Pyx_c_prod_float(a, a); - case 3: - z = __Pyx_c_prod_float(a, a); -@@ -8756,7 +7383,6 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_double(a, a); - return __Pyx_c_prod_double(a, a); - case 3: - z = __Pyx_c_prod_double(a, a); -@@ -8795,24 +7421,31 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - #endif - - /* CIntToPy */ -- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { -- if (sizeof(int) < sizeof(long)) { -+ if (sizeof(long) < sizeof(long)) { - return PyInt_FromLong((long) value); -- } else if (sizeof(int) <= sizeof(unsigned long)) { -+ } else if (sizeof(long) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); - #ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); - #endif - } - } else { -- if (sizeof(int) <= sizeof(long)) { -+ if (sizeof(long) <= sizeof(long)) { - return PyInt_FromLong((long) value); - #ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); - #endif - } -@@ -8820,7 +7453,7 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(int), -+ return _PyLong_FromByteArray(bytes, sizeof(long), - little, !is_unsigned); - } - } -@@ -8847,51 +7480,27 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - return (target_type) value;\ - } - --/* CIntToPy */ -- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { -- const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(enum NPY_TYPES) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+/* CIntFromPy */ -+ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" - #endif -- } -- } else { -- if (sizeof(enum NPY_TYPES) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop - #endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), -- little, !is_unsigned); -- } --} -- --/* CIntFromPy */ -- static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -- if (sizeof(int) < sizeof(long)) { -- __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) -+ if (sizeof(long) < sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } -- return (int) val; -+ return (long) val; - } - } else - #endif -@@ -8900,32 +7509,32 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (int) 0; -- case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) -+ case 0: return (long) 0; -+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) - case 2: -- if (8 * sizeof(int) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { -- return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { -+ return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - case 3: -- if (8 * sizeof(int) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { -- return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { -+ return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - case 4: -- if (8 * sizeof(int) > 3 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { -- return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { -+ return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; -@@ -8939,86 +7548,86 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) -- return (int) -1; -+ return (long) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } - #endif -- if (sizeof(int) <= sizeof(unsigned long)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) -+ if (sizeof(long) <= sizeof(unsigned long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) - #endif - } - } else { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (int) 0; -- case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) -- case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) -+ case 0: return (long) 0; -+ case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) -+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) - case -2: -- if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -+ return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 2: -- if (8 * sizeof(int) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -- return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -+ return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case -3: -- if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -+ return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 3: -- if (8 * sizeof(int) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -- return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -+ return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case -4: -- if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -+ return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 4: -- if (8 * sizeof(int) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -- return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -+ return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - } - #endif -- if (sizeof(int) <= sizeof(long)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) -+ if (sizeof(long) <= sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) -+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) - #endif - } - } -@@ -9027,7 +7636,7 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); - #else -- int val; -+ long val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); - #if PY_MAJOR_VERSION < 3 - if (likely(v) && !PyLong_Check(v)) { -@@ -9047,71 +7656,47 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - return val; - } - #endif -- return (int) -1; -+ return (long) -1; - } - } else { -- int val; -+ long val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); -- if (!tmp) return (int) -1; -- val = __Pyx_PyInt_As_int(tmp); -+ if (!tmp) return (long) -1; -+ val = __Pyx_PyInt_As_long(tmp); - Py_DECREF(tmp); - return val; - } - raise_overflow: - PyErr_SetString(PyExc_OverflowError, -- "value too large to convert to int"); -- return (int) -1; -+ "value too large to convert to long"); -+ return (long) -1; - raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, -- "can't convert negative value to int"); -- return (int) -1; -+ "can't convert negative value to long"); -+ return (long) -1; - } - --/* CIntToPy */ -- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(long) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(long) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+/* CIntFromPy */ -+ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" - #endif -- } -- } else { -- if (sizeof(long) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop - #endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(long), -- little, !is_unsigned); -- } --} -- --/* CIntFromPy */ -- static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -- if (sizeof(long) < sizeof(long)) { -- __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) -+ if (sizeof(int) < sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } -- return (long) val; -+ return (int) val; - } - } else - #endif -@@ -9120,32 +7705,32 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (long) 0; -- case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) -+ case 0: return (int) 0; -+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) - case 2: -- if (8 * sizeof(long) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { -- return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { -+ return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; - case 3: -- if (8 * sizeof(long) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { -- return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { -+ return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; - case 4: -- if (8 * sizeof(long) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { -- return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { -+ return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; -@@ -9159,86 +7744,86 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) -- return (long) -1; -+ return (int) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } - #endif -- if (sizeof(long) <= sizeof(unsigned long)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) -+ if (sizeof(int) <= sizeof(unsigned long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) - #endif - } - } else { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (long) 0; -- case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) -- case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) -+ case 0: return (int) 0; -+ case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) -+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) - case -2: -- if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -- return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 2: -- if (8 * sizeof(long) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -- return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case -3: -- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -- return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 3: -- if (8 * sizeof(long) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -- return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case -4: -- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -- return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 4: -- if (8 * sizeof(long) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -- return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -+ return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - } - #endif -- if (sizeof(long) <= sizeof(long)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) -+ if (sizeof(int) <= sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) - #endif - } - } -@@ -9247,7 +7832,7 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); - #else -- long val; -+ int val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); - #if PY_MAJOR_VERSION < 3 - if (likely(v) && !PyLong_Check(v)) { -@@ -9267,24 +7852,24 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - return val; - } - #endif -- return (long) -1; -+ return (int) -1; - } - } else { -- long val; -+ int val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); -- if (!tmp) return (long) -1; -- val = __Pyx_PyInt_As_long(tmp); -+ if (!tmp) return (int) -1; -+ val = __Pyx_PyInt_As_int(tmp); - Py_DECREF(tmp); - return val; - } - raise_overflow: - PyErr_SetString(PyExc_OverflowError, -- "value too large to convert to long"); -- return (long) -1; -+ "value too large to convert to int"); -+ return (int) -1; - raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, -- "can't convert negative value to long"); -- return (long) -1; -+ "can't convert negative value to int"); -+ return (int) -1; - } - - /* FastTypeChecks */ -@@ -9705,6 +8290,23 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_DECREF(x); - return ival; - } -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { -+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { -+ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); -+#if PY_MAJOR_VERSION < 3 -+ } else if (likely(PyInt_CheckExact(o))) { -+ return PyInt_AS_LONG(o); -+#endif -+ } else { -+ Py_ssize_t ival; -+ PyObject *x; -+ x = PyNumber_Index(o); -+ if (!x) return -1; -+ ival = PyInt_AsLong(x); -+ Py_DECREF(x); -+ return ival; -+ } -+} - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); - } -diff --git a/cylp/cy/CyOsiCuts.cpp b/cylp/cy/CyOsiCuts.cpp -index bbf629d..5b18903 100644 ---- a/cylp/cy/CyOsiCuts.cpp -+++ b/cylp/cy/CyOsiCuts.cpp -@@ -1,14 +1,16 @@ --/* Generated by Cython 0.29.12 */ -+/* Generated by Cython 0.29.25 */ - -+#ifndef PY_SSIZE_T_CLEAN - #define PY_SSIZE_T_CLEAN -+#endif /* PY_SSIZE_T_CLEAN */ - #include "Python.h" - #ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. - #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. - #else --#define CYTHON_ABI "0_29_12" --#define CYTHON_HEX_VERSION 0x001D0CF0 -+#define CYTHON_ABI "0_29_25" -+#define CYTHON_HEX_VERSION 0x001D19F0 - #define CYTHON_FUTURE_DIVISION 0 - #include - #ifndef offsetof -@@ -155,7 +157,7 @@ - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif -- #if PY_VERSION_HEX < 0x030300F0 -+ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) -@@ -174,7 +176,7 @@ - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL -- #define CYTHON_FAST_PYCALL 1 -+ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1) - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) -@@ -193,7 +195,9 @@ - #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) - #endif - #if CYTHON_USE_PYLONG_INTERNALS -- #include "longintrepr.h" -+ #if PY_MAJOR_VERSION < 3 -+ #include "longintrepr.h" -+ #endif - #undef SHIFT - #undef BASE - #undef MASK -@@ -324,9 +328,68 @@ class __Pyx_FakeReference { - #define __Pyx_DefaultClassType PyClass_Type - #else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" --#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 -- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ -- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -+ #define __Pyx_DefaultClassType PyType_Type -+#if PY_VERSION_HEX >= 0x030B00A1 -+ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, -+ PyObject *code, PyObject *c, PyObject* n, PyObject *v, -+ PyObject *fv, PyObject *cell, PyObject* fn, -+ PyObject *name, int fline, PyObject *lnos) { -+ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; -+ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; -+ const char *fn_cstr=NULL; -+ const char *name_cstr=NULL; -+ PyCodeObject* co=NULL; -+ PyObject *type, *value, *traceback; -+ PyErr_Fetch(&type, &value, &traceback); -+ if (!(kwds=PyDict_New())) goto end; -+ if (!(argcount=PyLong_FromLong(a))) goto end; -+ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; -+ if (!(posonlyargcount=PyLong_FromLong(0))) goto end; -+ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; -+ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; -+ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; -+ if (!(nlocals=PyLong_FromLong(l))) goto end; -+ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; -+ if (!(stacksize=PyLong_FromLong(s))) goto end; -+ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; -+ if (!(flags=PyLong_FromLong(f))) goto end; -+ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; -+ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; -+ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; -+ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; -+ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; -+ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here -+ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; -+ Py_XDECREF((PyObject*)co); -+ co = (PyCodeObject*)call_result; -+ call_result = NULL; -+ if (0) { -+ cleanup_code_too: -+ Py_XDECREF((PyObject*)co); -+ co = NULL; -+ } -+ end: -+ Py_XDECREF(kwds); -+ Py_XDECREF(argcount); -+ Py_XDECREF(posonlyargcount); -+ Py_XDECREF(kwonlyargcount); -+ Py_XDECREF(nlocals); -+ Py_XDECREF(stacksize); -+ Py_XDECREF(replace); -+ Py_XDECREF(call_result); -+ Py_XDECREF(empty); -+ if (type) { -+ PyErr_Restore(type, value, traceback); -+ } -+ return co; -+ } - #else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -@@ -440,8 +503,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #endif - #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 -+ #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) -+ #else -+ #define __Pyx_PyUnicode_READY(op) (0) -+ #endif - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) -@@ -449,7 +516,15 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) -+ #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) -+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) -+ #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) -+ #endif -+ #else -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) -+ #endif - #else - #define CYTHON_PEP393_ENABLED 0 - #define PyUnicode_1BYTE_KIND 1 -@@ -498,8 +573,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define PyString_Type PyUnicode_Type - #define PyString_Check PyUnicode_Check - #define PyString_CheckExact PyUnicode_CheckExact -+#ifndef PyObject_Unicode - #define PyObject_Unicode PyObject_Str - #endif -+#endif - #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) - #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) -@@ -510,6 +587,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #ifndef PySet_CheckExact - #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) - #endif -+#if PY_VERSION_HEX >= 0x030900A4 -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) -+#else -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) -+#endif - #if CYTHON_ASSUME_SAFE_MACROS - #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) - #else -@@ -543,13 +627,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong -- #define __Pyx_PyInt_AsHash_t PyInt_AsLong -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t - #else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t -- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t - #endif - #if PY_MAJOR_VERSION >= 3 -- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) -+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) - #else - #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) - #endif -@@ -590,11 +674,10 @@ static CYTHON_INLINE float __PYX_NAN() { - #define __Pyx_truncl truncl - #endif - -- -+#define __PYX_MARK_ERR_POS(f_index, lineno) \ -+ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } - #define __PYX_ERR(f_index, lineno, Ln_error) \ --{ \ -- __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ --} -+ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } - - #ifndef __PYX_EXTERN_C - #ifdef __cplusplus -@@ -610,7 +693,13 @@ static CYTHON_INLINE float __PYX_NAN() { - #include - #include - #include "numpy/arrayobject.h" -+#include "numpy/ndarrayobject.h" -+#include "numpy/ndarraytypes.h" -+#include "numpy/arrayscalars.h" - #include "numpy/ufuncobject.h" -+ -+ /* NumPy API declarations from "numpy/__init__.pxd" */ -+ - #include "IOsiCuts.hpp" - #ifdef _OPENMP - #include -@@ -708,6 +797,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); - static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); - #if CYTHON_ASSUME_SAFE_MACROS - #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) - #else -@@ -842,7 +932,7 @@ static const char *__pyx_filename; - - - static const char *__pyx_f[] = { -- "cylp\\cy\\CyOsiCuts.pyx", -+ "cylp/cy/CyOsiCuts.pyx", - "stringsource", - "__init__.pxd", - "type.pxd", -@@ -884,7 +974,7 @@ typedef struct { - } __Pyx_BufFmt_Context; - - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":776 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":690 - * # in Cython to enable them only on the right systems. - * - * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< -@@ -893,7 +983,7 @@ typedef struct { - */ - typedef npy_int8 __pyx_t_5numpy_int8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":777 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":691 - * - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< -@@ -902,7 +992,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; - */ - typedef npy_int16 __pyx_t_5numpy_int16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":778 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":692 - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< -@@ -911,7 +1001,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; - */ - typedef npy_int32 __pyx_t_5numpy_int32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":779 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":693 - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t - * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< -@@ -920,7 +1010,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; - */ - typedef npy_int64 __pyx_t_5numpy_int64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":783 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":697 - * #ctypedef npy_int128 int128_t - * - * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< -@@ -929,7 +1019,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; - */ - typedef npy_uint8 __pyx_t_5numpy_uint8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":784 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":698 - * - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< -@@ -938,7 +1028,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; - */ - typedef npy_uint16 __pyx_t_5numpy_uint16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":785 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":699 - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< -@@ -947,7 +1037,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; - */ - typedef npy_uint32 __pyx_t_5numpy_uint32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":786 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":700 - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t - * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< -@@ -956,7 +1046,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; - */ - typedef npy_uint64 __pyx_t_5numpy_uint64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":790 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":704 - * #ctypedef npy_uint128 uint128_t - * - * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< -@@ -965,7 +1055,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; - */ - typedef npy_float32 __pyx_t_5numpy_float32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":791 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":705 - * - * ctypedef npy_float32 float32_t - * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< -@@ -974,7 +1064,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; - */ - typedef npy_float64 __pyx_t_5numpy_float64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":800 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":714 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< -@@ -983,7 +1073,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; - */ - typedef npy_long __pyx_t_5numpy_int_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":801 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":715 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< -@@ -992,7 +1082,7 @@ typedef npy_long __pyx_t_5numpy_int_t; - */ - typedef npy_longlong __pyx_t_5numpy_long_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":802 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":716 - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t - * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< -@@ -1001,7 +1091,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; - */ - typedef npy_longlong __pyx_t_5numpy_longlong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":804 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":718 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< -@@ -1010,7 +1100,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; - */ - typedef npy_ulong __pyx_t_5numpy_uint_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":805 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":719 - * - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< -@@ -1019,7 +1109,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":806 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":720 - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t - * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< -@@ -1028,7 +1118,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":808 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":722 - * ctypedef npy_ulonglong ulonglong_t - * - * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< -@@ -1037,7 +1127,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - */ - typedef npy_intp __pyx_t_5numpy_intp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":809 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":723 - * - * ctypedef npy_intp intp_t - * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< -@@ -1046,7 +1136,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; - */ - typedef npy_uintp __pyx_t_5numpy_uintp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":811 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":725 - * ctypedef npy_uintp uintp_t - * - * ctypedef npy_double float_t # <<<<<<<<<<<<<< -@@ -1055,7 +1145,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; - */ - typedef npy_double __pyx_t_5numpy_float_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":812 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":726 - * - * ctypedef npy_double float_t - * ctypedef npy_double double_t # <<<<<<<<<<<<<< -@@ -1064,7 +1154,7 @@ typedef npy_double __pyx_t_5numpy_float_t; - */ - typedef npy_double __pyx_t_5numpy_double_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":813 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":727 - * ctypedef npy_double float_t - * ctypedef npy_double double_t - * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< -@@ -1100,7 +1190,7 @@ static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(do - /*--- Type declarations ---*/ - struct __pyx_obj_4cylp_2cy_9CyOsiCuts_CyOsiCuts; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":815 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":729 - * ctypedef npy_longdouble longdouble_t - * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< -@@ -1109,7 +1199,7 @@ struct __pyx_obj_4cylp_2cy_9CyOsiCuts_CyOsiCuts; - */ - typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":816 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":730 - * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< -@@ -1118,7 +1208,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - */ - typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":817 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":731 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< -@@ -1127,7 +1217,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - */ - typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":819 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":733 - * ctypedef npy_clongdouble clongdouble_t - * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< -@@ -1314,6 +1404,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #ifndef Py_MEMBER_SIZE - #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) - #endif -+#if CYTHON_FAST_PYCALL - static size_t __pyx_pyframe_localsplus_offset = 0; - #include "frameobject.h" - #define __Pxy_PyFrame_Initialize_Offsets()\ -@@ -1321,6 +1412,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) - #define __Pyx_PyFrame_GetLocalsplus(frame)\ - (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) -+#endif // CYTHON_FAST_PYCALL - #endif - - /* PyObjectCall.proto */ -@@ -1462,20 +1554,6 @@ static void __Pyx_RaiseBufferFallbackError(void); - /* RaiseException.proto */ - static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); - --/* DictGetItem.proto */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); --#define __Pyx_PyObject_Dict_GetItem(obj, name)\ -- (likely(PyDict_CheckExact(obj)) ?\ -- __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) --#else --#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) --#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) --#endif -- --/* RaiseNoneIterError.proto */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -- - /* GetTopmostException.proto */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); -@@ -1525,6 +1603,9 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - /* SetVTable.proto */ - static int __Pyx_SetVtable(PyObject *dict, void *vtable); - -+/* PyObjectGetAttrStrNoError.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); -+ - /* SetupReduce.proto */ - static int __Pyx_setup_reduce(PyObject* type_obj); - -@@ -1636,11 +1717,10 @@ static void __Pyx_CppExn2PyErr() { - } - #endif - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -- --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); -+/* GCCDiagnostics.proto */ -+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -+#define __Pyx_HAS_GCC_DIAGNOSTIC -+#endif - - /* RealImag.proto */ - #if CYTHON_CCOMPLEX -@@ -1741,14 +1821,17 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); - #endif - - /* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); - --/* CIntFromPy.proto */ --static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); -+/* CIntToPy.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); - - /* CIntFromPy.proto */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); - -+/* CIntFromPy.proto */ -+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); -+ - /* FastTypeChecks.proto */ - #if CYTHON_COMPILING_IN_CPYTHON - #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) -@@ -1796,8 +1879,17 @@ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; - static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; - static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; - static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -+static PyTypeObject *__pyx_ptype_5numpy_generic = 0; -+static PyTypeObject *__pyx_ptype_5numpy_number = 0; -+static PyTypeObject *__pyx_ptype_5numpy_integer = 0; -+static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; -+static PyTypeObject *__pyx_ptype_5numpy_floating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; -+static PyTypeObject *__pyx_ptype_5numpy_character = 0; - static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ - - /* Module declarations from 'cylp.cy.CyOsiCuts' */ - static PyTypeObject *__pyx_ptype_4cylp_2cy_9CyOsiCuts_CyOsiCuts = 0; -@@ -1810,9 +1902,6 @@ int __pyx_module_is_main_cylp__cy__CyOsiCuts = 0; - /* Implementation of 'cylp.cy.CyOsiCuts' */ - static PyObject *__pyx_builtin_xrange; - static PyObject *__pyx_builtin_TypeError; --static PyObject *__pyx_builtin_ValueError; --static PyObject *__pyx_builtin_range; --static PyObject *__pyx_builtin_RuntimeError; - static PyObject *__pyx_builtin_ImportError; - static const char __pyx_k_x[] = "x"; - static const char __pyx_k_np[] = "np"; -@@ -1843,12 +1932,10 @@ static const char __pyx_k_TypeError[] = "TypeError"; - static const char __pyx_k_cyLpModel[] = "cyLpModel"; - static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; - static const char __pyx_k_variables[] = "variables"; --static const char __pyx_k_ValueError[] = "ValueError"; - static const char __pyx_k_csr_matrix[] = "csr_matrix"; - static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; - static const char __pyx_k_ImportError[] = "ImportError"; - static const char __pyx_k_addVariable[] = "addVariable"; --static const char __pyx_k_RuntimeError[] = "RuntimeError"; - static const char __pyx_k_getVarByName[] = "getVarByName"; - static const char __pyx_k_makeMatrices[] = "makeMatrices"; - static const char __pyx_k_scipy_sparse[] = "scipy.sparse"; -@@ -1856,24 +1943,13 @@ static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; - static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; - static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; - static const char __pyx_k_cylp_py_modeling_CyLPModel[] = "cylp.py.modeling.CyLPModel"; --static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; - static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; --static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; --static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; --static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; --static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; - static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; - static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; --static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; - static PyObject *__pyx_n_s_CyLPModel; - static PyObject *__pyx_n_s_CyOsiCuts; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; - static PyObject *__pyx_n_s_ImportError; --static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; --static PyObject *__pyx_n_s_RuntimeError; - static PyObject *__pyx_n_s_TypeError; --static PyObject *__pyx_n_s_ValueError; - static PyObject *__pyx_n_s_addVariable; - static PyObject *__pyx_n_s_arange; - static PyObject *__pyx_n_s_cline_in_traceback; -@@ -1894,8 +1970,6 @@ static PyObject *__pyx_n_s_main; - static PyObject *__pyx_n_s_makeMatrices; - static PyObject *__pyx_n_s_name; - static PyObject *__pyx_n_s_name_2; --static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; --static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; - static PyObject *__pyx_kp_s_no_default___reduce___due_to_non; - static PyObject *__pyx_n_s_np; - static PyObject *__pyx_n_s_numpy; -@@ -1912,7 +1986,6 @@ static PyObject *__pyx_n_s_setstate; - static PyObject *__pyx_n_s_setstate_cython; - static PyObject *__pyx_n_s_shape; - static PyObject *__pyx_n_s_test; --static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; - static PyObject *__pyx_n_s_variables; - static PyObject *__pyx_n_s_x; - static PyObject *__pyx_n_s_xrange; -@@ -1925,19 +1998,12 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyOsiCuts_9CyOsiCuts_4addColumnCut(struct _ - static PyObject *__pyx_pf_4cylp_2cy_9CyOsiCuts_9CyOsiCuts_6addRowCut(struct __pyx_obj_4cylp_2cy_9CyOsiCuts_CyOsiCuts *__pyx_v_self, PyObject *__pyx_v_cut, PyObject *__pyx_v_cyLpModel); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_9CyOsiCuts_9CyOsiCuts_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_9CyOsiCuts_CyOsiCuts *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_9CyOsiCuts_9CyOsiCuts_10__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_9CyOsiCuts_CyOsiCuts *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ - static PyObject *__pyx_tp_new_4cylp_2cy_9CyOsiCuts_CyOsiCuts(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ - static PyObject *__pyx_slice_; - static PyObject *__pyx_tuple__2; - static PyObject *__pyx_tuple__3; - static PyObject *__pyx_tuple__4; - static PyObject *__pyx_tuple__5; --static PyObject *__pyx_tuple__6; --static PyObject *__pyx_tuple__7; --static PyObject *__pyx_tuple__8; --static PyObject *__pyx_tuple__9; --static PyObject *__pyx_tuple__10; - /* Late includes */ - - /* "cylp/cy/CyOsiCuts.pyx":10 -@@ -1968,6 +2034,9 @@ static int __pyx_pf_4cylp_2cy_9CyOsiCuts_9CyOsiCuts___cinit__(struct __pyx_obj_4 - int __pyx_r; - __Pyx_RefNannyDeclarations - CppOsiCuts *__pyx_t_1; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__cinit__", 0); - - /* "cylp/cy/CyOsiCuts.pyx":11 -@@ -2125,6 +2194,9 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyOsiCuts_9CyOsiCuts_15numberOfRowCuts___ge - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyOsiCuts.pyx":22 -@@ -2185,6 +2257,9 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyOsiCuts_9CyOsiCuts_18numberOfColumnCuts__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyOsiCuts.pyx":26 -@@ -2245,6 +2320,9 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyOsiCuts_9CyOsiCuts_12numberOfCuts___get__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyOsiCuts.pyx":30 -@@ -2294,6 +2372,9 @@ static char __pyx_doc_4cylp_2cy_9CyOsiCuts_9CyOsiCuts_4addColumnCut[] = "\n - static PyObject *__pyx_pw_4cylp_2cy_9CyOsiCuts_9CyOsiCuts_5addColumnCut(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_cut = 0; - PyObject *__pyx_v_cyLpModel = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("addColumnCut (wrapper)", 0); -@@ -2386,6 +2467,9 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyOsiCuts_9CyOsiCuts_4addColumnCut(struct _ - int __pyx_t_10; - PyObject *__pyx_t_11 = NULL; - PyObject *(*__pyx_t_12)(PyObject *); -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("addColumnCut", 0); - __pyx_pybuffer_vl_inds.pybuffer.buf = NULL; - __pyx_pybuffer_vl_inds.refcount = 0; -@@ -2909,6 +2993,9 @@ static char __pyx_doc_4cylp_2cy_9CyOsiCuts_9CyOsiCuts_6addRowCut[] = "\n - static PyObject *__pyx_pw_4cylp_2cy_9CyOsiCuts_9CyOsiCuts_7addRowCut(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_cut = 0; - PyObject *__pyx_v_cyLpModel = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("addRowCut (wrapper)", 0); -@@ -3004,6 +3091,9 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyOsiCuts_9CyOsiCuts_6addRowCut(struct __py - Py_ssize_t __pyx_t_19; - double __pyx_t_20; - double __pyx_t_21; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("addRowCut", 0); - __pyx_pybuffer_row_inds.pybuffer.buf = NULL; - __pyx_pybuffer_row_inds.refcount = 0; -@@ -3561,6 +3651,9 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyOsiCuts_9CyOsiCuts_8__reduce_cython__(CYT - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -3615,6 +3708,9 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyOsiCuts_9CyOsiCuts_10__setstate_cython__( - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -3645,863 +3741,7 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyOsiCuts_9CyOsiCuts_10__setstate_cython__( - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); -- __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_v_i; -- int __pyx_v_ndim; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- int __pyx_v_t; -- char *__pyx_v_f; -- PyArray_Descr *__pyx_v_descr = 0; -- int __pyx_v_offset; -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- int __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- int __pyx_t_4; -- int __pyx_t_5; -- int __pyx_t_6; -- PyArray_Descr *__pyx_t_7; -- PyObject *__pyx_t_8 = NULL; -- char *__pyx_t_9; -- if (__pyx_v_info == NULL) { -- PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); -- return -1; -- } -- __Pyx_RefNannySetupContext("__getbuffer__", 0); -- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); -- __Pyx_GIVEREF(__pyx_v_info->obj); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":265 -- * -- * cdef int i, ndim -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":266 -- * cdef int i, ndim -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * -- * ndim = PyArray_NDIM(self) -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":268 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- */ -- __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L4_bool_binop_done; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":271 -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not C contiguous") -- * -- */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L4_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 272, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L7_bool_binop_done; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":275 -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not Fortran contiguous") -- * -- */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 276, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":278 -- * raise ValueError(u"ndarray is not Fortran contiguous") -- * -- * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":279 -- * -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * # Allocate new buffer for strides and shape info. -- */ -- __pyx_v_info->ndim = __pyx_v_ndim; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":283 -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- */ -- __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":284 -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim # <<<<<<<<<<<<<< -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- */ -- __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":285 -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim -- * for i in range(ndim): # <<<<<<<<<<<<<< -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] -- */ -- __pyx_t_4 = __pyx_v_ndim; -- __pyx_t_5 = __pyx_t_4; -- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { -- __pyx_v_i = __pyx_t_6; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":286 -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- */ -- (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":287 -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< -- * else: -- * info.strides = PyArray_STRIDES(self) -- */ -- (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- goto __pyx_L9; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":289 -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- */ -- /*else*/ { -- __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":290 -- * else: -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- */ -- __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); -- } -- __pyx_L9:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":291 -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL # <<<<<<<<<<<<<< -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) -- */ -- __pyx_v_info->suboffsets = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":292 -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< -- * info.readonly = not PyArray_ISWRITEABLE(self) -- * -- */ -- __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":293 -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< -- * -- * cdef int t -- */ -- __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":296 -- * -- * cdef int t -- * cdef char* f = NULL # <<<<<<<<<<<<<< -- * cdef dtype descr = PyArray_DESCR(self) -- * cdef int offset -- */ -- __pyx_v_f = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":297 -- * cdef int t -- * cdef char* f = NULL -- * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< -- * cdef int offset -- * -- */ -- __pyx_t_7 = PyArray_DESCR(__pyx_v_self); -- __pyx_t_3 = ((PyObject *)__pyx_t_7); -- __Pyx_INCREF(__pyx_t_3); -- __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":300 -- * cdef int offset -- * -- * info.obj = self # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(descr): -- */ -- __Pyx_INCREF(((PyObject *)__pyx_v_self)); -- __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); -- __pyx_v_info->obj = ((PyObject *)__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":303 -- * -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num # <<<<<<<<<<<<<< -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- */ -- __pyx_t_4 = __pyx_v_descr->type_num; -- __pyx_v_t = __pyx_t_4; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); -- if (!__pyx_t_2) { -- goto __pyx_L15_next_or; -- } else { -- } -- __pyx_t_2 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_L15_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":305 -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L14_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 306, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":307 -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- */ -- switch (__pyx_v_t) { -- case NPY_BYTE: -- __pyx_v_f = ((char *)"b"); -- break; -- case NPY_UBYTE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":308 -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- */ -- __pyx_v_f = ((char *)"B"); -- break; -- case NPY_SHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":309 -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- */ -- __pyx_v_f = ((char *)"h"); -- break; -- case NPY_USHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":310 -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- */ -- __pyx_v_f = ((char *)"H"); -- break; -- case NPY_INT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":311 -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- */ -- __pyx_v_f = ((char *)"i"); -- break; -- case NPY_UINT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":312 -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- */ -- __pyx_v_f = ((char *)"I"); -- break; -- case NPY_LONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":313 -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- */ -- __pyx_v_f = ((char *)"l"); -- break; -- case NPY_ULONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":314 -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- */ -- __pyx_v_f = ((char *)"L"); -- break; -- case NPY_LONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":315 -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- */ -- __pyx_v_f = ((char *)"q"); -- break; -- case NPY_ULONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":316 -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- */ -- __pyx_v_f = ((char *)"Q"); -- break; -- case NPY_FLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":317 -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- */ -- __pyx_v_f = ((char *)"f"); -- break; -- case NPY_DOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":318 -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- */ -- __pyx_v_f = ((char *)"d"); -- break; -- case NPY_LONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":319 -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- */ -- __pyx_v_f = ((char *)"g"); -- break; -- case NPY_CFLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":320 -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- */ -- __pyx_v_f = ((char *)"Zf"); -- break; -- case NPY_CDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":321 -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" -- */ -- __pyx_v_f = ((char *)"Zd"); -- break; -- case NPY_CLONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":322 -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f = "O" -- * else: -- */ -- __pyx_v_f = ((char *)"Zg"); -- break; -- case NPY_OBJECT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":323 -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_v_f = ((char *)"O"); -- break; -- default: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":325 -- * elif t == NPY_OBJECT: f = "O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * info.format = f -- * return -- */ -- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_8); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 325, __pyx_L1_error) -- break; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":326 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f # <<<<<<<<<<<<<< -- * return -- * else: -- */ -- __pyx_v_info->format = __pyx_v_f; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":327 -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f -- * return # <<<<<<<<<<<<<< -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- */ -- __pyx_r = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":329 -- * return -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- */ -- /*else*/ { -- __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":330 -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, -- */ -- (__pyx_v_info->format[0]) = '^'; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":331 -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 # <<<<<<<<<<<<<< -- * f = _util_dtypestring(descr, info.format + 1, -- * info.format + _buffer_format_string_len, -- */ -- __pyx_v_offset = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":332 -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< -- * info.format + _buffer_format_string_len, -- * &offset) -- */ -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":335 -- * info.format + _buffer_format_string_len, -- * &offset) -- * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- */ -- (__pyx_v_f[0]) = '\x00'; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- -- /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; -- if (__pyx_v_info->obj != NULL) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- goto __pyx_L2; -- __pyx_L0:; -- if (__pyx_v_info->obj == Py_None) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- __pyx_L2:; -- __Pyx_XDECREF((PyObject *)__pyx_v_descr); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); -- __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("__releasebuffer__", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":339 -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) -- */ -- PyObject_Free(__pyx_v_info->format); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":341 -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) # <<<<<<<<<<<<<< -- * # info.shape was stored after info.strides in the same block -- * -- */ -- PyObject_Free(__pyx_v_info->strides); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -@@ -4513,9 +3753,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":822 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":736 - * - * cdef inline object PyArray_MultiIterNew1(a): - * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< -@@ -4523,13 +3766,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - * cdef inline object PyArray_MultiIterNew2(a, b): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -@@ -4548,7 +3791,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -@@ -4560,9 +3803,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":825 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":739 - * - * cdef inline object PyArray_MultiIterNew2(a, b): - * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< -@@ -4570,13 +3816,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - * cdef inline object PyArray_MultiIterNew3(a, b, c): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -@@ -4595,7 +3841,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -@@ -4607,9 +3853,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":828 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":742 - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): - * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< -@@ -4617,13 +3866,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -@@ -4642,7 +3891,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -4654,9 +3903,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":831 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":745 - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -@@ -4664,13 +3916,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -4689,7 +3941,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -4701,9 +3953,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":834 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":748 - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< -@@ -4711,13 +3966,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - * cdef inline tuple PyDataType_SHAPE(dtype d): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -4736,7 +3991,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -4750,7 +4005,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - int __pyx_t_1; - __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -4760,7 +4015,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":838 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":752 - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): - * return d.subarray.shape # <<<<<<<<<<<<<< -@@ -4772,7 +4027,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -4781,12 +4036,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":840 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":754 - * return d.subarray.shape - * else: - * return () # <<<<<<<<<<<<<< - * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: -+ * - */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); -@@ -4795,7 +4050,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - goto __pyx_L0; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -4810,754 +4065,8 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { -- PyArray_Descr *__pyx_v_child = 0; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- PyObject *__pyx_v_fields = 0; -- PyObject *__pyx_v_childname = NULL; -- PyObject *__pyx_v_new_offset = NULL; -- PyObject *__pyx_v_t = NULL; -- char *__pyx_r; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- Py_ssize_t __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- PyObject *__pyx_t_4 = NULL; -- int __pyx_t_5; -- int __pyx_t_6; -- int __pyx_t_7; -- long __pyx_t_8; -- char *__pyx_t_9; -- __Pyx_RefNannySetupContext("_util_dtypestring", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":847 -- * -- * cdef dtype child -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * cdef tuple fields -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":848 -- * cdef dtype child -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * cdef tuple fields -- * -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- if (unlikely(__pyx_v_descr->names == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -- __PYX_ERR(2, 851, __pyx_L1_error) -- } -- __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; -- for (;;) { -- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 851, __pyx_L1_error) -- #else -- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- #endif -- __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":852 -- * -- * for childname in descr.names: -- * fields = descr.fields[childname] # <<<<<<<<<<<<<< -- * child, new_offset = fields -- * -- */ -- if (unlikely(__pyx_v_descr->fields == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); -- __PYX_ERR(2, 852, __pyx_L1_error) -- } -- __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":853 -- * for childname in descr.names: -- * fields = descr.fields[childname] -- * child, new_offset = fields # <<<<<<<<<<<<<< -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- */ -- if (likely(__pyx_v_fields != Py_None)) { -- PyObject* sequence = __pyx_v_fields; -- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); -- if (unlikely(size != 2)) { -- if (size > 2) __Pyx_RaiseTooManyValuesError(2); -- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); -- __PYX_ERR(2, 853, __pyx_L1_error) -- } -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); -- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); -- __Pyx_INCREF(__pyx_t_3); -- __Pyx_INCREF(__pyx_t_4); -- #else -- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- #endif -- } else { -- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error) -- } -- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); -- __pyx_t_3 = 0; -- __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 856, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); -- if (!__pyx_t_7) { -- goto __pyx_L8_next_or; -- } else { -- } -- __pyx_t_7 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_L8_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":859 -- * -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * # One could encode it in the format string and have Cython -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); -- if (__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_6 = __pyx_t_7; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":860 -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * # One could encode it in the format string and have Cython -- * # complain instead, BUT: < and > in format strings also imply -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 860, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":870 -- * -- * # Output padding bytes -- * while offset[0] < new_offset: # <<<<<<<<<<<<<< -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- */ -- while (1) { -- __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (!__pyx_t_6) break; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":871 -- * # Output padding bytes -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< -- * f += 1 -- * offset[0] += 1 -- */ -- (__pyx_v_f[0]) = 0x78; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":872 -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte -- * f += 1 # <<<<<<<<<<<<<< -- * offset[0] += 1 -- * -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":873 -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- * offset[0] += 1 # <<<<<<<<<<<<<< -- * -- * offset[0] += child.itemsize -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":875 -- * offset[0] += 1 -- * -- * offset[0] += child.itemsize # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(child): -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); -- if (__pyx_t_6) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":878 -- * -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num # <<<<<<<<<<<<<< -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 880, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":883 -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 98; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":884 -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":885 -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x68; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":886 -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 72; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":887 -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x69; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":888 -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 73; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":889 -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x6C; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":890 -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 76; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":891 -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x71; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":892 -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 81; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":893 -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":894 -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x64; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":895 -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x67; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":896 -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x66; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":897 -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x64; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":898 -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x67; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":899 -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (likely(__pyx_t_6)) { -- (__pyx_v_f[0]) = 79; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":901 -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * f += 1 -- * else: -- */ -- /*else*/ { -- __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 901, __pyx_L1_error) -- } -- __pyx_L15:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":902 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * f += 1 # <<<<<<<<<<<<<< -- * else: -- * # Cython ignores struct boundary information ("T{...}"), -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- goto __pyx_L13; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":906 -- * # Cython ignores struct boundary information ("T{...}"), -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< -- * return f -- * -- */ -- /*else*/ { -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 906, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- } -- __pyx_L13:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- } -- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":907 -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) -- * return f # <<<<<<<<<<<<<< -- * -- * -- */ -- __pyx_r = __pyx_v_f; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_4); -- __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = NULL; -- __pyx_L0:; -- __Pyx_XDECREF((PyObject *)__pyx_v_child); -- __Pyx_XDECREF(__pyx_v_fields); -- __Pyx_XDECREF(__pyx_v_childname); -- __Pyx_XDECREF(__pyx_v_new_offset); -- __Pyx_XDECREF(__pyx_v_t); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -- * int _import_umath() except -1 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 -+ * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< - * Py_INCREF(base) # important to do this before stealing the reference below! -@@ -5568,7 +4077,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("set_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1023 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":930 - * - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< -@@ -5577,7 +4086,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - Py_INCREF(__pyx_v_base); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1024 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":931 - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< -@@ -5586,7 +4095,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -5598,7 +4107,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyFinishContext(); - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5613,7 +4122,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - int __pyx_t_1; - __Pyx_RefNannySetupContext("get_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1027 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":934 - * - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< -@@ -5622,7 +4131,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - __pyx_v_base = PyArray_BASE(__pyx_v_arr); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5632,7 +4141,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_t_1 = ((__pyx_v_base == NULL) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1029 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":936 - * base = PyArray_BASE(arr) - * if base is NULL: - * return None # <<<<<<<<<<<<<< -@@ -5643,7 +4152,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5652,7 +4161,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1030 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":937 - * if base is NULL: - * return None - * return base # <<<<<<<<<<<<<< -@@ -5664,7 +4173,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = ((PyObject *)__pyx_v_base); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5679,12 +4188,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { -@@ -5698,13 +4207,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_array", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - { -@@ -5716,20 +4228,20 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1036 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":943 - * cdef inline int import_array() except -1: - * try: -- * _import_array() # <<<<<<<<<<<<<< -+ * __pyx_import_array() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") - */ -- __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error) -+ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - } -@@ -5739,9 +4251,9 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1037 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":944 - * try: -- * _import_array() -+ * __pyx_import_array() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.multiarray failed to import") - * -@@ -5749,32 +4261,32 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __PYX_ERR(2, 945, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - __Pyx_XGIVEREF(__pyx_t_1); -@@ -5785,12 +4297,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - /* function exit code */ -@@ -5808,7 +4320,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -5827,9 +4339,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_umath", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5845,16 +4360,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1042 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":949 - * cdef inline int import_umath() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5868,7 +4383,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1043 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":950 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< -@@ -5878,28 +4393,28 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __PYX_ERR(2, 951, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5914,7 +4429,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -5937,7 +4452,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -5956,9 +4471,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_ufunc", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5974,16 +4492,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1048 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":955 - * cdef inline int import_ufunc() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5997,35 +4515,38 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1049 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":956 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") -+ * - */ - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1050 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":957 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -+ * -+ * cdef extern from *: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __PYX_ERR(2, 957, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -6040,7 +4561,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -6062,6 +4583,180 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_RefNannyFinishContext(); - return __pyx_r; - } -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_timedelta64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":979 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_datetime64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":994 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { -+ npy_datetime __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1004 -+ * also needed. That can be found using `get_datetime64_unit`. -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { -+ npy_timedelta __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1011 -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { -+ NPY_DATETIMEUNIT __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1018 -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ * """ -+ * return (obj).obmeta.base # <<<<<<<<<<<<<< -+ */ -+ __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} - static struct __pyx_vtabstruct_4cylp_2cy_9CyOsiCuts_CyOsiCuts __pyx_vtable_4cylp_2cy_9CyOsiCuts_CyOsiCuts; - - static PyObject *__pyx_tp_new_4cylp_2cy_9CyOsiCuts_CyOsiCuts(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { -@@ -6125,7 +4820,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_9CyOsiCuts_CyOsiCuts = { - sizeof(struct __pyx_obj_4cylp_2cy_9CyOsiCuts_CyOsiCuts), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_9CyOsiCuts_CyOsiCuts, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -6178,6 +4878,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_9CyOsiCuts_CyOsiCuts = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyMethodDef __pyx_methods[] = { -@@ -6228,13 +4934,8 @@ static struct PyModuleDef __pyx_moduledef = { - static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_CyLPModel, __pyx_k_CyLPModel, sizeof(__pyx_k_CyLPModel), 0, 0, 1, 1}, - {&__pyx_n_s_CyOsiCuts, __pyx_k_CyOsiCuts, sizeof(__pyx_k_CyOsiCuts), 0, 0, 1, 1}, -- {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, - {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, -- {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, -- {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, - {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, -- {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_n_s_addVariable, __pyx_k_addVariable, sizeof(__pyx_k_addVariable), 0, 0, 1, 1}, - {&__pyx_n_s_arange, __pyx_k_arange, sizeof(__pyx_k_arange), 0, 0, 1, 1}, - {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, -@@ -6255,8 +4956,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_makeMatrices, __pyx_k_makeMatrices, sizeof(__pyx_k_makeMatrices), 0, 0, 1, 1}, - {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, - {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1}, -- {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, -- {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, - {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, - {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, - {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, -@@ -6273,7 +4972,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, - {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1}, - {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, -- {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, - {&__pyx_n_s_variables, __pyx_k_variables, sizeof(__pyx_k_variables), 0, 0, 1, 1}, - {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1}, - {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1}, -@@ -6286,10 +4984,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(0, 70, __pyx_L1_error) - #endif - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) -- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error) -- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(2, 285, __pyx_L1_error) -- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 856, __pyx_L1_error) -- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error) -+ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 945, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -@@ -6329,82 +5024,27 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_GOTREF(__pyx_tuple__3); - __Pyx_GIVEREF(__pyx_tuple__3); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__4); -- __Pyx_GIVEREF(__pyx_tuple__4); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__5); -- __Pyx_GIVEREF(__pyx_tuple__5); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__6); -- __Pyx_GIVEREF(__pyx_tuple__6); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__7); -- __Pyx_GIVEREF(__pyx_tuple__7); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__8); -- __Pyx_GIVEREF(__pyx_tuple__8); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 1038, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__9); -- __Pyx_GIVEREF(__pyx_tuple__9); -+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 945, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__4); -+ __Pyx_GIVEREF(__pyx_tuple__4); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(2, 1044, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__10); -- __Pyx_GIVEREF(__pyx_tuple__10); -+ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 951, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__5); -+ __Pyx_GIVEREF(__pyx_tuple__5); - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -6453,6 +5093,9 @@ static int __Pyx_modinit_function_export_code(void) { - - static int __Pyx_modinit_type_init_code(void) { - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); - /*--- Type init code ---*/ - __pyx_vtabptr_4cylp_2cy_9CyOsiCuts_CyOsiCuts = &__pyx_vtable_4cylp_2cy_9CyOsiCuts_CyOsiCuts; -@@ -6478,6 +5121,9 @@ static int __Pyx_modinit_type_init_code(void) { - static int __Pyx_modinit_type_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); - /*--- Type import code ---*/ - __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) -@@ -6491,18 +5137,38 @@ static int __Pyx_modinit_type_import_code(void) { - __Pyx_ImportType_CheckSize_Warn); - if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(3, 9, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) -+ __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error) -- __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error) -- __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error) -+ __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error) -+ __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error) -- __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error) -+ __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error) -+ __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error) -+ __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error) -+ __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error) -+ __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error) -+ __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error) -+ __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error) -+ __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error) -+ __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error) -+ __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error) -+ __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_RefNannyFinishContext(); - return 0; -@@ -6529,17 +5195,19 @@ static int __Pyx_modinit_function_import_code(void) { - } - - --#if PY_MAJOR_VERSION < 3 --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC void --#else -+#ifndef CYTHON_NO_PYINIT_EXPORT - #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#elif PY_MAJOR_VERSION < 3 -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" void -+#else -+#define __Pyx_PyMODINIT_FUNC void - #endif - #else --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC PyObject * -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * - #else --#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#define __Pyx_PyMODINIT_FUNC PyObject * - #endif - #endif - -@@ -6622,6 +5290,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_CyOsiCuts(PyObject *__pyx_pyinit_m - { - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannyDeclarations - #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m) { -@@ -6669,11 +5340,9 @@ if (!__Pyx_RefNanny) { - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ -- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS -- #ifdef WITH_THREAD /* Python build with threading support? */ -+ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - PyEval_InitThreads(); - #endif -- #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; -@@ -6710,15 +5379,15 @@ if (!__Pyx_RefNanny) { - } - #endif - /*--- Builtin init code ---*/ -- if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - /*--- Constants init code ---*/ -- if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - /*--- Global type/function init code ---*/ - (void)__Pyx_modinit_global_init_code(); - (void)__Pyx_modinit_variable_export_code(); - (void)__Pyx_modinit_function_export_code(); -- if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; -- if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) -+ if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) - (void)__Pyx_modinit_variable_import_code(); - (void)__Pyx_modinit_function_import_code(); - /*--- Execution code ---*/ -@@ -6799,12 +5468,12 @@ if (!__Pyx_RefNanny) { - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -- * raise ImportError("numpy.core.umath failed to import") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - - /*--- Wrapped vars code ---*/ -@@ -6980,7 +5649,7 @@ static int __Pyx_ParseOptionalKeywords( - } - name = first_kw_arg; - #if PY_MAJOR_VERSION < 3 -- if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { -+ if (likely(PyString_Check(key))) { - while (*name) { - if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) - && _PyString_Eq(**name, key)) { -@@ -7007,7 +5676,7 @@ static int __Pyx_ParseOptionalKeywords( - while (*name) { - int cmp = (**name == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 -- (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : -+ (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**name, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; -@@ -7023,7 +5692,7 @@ static int __Pyx_ParseOptionalKeywords( - while (argname != first_kw_arg) { - int cmp = (**argname == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 -- (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : -+ (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**argname, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; -@@ -7244,7 +5913,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #if CYTHON_COMPILING_IN_CPYTHON - static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; -- ternaryfunc call = func->ob_type->tp_call; -+ ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -@@ -7347,7 +6016,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec - if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { - return __Pyx_PyObject_CallMethO(func, arg); - #if CYTHON_FAST_PYCCALL -- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { -+ } else if (__Pyx_PyFastCFunction_Check(func)) { - return __Pyx_PyCFunction_FastCall(func, &arg, 1); - #endif - } -@@ -7534,6 +6203,7 @@ static void __Pyx_BufFmt_RaiseUnexpectedChar(char ch) { - } - static const char* __Pyx_BufFmt_DescribeTypeChar(char ch, int is_complex) { - switch (ch) { -+ case '?': return "'bool'"; - case 'c': return "'char'"; - case 'b': return "'signed char'"; - case 'B': return "'unsigned char'"; -@@ -7576,7 +6246,7 @@ static size_t __Pyx_BufFmt_TypeCharToStandardSize(char ch, int is_complex) { - } - static size_t __Pyx_BufFmt_TypeCharToNativeSize(char ch, int is_complex) { - switch (ch) { -- case 'c': case 'b': case 'B': case 's': case 'p': return 1; -+ case '?': case 'c': case 'b': case 'B': case 's': case 'p': return 1; - case 'h': case 'H': return sizeof(short); - case 'i': case 'I': return sizeof(int); - case 'l': case 'L': return sizeof(long); -@@ -7660,7 +6330,7 @@ static char __Pyx_BufFmt_TypeCharToGroup(char ch, int is_complex) { - case 'b': case 'h': case 'i': - case 'l': case 'q': case 's': case 'p': - return 'I'; -- case 'B': case 'H': case 'I': case 'L': case 'Q': -+ case '?': case 'B': case 'H': case 'I': case 'L': case 'Q': - return 'U'; - case 'f': case 'd': case 'g': - return (is_complex ? 'C' : 'R'); -@@ -7804,9 +6474,7 @@ static PyObject * - __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) - { - const char *ts = *tsp; -- int i = 0, number; -- int ndim = ctx->head->field->type->ndim; --; -+ int i = 0, number, ndim; - ++ts; - if (ctx->new_count != 1) { - PyErr_SetString(PyExc_ValueError, -@@ -7814,6 +6482,7 @@ __pyx_buffmt_parse_array(__Pyx_BufFmt_Context* ctx, const char** tsp) - return NULL; - } - if (__Pyx_BufFmt_ProcessTypeChunk(ctx) == -1) return NULL; -+ ndim = ctx->head->field->type->ndim; - while (*ts && *ts != ')') { - switch (*ts) { - case ' ': case '\f': case '\r': case '\n': case '\t': case '\v': continue; -@@ -7939,12 +6608,12 @@ static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const cha - return NULL; - } - CYTHON_FALLTHROUGH; -- case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': -+ case '?': case 'c': case 'b': case 'B': case 'h': case 'H': case 'i': case 'I': - case 'l': case 'L': case 'q': case 'Q': - case 'f': case 'd': case 'g': - case 'O': case 'p': -- if (ctx->enc_type == *ts && got_Z == ctx->is_complex && -- ctx->enc_packmode == ctx->new_packmode) { -+ if ((ctx->enc_type == *ts) && (got_Z == ctx->is_complex) && -+ (ctx->enc_packmode == ctx->new_packmode) && (!ctx->is_valid_array)) { - ctx->enc_count += ctx->new_count; - ctx->new_count = 1; - got_Z = 0; -@@ -8332,35 +7001,6 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject - } - #endif - --/* DictGetItem */ -- #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { -- PyObject *value; -- value = PyDict_GetItemWithError(d, key); -- if (unlikely(!value)) { -- if (!PyErr_Occurred()) { -- if (unlikely(PyTuple_Check(key))) { -- PyObject* args = PyTuple_Pack(1, key); -- if (likely(args)) { -- PyErr_SetObject(PyExc_KeyError, args); -- Py_DECREF(args); -- } -- } else { -- PyErr_SetObject(PyExc_KeyError, key); -- } -- } -- return NULL; -- } -- Py_INCREF(value); -- return value; --} --#endif -- --/* RaiseNoneIterError */ -- static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); --} -- - /* GetTopmostException */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * -@@ -8584,6 +7224,28 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - return -1; - } - -+/* PyObjectGetAttrStrNoError */ -+ static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { -+ __Pyx_PyThreadState_declare -+ __Pyx_PyThreadState_assign -+ if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) -+ __Pyx_PyErr_Clear(); -+} -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { -+ PyObject *result; -+#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 -+ PyTypeObject* tp = Py_TYPE(obj); -+ if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { -+ return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); -+ } -+#endif -+ result = __Pyx_PyObject_GetAttrStr(obj, attr_name); -+ if (unlikely(!result)) { -+ __Pyx_PyObject_GetAttrStr_ClearAttributeError(); -+ } -+ return result; -+} -+ - /* SetupReduce */ - static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { - int ret; -@@ -8611,43 +7273,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { - PyObject *setstate = NULL; - PyObject *setstate_cython = NULL; - #if CYTHON_USE_PYTYPE_LOOKUP -- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #else -- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #endif - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #else -- object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #endif -- reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; -+ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; - if (reduce_ex == object_reduce_ex) { - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #else -- object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #endif -- reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; -+ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; - if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { -- reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; -+ reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); -+ if (likely(reduce_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (reduce == object_reduce || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); - if (!setstate) PyErr_Clear(); - if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { -- setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; -+ setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); -+ if (likely(setstate_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (!setstate || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - } - PyType_Modified((PyTypeObject*)type_obj); - } - } -- goto GOOD; --BAD: -+ goto __PYX_GOOD; -+__PYX_BAD: - if (!PyErr_Occurred()) - PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); - ret = -1; --GOOD: -+__PYX_GOOD: - #if !CYTHON_USE_PYTYPE_LOOKUP - Py_XDECREF(object_reduce); - Py_XDECREF(object_reduce_ex); -@@ -8751,7 +7421,7 @@ static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, - { - #if PY_MAJOR_VERSION >= 3 - if (level == -1) { -- if (strchr(__Pyx_MODULE_NAME, '.')) { -+ if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { - module = PyImport_ImportModuleLevelObject( - name, global_dict, empty_dict, list, 1); - if (!module) { -@@ -8802,7 +7472,7 @@ static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, - - /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK --static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { -+static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { - PyObject *use_cline; - PyObject *ptype, *pvalue, *ptraceback; - #if CYTHON_COMPILING_IN_CPYTHON -@@ -8832,7 +7502,7 @@ static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { - } - if (!use_cline) { - c_line = 0; -- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); -+ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; -@@ -8906,7 +7576,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - if (__pyx_code_cache.count == __pyx_code_cache.max_count) { - int new_max = __pyx_code_cache.max_count + 64; - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( -- __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); -+ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); - if (unlikely(!entries)) { - return; - } -@@ -8929,30 +7599,31 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { -- PyCodeObject *py_code = 0; -- PyObject *py_srcfile = 0; -- PyObject *py_funcname = 0; -+ PyCodeObject *py_code = NULL; -+ PyObject *py_funcname = NULL; - #if PY_MAJOR_VERSION < 3 -+ PyObject *py_srcfile = NULL; - py_srcfile = PyString_FromString(filename); -- #else -- py_srcfile = PyUnicode_FromString(filename); -- #endif - if (!py_srcfile) goto bad; -+ #endif - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; -+ funcname = PyUnicode_AsUTF8(py_funcname); -+ if (!funcname) goto bad; - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); -- #else -- py_funcname = PyUnicode_FromString(funcname); -+ if (!py_funcname) goto bad; - #endif - } -- if (!py_funcname) goto bad; -+ #if PY_MAJOR_VERSION < 3 - py_code = __Pyx_PyCode_New( - 0, - 0, -@@ -8971,11 +7642,16 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - __pyx_empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); -- Py_DECREF(py_funcname); -+ #else -+ py_code = PyCode_NewEmpty(filename, funcname, py_line); -+ #endif -+ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline - return py_code; - bad: -- Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -+ #if PY_MAJOR_VERSION < 3 -+ Py_XDECREF(py_srcfile); -+ #endif - return NULL; - } - static void __Pyx_AddTraceback(const char *funcname, int c_line, -@@ -9010,7 +7686,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - #if PY_MAJOR_VERSION < 3 - static int __Pyx_GetBuffer(PyObject *obj, Py_buffer *view, int flags) { - if (PyObject_CheckBuffer(obj)) return PyObject_GetBuffer(obj, view, flags); -- if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) return __pyx_pw_5numpy_7ndarray_1__getbuffer__(obj, view, flags); - PyErr_Format(PyExc_TypeError, "'%.200s' does not have the buffer interface", Py_TYPE(obj)->tp_name); - return -1; - } -@@ -9022,76 +7697,13 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - return; - } - if ((0)) {} -- else if (__Pyx_TypeCheck(obj, __pyx_ptype_5numpy_ndarray)) __pyx_pw_5numpy_7ndarray_3__releasebuffer__(obj, view); - view->obj = NULL; - Py_DECREF(obj); - } - #endif - - -- /* CIntToPy */ -- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(int) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(int) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(int) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(int), -- little, !is_unsigned); -- } --} -- --/* CIntToPy */ -- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(long) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(long) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(long) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(long), -- little, !is_unsigned); -- } --} -- --/* Declarations */ -+ /* Declarations */ - #if CYTHON_CCOMPLEX - #ifdef __cplusplus - static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { -@@ -9208,7 +7820,6 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_float(a, a); - return __Pyx_c_prod_float(a, a); - case 3: - z = __Pyx_c_prod_float(a, a); -@@ -9363,7 +7974,6 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_double(a, a); - return __Pyx_c_prod_double(a, a); - case 3: - z = __Pyx_c_prod_double(a, a); -@@ -9401,47 +8011,70 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - #endif - #endif - --/* CIntFromPyVerify */ -- #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ -- __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) --#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ -- __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) --#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ -- {\ -- func_type value = func_value;\ -- if (sizeof(target_type) < sizeof(func_type)) {\ -- if (unlikely(value != (func_type) (target_type) value)) {\ -- func_type zero = 0;\ -- if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ -- return (target_type) -1;\ -- if (is_unsigned && unlikely(value < zero))\ -- goto raise_neg_overflow;\ -- else\ -- goto raise_overflow;\ -- }\ -- }\ -- return (target_type) value;\ -+/* CIntToPy */ -+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif -+ const int is_unsigned = neg_one > const_zero; -+ if (is_unsigned) { -+ if (sizeof(int) < sizeof(long)) { -+ return PyInt_FromLong((long) value); -+ } else if (sizeof(int) <= sizeof(unsigned long)) { -+ return PyLong_FromUnsignedLong((unsigned long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+#endif -+ } -+ } else { -+ if (sizeof(int) <= sizeof(long)) { -+ return PyInt_FromLong((long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ return PyLong_FromLongLong((PY_LONG_LONG) value); -+#endif -+ } -+ } -+ { -+ int one = 1; int little = (int)*(unsigned char *)&one; -+ unsigned char *bytes = (unsigned char *)&value; -+ return _PyLong_FromByteArray(bytes, sizeof(int), -+ little, !is_unsigned); - } -+} - - /* CIntToPy */ -- static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { -- const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; -+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { -- if (sizeof(enum NPY_TYPES) < sizeof(long)) { -+ if (sizeof(long) < sizeof(long)) { - return PyInt_FromLong((long) value); -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { -+ } else if (sizeof(long) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); - #ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { -+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); - #endif - } - } else { -- if (sizeof(enum NPY_TYPES) <= sizeof(long)) { -+ if (sizeof(long) <= sizeof(long)) { - return PyInt_FromLong((long) value); - #ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { -+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); - #endif - } -@@ -9449,25 +8082,54 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), -+ return _PyLong_FromByteArray(bytes, sizeof(long), - little, !is_unsigned); - } - } - -+/* CIntFromPyVerify */ -+ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ -+ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) -+#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ -+ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) -+#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ -+ {\ -+ func_type value = func_value;\ -+ if (sizeof(target_type) < sizeof(func_type)) {\ -+ if (unlikely(value != (func_type) (target_type) value)) {\ -+ func_type zero = 0;\ -+ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ -+ return (target_type) -1;\ -+ if (is_unsigned && unlikely(value < zero))\ -+ goto raise_neg_overflow;\ -+ else\ -+ goto raise_overflow;\ -+ }\ -+ }\ -+ return (target_type) value;\ -+ } -+ - /* CIntFromPy */ -- static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -+ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -- if (sizeof(int) < sizeof(long)) { -- __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) -+ if (sizeof(long) < sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } -- return (int) val; -+ return (long) val; - } - } else - #endif -@@ -9476,32 +8138,32 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (int) 0; -- case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) -+ case 0: return (long) 0; -+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) - case 2: -- if (8 * sizeof(int) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { -- return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { -+ return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - case 3: -- if (8 * sizeof(int) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { -- return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { -+ return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - case 4: -- if (8 * sizeof(int) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { -- return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { -+ return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; -@@ -9515,86 +8177,86 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) -- return (int) -1; -+ return (long) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } - #endif -- if (sizeof(int) <= sizeof(unsigned long)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) -+ if (sizeof(long) <= sizeof(unsigned long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) - #endif - } - } else { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (int) 0; -- case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) -- case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) -+ case 0: return (long) 0; -+ case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) -+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) - case -2: -- if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -+ return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 2: -- if (8 * sizeof(int) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -- return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -+ return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case -3: -- if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -+ return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 3: -- if (8 * sizeof(int) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -- return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -+ return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case -4: -- if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -+ return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 4: -- if (8 * sizeof(int) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -- return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -+ return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - } - #endif -- if (sizeof(int) <= sizeof(long)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) -+ if (sizeof(long) <= sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) -+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) - #endif - } - } -@@ -9603,7 +8265,7 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); - #else -- int val; -+ long val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); - #if PY_MAJOR_VERSION < 3 - if (likely(v) && !PyLong_Check(v)) { -@@ -9623,40 +8285,47 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - return val; - } - #endif -- return (int) -1; -+ return (long) -1; - } - } else { -- int val; -+ long val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); -- if (!tmp) return (int) -1; -- val = __Pyx_PyInt_As_int(tmp); -+ if (!tmp) return (long) -1; -+ val = __Pyx_PyInt_As_long(tmp); - Py_DECREF(tmp); - return val; - } - raise_overflow: - PyErr_SetString(PyExc_OverflowError, -- "value too large to convert to int"); -- return (int) -1; -+ "value too large to convert to long"); -+ return (long) -1; - raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, -- "can't convert negative value to int"); -- return (int) -1; -+ "can't convert negative value to long"); -+ return (long) -1; - } - - /* CIntFromPy */ -- static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -- if (sizeof(long) < sizeof(long)) { -- __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) -+ if (sizeof(int) < sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } -- return (long) val; -+ return (int) val; - } - } else - #endif -@@ -9665,32 +8334,32 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (long) 0; -- case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) -+ case 0: return (int) 0; -+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) - case 2: -- if (8 * sizeof(long) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { -- return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { -+ return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; - case 3: -- if (8 * sizeof(long) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { -- return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { -+ return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; - case 4: -- if (8 * sizeof(long) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { -- return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { -+ return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; -@@ -9704,86 +8373,86 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) -- return (long) -1; -+ return (int) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } - #endif -- if (sizeof(long) <= sizeof(unsigned long)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) -+ if (sizeof(int) <= sizeof(unsigned long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) - #endif - } - } else { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (long) 0; -- case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) -- case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) -+ case 0: return (int) 0; -+ case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) -+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) - case -2: -- if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -- return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 2: -- if (8 * sizeof(long) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -- return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case -3: -- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -- return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 3: -- if (8 * sizeof(long) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -- return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case -4: -- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -- return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 4: -- if (8 * sizeof(long) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -- return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -+ return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - } - #endif -- if (sizeof(long) <= sizeof(long)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) -+ if (sizeof(int) <= sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) - #endif - } - } -@@ -9792,7 +8461,7 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); - #else -- long val; -+ int val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); - #if PY_MAJOR_VERSION < 3 - if (likely(v) && !PyLong_Check(v)) { -@@ -9812,24 +8481,24 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) { - return val; - } - #endif -- return (long) -1; -+ return (int) -1; - } - } else { -- long val; -+ int val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); -- if (!tmp) return (long) -1; -- val = __Pyx_PyInt_As_long(tmp); -+ if (!tmp) return (int) -1; -+ val = __Pyx_PyInt_As_int(tmp); - Py_DECREF(tmp); - return val; - } - raise_overflow: - PyErr_SetString(PyExc_OverflowError, -- "value too large to convert to long"); -- return (long) -1; -+ "value too large to convert to int"); -+ return (int) -1; - raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, -- "can't convert negative value to long"); -- return (long) -1; -+ "can't convert negative value to int"); -+ return (int) -1; - } - - /* FastTypeChecks */ -@@ -10196,6 +8865,23 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_DECREF(x); - return ival; - } -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { -+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { -+ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); -+#if PY_MAJOR_VERSION < 3 -+ } else if (likely(PyInt_CheckExact(o))) { -+ return PyInt_AS_LONG(o); -+#endif -+ } else { -+ Py_ssize_t ival; -+ PyObject *x; -+ x = PyNumber_Index(o); -+ if (!x) return -1; -+ ival = PyInt_AsLong(x); -+ Py_DECREF(x); -+ return ival; -+ } -+} - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); - } -diff --git a/cylp/cy/CyOsiSolverInterface.cpp b/cylp/cy/CyOsiSolverInterface.cpp -index e0d5a87..8381cf8 100644 ---- a/cylp/cy/CyOsiSolverInterface.cpp -+++ b/cylp/cy/CyOsiSolverInterface.cpp -@@ -1,14 +1,16 @@ --/* Generated by Cython 0.29.12 */ -+/* Generated by Cython 0.29.25 */ - -+#ifndef PY_SSIZE_T_CLEAN - #define PY_SSIZE_T_CLEAN -+#endif /* PY_SSIZE_T_CLEAN */ - #include "Python.h" - #ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. - #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. - #else --#define CYTHON_ABI "0_29_12" --#define CYTHON_HEX_VERSION 0x001D0CF0 -+#define CYTHON_ABI "0_29_25" -+#define CYTHON_HEX_VERSION 0x001D19F0 - #define CYTHON_FUTURE_DIVISION 0 - #include - #ifndef offsetof -@@ -155,7 +157,7 @@ - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif -- #if PY_VERSION_HEX < 0x030300F0 -+ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) -@@ -174,7 +176,7 @@ - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL -- #define CYTHON_FAST_PYCALL 1 -+ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1) - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) -@@ -193,7 +195,9 @@ - #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) - #endif - #if CYTHON_USE_PYLONG_INTERNALS -- #include "longintrepr.h" -+ #if PY_MAJOR_VERSION < 3 -+ #include "longintrepr.h" -+ #endif - #undef SHIFT - #undef BASE - #undef MASK -@@ -324,9 +328,68 @@ class __Pyx_FakeReference { - #define __Pyx_DefaultClassType PyClass_Type - #else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" --#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 -- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ -- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -+ #define __Pyx_DefaultClassType PyType_Type -+#if PY_VERSION_HEX >= 0x030B00A1 -+ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, -+ PyObject *code, PyObject *c, PyObject* n, PyObject *v, -+ PyObject *fv, PyObject *cell, PyObject* fn, -+ PyObject *name, int fline, PyObject *lnos) { -+ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; -+ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; -+ const char *fn_cstr=NULL; -+ const char *name_cstr=NULL; -+ PyCodeObject* co=NULL; -+ PyObject *type, *value, *traceback; -+ PyErr_Fetch(&type, &value, &traceback); -+ if (!(kwds=PyDict_New())) goto end; -+ if (!(argcount=PyLong_FromLong(a))) goto end; -+ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; -+ if (!(posonlyargcount=PyLong_FromLong(0))) goto end; -+ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; -+ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; -+ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; -+ if (!(nlocals=PyLong_FromLong(l))) goto end; -+ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; -+ if (!(stacksize=PyLong_FromLong(s))) goto end; -+ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; -+ if (!(flags=PyLong_FromLong(f))) goto end; -+ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; -+ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; -+ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; -+ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; -+ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; -+ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here -+ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; -+ Py_XDECREF((PyObject*)co); -+ co = (PyCodeObject*)call_result; -+ call_result = NULL; -+ if (0) { -+ cleanup_code_too: -+ Py_XDECREF((PyObject*)co); -+ co = NULL; -+ } -+ end: -+ Py_XDECREF(kwds); -+ Py_XDECREF(argcount); -+ Py_XDECREF(posonlyargcount); -+ Py_XDECREF(kwonlyargcount); -+ Py_XDECREF(nlocals); -+ Py_XDECREF(stacksize); -+ Py_XDECREF(replace); -+ Py_XDECREF(call_result); -+ Py_XDECREF(empty); -+ if (type) { -+ PyErr_Restore(type, value, traceback); -+ } -+ return co; -+ } - #else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -@@ -440,8 +503,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #endif - #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 -+ #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) -+ #else -+ #define __Pyx_PyUnicode_READY(op) (0) -+ #endif - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) -@@ -449,7 +516,15 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) -+ #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) -+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) -+ #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) -+ #endif -+ #else -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) -+ #endif - #else - #define CYTHON_PEP393_ENABLED 0 - #define PyUnicode_1BYTE_KIND 1 -@@ -498,8 +573,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define PyString_Type PyUnicode_Type - #define PyString_Check PyUnicode_Check - #define PyString_CheckExact PyUnicode_CheckExact -+#ifndef PyObject_Unicode - #define PyObject_Unicode PyObject_Str - #endif -+#endif - #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) - #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) -@@ -510,6 +587,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #ifndef PySet_CheckExact - #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) - #endif -+#if PY_VERSION_HEX >= 0x030900A4 -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) -+#else -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) -+#endif - #if CYTHON_ASSUME_SAFE_MACROS - #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) - #else -@@ -543,13 +627,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong -- #define __Pyx_PyInt_AsHash_t PyInt_AsLong -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t - #else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t -- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t - #endif - #if PY_MAJOR_VERSION >= 3 -- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) -+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) - #else - #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) - #endif -@@ -590,11 +674,10 @@ static CYTHON_INLINE float __PYX_NAN() { - #define __Pyx_truncl truncl - #endif - -- -+#define __PYX_MARK_ERR_POS(f_index, lineno) \ -+ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } - #define __PYX_ERR(f_index, lineno, Ln_error) \ --{ \ -- __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ --} -+ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } - - #ifndef __PYX_EXTERN_C - #ifdef __cplusplus -@@ -615,7 +698,13 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "ClpFactorization.hpp" - #include "IClpPrimalColumnPivotBase.h" - #include "numpy/arrayobject.h" -+#include "numpy/ndarrayobject.h" -+#include "numpy/ndarraytypes.h" -+#include "numpy/arrayscalars.h" - #include "numpy/ufuncobject.h" -+ -+ /* NumPy API declarations from "numpy/__init__.pxd" */ -+ - #include "ClpDualRowPivot.hpp" - #include "IClpDualRowPivotBase.h" - #include "CoinModel.hpp" -@@ -640,11 +729,11 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "ICbcNode.hpp" - #include "CbcCompareUser.hpp" - #include "ICbcModel.hpp" -+#include - #include "ios" - #include "new" - #include "stdexcept" - #include "typeinfo" --#include - #include - #include "IClpSimplex.hpp" - #include "ClpSimplex.hpp" -@@ -746,6 +835,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); - static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); - #if CYTHON_ASSUME_SAFE_MACROS - #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) - #else -@@ -881,23 +971,23 @@ static const char *__pyx_filename; - - static const char *__pyx_f[] = { - "stringsource", -- "cylp\\cy\\CyOsiSolverInterface.pyx", -+ "cylp/cy/CyOsiSolverInterface.pyx", - "__init__.pxd", - "type.pxd", - "bool.pxd", - "complex.pxd", -- "cylp\\cy\\CyCoinIndexedVector.pxd", -- "cylp\\cy\\CyClpPrimalColumnPivotBase.pxd", -- "cylp\\cy\\CyClpDualRowPivotBase.pxd", -- "cylp\\cy\\CyCoinModel.pxd", -- "cylp\\cy\\CyCoinPackedMatrix.pxd", -- "cylp\\cy\\CyCgl.pxd", -- "cylp\\cy\\CyCbcNode.pxd", -- "cylp\\cy\\CyCbcModel.pxd", -- "cylp\\cy\\CyClpSimplex.pxd", -+ "cylp/cy/CyCoinIndexedVector.pxd", -+ "cylp/cy/CyClpPrimalColumnPivotBase.pxd", -+ "cylp/cy/CyClpDualRowPivotBase.pxd", -+ "cylp/cy/CyCoinModel.pxd", -+ "cylp/cy/CyCoinPackedMatrix.pxd", -+ "cylp/cy/CyCgl.pxd", -+ "cylp/cy/CyCbcNode.pxd", -+ "cylp/cy/CyCbcModel.pxd", -+ "cylp/cy/CyClpSimplex.pxd", - }; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":776 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":690 - * # in Cython to enable them only on the right systems. - * - * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< -@@ -906,7 +996,7 @@ static const char *__pyx_f[] = { - */ - typedef npy_int8 __pyx_t_5numpy_int8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":777 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":691 - * - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< -@@ -915,7 +1005,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; - */ - typedef npy_int16 __pyx_t_5numpy_int16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":778 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":692 - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< -@@ -924,7 +1014,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; - */ - typedef npy_int32 __pyx_t_5numpy_int32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":779 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":693 - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t - * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< -@@ -933,7 +1023,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; - */ - typedef npy_int64 __pyx_t_5numpy_int64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":783 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":697 - * #ctypedef npy_int128 int128_t - * - * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< -@@ -942,7 +1032,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; - */ - typedef npy_uint8 __pyx_t_5numpy_uint8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":784 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":698 - * - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< -@@ -951,7 +1041,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; - */ - typedef npy_uint16 __pyx_t_5numpy_uint16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":785 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":699 - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< -@@ -960,7 +1050,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; - */ - typedef npy_uint32 __pyx_t_5numpy_uint32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":786 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":700 - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t - * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< -@@ -969,7 +1059,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; - */ - typedef npy_uint64 __pyx_t_5numpy_uint64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":790 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":704 - * #ctypedef npy_uint128 uint128_t - * - * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< -@@ -978,7 +1068,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; - */ - typedef npy_float32 __pyx_t_5numpy_float32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":791 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":705 - * - * ctypedef npy_float32 float32_t - * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< -@@ -987,7 +1077,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; - */ - typedef npy_float64 __pyx_t_5numpy_float64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":800 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":714 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< -@@ -996,7 +1086,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; - */ - typedef npy_long __pyx_t_5numpy_int_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":801 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":715 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< -@@ -1005,7 +1095,7 @@ typedef npy_long __pyx_t_5numpy_int_t; - */ - typedef npy_longlong __pyx_t_5numpy_long_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":802 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":716 - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t - * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< -@@ -1014,7 +1104,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; - */ - typedef npy_longlong __pyx_t_5numpy_longlong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":804 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":718 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< -@@ -1023,7 +1113,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; - */ - typedef npy_ulong __pyx_t_5numpy_uint_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":805 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":719 - * - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< -@@ -1032,7 +1122,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":806 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":720 - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t - * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< -@@ -1041,7 +1131,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":808 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":722 - * ctypedef npy_ulonglong ulonglong_t - * - * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< -@@ -1050,7 +1140,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - */ - typedef npy_intp __pyx_t_5numpy_intp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":809 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":723 - * - * ctypedef npy_intp intp_t - * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< -@@ -1059,7 +1149,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; - */ - typedef npy_uintp __pyx_t_5numpy_uintp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":811 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":725 - * ctypedef npy_uintp uintp_t - * - * ctypedef npy_double float_t # <<<<<<<<<<<<<< -@@ -1068,7 +1158,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; - */ - typedef npy_double __pyx_t_5numpy_float_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":812 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":726 - * - * ctypedef npy_double float_t - * ctypedef npy_double double_t # <<<<<<<<<<<<<< -@@ -1077,7 +1167,7 @@ typedef npy_double __pyx_t_5numpy_float_t; - */ - typedef npy_double __pyx_t_5numpy_double_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":813 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":727 - * ctypedef npy_double float_t - * ctypedef npy_double double_t - * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< -@@ -1139,7 +1229,7 @@ struct __pyx_obj_4cylp_2cy_12CyClpSimplex_CyClpSimplex; - struct __pyx_obj_4cylp_2cy_12CyClpSimplex_VarStatus; - struct __pyx_obj_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":815 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":729 - * ctypedef npy_longdouble longdouble_t - * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< -@@ -1148,7 +1238,7 @@ struct __pyx_obj_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface; - */ - typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":816 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":730 - * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< -@@ -1157,7 +1247,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - */ - typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":817 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":731 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< -@@ -1166,7 +1256,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - */ - typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":819 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":733 - * ctypedef npy_clongdouble clongdouble_t - * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< -@@ -1840,6 +1930,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #ifndef Py_MEMBER_SIZE - #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) - #endif -+#if CYTHON_FAST_PYCALL - static size_t __pyx_pyframe_localsplus_offset = 0; - #include "frameobject.h" - #define __Pxy_PyFrame_Initialize_Offsets()\ -@@ -1847,6 +1938,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) - #define __Pyx_PyFrame_GetLocalsplus(frame)\ - (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) -+#endif // CYTHON_FAST_PYCALL - #endif - - /* PyObjectCall.proto */ -@@ -1907,39 +1999,6 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - /* RaiseException.proto */ - static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); - --/* PyCFunctionFastCall.proto */ --#if CYTHON_FAST_PYCCALL --static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); --#else --#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) --#endif -- --/* PyObjectCallOneArg.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); -- --/* DictGetItem.proto */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); --#define __Pyx_PyObject_Dict_GetItem(obj, name)\ -- (likely(PyDict_CheckExact(obj)) ?\ -- __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) --#else --#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) --#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) --#endif -- --/* RaiseTooManyValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); -- --/* RaiseNeedMoreValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); -- --/* RaiseNoneIterError.proto */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -- --/* ExtTypeTest.proto */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); -- - /* GetTopmostException.proto */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); -@@ -1989,6 +2048,9 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - /* SetVTable.proto */ - static int __Pyx_SetVtable(PyObject *dict, void *vtable); - -+/* PyObjectGetAttrStrNoError.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); -+ - /* SetupReduce.proto */ - static int __Pyx_setup_reduce(PyObject* type_obj); - -@@ -2156,14 +2218,10 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - #endif - #endif - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -- --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); -- --/* CIntFromPy.proto */ --static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); -+/* GCCDiagnostics.proto */ -+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -+#define __Pyx_HAS_GCC_DIAGNOSTIC -+#endif - - /* CIntToPy.proto */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); -@@ -2171,6 +2229,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); - /* CIntFromPy.proto */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); - -+/* CIntFromPy.proto */ -+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); -+ - /* FastTypeChecks.proto */ - #if CYTHON_COMPILING_IN_CPYTHON - #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) -@@ -2290,8 +2351,17 @@ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; - static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; - static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; - static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -+static PyTypeObject *__pyx_ptype_5numpy_generic = 0; -+static PyTypeObject *__pyx_ptype_5numpy_number = 0; -+static PyTypeObject *__pyx_ptype_5numpy_integer = 0; -+static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; -+static PyTypeObject *__pyx_ptype_5numpy_floating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; -+static PyTypeObject *__pyx_ptype_5numpy_character = 0; - static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ - - /* Module declarations from 'cylp.cy.CyClpDualRowPivotBase' */ - static PyTypeObject *__pyx_ptype_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase = 0; -@@ -2343,78 +2413,50 @@ int __pyx_module_is_main_cylp__cy__CyOsiSolverInterface = 0; - - /* Implementation of 'cylp.cy.CyOsiSolverInterface' */ - static PyObject *__pyx_builtin_TypeError; --static PyObject *__pyx_builtin_ValueError; --static PyObject *__pyx_builtin_range; --static PyObject *__pyx_builtin_RuntimeError; - static PyObject *__pyx_builtin_ImportError; - static const char __pyx_k_main[] = "__main__"; - static const char __pyx_k_name[] = "__name__"; - static const char __pyx_k_test[] = "__test__"; --static const char __pyx_k_range[] = "range"; - static const char __pyx_k_reduce[] = "__reduce__"; - static const char __pyx_k_getstate[] = "__getstate__"; - static const char __pyx_k_setstate[] = "__setstate__"; - static const char __pyx_k_TypeError[] = "TypeError"; - static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; --static const char __pyx_k_ValueError[] = "ValueError"; - static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; - static const char __pyx_k_ImportError[] = "ImportError"; --static const char __pyx_k_RuntimeError[] = "RuntimeError"; - static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; - static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; - static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; - static const char __pyx_k_CyOsiSolverInterface[] = "CyOsiSolverInterface"; --static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; - static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; --static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; --static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; --static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; --static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; - static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; - static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; --static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; - static PyObject *__pyx_n_s_CyOsiSolverInterface; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; - static PyObject *__pyx_n_s_ImportError; --static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; --static PyObject *__pyx_n_s_RuntimeError; - static PyObject *__pyx_n_s_TypeError; --static PyObject *__pyx_n_s_ValueError; - static PyObject *__pyx_n_s_cline_in_traceback; - static PyObject *__pyx_n_s_getstate; - static PyObject *__pyx_n_s_main; - static PyObject *__pyx_n_s_name; --static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; --static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; - static PyObject *__pyx_kp_s_no_default___reduce___due_to_non; - static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; - static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; - static PyObject *__pyx_n_s_pyx_vtable; --static PyObject *__pyx_n_s_range; - static PyObject *__pyx_n_s_reduce; - static PyObject *__pyx_n_s_reduce_cython; - static PyObject *__pyx_n_s_reduce_ex; - static PyObject *__pyx_n_s_setstate; - static PyObject *__pyx_n_s_setstate_cython; - static PyObject *__pyx_n_s_test; --static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; - static int __pyx_pf_4cylp_2cy_20CyOsiSolverInterface_20CyOsiSolverInterface___cinit__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_20CyOsiSolverInterface_20CyOsiSolverInterface_8clpModel___get__(struct __pyx_obj_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_20CyOsiSolverInterface_20CyOsiSolverInterface_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_20CyOsiSolverInterface_20CyOsiSolverInterface_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ - static PyObject *__pyx_tp_new_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ - static PyObject *__pyx_tuple_; - static PyObject *__pyx_tuple__2; - static PyObject *__pyx_tuple__3; - static PyObject *__pyx_tuple__4; --static PyObject *__pyx_tuple__5; --static PyObject *__pyx_tuple__6; --static PyObject *__pyx_tuple__7; --static PyObject *__pyx_tuple__8; --static PyObject *__pyx_tuple__9; - /* Late includes */ - - /* "cylp/cy/CyOsiSolverInterface.pyx":11 -@@ -2526,6 +2568,9 @@ static PyObject *__pyx_pf_4cylp_2cy_20CyOsiSolverInterface_20CyOsiSolverInterfac - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - - /* "cylp/cy/CyOsiSolverInterface.pyx":20 -@@ -2621,6 +2666,9 @@ static PyObject *__pyx_pf_4cylp_2cy_20CyOsiSolverInterface_20CyOsiSolverInterfac - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -2675,6 +2723,9 @@ static PyObject *__pyx_pf_4cylp_2cy_20CyOsiSolverInterface_20CyOsiSolverInterfac - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -2705,863 +2756,7 @@ static PyObject *__pyx_pf_4cylp_2cy_20CyOsiSolverInterface_20CyOsiSolverInterfac - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); -- __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_v_i; -- int __pyx_v_ndim; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- int __pyx_v_t; -- char *__pyx_v_f; -- PyArray_Descr *__pyx_v_descr = 0; -- int __pyx_v_offset; -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- int __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- int __pyx_t_4; -- int __pyx_t_5; -- int __pyx_t_6; -- PyArray_Descr *__pyx_t_7; -- PyObject *__pyx_t_8 = NULL; -- char *__pyx_t_9; -- if (__pyx_v_info == NULL) { -- PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); -- return -1; -- } -- __Pyx_RefNannySetupContext("__getbuffer__", 0); -- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); -- __Pyx_GIVEREF(__pyx_v_info->obj); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":265 -- * -- * cdef int i, ndim -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":266 -- * cdef int i, ndim -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * -- * ndim = PyArray_NDIM(self) -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":268 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- */ -- __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L4_bool_binop_done; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":271 -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not C contiguous") -- * -- */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L4_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 272, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L7_bool_binop_done; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":275 -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not Fortran contiguous") -- * -- */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 276, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":278 -- * raise ValueError(u"ndarray is not Fortran contiguous") -- * -- * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":279 -- * -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * # Allocate new buffer for strides and shape info. -- */ -- __pyx_v_info->ndim = __pyx_v_ndim; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":283 -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- */ -- __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":284 -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim # <<<<<<<<<<<<<< -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- */ -- __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":285 -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim -- * for i in range(ndim): # <<<<<<<<<<<<<< -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] -- */ -- __pyx_t_4 = __pyx_v_ndim; -- __pyx_t_5 = __pyx_t_4; -- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { -- __pyx_v_i = __pyx_t_6; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":286 -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- */ -- (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":287 -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< -- * else: -- * info.strides = PyArray_STRIDES(self) -- */ -- (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- goto __pyx_L9; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":289 -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- */ -- /*else*/ { -- __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":290 -- * else: -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- */ -- __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); -- } -- __pyx_L9:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":291 -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL # <<<<<<<<<<<<<< -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) -- */ -- __pyx_v_info->suboffsets = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":292 -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< -- * info.readonly = not PyArray_ISWRITEABLE(self) -- * -- */ -- __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":293 -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< -- * -- * cdef int t -- */ -- __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":296 -- * -- * cdef int t -- * cdef char* f = NULL # <<<<<<<<<<<<<< -- * cdef dtype descr = PyArray_DESCR(self) -- * cdef int offset -- */ -- __pyx_v_f = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":297 -- * cdef int t -- * cdef char* f = NULL -- * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< -- * cdef int offset -- * -- */ -- __pyx_t_7 = PyArray_DESCR(__pyx_v_self); -- __pyx_t_3 = ((PyObject *)__pyx_t_7); -- __Pyx_INCREF(__pyx_t_3); -- __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":300 -- * cdef int offset -- * -- * info.obj = self # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(descr): -- */ -- __Pyx_INCREF(((PyObject *)__pyx_v_self)); -- __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); -- __pyx_v_info->obj = ((PyObject *)__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":303 -- * -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num # <<<<<<<<<<<<<< -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- */ -- __pyx_t_4 = __pyx_v_descr->type_num; -- __pyx_v_t = __pyx_t_4; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); -- if (!__pyx_t_2) { -- goto __pyx_L15_next_or; -- } else { -- } -- __pyx_t_2 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_L15_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":305 -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L14_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 306, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":307 -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- */ -- switch (__pyx_v_t) { -- case NPY_BYTE: -- __pyx_v_f = ((char *)"b"); -- break; -- case NPY_UBYTE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":308 -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- */ -- __pyx_v_f = ((char *)"B"); -- break; -- case NPY_SHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":309 -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- */ -- __pyx_v_f = ((char *)"h"); -- break; -- case NPY_USHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":310 -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- */ -- __pyx_v_f = ((char *)"H"); -- break; -- case NPY_INT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":311 -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- */ -- __pyx_v_f = ((char *)"i"); -- break; -- case NPY_UINT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":312 -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- */ -- __pyx_v_f = ((char *)"I"); -- break; -- case NPY_LONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":313 -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- */ -- __pyx_v_f = ((char *)"l"); -- break; -- case NPY_ULONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":314 -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- */ -- __pyx_v_f = ((char *)"L"); -- break; -- case NPY_LONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":315 -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- */ -- __pyx_v_f = ((char *)"q"); -- break; -- case NPY_ULONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":316 -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- */ -- __pyx_v_f = ((char *)"Q"); -- break; -- case NPY_FLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":317 -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- */ -- __pyx_v_f = ((char *)"f"); -- break; -- case NPY_DOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":318 -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- */ -- __pyx_v_f = ((char *)"d"); -- break; -- case NPY_LONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":319 -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- */ -- __pyx_v_f = ((char *)"g"); -- break; -- case NPY_CFLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":320 -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- */ -- __pyx_v_f = ((char *)"Zf"); -- break; -- case NPY_CDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":321 -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" -- */ -- __pyx_v_f = ((char *)"Zd"); -- break; -- case NPY_CLONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":322 -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f = "O" -- * else: -- */ -- __pyx_v_f = ((char *)"Zg"); -- break; -- case NPY_OBJECT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":323 -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_v_f = ((char *)"O"); -- break; -- default: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":325 -- * elif t == NPY_OBJECT: f = "O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * info.format = f -- * return -- */ -- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_8); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 325, __pyx_L1_error) -- break; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":326 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f # <<<<<<<<<<<<<< -- * return -- * else: -- */ -- __pyx_v_info->format = __pyx_v_f; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":327 -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f -- * return # <<<<<<<<<<<<<< -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- */ -- __pyx_r = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":329 -- * return -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- */ -- /*else*/ { -- __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":330 -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, -- */ -- (__pyx_v_info->format[0]) = '^'; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":331 -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 # <<<<<<<<<<<<<< -- * f = _util_dtypestring(descr, info.format + 1, -- * info.format + _buffer_format_string_len, -- */ -- __pyx_v_offset = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":332 -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< -- * info.format + _buffer_format_string_len, -- * &offset) -- */ -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":335 -- * info.format + _buffer_format_string_len, -- * &offset) -- * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- */ -- (__pyx_v_f[0]) = '\x00'; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- -- /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; -- if (__pyx_v_info->obj != NULL) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- goto __pyx_L2; -- __pyx_L0:; -- if (__pyx_v_info->obj == Py_None) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- __pyx_L2:; -- __Pyx_XDECREF((PyObject *)__pyx_v_descr); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); -- __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("__releasebuffer__", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":339 -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) -- */ -- PyObject_Free(__pyx_v_info->format); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":341 -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) # <<<<<<<<<<<<<< -- * # info.shape was stored after info.strides in the same block -- * -- */ -- PyObject_Free(__pyx_v_info->strides); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -@@ -3573,9 +2768,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":822 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":736 - * - * cdef inline object PyArray_MultiIterNew1(a): - * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< -@@ -3583,13 +2781,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - * cdef inline object PyArray_MultiIterNew2(a, b): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -@@ -3608,7 +2806,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -@@ -3620,9 +2818,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":825 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":739 - * - * cdef inline object PyArray_MultiIterNew2(a, b): - * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< -@@ -3630,13 +2831,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - * cdef inline object PyArray_MultiIterNew3(a, b, c): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -@@ -3655,7 +2856,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -@@ -3667,9 +2868,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":828 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":742 - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): - * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< -@@ -3677,13 +2881,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -@@ -3702,7 +2906,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -3714,9 +2918,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":831 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":745 - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -@@ -3724,13 +2931,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -3749,7 +2956,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -3761,9 +2968,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":834 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":748 - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< -@@ -3771,13 +2981,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - * cdef inline tuple PyDataType_SHAPE(dtype d): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -3796,7 +3006,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -3810,7 +3020,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - int __pyx_t_1; - __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -3820,7 +3030,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":838 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":752 - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): - * return d.subarray.shape # <<<<<<<<<<<<<< -@@ -3832,7 +3042,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -3841,12 +3051,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":840 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":754 - * return d.subarray.shape - * else: - * return () # <<<<<<<<<<<<<< - * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: -+ * - */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); -@@ -3855,7 +3065,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - goto __pyx_L0; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -3870,754 +3080,8 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { -- PyArray_Descr *__pyx_v_child = 0; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- PyObject *__pyx_v_fields = 0; -- PyObject *__pyx_v_childname = NULL; -- PyObject *__pyx_v_new_offset = NULL; -- PyObject *__pyx_v_t = NULL; -- char *__pyx_r; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- Py_ssize_t __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- PyObject *__pyx_t_4 = NULL; -- int __pyx_t_5; -- int __pyx_t_6; -- int __pyx_t_7; -- long __pyx_t_8; -- char *__pyx_t_9; -- __Pyx_RefNannySetupContext("_util_dtypestring", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":847 -- * -- * cdef dtype child -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * cdef tuple fields -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":848 -- * cdef dtype child -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * cdef tuple fields -- * -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- if (unlikely(__pyx_v_descr->names == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -- __PYX_ERR(2, 851, __pyx_L1_error) -- } -- __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; -- for (;;) { -- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 851, __pyx_L1_error) -- #else -- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- #endif -- __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":852 -- * -- * for childname in descr.names: -- * fields = descr.fields[childname] # <<<<<<<<<<<<<< -- * child, new_offset = fields -- * -- */ -- if (unlikely(__pyx_v_descr->fields == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); -- __PYX_ERR(2, 852, __pyx_L1_error) -- } -- __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":853 -- * for childname in descr.names: -- * fields = descr.fields[childname] -- * child, new_offset = fields # <<<<<<<<<<<<<< -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- */ -- if (likely(__pyx_v_fields != Py_None)) { -- PyObject* sequence = __pyx_v_fields; -- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); -- if (unlikely(size != 2)) { -- if (size > 2) __Pyx_RaiseTooManyValuesError(2); -- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); -- __PYX_ERR(2, 853, __pyx_L1_error) -- } -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); -- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); -- __Pyx_INCREF(__pyx_t_3); -- __Pyx_INCREF(__pyx_t_4); -- #else -- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- #endif -- } else { -- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error) -- } -- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); -- __pyx_t_3 = 0; -- __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 856, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); -- if (!__pyx_t_7) { -- goto __pyx_L8_next_or; -- } else { -- } -- __pyx_t_7 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_L8_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":859 -- * -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * # One could encode it in the format string and have Cython -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); -- if (__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_6 = __pyx_t_7; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":860 -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * # One could encode it in the format string and have Cython -- * # complain instead, BUT: < and > in format strings also imply -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 860, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":870 -- * -- * # Output padding bytes -- * while offset[0] < new_offset: # <<<<<<<<<<<<<< -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- */ -- while (1) { -- __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (!__pyx_t_6) break; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":871 -- * # Output padding bytes -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< -- * f += 1 -- * offset[0] += 1 -- */ -- (__pyx_v_f[0]) = 0x78; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":872 -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte -- * f += 1 # <<<<<<<<<<<<<< -- * offset[0] += 1 -- * -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":873 -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- * offset[0] += 1 # <<<<<<<<<<<<<< -- * -- * offset[0] += child.itemsize -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":875 -- * offset[0] += 1 -- * -- * offset[0] += child.itemsize # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(child): -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); -- if (__pyx_t_6) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":878 -- * -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num # <<<<<<<<<<<<<< -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 880, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":883 -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 98; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":884 -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":885 -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x68; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":886 -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 72; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":887 -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x69; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":888 -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 73; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":889 -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x6C; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":890 -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 76; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":891 -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x71; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":892 -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 81; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":893 -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":894 -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x64; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":895 -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x67; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":896 -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x66; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":897 -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x64; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":898 -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x67; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":899 -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (likely(__pyx_t_6)) { -- (__pyx_v_f[0]) = 79; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":901 -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * f += 1 -- * else: -- */ -- /*else*/ { -- __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 901, __pyx_L1_error) -- } -- __pyx_L15:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":902 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * f += 1 # <<<<<<<<<<<<<< -- * else: -- * # Cython ignores struct boundary information ("T{...}"), -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- goto __pyx_L13; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":906 -- * # Cython ignores struct boundary information ("T{...}"), -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< -- * return f -- * -- */ -- /*else*/ { -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 906, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- } -- __pyx_L13:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- } -- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":907 -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) -- * return f # <<<<<<<<<<<<<< -- * -- * -- */ -- __pyx_r = __pyx_v_f; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_4); -- __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = NULL; -- __pyx_L0:; -- __Pyx_XDECREF((PyObject *)__pyx_v_child); -- __Pyx_XDECREF(__pyx_v_fields); -- __Pyx_XDECREF(__pyx_v_childname); -- __Pyx_XDECREF(__pyx_v_new_offset); -- __Pyx_XDECREF(__pyx_v_t); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -- * int _import_umath() except -1 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 -+ * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< - * Py_INCREF(base) # important to do this before stealing the reference below! -@@ -4628,7 +3092,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("set_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1023 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":930 - * - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< -@@ -4637,7 +3101,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - Py_INCREF(__pyx_v_base); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1024 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":931 - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< -@@ -4646,7 +3110,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -4658,7 +3122,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyFinishContext(); - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -4673,7 +3137,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - int __pyx_t_1; - __Pyx_RefNannySetupContext("get_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1027 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":934 - * - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< -@@ -4682,7 +3146,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - __pyx_v_base = PyArray_BASE(__pyx_v_arr); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -4692,7 +3156,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_t_1 = ((__pyx_v_base == NULL) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1029 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":936 - * base = PyArray_BASE(arr) - * if base is NULL: - * return None # <<<<<<<<<<<<<< -@@ -4703,7 +3167,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -4712,7 +3176,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1030 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":937 - * if base is NULL: - * return None - * return base # <<<<<<<<<<<<<< -@@ -4724,7 +3188,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = ((PyObject *)__pyx_v_base); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -4739,12 +3203,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { -@@ -4758,13 +3222,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_array", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - { -@@ -4776,20 +3243,20 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1036 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":943 - * cdef inline int import_array() except -1: - * try: -- * _import_array() # <<<<<<<<<<<<<< -+ * __pyx_import_array() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") - */ -- __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error) -+ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - } -@@ -4799,9 +3266,9 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1037 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":944 - * try: -- * _import_array() -+ * __pyx_import_array() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.multiarray failed to import") - * -@@ -4809,32 +3276,32 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __PYX_ERR(2, 945, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - __Pyx_XGIVEREF(__pyx_t_1); -@@ -4845,12 +3312,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - /* function exit code */ -@@ -4868,7 +3335,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -4887,9 +3354,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_umath", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -4905,16 +3375,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1042 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":949 - * cdef inline int import_umath() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -4928,7 +3398,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1043 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":950 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< -@@ -4938,28 +3408,28 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __PYX_ERR(2, 951, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -4974,7 +3444,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -4997,7 +3467,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -5016,9 +3486,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_ufunc", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5034,16 +3507,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1048 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":955 - * cdef inline int import_ufunc() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5057,35 +3530,38 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1049 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":956 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") -+ * - */ - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1050 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":957 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -+ * -+ * cdef extern from *: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __PYX_ERR(2, 957, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5100,7 +3576,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -5122,6 +3598,180 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_RefNannyFinishContext(); - return __pyx_r; - } -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_timedelta64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":979 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_datetime64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":994 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { -+ npy_datetime __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1004 -+ * also needed. That can be found using `get_datetime64_unit`. -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { -+ npy_timedelta __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1011 -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { -+ NPY_DATETIMEUNIT __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1018 -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ * """ -+ * return (obj).obmeta.base # <<<<<<<<<<<<<< -+ */ -+ __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} - static struct __pyx_vtabstruct_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface __pyx_vtable_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface; - - static PyObject *__pyx_tp_new_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { -@@ -5172,7 +3822,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInter - sizeof(struct __pyx_obj_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -5225,6 +3880,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInter - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyMethodDef __pyx_methods[] = { -@@ -5274,39 +3935,27 @@ static struct PyModuleDef __pyx_moduledef = { - - static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_CyOsiSolverInterface, __pyx_k_CyOsiSolverInterface, sizeof(__pyx_k_CyOsiSolverInterface), 0, 0, 1, 1}, -- {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, - {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, -- {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, -- {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, - {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, -- {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, - {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, - {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, - {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, -- {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, -- {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, - {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0}, - {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0}, - {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, - {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, -- {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, - {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, - {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, - {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, - {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, -- {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, - {0, 0, 0, 0, 0, 0, 0} - }; - static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error) -- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error) -- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(2, 285, __pyx_L1_error) -- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 856, __pyx_L1_error) -- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error) -+ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 945, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -@@ -5335,82 +3984,27 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_GOTREF(__pyx_tuple__2); - __Pyx_GIVEREF(__pyx_tuple__2); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__3); -- __Pyx_GIVEREF(__pyx_tuple__3); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__4); -- __Pyx_GIVEREF(__pyx_tuple__4); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__5); -- __Pyx_GIVEREF(__pyx_tuple__5); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__6); -- __Pyx_GIVEREF(__pyx_tuple__6); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__7); -- __Pyx_GIVEREF(__pyx_tuple__7); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 1038, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__8); -- __Pyx_GIVEREF(__pyx_tuple__8); -+ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 945, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__3); -+ __Pyx_GIVEREF(__pyx_tuple__3); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 1044, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__9); -- __Pyx_GIVEREF(__pyx_tuple__9); -+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 951, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__4); -+ __Pyx_GIVEREF(__pyx_tuple__4); - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -5459,6 +4053,9 @@ static int __Pyx_modinit_function_export_code(void) { - - static int __Pyx_modinit_type_init_code(void) { - __Pyx_RefNannyDeclarations -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); - /*--- Type init code ---*/ - __pyx_vtabptr_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface = &__pyx_vtable_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface; -@@ -5484,6 +4081,9 @@ static int __Pyx_modinit_type_init_code(void) { - static int __Pyx_modinit_type_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); - /*--- Type import code ---*/ - __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) -@@ -5519,18 +4119,38 @@ static int __Pyx_modinit_type_import_code(void) { - if (!__pyx_ptype_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase) __PYX_ERR(7, 67, __pyx_L1_error) - __pyx_vtabptr_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase = (struct __pyx_vtabstruct_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase)) __PYX_ERR(7, 67, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) -+ __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error) -- __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error) -- __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error) -+ __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error) -+ __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error) -- __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error) -+ __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error) -+ __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error) -+ __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error) -+ __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error) -+ __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error) -+ __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error) -+ __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error) -+ __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error) -+ __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error) -+ __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error) -+ __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpDualRowPivotBase"); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); -@@ -5633,17 +4253,19 @@ static int __Pyx_modinit_function_import_code(void) { - } - - --#if PY_MAJOR_VERSION < 3 --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC void --#else -+#ifndef CYTHON_NO_PYINIT_EXPORT - #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#elif PY_MAJOR_VERSION < 3 -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" void -+#else -+#define __Pyx_PyMODINIT_FUNC void - #endif - #else --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC PyObject * -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * - #else --#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#define __Pyx_PyMODINIT_FUNC PyObject * - #endif - #endif - -@@ -5725,6 +4347,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_CyOsiSolverInterface(PyObject *__p - #endif - { - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannyDeclarations - #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m) { -@@ -5772,11 +4397,9 @@ if (!__Pyx_RefNanny) { - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ -- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS -- #ifdef WITH_THREAD /* Python build with threading support? */ -+ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - PyEval_InitThreads(); - #endif -- #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; -@@ -5813,15 +4436,15 @@ if (!__Pyx_RefNanny) { - } - #endif - /*--- Builtin init code ---*/ -- if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 2, __pyx_L1_error) - /*--- Constants init code ---*/ -- if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 2, __pyx_L1_error) - /*--- Global type/function init code ---*/ - (void)__Pyx_modinit_global_init_code(); - (void)__Pyx_modinit_variable_export_code(); - (void)__Pyx_modinit_function_export_code(); -- if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; -- if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(1, 2, __pyx_L1_error) -+ if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(1, 2, __pyx_L1_error) - (void)__Pyx_modinit_variable_import_code(); - (void)__Pyx_modinit_function_import_code(); - /*--- Execution code ---*/ -@@ -5840,12 +4463,12 @@ if (!__Pyx_RefNanny) { - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(1, 2, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -- * raise ImportError("numpy.core.umath failed to import") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - - /*--- Wrapped vars code ---*/ -@@ -6107,7 +4730,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #if CYTHON_COMPILING_IN_CPYTHON - static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; -- ternaryfunc call = func->ob_type->tp_call; -+ ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -@@ -6348,124 +4971,6 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject - } - #endif - --/* PyCFunctionFastCall */ --#if CYTHON_FAST_PYCCALL --static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { -- PyCFunctionObject *func = (PyCFunctionObject*)func_obj; -- PyCFunction meth = PyCFunction_GET_FUNCTION(func); -- PyObject *self = PyCFunction_GET_SELF(func); -- int flags = PyCFunction_GET_FLAGS(func); -- assert(PyCFunction_Check(func)); -- assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); -- assert(nargs >= 0); -- assert(nargs == 0 || args != NULL); -- /* _PyCFunction_FastCallDict() must not be called with an exception set, -- because it may clear it (directly or indirectly) and so the -- caller loses its exception */ -- assert(!PyErr_Occurred()); -- if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { -- return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); -- } else { -- return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); -- } --} --#endif -- --/* PyObjectCallOneArg */ --#if CYTHON_COMPILING_IN_CPYTHON --static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { -- PyObject *result; -- PyObject *args = PyTuple_New(1); -- if (unlikely(!args)) return NULL; -- Py_INCREF(arg); -- PyTuple_SET_ITEM(args, 0, arg); -- result = __Pyx_PyObject_Call(func, args, NULL); -- Py_DECREF(args); -- return result; --} --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { --#if CYTHON_FAST_PYCALL -- if (PyFunction_Check(func)) { -- return __Pyx_PyFunction_FastCall(func, &arg, 1); -- } --#endif -- if (likely(PyCFunction_Check(func))) { -- if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { -- return __Pyx_PyObject_CallMethO(func, arg); --#if CYTHON_FAST_PYCCALL -- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { -- return __Pyx_PyCFunction_FastCall(func, &arg, 1); --#endif -- } -- } -- return __Pyx__PyObject_CallOneArg(func, arg); --} --#else --static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) { -- PyObject *result; -- PyObject *args = PyTuple_Pack(1, arg); -- if (unlikely(!args)) return NULL; -- result = __Pyx_PyObject_Call(func, args, NULL); -- Py_DECREF(args); -- return result; --} --#endif -- --/* DictGetItem */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { -- PyObject *value; -- value = PyDict_GetItemWithError(d, key); -- if (unlikely(!value)) { -- if (!PyErr_Occurred()) { -- if (unlikely(PyTuple_Check(key))) { -- PyObject* args = PyTuple_Pack(1, key); -- if (likely(args)) { -- PyErr_SetObject(PyExc_KeyError, args); -- Py_DECREF(args); -- } -- } else { -- PyErr_SetObject(PyExc_KeyError, key); -- } -- } -- return NULL; -- } -- Py_INCREF(value); -- return value; --} --#endif -- --/* RaiseTooManyValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { -- PyErr_Format(PyExc_ValueError, -- "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); --} -- --/* RaiseNeedMoreValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { -- PyErr_Format(PyExc_ValueError, -- "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", -- index, (index == 1) ? "" : "s"); --} -- --/* RaiseNoneIterError */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); --} -- --/* ExtTypeTest */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { -- if (unlikely(!type)) { -- PyErr_SetString(PyExc_SystemError, "Missing type object"); -- return 0; -- } -- if (likely(__Pyx_TypeCheck(obj, type))) -- return 1; -- PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", -- Py_TYPE(obj)->tp_name, type->tp_name); -- return 0; --} -- - /* GetTopmostException */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * -@@ -6689,6 +5194,28 @@ static int __Pyx_SetVtable(PyObject *dict, void *vtable) { - return -1; - } - -+/* PyObjectGetAttrStrNoError */ -+static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { -+ __Pyx_PyThreadState_declare -+ __Pyx_PyThreadState_assign -+ if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) -+ __Pyx_PyErr_Clear(); -+} -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { -+ PyObject *result; -+#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 -+ PyTypeObject* tp = Py_TYPE(obj); -+ if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { -+ return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); -+ } -+#endif -+ result = __Pyx_PyObject_GetAttrStr(obj, attr_name); -+ if (unlikely(!result)) { -+ __Pyx_PyObject_GetAttrStr_ClearAttributeError(); -+ } -+ return result; -+} -+ - /* SetupReduce */ - static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { - int ret; -@@ -6716,43 +5243,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { - PyObject *setstate = NULL; - PyObject *setstate_cython = NULL; - #if CYTHON_USE_PYTYPE_LOOKUP -- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #else -- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #endif - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #else -- object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #endif -- reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; -+ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; - if (reduce_ex == object_reduce_ex) { - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #else -- object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #endif -- reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; -+ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; - if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { -- reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; -+ reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); -+ if (likely(reduce_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (reduce == object_reduce || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); - if (!setstate) PyErr_Clear(); - if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { -- setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; -+ setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); -+ if (likely(setstate_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (!setstate || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - } - PyType_Modified((PyTypeObject*)type_obj); - } - } -- goto GOOD; --BAD: -+ goto __PYX_GOOD; -+__PYX_BAD: - if (!PyErr_Occurred()) - PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); - ret = -1; --GOOD: -+__PYX_GOOD: - #if !CYTHON_USE_PYTYPE_LOOKUP - Py_XDECREF(object_reduce); - Py_XDECREF(object_reduce_ex); -@@ -6874,7 +5409,7 @@ static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UIN - - /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK --static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { -+static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { - PyObject *use_cline; - PyObject *ptype, *pvalue, *ptraceback; - #if CYTHON_COMPILING_IN_CPYTHON -@@ -6904,7 +5439,7 @@ static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { - } - if (!use_cline) { - c_line = 0; -- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); -+ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; -@@ -6978,7 +5513,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - if (__pyx_code_cache.count == __pyx_code_cache.max_count) { - int new_max = __pyx_code_cache.max_count + 64; - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( -- __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); -+ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); - if (unlikely(!entries)) { - return; - } -@@ -7001,30 +5536,31 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { -- PyCodeObject *py_code = 0; -- PyObject *py_srcfile = 0; -- PyObject *py_funcname = 0; -+ PyCodeObject *py_code = NULL; -+ PyObject *py_funcname = NULL; - #if PY_MAJOR_VERSION < 3 -+ PyObject *py_srcfile = NULL; - py_srcfile = PyString_FromString(filename); -- #else -- py_srcfile = PyUnicode_FromString(filename); -- #endif - if (!py_srcfile) goto bad; -+ #endif - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; -+ funcname = PyUnicode_AsUTF8(py_funcname); -+ if (!funcname) goto bad; - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); -- #else -- py_funcname = PyUnicode_FromString(funcname); -+ if (!py_funcname) goto bad; - #endif - } -- if (!py_funcname) goto bad; -+ #if PY_MAJOR_VERSION < 3 - py_code = __Pyx_PyCode_New( - 0, - 0, -@@ -7043,11 +5579,16 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - __pyx_empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); -- Py_DECREF(py_funcname); -+ #else -+ py_code = PyCode_NewEmpty(filename, funcname, py_line); -+ #endif -+ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline - return py_code; - bad: -- Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -+ #if PY_MAJOR_VERSION < 3 -+ Py_XDECREF(py_srcfile); -+ #endif - return NULL; - } - static void __Pyx_AddTraceback(const char *funcname, int c_line, -@@ -7196,7 +5737,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - case 1: - return a; - case 2: -- z = __Pyx_c_prod_float(a, a); - return __Pyx_c_prod_float(a, a); - case 3: - z = __Pyx_c_prod_float(a, a); -@@ -7351,7 +5891,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - case 1: - return a; - case 2: -- z = __Pyx_c_prod_double(a, a); - return __Pyx_c_prod_double(a, a); - case 3: - z = __Pyx_c_prod_double(a, a); -@@ -7390,24 +5929,31 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - #endif - - /* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { -- if (sizeof(int) < sizeof(long)) { -+ if (sizeof(long) < sizeof(long)) { - return PyInt_FromLong((long) value); -- } else if (sizeof(int) <= sizeof(unsigned long)) { -+ } else if (sizeof(long) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); - #ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); - #endif - } - } else { -- if (sizeof(int) <= sizeof(long)) { -+ if (sizeof(long) <= sizeof(long)) { - return PyInt_FromLong((long) value); - #ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); - #endif - } -@@ -7415,7 +5961,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(int), -+ return _PyLong_FromByteArray(bytes, sizeof(long), - little, !is_unsigned); - } - } -@@ -7442,51 +5988,27 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - return (target_type) value;\ - } - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { -- const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(enum NPY_TYPES) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+/* CIntFromPy */ -+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" - #endif -- } -- } else { -- if (sizeof(enum NPY_TYPES) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop - #endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), -- little, !is_unsigned); -- } --} -- --/* CIntFromPy */ --static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -- if (sizeof(int) < sizeof(long)) { -- __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) -+ if (sizeof(long) < sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } -- return (int) val; -+ return (long) val; - } - } else - #endif -@@ -7495,32 +6017,32 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (int) 0; -- case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) -+ case 0: return (long) 0; -+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) - case 2: -- if (8 * sizeof(int) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { -- return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { -+ return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - case 3: -- if (8 * sizeof(int) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { -- return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { -+ return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - case 4: -- if (8 * sizeof(int) > 3 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { -- return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { -+ return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; -@@ -7534,86 +6056,86 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) -- return (int) -1; -+ return (long) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } - #endif -- if (sizeof(int) <= sizeof(unsigned long)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) -+ if (sizeof(long) <= sizeof(unsigned long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) - #endif - } - } else { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (int) 0; -- case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) -- case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) -+ case 0: return (long) 0; -+ case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) -+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) - case -2: -- if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -+ return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 2: -- if (8 * sizeof(int) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -- return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -+ return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case -3: -- if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -+ return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 3: -- if (8 * sizeof(int) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -- return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -+ return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case -4: -- if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -+ return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 4: -- if (8 * sizeof(int) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -- return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -+ return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - } - #endif -- if (sizeof(int) <= sizeof(long)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) -+ if (sizeof(long) <= sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) -+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) - #endif - } - } -@@ -7622,7 +6144,7 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); - #else -- int val; -+ long val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); - #if PY_MAJOR_VERSION < 3 - if (likely(v) && !PyLong_Check(v)) { -@@ -7642,71 +6164,47 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - return val; - } - #endif -- return (int) -1; -+ return (long) -1; - } - } else { -- int val; -+ long val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); -- if (!tmp) return (int) -1; -- val = __Pyx_PyInt_As_int(tmp); -+ if (!tmp) return (long) -1; -+ val = __Pyx_PyInt_As_long(tmp); - Py_DECREF(tmp); - return val; - } - raise_overflow: - PyErr_SetString(PyExc_OverflowError, -- "value too large to convert to int"); -- return (int) -1; -+ "value too large to convert to long"); -+ return (long) -1; - raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, -- "can't convert negative value to int"); -- return (int) -1; -+ "can't convert negative value to long"); -+ return (long) -1; - } - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(long) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(long) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+/* CIntFromPy */ -+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" - #endif -- } -- } else { -- if (sizeof(long) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop - #endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(long), -- little, !is_unsigned); -- } --} -- --/* CIntFromPy */ --static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -- if (sizeof(long) < sizeof(long)) { -- __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) -+ if (sizeof(int) < sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } -- return (long) val; -+ return (int) val; - } - } else - #endif -@@ -7715,32 +6213,32 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (long) 0; -- case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) -+ case 0: return (int) 0; -+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) - case 2: -- if (8 * sizeof(long) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { -- return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { -+ return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; - case 3: -- if (8 * sizeof(long) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { -- return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { -+ return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; - case 4: -- if (8 * sizeof(long) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { -- return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { -+ return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; -@@ -7754,86 +6252,86 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) -- return (long) -1; -+ return (int) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } - #endif -- if (sizeof(long) <= sizeof(unsigned long)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) -+ if (sizeof(int) <= sizeof(unsigned long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) - #endif - } - } else { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (long) 0; -- case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) -- case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) -+ case 0: return (int) 0; -+ case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) -+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) - case -2: -- if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -- return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 2: -- if (8 * sizeof(long) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -- return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case -3: -- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -- return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 3: -- if (8 * sizeof(long) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -- return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case -4: -- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -- return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 4: -- if (8 * sizeof(long) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -- return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -+ return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - } - #endif -- if (sizeof(long) <= sizeof(long)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) -+ if (sizeof(int) <= sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) - #endif - } - } -@@ -7842,7 +6340,7 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); - #else -- long val; -+ int val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); - #if PY_MAJOR_VERSION < 3 - if (likely(v) && !PyLong_Check(v)) { -@@ -7862,24 +6360,24 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - return val; - } - #endif -- return (long) -1; -+ return (int) -1; - } - } else { -- long val; -+ int val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); -- if (!tmp) return (long) -1; -- val = __Pyx_PyInt_As_long(tmp); -+ if (!tmp) return (int) -1; -+ val = __Pyx_PyInt_As_int(tmp); - Py_DECREF(tmp); - return val; - } - raise_overflow: - PyErr_SetString(PyExc_OverflowError, -- "value too large to convert to long"); -- return (long) -1; -+ "value too large to convert to int"); -+ return (int) -1; - raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, -- "can't convert negative value to long"); -- return (long) -1; -+ "can't convert negative value to int"); -+ return (int) -1; - } - - /* FastTypeChecks */ -@@ -8246,6 +6744,23 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_DECREF(x); - return ival; - } -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { -+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { -+ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); -+#if PY_MAJOR_VERSION < 3 -+ } else if (likely(PyInt_CheckExact(o))) { -+ return PyInt_AS_LONG(o); -+#endif -+ } else { -+ Py_ssize_t ival; -+ PyObject *x; -+ x = PyNumber_Index(o); -+ if (!x) return -1; -+ ival = PyInt_AsLong(x); -+ Py_DECREF(x); -+ return ival; -+ } -+} - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); - } -diff --git a/cylp/cy/CyPEPivot.cpp b/cylp/cy/CyPEPivot.cpp -index e28622e..f4e3db9 100644 ---- a/cylp/cy/CyPEPivot.cpp -+++ b/cylp/cy/CyPEPivot.cpp -@@ -1,14 +1,16 @@ --/* Generated by Cython 0.29.12 */ -+/* Generated by Cython 0.29.25 */ - -+#ifndef PY_SSIZE_T_CLEAN - #define PY_SSIZE_T_CLEAN -+#endif /* PY_SSIZE_T_CLEAN */ - #include "Python.h" - #ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. - #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. - #else --#define CYTHON_ABI "0_29_12" --#define CYTHON_HEX_VERSION 0x001D0CF0 -+#define CYTHON_ABI "0_29_25" -+#define CYTHON_HEX_VERSION 0x001D19F0 - #define CYTHON_FUTURE_DIVISION 0 - #include - #ifndef offsetof -@@ -155,7 +157,7 @@ - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif -- #if PY_VERSION_HEX < 0x030300F0 -+ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) -@@ -174,7 +176,7 @@ - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL -- #define CYTHON_FAST_PYCALL 1 -+ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1) - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) -@@ -193,7 +195,9 @@ - #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) - #endif - #if CYTHON_USE_PYLONG_INTERNALS -- #include "longintrepr.h" -+ #if PY_MAJOR_VERSION < 3 -+ #include "longintrepr.h" -+ #endif - #undef SHIFT - #undef BASE - #undef MASK -@@ -324,9 +328,68 @@ class __Pyx_FakeReference { - #define __Pyx_DefaultClassType PyClass_Type - #else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" --#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 -- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ -- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -+ #define __Pyx_DefaultClassType PyType_Type -+#if PY_VERSION_HEX >= 0x030B00A1 -+ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, -+ PyObject *code, PyObject *c, PyObject* n, PyObject *v, -+ PyObject *fv, PyObject *cell, PyObject* fn, -+ PyObject *name, int fline, PyObject *lnos) { -+ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; -+ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; -+ const char *fn_cstr=NULL; -+ const char *name_cstr=NULL; -+ PyCodeObject* co=NULL; -+ PyObject *type, *value, *traceback; -+ PyErr_Fetch(&type, &value, &traceback); -+ if (!(kwds=PyDict_New())) goto end; -+ if (!(argcount=PyLong_FromLong(a))) goto end; -+ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; -+ if (!(posonlyargcount=PyLong_FromLong(0))) goto end; -+ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; -+ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; -+ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; -+ if (!(nlocals=PyLong_FromLong(l))) goto end; -+ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; -+ if (!(stacksize=PyLong_FromLong(s))) goto end; -+ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; -+ if (!(flags=PyLong_FromLong(f))) goto end; -+ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; -+ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; -+ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; -+ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; -+ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; -+ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here -+ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; -+ Py_XDECREF((PyObject*)co); -+ co = (PyCodeObject*)call_result; -+ call_result = NULL; -+ if (0) { -+ cleanup_code_too: -+ Py_XDECREF((PyObject*)co); -+ co = NULL; -+ } -+ end: -+ Py_XDECREF(kwds); -+ Py_XDECREF(argcount); -+ Py_XDECREF(posonlyargcount); -+ Py_XDECREF(kwonlyargcount); -+ Py_XDECREF(nlocals); -+ Py_XDECREF(stacksize); -+ Py_XDECREF(replace); -+ Py_XDECREF(call_result); -+ Py_XDECREF(empty); -+ if (type) { -+ PyErr_Restore(type, value, traceback); -+ } -+ return co; -+ } - #else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -@@ -440,8 +503,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #endif - #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 -+ #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) -+ #else -+ #define __Pyx_PyUnicode_READY(op) (0) -+ #endif - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) -@@ -449,7 +516,15 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) -+ #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) -+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) -+ #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) -+ #endif -+ #else -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) -+ #endif - #else - #define CYTHON_PEP393_ENABLED 0 - #define PyUnicode_1BYTE_KIND 1 -@@ -498,8 +573,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define PyString_Type PyUnicode_Type - #define PyString_Check PyUnicode_Check - #define PyString_CheckExact PyUnicode_CheckExact -+#ifndef PyObject_Unicode - #define PyObject_Unicode PyObject_Str - #endif -+#endif - #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) - #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) -@@ -510,6 +587,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #ifndef PySet_CheckExact - #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) - #endif -+#if PY_VERSION_HEX >= 0x030900A4 -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) -+#else -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) -+#endif - #if CYTHON_ASSUME_SAFE_MACROS - #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) - #else -@@ -543,13 +627,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong -- #define __Pyx_PyInt_AsHash_t PyInt_AsLong -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t - #else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t -- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t - #endif - #if PY_MAJOR_VERSION >= 3 -- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) -+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) - #else - #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) - #endif -@@ -590,11 +674,10 @@ static CYTHON_INLINE float __PYX_NAN() { - #define __Pyx_truncl truncl - #endif - -- -+#define __PYX_MARK_ERR_POS(f_index, lineno) \ -+ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } - #define __PYX_ERR(f_index, lineno, Ln_error) \ --{ \ -- __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ --} -+ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } - - #ifndef __PYX_EXTERN_C - #ifdef __cplusplus -@@ -612,7 +695,13 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "pythread.h" - #include "ICoinIndexedVector.hpp" - #include "numpy/arrayobject.h" -+#include "numpy/ndarrayobject.h" -+#include "numpy/ndarraytypes.h" -+#include "numpy/arrayscalars.h" - #include "numpy/ufuncobject.h" -+ -+ /* NumPy API declarations from "numpy/__init__.pxd" */ -+ - #include "ClpDualRowPivot.hpp" - #include "ClpFactorization.hpp" - #include "IClpDualRowPivotBase.h" -@@ -641,11 +730,11 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "OsiSolverInterface.hpp" - #include "CbcCompareUser.hpp" - #include "ICbcModel.hpp" -+#include - #include "ios" - #include "new" - #include "stdexcept" - #include "typeinfo" --#include - #include - #include "IClpPrimalColumnPivotBase.h" - #include "ClpPrimalColumnPivot.hpp" -@@ -746,6 +835,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); - static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); - #if CYTHON_ASSUME_SAFE_MACROS - #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) - #else -@@ -880,24 +970,24 @@ static const char *__pyx_filename; - - - static const char *__pyx_f[] = { -- "cylp\\cy\\CyPEPivot.pyx", -+ "cylp/cy/CyPEPivot.pyx", - "stringsource", - "__init__.pxd", - "type.pxd", - "bool.pxd", - "complex.pxd", -- "cylp\\cy\\CyCoinIndexedVector.pxd", -- "cylp\\cy\\CyClpDualRowPivotBase.pxd", -- "cylp\\cy\\CyCoinModel.pxd", -- "cylp\\cy\\CyCoinPackedMatrix.pxd", -- "cylp\\cy\\CyCgl.pxd", -- "cylp\\cy\\CyCbcNode.pxd", -- "cylp\\cy\\CyOsiSolverInterface.pxd", -- "cylp\\cy\\CyCbcModel.pxd", -- "cylp\\cy\\CyClpSimplex.pxd", -+ "cylp/cy/CyCoinIndexedVector.pxd", -+ "cylp/cy/CyClpDualRowPivotBase.pxd", -+ "cylp/cy/CyCoinModel.pxd", -+ "cylp/cy/CyCoinPackedMatrix.pxd", -+ "cylp/cy/CyCgl.pxd", -+ "cylp/cy/CyCbcNode.pxd", -+ "cylp/cy/CyOsiSolverInterface.pxd", -+ "cylp/cy/CyCbcModel.pxd", -+ "cylp/cy/CyClpSimplex.pxd", - }; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":776 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":690 - * # in Cython to enable them only on the right systems. - * - * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< -@@ -906,7 +996,7 @@ static const char *__pyx_f[] = { - */ - typedef npy_int8 __pyx_t_5numpy_int8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":777 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":691 - * - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< -@@ -915,7 +1005,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; - */ - typedef npy_int16 __pyx_t_5numpy_int16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":778 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":692 - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< -@@ -924,7 +1014,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; - */ - typedef npy_int32 __pyx_t_5numpy_int32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":779 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":693 - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t - * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< -@@ -933,7 +1023,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; - */ - typedef npy_int64 __pyx_t_5numpy_int64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":783 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":697 - * #ctypedef npy_int128 int128_t - * - * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< -@@ -942,7 +1032,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; - */ - typedef npy_uint8 __pyx_t_5numpy_uint8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":784 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":698 - * - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< -@@ -951,7 +1041,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; - */ - typedef npy_uint16 __pyx_t_5numpy_uint16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":785 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":699 - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< -@@ -960,7 +1050,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; - */ - typedef npy_uint32 __pyx_t_5numpy_uint32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":786 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":700 - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t - * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< -@@ -969,7 +1059,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; - */ - typedef npy_uint64 __pyx_t_5numpy_uint64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":790 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":704 - * #ctypedef npy_uint128 uint128_t - * - * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< -@@ -978,7 +1068,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; - */ - typedef npy_float32 __pyx_t_5numpy_float32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":791 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":705 - * - * ctypedef npy_float32 float32_t - * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< -@@ -987,7 +1077,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; - */ - typedef npy_float64 __pyx_t_5numpy_float64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":800 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":714 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< -@@ -996,7 +1086,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; - */ - typedef npy_long __pyx_t_5numpy_int_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":801 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":715 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< -@@ -1005,7 +1095,7 @@ typedef npy_long __pyx_t_5numpy_int_t; - */ - typedef npy_longlong __pyx_t_5numpy_long_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":802 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":716 - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t - * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< -@@ -1014,7 +1104,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; - */ - typedef npy_longlong __pyx_t_5numpy_longlong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":804 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":718 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< -@@ -1023,7 +1113,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; - */ - typedef npy_ulong __pyx_t_5numpy_uint_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":805 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":719 - * - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< -@@ -1032,7 +1122,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":806 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":720 - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t - * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< -@@ -1041,7 +1131,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":808 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":722 - * ctypedef npy_ulonglong ulonglong_t - * - * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< -@@ -1050,7 +1140,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - */ - typedef npy_intp __pyx_t_5numpy_intp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":809 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":723 - * - * ctypedef npy_intp intp_t - * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< -@@ -1059,7 +1149,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; - */ - typedef npy_uintp __pyx_t_5numpy_uintp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":811 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":725 - * ctypedef npy_uintp uintp_t - * - * ctypedef npy_double float_t # <<<<<<<<<<<<<< -@@ -1068,7 +1158,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; - */ - typedef npy_double __pyx_t_5numpy_float_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":812 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":726 - * - * ctypedef npy_double float_t - * ctypedef npy_double double_t # <<<<<<<<<<<<<< -@@ -1077,7 +1167,7 @@ typedef npy_double __pyx_t_5numpy_float_t; - */ - typedef npy_double __pyx_t_5numpy_double_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":813 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":727 - * ctypedef npy_double float_t - * ctypedef npy_double double_t - * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< -@@ -1140,7 +1230,7 @@ struct __pyx_obj_4cylp_2cy_12CyClpSimplex_VarStatus; - struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase; - struct __pyx_obj_4cylp_2cy_9CyPEPivot_CyPEPivot; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":815 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":729 - * ctypedef npy_longdouble longdouble_t - * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< -@@ -1149,7 +1239,7 @@ struct __pyx_obj_4cylp_2cy_9CyPEPivot_CyPEPivot; - */ - typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":816 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":730 - * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< -@@ -1158,7 +1248,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - */ - typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":817 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":731 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< -@@ -1167,7 +1257,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - */ - typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":819 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":733 - * ctypedef npy_clongdouble clongdouble_t - * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< -@@ -1882,6 +1972,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #ifndef Py_MEMBER_SIZE - #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) - #endif -+#if CYTHON_FAST_PYCALL - static size_t __pyx_pyframe_localsplus_offset = 0; - #include "frameobject.h" - #define __Pxy_PyFrame_Initialize_Offsets()\ -@@ -1889,6 +1980,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) - #define __Pyx_PyFrame_GetLocalsplus(frame)\ - (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) -+#endif // CYTHON_FAST_PYCALL - #endif - - /* PyObjectCall.proto */ -@@ -2048,26 +2140,6 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - /* RaiseException.proto */ - static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); - --/* DictGetItem.proto */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); --#define __Pyx_PyObject_Dict_GetItem(obj, name)\ -- (likely(PyDict_CheckExact(obj)) ?\ -- __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) --#else --#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) --#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) --#endif -- --/* RaiseTooManyValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); -- --/* RaiseNeedMoreValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); -- --/* RaiseNoneIterError.proto */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -- - /* GetTopmostException.proto */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); -@@ -2140,6 +2212,9 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - /* SetVTable.proto */ - static int __Pyx_SetVtable(PyObject *dict, void *vtable); - -+/* PyObjectGetAttrStrNoError.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); -+ - /* SetupReduce.proto */ - static int __Pyx_setup_reduce(PyObject* type_obj); - -@@ -2172,11 +2247,10 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); - static void __Pyx_AddTraceback(const char *funcname, int c_line, - int py_line, const char *filename); - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); -- --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -+/* GCCDiagnostics.proto */ -+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -+#define __Pyx_HAS_GCC_DIAGNOSTIC -+#endif - - /* RealImag.proto */ - #if CYTHON_CCOMPLEX -@@ -2277,11 +2351,14 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); - #endif - - /* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); - - /* CIntFromPy.proto */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); - -+/* CIntToPy.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -+ - /* CIntFromPy.proto */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); - -@@ -2406,8 +2483,17 @@ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; - static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; - static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; - static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -+static PyTypeObject *__pyx_ptype_5numpy_generic = 0; -+static PyTypeObject *__pyx_ptype_5numpy_number = 0; -+static PyTypeObject *__pyx_ptype_5numpy_integer = 0; -+static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; -+static PyTypeObject *__pyx_ptype_5numpy_floating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; -+static PyTypeObject *__pyx_ptype_5numpy_character = 0; - static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ - - /* Module declarations from 'cylp.cy.CyClpDualRowPivotBase' */ - static PyTypeObject *__pyx_ptype_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase = 0; -@@ -2470,9 +2556,6 @@ int __pyx_module_is_main_cylp__cy__CyPEPivot = 0; - static PyObject *__pyx_builtin_xrange; - static PyObject *__pyx_builtin_print; - static PyObject *__pyx_builtin_TypeError; --static PyObject *__pyx_builtin_ValueError; --static PyObject *__pyx_builtin_range; --static PyObject *__pyx_builtin_RuntimeError; - static PyObject *__pyx_builtin_ImportError; - static const char __pyx_k_np[] = "np"; - static const char __pyx_k_init[] = "__init__"; -@@ -2500,13 +2583,11 @@ static const char __pyx_k_iteration[] = "iteration"; - static const char __pyx_k_nElements[] = "nElements"; - static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; - static const char __pyx_k_varIsFree[] = "varIsFree"; --static const char __pyx_k_ValueError[] = "ValueError"; - static const char __pyx_k_nVariables[] = "nVariables"; - static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; - static const char __pyx_k_ImportError[] = "ImportError"; - static const char __pyx_k_varNotBasic[] = "varNotBasic"; - static const char __pyx_k_varNotFixed[] = "varNotFixed"; --static const char __pyx_k_RuntimeError[] = "RuntimeError"; - static const char __pyx_k_isCompatible[] = "isCompatible"; - static const char __pyx_k_reducedCosts[] = "reducedCosts"; - static const char __pyx_k_comp_selected[] = " : comp selected"; -@@ -2520,23 +2601,12 @@ static const char __pyx_k_varIsAtLowerBound[] = "varIsAtLowerBound"; - static const char __pyx_k_varIsAtUpperBound[] = "varIsAtUpperBound"; - static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; - static const char __pyx_k_updateColumnTranspose[] = "updateColumnTranspose"; --static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; - static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; --static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; --static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; --static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; --static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; - static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; - static const char __pyx_k_self_CppSelf_cannot_be_converted[] = "self.CppSelf cannot be converted to a Python object for pickling"; --static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; - static PyObject *__pyx_n_s_CyPEPivot; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; - static PyObject *__pyx_n_s_ImportError; --static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; --static PyObject *__pyx_n_s_RuntimeError; - static PyObject *__pyx_n_s_TypeError; --static PyObject *__pyx_n_s_ValueError; - static PyObject *__pyx_n_s_clear; - static PyObject *__pyx_n_s_cline_in_traceback; - static PyObject *__pyx_kp_s_comp_selected; -@@ -2554,8 +2624,6 @@ static PyObject *__pyx_n_s_main; - static PyObject *__pyx_n_s_nElements; - static PyObject *__pyx_n_s_nVariables; - static PyObject *__pyx_n_s_name; --static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; --static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; - static PyObject *__pyx_n_s_np; - static PyObject *__pyx_n_s_numpy; - static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; -@@ -2572,7 +2640,6 @@ static PyObject *__pyx_n_s_setstate; - static PyObject *__pyx_n_s_setstate_cython; - static PyObject *__pyx_n_s_test; - static PyObject *__pyx_n_s_transposeTimes; --static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; - static PyObject *__pyx_n_s_updateColumnTranspose; - static PyObject *__pyx_n_s_updateP; - static PyObject *__pyx_n_s_updateW; -@@ -2587,19 +2654,12 @@ static PyObject *__pyx_n_s_xrange; - static int __pyx_pf_4cylp_2cy_9CyPEPivot_9CyPEPivot___init__(struct __pyx_obj_4cylp_2cy_9CyPEPivot_CyPEPivot *__pyx_v_self, PyObject *__pyx_v_cyModel); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_9CyPEPivot_9CyPEPivot_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_9CyPEPivot_CyPEPivot *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_9CyPEPivot_9CyPEPivot_4__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_9CyPEPivot_CyPEPivot *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ - static PyObject *__pyx_tp_new_4cylp_2cy_9CyPEPivot_CyPEPivot(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ - static PyObject *__pyx_int_neg_1; - static PyObject *__pyx_tuple_; - static PyObject *__pyx_tuple__2; - static PyObject *__pyx_tuple__3; - static PyObject *__pyx_tuple__4; --static PyObject *__pyx_tuple__5; --static PyObject *__pyx_tuple__6; --static PyObject *__pyx_tuple__7; --static PyObject *__pyx_tuple__8; --static PyObject *__pyx_tuple__9; - /* Late includes */ - - /* "cylp/cy/CyPEPivot.pyx":12 -@@ -2614,6 +2674,9 @@ static PyObject *__pyx_tuple__9; - static int __pyx_pw_4cylp_2cy_9CyPEPivot_9CyPEPivot_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ - static int __pyx_pw_4cylp_2cy_9CyPEPivot_9CyPEPivot_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_cyModel = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - int __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); -@@ -2666,6 +2729,9 @@ static int __pyx_pf_4cylp_2cy_9CyPEPivot_9CyPEPivot___init__(struct __pyx_obj_4c - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__init__", 0); - - /* "cylp/cy/CyPEPivot.pyx":13 -@@ -2773,6 +2839,9 @@ static PyObject *__pyx_f_4cylp_2cy_9CyPEPivot_9CyPEPivot_pivotColumn(struct __py - Py_ssize_t __pyx_t_12; - Py_ssize_t __pyx_t_13; - int __pyx_t_14; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("pivotColumn", 0); - - /* "cylp/cy/CyPEPivot.pyx":19 -@@ -3867,6 +3936,9 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyPEPivot_9CyPEPivot_2__reduce_cython__(CYT - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -3922,6 +3994,9 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyPEPivot_9CyPEPivot_4__setstate_cython__(C - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -3952,1918 +4027,331 @@ static PyObject *__pyx_pf_4cylp_2cy_9CyPEPivot_9CyPEPivot_4__setstate_cython__(C - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 -+ * ctypedef npy_cdouble complex_t -+ * -+ * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(1, a) -+ * - */ - --/* Python wrapper */ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); -- __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_v_i; -- int __pyx_v_ndim; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- int __pyx_v_t; -- char *__pyx_v_f; -- PyArray_Descr *__pyx_v_descr = 0; -- int __pyx_v_offset; -- int __pyx_r; -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { -+ PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- int __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- int __pyx_t_4; -- int __pyx_t_5; -- int __pyx_t_6; -- PyArray_Descr *__pyx_t_7; -- PyObject *__pyx_t_8 = NULL; -- char *__pyx_t_9; -- if (__pyx_v_info == NULL) { -- PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); -- return -1; -- } -- __Pyx_RefNannySetupContext("__getbuffer__", 0); -- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); -- __Pyx_GIVEREF(__pyx_v_info->obj); -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":265 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":736 - * -- * cdef int i, ndim -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -+ * cdef inline object PyArray_MultiIterNew1(a): -+ * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< - * -+ * cdef inline object PyArray_MultiIterNew2(a, b): - */ -- __pyx_v_endian_detector = 1; -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":266 -- * cdef int i, ndim -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 -+ * ctypedef npy_cdouble complex_t -+ * -+ * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(1, a) - * -- * ndim = PyArray_NDIM(self) - */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":268 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 -+ * return PyArray_MultiIterNew(1, a) - * -- * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(2, a, b) - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) - */ -- __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L4_bool_binop_done; -- } -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":271 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":739 - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not C contiguous") -+ * cdef inline object PyArray_MultiIterNew2(a, b): -+ * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< - * -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): - */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L4_bool_binop_done:; -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 -+ * return PyArray_MultiIterNew(1, a) - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(2, a, b) - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) - */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 272, __pyx_L1_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- } -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 -+ * return PyArray_MultiIterNew(2, a, b) -+ * -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(3, a, b, c) - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") - */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L7_bool_binop_done; -- } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":275 -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":742 - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not Fortran contiguous") -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): -+ * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< - * -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L7_bool_binop_done:; -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 -+ * return PyArray_MultiIterNew(2, a, b) - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(3, a, b, c) - * -- * info.buf = PyArray_DATA(self) - */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 276, __pyx_L1_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- } -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":278 -- * raise ValueError(u"ndarray is not Fortran contiguous") -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 -+ * return PyArray_MultiIterNew(3, a, b, c) - * -- * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":279 -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(4, a, b, c, d) - * -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * # Allocate new buffer for strides and shape info. -- */ -- __pyx_v_info->ndim = __pyx_v_ndim; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. - */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":283 -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- */ -- __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":284 -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim # <<<<<<<<<<<<<< -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- */ -- __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":285 -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim -- * for i in range(ndim): # <<<<<<<<<<<<<< -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] -- */ -- __pyx_t_4 = __pyx_v_ndim; -- __pyx_t_5 = __pyx_t_4; -- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { -- __pyx_v_i = __pyx_t_6; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":286 -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- */ -- (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":287 -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< -- * else: -- * info.strides = PyArray_STRIDES(self) -- */ -- (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- goto __pyx_L9; -- } -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":289 -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":745 -+ * -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -+ * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -+ * -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - */ -- /*else*/ { -- __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":290 -- * else: -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 -+ * return PyArray_MultiIterNew(3, a, b, c) -+ * -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(4, a, b, c, d) -+ * - */ -- __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); -- } -- __pyx_L9:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":291 -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL # <<<<<<<<<<<<<< -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) -- */ -- __pyx_v_info->suboffsets = NULL; -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":292 -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< -- * info.readonly = not PyArray_ISWRITEABLE(self) -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 -+ * return PyArray_MultiIterNew(4, a, b, c, d) - * -- */ -- __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":293 -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * cdef int t - */ -- __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":296 -- * -- * cdef int t -- * cdef char* f = NULL # <<<<<<<<<<<<<< -- * cdef dtype descr = PyArray_DESCR(self) -- * cdef int offset -- */ -- __pyx_v_f = NULL; -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":297 -- * cdef int t -- * cdef char* f = NULL -- * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< -- * cdef int offset -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":748 -+ * -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< - * -+ * cdef inline tuple PyDataType_SHAPE(dtype d): - */ -- __pyx_t_7 = PyArray_DESCR(__pyx_v_self); -- __pyx_t_3 = ((PyObject *)__pyx_t_7); -- __Pyx_INCREF(__pyx_t_3); -- __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); -- __pyx_t_3 = 0; -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":300 -- * cdef int offset -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 -+ * return PyArray_MultiIterNew(4, a, b, c, d) - * -- * info.obj = self # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * if not PyDataType_HASFIELDS(descr): - */ -- __Pyx_INCREF(((PyObject *)__pyx_v_self)); -- __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); -- __pyx_v_info->obj = ((PyObject *)__pyx_v_self); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); -- if (__pyx_t_1) { -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":303 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num # <<<<<<<<<<<<<< -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -+ * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape - */ -- __pyx_t_4 = __pyx_v_descr->type_num; -- __pyx_v_t = __pyx_t_4; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); -- if (!__pyx_t_2) { -- goto __pyx_L15_next_or; -- } else { -- } -- __pyx_t_2 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_L15_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":305 -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L14_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 306, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":307 -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- */ -- switch (__pyx_v_t) { -- case NPY_BYTE: -- __pyx_v_f = ((char *)"b"); -- break; -- case NPY_UBYTE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":308 -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- */ -- __pyx_v_f = ((char *)"B"); -- break; -- case NPY_SHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":309 -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- */ -- __pyx_v_f = ((char *)"h"); -- break; -- case NPY_USHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":310 -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- */ -- __pyx_v_f = ((char *)"H"); -- break; -- case NPY_INT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":311 -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- */ -- __pyx_v_f = ((char *)"i"); -- break; -- case NPY_UINT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":312 -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- */ -- __pyx_v_f = ((char *)"I"); -- break; -- case NPY_LONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":313 -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- */ -- __pyx_v_f = ((char *)"l"); -- break; -- case NPY_ULONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":314 -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- */ -- __pyx_v_f = ((char *)"L"); -- break; -- case NPY_LONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":315 -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- */ -- __pyx_v_f = ((char *)"q"); -- break; -- case NPY_ULONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":316 -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- */ -- __pyx_v_f = ((char *)"Q"); -- break; -- case NPY_FLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":317 -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- */ -- __pyx_v_f = ((char *)"f"); -- break; -- case NPY_DOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":318 -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- */ -- __pyx_v_f = ((char *)"d"); -- break; -- case NPY_LONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":319 -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- */ -- __pyx_v_f = ((char *)"g"); -- break; -- case NPY_CFLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":320 -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- */ -- __pyx_v_f = ((char *)"Zf"); -- break; -- case NPY_CDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":321 -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" -- */ -- __pyx_v_f = ((char *)"Zd"); -- break; -- case NPY_CLONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":322 -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f = "O" -- * else: -- */ -- __pyx_v_f = ((char *)"Zg"); -- break; -- case NPY_OBJECT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":323 -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_v_f = ((char *)"O"); -- break; -- default: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":325 -- * elif t == NPY_OBJECT: f = "O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * info.format = f -- * return -- */ -- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_8); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 325, __pyx_L1_error) -- break; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":326 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f # <<<<<<<<<<<<<< -- * return -- * else: -- */ -- __pyx_v_info->format = __pyx_v_f; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":327 -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f -- * return # <<<<<<<<<<<<<< -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- */ -- __pyx_r = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":329 -- * return -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- */ -- /*else*/ { -- __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":330 -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, -- */ -- (__pyx_v_info->format[0]) = '^'; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":331 -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 # <<<<<<<<<<<<<< -- * f = _util_dtypestring(descr, info.format + 1, -- * info.format + _buffer_format_string_len, -- */ -- __pyx_v_offset = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":332 -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< -- * info.format + _buffer_format_string_len, -- * &offset) -- */ -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":335 -- * info.format + _buffer_format_string_len, -- * &offset) -- * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- */ -- (__pyx_v_f[0]) = '\x00'; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- -- /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; -- if (__pyx_v_info->obj != NULL) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- goto __pyx_L2; -- __pyx_L0:; -- if (__pyx_v_info->obj == Py_None) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- __pyx_L2:; -- __Pyx_XDECREF((PyObject *)__pyx_v_descr); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); -- __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("__releasebuffer__", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":339 -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) -- */ -- PyObject_Free(__pyx_v_info->format); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":341 -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) # <<<<<<<<<<<<<< -- * # info.shape was stored after info.strides in the same block -- * -- */ -- PyObject_Free(__pyx_v_info->strides); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -- * ctypedef npy_cdouble complex_t -- * -- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(1, a) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":822 -- * -- * cdef inline object PyArray_MultiIterNew1(a): -- * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -- * ctypedef npy_cdouble complex_t -- * -- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(1, a) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -- * return PyArray_MultiIterNew(1, a) -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(2, a, b) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":825 -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): -- * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -- * return PyArray_MultiIterNew(1, a) -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(2, a, b) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -- * return PyArray_MultiIterNew(2, a, b) -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":828 -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): -- * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -- * return PyArray_MultiIterNew(2, a, b) -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":831 -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -- * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":834 -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -- * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -- * return d.subarray.shape -- * else: -- */ -- __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":838 -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape # <<<<<<<<<<<<<< -- * else: -- * return () -- */ -- __Pyx_XDECREF(__pyx_r); -- __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); -- __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -- * return d.subarray.shape -- * else: -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":840 -- * return d.subarray.shape -- * else: -- * return () # <<<<<<<<<<<<<< -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: -- */ -- /*else*/ { -- __Pyx_XDECREF(__pyx_r); -- __Pyx_INCREF(__pyx_empty_tuple); -- __pyx_r = __pyx_empty_tuple; -- goto __pyx_L0; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape -- */ -- -- /* function exit code */ -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { -- PyArray_Descr *__pyx_v_child = 0; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- PyObject *__pyx_v_fields = 0; -- PyObject *__pyx_v_childname = NULL; -- PyObject *__pyx_v_new_offset = NULL; -- PyObject *__pyx_v_t = NULL; -- char *__pyx_r; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- Py_ssize_t __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- PyObject *__pyx_t_4 = NULL; -- int __pyx_t_5; -- int __pyx_t_6; -- int __pyx_t_7; -- long __pyx_t_8; -- char *__pyx_t_9; -- __Pyx_RefNannySetupContext("_util_dtypestring", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":847 -- * -- * cdef dtype child -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * cdef tuple fields -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":848 -- * cdef dtype child -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * cdef tuple fields -- * -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- if (unlikely(__pyx_v_descr->names == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -- __PYX_ERR(2, 851, __pyx_L1_error) -- } -- __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; -- for (;;) { -- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 851, __pyx_L1_error) -- #else -- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- #endif -- __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":852 -- * -- * for childname in descr.names: -- * fields = descr.fields[childname] # <<<<<<<<<<<<<< -- * child, new_offset = fields -- * -- */ -- if (unlikely(__pyx_v_descr->fields == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); -- __PYX_ERR(2, 852, __pyx_L1_error) -- } -- __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":853 -- * for childname in descr.names: -- * fields = descr.fields[childname] -- * child, new_offset = fields # <<<<<<<<<<<<<< -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- */ -- if (likely(__pyx_v_fields != Py_None)) { -- PyObject* sequence = __pyx_v_fields; -- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); -- if (unlikely(size != 2)) { -- if (size > 2) __Pyx_RaiseTooManyValuesError(2); -- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); -- __PYX_ERR(2, 853, __pyx_L1_error) -- } -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); -- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); -- __Pyx_INCREF(__pyx_t_3); -- __Pyx_INCREF(__pyx_t_4); -- #else -- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- #endif -- } else { -- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error) -- } -- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); -- __pyx_t_3 = 0; -- __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 856, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); -- if (!__pyx_t_7) { -- goto __pyx_L8_next_or; -- } else { -- } -- __pyx_t_7 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_L8_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":859 -- * -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * # One could encode it in the format string and have Cython -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); -- if (__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_6 = __pyx_t_7; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":860 -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * # One could encode it in the format string and have Cython -- * # complain instead, BUT: < and > in format strings also imply -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 860, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":870 -- * -- * # Output padding bytes -- * while offset[0] < new_offset: # <<<<<<<<<<<<<< -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- */ -- while (1) { -- __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (!__pyx_t_6) break; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":871 -- * # Output padding bytes -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< -- * f += 1 -- * offset[0] += 1 -- */ -- (__pyx_v_f[0]) = 0x78; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":872 -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte -- * f += 1 # <<<<<<<<<<<<<< -- * offset[0] += 1 -- * -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":873 -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- * offset[0] += 1 # <<<<<<<<<<<<<< -- * -- * offset[0] += child.itemsize -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":875 -- * offset[0] += 1 -- * -- * offset[0] += child.itemsize # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(child): -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); -- if (__pyx_t_6) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":878 -- * -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num # <<<<<<<<<<<<<< -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 880, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":883 -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 98; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":884 -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":885 -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x68; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":886 -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 72; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":887 -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x69; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":888 -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 73; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":889 -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x6C; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":890 -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 76; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":891 -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x71; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":892 -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 81; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":893 -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":894 -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x64; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":895 -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x67; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":896 -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x66; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":897 -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x64; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":898 -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x67; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":899 -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (likely(__pyx_t_6)) { -- (__pyx_v_f[0]) = 79; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":901 -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * f += 1 -- * else: -- */ -- /*else*/ { -- __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 901, __pyx_L1_error) -- } -- __pyx_L15:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":902 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * f += 1 # <<<<<<<<<<<<<< -- * else: -- * # Cython ignores struct boundary information ("T{...}"), -- */ -- __pyx_v_f = (__pyx_v_f + 1); -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ int __pyx_t_1; -+ __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -+ * return d.subarray.shape -+ * else: - */ -- goto __pyx_L13; -- } -+ __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); -+ if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":906 -- * # Cython ignores struct boundary information ("T{...}"), -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< -- * return f -- * -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":752 -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape # <<<<<<<<<<<<<< -+ * else: -+ * return () - */ -- /*else*/ { -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 906, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- } -- __pyx_L13:; -+ __Pyx_XDECREF(__pyx_r); -+ __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); -+ __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -+ * return d.subarray.shape -+ * else: - */ - } -- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":907 -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) -- * return f # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":754 -+ * return d.subarray.shape -+ * else: -+ * return () # <<<<<<<<<<<<<< - * - * - */ -- __pyx_r = __pyx_v_f; -- goto __pyx_L0; -+ /*else*/ { -+ __Pyx_XDECREF(__pyx_r); -+ __Pyx_INCREF(__pyx_empty_tuple); -+ __pyx_r = __pyx_empty_tuple; -+ goto __pyx_L0; -+ } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -+ * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape - */ - - /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_4); -- __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = NULL; - __pyx_L0:; -- __Pyx_XDECREF((PyObject *)__pyx_v_child); -- __Pyx_XDECREF(__pyx_v_fields); -- __Pyx_XDECREF(__pyx_v_childname); -- __Pyx_XDECREF(__pyx_v_new_offset); -- __Pyx_XDECREF(__pyx_v_t); -+ __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -5875,7 +4363,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("set_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1023 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":930 - * - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< -@@ -5884,7 +4372,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - Py_INCREF(__pyx_v_base); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1024 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":931 - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< -@@ -5893,7 +4381,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -5905,7 +4393,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyFinishContext(); - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5920,7 +4408,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - int __pyx_t_1; - __Pyx_RefNannySetupContext("get_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1027 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":934 - * - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< -@@ -5929,7 +4417,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - __pyx_v_base = PyArray_BASE(__pyx_v_arr); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5939,7 +4427,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_t_1 = ((__pyx_v_base == NULL) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1029 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":936 - * base = PyArray_BASE(arr) - * if base is NULL: - * return None # <<<<<<<<<<<<<< -@@ -5950,7 +4438,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5959,7 +4447,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1030 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":937 - * if base is NULL: - * return None - * return base # <<<<<<<<<<<<<< -@@ -5971,7 +4459,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = ((PyObject *)__pyx_v_base); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5986,12 +4474,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { -@@ -6005,13 +4493,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_array", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - { -@@ -6023,20 +4514,20 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1036 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":943 - * cdef inline int import_array() except -1: - * try: -- * _import_array() # <<<<<<<<<<<<<< -+ * __pyx_import_array() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") - */ -- __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error) -+ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - } -@@ -6046,9 +4537,9 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1037 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":944 - * try: -- * _import_array() -+ * __pyx_import_array() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.multiarray failed to import") - * -@@ -6056,32 +4547,32 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __PYX_ERR(2, 945, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - __Pyx_XGIVEREF(__pyx_t_1); -@@ -6092,12 +4583,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - /* function exit code */ -@@ -6115,7 +4606,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -6134,9 +4625,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_umath", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -6152,16 +4646,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1042 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":949 - * cdef inline int import_umath() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -6175,7 +4669,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1043 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":950 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< -@@ -6185,28 +4679,28 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __PYX_ERR(2, 951, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -6221,7 +4715,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -6244,7 +4738,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -6263,9 +4757,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_ufunc", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -6281,16 +4778,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1048 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":955 - * cdef inline int import_ufunc() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -6304,69 +4801,246 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1049 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":956 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") -+ * - */ - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1050 -- * _import_umath() -- * except Exception: -- * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":957 -+ * _import_umath() -+ * except Exception: -+ * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -+ * -+ * cdef extern from *: -+ */ -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error) -+ __Pyx_GOTREF(__pyx_t_8); -+ __Pyx_Raise(__pyx_t_8, 0, 0, 0); -+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -+ __PYX_ERR(2, 957, __pyx_L5_except_error) -+ } -+ goto __pyx_L5_except_error; -+ __pyx_L5_except_error:; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 -+ * -+ * cdef inline int import_ufunc() except -1: -+ * try: # <<<<<<<<<<<<<< -+ * _import_umath() -+ * except Exception: -+ */ -+ __Pyx_XGIVEREF(__pyx_t_1); -+ __Pyx_XGIVEREF(__pyx_t_2); -+ __Pyx_XGIVEREF(__pyx_t_3); -+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); -+ goto __pyx_L1_error; -+ __pyx_L8_try_end:; -+ } -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 -+ * raise ImportError("numpy.core.umath failed to import") -+ * -+ * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -+ * try: -+ * _import_umath() -+ */ -+ -+ /* function exit code */ -+ __pyx_r = 0; -+ goto __pyx_L0; -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_5); -+ __Pyx_XDECREF(__pyx_t_6); -+ __Pyx_XDECREF(__pyx_t_7); -+ __Pyx_XDECREF(__pyx_t_8); -+ __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = -1; -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_timedelta64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":979 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_datetime64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":994 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { -+ npy_datetime __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1004 -+ * also needed. That can be found using `get_datetime64_unit`. -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error) -- __Pyx_GOTREF(__pyx_t_8); -- __Pyx_Raise(__pyx_t_8, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1050, __pyx_L5_except_error) -- } -- goto __pyx_L5_except_error; -- __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { -+ npy_timedelta __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1011 -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * - * -- * cdef inline int import_ufunc() except -1: -- * try: # <<<<<<<<<<<<<< -- * _import_umath() -- * except Exception: - */ -- __Pyx_XGIVEREF(__pyx_t_1); -- __Pyx_XGIVEREF(__pyx_t_2); -- __Pyx_XGIVEREF(__pyx_t_3); -- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); -- goto __pyx_L1_error; -- __pyx_L8_try_end:; -- } -+ __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -- * raise ImportError("numpy.core.umath failed to import") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object - */ - - /* function exit code */ -- __pyx_r = 0; -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { -+ NPY_DATETIMEUNIT __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1018 -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ * """ -+ * return (obj).obmeta.base # <<<<<<<<<<<<<< -+ */ -+ __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); - goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_5); -- __Pyx_XDECREF(__pyx_t_6); -- __Pyx_XDECREF(__pyx_t_7); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+ /* function exit code */ - __pyx_L0:; -- __Pyx_RefNannyFinishContext(); - return __pyx_r; - } - static struct __pyx_vtabstruct_4cylp_2cy_9CyPEPivot_CyPEPivot __pyx_vtable_4cylp_2cy_9CyPEPivot_CyPEPivot; -@@ -6414,7 +5088,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_9CyPEPivot_CyPEPivot = { - sizeof(struct __pyx_obj_4cylp_2cy_9CyPEPivot_CyPEPivot), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_9CyPEPivot_CyPEPivot, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -6467,6 +5146,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_9CyPEPivot_CyPEPivot = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyMethodDef __pyx_methods[] = { -@@ -6516,13 +5201,8 @@ static struct PyModuleDef __pyx_moduledef = { - - static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_CyPEPivot, __pyx_k_CyPEPivot, sizeof(__pyx_k_CyPEPivot), 0, 0, 1, 1}, -- {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, - {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, -- {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, -- {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, - {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, -- {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1}, - {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, - {&__pyx_kp_s_comp_selected, __pyx_k_comp_selected, sizeof(__pyx_k_comp_selected), 0, 0, 1, 0}, -@@ -6540,8 +5220,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_nElements, __pyx_k_nElements, sizeof(__pyx_k_nElements), 0, 0, 1, 1}, - {&__pyx_n_s_nVariables, __pyx_k_nVariables, sizeof(__pyx_k_nVariables), 0, 0, 1, 1}, - {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, -- {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, -- {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, - {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1}, - {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1}, - {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0}, -@@ -6558,7 +5236,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, - {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, - {&__pyx_n_s_transposeTimes, __pyx_k_transposeTimes, sizeof(__pyx_k_transposeTimes), 0, 0, 1, 1}, -- {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, - {&__pyx_n_s_updateColumnTranspose, __pyx_k_updateColumnTranspose, sizeof(__pyx_k_updateColumnTranspose), 0, 0, 1, 1}, - {&__pyx_n_s_updateP, __pyx_k_updateP, sizeof(__pyx_k_updateP), 0, 0, 1, 1}, - {&__pyx_n_s_updateW, __pyx_k_updateW, sizeof(__pyx_k_updateW), 0, 0, 1, 1}, -@@ -6580,10 +5257,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - #endif - __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 71, __pyx_L1_error) - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error) -- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error) -- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(2, 285, __pyx_L1_error) -- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 856, __pyx_L1_error) -- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error) -+ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 945, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -@@ -6612,82 +5286,27 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_GOTREF(__pyx_tuple__2); - __Pyx_GIVEREF(__pyx_tuple__2); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__3); -- __Pyx_GIVEREF(__pyx_tuple__3); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__4); -- __Pyx_GIVEREF(__pyx_tuple__4); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__5); -- __Pyx_GIVEREF(__pyx_tuple__5); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__6); -- __Pyx_GIVEREF(__pyx_tuple__6); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__7); -- __Pyx_GIVEREF(__pyx_tuple__7); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 1038, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__8); -- __Pyx_GIVEREF(__pyx_tuple__8); -+ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 945, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__3); -+ __Pyx_GIVEREF(__pyx_tuple__3); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 1044, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__9); -- __Pyx_GIVEREF(__pyx_tuple__9); -+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 951, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__4); -+ __Pyx_GIVEREF(__pyx_tuple__4); - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -6738,6 +5357,9 @@ static int __Pyx_modinit_function_export_code(void) { - static int __Pyx_modinit_type_init_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); - /*--- Type init code ---*/ - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpPrimalColumnPivotBase"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error) -@@ -6774,6 +5396,9 @@ static int __Pyx_modinit_type_init_code(void) { - static int __Pyx_modinit_type_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); - /*--- Type import code ---*/ - __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) -@@ -6803,18 +5428,38 @@ static int __Pyx_modinit_type_import_code(void) { - if (!__pyx_ptype_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector) __PYX_ERR(6, 22, __pyx_L1_error) - __pyx_vtabptr_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector = (struct __pyx_vtabstruct_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector)) __PYX_ERR(6, 22, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) -+ __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error) -- __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error) -- __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error) -+ __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error) -+ __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error) -- __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error) -+ __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error) -+ __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error) -+ __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error) -+ __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error) -+ __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error) -+ __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error) -+ __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error) -+ __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error) -+ __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error) -+ __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error) -+ __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpDualRowPivotBase"); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); -@@ -6917,13 +5562,17 @@ static int __Pyx_modinit_variable_import_code(void) { - static int __Pyx_modinit_function_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); - /*--- Function import code ---*/ - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpPrimalColumnPivotBase"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_ImportFunction(__pyx_t_1, "RunPivotColumn", (void (**)(void))&__pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_RunPivotColumn, "int (void *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportFunction(__pyx_t_1, "RunClone", (void (**)(void))&__pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_RunClone, "ClpPrimalColumnPivot *(void *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) - if (__Pyx_ImportFunction(__pyx_t_1, "RunSaveWeights", (void (**)(void))&__pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_RunSaveWeights, "void (void *, IClpSimplex *, int)") < 0) __PYX_ERR(0, 1, __pyx_L1_error) -- Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; -+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -6933,17 +5582,19 @@ static int __Pyx_modinit_function_import_code(void) { - } - - --#if PY_MAJOR_VERSION < 3 --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC void --#else -+#ifndef CYTHON_NO_PYINIT_EXPORT - #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#elif PY_MAJOR_VERSION < 3 -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" void -+#else -+#define __Pyx_PyMODINIT_FUNC void - #endif - #else --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC PyObject * -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * - #else --#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#define __Pyx_PyMODINIT_FUNC PyObject * - #endif - #endif - -@@ -7025,6 +5676,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_CyPEPivot(PyObject *__pyx_pyinit_m - #endif - { - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannyDeclarations - #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m) { -@@ -7072,11 +5726,9 @@ if (!__Pyx_RefNanny) { - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ -- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS -- #ifdef WITH_THREAD /* Python build with threading support? */ -+ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - PyEval_InitThreads(); - #endif -- #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; -@@ -7113,17 +5765,17 @@ if (!__Pyx_RefNanny) { - } - #endif - /*--- Builtin init code ---*/ -- if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - /*--- Constants init code ---*/ -- if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error) - /*--- Global type/function init code ---*/ - (void)__Pyx_modinit_global_init_code(); - (void)__Pyx_modinit_variable_export_code(); - (void)__Pyx_modinit_function_export_code(); -- if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; -- if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) -+ if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) - (void)__Pyx_modinit_variable_import_code(); -- if (unlikely(__Pyx_modinit_function_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_function_import_code() < 0)) __PYX_ERR(0, 1, __pyx_L1_error) - /*--- Execution code ---*/ - #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) - if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error) -@@ -7151,12 +5803,12 @@ if (!__Pyx_RefNanny) { - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -- * raise ImportError("numpy.core.umath failed to import") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - - /*--- Wrapped vars code ---*/ -@@ -7265,7 +5917,7 @@ static int __Pyx_ParseOptionalKeywords( - } - name = first_kw_arg; - #if PY_MAJOR_VERSION < 3 -- if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { -+ if (likely(PyString_Check(key))) { - while (*name) { - if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) - && _PyString_Eq(**name, key)) { -@@ -7292,7 +5944,7 @@ static int __Pyx_ParseOptionalKeywords( - while (*name) { - int cmp = (**name == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 -- (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : -+ (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**name, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; -@@ -7308,7 +5960,7 @@ static int __Pyx_ParseOptionalKeywords( - while (argname != first_kw_arg) { - int cmp = (**argname == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 -- (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : -+ (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**argname, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; -@@ -7530,7 +6182,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #if CYTHON_COMPILING_IN_CPYTHON - static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; -- ternaryfunc call = func->ob_type->tp_call; -+ ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -@@ -7617,7 +6269,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec - if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { - return __Pyx_PyObject_CallMethO(func, arg); - #if CYTHON_FAST_PYCCALL -- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { -+ } else if (__Pyx_PyFastCFunction_Check(func)) { - return __Pyx_PyCFunction_FastCall(func, &arg, 1); - #endif - } -@@ -7941,7 +6593,7 @@ static PyObject *__Pyx_PyLong_AbsNeg(PyObject *n) { - { - PyObject *copy = _PyLong_Copy((PyLongObject*)n); - if (likely(copy)) { -- Py_SIZE(copy) = -(Py_SIZE(copy)); -+ __Pyx_SET_SIZE(copy, -Py_SIZE(copy)); - } - return copy; - } -@@ -8134,48 +6786,6 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject - } - #endif - --/* DictGetItem */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { -- PyObject *value; -- value = PyDict_GetItemWithError(d, key); -- if (unlikely(!value)) { -- if (!PyErr_Occurred()) { -- if (unlikely(PyTuple_Check(key))) { -- PyObject* args = PyTuple_Pack(1, key); -- if (likely(args)) { -- PyErr_SetObject(PyExc_KeyError, args); -- Py_DECREF(args); -- } -- } else { -- PyErr_SetObject(PyExc_KeyError, key); -- } -- } -- return NULL; -- } -- Py_INCREF(value); -- return value; --} --#endif -- --/* RaiseTooManyValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { -- PyErr_Format(PyExc_ValueError, -- "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); --} -- --/* RaiseNeedMoreValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { -- PyErr_Format(PyExc_ValueError, -- "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", -- index, (index == 1) ? "" : "s"); --} -- --/* RaiseNoneIterError */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); --} -- - /* GetTopmostException */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * -@@ -8514,6 +7124,28 @@ static int __Pyx_SetVtable(PyObject *dict, void *vtable) { - return -1; - } - -+/* PyObjectGetAttrStrNoError */ -+static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { -+ __Pyx_PyThreadState_declare -+ __Pyx_PyThreadState_assign -+ if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) -+ __Pyx_PyErr_Clear(); -+} -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { -+ PyObject *result; -+#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 -+ PyTypeObject* tp = Py_TYPE(obj); -+ if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { -+ return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); -+ } -+#endif -+ result = __Pyx_PyObject_GetAttrStr(obj, attr_name); -+ if (unlikely(!result)) { -+ __Pyx_PyObject_GetAttrStr_ClearAttributeError(); -+ } -+ return result; -+} -+ - /* SetupReduce */ - static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { - int ret; -@@ -8541,43 +7173,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { - PyObject *setstate = NULL; - PyObject *setstate_cython = NULL; - #if CYTHON_USE_PYTYPE_LOOKUP -- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #else -- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #endif - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #else -- object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #endif -- reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; -+ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; - if (reduce_ex == object_reduce_ex) { - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #else -- object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #endif -- reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; -+ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; - if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { -- reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; -+ reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); -+ if (likely(reduce_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (reduce == object_reduce || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); - if (!setstate) PyErr_Clear(); - if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { -- setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; -+ setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); -+ if (likely(setstate_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (!setstate || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - } - PyType_Modified((PyTypeObject*)type_obj); - } - } -- goto GOOD; --BAD: -+ goto __PYX_GOOD; -+__PYX_BAD: - if (!PyErr_Occurred()) - PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); - ret = -1; --GOOD: -+__PYX_GOOD: - #if !CYTHON_USE_PYTYPE_LOOKUP - Py_XDECREF(object_reduce); - Py_XDECREF(object_reduce_ex); -@@ -8620,7 +7260,7 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { - { - #if PY_MAJOR_VERSION >= 3 - if (level == -1) { -- if (strchr(__Pyx_MODULE_NAME, '.')) { -+ if ((1) && (strchr(__Pyx_MODULE_NAME, '.'))) { - module = PyImport_ImportModuleLevelObject( - name, global_dict, empty_dict, list, 1); - if (!module) { -@@ -8657,7 +7297,7 @@ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { - - /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK --static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { -+static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { - PyObject *use_cline; - PyObject *ptype, *pvalue, *ptraceback; - #if CYTHON_COMPILING_IN_CPYTHON -@@ -8687,7 +7327,7 @@ static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { - } - if (!use_cline) { - c_line = 0; -- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); -+ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; -@@ -8761,7 +7401,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - if (__pyx_code_cache.count == __pyx_code_cache.max_count) { - int new_max = __pyx_code_cache.max_count + 64; - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( -- __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); -+ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); - if (unlikely(!entries)) { - return; - } -@@ -8784,30 +7424,31 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { -- PyCodeObject *py_code = 0; -- PyObject *py_srcfile = 0; -- PyObject *py_funcname = 0; -+ PyCodeObject *py_code = NULL; -+ PyObject *py_funcname = NULL; - #if PY_MAJOR_VERSION < 3 -+ PyObject *py_srcfile = NULL; - py_srcfile = PyString_FromString(filename); -- #else -- py_srcfile = PyUnicode_FromString(filename); -- #endif - if (!py_srcfile) goto bad; -+ #endif - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; -+ funcname = PyUnicode_AsUTF8(py_funcname); -+ if (!funcname) goto bad; - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); -- #else -- py_funcname = PyUnicode_FromString(funcname); -+ if (!py_funcname) goto bad; - #endif - } -- if (!py_funcname) goto bad; -+ #if PY_MAJOR_VERSION < 3 - py_code = __Pyx_PyCode_New( - 0, - 0, -@@ -8826,11 +7467,16 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - __pyx_empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); -- Py_DECREF(py_funcname); -+ #else -+ py_code = PyCode_NewEmpty(filename, funcname, py_line); -+ #endif -+ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline - return py_code; - bad: -- Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -+ #if PY_MAJOR_VERSION < 3 -+ Py_XDECREF(py_srcfile); -+ #endif - return NULL; - } - static void __Pyx_AddTraceback(const char *funcname, int c_line, -@@ -8862,37 +7508,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - Py_XDECREF(py_frame); - } - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(long) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(long) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(long) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(long), -- little, !is_unsigned); -- } --} -- - /* CIntFromPyVerify */ - #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ - __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) -@@ -8915,37 +7530,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - return (target_type) value;\ - } - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(int) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(int) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(int) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(int), -- little, !is_unsigned); -- } --} -- - /* Declarations */ - #if CYTHON_CCOMPLEX - #ifdef __cplusplus -@@ -9063,7 +7647,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_float(a, a); - return __Pyx_c_prod_float(a, a); - case 3: - z = __Pyx_c_prod_float(a, a); -@@ -9218,7 +7801,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_double(a, a); - return __Pyx_c_prod_double(a, a); - case 3: - z = __Pyx_c_prod_double(a, a); -@@ -9257,24 +7839,31 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - #endif - - /* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { -- const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { -- if (sizeof(enum NPY_TYPES) < sizeof(long)) { -+ if (sizeof(long) < sizeof(long)) { - return PyInt_FromLong((long) value); -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { -+ } else if (sizeof(long) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); - #ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { -+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); - #endif - } - } else { -- if (sizeof(enum NPY_TYPES) <= sizeof(long)) { -+ if (sizeof(long) <= sizeof(long)) { - return PyInt_FromLong((long) value); - #ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { -+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); - #endif - } -@@ -9282,14 +7871,21 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES v - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), -+ return _PyLong_FromByteArray(bytes, sizeof(long), - little, !is_unsigned); - } - } - - /* CIntFromPy */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -9476,9 +8072,54 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - return (int) -1; - } - -+/* CIntToPy */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif -+ const int is_unsigned = neg_one > const_zero; -+ if (is_unsigned) { -+ if (sizeof(int) < sizeof(long)) { -+ return PyInt_FromLong((long) value); -+ } else if (sizeof(int) <= sizeof(unsigned long)) { -+ return PyLong_FromUnsignedLong((unsigned long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+#endif -+ } -+ } else { -+ if (sizeof(int) <= sizeof(long)) { -+ return PyInt_FromLong((long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ return PyLong_FromLongLong((PY_LONG_LONG) value); -+#endif -+ } -+ } -+ { -+ int one = 1; int little = (int)*(unsigned char *)&one; -+ unsigned char *bytes = (unsigned char *)&value; -+ return _PyLong_FromByteArray(bytes, sizeof(int), -+ little, !is_unsigned); -+ } -+} -+ - /* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -10083,6 +8724,23 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_DECREF(x); - return ival; - } -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { -+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { -+ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); -+#if PY_MAJOR_VERSION < 3 -+ } else if (likely(PyInt_CheckExact(o))) { -+ return PyInt_AS_LONG(o); -+#endif -+ } else { -+ Py_ssize_t ival; -+ PyObject *x; -+ x = PyNumber_Index(o); -+ if (!x) return -1; -+ ival = PyInt_AsLong(x); -+ Py_DECREF(x); -+ return ival; -+ } -+} - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); - } -diff --git a/cylp/cy/CyPivotPythonBase.cpp b/cylp/cy/CyPivotPythonBase.cpp -index dfb373e..ad6db3d 100644 ---- a/cylp/cy/CyPivotPythonBase.cpp -+++ b/cylp/cy/CyPivotPythonBase.cpp -@@ -1,14 +1,16 @@ --/* Generated by Cython 0.29.12 */ -+/* Generated by Cython 0.29.25 */ - -+#ifndef PY_SSIZE_T_CLEAN - #define PY_SSIZE_T_CLEAN -+#endif /* PY_SSIZE_T_CLEAN */ - #include "Python.h" - #ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. - #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. - #else --#define CYTHON_ABI "0_29_12" --#define CYTHON_HEX_VERSION 0x001D0CF0 -+#define CYTHON_ABI "0_29_25" -+#define CYTHON_HEX_VERSION 0x001D19F0 - #define CYTHON_FUTURE_DIVISION 0 - #include - #ifndef offsetof -@@ -155,7 +157,7 @@ - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif -- #if PY_VERSION_HEX < 0x030300F0 -+ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) -@@ -174,7 +176,7 @@ - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL -- #define CYTHON_FAST_PYCALL 1 -+ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1) - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) -@@ -193,7 +195,9 @@ - #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) - #endif - #if CYTHON_USE_PYLONG_INTERNALS -- #include "longintrepr.h" -+ #if PY_MAJOR_VERSION < 3 -+ #include "longintrepr.h" -+ #endif - #undef SHIFT - #undef BASE - #undef MASK -@@ -324,9 +328,68 @@ class __Pyx_FakeReference { - #define __Pyx_DefaultClassType PyClass_Type - #else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" --#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 -- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ -- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -+ #define __Pyx_DefaultClassType PyType_Type -+#if PY_VERSION_HEX >= 0x030B00A1 -+ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, -+ PyObject *code, PyObject *c, PyObject* n, PyObject *v, -+ PyObject *fv, PyObject *cell, PyObject* fn, -+ PyObject *name, int fline, PyObject *lnos) { -+ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; -+ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; -+ const char *fn_cstr=NULL; -+ const char *name_cstr=NULL; -+ PyCodeObject* co=NULL; -+ PyObject *type, *value, *traceback; -+ PyErr_Fetch(&type, &value, &traceback); -+ if (!(kwds=PyDict_New())) goto end; -+ if (!(argcount=PyLong_FromLong(a))) goto end; -+ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; -+ if (!(posonlyargcount=PyLong_FromLong(0))) goto end; -+ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; -+ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; -+ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; -+ if (!(nlocals=PyLong_FromLong(l))) goto end; -+ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; -+ if (!(stacksize=PyLong_FromLong(s))) goto end; -+ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; -+ if (!(flags=PyLong_FromLong(f))) goto end; -+ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; -+ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; -+ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; -+ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; -+ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; -+ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here -+ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; -+ Py_XDECREF((PyObject*)co); -+ co = (PyCodeObject*)call_result; -+ call_result = NULL; -+ if (0) { -+ cleanup_code_too: -+ Py_XDECREF((PyObject*)co); -+ co = NULL; -+ } -+ end: -+ Py_XDECREF(kwds); -+ Py_XDECREF(argcount); -+ Py_XDECREF(posonlyargcount); -+ Py_XDECREF(kwonlyargcount); -+ Py_XDECREF(nlocals); -+ Py_XDECREF(stacksize); -+ Py_XDECREF(replace); -+ Py_XDECREF(call_result); -+ Py_XDECREF(empty); -+ if (type) { -+ PyErr_Restore(type, value, traceback); -+ } -+ return co; -+ } - #else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -@@ -440,8 +503,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #endif - #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 -+ #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) -+ #else -+ #define __Pyx_PyUnicode_READY(op) (0) -+ #endif - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) -@@ -449,7 +516,15 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) -+ #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) -+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) -+ #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) -+ #endif -+ #else -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) -+ #endif - #else - #define CYTHON_PEP393_ENABLED 0 - #define PyUnicode_1BYTE_KIND 1 -@@ -498,8 +573,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define PyString_Type PyUnicode_Type - #define PyString_Check PyUnicode_Check - #define PyString_CheckExact PyUnicode_CheckExact -+#ifndef PyObject_Unicode - #define PyObject_Unicode PyObject_Str - #endif -+#endif - #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) - #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) -@@ -510,6 +587,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #ifndef PySet_CheckExact - #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) - #endif -+#if PY_VERSION_HEX >= 0x030900A4 -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) -+#else -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) -+#endif - #if CYTHON_ASSUME_SAFE_MACROS - #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) - #else -@@ -543,13 +627,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong -- #define __Pyx_PyInt_AsHash_t PyInt_AsLong -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t - #else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t -- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t - #endif - #if PY_MAJOR_VERSION >= 3 -- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) -+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) - #else - #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) - #endif -@@ -590,11 +674,10 @@ static CYTHON_INLINE float __PYX_NAN() { - #define __Pyx_truncl truncl - #endif - -- -+#define __PYX_MARK_ERR_POS(f_index, lineno) \ -+ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } - #define __PYX_ERR(f_index, lineno, Ln_error) \ --{ \ -- __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ --} -+ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } - - #ifndef __PYX_EXTERN_C - #ifdef __cplusplus -@@ -612,7 +695,13 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "pythread.h" - #include "ICoinIndexedVector.hpp" - #include "numpy/arrayobject.h" -+#include "numpy/ndarrayobject.h" -+#include "numpy/ndarraytypes.h" -+#include "numpy/arrayscalars.h" - #include "numpy/ufuncobject.h" -+ -+ /* NumPy API declarations from "numpy/__init__.pxd" */ -+ - #include "ClpDualRowPivot.hpp" - #include "ClpFactorization.hpp" - #include "IClpDualRowPivotBase.h" -@@ -641,11 +730,11 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "OsiSolverInterface.hpp" - #include "CbcCompareUser.hpp" - #include "ICbcModel.hpp" -+#include - #include "ios" - #include "new" - #include "stdexcept" - #include "typeinfo" --#include - #include - #include "IClpPrimalColumnPivotBase.h" - #include "ClpPrimalColumnPivot.hpp" -@@ -746,6 +835,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); - static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); - #if CYTHON_ASSUME_SAFE_MACROS - #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) - #else -@@ -881,23 +971,23 @@ static const char *__pyx_filename; - - static const char *__pyx_f[] = { - "stringsource", -- "cylp\\cy\\CyPivotPythonBase.pyx", -+ "cylp/cy/CyPivotPythonBase.pyx", - "__init__.pxd", - "type.pxd", - "bool.pxd", - "complex.pxd", -- "cylp\\cy\\CyCoinIndexedVector.pxd", -- "cylp\\cy\\CyClpDualRowPivotBase.pxd", -- "cylp\\cy\\CyCoinModel.pxd", -- "cylp\\cy\\CyCoinPackedMatrix.pxd", -- "cylp\\cy\\CyCgl.pxd", -- "cylp\\cy\\CyCbcNode.pxd", -- "cylp\\cy\\CyOsiSolverInterface.pxd", -- "cylp\\cy\\CyCbcModel.pxd", -- "cylp\\cy\\CyClpSimplex.pxd", -+ "cylp/cy/CyCoinIndexedVector.pxd", -+ "cylp/cy/CyClpDualRowPivotBase.pxd", -+ "cylp/cy/CyCoinModel.pxd", -+ "cylp/cy/CyCoinPackedMatrix.pxd", -+ "cylp/cy/CyCgl.pxd", -+ "cylp/cy/CyCbcNode.pxd", -+ "cylp/cy/CyOsiSolverInterface.pxd", -+ "cylp/cy/CyCbcModel.pxd", -+ "cylp/cy/CyClpSimplex.pxd", - }; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":776 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":690 - * # in Cython to enable them only on the right systems. - * - * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< -@@ -906,7 +996,7 @@ static const char *__pyx_f[] = { - */ - typedef npy_int8 __pyx_t_5numpy_int8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":777 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":691 - * - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< -@@ -915,7 +1005,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; - */ - typedef npy_int16 __pyx_t_5numpy_int16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":778 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":692 - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< -@@ -924,7 +1014,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; - */ - typedef npy_int32 __pyx_t_5numpy_int32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":779 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":693 - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t - * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< -@@ -933,7 +1023,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; - */ - typedef npy_int64 __pyx_t_5numpy_int64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":783 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":697 - * #ctypedef npy_int128 int128_t - * - * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< -@@ -942,7 +1032,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; - */ - typedef npy_uint8 __pyx_t_5numpy_uint8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":784 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":698 - * - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< -@@ -951,7 +1041,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; - */ - typedef npy_uint16 __pyx_t_5numpy_uint16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":785 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":699 - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< -@@ -960,7 +1050,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; - */ - typedef npy_uint32 __pyx_t_5numpy_uint32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":786 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":700 - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t - * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< -@@ -969,7 +1059,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; - */ - typedef npy_uint64 __pyx_t_5numpy_uint64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":790 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":704 - * #ctypedef npy_uint128 uint128_t - * - * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< -@@ -978,7 +1068,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; - */ - typedef npy_float32 __pyx_t_5numpy_float32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":791 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":705 - * - * ctypedef npy_float32 float32_t - * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< -@@ -987,7 +1077,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; - */ - typedef npy_float64 __pyx_t_5numpy_float64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":800 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":714 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< -@@ -996,7 +1086,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; - */ - typedef npy_long __pyx_t_5numpy_int_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":801 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":715 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< -@@ -1005,7 +1095,7 @@ typedef npy_long __pyx_t_5numpy_int_t; - */ - typedef npy_longlong __pyx_t_5numpy_long_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":802 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":716 - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t - * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< -@@ -1014,7 +1104,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; - */ - typedef npy_longlong __pyx_t_5numpy_longlong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":804 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":718 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< -@@ -1023,7 +1113,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; - */ - typedef npy_ulong __pyx_t_5numpy_uint_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":805 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":719 - * - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< -@@ -1032,7 +1122,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":806 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":720 - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t - * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< -@@ -1041,7 +1131,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":808 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":722 - * ctypedef npy_ulonglong ulonglong_t - * - * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< -@@ -1050,7 +1140,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - */ - typedef npy_intp __pyx_t_5numpy_intp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":809 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":723 - * - * ctypedef npy_intp intp_t - * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< -@@ -1059,7 +1149,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; - */ - typedef npy_uintp __pyx_t_5numpy_uintp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":811 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":725 - * ctypedef npy_uintp uintp_t - * - * ctypedef npy_double float_t # <<<<<<<<<<<<<< -@@ -1068,7 +1158,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; - */ - typedef npy_double __pyx_t_5numpy_float_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":812 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":726 - * - * ctypedef npy_double float_t - * ctypedef npy_double double_t # <<<<<<<<<<<<<< -@@ -1077,7 +1167,7 @@ typedef npy_double __pyx_t_5numpy_float_t; - */ - typedef npy_double __pyx_t_5numpy_double_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":813 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":727 - * ctypedef npy_double float_t - * ctypedef npy_double double_t - * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< -@@ -1140,7 +1230,7 @@ struct __pyx_obj_4cylp_2cy_12CyClpSimplex_VarStatus; - struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase; - struct __pyx_obj_4cylp_2cy_17CyPivotPythonBase_CyPivotPythonBase; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":815 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":729 - * ctypedef npy_longdouble longdouble_t - * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< -@@ -1149,7 +1239,7 @@ struct __pyx_obj_4cylp_2cy_17CyPivotPythonBase_CyPivotPythonBase; - */ - typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":816 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":730 - * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< -@@ -1158,7 +1248,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - */ - typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":817 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":731 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< -@@ -1167,7 +1257,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - */ - typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":819 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":733 - * ctypedef npy_clongdouble clongdouble_t - * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< -@@ -1880,6 +1970,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #ifndef Py_MEMBER_SIZE - #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) - #endif -+#if CYTHON_FAST_PYCALL - static size_t __pyx_pyframe_localsplus_offset = 0; - #include "frameobject.h" - #define __Pxy_PyFrame_Initialize_Offsets()\ -@@ -1887,6 +1978,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) - #define __Pyx_PyFrame_GetLocalsplus(frame)\ - (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) -+#endif // CYTHON_FAST_PYCALL - #endif - - /* PyObjectCall.proto */ -@@ -1958,29 +2050,6 @@ static void __Pyx_WriteUnraisable(const char *name, int clineno, - /* RaiseException.proto */ - static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); - --/* DictGetItem.proto */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); --#define __Pyx_PyObject_Dict_GetItem(obj, name)\ -- (likely(PyDict_CheckExact(obj)) ?\ -- __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) --#else --#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) --#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) --#endif -- --/* RaiseTooManyValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); -- --/* RaiseNeedMoreValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); -- --/* RaiseNoneIterError.proto */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -- --/* ExtTypeTest.proto */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); -- - /* GetTopmostException.proto */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); -@@ -2053,6 +2122,9 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - /* SetVTable.proto */ - static int __Pyx_SetVtable(PyObject *dict, void *vtable); - -+/* PyObjectGetAttrStrNoError.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); -+ - /* SetupReduce.proto */ - static int __Pyx_setup_reduce(PyObject* type_obj); - -@@ -2108,8 +2180,10 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); - static void __Pyx_AddTraceback(const char *funcname, int c_line, - int py_line, const char *filename); - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -+/* GCCDiagnostics.proto */ -+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -+#define __Pyx_HAS_GCC_DIAGNOSTIC -+#endif - - /* RealImag.proto */ - #if CYTHON_CCOMPLEX -@@ -2210,10 +2284,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); - #endif - - /* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); -- --/* CIntFromPy.proto */ --static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); - - /* CIntToPy.proto */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); -@@ -2221,6 +2292,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); - /* CIntFromPy.proto */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); - -+/* CIntFromPy.proto */ -+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); -+ - /* FastTypeChecks.proto */ - #if CYTHON_COMPILING_IN_CPYTHON - #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) -@@ -2342,8 +2416,17 @@ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; - static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; - static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; - static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -+static PyTypeObject *__pyx_ptype_5numpy_generic = 0; -+static PyTypeObject *__pyx_ptype_5numpy_number = 0; -+static PyTypeObject *__pyx_ptype_5numpy_integer = 0; -+static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; -+static PyTypeObject *__pyx_ptype_5numpy_floating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; -+static PyTypeObject *__pyx_ptype_5numpy_character = 0; - static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ - - /* Module declarations from 'cylp.cy.CyClpDualRowPivotBase' */ - static PyTypeObject *__pyx_ptype_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase = 0; -@@ -2404,61 +2487,41 @@ int __pyx_module_is_main_cylp__cy__CyPivotPythonBase = 0; - - /* Implementation of 'cylp.cy.CyPivotPythonBase' */ - static PyObject *__pyx_builtin_TypeError; --static PyObject *__pyx_builtin_ValueError; --static PyObject *__pyx_builtin_range; --static PyObject *__pyx_builtin_RuntimeError; - static PyObject *__pyx_builtin_ImportError; - static const char __pyx_k_init[] = "__init__"; - static const char __pyx_k_main[] = "__main__"; - static const char __pyx_k_name[] = "__name__"; - static const char __pyx_k_test[] = "__test__"; --static const char __pyx_k_range[] = "range"; - static const char __pyx_k_reduce[] = "__reduce__"; - static const char __pyx_k_getstate[] = "__getstate__"; - static const char __pyx_k_setstate[] = "__setstate__"; - static const char __pyx_k_TypeError[] = "TypeError"; - static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; --static const char __pyx_k_ValueError[] = "ValueError"; - static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; - static const char __pyx_k_ImportError[] = "ImportError"; - static const char __pyx_k_pivotColumn[] = "pivotColumn"; - static const char __pyx_k_saveWeights[] = "saveWeights"; --static const char __pyx_k_RuntimeError[] = "RuntimeError"; - static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; - static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; - static const char __pyx_k_CyPivotPythonBase[] = "CyPivotPythonBase"; - static const char __pyx_k_pivotMethodObject[] = "pivotMethodObject"; - static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; --static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; - static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; --static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; --static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; --static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; --static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; - static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; - static const char __pyx_k_self_CppSelf_cannot_be_converted[] = "self.CppSelf cannot be converted to a Python object for pickling"; --static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; - static PyObject *__pyx_n_s_CyPivotPythonBase; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; - static PyObject *__pyx_n_s_ImportError; --static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; --static PyObject *__pyx_n_s_RuntimeError; - static PyObject *__pyx_n_s_TypeError; --static PyObject *__pyx_n_s_ValueError; - static PyObject *__pyx_n_s_cline_in_traceback; - static PyObject *__pyx_n_s_getstate; - static PyObject *__pyx_n_s_init; - static PyObject *__pyx_n_s_main; - static PyObject *__pyx_n_s_name; --static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; --static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; - static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; - static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; - static PyObject *__pyx_n_s_pivotColumn; - static PyObject *__pyx_n_s_pivotMethodObject; - static PyObject *__pyx_n_s_pyx_vtable; --static PyObject *__pyx_n_s_range; - static PyObject *__pyx_n_s_reduce; - static PyObject *__pyx_n_s_reduce_cython; - static PyObject *__pyx_n_s_reduce_ex; -@@ -2467,23 +2530,15 @@ static PyObject *__pyx_kp_s_self_CppSelf_cannot_be_converted; - static PyObject *__pyx_n_s_setstate; - static PyObject *__pyx_n_s_setstate_cython; - static PyObject *__pyx_n_s_test; --static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; - static int __pyx_pf_4cylp_2cy_17CyPivotPythonBase_17CyPivotPythonBase___init__(struct __pyx_obj_4cylp_2cy_17CyPivotPythonBase_CyPivotPythonBase *__pyx_v_self, PyObject *__pyx_v_pivotMethodObject); /* proto */ - static void __pyx_pf_4cylp_2cy_17CyPivotPythonBase_17CyPivotPythonBase_2__dealloc__(struct __pyx_obj_4cylp_2cy_17CyPivotPythonBase_CyPivotPythonBase *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_17CyPivotPythonBase_17CyPivotPythonBase_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_17CyPivotPythonBase_CyPivotPythonBase *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_17CyPivotPythonBase_17CyPivotPythonBase_6__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_17CyPivotPythonBase_CyPivotPythonBase *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ - static PyObject *__pyx_tp_new_4cylp_2cy_17CyPivotPythonBase_CyPivotPythonBase(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ - static PyObject *__pyx_tuple_; - static PyObject *__pyx_tuple__2; - static PyObject *__pyx_tuple__3; - static PyObject *__pyx_tuple__4; --static PyObject *__pyx_tuple__5; --static PyObject *__pyx_tuple__6; --static PyObject *__pyx_tuple__7; --static PyObject *__pyx_tuple__8; --static PyObject *__pyx_tuple__9; - /* Late includes */ - - /* "cylp/cy/CyPivotPythonBase.pyx":7 -@@ -2498,6 +2553,9 @@ static PyObject *__pyx_tuple__9; - static int __pyx_pw_4cylp_2cy_17CyPivotPythonBase_17CyPivotPythonBase_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ - static int __pyx_pw_4cylp_2cy_17CyPivotPythonBase_17CyPivotPythonBase_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_pivotMethodObject = 0; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - int __pyx_r; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); -@@ -2550,6 +2608,9 @@ static int __pyx_pf_4cylp_2cy_17CyPivotPythonBase_17CyPivotPythonBase___init__(s - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__init__", 0); - - /* "cylp/cy/CyPivotPythonBase.pyx":8 -@@ -2691,6 +2752,9 @@ static PyObject *__pyx_f_4cylp_2cy_17CyPivotPythonBase_17CyPivotPythonBase_pivot - PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; - PyObject *__pyx_t_5 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("pivotColumn", 0); - - /* "cylp/cy/CyPivotPythonBase.pyx":18 -@@ -2975,6 +3039,9 @@ static void __pyx_f_4cylp_2cy_17CyPivotPythonBase_17CyPivotPythonBase_saveWeight - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - PyObject *__pyx_t_6 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("saveWeights", 0); - - /* "cylp/cy/CyPivotPythonBase.pyx":42 -@@ -3105,6 +3172,9 @@ static PyObject *__pyx_pf_4cylp_2cy_17CyPivotPythonBase_17CyPivotPythonBase_4__r - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -3160,6 +3230,9 @@ static PyObject *__pyx_pf_4cylp_2cy_17CyPivotPythonBase_17CyPivotPythonBase_6__s - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -3190,863 +3263,7 @@ static PyObject *__pyx_pf_4cylp_2cy_17CyPivotPythonBase_17CyPivotPythonBase_6__s - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); -- __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_v_i; -- int __pyx_v_ndim; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- int __pyx_v_t; -- char *__pyx_v_f; -- PyArray_Descr *__pyx_v_descr = 0; -- int __pyx_v_offset; -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- int __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- int __pyx_t_4; -- int __pyx_t_5; -- int __pyx_t_6; -- PyArray_Descr *__pyx_t_7; -- PyObject *__pyx_t_8 = NULL; -- char *__pyx_t_9; -- if (__pyx_v_info == NULL) { -- PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); -- return -1; -- } -- __Pyx_RefNannySetupContext("__getbuffer__", 0); -- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); -- __Pyx_GIVEREF(__pyx_v_info->obj); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":265 -- * -- * cdef int i, ndim -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":266 -- * cdef int i, ndim -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * -- * ndim = PyArray_NDIM(self) -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":268 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- */ -- __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L4_bool_binop_done; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":271 -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not C contiguous") -- * -- */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L4_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 272, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L7_bool_binop_done; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":275 -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not Fortran contiguous") -- * -- */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 276, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":278 -- * raise ValueError(u"ndarray is not Fortran contiguous") -- * -- * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":279 -- * -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * # Allocate new buffer for strides and shape info. -- */ -- __pyx_v_info->ndim = __pyx_v_ndim; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":283 -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- */ -- __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":284 -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim # <<<<<<<<<<<<<< -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- */ -- __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":285 -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim -- * for i in range(ndim): # <<<<<<<<<<<<<< -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] -- */ -- __pyx_t_4 = __pyx_v_ndim; -- __pyx_t_5 = __pyx_t_4; -- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { -- __pyx_v_i = __pyx_t_6; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":286 -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- */ -- (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":287 -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< -- * else: -- * info.strides = PyArray_STRIDES(self) -- */ -- (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- goto __pyx_L9; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":289 -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- */ -- /*else*/ { -- __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":290 -- * else: -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- */ -- __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); -- } -- __pyx_L9:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":291 -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL # <<<<<<<<<<<<<< -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) -- */ -- __pyx_v_info->suboffsets = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":292 -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< -- * info.readonly = not PyArray_ISWRITEABLE(self) -- * -- */ -- __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":293 -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< -- * -- * cdef int t -- */ -- __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":296 -- * -- * cdef int t -- * cdef char* f = NULL # <<<<<<<<<<<<<< -- * cdef dtype descr = PyArray_DESCR(self) -- * cdef int offset -- */ -- __pyx_v_f = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":297 -- * cdef int t -- * cdef char* f = NULL -- * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< -- * cdef int offset -- * -- */ -- __pyx_t_7 = PyArray_DESCR(__pyx_v_self); -- __pyx_t_3 = ((PyObject *)__pyx_t_7); -- __Pyx_INCREF(__pyx_t_3); -- __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":300 -- * cdef int offset -- * -- * info.obj = self # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(descr): -- */ -- __Pyx_INCREF(((PyObject *)__pyx_v_self)); -- __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); -- __pyx_v_info->obj = ((PyObject *)__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":303 -- * -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num # <<<<<<<<<<<<<< -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- */ -- __pyx_t_4 = __pyx_v_descr->type_num; -- __pyx_v_t = __pyx_t_4; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); -- if (!__pyx_t_2) { -- goto __pyx_L15_next_or; -- } else { -- } -- __pyx_t_2 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_L15_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":305 -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L14_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 306, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":307 -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- */ -- switch (__pyx_v_t) { -- case NPY_BYTE: -- __pyx_v_f = ((char *)"b"); -- break; -- case NPY_UBYTE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":308 -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- */ -- __pyx_v_f = ((char *)"B"); -- break; -- case NPY_SHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":309 -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- */ -- __pyx_v_f = ((char *)"h"); -- break; -- case NPY_USHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":310 -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- */ -- __pyx_v_f = ((char *)"H"); -- break; -- case NPY_INT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":311 -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- */ -- __pyx_v_f = ((char *)"i"); -- break; -- case NPY_UINT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":312 -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- */ -- __pyx_v_f = ((char *)"I"); -- break; -- case NPY_LONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":313 -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- */ -- __pyx_v_f = ((char *)"l"); -- break; -- case NPY_ULONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":314 -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- */ -- __pyx_v_f = ((char *)"L"); -- break; -- case NPY_LONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":315 -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- */ -- __pyx_v_f = ((char *)"q"); -- break; -- case NPY_ULONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":316 -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- */ -- __pyx_v_f = ((char *)"Q"); -- break; -- case NPY_FLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":317 -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- */ -- __pyx_v_f = ((char *)"f"); -- break; -- case NPY_DOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":318 -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- */ -- __pyx_v_f = ((char *)"d"); -- break; -- case NPY_LONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":319 -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- */ -- __pyx_v_f = ((char *)"g"); -- break; -- case NPY_CFLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":320 -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- */ -- __pyx_v_f = ((char *)"Zf"); -- break; -- case NPY_CDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":321 -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" -- */ -- __pyx_v_f = ((char *)"Zd"); -- break; -- case NPY_CLONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":322 -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f = "O" -- * else: -- */ -- __pyx_v_f = ((char *)"Zg"); -- break; -- case NPY_OBJECT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":323 -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_v_f = ((char *)"O"); -- break; -- default: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":325 -- * elif t == NPY_OBJECT: f = "O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * info.format = f -- * return -- */ -- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_8); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 325, __pyx_L1_error) -- break; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":326 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f # <<<<<<<<<<<<<< -- * return -- * else: -- */ -- __pyx_v_info->format = __pyx_v_f; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":327 -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f -- * return # <<<<<<<<<<<<<< -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- */ -- __pyx_r = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":329 -- * return -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- */ -- /*else*/ { -- __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":330 -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, -- */ -- (__pyx_v_info->format[0]) = '^'; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":331 -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 # <<<<<<<<<<<<<< -- * f = _util_dtypestring(descr, info.format + 1, -- * info.format + _buffer_format_string_len, -- */ -- __pyx_v_offset = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":332 -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< -- * info.format + _buffer_format_string_len, -- * &offset) -- */ -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":335 -- * info.format + _buffer_format_string_len, -- * &offset) -- * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- */ -- (__pyx_v_f[0]) = '\x00'; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- -- /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; -- if (__pyx_v_info->obj != NULL) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- goto __pyx_L2; -- __pyx_L0:; -- if (__pyx_v_info->obj == Py_None) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- __pyx_L2:; -- __Pyx_XDECREF((PyObject *)__pyx_v_descr); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); -- __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("__releasebuffer__", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":339 -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) -- */ -- PyObject_Free(__pyx_v_info->format); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":341 -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) # <<<<<<<<<<<<<< -- * # info.shape was stored after info.strides in the same block -- * -- */ -- PyObject_Free(__pyx_v_info->strides); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -@@ -4058,9 +3275,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":822 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":736 - * - * cdef inline object PyArray_MultiIterNew1(a): - * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< -@@ -4068,13 +3288,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - * cdef inline object PyArray_MultiIterNew2(a, b): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -@@ -4093,7 +3313,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -@@ -4105,9 +3325,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":825 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":739 - * - * cdef inline object PyArray_MultiIterNew2(a, b): - * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< -@@ -4115,13 +3338,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - * cdef inline object PyArray_MultiIterNew3(a, b, c): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -@@ -4140,7 +3363,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -@@ -4152,9 +3375,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":828 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":742 - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): - * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< -@@ -4162,13 +3388,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -@@ -4187,7 +3413,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -4199,9 +3425,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":831 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":745 - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -@@ -4209,13 +3438,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -4234,7 +3463,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -4246,9 +3475,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":834 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":748 - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< -@@ -4256,13 +3488,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - * cdef inline tuple PyDataType_SHAPE(dtype d): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -4281,7 +3513,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -4295,7 +3527,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - int __pyx_t_1; - __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -4305,7 +3537,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":838 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":752 - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): - * return d.subarray.shape # <<<<<<<<<<<<<< -@@ -4317,7 +3549,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -4326,12 +3558,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":840 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":754 - * return d.subarray.shape - * else: - * return () # <<<<<<<<<<<<<< - * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: -+ * - */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); -@@ -4340,7 +3572,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - goto __pyx_L0; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -4355,765 +3587,19 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 -+ * int _import_umath() except -1 - * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -+ * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -+ * Py_INCREF(base) # important to do this before stealing the reference below! -+ * PyArray_SetBaseObject(arr, base) - */ - --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { -- PyArray_Descr *__pyx_v_child = 0; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- PyObject *__pyx_v_fields = 0; -- PyObject *__pyx_v_childname = NULL; -- PyObject *__pyx_v_new_offset = NULL; -- PyObject *__pyx_v_t = NULL; -- char *__pyx_r; -+static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { - __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- Py_ssize_t __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- PyObject *__pyx_t_4 = NULL; -- int __pyx_t_5; -- int __pyx_t_6; -- int __pyx_t_7; -- long __pyx_t_8; -- char *__pyx_t_9; -- __Pyx_RefNannySetupContext("_util_dtypestring", 0); -+ __Pyx_RefNannySetupContext("set_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":847 -- * -- * cdef dtype child -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * cdef tuple fields -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":848 -- * cdef dtype child -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * cdef tuple fields -- * -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- if (unlikely(__pyx_v_descr->names == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -- __PYX_ERR(2, 851, __pyx_L1_error) -- } -- __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; -- for (;;) { -- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 851, __pyx_L1_error) -- #else -- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- #endif -- __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":852 -- * -- * for childname in descr.names: -- * fields = descr.fields[childname] # <<<<<<<<<<<<<< -- * child, new_offset = fields -- * -- */ -- if (unlikely(__pyx_v_descr->fields == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); -- __PYX_ERR(2, 852, __pyx_L1_error) -- } -- __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":853 -- * for childname in descr.names: -- * fields = descr.fields[childname] -- * child, new_offset = fields # <<<<<<<<<<<<<< -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- */ -- if (likely(__pyx_v_fields != Py_None)) { -- PyObject* sequence = __pyx_v_fields; -- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); -- if (unlikely(size != 2)) { -- if (size > 2) __Pyx_RaiseTooManyValuesError(2); -- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); -- __PYX_ERR(2, 853, __pyx_L1_error) -- } -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); -- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); -- __Pyx_INCREF(__pyx_t_3); -- __Pyx_INCREF(__pyx_t_4); -- #else -- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- #endif -- } else { -- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error) -- } -- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); -- __pyx_t_3 = 0; -- __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 856, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); -- if (!__pyx_t_7) { -- goto __pyx_L8_next_or; -- } else { -- } -- __pyx_t_7 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_L8_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":859 -- * -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * # One could encode it in the format string and have Cython -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); -- if (__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_6 = __pyx_t_7; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":860 -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * # One could encode it in the format string and have Cython -- * # complain instead, BUT: < and > in format strings also imply -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 860, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":870 -- * -- * # Output padding bytes -- * while offset[0] < new_offset: # <<<<<<<<<<<<<< -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- */ -- while (1) { -- __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (!__pyx_t_6) break; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":871 -- * # Output padding bytes -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< -- * f += 1 -- * offset[0] += 1 -- */ -- (__pyx_v_f[0]) = 0x78; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":872 -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte -- * f += 1 # <<<<<<<<<<<<<< -- * offset[0] += 1 -- * -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":873 -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- * offset[0] += 1 # <<<<<<<<<<<<<< -- * -- * offset[0] += child.itemsize -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":875 -- * offset[0] += 1 -- * -- * offset[0] += child.itemsize # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(child): -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); -- if (__pyx_t_6) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":878 -- * -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num # <<<<<<<<<<<<<< -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 880, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":883 -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 98; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":884 -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":885 -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x68; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":886 -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 72; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":887 -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x69; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":888 -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 73; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":889 -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x6C; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":890 -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 76; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":891 -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x71; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":892 -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 81; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":893 -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":894 -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x64; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":895 -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x67; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":896 -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x66; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":897 -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x64; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":898 -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x67; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":899 -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (likely(__pyx_t_6)) { -- (__pyx_v_f[0]) = 79; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":901 -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * f += 1 -- * else: -- */ -- /*else*/ { -- __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 901, __pyx_L1_error) -- } -- __pyx_L15:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":902 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * f += 1 # <<<<<<<<<<<<<< -- * else: -- * # Cython ignores struct boundary information ("T{...}"), -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- goto __pyx_L13; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":906 -- * # Cython ignores struct boundary information ("T{...}"), -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< -- * return f -- * -- */ -- /*else*/ { -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 906, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- } -- __pyx_L13:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- } -- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":907 -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) -- * return f # <<<<<<<<<<<<<< -- * -- * -- */ -- __pyx_r = __pyx_v_f; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_4); -- __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = NULL; -- __pyx_L0:; -- __Pyx_XDECREF((PyObject *)__pyx_v_child); -- __Pyx_XDECREF(__pyx_v_fields); -- __Pyx_XDECREF(__pyx_v_childname); -- __Pyx_XDECREF(__pyx_v_new_offset); -- __Pyx_XDECREF(__pyx_v_t); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -- * int _import_umath() except -1 -- * -- * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -- * Py_INCREF(base) # important to do this before stealing the reference below! -- * PyArray_SetBaseObject(arr, base) -- */ -- --static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("set_array_base", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1023 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":930 - * - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< -@@ -5122,7 +3608,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - Py_INCREF(__pyx_v_base); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1024 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":931 - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< -@@ -5131,7 +3617,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -5143,7 +3629,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyFinishContext(); - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5158,7 +3644,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - int __pyx_t_1; - __Pyx_RefNannySetupContext("get_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1027 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":934 - * - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< -@@ -5167,7 +3653,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - __pyx_v_base = PyArray_BASE(__pyx_v_arr); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5177,7 +3663,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_t_1 = ((__pyx_v_base == NULL) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1029 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":936 - * base = PyArray_BASE(arr) - * if base is NULL: - * return None # <<<<<<<<<<<<<< -@@ -5188,7 +3674,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5197,7 +3683,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1030 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":937 - * if base is NULL: - * return None - * return base # <<<<<<<<<<<<<< -@@ -5209,7 +3695,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = ((PyObject *)__pyx_v_base); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5224,12 +3710,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { -@@ -5243,13 +3729,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_array", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - { -@@ -5261,20 +3750,20 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1036 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":943 - * cdef inline int import_array() except -1: - * try: -- * _import_array() # <<<<<<<<<<<<<< -+ * __pyx_import_array() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") - */ -- __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error) -+ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - } -@@ -5284,9 +3773,9 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1037 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":944 - * try: -- * _import_array() -+ * __pyx_import_array() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.multiarray failed to import") - * -@@ -5294,32 +3783,32 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __PYX_ERR(2, 945, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - __Pyx_XGIVEREF(__pyx_t_1); -@@ -5330,12 +3819,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - /* function exit code */ -@@ -5353,7 +3842,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -5372,9 +3861,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_umath", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5390,16 +3882,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1042 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":949 - * cdef inline int import_umath() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5413,7 +3905,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1043 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":950 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< -@@ -5423,28 +3915,28 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __PYX_ERR(2, 951, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5459,7 +3951,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -5482,7 +3974,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -5501,9 +3993,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_ufunc", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5519,16 +4014,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1048 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":955 - * cdef inline int import_ufunc() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5542,35 +4037,38 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1049 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":956 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") -+ * - */ - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1050 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":957 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -+ * -+ * cdef extern from *: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __PYX_ERR(2, 957, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5585,7 +4083,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -5607,6 +4105,180 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_RefNannyFinishContext(); - return __pyx_r; - } -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_timedelta64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":979 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_datetime64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":994 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { -+ npy_datetime __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1004 -+ * also needed. That can be found using `get_datetime64_unit`. -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { -+ npy_timedelta __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1011 -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { -+ NPY_DATETIMEUNIT __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1018 -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ * """ -+ * return (obj).obmeta.base # <<<<<<<<<<<<<< -+ */ -+ __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} - static struct __pyx_vtabstruct_4cylp_2cy_17CyPivotPythonBase_CyPivotPythonBase __pyx_vtable_4cylp_2cy_17CyPivotPythonBase_CyPivotPythonBase; - - static PyObject *__pyx_tp_new_4cylp_2cy_17CyPivotPythonBase_CyPivotPythonBase(PyTypeObject *t, PyObject *a, PyObject *k) { -@@ -5630,9 +4302,9 @@ static void __pyx_tp_dealloc_4cylp_2cy_17CyPivotPythonBase_CyPivotPythonBase(PyO - { - PyObject *etype, *eval, *etb; - PyErr_Fetch(&etype, &eval, &etb); -- ++Py_REFCNT(o); -+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1); - __pyx_pw_4cylp_2cy_17CyPivotPythonBase_17CyPivotPythonBase_3__dealloc__(o); -- --Py_REFCNT(o); -+ __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1); - PyErr_Restore(etype, eval, etb); - } - Py_CLEAR(p->pivotMethodObject); -@@ -5672,7 +4344,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_17CyPivotPythonBase_CyPivotPythonBase = - sizeof(struct __pyx_obj_4cylp_2cy_17CyPivotPythonBase_CyPivotPythonBase), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_17CyPivotPythonBase_CyPivotPythonBase, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -5725,6 +4402,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_17CyPivotPythonBase_CyPivotPythonBase = - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyMethodDef __pyx_methods[] = { -@@ -5774,26 +4457,18 @@ static struct PyModuleDef __pyx_moduledef = { - - static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_CyPivotPythonBase, __pyx_k_CyPivotPythonBase, sizeof(__pyx_k_CyPivotPythonBase), 0, 0, 1, 1}, -- {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, - {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, -- {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, -- {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, - {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, -- {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, - {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1}, - {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, - {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, - {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, -- {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, -- {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, - {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0}, - {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, - {&__pyx_n_s_pivotColumn, __pyx_k_pivotColumn, sizeof(__pyx_k_pivotColumn), 0, 0, 1, 1}, - {&__pyx_n_s_pivotMethodObject, __pyx_k_pivotMethodObject, sizeof(__pyx_k_pivotMethodObject), 0, 0, 1, 1}, - {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, -- {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, - {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, -@@ -5802,15 +4477,11 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, - {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, - {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, -- {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, - {0, 0, 0, 0, 0, 0, 0} - }; - static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error) -- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error) -- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(2, 285, __pyx_L1_error) -- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 856, __pyx_L1_error) -- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error) -+ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 945, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -@@ -5839,82 +4510,27 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_GOTREF(__pyx_tuple__2); - __Pyx_GIVEREF(__pyx_tuple__2); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__3); -- __Pyx_GIVEREF(__pyx_tuple__3); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__4); -- __Pyx_GIVEREF(__pyx_tuple__4); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__5); -- __Pyx_GIVEREF(__pyx_tuple__5); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__6); -- __Pyx_GIVEREF(__pyx_tuple__6); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__7); -- __Pyx_GIVEREF(__pyx_tuple__7); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 1038, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__8); -- __Pyx_GIVEREF(__pyx_tuple__8); -+ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 945, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__3); -+ __Pyx_GIVEREF(__pyx_tuple__3); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 1044, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__9); -- __Pyx_GIVEREF(__pyx_tuple__9); -+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 951, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__4); -+ __Pyx_GIVEREF(__pyx_tuple__4); - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -5964,6 +4580,9 @@ static int __Pyx_modinit_function_export_code(void) { - static int __Pyx_modinit_type_init_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); - /*--- Type init code ---*/ - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpPrimalColumnPivotBase"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error) -@@ -6000,6 +4619,9 @@ static int __Pyx_modinit_type_init_code(void) { - static int __Pyx_modinit_type_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); - /*--- Type import code ---*/ - __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) -@@ -6029,18 +4651,38 @@ static int __Pyx_modinit_type_import_code(void) { - if (!__pyx_ptype_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector) __PYX_ERR(6, 22, __pyx_L1_error) - __pyx_vtabptr_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector = (struct __pyx_vtabstruct_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector)) __PYX_ERR(6, 22, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) -+ __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error) -- __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error) -- __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error) -+ __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error) -+ __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error) -- __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error) -+ __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error) -+ __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error) -+ __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error) -+ __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error) -+ __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error) -+ __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error) -+ __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error) -+ __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error) -+ __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error) -+ __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error) -+ __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpDualRowPivotBase"); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); -@@ -6143,13 +4785,17 @@ static int __Pyx_modinit_variable_import_code(void) { - static int __Pyx_modinit_function_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); - /*--- Function import code ---*/ - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpPrimalColumnPivotBase"); if (!__pyx_t_1) __PYX_ERR(1, 1, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_ImportFunction(__pyx_t_1, "RunPivotColumn", (void (**)(void))&__pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_RunPivotColumn, "int (void *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error) - if (__Pyx_ImportFunction(__pyx_t_1, "RunClone", (void (**)(void))&__pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_RunClone, "ClpPrimalColumnPivot *(void *, int)") < 0) __PYX_ERR(1, 1, __pyx_L1_error) - if (__Pyx_ImportFunction(__pyx_t_1, "RunSaveWeights", (void (**)(void))&__pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_RunSaveWeights, "void (void *, IClpSimplex *, int)") < 0) __PYX_ERR(1, 1, __pyx_L1_error) -- Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; -+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -6159,17 +4805,19 @@ static int __Pyx_modinit_function_import_code(void) { - } - - --#if PY_MAJOR_VERSION < 3 --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC void --#else -+#ifndef CYTHON_NO_PYINIT_EXPORT - #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#elif PY_MAJOR_VERSION < 3 -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" void -+#else -+#define __Pyx_PyMODINIT_FUNC void - #endif - #else --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC PyObject * -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * - #else --#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#define __Pyx_PyMODINIT_FUNC PyObject * - #endif - #endif - -@@ -6251,6 +4899,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_CyPivotPythonBase(PyObject *__pyx_ - #endif - { - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannyDeclarations - #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m) { -@@ -6298,11 +4949,9 @@ if (!__Pyx_RefNanny) { - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ -- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS -- #ifdef WITH_THREAD /* Python build with threading support? */ -+ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - PyEval_InitThreads(); - #endif -- #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; -@@ -6339,17 +4988,17 @@ if (!__Pyx_RefNanny) { - } - #endif - /*--- Builtin init code ---*/ -- if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Constants init code ---*/ -- if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Global type/function init code ---*/ - (void)__Pyx_modinit_global_init_code(); - (void)__Pyx_modinit_variable_export_code(); - (void)__Pyx_modinit_function_export_code(); -- if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; -- if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) -+ if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) - (void)__Pyx_modinit_variable_import_code(); -- if (unlikely(__Pyx_modinit_function_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_function_import_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Execution code ---*/ - #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) - if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error) -@@ -6365,12 +5014,12 @@ if (!__Pyx_RefNanny) { - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -- * raise ImportError("numpy.core.umath failed to import") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - - /*--- Wrapped vars code ---*/ -@@ -6479,7 +5128,7 @@ static int __Pyx_ParseOptionalKeywords( - } - name = first_kw_arg; - #if PY_MAJOR_VERSION < 3 -- if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) { -+ if (likely(PyString_Check(key))) { - while (*name) { - if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key)) - && _PyString_Eq(**name, key)) { -@@ -6506,7 +5155,7 @@ static int __Pyx_ParseOptionalKeywords( - while (*name) { - int cmp = (**name == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 -- (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 : -+ (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**name, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; -@@ -6522,7 +5171,7 @@ static int __Pyx_ParseOptionalKeywords( - while (argname != first_kw_arg) { - int cmp = (**argname == key) ? 0 : - #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3 -- (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 : -+ (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 : - #endif - PyUnicode_Compare(**argname, key); - if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad; -@@ -6731,7 +5380,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #if CYTHON_COMPILING_IN_CPYTHON - static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; -- ternaryfunc call = func->ob_type->tp_call; -+ ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -@@ -6818,7 +5467,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec - if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { - return __Pyx_PyObject_CallMethO(func, arg); - #if CYTHON_FAST_PYCCALL -- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { -+ } else if (__Pyx_PyFastCFunction_Check(func)) { - return __Pyx_PyCFunction_FastCall(func, &arg, 1); - #endif - } -@@ -7083,61 +5732,6 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject - } - #endif - --/* DictGetItem */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { -- PyObject *value; -- value = PyDict_GetItemWithError(d, key); -- if (unlikely(!value)) { -- if (!PyErr_Occurred()) { -- if (unlikely(PyTuple_Check(key))) { -- PyObject* args = PyTuple_Pack(1, key); -- if (likely(args)) { -- PyErr_SetObject(PyExc_KeyError, args); -- Py_DECREF(args); -- } -- } else { -- PyErr_SetObject(PyExc_KeyError, key); -- } -- } -- return NULL; -- } -- Py_INCREF(value); -- return value; --} --#endif -- --/* RaiseTooManyValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { -- PyErr_Format(PyExc_ValueError, -- "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); --} -- --/* RaiseNeedMoreValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { -- PyErr_Format(PyExc_ValueError, -- "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", -- index, (index == 1) ? "" : "s"); --} -- --/* RaiseNoneIterError */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); --} -- --/* ExtTypeTest */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { -- if (unlikely(!type)) { -- PyErr_SetString(PyExc_SystemError, "Missing type object"); -- return 0; -- } -- if (likely(__Pyx_TypeCheck(obj, type))) -- return 1; -- PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", -- Py_TYPE(obj)->tp_name, type->tp_name); -- return 0; --} -- - /* GetTopmostException */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * -@@ -7476,6 +6070,28 @@ static int __Pyx_SetVtable(PyObject *dict, void *vtable) { - return -1; - } - -+/* PyObjectGetAttrStrNoError */ -+static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { -+ __Pyx_PyThreadState_declare -+ __Pyx_PyThreadState_assign -+ if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) -+ __Pyx_PyErr_Clear(); -+} -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { -+ PyObject *result; -+#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 -+ PyTypeObject* tp = Py_TYPE(obj); -+ if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { -+ return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); -+ } -+#endif -+ result = __Pyx_PyObject_GetAttrStr(obj, attr_name); -+ if (unlikely(!result)) { -+ __Pyx_PyObject_GetAttrStr_ClearAttributeError(); -+ } -+ return result; -+} -+ - /* SetupReduce */ - static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { - int ret; -@@ -7503,43 +6119,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { - PyObject *setstate = NULL; - PyObject *setstate_cython = NULL; - #if CYTHON_USE_PYTYPE_LOOKUP -- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #else -- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #endif - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #else -- object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #endif -- reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; -+ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; - if (reduce_ex == object_reduce_ex) { - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #else -- object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #endif -- reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; -+ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; - if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { -- reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; -+ reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); -+ if (likely(reduce_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (reduce == object_reduce || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); - if (!setstate) PyErr_Clear(); - if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { -- setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; -+ setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); -+ if (likely(setstate_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (!setstate || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - } - PyType_Modified((PyTypeObject*)type_obj); - } - } -- goto GOOD; --BAD: -+ goto __PYX_GOOD; -+__PYX_BAD: - if (!PyErr_Occurred()) - PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); - ret = -1; --GOOD: -+__PYX_GOOD: - #if !CYTHON_USE_PYTYPE_LOOKUP - Py_XDECREF(object_reduce); - Py_XDECREF(object_reduce_ex); -@@ -7580,7 +6204,7 @@ static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UIN - - /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK --static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { -+static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { - PyObject *use_cline; - PyObject *ptype, *pvalue, *ptraceback; - #if CYTHON_COMPILING_IN_CPYTHON -@@ -7610,7 +6234,7 @@ static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { - } - if (!use_cline) { - c_line = 0; -- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); -+ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; -@@ -7684,7 +6308,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - if (__pyx_code_cache.count == __pyx_code_cache.max_count) { - int new_max = __pyx_code_cache.max_count + 64; - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( -- __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); -+ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); - if (unlikely(!entries)) { - return; - } -@@ -7707,30 +6331,31 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { -- PyCodeObject *py_code = 0; -- PyObject *py_srcfile = 0; -- PyObject *py_funcname = 0; -+ PyCodeObject *py_code = NULL; -+ PyObject *py_funcname = NULL; - #if PY_MAJOR_VERSION < 3 -+ PyObject *py_srcfile = NULL; - py_srcfile = PyString_FromString(filename); -- #else -- py_srcfile = PyUnicode_FromString(filename); -- #endif - if (!py_srcfile) goto bad; -+ #endif - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; -+ funcname = PyUnicode_AsUTF8(py_funcname); -+ if (!funcname) goto bad; - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); -- #else -- py_funcname = PyUnicode_FromString(funcname); -+ if (!py_funcname) goto bad; - #endif - } -- if (!py_funcname) goto bad; -+ #if PY_MAJOR_VERSION < 3 - py_code = __Pyx_PyCode_New( - 0, - 0, -@@ -7749,11 +6374,16 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - __pyx_empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); -- Py_DECREF(py_funcname); -+ #else -+ py_code = PyCode_NewEmpty(filename, funcname, py_line); -+ #endif -+ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline - return py_code; - bad: -- Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -+ #if PY_MAJOR_VERSION < 3 -+ Py_XDECREF(py_srcfile); -+ #endif - return NULL; - } - static void __Pyx_AddTraceback(const char *funcname, int c_line, -@@ -7785,37 +6415,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - Py_XDECREF(py_frame); - } - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(int) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(int) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(int) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(int), -- little, !is_unsigned); -- } --} -- - /* Declarations */ - #if CYTHON_CCOMPLEX - #ifdef __cplusplus -@@ -7933,7 +6532,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_float(a, a); - return __Pyx_c_prod_float(a, a); - case 3: - z = __Pyx_c_prod_float(a, a); -@@ -8088,7 +6686,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_double(a, a); - return __Pyx_c_prod_double(a, a); - case 3: - z = __Pyx_c_prod_double(a, a); -@@ -8126,251 +6723,54 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - #endif - #endif - --/* CIntFromPyVerify */ --#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ -- __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) --#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ -- __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) --#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ -- {\ -- func_type value = func_value;\ -- if (sizeof(target_type) < sizeof(func_type)) {\ -- if (unlikely(value != (func_type) (target_type) value)) {\ -- func_type zero = 0;\ -- if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ -- return (target_type) -1;\ -- if (is_unsigned && unlikely(value < zero))\ -- goto raise_neg_overflow;\ -- else\ -- goto raise_overflow;\ -- }\ -- }\ -- return (target_type) value;\ -- } -- - /* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { -- const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(enum NPY_TYPES) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" - #endif -- } -- } else { -- if (sizeof(enum NPY_TYPES) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop - #endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), -- little, !is_unsigned); -- } --} -- --/* CIntFromPy */ --static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; - const int is_unsigned = neg_one > const_zero; --#if PY_MAJOR_VERSION < 3 -- if (likely(PyInt_Check(x))) { -+ if (is_unsigned) { - if (sizeof(int) < sizeof(long)) { -- __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) -- } else { -- long val = PyInt_AS_LONG(x); -- if (is_unsigned && unlikely(val < 0)) { -- goto raise_neg_overflow; -- } -- return (int) val; -- } -- } else --#endif -- if (likely(PyLong_Check(x))) { -- if (is_unsigned) { --#if CYTHON_USE_PYLONG_INTERNALS -- const digit* digits = ((PyLongObject*)x)->ob_digit; -- switch (Py_SIZE(x)) { -- case 0: return (int) 0; -- case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) -- case 2: -- if (8 * sizeof(int) > 1 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { -- return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -- } -- } -- break; -- case 3: -- if (8 * sizeof(int) > 2 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { -- return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -- } -- } -- break; -- case 4: -- if (8 * sizeof(int) > 3 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { -- return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -- } -- } -- break; -- } --#endif --#if CYTHON_COMPILING_IN_CPYTHON -- if (unlikely(Py_SIZE(x) < 0)) { -- goto raise_neg_overflow; -- } --#else -- { -- int result = PyObject_RichCompareBool(x, Py_False, Py_LT); -- if (unlikely(result < 0)) -- return (int) -1; -- if (unlikely(result == 1)) -- goto raise_neg_overflow; -- } --#endif -- if (sizeof(int) <= sizeof(unsigned long)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) --#endif -- } -- } else { --#if CYTHON_USE_PYLONG_INTERNALS -- const digit* digits = ((PyLongObject*)x)->ob_digit; -- switch (Py_SIZE(x)) { -- case 0: return (int) 0; -- case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) -- case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) -- case -2: -- if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -- } -- } -- break; -- case 2: -- if (8 * sizeof(int) > 1 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -- return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -- } -- } -- break; -- case -3: -- if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -- } -- } -- break; -- case 3: -- if (8 * sizeof(int) > 2 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -- return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -- } -- } -- break; -- case -4: -- if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -- } -- } -- break; -- case 4: -- if (8 * sizeof(int) > 3 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -- return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -- } -- } -- break; -- } --#endif -- if (sizeof(int) <= sizeof(long)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) --#endif -- } -- } -- { --#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) -- PyErr_SetString(PyExc_RuntimeError, -- "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); --#else -- int val; -- PyObject *v = __Pyx_PyNumber_IntOrLong(x); -- #if PY_MAJOR_VERSION < 3 -- if (likely(v) && !PyLong_Check(v)) { -- PyObject *tmp = v; -- v = PyNumber_Long(tmp); -- Py_DECREF(tmp); -- } -- #endif -- if (likely(v)) { -- int one = 1; int is_little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&val; -- int ret = _PyLong_AsByteArray((PyLongObject *)v, -- bytes, sizeof(val), -- is_little, !is_unsigned); -- Py_DECREF(v); -- if (likely(!ret)) -- return val; -- } -+ return PyInt_FromLong((long) value); -+ } else if (sizeof(int) <= sizeof(unsigned long)) { -+ return PyLong_FromUnsignedLong((unsigned long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); - #endif -- return (int) -1; - } - } else { -- int val; -- PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); -- if (!tmp) return (int) -1; -- val = __Pyx_PyInt_As_int(tmp); -- Py_DECREF(tmp); -- return val; -+ if (sizeof(int) <= sizeof(long)) { -+ return PyInt_FromLong((long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ return PyLong_FromLongLong((PY_LONG_LONG) value); -+#endif -+ } -+ } -+ { -+ int one = 1; int little = (int)*(unsigned char *)&one; -+ unsigned char *bytes = (unsigned char *)&value; -+ return _PyLong_FromByteArray(bytes, sizeof(int), -+ little, !is_unsigned); - } --raise_overflow: -- PyErr_SetString(PyExc_OverflowError, -- "value too large to convert to int"); -- return (int) -1; --raise_neg_overflow: -- PyErr_SetString(PyExc_OverflowError, -- "can't convert negative value to int"); -- return (int) -1; - } - - /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { - if (sizeof(long) < sizeof(long)) { -@@ -8399,9 +6799,38 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - } - } - -+/* CIntFromPyVerify */ -+#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ -+ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) -+#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ -+ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) -+#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\ -+ {\ -+ func_type value = func_value;\ -+ if (sizeof(target_type) < sizeof(func_type)) {\ -+ if (unlikely(value != (func_type) (target_type) value)) {\ -+ func_type zero = 0;\ -+ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\ -+ return (target_type) -1;\ -+ if (is_unsigned && unlikely(value < zero))\ -+ goto raise_neg_overflow;\ -+ else\ -+ goto raise_overflow;\ -+ }\ -+ }\ -+ return (target_type) value;\ -+ } -+ - /* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -8588,6 +7017,202 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - return (long) -1; - } - -+/* CIntFromPy */ -+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif -+ const int is_unsigned = neg_one > const_zero; -+#if PY_MAJOR_VERSION < 3 -+ if (likely(PyInt_Check(x))) { -+ if (sizeof(int) < sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) -+ } else { -+ long val = PyInt_AS_LONG(x); -+ if (is_unsigned && unlikely(val < 0)) { -+ goto raise_neg_overflow; -+ } -+ return (int) val; -+ } -+ } else -+#endif -+ if (likely(PyLong_Check(x))) { -+ if (is_unsigned) { -+#if CYTHON_USE_PYLONG_INTERNALS -+ const digit* digits = ((PyLongObject*)x)->ob_digit; -+ switch (Py_SIZE(x)) { -+ case 0: return (int) 0; -+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) -+ case 2: -+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { -+ return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ } -+ } -+ break; -+ case 3: -+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { -+ return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ } -+ } -+ break; -+ case 4: -+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { -+ return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ } -+ } -+ break; -+ } -+#endif -+#if CYTHON_COMPILING_IN_CPYTHON -+ if (unlikely(Py_SIZE(x) < 0)) { -+ goto raise_neg_overflow; -+ } -+#else -+ { -+ int result = PyObject_RichCompareBool(x, Py_False, Py_LT); -+ if (unlikely(result < 0)) -+ return (int) -1; -+ if (unlikely(result == 1)) -+ goto raise_neg_overflow; -+ } -+#endif -+ if (sizeof(int) <= sizeof(unsigned long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -+#endif -+ } -+ } else { -+#if CYTHON_USE_PYLONG_INTERNALS -+ const digit* digits = ((PyLongObject*)x)->ob_digit; -+ switch (Py_SIZE(x)) { -+ case 0: return (int) 0; -+ case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) -+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) -+ case -2: -+ if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ } -+ } -+ break; -+ case 2: -+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ } -+ } -+ break; -+ case -3: -+ if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ } -+ } -+ break; -+ case 3: -+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ } -+ } -+ break; -+ case -4: -+ if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ } -+ } -+ break; -+ case 4: -+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -+ return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ } -+ } -+ break; -+ } -+#endif -+ if (sizeof(int) <= sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) -+#endif -+ } -+ } -+ { -+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) -+ PyErr_SetString(PyExc_RuntimeError, -+ "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); -+#else -+ int val; -+ PyObject *v = __Pyx_PyNumber_IntOrLong(x); -+ #if PY_MAJOR_VERSION < 3 -+ if (likely(v) && !PyLong_Check(v)) { -+ PyObject *tmp = v; -+ v = PyNumber_Long(tmp); -+ Py_DECREF(tmp); -+ } -+ #endif -+ if (likely(v)) { -+ int one = 1; int is_little = (int)*(unsigned char *)&one; -+ unsigned char *bytes = (unsigned char *)&val; -+ int ret = _PyLong_AsByteArray((PyLongObject *)v, -+ bytes, sizeof(val), -+ is_little, !is_unsigned); -+ Py_DECREF(v); -+ if (likely(!ret)) -+ return val; -+ } -+#endif -+ return (int) -1; -+ } -+ } else { -+ int val; -+ PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); -+ if (!tmp) return (int) -1; -+ val = __Pyx_PyInt_As_int(tmp); -+ Py_DECREF(tmp); -+ return val; -+ } -+raise_overflow: -+ PyErr_SetString(PyExc_OverflowError, -+ "value too large to convert to int"); -+ return (int) -1; -+raise_neg_overflow: -+ PyErr_SetString(PyExc_OverflowError, -+ "can't convert negative value to int"); -+ return (int) -1; -+} -+ - /* FastTypeChecks */ - #if CYTHON_COMPILING_IN_CPYTHON - static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { -@@ -9006,6 +7631,23 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_DECREF(x); - return ival; - } -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { -+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { -+ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); -+#if PY_MAJOR_VERSION < 3 -+ } else if (likely(PyInt_CheckExact(o))) { -+ return PyInt_AS_LONG(o); -+#endif -+ } else { -+ Py_ssize_t ival; -+ PyObject *x; -+ x = PyNumber_Index(o); -+ if (!x) return -1; -+ ival = PyInt_AsLong(x); -+ Py_DECREF(x); -+ return ival; -+ } -+} - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); - } -diff --git a/cylp/cy/CyTest.cpp b/cylp/cy/CyTest.cpp -index 27df348..5d2bf28 100644 ---- a/cylp/cy/CyTest.cpp -+++ b/cylp/cy/CyTest.cpp -@@ -1,14 +1,16 @@ --/* Generated by Cython 0.29.21 */ -+/* Generated by Cython 0.29.25 */ - -+#ifndef PY_SSIZE_T_CLEAN - #define PY_SSIZE_T_CLEAN -+#endif /* PY_SSIZE_T_CLEAN */ - #include "Python.h" - #ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. - #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. - #else --#define CYTHON_ABI "0_29_21" --#define CYTHON_HEX_VERSION 0x001D15F0 -+#define CYTHON_ABI "0_29_25" -+#define CYTHON_HEX_VERSION 0x001D19F0 - #define CYTHON_FUTURE_DIVISION 0 - #include - #ifndef offsetof -@@ -155,7 +157,7 @@ - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif -- #if PY_VERSION_HEX < 0x030300F0 -+ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) -@@ -174,7 +176,7 @@ - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL -- #define CYTHON_FAST_PYCALL 1 -+ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1) - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) -@@ -193,7 +195,9 @@ - #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) - #endif - #if CYTHON_USE_PYLONG_INTERNALS -- #include "longintrepr.h" -+ #if PY_MAJOR_VERSION < 3 -+ #include "longintrepr.h" -+ #endif - #undef SHIFT - #undef BASE - #undef MASK -@@ -324,9 +328,68 @@ class __Pyx_FakeReference { - #define __Pyx_DefaultClassType PyClass_Type - #else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" --#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 -- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ -- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -+ #define __Pyx_DefaultClassType PyType_Type -+#if PY_VERSION_HEX >= 0x030B00A1 -+ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, -+ PyObject *code, PyObject *c, PyObject* n, PyObject *v, -+ PyObject *fv, PyObject *cell, PyObject* fn, -+ PyObject *name, int fline, PyObject *lnos) { -+ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; -+ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; -+ const char *fn_cstr=NULL; -+ const char *name_cstr=NULL; -+ PyCodeObject* co=NULL; -+ PyObject *type, *value, *traceback; -+ PyErr_Fetch(&type, &value, &traceback); -+ if (!(kwds=PyDict_New())) goto end; -+ if (!(argcount=PyLong_FromLong(a))) goto end; -+ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; -+ if (!(posonlyargcount=PyLong_FromLong(0))) goto end; -+ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; -+ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; -+ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; -+ if (!(nlocals=PyLong_FromLong(l))) goto end; -+ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; -+ if (!(stacksize=PyLong_FromLong(s))) goto end; -+ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; -+ if (!(flags=PyLong_FromLong(f))) goto end; -+ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; -+ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; -+ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; -+ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; -+ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; -+ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here -+ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; -+ Py_XDECREF((PyObject*)co); -+ co = (PyCodeObject*)call_result; -+ call_result = NULL; -+ if (0) { -+ cleanup_code_too: -+ Py_XDECREF((PyObject*)co); -+ co = NULL; -+ } -+ end: -+ Py_XDECREF(kwds); -+ Py_XDECREF(argcount); -+ Py_XDECREF(posonlyargcount); -+ Py_XDECREF(kwonlyargcount); -+ Py_XDECREF(nlocals); -+ Py_XDECREF(stacksize); -+ Py_XDECREF(replace); -+ Py_XDECREF(call_result); -+ Py_XDECREF(empty); -+ if (type) { -+ PyErr_Restore(type, value, traceback); -+ } -+ return co; -+ } - #else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -@@ -440,8 +503,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #endif - #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 -+ #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) -+ #else -+ #define __Pyx_PyUnicode_READY(op) (0) -+ #endif - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) -@@ -450,7 +517,11 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) - #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) -+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) -+ #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) -+ #endif - #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) - #endif -@@ -556,10 +627,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong -- #define __Pyx_PyInt_AsHash_t PyInt_AsLong -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t - #else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t -- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t - #endif - #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) -@@ -627,7 +698,13 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "ClpFactorization.hpp" - #include "IClpPrimalColumnPivotBase.h" - #include "numpy/arrayobject.h" -+#include "numpy/ndarrayobject.h" -+#include "numpy/ndarraytypes.h" -+#include "numpy/arrayscalars.h" - #include "numpy/ufuncobject.h" -+ -+ /* NumPy API declarations from "numpy/__init__.pxd" */ -+ - #include "ClpDualRowPivot.hpp" - #include "IClpDualRowPivotBase.h" - #include "CoinModel.hpp" -@@ -655,11 +732,11 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "OsiSolverInterface.hpp" - #include "CbcCompareUser.hpp" - #include "ICbcModel.hpp" -+#include - #include "ios" - #include "new" - #include "stdexcept" - #include "typeinfo" --#include - #include - #include "IClpSimplex.hpp" - #ifdef _OPENMP -@@ -758,6 +835,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); - static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); - #if CYTHON_ASSUME_SAFE_MACROS - #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) - #else -@@ -911,7 +989,7 @@ static const char *__pyx_f[] = { - "cylp/cy/CyPEPivot.pxd", - }; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":775 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":690 - * # in Cython to enable them only on the right systems. - * - * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< -@@ -920,7 +998,7 @@ static const char *__pyx_f[] = { - */ - typedef npy_int8 __pyx_t_5numpy_int8_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":776 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":691 - * - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< -@@ -929,7 +1007,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; - */ - typedef npy_int16 __pyx_t_5numpy_int16_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":777 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":692 - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< -@@ -938,7 +1016,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; - */ - typedef npy_int32 __pyx_t_5numpy_int32_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":778 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":693 - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t - * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< -@@ -947,7 +1025,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; - */ - typedef npy_int64 __pyx_t_5numpy_int64_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":782 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":697 - * #ctypedef npy_int128 int128_t - * - * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< -@@ -956,7 +1034,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; - */ - typedef npy_uint8 __pyx_t_5numpy_uint8_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":783 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":698 - * - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< -@@ -965,7 +1043,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; - */ - typedef npy_uint16 __pyx_t_5numpy_uint16_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":784 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":699 - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< -@@ -974,7 +1052,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; - */ - typedef npy_uint32 __pyx_t_5numpy_uint32_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":785 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":700 - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t - * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< -@@ -983,7 +1061,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; - */ - typedef npy_uint64 __pyx_t_5numpy_uint64_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":789 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":704 - * #ctypedef npy_uint128 uint128_t - * - * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< -@@ -992,7 +1070,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; - */ - typedef npy_float32 __pyx_t_5numpy_float32_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":790 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":705 - * - * ctypedef npy_float32 float32_t - * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< -@@ -1001,7 +1079,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; - */ - typedef npy_float64 __pyx_t_5numpy_float64_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":799 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":714 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< -@@ -1010,7 +1088,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; - */ - typedef npy_long __pyx_t_5numpy_int_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":800 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":715 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< -@@ -1019,7 +1097,7 @@ typedef npy_long __pyx_t_5numpy_int_t; - */ - typedef npy_longlong __pyx_t_5numpy_long_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":801 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":716 - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t - * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< -@@ -1028,7 +1106,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; - */ - typedef npy_longlong __pyx_t_5numpy_longlong_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":803 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":718 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< -@@ -1037,7 +1115,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; - */ - typedef npy_ulong __pyx_t_5numpy_uint_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":804 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":719 - * - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< -@@ -1046,7 +1124,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":805 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":720 - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t - * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< -@@ -1055,7 +1133,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":807 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":722 - * ctypedef npy_ulonglong ulonglong_t - * - * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< -@@ -1064,7 +1142,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - */ - typedef npy_intp __pyx_t_5numpy_intp_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":808 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":723 - * - * ctypedef npy_intp intp_t - * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< -@@ -1073,7 +1151,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; - */ - typedef npy_uintp __pyx_t_5numpy_uintp_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":810 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":725 - * ctypedef npy_uintp uintp_t - * - * ctypedef npy_double float_t # <<<<<<<<<<<<<< -@@ -1082,7 +1160,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; - */ - typedef npy_double __pyx_t_5numpy_float_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":811 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":726 - * - * ctypedef npy_double float_t - * ctypedef npy_double double_t # <<<<<<<<<<<<<< -@@ -1091,7 +1169,7 @@ typedef npy_double __pyx_t_5numpy_float_t; - */ - typedef npy_double __pyx_t_5numpy_double_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":812 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":727 - * ctypedef npy_double float_t - * ctypedef npy_double double_t - * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< -@@ -1155,7 +1233,7 @@ struct __pyx_obj_4cylp_2cy_12CyClpSimplex_VarStatus; - struct __pyx_obj_4cylp_2cy_14CyDantzigPivot_CyDantzigPivot; - struct __pyx_obj_4cylp_2cy_9CyPEPivot_CyPEPivot; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":814 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":729 - * ctypedef npy_longdouble longdouble_t - * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< -@@ -1164,7 +1242,7 @@ struct __pyx_obj_4cylp_2cy_9CyPEPivot_CyPEPivot; - */ - typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":815 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":730 - * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< -@@ -1173,7 +1251,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - */ - typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":816 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":731 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< -@@ -1182,7 +1260,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - */ - typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":818 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":733 - * ctypedef npy_clongdouble clongdouble_t - * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< -@@ -1913,6 +1991,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #ifndef Py_MEMBER_SIZE - #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) - #endif -+#if CYTHON_FAST_PYCALL - static size_t __pyx_pyframe_localsplus_offset = 0; - #include "frameobject.h" - #define __Pxy_PyFrame_Initialize_Offsets()\ -@@ -1920,6 +1999,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) - #define __Pyx_PyFrame_GetLocalsplus(frame)\ - (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) -+#endif // CYTHON_FAST_PYCALL - #endif - - /* PyObjectCall.proto */ -@@ -2014,6 +2094,11 @@ static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_ve - static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); - #endif - -+/* GetTopmostException.proto */ -+#if CYTHON_USE_EXC_INFO_STACK -+static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); -+#endif -+ - /* PyThreadStateGet.proto */ - #if CYTHON_FAST_THREAD_STATE - #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate; -@@ -2025,6 +2110,33 @@ static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); - #define __Pyx_PyErr_Occurred() PyErr_Occurred() - #endif - -+/* SaveResetException.proto */ -+#if CYTHON_FAST_THREAD_STATE -+#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) -+static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); -+#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) -+static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); -+#else -+#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) -+#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) -+#endif -+ -+/* PyErrExceptionMatches.proto */ -+#if CYTHON_FAST_THREAD_STATE -+#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) -+static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); -+#else -+#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) -+#endif -+ -+/* GetException.proto */ -+#if CYTHON_FAST_THREAD_STATE -+#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) -+static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); -+#else -+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); -+#endif -+ - /* PyErrFetchRestore.proto */ - #if CYTHON_FAST_THREAD_STATE - #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL) -@@ -2053,61 +2165,6 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - /* RaiseException.proto */ - static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); - --/* DictGetItem.proto */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); --#define __Pyx_PyObject_Dict_GetItem(obj, name)\ -- (likely(PyDict_CheckExact(obj)) ?\ -- __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) --#else --#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) --#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) --#endif -- --/* RaiseTooManyValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); -- --/* RaiseNeedMoreValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); -- --/* RaiseNoneIterError.proto */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -- --/* ExtTypeTest.proto */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); -- --/* GetTopmostException.proto */ --#if CYTHON_USE_EXC_INFO_STACK --static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); --#endif -- --/* SaveResetException.proto */ --#if CYTHON_FAST_THREAD_STATE --#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) --static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); --#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb) --static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb); --#else --#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb) --#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb) --#endif -- --/* PyErrExceptionMatches.proto */ --#if CYTHON_FAST_THREAD_STATE --#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err) --static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err); --#else --#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err) --#endif -- --/* GetException.proto */ --#if CYTHON_FAST_THREAD_STATE --#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb) --static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb); --#else --static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); --#endif -- - /* TypeImport.proto */ - #ifndef __PYX_HAVE_RT_ImportType_proto - #define __PYX_HAVE_RT_ImportType_proto -@@ -2252,14 +2309,10 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - #endif - #endif - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -- --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); -- --/* CIntFromPy.proto */ --static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); -+/* GCCDiagnostics.proto */ -+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -+#define __Pyx_HAS_GCC_DIAGNOSTIC -+#endif - - /* CIntToPy.proto */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); -@@ -2267,6 +2320,9 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); - /* CIntFromPy.proto */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); - -+/* CIntFromPy.proto */ -+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); -+ - /* FastTypeChecks.proto */ - #if CYTHON_COMPILING_IN_CPYTHON - #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type) -@@ -2385,8 +2441,17 @@ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; - static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; - static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; - static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -+static PyTypeObject *__pyx_ptype_5numpy_generic = 0; -+static PyTypeObject *__pyx_ptype_5numpy_number = 0; -+static PyTypeObject *__pyx_ptype_5numpy_integer = 0; -+static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; -+static PyTypeObject *__pyx_ptype_5numpy_floating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; -+static PyTypeObject *__pyx_ptype_5numpy_character = 0; - static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ - - /* Module declarations from 'cylp.cy.CyClpDualRowPivotBase' */ - static PyTypeObject *__pyx_ptype_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase = 0; -@@ -2446,9 +2511,6 @@ int __pyx_module_is_main_cylp__cy__CyTest = 0; - - /* Implementation of 'cylp.cy.CyTest' */ - static PyObject *__pyx_builtin_print; --static PyObject *__pyx_builtin_ValueError; --static PyObject *__pyx_builtin_range; --static PyObject *__pyx_builtin_RuntimeError; - static PyObject *__pyx_builtin_ImportError; - static const char __pyx_k_d[] = "d"; - static const char __pyx_k_p[] = "p"; -@@ -2459,7 +2521,6 @@ static const char __pyx_k_name[] = "__name__"; - static const char __pyx_k_test[] = "__test__"; - static const char __pyx_k_time[] = "time"; - static const char __pyx_k_print[] = "print"; --static const char __pyx_k_range[] = "range"; - static const char __pyx_k_start[] = "start"; - static const char __pyx_k_dpivot[] = "dpivot"; - static const char __pyx_k_import[] = "__import__"; -@@ -2469,31 +2530,18 @@ static const char __pyx_k_primal[] = "primal"; - static const char __pyx_k_CySolve[] = "CySolve"; - static const char __pyx_k_fileName[] = "fileName"; - static const char __pyx_k_Exec_time[] = "Exec time: "; --static const char __pyx_k_ValueError[] = "ValueError"; - static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; - static const char __pyx_k_ImportError[] = "ImportError"; --static const char __pyx_k_RuntimeError[] = "RuntimeError"; - static const char __pyx_k_perf_counter[] = "perf_counter"; - static const char __pyx_k_cylp_cy_CyTest[] = "cylp.cy.CyTest"; - static const char __pyx_k_objectiveValue[] = "objectiveValue"; - static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; - static const char __pyx_k_cylp_cy_CyTest_pyx[] = "cylp/cy/CyTest.pyx"; --static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; - static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; --static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; --static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; --static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; --static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; - static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; --static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; - static PyObject *__pyx_n_s_CySolve; - static PyObject *__pyx_kp_s_Exec_time; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; - static PyObject *__pyx_n_s_ImportError; --static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; --static PyObject *__pyx_n_s_RuntimeError; --static PyObject *__pyx_n_s_ValueError; - static PyObject *__pyx_n_s_cline_in_traceback; - static PyObject *__pyx_n_s_cylp_cy_CyTest; - static PyObject *__pyx_kp_s_cylp_cy_CyTest_pyx; -@@ -2504,8 +2552,6 @@ static PyObject *__pyx_n_s_import; - static PyObject *__pyx_n_s_main; - static PyObject *__pyx_n_s_method; - static PyObject *__pyx_n_s_name; --static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; --static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; - static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; - static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; - static PyObject *__pyx_n_s_objectiveValue; -@@ -2515,25 +2561,16 @@ static PyObject *__pyx_n_s_ppivot; - static PyObject *__pyx_n_s_primal; - static PyObject *__pyx_n_s_print; - static PyObject *__pyx_n_s_pyx_vtable; --static PyObject *__pyx_n_s_range; - static PyObject *__pyx_n_s_s; - static PyObject *__pyx_n_s_start; - static PyObject *__pyx_n_s_sys; - static PyObject *__pyx_n_s_test; - static PyObject *__pyx_n_s_time; --static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; - static PyObject *__pyx_pf_4cylp_2cy_6CyTest_CySolve(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fileName, PyObject *__pyx_v_method); /* proto */ --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ - static PyObject *__pyx_tuple_; - static PyObject *__pyx_tuple__2; - static PyObject *__pyx_tuple__3; --static PyObject *__pyx_tuple__4; --static PyObject *__pyx_tuple__5; --static PyObject *__pyx_tuple__6; --static PyObject *__pyx_tuple__7; --static PyObject *__pyx_tuple__8; --static PyObject *__pyx_codeobj__9; -+static PyObject *__pyx_codeobj__4; - /* Late includes */ - - /* "cylp/cy/CyTest.pyx":9 -@@ -2865,1020 +2902,161 @@ static PyObject *__pyx_pf_4cylp_2cy_6CyTest_CySolve(CYTHON_UNUSED PyObject *__py - return __pyx_r; - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 -+ * ctypedef npy_cdouble complex_t -+ * -+ * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(1, a) -+ * - */ - --/* Python wrapper */ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); -- __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_v_i; -- int __pyx_v_ndim; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- int __pyx_v_t; -- char *__pyx_v_f; -- PyArray_Descr *__pyx_v_descr = 0; -- int __pyx_v_offset; -- int __pyx_r; -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { -+ PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- int __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- int __pyx_t_4; -- int __pyx_t_5; -- int __pyx_t_6; -- PyArray_Descr *__pyx_t_7; -- PyObject *__pyx_t_8 = NULL; -- char *__pyx_t_9; -+ PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; -- if (__pyx_v_info == NULL) { -- PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); -- return -1; -- } -- __Pyx_RefNannySetupContext("__getbuffer__", 0); -- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); -- __Pyx_GIVEREF(__pyx_v_info->obj); -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":265 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":736 - * -- * cdef int i, ndim -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":266 -- * cdef int i, ndim -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew1(a): -+ * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< - * -- * ndim = PyArray_NDIM(self) -+ * cdef inline object PyArray_MultiIterNew2(a, b): - */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 736, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":268 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 -+ * ctypedef npy_cdouble complex_t - * -- * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(1, a) - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) - */ -- __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L4_bool_binop_done; -- } -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":271 -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not C contiguous") -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 -+ * return PyArray_MultiIterNew(1, a) - * -- */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L4_bool_binop_done:; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -+ * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(2, a, b) - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") - */ -- if (unlikely(__pyx_t_1)) { - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(1, 272, __pyx_L1_error) -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":739 - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -+ * cdef inline object PyArray_MultiIterNew2(a, b): -+ * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): - */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L7_bool_binop_done; -- } -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 739, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":275 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 -+ * return PyArray_MultiIterNew(1, a) - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not Fortran contiguous") -+ * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(2, a, b) - * - */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L7_bool_binop_done:; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 -+ * return PyArray_MultiIterNew(2, a, b) - * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(1, 276, __pyx_L1_error) -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(3, a, b, c) - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") - */ -- } - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":278 -- * raise ValueError(u"ndarray is not Fortran contiguous") -- * -- * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":279 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":742 - * -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * # Allocate new buffer for strides and shape info. -- */ -- __pyx_v_info->ndim = __pyx_v_ndim; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":283 -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- */ -- __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":284 -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim # <<<<<<<<<<<<<< -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- */ -- __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":285 -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim -- * for i in range(ndim): # <<<<<<<<<<<<<< -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] -- */ -- __pyx_t_4 = __pyx_v_ndim; -- __pyx_t_5 = __pyx_t_4; -- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { -- __pyx_v_i = __pyx_t_6; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":286 -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- */ -- (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":287 -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< -- * else: -- * info.strides = PyArray_STRIDES(self) -- */ -- (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- goto __pyx_L9; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":289 -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- */ -- /*else*/ { -- __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":290 -- * else: -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- */ -- __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); -- } -- __pyx_L9:; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":291 -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL # <<<<<<<<<<<<<< -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) -- */ -- __pyx_v_info->suboffsets = NULL; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":292 -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< -- * info.readonly = not PyArray_ISWRITEABLE(self) -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): -+ * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< - * -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - */ -- __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 742, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":293 -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 -+ * return PyArray_MultiIterNew(2, a, b) - * -- * cdef int t -- */ -- __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":296 -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(3, a, b, c) - * -- * cdef int t -- * cdef char* f = NULL # <<<<<<<<<<<<<< -- * cdef dtype descr = PyArray_DESCR(self) -- * cdef int offset - */ -- __pyx_v_f = NULL; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":297 -- * cdef int t -- * cdef char* f = NULL -- * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< -- * cdef int offset -- * -- */ -- __pyx_t_7 = PyArray_DESCR(__pyx_v_self); -- __pyx_t_3 = ((PyObject *)__pyx_t_7); -- __Pyx_INCREF(__pyx_t_3); -- __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); -- __pyx_t_3 = 0; -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":300 -- * cdef int offset -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 -+ * return PyArray_MultiIterNew(3, a, b, c) - * -- * info.obj = self # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(descr): -- */ -- __Pyx_INCREF(((PyObject *)__pyx_v_self)); -- __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); -- __pyx_v_info->obj = ((PyObject *)__pyx_v_self); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); -- if (__pyx_t_1) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":303 -- * -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num # <<<<<<<<<<<<<< -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- */ -- __pyx_t_4 = __pyx_v_descr->type_num; -- __pyx_v_t = __pyx_t_4; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); -- if (!__pyx_t_2) { -- goto __pyx_L15_next_or; -- } else { -- } -- __pyx_t_2 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_L15_next_or:; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":305 -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L14_bool_binop_done:; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(1, 306, __pyx_L1_error) -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":307 -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- */ -- switch (__pyx_v_t) { -- case NPY_BYTE: -- __pyx_v_f = ((char *)"b"); -- break; -- case NPY_UBYTE: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":308 -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- */ -- __pyx_v_f = ((char *)"B"); -- break; -- case NPY_SHORT: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":309 -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- */ -- __pyx_v_f = ((char *)"h"); -- break; -- case NPY_USHORT: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":310 -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- */ -- __pyx_v_f = ((char *)"H"); -- break; -- case NPY_INT: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":311 -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- */ -- __pyx_v_f = ((char *)"i"); -- break; -- case NPY_UINT: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":312 -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- */ -- __pyx_v_f = ((char *)"I"); -- break; -- case NPY_LONG: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":313 -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- */ -- __pyx_v_f = ((char *)"l"); -- break; -- case NPY_ULONG: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":314 -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- */ -- __pyx_v_f = ((char *)"L"); -- break; -- case NPY_LONGLONG: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":315 -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- */ -- __pyx_v_f = ((char *)"q"); -- break; -- case NPY_ULONGLONG: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":316 -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- */ -- __pyx_v_f = ((char *)"Q"); -- break; -- case NPY_FLOAT: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":317 -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- */ -- __pyx_v_f = ((char *)"f"); -- break; -- case NPY_DOUBLE: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":318 -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- */ -- __pyx_v_f = ((char *)"d"); -- break; -- case NPY_LONGDOUBLE: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":319 -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- */ -- __pyx_v_f = ((char *)"g"); -- break; -- case NPY_CFLOAT: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":320 -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- */ -- __pyx_v_f = ((char *)"Zf"); -- break; -- case NPY_CDOUBLE: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":321 -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" -- */ -- __pyx_v_f = ((char *)"Zd"); -- break; -- case NPY_CLONGDOUBLE: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":322 -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f = "O" -- * else: -- */ -- __pyx_v_f = ((char *)"Zg"); -- break; -- case NPY_OBJECT: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":323 -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_v_f = ((char *)"O"); -- break; -- default: -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":325 -- * elif t == NPY_OBJECT: f = "O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * info.format = f -- * return -- */ -- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_8); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(1, 325, __pyx_L1_error) -- break; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":326 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f # <<<<<<<<<<<<<< -- * return -- * else: -- */ -- __pyx_v_info->format = __pyx_v_f; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":327 -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f -- * return # <<<<<<<<<<<<<< -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- */ -- __pyx_r = 0; -- goto __pyx_L0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":329 -- * return -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- */ -- /*else*/ { -- __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":330 -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, -- */ -- (__pyx_v_info->format[0]) = '^'; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":331 -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 # <<<<<<<<<<<<<< -- * f = _util_dtypestring(descr, info.format + 1, -- * info.format + _buffer_format_string_len, -- */ -- __pyx_v_offset = 0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":332 -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< -- * info.format + _buffer_format_string_len, -- * &offset) -- */ -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(1, 332, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":335 -- * info.format + _buffer_format_string_len, -- * &offset) -- * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- */ -- (__pyx_v_f[0]) = '\x00'; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- -- /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; -- if (__pyx_v_info->obj != NULL) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- goto __pyx_L2; -- __pyx_L0:; -- if (__pyx_v_info->obj == Py_None) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- __pyx_L2:; -- __Pyx_XDECREF((PyObject *)__pyx_v_descr); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); -- __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("__releasebuffer__", 0); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); -- if (__pyx_t_1) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":339 -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) -- */ -- PyObject_Free(__pyx_v_info->format); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":341 -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) # <<<<<<<<<<<<<< -- * # info.shape was stored after info.strides in the same block -- * -- */ -- PyObject_Free(__pyx_v_info->strides); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":820 -- * ctypedef npy_cdouble complex_t -- * -- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(1, a) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- int __pyx_lineno = 0; -- const char *__pyx_filename = NULL; -- int __pyx_clineno = 0; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":821 -- * -- * cdef inline object PyArray_MultiIterNew1(a): -- * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 821, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":820 -- * ctypedef npy_cdouble complex_t -- * -- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(1, a) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":823 -- * return PyArray_MultiIterNew(1, a) -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(2, a, b) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- int __pyx_lineno = 0; -- const char *__pyx_filename = NULL; -- int __pyx_clineno = 0; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":824 -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): -- * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 824, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":823 -- * return PyArray_MultiIterNew(1, a) -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(2, a, b) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":826 -- * return PyArray_MultiIterNew(2, a, b) -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- int __pyx_lineno = 0; -- const char *__pyx_filename = NULL; -- int __pyx_clineno = 0; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":827 -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): -- * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 827, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":826 -- * return PyArray_MultiIterNew(2, a, b) -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":829 -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(4, a, b, c, d) -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(4, a, b, c, d) - * - */ - -@@ -3891,7 +3069,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":830 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":745 - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -@@ -3899,13 +3077,13 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 830, __pyx_L1_error) -+ __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 745, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":829 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -3924,7 +3102,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - return __pyx_r; - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":832 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -3941,863 +3119,114 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":833 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":748 - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -- * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 833, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":832 -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":835 -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":836 -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -- * return d.subarray.shape -- * else: -- */ -- __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); -- if (__pyx_t_1) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":837 -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape # <<<<<<<<<<<<<< -- * else: -- * return () -- */ -- __Pyx_XDECREF(__pyx_r); -- __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); -- __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); -- goto __pyx_L0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":836 -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -- * return d.subarray.shape -- * else: -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":839 -- * return d.subarray.shape -- * else: -- * return () # <<<<<<<<<<<<<< -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: -- */ -- /*else*/ { -- __Pyx_XDECREF(__pyx_r); -- __Pyx_INCREF(__pyx_empty_tuple); -- __pyx_r = __pyx_empty_tuple; -- goto __pyx_L0; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":835 -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape -- */ -- -- /* function exit code */ -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":841 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { -- PyArray_Descr *__pyx_v_child = 0; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- PyObject *__pyx_v_fields = 0; -- PyObject *__pyx_v_childname = NULL; -- PyObject *__pyx_v_new_offset = NULL; -- PyObject *__pyx_v_t = NULL; -- char *__pyx_r; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- Py_ssize_t __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- PyObject *__pyx_t_4 = NULL; -- int __pyx_t_5; -- int __pyx_t_6; -- int __pyx_t_7; -- long __pyx_t_8; -- char *__pyx_t_9; -- int __pyx_lineno = 0; -- const char *__pyx_filename = NULL; -- int __pyx_clineno = 0; -- __Pyx_RefNannySetupContext("_util_dtypestring", 0); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":846 -- * -- * cdef dtype child -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * cdef tuple fields -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":847 -- * cdef dtype child -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * cdef tuple fields -- * -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":850 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- if (unlikely(__pyx_v_descr->names == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -- __PYX_ERR(1, 850, __pyx_L1_error) -- } -- __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; -- for (;;) { -- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(1, 850, __pyx_L1_error) -- #else -- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 850, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- #endif -- __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * -- * for childname in descr.names: -- * fields = descr.fields[childname] # <<<<<<<<<<<<<< -- * child, new_offset = fields -- * -- */ -- if (unlikely(__pyx_v_descr->fields == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); -- __PYX_ERR(1, 851, __pyx_L1_error) -- } -- __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 851, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(1, 851, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); -- __pyx_t_3 = 0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":852 -- * for childname in descr.names: -- * fields = descr.fields[childname] -- * child, new_offset = fields # <<<<<<<<<<<<<< -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- */ -- if (likely(__pyx_v_fields != Py_None)) { -- PyObject* sequence = __pyx_v_fields; -- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); -- if (unlikely(size != 2)) { -- if (size > 2) __Pyx_RaiseTooManyValuesError(2); -- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); -- __PYX_ERR(1, 852, __pyx_L1_error) -- } -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); -- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); -- __Pyx_INCREF(__pyx_t_3); -- __Pyx_INCREF(__pyx_t_4); -- #else -- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 852, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 852, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- #endif -- } else { -- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(1, 852, __pyx_L1_error) -- } -- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(1, 852, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); -- __pyx_t_3 = 0; -- __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":854 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 854, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 854, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(1, 854, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(1, 855, __pyx_L1_error) -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":854 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":857 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); -- if (!__pyx_t_7) { -- goto __pyx_L8_next_or; -- } else { -- } -- __pyx_t_7 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_L8_next_or:; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * # One could encode it in the format string and have Cython -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); -- if (__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_6 = __pyx_t_7; -- __pyx_L7_bool_binop_done:; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":857 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_6)) { -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":859 -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * # One could encode it in the format string and have Cython -- * # complain instead, BUT: < and > in format strings also imply -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 859, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(1, 859, __pyx_L1_error) -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":857 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":869 -- * -- * # Output padding bytes -- * while offset[0] < new_offset: # <<<<<<<<<<<<<< -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- */ -- while (1) { -- __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 869, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 869, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 869, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (!__pyx_t_6) break; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":870 -- * # Output padding bytes -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< -- * f += 1 -- * offset[0] += 1 -- */ -- (__pyx_v_f[0]) = 0x78; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":871 -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte -- * f += 1 # <<<<<<<<<<<<<< -- * offset[0] += 1 -- * -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":872 -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- * offset[0] += 1 # <<<<<<<<<<<<<< -- * -- * offset[0] += child.itemsize -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":874 -- * offset[0] += 1 -- * -- * offset[0] += child.itemsize # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(child): -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":876 -- * offset[0] += child.itemsize -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< - * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -+ * cdef inline tuple PyDataType_SHAPE(dtype d): - */ -- __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); -- if (__pyx_t_6) { -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 748, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":877 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 -+ * return PyArray_MultiIterNew(4, a, b, c, d) - * -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num # <<<<<<<<<<<<<< -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 877, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":878 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - */ -- __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); -- if (unlikely(__pyx_t_6)) { - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 879, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(1, 879, __pyx_L1_error) -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":878 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -+ * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape - */ -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":882 -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 882, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 882, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 882, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 98; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":883 -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 883, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 66; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":884 -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 884, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x68; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":885 -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 885, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 72; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":886 -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 886, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x69; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":887 -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 887, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 73; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":888 -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 888, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x6C; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":889 -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 889, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 76; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":890 -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 890, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x71; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":891 -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 891, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 81; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":892 -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 892, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x66; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":893 -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 893, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x64; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":894 -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 894, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x67; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":895 -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 895, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x66; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":896 -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 896, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x64; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":897 -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 897, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x67; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":898 -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 898, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(1, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (likely(__pyx_t_6)) { -- (__pyx_v_f[0]) = 79; -- goto __pyx_L15; -- } -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":900 -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * f += 1 -- * else: -- */ -- /*else*/ { -- __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 900, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 900, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(1, 900, __pyx_L1_error) -- } -- __pyx_L15:; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":901 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * f += 1 # <<<<<<<<<<<<<< -- * else: -- * # Cython ignores struct boundary information ("T{...}"), -- */ -- __pyx_v_f = (__pyx_v_f + 1); -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ int __pyx_t_1; -+ __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":876 -- * offset[0] += child.itemsize -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -+ * return d.subarray.shape -+ * else: - */ -- goto __pyx_L13; -- } -+ __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); -+ if (__pyx_t_1) { - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":905 -- * # Cython ignores struct boundary information ("T{...}"), -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< -- * return f -- * -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":752 -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape # <<<<<<<<<<<<<< -+ * else: -+ * return () - */ -- /*else*/ { -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(1, 905, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- } -- __pyx_L13:; -+ __Pyx_XDECREF(__pyx_r); -+ __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); -+ __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); -+ goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":850 -- * cdef tuple fields -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -+ * return d.subarray.shape -+ * else: - */ - } -- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":906 -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) -- * return f # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":754 -+ * return d.subarray.shape -+ * else: -+ * return () # <<<<<<<<<<<<<< - * - * - */ -- __pyx_r = __pyx_v_f; -- goto __pyx_L0; -+ /*else*/ { -+ __Pyx_XDECREF(__pyx_r); -+ __Pyx_INCREF(__pyx_empty_tuple); -+ __pyx_r = __pyx_empty_tuple; -+ goto __pyx_L0; -+ } - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":841 -- * return () -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -+ * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape - */ - - /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_4); -- __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = NULL; - __pyx_L0:; -- __Pyx_XDECREF((PyObject *)__pyx_v_child); -- __Pyx_XDECREF(__pyx_v_fields); -- __Pyx_XDECREF(__pyx_v_childname); -- __Pyx_XDECREF(__pyx_v_new_offset); -- __Pyx_XDECREF(__pyx_v_t); -+ __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1021 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -4809,7 +3238,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("set_array_base", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":930 - * - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< -@@ -4818,7 +3247,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - Py_INCREF(__pyx_v_base); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1023 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":931 - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< -@@ -4827,7 +3256,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1021 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -4839,7 +3268,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyFinishContext(); - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1025 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -4854,7 +3283,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - int __pyx_t_1; - __Pyx_RefNannySetupContext("get_array_base", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":934 - * - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< -@@ -4863,7 +3292,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - __pyx_v_base = PyArray_BASE(__pyx_v_arr); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1027 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -4873,7 +3302,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_t_1 = ((__pyx_v_base == NULL) != 0); - if (__pyx_t_1) { - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":936 - * base = PyArray_BASE(arr) - * if base is NULL: - * return None # <<<<<<<<<<<<<< -@@ -4884,7 +3313,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1027 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -4893,7 +3322,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - } - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1029 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":937 - * if base is NULL: - * return None - * return base # <<<<<<<<<<<<<< -@@ -4905,7 +3334,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = ((PyObject *)__pyx_v_base); - goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1025 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -4920,12 +3349,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - return __pyx_r; - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1033 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { -@@ -4944,11 +3373,11 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_array", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - { -@@ -4960,20 +3389,20 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":943 - * cdef inline int import_array() except -1: - * try: -- * _import_array() # <<<<<<<<<<<<<< -+ * __pyx_import_array() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") - */ -- __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1035, __pyx_L3_error) -+ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 943, __pyx_L3_error) - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - } -@@ -4983,9 +3412,9 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1036 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":944 - * try: -- * _import_array() -+ * __pyx_import_array() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.multiarray failed to import") - * -@@ -4993,32 +3422,32 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1036, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 944, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1037 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1037, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 945, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(1, 1037, __pyx_L5_except_error) -+ __PYX_ERR(1, 945, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - __Pyx_XGIVEREF(__pyx_t_1); -@@ -5029,12 +3458,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_L8_try_end:; - } - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1033 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - /* function exit code */ -@@ -5052,7 +3481,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - return __pyx_r; - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1039 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -5076,7 +3505,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_umath", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5092,16 +3521,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":949 - * cdef inline int import_umath() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1041, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 949, __pyx_L3_error) - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5115,7 +3544,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1042 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":950 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< -@@ -5125,28 +3554,28 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1042, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 950, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1043 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1043, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 951, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(1, 1043, __pyx_L5_except_error) -+ __PYX_ERR(1, 951, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5161,7 +3590,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_L8_try_end:; - } - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1039 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -5184,7 +3613,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - return __pyx_r; - } - --/* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1045 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -5208,7 +3637,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_ufunc", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5224,92 +3653,269 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":955 - * cdef inline int import_ufunc() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 1047, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 955, __pyx_L3_error) -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 -+ * -+ * cdef inline int import_ufunc() except -1: -+ * try: # <<<<<<<<<<<<<< -+ * _import_umath() -+ * except Exception: -+ */ -+ } -+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; -+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; -+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; -+ goto __pyx_L8_try_end; -+ __pyx_L3_error:; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":956 -+ * try: -+ * _import_umath() -+ * except Exception: # <<<<<<<<<<<<<< -+ * raise ImportError("numpy.core.umath failed to import") -+ * -+ */ -+ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); -+ if (__pyx_t_4) { -+ __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 956, __pyx_L5_except_error) -+ __Pyx_GOTREF(__pyx_t_5); -+ __Pyx_GOTREF(__pyx_t_6); -+ __Pyx_GOTREF(__pyx_t_7); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":957 -+ * _import_umath() -+ * except Exception: -+ * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -+ * -+ * cdef extern from *: -+ */ -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 957, __pyx_L5_except_error) -+ __Pyx_GOTREF(__pyx_t_8); -+ __Pyx_Raise(__pyx_t_8, 0, 0, 0); -+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -+ __PYX_ERR(1, 957, __pyx_L5_except_error) -+ } -+ goto __pyx_L5_except_error; -+ __pyx_L5_except_error:; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 -+ * -+ * cdef inline int import_ufunc() except -1: -+ * try: # <<<<<<<<<<<<<< -+ * _import_umath() -+ * except Exception: -+ */ -+ __Pyx_XGIVEREF(__pyx_t_1); -+ __Pyx_XGIVEREF(__pyx_t_2); -+ __Pyx_XGIVEREF(__pyx_t_3); -+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); -+ goto __pyx_L1_error; -+ __pyx_L8_try_end:; -+ } -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 -+ * raise ImportError("numpy.core.umath failed to import") -+ * -+ * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -+ * try: -+ * _import_umath() -+ */ -+ -+ /* function exit code */ -+ __pyx_r = 0; -+ goto __pyx_L0; -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_5); -+ __Pyx_XDECREF(__pyx_t_6); -+ __Pyx_XDECREF(__pyx_t_7); -+ __Pyx_XDECREF(__pyx_t_8); -+ __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = -1; -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_timedelta64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":979 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_datetime64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":994 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { -+ npy_datetime __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1004 -+ * also needed. That can be found using `get_datetime64_unit`. -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { -+ npy_timedelta __pyx_r; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1011 -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * - * -- * cdef inline int import_ufunc() except -1: -- * try: # <<<<<<<<<<<<<< -- * _import_umath() -- * except Exception: - */ -- } -- __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; -- __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; -- __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; -- goto __pyx_L8_try_end; -- __pyx_L3_error:; -+ __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1048 -- * try: -- * _import_umath() -- * except Exception: # <<<<<<<<<<<<<< -- * raise ImportError("numpy.core.umath failed to import") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object - */ -- __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); -- if (__pyx_t_4) { -- __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(1, 1048, __pyx_L5_except_error) -- __Pyx_GOTREF(__pyx_t_5); -- __Pyx_GOTREF(__pyx_t_6); -- __Pyx_GOTREF(__pyx_t_7); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1049 -- * _import_umath() -- * except Exception: -- * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -- */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(1, 1049, __pyx_L5_except_error) -- __Pyx_GOTREF(__pyx_t_8); -- __Pyx_Raise(__pyx_t_8, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(1, 1049, __pyx_L5_except_error) -- } -- goto __pyx_L5_except_error; -- __pyx_L5_except_error:; -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: -- * try: # <<<<<<<<<<<<<< -- * _import_umath() -- * except Exception: -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ -- __Pyx_XGIVEREF(__pyx_t_1); -- __Pyx_XGIVEREF(__pyx_t_2); -- __Pyx_XGIVEREF(__pyx_t_3); -- __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3); -- goto __pyx_L1_error; -- __pyx_L8_try_end:; -- } - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1045 -- * raise ImportError("numpy.core.umath failed to import") -+static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { -+ NPY_DATETIMEUNIT __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1018 -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ * """ -+ * return (obj).obmeta.base # <<<<<<<<<<<<<< -+ */ -+ __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - - /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_5); -- __Pyx_XDECREF(__pyx_t_6); -- __Pyx_XDECREF(__pyx_t_7); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; - __pyx_L0:; -- __Pyx_RefNannyFinishContext(); - return __pyx_r; - } - -@@ -5361,12 +3967,7 @@ static struct PyModuleDef __pyx_moduledef = { - static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_CySolve, __pyx_k_CySolve, sizeof(__pyx_k_CySolve), 0, 0, 1, 1}, - {&__pyx_kp_s_Exec_time, __pyx_k_Exec_time, sizeof(__pyx_k_Exec_time), 0, 0, 1, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, - {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, -- {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, -- {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, -- {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, - {&__pyx_n_s_cylp_cy_CyTest, __pyx_k_cylp_cy_CyTest, sizeof(__pyx_k_cylp_cy_CyTest), 0, 0, 1, 1}, - {&__pyx_kp_s_cylp_cy_CyTest_pyx, __pyx_k_cylp_cy_CyTest_pyx, sizeof(__pyx_k_cylp_cy_CyTest_pyx), 0, 0, 1, 0}, -@@ -5377,8 +3978,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, - {&__pyx_n_s_method, __pyx_k_method, sizeof(__pyx_k_method), 0, 0, 1, 1}, - {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, -- {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, -- {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, - {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0}, - {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, - {&__pyx_n_s_objectiveValue, __pyx_k_objectiveValue, sizeof(__pyx_k_objectiveValue), 0, 0, 1, 1}, -@@ -5388,21 +3987,16 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_primal, __pyx_k_primal, sizeof(__pyx_k_primal), 0, 0, 1, 1}, - {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1}, - {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, -- {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, - {&__pyx_n_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 1}, - {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1}, - {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, - {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, - {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1}, -- {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, - {0, 0, 0, 0, 0, 0, 0} - }; - static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 26, __pyx_L1_error) -- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(1, 272, __pyx_L1_error) -- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(1, 285, __pyx_L1_error) -- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(1, 855, __pyx_L1_error) -- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 1037, __pyx_L1_error) -+ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(1, 945, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -@@ -5412,82 +4006,27 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple_); -- __Pyx_GIVEREF(__pyx_tuple_); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__2); -- __Pyx_GIVEREF(__pyx_tuple__2); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(1, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__3); -- __Pyx_GIVEREF(__pyx_tuple__3); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(1, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__4); -- __Pyx_GIVEREF(__pyx_tuple__4); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(1, 879, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__5); -- __Pyx_GIVEREF(__pyx_tuple__5); -- -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1037 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(1, 1037, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__6); -- __Pyx_GIVEREF(__pyx_tuple__6); -+ __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple_)) __PYX_ERR(1, 945, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple_); -+ __Pyx_GIVEREF(__pyx_tuple_); - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1043 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(1, 1043, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__7); -- __Pyx_GIVEREF(__pyx_tuple__7); -+ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(1, 951, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__2); -+ __Pyx_GIVEREF(__pyx_tuple__2); - - /* "cylp/cy/CyTest.pyx":9 - * -@@ -5496,10 +4035,10 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - * cdef CyClpSimplex s = CyClpSimplex() - * s.readMps(fileName, 0, 0) - */ -- __pyx_tuple__8 = PyTuple_Pack(6, __pyx_n_s_fileName, __pyx_n_s_method, __pyx_n_s_s, __pyx_n_s_dpivot, __pyx_n_s_ppivot, __pyx_n_s_start); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 9, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__8); -- __Pyx_GIVEREF(__pyx_tuple__8); -- __pyx_codeobj__9 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__8, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cylp_cy_CyTest_pyx, __pyx_n_s_CySolve, 9, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__9)) __PYX_ERR(0, 9, __pyx_L1_error) -+ __pyx_tuple__3 = PyTuple_Pack(6, __pyx_n_s_fileName, __pyx_n_s_method, __pyx_n_s_s, __pyx_n_s_dpivot, __pyx_n_s_ppivot, __pyx_n_s_start); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 9, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__3); -+ __Pyx_GIVEREF(__pyx_tuple__3); -+ __pyx_codeobj__4 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__3, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_cylp_cy_CyTest_pyx, __pyx_n_s_CySolve, 9, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__4)) __PYX_ERR(0, 9, __pyx_L1_error) - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -5595,18 +4134,38 @@ static int __Pyx_modinit_type_import_code(void) { - if (!__pyx_ptype_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase) __PYX_ERR(6, 67, __pyx_L1_error) - __pyx_vtabptr_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase = (struct __pyx_vtabstruct_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase)) __PYX_ERR(6, 67, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 206, __pyx_L1_error) -+ __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 206, __pyx_L1_error) -- __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 229, __pyx_L1_error) -- __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 233, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(1, 200, __pyx_L1_error) -+ __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(1, 223, __pyx_L1_error) -+ __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(1, 227, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 242, __pyx_L1_error) -- __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 917, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(1, 239, __pyx_L1_error) -+ __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_generic) __PYX_ERR(1, 771, __pyx_L1_error) -+ __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_number) __PYX_ERR(1, 773, __pyx_L1_error) -+ __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_integer) __PYX_ERR(1, 775, __pyx_L1_error) -+ __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(1, 777, __pyx_L1_error) -+ __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(1, 779, __pyx_L1_error) -+ __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(1, 781, __pyx_L1_error) -+ __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_floating) __PYX_ERR(1, 783, __pyx_L1_error) -+ __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(1, 785, __pyx_L1_error) -+ __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(1, 787, __pyx_L1_error) -+ __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_character) __PYX_ERR(1, 789, __pyx_L1_error) -+ __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(1, 827, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpDualRowPivotBase"); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); -@@ -5872,11 +4431,9 @@ if (!__Pyx_RefNanny) { - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ -- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS -- #ifdef WITH_THREAD /* Python build with threading support? */ -+ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - PyEval_InitThreads(); - #endif -- #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; -@@ -5983,12 +4540,12 @@ if (!__Pyx_RefNanny) { - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - -- /* "../../.local/anaconda3/lib/python3.8/site-packages/Cython/Includes/numpy/__init__.pxd":1045 -- * raise ImportError("numpy.core.umath failed to import") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - - /*--- Wrapped vars code ---*/ -@@ -6327,7 +4884,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #if CYTHON_COMPILING_IN_CPYTHON - static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; -- ternaryfunc call = func->ob_type->tp_call; -+ ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -@@ -6579,7 +5136,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec - if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { - return __Pyx_PyObject_CallMethO(func, arg); - #if CYTHON_FAST_PYCCALL -- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { -+ } else if (__Pyx_PyFastCFunction_Check(func)) { - return __Pyx_PyCFunction_FastCall(func, &arg, 1); - #endif - } -@@ -6658,6 +5215,161 @@ static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) - return __Pyx_GetBuiltinName(name); - } - -+/* GetTopmostException */ -+#if CYTHON_USE_EXC_INFO_STACK -+static _PyErr_StackItem * -+__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) -+{ -+ _PyErr_StackItem *exc_info = tstate->exc_info; -+ while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && -+ exc_info->previous_item != NULL) -+ { -+ exc_info = exc_info->previous_item; -+ } -+ return exc_info; -+} -+#endif -+ -+/* SaveResetException */ -+#if CYTHON_FAST_THREAD_STATE -+static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { -+ #if CYTHON_USE_EXC_INFO_STACK -+ _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); -+ *type = exc_info->exc_type; -+ *value = exc_info->exc_value; -+ *tb = exc_info->exc_traceback; -+ #else -+ *type = tstate->exc_type; -+ *value = tstate->exc_value; -+ *tb = tstate->exc_traceback; -+ #endif -+ Py_XINCREF(*type); -+ Py_XINCREF(*value); -+ Py_XINCREF(*tb); -+} -+static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { -+ PyObject *tmp_type, *tmp_value, *tmp_tb; -+ #if CYTHON_USE_EXC_INFO_STACK -+ _PyErr_StackItem *exc_info = tstate->exc_info; -+ tmp_type = exc_info->exc_type; -+ tmp_value = exc_info->exc_value; -+ tmp_tb = exc_info->exc_traceback; -+ exc_info->exc_type = type; -+ exc_info->exc_value = value; -+ exc_info->exc_traceback = tb; -+ #else -+ tmp_type = tstate->exc_type; -+ tmp_value = tstate->exc_value; -+ tmp_tb = tstate->exc_traceback; -+ tstate->exc_type = type; -+ tstate->exc_value = value; -+ tstate->exc_traceback = tb; -+ #endif -+ Py_XDECREF(tmp_type); -+ Py_XDECREF(tmp_value); -+ Py_XDECREF(tmp_tb); -+} -+#endif -+ -+/* PyErrExceptionMatches */ -+#if CYTHON_FAST_THREAD_STATE -+static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { -+ Py_ssize_t i, n; -+ n = PyTuple_GET_SIZE(tuple); -+#if PY_MAJOR_VERSION >= 3 -+ for (i=0; icurexc_type; -+ if (exc_type == err) return 1; -+ if (unlikely(!exc_type)) return 0; -+ if (unlikely(PyTuple_Check(err))) -+ return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); -+ return __Pyx_PyErr_GivenExceptionMatches(exc_type, err); -+} -+#endif -+ -+/* GetException */ -+#if CYTHON_FAST_THREAD_STATE -+static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) -+#else -+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) -+#endif -+{ -+ PyObject *local_type, *local_value, *local_tb; -+#if CYTHON_FAST_THREAD_STATE -+ PyObject *tmp_type, *tmp_value, *tmp_tb; -+ local_type = tstate->curexc_type; -+ local_value = tstate->curexc_value; -+ local_tb = tstate->curexc_traceback; -+ tstate->curexc_type = 0; -+ tstate->curexc_value = 0; -+ tstate->curexc_traceback = 0; -+#else -+ PyErr_Fetch(&local_type, &local_value, &local_tb); -+#endif -+ PyErr_NormalizeException(&local_type, &local_value, &local_tb); -+#if CYTHON_FAST_THREAD_STATE -+ if (unlikely(tstate->curexc_type)) -+#else -+ if (unlikely(PyErr_Occurred())) -+#endif -+ goto bad; -+ #if PY_MAJOR_VERSION >= 3 -+ if (local_tb) { -+ if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) -+ goto bad; -+ } -+ #endif -+ Py_XINCREF(local_tb); -+ Py_XINCREF(local_type); -+ Py_XINCREF(local_value); -+ *type = local_type; -+ *value = local_value; -+ *tb = local_tb; -+#if CYTHON_FAST_THREAD_STATE -+ #if CYTHON_USE_EXC_INFO_STACK -+ { -+ _PyErr_StackItem *exc_info = tstate->exc_info; -+ tmp_type = exc_info->exc_type; -+ tmp_value = exc_info->exc_value; -+ tmp_tb = exc_info->exc_traceback; -+ exc_info->exc_type = local_type; -+ exc_info->exc_value = local_value; -+ exc_info->exc_traceback = local_tb; -+ } -+ #else -+ tmp_type = tstate->exc_type; -+ tmp_value = tstate->exc_value; -+ tmp_tb = tstate->exc_traceback; -+ tstate->exc_type = local_type; -+ tstate->exc_value = local_value; -+ tstate->exc_traceback = local_tb; -+ #endif -+ Py_XDECREF(tmp_type); -+ Py_XDECREF(tmp_value); -+ Py_XDECREF(tmp_tb); -+#else -+ PyErr_SetExcInfo(local_type, local_value, local_tb); -+#endif -+ return 0; -+bad: -+ *type = 0; -+ *value = 0; -+ *tb = 0; -+ Py_XDECREF(local_type); -+ Py_XDECREF(local_value); -+ Py_XDECREF(local_tb); -+ return -1; -+} -+ - /* PyErrFetchRestore */ - #if CYTHON_FAST_THREAD_STATE - static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { -@@ -6841,216 +5553,6 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject - } - #endif - --/* DictGetItem */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { -- PyObject *value; -- value = PyDict_GetItemWithError(d, key); -- if (unlikely(!value)) { -- if (!PyErr_Occurred()) { -- if (unlikely(PyTuple_Check(key))) { -- PyObject* args = PyTuple_Pack(1, key); -- if (likely(args)) { -- PyErr_SetObject(PyExc_KeyError, args); -- Py_DECREF(args); -- } -- } else { -- PyErr_SetObject(PyExc_KeyError, key); -- } -- } -- return NULL; -- } -- Py_INCREF(value); -- return value; --} --#endif -- --/* RaiseTooManyValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { -- PyErr_Format(PyExc_ValueError, -- "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); --} -- --/* RaiseNeedMoreValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { -- PyErr_Format(PyExc_ValueError, -- "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", -- index, (index == 1) ? "" : "s"); --} -- --/* RaiseNoneIterError */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); --} -- --/* ExtTypeTest */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { -- if (unlikely(!type)) { -- PyErr_SetString(PyExc_SystemError, "Missing type object"); -- return 0; -- } -- if (likely(__Pyx_TypeCheck(obj, type))) -- return 1; -- PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", -- Py_TYPE(obj)->tp_name, type->tp_name); -- return 0; --} -- --/* GetTopmostException */ --#if CYTHON_USE_EXC_INFO_STACK --static _PyErr_StackItem * --__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) --{ -- _PyErr_StackItem *exc_info = tstate->exc_info; -- while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && -- exc_info->previous_item != NULL) -- { -- exc_info = exc_info->previous_item; -- } -- return exc_info; --} --#endif -- --/* SaveResetException */ --#if CYTHON_FAST_THREAD_STATE --static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { -- #if CYTHON_USE_EXC_INFO_STACK -- _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); -- *type = exc_info->exc_type; -- *value = exc_info->exc_value; -- *tb = exc_info->exc_traceback; -- #else -- *type = tstate->exc_type; -- *value = tstate->exc_value; -- *tb = tstate->exc_traceback; -- #endif -- Py_XINCREF(*type); -- Py_XINCREF(*value); -- Py_XINCREF(*tb); --} --static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { -- PyObject *tmp_type, *tmp_value, *tmp_tb; -- #if CYTHON_USE_EXC_INFO_STACK -- _PyErr_StackItem *exc_info = tstate->exc_info; -- tmp_type = exc_info->exc_type; -- tmp_value = exc_info->exc_value; -- tmp_tb = exc_info->exc_traceback; -- exc_info->exc_type = type; -- exc_info->exc_value = value; -- exc_info->exc_traceback = tb; -- #else -- tmp_type = tstate->exc_type; -- tmp_value = tstate->exc_value; -- tmp_tb = tstate->exc_traceback; -- tstate->exc_type = type; -- tstate->exc_value = value; -- tstate->exc_traceback = tb; -- #endif -- Py_XDECREF(tmp_type); -- Py_XDECREF(tmp_value); -- Py_XDECREF(tmp_tb); --} --#endif -- --/* PyErrExceptionMatches */ --#if CYTHON_FAST_THREAD_STATE --static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { -- Py_ssize_t i, n; -- n = PyTuple_GET_SIZE(tuple); --#if PY_MAJOR_VERSION >= 3 -- for (i=0; icurexc_type; -- if (exc_type == err) return 1; -- if (unlikely(!exc_type)) return 0; -- if (unlikely(PyTuple_Check(err))) -- return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err); -- return __Pyx_PyErr_GivenExceptionMatches(exc_type, err); --} --#endif -- --/* GetException */ --#if CYTHON_FAST_THREAD_STATE --static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) --#else --static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) --#endif --{ -- PyObject *local_type, *local_value, *local_tb; --#if CYTHON_FAST_THREAD_STATE -- PyObject *tmp_type, *tmp_value, *tmp_tb; -- local_type = tstate->curexc_type; -- local_value = tstate->curexc_value; -- local_tb = tstate->curexc_traceback; -- tstate->curexc_type = 0; -- tstate->curexc_value = 0; -- tstate->curexc_traceback = 0; --#else -- PyErr_Fetch(&local_type, &local_value, &local_tb); --#endif -- PyErr_NormalizeException(&local_type, &local_value, &local_tb); --#if CYTHON_FAST_THREAD_STATE -- if (unlikely(tstate->curexc_type)) --#else -- if (unlikely(PyErr_Occurred())) --#endif -- goto bad; -- #if PY_MAJOR_VERSION >= 3 -- if (local_tb) { -- if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0)) -- goto bad; -- } -- #endif -- Py_XINCREF(local_tb); -- Py_XINCREF(local_type); -- Py_XINCREF(local_value); -- *type = local_type; -- *value = local_value; -- *tb = local_tb; --#if CYTHON_FAST_THREAD_STATE -- #if CYTHON_USE_EXC_INFO_STACK -- { -- _PyErr_StackItem *exc_info = tstate->exc_info; -- tmp_type = exc_info->exc_type; -- tmp_value = exc_info->exc_value; -- tmp_tb = exc_info->exc_traceback; -- exc_info->exc_type = local_type; -- exc_info->exc_value = local_value; -- exc_info->exc_traceback = local_tb; -- } -- #else -- tmp_type = tstate->exc_type; -- tmp_value = tstate->exc_value; -- tmp_tb = tstate->exc_traceback; -- tstate->exc_type = local_type; -- tstate->exc_value = local_value; -- tstate->exc_traceback = local_tb; -- #endif -- Py_XDECREF(tmp_type); -- Py_XDECREF(tmp_value); -- Py_XDECREF(tmp_tb); --#else -- PyErr_SetExcInfo(local_type, local_value, local_tb); --#endif -- return 0; --bad: -- *type = 0; -- *value = 0; -- *tb = 0; -- Py_XDECREF(local_type); -- Py_XDECREF(local_value); -- Py_XDECREF(local_tb); -- return -1; --} -- - /* TypeImport */ - #ifndef __PYX_HAVE_RT_ImportType - #define __PYX_HAVE_RT_ImportType -@@ -7243,7 +5745,7 @@ static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int - } - if (!use_cline) { - c_line = 0; -- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); -+ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; -@@ -7340,30 +5842,31 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { -- PyCodeObject *py_code = 0; -- PyObject *py_srcfile = 0; -- PyObject *py_funcname = 0; -+ PyCodeObject *py_code = NULL; -+ PyObject *py_funcname = NULL; - #if PY_MAJOR_VERSION < 3 -+ PyObject *py_srcfile = NULL; - py_srcfile = PyString_FromString(filename); -- #else -- py_srcfile = PyUnicode_FromString(filename); -- #endif - if (!py_srcfile) goto bad; -+ #endif - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; -+ funcname = PyUnicode_AsUTF8(py_funcname); -+ if (!funcname) goto bad; - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); -- #else -- py_funcname = PyUnicode_FromString(funcname); -+ if (!py_funcname) goto bad; - #endif - } -- if (!py_funcname) goto bad; -+ #if PY_MAJOR_VERSION < 3 - py_code = __Pyx_PyCode_New( - 0, - 0, -@@ -7382,11 +5885,16 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - __pyx_empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); -- Py_DECREF(py_funcname); -+ #else -+ py_code = PyCode_NewEmpty(filename, funcname, py_line); -+ #endif -+ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline - return py_code; - bad: -- Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -+ #if PY_MAJOR_VERSION < 3 -+ Py_XDECREF(py_srcfile); -+ #endif - return NULL; - } - static void __Pyx_AddTraceback(const char *funcname, int c_line, -@@ -7727,24 +6235,31 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - #endif - - /* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - if (is_unsigned) { -- if (sizeof(int) < sizeof(long)) { -+ if (sizeof(long) < sizeof(long)) { - return PyInt_FromLong((long) value); -- } else if (sizeof(int) <= sizeof(unsigned long)) { -+ } else if (sizeof(long) <= sizeof(unsigned long)) { - return PyLong_FromUnsignedLong((unsigned long) value); - #ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { - return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); - #endif - } - } else { -- if (sizeof(int) <= sizeof(long)) { -+ if (sizeof(long) <= sizeof(long)) { - return PyInt_FromLong((long) value); - #ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { - return PyLong_FromLongLong((PY_LONG_LONG) value); - #endif - } -@@ -7752,7 +6267,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - { - int one = 1; int little = (int)*(unsigned char *)&one; - unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(int), -+ return _PyLong_FromByteArray(bytes, sizeof(long), - little, !is_unsigned); - } - } -@@ -7779,51 +6294,27 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - return (target_type) value;\ - } - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { -- const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(enum NPY_TYPES) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+/* CIntFromPy */ -+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" - #endif -- } -- } else { -- if (sizeof(enum NPY_TYPES) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop - #endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), -- little, !is_unsigned); -- } --} -- --/* CIntFromPy */ --static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -- if (sizeof(int) < sizeof(long)) { -- __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) -+ if (sizeof(long) < sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } -- return (int) val; -+ return (long) val; - } - } else - #endif -@@ -7832,32 +6323,32 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (int) 0; -- case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) -+ case 0: return (long) 0; -+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) - case 2: -- if (8 * sizeof(int) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { -- return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { -+ return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - case 3: -- if (8 * sizeof(int) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { -- return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { -+ return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; - case 4: -- if (8 * sizeof(int) > 3 * PyLong_SHIFT) { -- if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { -- return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); -+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { -+ return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); - } - } - break; -@@ -7871,86 +6362,86 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) -- return (int) -1; -+ return (long) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } - #endif -- if (sizeof(int) <= sizeof(unsigned long)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) -+ if (sizeof(long) <= sizeof(unsigned long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) - #endif - } - } else { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (int) 0; -- case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) -- case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) -+ case 0: return (long) 0; -+ case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) -+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) - case -2: -- if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -+ return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 2: -- if (8 * sizeof(int) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -- return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -+ return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case -3: -- if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -+ return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 3: -- if (8 * sizeof(int) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -- return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -+ return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case -4: -- if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -- return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -+ return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - case 4: -- if (8 * sizeof(int) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -- return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -+ return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); - } - } - break; - } - #endif -- if (sizeof(int) <= sizeof(long)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) -+ if (sizeof(long) <= sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) -+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) - #endif - } - } -@@ -7959,7 +6450,7 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); - #else -- int val; -+ long val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); - #if PY_MAJOR_VERSION < 3 - if (likely(v) && !PyLong_Check(v)) { -@@ -7979,71 +6470,47 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - return val; - } - #endif -- return (int) -1; -+ return (long) -1; - } - } else { -- int val; -+ long val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); -- if (!tmp) return (int) -1; -- val = __Pyx_PyInt_As_int(tmp); -+ if (!tmp) return (long) -1; -+ val = __Pyx_PyInt_As_long(tmp); - Py_DECREF(tmp); - return val; - } - raise_overflow: - PyErr_SetString(PyExc_OverflowError, -- "value too large to convert to int"); -- return (int) -1; -+ "value too large to convert to long"); -+ return (long) -1; - raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, -- "can't convert negative value to int"); -- return (int) -1; -+ "can't convert negative value to long"); -+ return (long) -1; - } - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(long) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(long) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+/* CIntFromPy */ -+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" - #endif -- } -- } else { -- if (sizeof(long) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop - #endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(long), -- little, !is_unsigned); -- } --} -- --/* CIntFromPy */ --static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -- if (sizeof(long) < sizeof(long)) { -- __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x)) -+ if (sizeof(int) < sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x)) - } else { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - goto raise_neg_overflow; - } -- return (long) val; -+ return (int) val; - } - } else - #endif -@@ -8052,32 +6519,32 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (long) 0; -- case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0]) -+ case 0: return (int) 0; -+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0]) - case 2: -- if (8 * sizeof(long) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) { -- return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) { -+ return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; - case 3: -- if (8 * sizeof(long) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) { -- return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) { -+ return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; - case 4: -- if (8 * sizeof(long) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) { -- return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) { -+ return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])); - } - } - break; -@@ -8091,86 +6558,86 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - { - int result = PyObject_RichCompareBool(x, Py_False, Py_LT); - if (unlikely(result < 0)) -- return (long) -1; -+ return (int) -1; - if (unlikely(result == 1)) - goto raise_neg_overflow; - } - #endif -- if (sizeof(long) <= sizeof(unsigned long)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x)) -+ if (sizeof(int) <= sizeof(unsigned long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x)) - #endif - } - } else { - #if CYTHON_USE_PYLONG_INTERNALS - const digit* digits = ((PyLongObject*)x)->ob_digit; - switch (Py_SIZE(x)) { -- case 0: return (long) 0; -- case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0])) -- case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0]) -+ case 0: return (int) 0; -+ case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0])) -+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0]) - case -2: -- if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -- return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 2: -- if (8 * sizeof(long) > 1 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -- return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { -+ return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case -3: -- if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -- return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 3: -- if (8 * sizeof(long) > 2 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -- return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { -+ return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case -4: -- if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -- return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -+ return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - case 4: -- if (8 * sizeof(long) > 3 * PyLong_SHIFT) { -+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) { - if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) { -- __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -- } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { -- return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]))); -+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]))) -+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) { -+ return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]))); - } - } - break; - } - #endif -- if (sizeof(long) <= sizeof(long)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x)) -+ if (sizeof(int) <= sizeof(long)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x)) - #ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -- __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x)) -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x)) - #endif - } - } -@@ -8179,7 +6646,7 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - PyErr_SetString(PyExc_RuntimeError, - "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); - #else -- long val; -+ int val; - PyObject *v = __Pyx_PyNumber_IntOrLong(x); - #if PY_MAJOR_VERSION < 3 - if (likely(v) && !PyLong_Check(v)) { -@@ -8199,24 +6666,24 @@ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - return val; - } - #endif -- return (long) -1; -+ return (int) -1; - } - } else { -- long val; -+ int val; - PyObject *tmp = __Pyx_PyNumber_IntOrLong(x); -- if (!tmp) return (long) -1; -- val = __Pyx_PyInt_As_long(tmp); -+ if (!tmp) return (int) -1; -+ val = __Pyx_PyInt_As_int(tmp); - Py_DECREF(tmp); - return val; - } - raise_overflow: - PyErr_SetString(PyExc_OverflowError, -- "value too large to convert to long"); -- return (long) -1; -+ "value too large to convert to int"); -+ return (int) -1; - raise_neg_overflow: - PyErr_SetString(PyExc_OverflowError, -- "can't convert negative value to long"); -- return (long) -1; -+ "can't convert negative value to int"); -+ return (int) -1; - } - - /* FastTypeChecks */ -@@ -8583,6 +7050,23 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_DECREF(x); - return ival; - } -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { -+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { -+ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); -+#if PY_MAJOR_VERSION < 3 -+ } else if (likely(PyInt_CheckExact(o))) { -+ return PyInt_AS_LONG(o); -+#endif -+ } else { -+ Py_ssize_t ival; -+ PyObject *x; -+ x = PyNumber_Index(o); -+ if (!x) return -1; -+ ival = PyInt_AsLong(x); -+ Py_DECREF(x); -+ return ival; -+ } -+} - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); - } -diff --git a/cylp/cy/CyWolfePivot.cpp b/cylp/cy/CyWolfePivot.cpp -index 4a04bbf..7f08627 100644 ---- a/cylp/cy/CyWolfePivot.cpp -+++ b/cylp/cy/CyWolfePivot.cpp -@@ -1,14 +1,16 @@ --/* Generated by Cython 0.29.12 */ -+/* Generated by Cython 0.29.25 */ - -+#ifndef PY_SSIZE_T_CLEAN - #define PY_SSIZE_T_CLEAN -+#endif /* PY_SSIZE_T_CLEAN */ - #include "Python.h" - #ifndef Py_PYTHON_H - #error Python headers needed to compile C extensions, please install development version of Python. - #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. - #else --#define CYTHON_ABI "0_29_12" --#define CYTHON_HEX_VERSION 0x001D0CF0 -+#define CYTHON_ABI "0_29_25" -+#define CYTHON_HEX_VERSION 0x001D19F0 - #define CYTHON_FUTURE_DIVISION 0 - #include - #ifndef offsetof -@@ -155,7 +157,7 @@ - #ifndef CYTHON_USE_UNICODE_INTERNALS - #define CYTHON_USE_UNICODE_INTERNALS 1 - #endif -- #if PY_VERSION_HEX < 0x030300F0 -+ #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2 - #undef CYTHON_USE_UNICODE_WRITER - #define CYTHON_USE_UNICODE_WRITER 0 - #elif !defined(CYTHON_USE_UNICODE_WRITER) -@@ -174,7 +176,7 @@ - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL -- #define CYTHON_FAST_PYCALL 1 -+ #define CYTHON_FAST_PYCALL (PY_VERSION_HEX < 0x030B00A1) - #endif - #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) -@@ -193,7 +195,9 @@ - #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) - #endif - #if CYTHON_USE_PYLONG_INTERNALS -- #include "longintrepr.h" -+ #if PY_MAJOR_VERSION < 3 -+ #include "longintrepr.h" -+ #endif - #undef SHIFT - #undef BASE - #undef MASK -@@ -324,9 +328,68 @@ class __Pyx_FakeReference { - #define __Pyx_DefaultClassType PyClass_Type - #else - #define __Pyx_BUILTIN_MODULE_NAME "builtins" --#if PY_VERSION_HEX >= 0x030800A4 && PY_VERSION_HEX < 0x030800B2 -- #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ -- PyCode_New(a, 0, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -+ #define __Pyx_DefaultClassType PyType_Type -+#if PY_VERSION_HEX >= 0x030B00A1 -+ static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int k, int l, int s, int f, -+ PyObject *code, PyObject *c, PyObject* n, PyObject *v, -+ PyObject *fv, PyObject *cell, PyObject* fn, -+ PyObject *name, int fline, PyObject *lnos) { -+ PyObject *kwds=NULL, *argcount=NULL, *posonlyargcount=NULL, *kwonlyargcount=NULL; -+ PyObject *nlocals=NULL, *stacksize=NULL, *flags=NULL, *replace=NULL, *call_result=NULL, *empty=NULL; -+ const char *fn_cstr=NULL; -+ const char *name_cstr=NULL; -+ PyCodeObject* co=NULL; -+ PyObject *type, *value, *traceback; -+ PyErr_Fetch(&type, &value, &traceback); -+ if (!(kwds=PyDict_New())) goto end; -+ if (!(argcount=PyLong_FromLong(a))) goto end; -+ if (PyDict_SetItemString(kwds, "co_argcount", argcount) != 0) goto end; -+ if (!(posonlyargcount=PyLong_FromLong(0))) goto end; -+ if (PyDict_SetItemString(kwds, "co_posonlyargcount", posonlyargcount) != 0) goto end; -+ if (!(kwonlyargcount=PyLong_FromLong(k))) goto end; -+ if (PyDict_SetItemString(kwds, "co_kwonlyargcount", kwonlyargcount) != 0) goto end; -+ if (!(nlocals=PyLong_FromLong(l))) goto end; -+ if (PyDict_SetItemString(kwds, "co_nlocals", nlocals) != 0) goto end; -+ if (!(stacksize=PyLong_FromLong(s))) goto end; -+ if (PyDict_SetItemString(kwds, "co_stacksize", stacksize) != 0) goto end; -+ if (!(flags=PyLong_FromLong(f))) goto end; -+ if (PyDict_SetItemString(kwds, "co_flags", flags) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_code", code) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_consts", c) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_names", n) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_varnames", v) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_freevars", fv) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_cellvars", cell) != 0) goto end; -+ if (PyDict_SetItemString(kwds, "co_linetable", lnos) != 0) goto end; -+ if (!(fn_cstr=PyUnicode_AsUTF8AndSize(fn, NULL))) goto end; -+ if (!(name_cstr=PyUnicode_AsUTF8AndSize(name, NULL))) goto end; -+ if (!(co = PyCode_NewEmpty(fn_cstr, name_cstr, fline))) goto end; -+ if (!(replace = PyObject_GetAttrString((PyObject*)co, "replace"))) goto cleanup_code_too; -+ if (!(empty = PyTuple_New(0))) goto cleanup_code_too; // unfortunately __pyx_empty_tuple isn't available here -+ if (!(call_result = PyObject_Call(replace, empty, kwds))) goto cleanup_code_too; -+ Py_XDECREF((PyObject*)co); -+ co = (PyCodeObject*)call_result; -+ call_result = NULL; -+ if (0) { -+ cleanup_code_too: -+ Py_XDECREF((PyObject*)co); -+ co = NULL; -+ } -+ end: -+ Py_XDECREF(kwds); -+ Py_XDECREF(argcount); -+ Py_XDECREF(posonlyargcount); -+ Py_XDECREF(kwonlyargcount); -+ Py_XDECREF(nlocals); -+ Py_XDECREF(stacksize); -+ Py_XDECREF(replace); -+ Py_XDECREF(call_result); -+ Py_XDECREF(empty); -+ if (type) { -+ PyErr_Restore(type, value, traceback); -+ } -+ return co; -+ } - #else - #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\ - PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) -@@ -440,8 +503,12 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #endif - #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) - #define CYTHON_PEP393_ENABLED 1 -+ #if defined(PyUnicode_IS_READY) - #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\ - 0 : _PyUnicode_Ready((PyObject *)(op))) -+ #else -+ #define __Pyx_PyUnicode_READY(op) (0) -+ #endif - #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) - #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) - #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u) -@@ -449,7 +516,15 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) - #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) - #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch) -+ #if defined(PyUnicode_IS_READY) && defined(PyUnicode_GET_SIZE) -+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000 -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length)) -+ #else - #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u))) -+ #endif -+ #else -+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u)) -+ #endif - #else - #define CYTHON_PEP393_ENABLED 0 - #define PyUnicode_1BYTE_KIND 1 -@@ -498,8 +573,10 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #define PyString_Type PyUnicode_Type - #define PyString_Check PyUnicode_Check - #define PyString_CheckExact PyUnicode_CheckExact -+#ifndef PyObject_Unicode - #define PyObject_Unicode PyObject_Str - #endif -+#endif - #if PY_MAJOR_VERSION >= 3 - #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) - #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) -@@ -510,6 +587,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #ifndef PySet_CheckExact - #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type) - #endif -+#if PY_VERSION_HEX >= 0x030900A4 -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size) -+#else -+ #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt) -+ #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size) -+#endif - #if CYTHON_ASSUME_SAFE_MACROS - #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq) - #else -@@ -543,13 +627,13 @@ static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) { - #if PY_VERSION_HEX < 0x030200A4 - typedef long Py_hash_t; - #define __Pyx_PyInt_FromHash_t PyInt_FromLong -- #define __Pyx_PyInt_AsHash_t PyInt_AsLong -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t - #else - #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t -- #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t -+ #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t - #endif - #if PY_MAJOR_VERSION >= 3 -- #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : (Py_INCREF(func), func)) -+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? ((void)(klass), PyMethod_New(func, self)) : __Pyx_NewRef(func)) - #else - #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass) - #endif -@@ -590,11 +674,10 @@ static CYTHON_INLINE float __PYX_NAN() { - #define __Pyx_truncl truncl - #endif - -- -+#define __PYX_MARK_ERR_POS(f_index, lineno) \ -+ { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; } - #define __PYX_ERR(f_index, lineno, Ln_error) \ --{ \ -- __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \ --} -+ { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; } - - #ifndef __PYX_EXTERN_C - #ifdef __cplusplus -@@ -612,7 +695,13 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "pythread.h" - #include "ICoinIndexedVector.hpp" - #include "numpy/arrayobject.h" -+#include "numpy/ndarrayobject.h" -+#include "numpy/ndarraytypes.h" -+#include "numpy/arrayscalars.h" - #include "numpy/ufuncobject.h" -+ -+ /* NumPy API declarations from "numpy/__init__.pxd" */ -+ - #include "ClpDualRowPivot.hpp" - #include "ClpFactorization.hpp" - #include "IClpDualRowPivotBase.h" -@@ -641,11 +730,11 @@ static CYTHON_INLINE float __PYX_NAN() { - #include "OsiSolverInterface.hpp" - #include "CbcCompareUser.hpp" - #include "ICbcModel.hpp" -+#include - #include "ios" - #include "new" - #include "stdexcept" - #include "typeinfo" --#include - #include - #include "IClpPrimalColumnPivotBase.h" - #include "ClpPrimalColumnPivot.hpp" -@@ -746,6 +835,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); - (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); - static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); - #if CYTHON_ASSUME_SAFE_MACROS - #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) - #else -@@ -881,23 +971,23 @@ static const char *__pyx_filename; - - static const char *__pyx_f[] = { - "stringsource", -- "cylp\\cy\\CyWolfePivot.pyx", -+ "cylp/cy/CyWolfePivot.pyx", - "__init__.pxd", - "type.pxd", - "bool.pxd", - "complex.pxd", -- "cylp\\cy\\CyCoinIndexedVector.pxd", -- "cylp\\cy\\CyClpDualRowPivotBase.pxd", -- "cylp\\cy\\CyCoinModel.pxd", -- "cylp\\cy\\CyCoinPackedMatrix.pxd", -- "cylp\\cy\\CyCgl.pxd", -- "cylp\\cy\\CyCbcNode.pxd", -- "cylp\\cy\\CyOsiSolverInterface.pxd", -- "cylp\\cy\\CyCbcModel.pxd", -- "cylp\\cy\\CyClpSimplex.pxd", -+ "cylp/cy/CyCoinIndexedVector.pxd", -+ "cylp/cy/CyClpDualRowPivotBase.pxd", -+ "cylp/cy/CyCoinModel.pxd", -+ "cylp/cy/CyCoinPackedMatrix.pxd", -+ "cylp/cy/CyCgl.pxd", -+ "cylp/cy/CyCbcNode.pxd", -+ "cylp/cy/CyOsiSolverInterface.pxd", -+ "cylp/cy/CyCbcModel.pxd", -+ "cylp/cy/CyClpSimplex.pxd", - }; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":776 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":690 - * # in Cython to enable them only on the right systems. - * - * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< -@@ -906,7 +996,7 @@ static const char *__pyx_f[] = { - */ - typedef npy_int8 __pyx_t_5numpy_int8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":777 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":691 - * - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< -@@ -915,7 +1005,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; - */ - typedef npy_int16 __pyx_t_5numpy_int16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":778 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":692 - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< -@@ -924,7 +1014,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; - */ - typedef npy_int32 __pyx_t_5numpy_int32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":779 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":693 - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t - * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< -@@ -933,7 +1023,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; - */ - typedef npy_int64 __pyx_t_5numpy_int64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":783 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":697 - * #ctypedef npy_int128 int128_t - * - * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< -@@ -942,7 +1032,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; - */ - typedef npy_uint8 __pyx_t_5numpy_uint8_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":784 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":698 - * - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< -@@ -951,7 +1041,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; - */ - typedef npy_uint16 __pyx_t_5numpy_uint16_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":785 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":699 - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< -@@ -960,7 +1050,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; - */ - typedef npy_uint32 __pyx_t_5numpy_uint32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":786 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":700 - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t - * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< -@@ -969,7 +1059,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; - */ - typedef npy_uint64 __pyx_t_5numpy_uint64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":790 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":704 - * #ctypedef npy_uint128 uint128_t - * - * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< -@@ -978,7 +1068,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; - */ - typedef npy_float32 __pyx_t_5numpy_float32_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":791 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":705 - * - * ctypedef npy_float32 float32_t - * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< -@@ -987,7 +1077,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; - */ - typedef npy_float64 __pyx_t_5numpy_float64_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":800 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":714 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< -@@ -996,7 +1086,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; - */ - typedef npy_long __pyx_t_5numpy_int_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":801 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":715 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< -@@ -1005,7 +1095,7 @@ typedef npy_long __pyx_t_5numpy_int_t; - */ - typedef npy_longlong __pyx_t_5numpy_long_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":802 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":716 - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t - * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< -@@ -1014,7 +1104,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; - */ - typedef npy_longlong __pyx_t_5numpy_longlong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":804 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":718 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< -@@ -1023,7 +1113,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; - */ - typedef npy_ulong __pyx_t_5numpy_uint_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":805 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":719 - * - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< -@@ -1032,7 +1122,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":806 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":720 - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t - * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< -@@ -1041,7 +1131,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":808 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":722 - * ctypedef npy_ulonglong ulonglong_t - * - * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< -@@ -1050,7 +1140,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - */ - typedef npy_intp __pyx_t_5numpy_intp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":809 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":723 - * - * ctypedef npy_intp intp_t - * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< -@@ -1059,7 +1149,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; - */ - typedef npy_uintp __pyx_t_5numpy_uintp_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":811 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":725 - * ctypedef npy_uintp uintp_t - * - * ctypedef npy_double float_t # <<<<<<<<<<<<<< -@@ -1068,7 +1158,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; - */ - typedef npy_double __pyx_t_5numpy_float_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":812 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":726 - * - * ctypedef npy_double float_t - * ctypedef npy_double double_t # <<<<<<<<<<<<<< -@@ -1077,7 +1167,7 @@ typedef npy_double __pyx_t_5numpy_float_t; - */ - typedef npy_double __pyx_t_5numpy_double_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":813 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":727 - * ctypedef npy_double float_t - * ctypedef npy_double double_t - * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< -@@ -1140,7 +1230,7 @@ struct __pyx_obj_4cylp_2cy_12CyClpSimplex_VarStatus; - struct __pyx_obj_4cylp_2cy_26CyClpPrimalColumnPivotBase_CyClpPrimalColumnPivotBase; - struct __pyx_obj_4cylp_2cy_12CyWolfePivot_CyWolfePivot; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":815 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":729 - * ctypedef npy_longdouble longdouble_t - * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< -@@ -1149,7 +1239,7 @@ struct __pyx_obj_4cylp_2cy_12CyWolfePivot_CyWolfePivot; - */ - typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":816 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":730 - * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< -@@ -1158,7 +1248,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - */ - typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":817 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":731 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< -@@ -1167,7 +1257,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - */ - typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":819 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":733 - * ctypedef npy_clongdouble clongdouble_t - * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< -@@ -1860,6 +1950,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #ifndef Py_MEMBER_SIZE - #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) - #endif -+#if CYTHON_FAST_PYCALL - static size_t __pyx_pyframe_localsplus_offset = 0; - #include "frameobject.h" - #define __Pxy_PyFrame_Initialize_Offsets()\ -@@ -1867,6 +1958,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) - #define __Pyx_PyFrame_GetLocalsplus(frame)\ - (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) -+#endif // CYTHON_FAST_PYCALL - #endif - - /* PyObjectCall.proto */ -@@ -1983,29 +2075,6 @@ static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject - /* RaiseException.proto */ - static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); - --/* DictGetItem.proto */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key); --#define __Pyx_PyObject_Dict_GetItem(obj, name)\ -- (likely(PyDict_CheckExact(obj)) ?\ -- __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name)) --#else --#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key) --#define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name) --#endif -- --/* RaiseTooManyValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); -- --/* RaiseNeedMoreValuesToUnpack.proto */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); -- --/* RaiseNoneIterError.proto */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void); -- --/* ExtTypeTest.proto */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); -- - /* GetTopmostException.proto */ - #if CYTHON_USE_EXC_INFO_STACK - static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); -@@ -2078,6 +2147,9 @@ static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_nam - /* SetVTable.proto */ - static int __Pyx_SetVtable(PyObject *dict, void *vtable); - -+/* PyObjectGetAttrStrNoError.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name); -+ - /* SetupReduce.proto */ - static int __Pyx_setup_reduce(PyObject* type_obj); - -@@ -2133,14 +2205,10 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object); - static void __Pyx_AddTraceback(const char *funcname, int c_line, - int py_line, const char *filename); - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); -- --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__IClpSimplex_3a__3a_Status(enum IClpSimplex::Status value); -- --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -+/* GCCDiagnostics.proto */ -+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -+#define __Pyx_HAS_GCC_DIAGNOSTIC -+#endif - - /* RealImag.proto */ - #if CYTHON_CCOMPLEX -@@ -2240,12 +2308,18 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); - #endif - #endif - --/* CIntToPy.proto */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value); -- - /* CIntFromPy.proto */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); - -+/* CIntToPy.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); -+ -+/* CIntToPy.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__IClpSimplex_3a__3a_Status(enum IClpSimplex::Status value); -+ -+/* CIntToPy.proto */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); -+ - /* CIntFromPy.proto */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); - -@@ -2370,8 +2444,17 @@ static PyTypeObject *__pyx_ptype_5numpy_dtype = 0; - static PyTypeObject *__pyx_ptype_5numpy_flatiter = 0; - static PyTypeObject *__pyx_ptype_5numpy_broadcast = 0; - static PyTypeObject *__pyx_ptype_5numpy_ndarray = 0; -+static PyTypeObject *__pyx_ptype_5numpy_generic = 0; -+static PyTypeObject *__pyx_ptype_5numpy_number = 0; -+static PyTypeObject *__pyx_ptype_5numpy_integer = 0; -+static PyTypeObject *__pyx_ptype_5numpy_signedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_unsignedinteger = 0; -+static PyTypeObject *__pyx_ptype_5numpy_inexact = 0; -+static PyTypeObject *__pyx_ptype_5numpy_floating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_complexfloating = 0; -+static PyTypeObject *__pyx_ptype_5numpy_flexible = 0; -+static PyTypeObject *__pyx_ptype_5numpy_character = 0; - static PyTypeObject *__pyx_ptype_5numpy_ufunc = 0; --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *, char *, char *, int *); /*proto*/ - - /* Module declarations from 'cylp.cy.CyClpDualRowPivotBase' */ - static PyTypeObject *__pyx_ptype_4cylp_2cy_21CyClpDualRowPivotBase_CyClpDualRowPivotBase = 0; -@@ -2432,9 +2515,6 @@ int __pyx_module_is_main_cylp__cy__CyWolfePivot = 0; - - /* Implementation of 'cylp.cy.CyWolfePivot' */ - static PyObject *__pyx_builtin_TypeError; --static PyObject *__pyx_builtin_ValueError; --static PyObject *__pyx_builtin_range; --static PyObject *__pyx_builtin_RuntimeError; - static PyObject *__pyx_builtin_ImportError; - static const char __pyx_k_main[] = "__main__"; - static const char __pyx_k_name[] = "__name__"; -@@ -2442,7 +2522,6 @@ static const char __pyx_k_test[] = "__test__"; - static const char __pyx_k_clear[] = "clear"; - static const char __pyx_k_nCols[] = "nCols"; - static const char __pyx_k_nRows[] = "nRows"; --static const char __pyx_k_range[] = "range"; - static const char __pyx_k_reduce[] = "__reduce__"; - static const char __pyx_k_indices[] = "indices"; - static const char __pyx_k_elements[] = "elements"; -@@ -2451,12 +2530,10 @@ static const char __pyx_k_setstate[] = "__setstate__"; - static const char __pyx_k_TypeError[] = "TypeError"; - static const char __pyx_k_nElements[] = "nElements"; - static const char __pyx_k_reduce_ex[] = "__reduce_ex__"; --static const char __pyx_k_ValueError[] = "ValueError"; - static const char __pyx_k_nVariables[] = "nVariables"; - static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; - static const char __pyx_k_ImportError[] = "ImportError"; - static const char __pyx_k_CyWolfePivot[] = "CyWolfePivot"; --static const char __pyx_k_RuntimeError[] = "RuntimeError"; - static const char __pyx_k_reducedCosts[] = "reducedCosts"; - static const char __pyx_k_dualTolerance[] = "dualTolerance"; - static const char __pyx_k_reduce_cython[] = "__reduce_cython__"; -@@ -2464,23 +2541,12 @@ static const char __pyx_k_transposeTimes[] = "transposeTimes"; - static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; - static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; - static const char __pyx_k_updateColumnTranspose[] = "updateColumnTranspose"; --static const char __pyx_k_ndarray_is_not_C_contiguous[] = "ndarray is not C contiguous"; - static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; --static const char __pyx_k_unknown_dtype_code_in_numpy_pxd[] = "unknown dtype code in numpy.pxd (%d)"; --static const char __pyx_k_Format_string_allocated_too_shor[] = "Format string allocated too short, see comment in numpy.pxd"; --static const char __pyx_k_Non_native_byte_order_not_suppor[] = "Non-native byte order not supported"; --static const char __pyx_k_ndarray_is_not_Fortran_contiguou[] = "ndarray is not Fortran contiguous"; - static const char __pyx_k_numpy_core_umath_failed_to_impor[] = "numpy.core.umath failed to import"; - static const char __pyx_k_self_CppSelf_cannot_be_converted[] = "self.CppSelf cannot be converted to a Python object for pickling"; --static const char __pyx_k_Format_string_allocated_too_shor_2[] = "Format string allocated too short."; - static PyObject *__pyx_n_s_CyWolfePivot; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; --static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; - static PyObject *__pyx_n_s_ImportError; --static PyObject *__pyx_kp_u_Non_native_byte_order_not_suppor; --static PyObject *__pyx_n_s_RuntimeError; - static PyObject *__pyx_n_s_TypeError; --static PyObject *__pyx_n_s_ValueError; - static PyObject *__pyx_n_s_clear; - static PyObject *__pyx_n_s_cline_in_traceback; - static PyObject *__pyx_n_s_dualTolerance; -@@ -2493,12 +2559,9 @@ static PyObject *__pyx_n_s_nElements; - static PyObject *__pyx_n_s_nRows; - static PyObject *__pyx_n_s_nVariables; - static PyObject *__pyx_n_s_name; --static PyObject *__pyx_kp_u_ndarray_is_not_C_contiguous; --static PyObject *__pyx_kp_u_ndarray_is_not_Fortran_contiguou; - static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; - static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; - static PyObject *__pyx_n_s_pyx_vtable; --static PyObject *__pyx_n_s_range; - static PyObject *__pyx_n_s_reduce; - static PyObject *__pyx_n_s_reduce_cython; - static PyObject *__pyx_n_s_reduce_ex; -@@ -2508,12 +2571,9 @@ static PyObject *__pyx_n_s_setstate; - static PyObject *__pyx_n_s_setstate_cython; - static PyObject *__pyx_n_s_test; - static PyObject *__pyx_n_s_transposeTimes; --static PyObject *__pyx_kp_u_unknown_dtype_code_in_numpy_pxd; - static PyObject *__pyx_n_s_updateColumnTranspose; - static PyObject *__pyx_pf_4cylp_2cy_12CyWolfePivot_12CyWolfePivot___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_12CyWolfePivot_CyWolfePivot *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_12CyWolfePivot_12CyWolfePivot_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_4cylp_2cy_12CyWolfePivot_CyWolfePivot *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */ --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /* proto */ --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */ - static PyObject *__pyx_tp_new_4cylp_2cy_12CyWolfePivot_CyWolfePivot(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ - static PyObject *__pyx_int_1; - static PyObject *__pyx_int_2; -@@ -2524,11 +2584,6 @@ static PyObject *__pyx_tuple_; - static PyObject *__pyx_tuple__2; - static PyObject *__pyx_tuple__3; - static PyObject *__pyx_tuple__4; --static PyObject *__pyx_tuple__5; --static PyObject *__pyx_tuple__6; --static PyObject *__pyx_tuple__7; --static PyObject *__pyx_tuple__8; --static PyObject *__pyx_tuple__9; - /* Late includes */ - - /* "cylp/cy/CyWolfePivot.pyx":8 -@@ -2566,6 +2621,9 @@ static PyObject *__pyx_f_4cylp_2cy_12CyWolfePivot_12CyWolfePivot_pivotColumn(str - double __pyx_t_9; - Py_ssize_t __pyx_t_10; - int __pyx_t_11; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("pivotColumn", 0); - - /* "cylp/cy/CyWolfePivot.pyx":11 -@@ -3500,6 +3558,9 @@ static PyObject *__pyx_pf_4cylp_2cy_12CyWolfePivot_12CyWolfePivot___reduce_cytho - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__reduce_cython__", 0); - - /* "(tree fragment)":2 -@@ -3555,6 +3616,9 @@ static PyObject *__pyx_pf_4cylp_2cy_12CyWolfePivot_12CyWolfePivot_2__setstate_cy - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__setstate_cython__", 0); - - /* "(tree fragment)":4 -@@ -3585,1918 +3649,331 @@ static PyObject *__pyx_pf_4cylp_2cy_12CyWolfePivot_12CyWolfePivot_2__setstate_cy - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 -+ * ctypedef npy_cdouble complex_t -+ * -+ * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(1, a) -+ * - */ - --/* Python wrapper */ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/ --static CYTHON_UNUSED int __pyx_pw_5numpy_7ndarray_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_r; -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0); -- __pyx_r = __pyx_pf_5numpy_7ndarray___getbuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --static int __pyx_pf_5numpy_7ndarray___getbuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) { -- int __pyx_v_i; -- int __pyx_v_ndim; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- int __pyx_v_t; -- char *__pyx_v_f; -- PyArray_Descr *__pyx_v_descr = 0; -- int __pyx_v_offset; -- int __pyx_r; -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { -+ PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- int __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- int __pyx_t_4; -- int __pyx_t_5; -- int __pyx_t_6; -- PyArray_Descr *__pyx_t_7; -- PyObject *__pyx_t_8 = NULL; -- char *__pyx_t_9; -- if (__pyx_v_info == NULL) { -- PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); -- return -1; -- } -- __Pyx_RefNannySetupContext("__getbuffer__", 0); -- __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); -- __Pyx_GIVEREF(__pyx_v_info->obj); -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":265 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":736 - * -- * cdef int i, ndim -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":266 -- * cdef int i, ndim -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew1(a): -+ * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< - * -- * ndim = PyArray_NDIM(self) -+ * cdef inline object PyArray_MultiIterNew2(a, b): - */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 736, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":268 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 -+ * ctypedef npy_cdouble complex_t - * -- * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(1, a) - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) - */ -- __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L4_bool_binop_done; -- } -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":271 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 -+ * return PyArray_MultiIterNew(1, a) - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not C contiguous") -+ * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(2, a, b) - * - */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L4_bool_binop_done:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -- * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":739 - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 272, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":270 -- * ndim = PyArray_NDIM(self) -+ * cdef inline object PyArray_MultiIterNew2(a, b): -+ * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< - * -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): - */ -- } -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 739, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 -+ * return PyArray_MultiIterNew(1, a) -+ * -+ * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(2, a, b) - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") - */ -- __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L7_bool_binop_done; -- } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":275 -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 -+ * return PyArray_MultiIterNew(2, a, b) - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< -- * raise ValueError(u"ndarray is not Fortran contiguous") -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(3, a, b, c) - * - */ -- __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L7_bool_binop_done:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -- */ -- if (unlikely(__pyx_t_1)) { -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":742 - * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 276, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":274 -- * raise ValueError(u"ndarray is not C contiguous") -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): -+ * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< - * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - */ -- } -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 742, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":278 -- * raise ValueError(u"ndarray is not Fortran contiguous") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 -+ * return PyArray_MultiIterNew(2, a, b) - * -- * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":279 -+ * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(3, a, b, c) - * -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * # Allocate new buffer for strides and shape info. - */ -- __pyx_v_info->ndim = __pyx_v_ndim; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":283 -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- */ -- __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":284 -- * # This is allocated as one block, strides first. -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim # <<<<<<<<<<<<<< -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- */ -- __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":285 -- * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) -- * info.shape = info.strides + ndim -- * for i in range(ndim): # <<<<<<<<<<<<<< -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] -- */ -- __pyx_t_4 = __pyx_v_ndim; -- __pyx_t_5 = __pyx_t_4; -- for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { -- __pyx_v_i = __pyx_t_6; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":286 -- * info.shape = info.strides + ndim -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- */ -- (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":287 -- * for i in range(ndim): -- * info.strides[i] = PyArray_STRIDES(self)[i] -- * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< -- * else: -- * info.strides = PyArray_STRIDES(self) -- */ -- (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":280 -- * info.buf = PyArray_DATA(self) -- * info.ndim = ndim -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * # Allocate new buffer for strides and shape info. -- * # This is allocated as one block, strides first. -- */ -- goto __pyx_L9; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":289 -- * info.shape[i] = PyArray_DIMS(self)[i] -- * else: -- * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- */ -- /*else*/ { -- __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":290 -- * else: -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 -+ * return PyArray_MultiIterNew(3, a, b, c) -+ * -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(4, a, b, c, d) -+ * - */ -- __pyx_v_info->shape = ((Py_ssize_t *)PyArray_DIMS(__pyx_v_self)); -- } -- __pyx_L9:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":291 -- * info.strides = PyArray_STRIDES(self) -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL # <<<<<<<<<<<<<< -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) -- */ -- __pyx_v_info->suboffsets = NULL; -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":292 -- * info.shape = PyArray_DIMS(self) -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< -- * info.readonly = not PyArray_ISWRITEABLE(self) -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":745 - * -- */ -- __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":293 -- * info.suboffsets = NULL -- * info.itemsize = PyArray_ITEMSIZE(self) -- * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -+ * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< - * -- * cdef int t -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - */ -- __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 745, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":296 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 -+ * return PyArray_MultiIterNew(3, a, b, c) - * -- * cdef int t -- * cdef char* f = NULL # <<<<<<<<<<<<<< -- * cdef dtype descr = PyArray_DESCR(self) -- * cdef int offset -- */ -- __pyx_v_f = NULL; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":297 -- * cdef int t -- * cdef char* f = NULL -- * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< -- * cdef int offset -+ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(4, a, b, c, d) - * - */ -- __pyx_t_7 = PyArray_DESCR(__pyx_v_self); -- __pyx_t_3 = ((PyObject *)__pyx_t_7); -- __Pyx_INCREF(__pyx_t_3); -- __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); -- __pyx_t_3 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":300 -- * cdef int offset -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 -+ * return PyArray_MultiIterNew(4, a, b, c, d) - * -- * info.obj = self # <<<<<<<<<<<<<< -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * if not PyDataType_HASFIELDS(descr): - */ -- __Pyx_INCREF(((PyObject *)__pyx_v_self)); -- __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); -- __pyx_v_info->obj = ((PyObject *)__pyx_v_self); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; -+ __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":748 -+ * -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< - * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -+ * cdef inline tuple PyDataType_SHAPE(dtype d): - */ -- __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); -- if (__pyx_t_1) { -+ __Pyx_XDECREF(__pyx_r); -+ __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 748, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":303 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 -+ * return PyArray_MultiIterNew(4, a, b, c, d) -+ * -+ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num # <<<<<<<<<<<<<< -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): - */ -- __pyx_t_4 = __pyx_v_descr->type_num; -- __pyx_v_t = __pyx_t_4; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '>') != 0); -- if (!__pyx_t_2) { -- goto __pyx_L15_next_or; -- } else { -- } -- __pyx_t_2 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_L15_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":305 -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- */ -- __pyx_t_2 = ((__pyx_v_descr->byteorder == '<') != 0); -- if (__pyx_t_2) { -- } else { -- __pyx_t_1 = __pyx_t_2; -- goto __pyx_L14_bool_binop_done; -- } -- __pyx_t_2 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_1 = __pyx_t_2; -- __pyx_L14_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_1)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 306, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":304 -- * if not PyDataType_HASFIELDS(descr): -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":307 -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- */ -- switch (__pyx_v_t) { -- case NPY_BYTE: -- __pyx_v_f = ((char *)"b"); -- break; -- case NPY_UBYTE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":308 -- * raise ValueError(u"Non-native byte order not supported") -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- */ -- __pyx_v_f = ((char *)"B"); -- break; -- case NPY_SHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":309 -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- */ -- __pyx_v_f = ((char *)"h"); -- break; -- case NPY_USHORT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":310 -- * elif t == NPY_UBYTE: f = "B" -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- */ -- __pyx_v_f = ((char *)"H"); -- break; -- case NPY_INT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":311 -- * elif t == NPY_SHORT: f = "h" -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- */ -- __pyx_v_f = ((char *)"i"); -- break; -- case NPY_UINT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":312 -- * elif t == NPY_USHORT: f = "H" -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- */ -- __pyx_v_f = ((char *)"I"); -- break; -- case NPY_LONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":313 -- * elif t == NPY_INT: f = "i" -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- */ -- __pyx_v_f = ((char *)"l"); -- break; -- case NPY_ULONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":314 -- * elif t == NPY_UINT: f = "I" -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- */ -- __pyx_v_f = ((char *)"L"); -- break; -- case NPY_LONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":315 -- * elif t == NPY_LONG: f = "l" -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- */ -- __pyx_v_f = ((char *)"q"); -- break; -- case NPY_ULONGLONG: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":316 -- * elif t == NPY_ULONG: f = "L" -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- */ -- __pyx_v_f = ((char *)"Q"); -- break; -- case NPY_FLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":317 -- * elif t == NPY_LONGLONG: f = "q" -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- */ -- __pyx_v_f = ((char *)"f"); -- break; -- case NPY_DOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":318 -- * elif t == NPY_ULONGLONG: f = "Q" -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- */ -- __pyx_v_f = ((char *)"d"); -- break; -- case NPY_LONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":319 -- * elif t == NPY_FLOAT: f = "f" -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- */ -- __pyx_v_f = ((char *)"g"); -- break; -- case NPY_CFLOAT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":320 -- * elif t == NPY_DOUBLE: f = "d" -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- */ -- __pyx_v_f = ((char *)"Zf"); -- break; -- case NPY_CDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":321 -- * elif t == NPY_LONGDOUBLE: f = "g" -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" -- */ -- __pyx_v_f = ((char *)"Zd"); -- break; -- case NPY_CLONGDOUBLE: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":322 -- * elif t == NPY_CFLOAT: f = "Zf" -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f = "O" -- * else: -- */ -- __pyx_v_f = ((char *)"Zg"); -- break; -- case NPY_OBJECT: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":323 -- * elif t == NPY_CDOUBLE: f = "Zd" -- * elif t == NPY_CLONGDOUBLE: f = "Zg" -- * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_v_f = ((char *)"O"); -- break; -- default: -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":325 -- * elif t == NPY_OBJECT: f = "O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * info.format = f -- * return -- */ -- __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_8); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 325, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 325, __pyx_L1_error) -- break; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":326 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f # <<<<<<<<<<<<<< -- * return -- * else: -- */ -- __pyx_v_info->format = __pyx_v_f; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":327 -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * info.format = f -- * return # <<<<<<<<<<<<<< -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- */ -- __pyx_r = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":302 -- * info.obj = self -- * -- * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< -- * t = descr.type_num -- * if ((descr.byteorder == c'>' and little_endian) or -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":329 -- * return -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- */ -- /*else*/ { -- __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":330 -- * else: -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, -- */ -- (__pyx_v_info->format[0]) = '^'; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":331 -- * info.format = PyObject_Malloc(_buffer_format_string_len) -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 # <<<<<<<<<<<<<< -- * f = _util_dtypestring(descr, info.format + 1, -- * info.format + _buffer_format_string_len, -- */ -- __pyx_v_offset = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":332 -- * info.format[0] = c'^' # Native data types, manual alignment -- * offset = 0 -- * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< -- * info.format + _buffer_format_string_len, -- * &offset) -- */ -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 332, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":335 -- * info.format + _buffer_format_string_len, -- * &offset) -- * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- */ -- (__pyx_v_f[0]) = '\x00'; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":258 -- * # experimental exception made for __getbuffer__ and __releasebuffer__ -- * # -- the details of this may change. -- * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< -- * # This implementation of getbuffer is geared towards Cython -- * # requirements, and does not yet fulfill the PEP. -- */ -- -- /* function exit code */ -- __pyx_r = 0; -- goto __pyx_L0; -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_8); -- __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = -1; -- if (__pyx_v_info->obj != NULL) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- goto __pyx_L2; -- __pyx_L0:; -- if (__pyx_v_info->obj == Py_None) { -- __Pyx_GOTREF(__pyx_v_info->obj); -- __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0; -- } -- __pyx_L2:; -- __Pyx_XDECREF((PyObject *)__pyx_v_descr); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- --/* Python wrapper */ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/ --static CYTHON_UNUSED void __pyx_pw_5numpy_7ndarray_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0); -- __pyx_pf_5numpy_7ndarray_2__releasebuffer__(((PyArrayObject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info)); -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --static void __pyx_pf_5numpy_7ndarray_2__releasebuffer__(PyArrayObject *__pyx_v_self, Py_buffer *__pyx_v_info) { -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("__releasebuffer__", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":339 -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) # <<<<<<<<<<<<<< -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) -- */ -- PyObject_Free(__pyx_v_info->format); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":338 -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): -- * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":341 -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): -- * PyObject_Free(info.strides) # <<<<<<<<<<<<<< -- * # info.shape was stored after info.strides in the same block -- * -- */ -- PyObject_Free(__pyx_v_info->strides); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":340 -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< -- * PyObject_Free(info.strides) -- * # info.shape was stored after info.strides in the same block -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":337 -- * f[0] = c'\0' # Terminate format string -- * -- * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< -- * if PyArray_HASFIELDS(self): -- * PyObject_Free(info.format) -- */ -- -- /* function exit code */ -- __Pyx_RefNannyFinishContext(); --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -- * ctypedef npy_cdouble complex_t -- * -- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(1, a) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__pyx_v_a) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":822 -- * -- * cdef inline object PyArray_MultiIterNew1(a): -- * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 822, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":821 -- * ctypedef npy_cdouble complex_t -- * -- * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(1, a) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew1", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -- * return PyArray_MultiIterNew(1, a) -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(2, a, b) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__pyx_v_a, PyObject *__pyx_v_b) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":825 -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): -- * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 825, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":824 -- * return PyArray_MultiIterNew(1, a) -- * -- * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(2, a, b) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew2", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -- * return PyArray_MultiIterNew(2, a, b) -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":828 -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): -- * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 828, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":827 -- * return PyArray_MultiIterNew(2, a, b) -- * -- * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew3", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":831 -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): -- * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 831, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":830 -- * return PyArray_MultiIterNew(3, a, b, c) -- * -- * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew4", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_c, PyObject *__pyx_v_d, PyObject *__pyx_v_e) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":834 -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): -- * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- */ -- __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 834, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_1); -- __pyx_r = __pyx_t_1; -- __pyx_t_1 = 0; -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":833 -- * return PyArray_MultiIterNew(4, a, b, c, d) -- * -- * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- */ -- -- /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = 0; -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape -- */ -- --static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { -- PyObject *__pyx_r = NULL; -- __Pyx_RefNannyDeclarations -- int __pyx_t_1; -- __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -- * return d.subarray.shape -- * else: -- */ -- __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); -- if (__pyx_t_1) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":838 -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape # <<<<<<<<<<<<<< -- * else: -- * return () -- */ -- __Pyx_XDECREF(__pyx_r); -- __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); -- __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); -- goto __pyx_L0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":837 -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): -- * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -- * return d.subarray.shape -- * else: -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":840 -- * return d.subarray.shape -- * else: -- * return () # <<<<<<<<<<<<<< -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: -- */ -- /*else*/ { -- __Pyx_XDECREF(__pyx_r); -- __Pyx_INCREF(__pyx_empty_tuple); -- __pyx_r = __pyx_empty_tuple; -- goto __pyx_L0; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":836 -- * return PyArray_MultiIterNew(5, a, b, c, d, e) -- * -- * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -- * if PyDataType_HASSUBARRAY(d): -- * return d.subarray.shape -- */ -- -- /* function exit code */ -- __pyx_L0:; -- __Pyx_XGIVEREF(__pyx_r); -- __Pyx_RefNannyFinishContext(); -- return __pyx_r; --} -- --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -- * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -- */ -- --static CYTHON_INLINE char *__pyx_f_5numpy__util_dtypestring(PyArray_Descr *__pyx_v_descr, char *__pyx_v_f, char *__pyx_v_end, int *__pyx_v_offset) { -- PyArray_Descr *__pyx_v_child = 0; -- int __pyx_v_endian_detector; -- int __pyx_v_little_endian; -- PyObject *__pyx_v_fields = 0; -- PyObject *__pyx_v_childname = NULL; -- PyObject *__pyx_v_new_offset = NULL; -- PyObject *__pyx_v_t = NULL; -- char *__pyx_r; -- __Pyx_RefNannyDeclarations -- PyObject *__pyx_t_1 = NULL; -- Py_ssize_t __pyx_t_2; -- PyObject *__pyx_t_3 = NULL; -- PyObject *__pyx_t_4 = NULL; -- int __pyx_t_5; -- int __pyx_t_6; -- int __pyx_t_7; -- long __pyx_t_8; -- char *__pyx_t_9; -- __Pyx_RefNannySetupContext("_util_dtypestring", 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":847 -- * -- * cdef dtype child -- * cdef int endian_detector = 1 # <<<<<<<<<<<<<< -- * cdef bint little_endian = ((&endian_detector)[0] != 0) -- * cdef tuple fields -- */ -- __pyx_v_endian_detector = 1; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":848 -- * cdef dtype child -- * cdef int endian_detector = 1 -- * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< -- * cdef tuple fields -- * -- */ -- __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -- * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -- */ -- if (unlikely(__pyx_v_descr->names == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); -- __PYX_ERR(2, 851, __pyx_L1_error) -- } -- __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; -- for (;;) { -- if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(2, 851, __pyx_L1_error) -- #else -- __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 851, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- #endif -- __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":852 -- * -- * for childname in descr.names: -- * fields = descr.fields[childname] # <<<<<<<<<<<<<< -- * child, new_offset = fields -- * -- */ -- if (unlikely(__pyx_v_descr->fields == Py_None)) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); -- __PYX_ERR(2, 852, __pyx_L1_error) -- } -- __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(2, 852, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); -- __pyx_t_3 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":853 -- * for childname in descr.names: -- * fields = descr.fields[childname] -- * child, new_offset = fields # <<<<<<<<<<<<<< -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- */ -- if (likely(__pyx_v_fields != Py_None)) { -- PyObject* sequence = __pyx_v_fields; -- Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); -- if (unlikely(size != 2)) { -- if (size > 2) __Pyx_RaiseTooManyValuesError(2); -- else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); -- __PYX_ERR(2, 853, __pyx_L1_error) -- } -- #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); -- __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); -- __Pyx_INCREF(__pyx_t_3); -- __Pyx_INCREF(__pyx_t_4); -- #else -- __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- #endif -- } else { -- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(2, 853, __pyx_L1_error) -- } -- if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(2, 853, __pyx_L1_error) -- __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); -- __pyx_t_3 = 0; -- __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 855, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 856, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":855 -- * child, new_offset = fields -- * -- * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '>') != 0); -- if (!__pyx_t_7) { -- goto __pyx_L8_next_or; -- } else { -- } -- __pyx_t_7 = (__pyx_v_little_endian != 0); -- if (!__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_L8_next_or:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":859 -- * -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< -- * raise ValueError(u"Non-native byte order not supported") -- * # One could encode it in the format string and have Cython -- */ -- __pyx_t_7 = ((__pyx_v_child->byteorder == '<') != 0); -- if (__pyx_t_7) { -- } else { -- __pyx_t_6 = __pyx_t_7; -- goto __pyx_L7_bool_binop_done; -- } -- __pyx_t_7 = ((!(__pyx_v_little_endian != 0)) != 0); -- __pyx_t_6 = __pyx_t_7; -- __pyx_L7_bool_binop_done:; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":860 -- * if ((child.byteorder == c'>' and little_endian) or -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * # One could encode it in the format string and have Cython -- * # complain instead, BUT: < and > in format strings also imply -- */ -- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 860, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_Raise(__pyx_t_3, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __PYX_ERR(2, 860, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":858 -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") -- * -- * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< -- * (child.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":870 -- * -- * # Output padding bytes -- * while offset[0] < new_offset: # <<<<<<<<<<<<<< -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- */ -- while (1) { -- __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 870, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (!__pyx_t_6) break; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":871 -- * # Output padding bytes -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< -- * f += 1 -- * offset[0] += 1 -- */ -- (__pyx_v_f[0]) = 0x78; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":872 -- * while offset[0] < new_offset: -- * f[0] = 120 # "x"; pad byte -- * f += 1 # <<<<<<<<<<<<<< -- * offset[0] += 1 -- * -- */ -- __pyx_v_f = (__pyx_v_f + 1); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":873 -- * f[0] = 120 # "x"; pad byte -- * f += 1 -- * offset[0] += 1 # <<<<<<<<<<<<<< -- * -- * offset[0] += child.itemsize -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":875 -- * offset[0] += 1 -- * -- * offset[0] += child.itemsize # <<<<<<<<<<<<<< -- * -- * if not PyDataType_HASFIELDS(child): -- */ -- __pyx_t_8 = 0; -- (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -- * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -- */ -- __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); -- if (__pyx_t_6) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":878 -- * -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num # <<<<<<<<<<<<<< -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") -- */ -- __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 878, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); -- __pyx_t_4 = 0; -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); -- if (unlikely(__pyx_t_6)) { -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 880, __pyx_L1_error) -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":879 -- * if not PyDataType_HASFIELDS(child): -- * t = child.type_num -- * if end - f < 5: # <<<<<<<<<<<<<< -- * raise RuntimeError(u"Format string allocated too short.") -- * -- */ -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":883 -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 883, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 98; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":884 -- * # Until ticket #99 is fixed, use integers to avoid warnings -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 884, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":885 -- * if t == NPY_BYTE: f[0] = 98 #"b" -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 885, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x68; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":886 -- * elif t == NPY_UBYTE: f[0] = 66 #"B" -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 886, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 72; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":887 -- * elif t == NPY_SHORT: f[0] = 104 #"h" -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 887, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x69; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":888 -- * elif t == NPY_USHORT: f[0] = 72 #"H" -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 888, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 73; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":889 -- * elif t == NPY_INT: f[0] = 105 #"i" -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 889, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x6C; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":890 -- * elif t == NPY_UINT: f[0] = 73 #"I" -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 890, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 76; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":891 -- * elif t == NPY_LONG: f[0] = 108 #"l" -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 891, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x71; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":892 -- * elif t == NPY_ULONG: f[0] = 76 #"L" -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 892, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 81; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":893 -- * elif t == NPY_LONGLONG: f[0] = 113 #"q" -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 893, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x66; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":894 -- * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 894, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x64; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":895 -- * elif t == NPY_FLOAT: f[0] = 102 #"f" -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 895, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 0x67; -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":896 -- * elif t == NPY_DOUBLE: f[0] = 100 #"d" -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 896, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x66; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":897 -- * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 897, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x64; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":898 -- * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- */ -- __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 898, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (__pyx_t_6) { -- (__pyx_v_f[0]) = 90; -- (__pyx_v_f[1]) = 0x67; -- __pyx_v_f = (__pyx_v_f + 1); -- goto __pyx_L15; -- } -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":899 -- * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd -- * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg -- * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- */ -- __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(2, 899, __pyx_L1_error) -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- if (likely(__pyx_t_6)) { -- (__pyx_v_f[0]) = 79; -- goto __pyx_L15; -- } -+ /* function exit code */ -+ __pyx_L1_error:; -+ __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_AddTraceback("numpy.PyArray_MultiIterNew5", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __pyx_r = 0; -+ __pyx_L0:; -+ __Pyx_XGIVEREF(__pyx_r); -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":901 -- * elif t == NPY_OBJECT: f[0] = 79 #"O" -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< -- * f += 1 -- * else: -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) -+ * -+ * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape - */ -- /*else*/ { -- __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 901, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_4); -- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; -- __Pyx_Raise(__pyx_t_4, 0, 0, 0); -- __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __PYX_ERR(2, 901, __pyx_L1_error) -- } -- __pyx_L15:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":902 -- * else: -- * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) -- * f += 1 # <<<<<<<<<<<<<< -- * else: -- * # Cython ignores struct boundary information ("T{...}"), -- */ -- __pyx_v_f = (__pyx_v_f + 1); -+static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__pyx_v_d) { -+ PyObject *__pyx_r = NULL; -+ __Pyx_RefNannyDeclarations -+ int __pyx_t_1; -+ __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":877 -- * offset[0] += child.itemsize -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * -- * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< -- * t = child.type_num -- * if end - f < 5: -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -+ * return d.subarray.shape -+ * else: - */ -- goto __pyx_L13; -- } -+ __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); -+ if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":906 -- * # Cython ignores struct boundary information ("T{...}"), -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< -- * return f -- * -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":752 -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape # <<<<<<<<<<<<<< -+ * else: -+ * return () - */ -- /*else*/ { -- __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(2, 906, __pyx_L1_error) -- __pyx_v_f = __pyx_t_9; -- } -- __pyx_L13:; -+ __Pyx_XDECREF(__pyx_r); -+ __Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape)); -+ __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); -+ goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":851 -- * cdef tuple fields -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 - * -- * for childname in descr.names: # <<<<<<<<<<<<<< -- * fields = descr.fields[childname] -- * child, new_offset = fields -+ * cdef inline tuple PyDataType_SHAPE(dtype d): -+ * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -+ * return d.subarray.shape -+ * else: - */ - } -- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":907 -- * # so don't output it -- * f = _util_dtypestring(child, f, end, offset) -- * return f # <<<<<<<<<<<<<< -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":754 -+ * return d.subarray.shape -+ * else: -+ * return () # <<<<<<<<<<<<<< - * - * - */ -- __pyx_r = __pyx_v_f; -- goto __pyx_L0; -+ /*else*/ { -+ __Pyx_XDECREF(__pyx_r); -+ __Pyx_INCREF(__pyx_empty_tuple); -+ __pyx_r = __pyx_empty_tuple; -+ goto __pyx_L0; -+ } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":842 -- * return () -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 -+ * return PyArray_MultiIterNew(5, a, b, c, d, e) - * -- * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< -- * # Recursive utility function used in __getbuffer__ to get format -- * # string. The new location in the format string is returned. -+ * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -+ * if PyDataType_HASSUBARRAY(d): -+ * return d.subarray.shape - */ - - /* function exit code */ -- __pyx_L1_error:; -- __Pyx_XDECREF(__pyx_t_1); -- __Pyx_XDECREF(__pyx_t_3); -- __Pyx_XDECREF(__pyx_t_4); -- __Pyx_AddTraceback("numpy._util_dtypestring", __pyx_clineno, __pyx_lineno, __pyx_filename); -- __pyx_r = NULL; - __pyx_L0:; -- __Pyx_XDECREF((PyObject *)__pyx_v_child); -- __Pyx_XDECREF(__pyx_v_fields); -- __Pyx_XDECREF(__pyx_v_childname); -- __Pyx_XDECREF(__pyx_v_new_offset); -- __Pyx_XDECREF(__pyx_v_t); -+ __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -5508,7 +3985,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("set_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1023 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":930 - * - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< -@@ -5517,7 +3994,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - Py_INCREF(__pyx_v_base); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1024 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":931 - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< -@@ -5526,7 +4003,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1022 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -5538,7 +4015,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyFinishContext(); - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5553,7 +4030,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - int __pyx_t_1; - __Pyx_RefNannySetupContext("get_array_base", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1027 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":934 - * - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< -@@ -5562,7 +4039,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - __pyx_v_base = PyArray_BASE(__pyx_v_arr); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5572,7 +4049,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_t_1 = ((__pyx_v_base == NULL) != 0); - if (__pyx_t_1) { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1029 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":936 - * base = PyArray_BASE(arr) - * if base is NULL: - * return None # <<<<<<<<<<<<<< -@@ -5583,7 +4060,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1028 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -5592,7 +4069,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1030 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":937 - * if base is NULL: - * return None - * return base # <<<<<<<<<<<<<< -@@ -5604,7 +4081,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = ((PyObject *)__pyx_v_base); - goto __pyx_L0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1026 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -5619,12 +4096,12 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { -@@ -5638,13 +4115,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_array", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - { -@@ -5656,20 +4136,20 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1036 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":943 - * cdef inline int import_array() except -1: - * try: -- * _import_array() # <<<<<<<<<<<<<< -+ * __pyx_import_array() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") - */ -- __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1036, __pyx_L3_error) -+ __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - } -@@ -5679,9 +4159,9 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1037 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":944 - * try: -- * _import_array() -+ * __pyx_import_array() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.multiarray failed to import") - * -@@ -5689,32 +4169,32 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1037, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 944, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 945, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1038, __pyx_L5_except_error) -+ __PYX_ERR(2, 945, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1035 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -- * _import_array() -+ * __pyx_import_array() - * except Exception: - */ - __Pyx_XGIVEREF(__pyx_t_1); -@@ -5725,12 +4205,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1034 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< - * try: -- * _import_array() -+ * __pyx_import_array() - */ - - /* function exit code */ -@@ -5748,7 +4228,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -5767,9 +4247,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_umath", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5785,16 +4268,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1042 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":949 - * cdef inline int import_umath() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1042, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5808,7 +4291,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1043 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":950 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< -@@ -5818,28 +4301,28 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1043, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 950, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 951, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1044, __pyx_L5_except_error) -+ __PYX_ERR(2, 951, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1041 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5854,7 +4337,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1040 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -5877,7 +4360,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - return __pyx_r; - } - --/* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -5896,9 +4379,12 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_ufunc", 0); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5914,16 +4400,16 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1048 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":955 - * cdef inline int import_ufunc() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< - * except Exception: - * raise ImportError("numpy.core.umath failed to import") - */ -- __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 1048, __pyx_L3_error) -+ __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error) - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5937,35 +4423,38 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1049 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":956 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< - * raise ImportError("numpy.core.umath failed to import") -+ * - */ - __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); - if (__pyx_t_4) { - __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); -- if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 1049, __pyx_L5_except_error) -+ if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(2, 956, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1050 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":957 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -+ * -+ * cdef extern from *: - */ -- __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 957, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_Raise(__pyx_t_8, 0, 0, 0); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -- __PYX_ERR(2, 1050, __pyx_L5_except_error) -+ __PYX_ERR(2, 957, __pyx_L5_except_error) - } - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1047 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -5980,7 +4469,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __pyx_L8_try_end:; - } - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -6002,6 +4491,180 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_RefNannyFinishContext(); - return __pyx_r; - } -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_timedelta64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":979 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ * -+ * -+ * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.timedelta64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_obj) { -+ int __pyx_r; -+ __Pyx_RefNannyDeclarations -+ __Pyx_RefNannySetupContext("is_datetime64_object", 0); -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":994 -+ * bool -+ * """ -+ * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ * -+ * -+ * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -+ * """ -+ * Cython equivalent of `isinstance(obj, np.datetime64)` -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ __Pyx_RefNannyFinishContext(); -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { -+ npy_datetime __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1004 -+ * also needed. That can be found using `get_datetime64_unit`. -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ * -+ * -+ * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy datetime64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { -+ npy_timedelta __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1011 -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ * """ -+ * return (obj).obval # <<<<<<<<<<<<<< -+ * -+ * -+ */ -+ __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ * -+ * -+ * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the int64 value underlying scalar numpy timedelta64 object -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} -+ -+/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { -+ NPY_DATETIMEUNIT __pyx_r; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1018 -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ * """ -+ * return (obj).obmeta.base # <<<<<<<<<<<<<< -+ */ -+ __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); -+ goto __pyx_L0; -+ -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ * -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. -+ */ -+ -+ /* function exit code */ -+ __pyx_L0:; -+ return __pyx_r; -+} - static struct __pyx_vtabstruct_4cylp_2cy_12CyWolfePivot_CyWolfePivot __pyx_vtable_4cylp_2cy_12CyWolfePivot_CyWolfePivot; - - static PyObject *__pyx_tp_new_4cylp_2cy_12CyWolfePivot_CyWolfePivot(PyTypeObject *t, PyObject *a, PyObject *k) { -@@ -6047,7 +4710,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_12CyWolfePivot_CyWolfePivot = { - sizeof(struct __pyx_obj_4cylp_2cy_12CyWolfePivot_CyWolfePivot), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_4cylp_2cy_12CyWolfePivot_CyWolfePivot, /*tp_dealloc*/ -+ #if PY_VERSION_HEX < 0x030800b4 - 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030800b4 -+ 0, /*tp_vectorcall_offset*/ -+ #endif - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 -@@ -6100,6 +4768,12 @@ static PyTypeObject __pyx_type_4cylp_2cy_12CyWolfePivot_CyWolfePivot = { - #if PY_VERSION_HEX >= 0x030800b1 - 0, /*tp_vectorcall*/ - #endif -+ #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 -+ 0, /*tp_print*/ -+ #endif -+ #if PY_VERSION_HEX >= 0x030B00A2 -+ 0, /*tp_inline_values_offset*/ -+ #endif - }; - - static PyMethodDef __pyx_methods[] = { -@@ -6149,13 +4823,8 @@ static struct PyModuleDef __pyx_moduledef = { - - static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_CyWolfePivot, __pyx_k_CyWolfePivot, sizeof(__pyx_k_CyWolfePivot), 0, 0, 1, 1}, -- {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, -- {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, - {&__pyx_n_s_ImportError, __pyx_k_ImportError, sizeof(__pyx_k_ImportError), 0, 0, 1, 1}, -- {&__pyx_kp_u_Non_native_byte_order_not_suppor, __pyx_k_Non_native_byte_order_not_suppor, sizeof(__pyx_k_Non_native_byte_order_not_suppor), 0, 1, 0, 0}, -- {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, - {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, -- {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, - {&__pyx_n_s_clear, __pyx_k_clear, sizeof(__pyx_k_clear), 0, 0, 1, 1}, - {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1}, - {&__pyx_n_s_dualTolerance, __pyx_k_dualTolerance, sizeof(__pyx_k_dualTolerance), 0, 0, 1, 1}, -@@ -6168,12 +4837,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_nRows, __pyx_k_nRows, sizeof(__pyx_k_nRows), 0, 0, 1, 1}, - {&__pyx_n_s_nVariables, __pyx_k_nVariables, sizeof(__pyx_k_nVariables), 0, 0, 1, 1}, - {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1}, -- {&__pyx_kp_u_ndarray_is_not_C_contiguous, __pyx_k_ndarray_is_not_C_contiguous, sizeof(__pyx_k_ndarray_is_not_C_contiguous), 0, 1, 0, 0}, -- {&__pyx_kp_u_ndarray_is_not_Fortran_contiguou, __pyx_k_ndarray_is_not_Fortran_contiguou, sizeof(__pyx_k_ndarray_is_not_Fortran_contiguou), 0, 1, 0, 0}, - {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0}, - {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, - {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, -- {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, - {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, -@@ -6183,16 +4849,12 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, - {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, - {&__pyx_n_s_transposeTimes, __pyx_k_transposeTimes, sizeof(__pyx_k_transposeTimes), 0, 0, 1, 1}, -- {&__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_k_unknown_dtype_code_in_numpy_pxd, sizeof(__pyx_k_unknown_dtype_code_in_numpy_pxd), 0, 1, 0, 0}, - {&__pyx_n_s_updateColumnTranspose, __pyx_k_updateColumnTranspose, sizeof(__pyx_k_updateColumnTranspose), 0, 0, 1, 1}, - {0, 0, 0, 0, 0, 0, 0} - }; - static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2, __pyx_L1_error) -- __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(2, 272, __pyx_L1_error) -- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(2, 285, __pyx_L1_error) -- __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(2, 856, __pyx_L1_error) -- __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 1038, __pyx_L1_error) -+ __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(2, 945, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -@@ -6221,82 +4883,27 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_GOTREF(__pyx_tuple__2); - __Pyx_GIVEREF(__pyx_tuple__2); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":272 -- * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< -- * -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- */ -- __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 272, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__3); -- __Pyx_GIVEREF(__pyx_tuple__3); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":276 -- * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) -- * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): -- * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< -- * -- * info.buf = PyArray_DATA(self) -- */ -- __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 276, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__4); -- __Pyx_GIVEREF(__pyx_tuple__4); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":306 -- * if ((descr.byteorder == c'>' and little_endian) or -- * (descr.byteorder == c'<' and not little_endian)): -- * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< -- * if t == NPY_BYTE: f = "b" -- * elif t == NPY_UBYTE: f = "B" -- */ -- __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(2, 306, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__5); -- __Pyx_GIVEREF(__pyx_tuple__5); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":856 -- * -- * if (end - f) - (new_offset - offset[0]) < 15: -- * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< -- * -- * if ((child.byteorder == c'>' and little_endian) or -- */ -- __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(2, 856, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__6); -- __Pyx_GIVEREF(__pyx_tuple__6); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":880 -- * t = child.type_num -- * if end - f < 5: -- * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< -- * -- * # Until ticket #99 is fixed, use integers to avoid warnings -- */ -- __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(2, 880, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__7); -- __Pyx_GIVEREF(__pyx_tuple__7); -- -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1038 -- * _import_array() -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_umath() except -1: - */ -- __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(2, 1038, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__8); -- __Pyx_GIVEREF(__pyx_tuple__8); -+ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(2, 945, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__3); -+ __Pyx_GIVEREF(__pyx_tuple__3); - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1044 -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - * - * cdef inline int import_ufunc() except -1: - */ -- __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(2, 1044, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_tuple__9); -- __Pyx_GIVEREF(__pyx_tuple__9); -+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(2, 951, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_tuple__4); -+ __Pyx_GIVEREF(__pyx_tuple__4); - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -6351,6 +4958,9 @@ static int __Pyx_modinit_function_export_code(void) { - static int __Pyx_modinit_type_init_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0); - /*--- Type init code ---*/ - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpPrimalColumnPivotBase"); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 1, __pyx_L1_error) -@@ -6387,6 +4997,9 @@ static int __Pyx_modinit_type_init_code(void) { - static int __Pyx_modinit_type_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); - /*--- Type import code ---*/ - __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 9, __pyx_L1_error) -@@ -6416,18 +5029,38 @@ static int __Pyx_modinit_type_import_code(void) { - if (!__pyx_ptype_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector) __PYX_ERR(6, 22, __pyx_L1_error) - __pyx_vtabptr_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector = (struct __pyx_vtabstruct_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector*)__Pyx_GetVtable(__pyx_ptype_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector->tp_dict); if (unlikely(!__pyx_vtabptr_4cylp_2cy_19CyCoinIndexedVector_CyCoinIndexedVector)) __PYX_ERR(6, 22, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 206, __pyx_L1_error) -+ __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 206, __pyx_L1_error) -- __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 229, __pyx_L1_error) -- __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 233, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(2, 200, __pyx_L1_error) -+ __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(2, 223, __pyx_L1_error) -+ __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(2, 227, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); -- if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 242, __pyx_L1_error) -- __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); -- if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 918, __pyx_L1_error) -+ if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(2, 239, __pyx_L1_error) -+ __pyx_ptype_5numpy_generic = __Pyx_ImportType(__pyx_t_1, "numpy", "generic", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_generic) __PYX_ERR(2, 771, __pyx_L1_error) -+ __pyx_ptype_5numpy_number = __Pyx_ImportType(__pyx_t_1, "numpy", "number", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_number) __PYX_ERR(2, 773, __pyx_L1_error) -+ __pyx_ptype_5numpy_integer = __Pyx_ImportType(__pyx_t_1, "numpy", "integer", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_integer) __PYX_ERR(2, 775, __pyx_L1_error) -+ __pyx_ptype_5numpy_signedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "signedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_signedinteger) __PYX_ERR(2, 777, __pyx_L1_error) -+ __pyx_ptype_5numpy_unsignedinteger = __Pyx_ImportType(__pyx_t_1, "numpy", "unsignedinteger", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_unsignedinteger) __PYX_ERR(2, 779, __pyx_L1_error) -+ __pyx_ptype_5numpy_inexact = __Pyx_ImportType(__pyx_t_1, "numpy", "inexact", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_inexact) __PYX_ERR(2, 781, __pyx_L1_error) -+ __pyx_ptype_5numpy_floating = __Pyx_ImportType(__pyx_t_1, "numpy", "floating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_floating) __PYX_ERR(2, 783, __pyx_L1_error) -+ __pyx_ptype_5numpy_complexfloating = __Pyx_ImportType(__pyx_t_1, "numpy", "complexfloating", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_complexfloating) __PYX_ERR(2, 785, __pyx_L1_error) -+ __pyx_ptype_5numpy_flexible = __Pyx_ImportType(__pyx_t_1, "numpy", "flexible", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_flexible) __PYX_ERR(2, 787, __pyx_L1_error) -+ __pyx_ptype_5numpy_character = __Pyx_ImportType(__pyx_t_1, "numpy", "character", sizeof(PyObject), __Pyx_ImportType_CheckSize_Warn); -+ if (!__pyx_ptype_5numpy_character) __PYX_ERR(2, 789, __pyx_L1_error) -+ __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Ignore); -+ if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(2, 827, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpDualRowPivotBase"); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 72, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); -@@ -6530,13 +5163,17 @@ static int __Pyx_modinit_variable_import_code(void) { - static int __Pyx_modinit_function_import_code(void) { - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0); - /*--- Function import code ---*/ - __pyx_t_1 = PyImport_ImportModule("cylp.cy.CyClpPrimalColumnPivotBase"); if (!__pyx_t_1) __PYX_ERR(1, 1, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_ImportFunction(__pyx_t_1, "RunPivotColumn", (void (**)(void))&__pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_RunPivotColumn, "int (void *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *, ICoinIndexedVector *)") < 0) __PYX_ERR(1, 1, __pyx_L1_error) - if (__Pyx_ImportFunction(__pyx_t_1, "RunClone", (void (**)(void))&__pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_RunClone, "ClpPrimalColumnPivot *(void *, int)") < 0) __PYX_ERR(1, 1, __pyx_L1_error) - if (__Pyx_ImportFunction(__pyx_t_1, "RunSaveWeights", (void (**)(void))&__pyx_f_4cylp_2cy_26CyClpPrimalColumnPivotBase_RunSaveWeights, "void (void *, IClpSimplex *, int)") < 0) __PYX_ERR(1, 1, __pyx_L1_error) -- Py_DECREF(__pyx_t_1); __pyx_t_1 = 0; -+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_RefNannyFinishContext(); - return 0; - __pyx_L1_error:; -@@ -6546,17 +5183,19 @@ static int __Pyx_modinit_function_import_code(void) { - } - - --#if PY_MAJOR_VERSION < 3 --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC void --#else -+#ifndef CYTHON_NO_PYINIT_EXPORT - #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#elif PY_MAJOR_VERSION < 3 -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" void -+#else -+#define __Pyx_PyMODINIT_FUNC void - #endif - #else --#ifdef CYTHON_NO_PYINIT_EXPORT --#define __Pyx_PyMODINIT_FUNC PyObject * -+#ifdef __cplusplus -+#define __Pyx_PyMODINIT_FUNC extern "C" PyObject * - #else --#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC -+#define __Pyx_PyMODINIT_FUNC PyObject * - #endif - #endif - -@@ -6638,6 +5277,9 @@ static CYTHON_SMALL_CODE int __pyx_pymod_exec_CyWolfePivot(PyObject *__pyx_pyini - #endif - { - PyObject *__pyx_t_1 = NULL; -+ int __pyx_lineno = 0; -+ const char *__pyx_filename = NULL; -+ int __pyx_clineno = 0; - __Pyx_RefNannyDeclarations - #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m) { -@@ -6685,11 +5327,9 @@ if (!__Pyx_RefNanny) { - #endif - /*--- Library function declarations ---*/ - /*--- Threads initialization code ---*/ -- #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS -- #ifdef WITH_THREAD /* Python build with threading support? */ -+ #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS - PyEval_InitThreads(); - #endif -- #endif - /*--- Module creation code ---*/ - #if CYTHON_PEP489_MULTI_PHASE_INIT - __pyx_m = __pyx_pyinit_module; -@@ -6726,17 +5366,17 @@ if (!__Pyx_RefNanny) { - } - #endif - /*--- Builtin init code ---*/ -- if (__Pyx_InitCachedBuiltins() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Constants init code ---*/ -- if (__Pyx_InitCachedConstants() < 0) goto __pyx_L1_error; -+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Global type/function init code ---*/ - (void)__Pyx_modinit_global_init_code(); - (void)__Pyx_modinit_variable_export_code(); - (void)__Pyx_modinit_function_export_code(); -- if (unlikely(__Pyx_modinit_type_init_code() != 0)) goto __pyx_L1_error; -- if (unlikely(__Pyx_modinit_type_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_type_init_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) -+ if (unlikely(__Pyx_modinit_type_import_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) - (void)__Pyx_modinit_variable_import_code(); -- if (unlikely(__Pyx_modinit_function_import_code() != 0)) goto __pyx_L1_error; -+ if (unlikely(__Pyx_modinit_function_import_code() < 0)) __PYX_ERR(1, 1, __pyx_L1_error) - /*--- Execution code ---*/ - #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED) - if (__Pyx_patch_abc() < 0) __PYX_ERR(1, 1, __pyx_L1_error) -@@ -6752,12 +5392,12 @@ if (!__Pyx_RefNanny) { - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(1, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "../../../../Users/tkral/Anaconda3/lib/site-packages/Cython/Includes/numpy/__init__.pxd":1046 -- * raise ImportError("numpy.core.umath failed to import") -+ /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 - * -- * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -- * try: -- * _import_umath() -+ * -+ * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -+ * """ -+ * returns the unit part of the dtype for a numpy datetime64 object. - */ - - /*--- Wrapped vars code ---*/ -@@ -6953,7 +5593,7 @@ static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, - #if CYTHON_COMPILING_IN_CPYTHON - static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { - PyObject *result; -- ternaryfunc call = func->ob_type->tp_call; -+ ternaryfunc call = Py_TYPE(func)->tp_call; - if (unlikely(!call)) - return PyObject_Call(func, arg, kw); - if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) -@@ -7269,7 +5909,7 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObjec - if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) { - return __Pyx_PyObject_CallMethO(func, arg); - #if CYTHON_FAST_PYCCALL -- } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) { -+ } else if (__Pyx_PyFastCFunction_Check(func)) { - return __Pyx_PyCFunction_FastCall(func, &arg, 1); - #endif - } -@@ -7650,71 +6290,16 @@ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject - PyObject* tmp_tb = tstate->curexc_traceback; - if (tb != tmp_tb) { - Py_INCREF(tb); -- tstate->curexc_traceback = tb; -- Py_XDECREF(tmp_tb); -- } --#endif -- } --bad: -- Py_XDECREF(owned_instance); -- return; --} --#endif -- --/* DictGetItem */ --#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY --static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { -- PyObject *value; -- value = PyDict_GetItemWithError(d, key); -- if (unlikely(!value)) { -- if (!PyErr_Occurred()) { -- if (unlikely(PyTuple_Check(key))) { -- PyObject* args = PyTuple_Pack(1, key); -- if (likely(args)) { -- PyErr_SetObject(PyExc_KeyError, args); -- Py_DECREF(args); -- } -- } else { -- PyErr_SetObject(PyExc_KeyError, key); -- } -- } -- return NULL; -- } -- Py_INCREF(value); -- return value; --} --#endif -- --/* RaiseTooManyValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { -- PyErr_Format(PyExc_ValueError, -- "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); --} -- --/* RaiseNeedMoreValuesToUnpack */ --static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { -- PyErr_Format(PyExc_ValueError, -- "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", -- index, (index == 1) ? "" : "s"); --} -- --/* RaiseNoneIterError */ --static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { -- PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); --} -- --/* ExtTypeTest */ --static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { -- if (unlikely(!type)) { -- PyErr_SetString(PyExc_SystemError, "Missing type object"); -- return 0; -+ tstate->curexc_traceback = tb; -+ Py_XDECREF(tmp_tb); -+ } -+#endif - } -- if (likely(__Pyx_TypeCheck(obj, type))) -- return 1; -- PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s", -- Py_TYPE(obj)->tp_name, type->tp_name); -- return 0; -+bad: -+ Py_XDECREF(owned_instance); -+ return; - } -+#endif - - /* GetTopmostException */ - #if CYTHON_USE_EXC_INFO_STACK -@@ -8054,6 +6639,28 @@ static int __Pyx_SetVtable(PyObject *dict, void *vtable) { - return -1; - } - -+/* PyObjectGetAttrStrNoError */ -+static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) { -+ __Pyx_PyThreadState_declare -+ __Pyx_PyThreadState_assign -+ if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) -+ __Pyx_PyErr_Clear(); -+} -+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) { -+ PyObject *result; -+#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1 -+ PyTypeObject* tp = Py_TYPE(obj); -+ if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) { -+ return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1); -+ } -+#endif -+ result = __Pyx_PyObject_GetAttrStr(obj, attr_name); -+ if (unlikely(!result)) { -+ __Pyx_PyObject_GetAttrStr_ClearAttributeError(); -+ } -+ return result; -+} -+ - /* SetupReduce */ - static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { - int ret; -@@ -8081,43 +6688,51 @@ static int __Pyx_setup_reduce(PyObject* type_obj) { - PyObject *setstate = NULL; - PyObject *setstate_cython = NULL; - #if CYTHON_USE_PYTYPE_LOOKUP -- if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (_PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #else -- if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto GOOD; -+ if (PyObject_HasAttr(type_obj, __pyx_n_s_getstate)) goto __PYX_GOOD; - #endif - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #else -- object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto BAD; -+ object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD; - #endif -- reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto BAD; -+ reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD; - if (reduce_ex == object_reduce_ex) { - #if CYTHON_USE_PYTYPE_LOOKUP -- object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #else -- object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto BAD; -+ object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD; - #endif -- reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto BAD; -+ reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD; - if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) { -- reduce_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_cython); if (unlikely(!reduce_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto BAD; -+ reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython); -+ if (likely(reduce_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (reduce == object_reduce || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - setstate = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate); - if (!setstate) PyErr_Clear(); - if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) { -- setstate_cython = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_setstate_cython); if (unlikely(!setstate_cython)) goto BAD; -- ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto BAD; -- ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto BAD; -+ setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython); -+ if (likely(setstate_cython)) { -+ ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD; -+ } else if (!setstate || PyErr_Occurred()) { -+ goto __PYX_BAD; -+ } - } - PyType_Modified((PyTypeObject*)type_obj); - } - } -- goto GOOD; --BAD: -+ goto __PYX_GOOD; -+__PYX_BAD: - if (!PyErr_Occurred()) - PyErr_Format(PyExc_RuntimeError, "Unable to initialize pickling for %s", ((PyTypeObject*)type_obj)->tp_name); - ret = -1; --GOOD: -+__PYX_GOOD: - #if !CYTHON_USE_PYTYPE_LOOKUP - Py_XDECREF(object_reduce); - Py_XDECREF(object_reduce_ex); -@@ -8158,7 +6773,7 @@ static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UIN - - /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK --static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { -+static int __Pyx_CLineForTraceback(CYTHON_NCP_UNUSED PyThreadState *tstate, int c_line) { - PyObject *use_cline; - PyObject *ptype, *pvalue, *ptraceback; - #if CYTHON_COMPILING_IN_CPYTHON -@@ -8188,7 +6803,7 @@ static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { - } - if (!use_cline) { - c_line = 0; -- PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); -+ (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); - } - else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { - c_line = 0; -@@ -8262,7 +6877,7 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - if (__pyx_code_cache.count == __pyx_code_cache.max_count) { - int new_max = __pyx_code_cache.max_count + 64; - entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc( -- __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry)); -+ __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry)); - if (unlikely(!entries)) { - return; - } -@@ -8285,30 +6900,31 @@ static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) { - static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - const char *funcname, int c_line, - int py_line, const char *filename) { -- PyCodeObject *py_code = 0; -- PyObject *py_srcfile = 0; -- PyObject *py_funcname = 0; -+ PyCodeObject *py_code = NULL; -+ PyObject *py_funcname = NULL; - #if PY_MAJOR_VERSION < 3 -+ PyObject *py_srcfile = NULL; - py_srcfile = PyString_FromString(filename); -- #else -- py_srcfile = PyUnicode_FromString(filename); -- #endif - if (!py_srcfile) goto bad; -+ #endif - if (c_line) { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; - #else - py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line); -+ if (!py_funcname) goto bad; -+ funcname = PyUnicode_AsUTF8(py_funcname); -+ if (!funcname) goto bad; - #endif - } - else { - #if PY_MAJOR_VERSION < 3 - py_funcname = PyString_FromString(funcname); -- #else -- py_funcname = PyUnicode_FromString(funcname); -+ if (!py_funcname) goto bad; - #endif - } -- if (!py_funcname) goto bad; -+ #if PY_MAJOR_VERSION < 3 - py_code = __Pyx_PyCode_New( - 0, - 0, -@@ -8327,11 +6943,16 @@ static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( - __pyx_empty_bytes /*PyObject *lnotab*/ - ); - Py_DECREF(py_srcfile); -- Py_DECREF(py_funcname); -+ #else -+ py_code = PyCode_NewEmpty(filename, funcname, py_line); -+ #endif -+ Py_XDECREF(py_funcname); // XDECREF since it's only set on Py3 if cline - return py_code; - bad: -- Py_XDECREF(py_srcfile); - Py_XDECREF(py_funcname); -+ #if PY_MAJOR_VERSION < 3 -+ Py_XDECREF(py_srcfile); -+ #endif - return NULL; - } - static void __Pyx_AddTraceback(const char *funcname, int c_line, -@@ -8385,99 +7006,6 @@ static void __Pyx_AddTraceback(const char *funcname, int c_line, - return (target_type) value;\ - } - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(long) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(long) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(long) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(long), -- little, !is_unsigned); -- } --} -- --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__IClpSimplex_3a__3a_Status(enum IClpSimplex::Status value) { -- const enum IClpSimplex::Status neg_one = (enum IClpSimplex::Status) ((enum IClpSimplex::Status) 0 - (enum IClpSimplex::Status) 1), const_zero = (enum IClpSimplex::Status) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(enum IClpSimplex::Status) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(enum IClpSimplex::Status) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum IClpSimplex::Status) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(enum IClpSimplex::Status) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum IClpSimplex::Status) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(enum IClpSimplex::Status), -- little, !is_unsigned); -- } --} -- --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(int) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(int) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(int) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(int), -- little, !is_unsigned); -- } --} -- - /* Declarations */ - #if CYTHON_CCOMPLEX - #ifdef __cplusplus -@@ -8595,7 +7123,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_float(a, a); - return __Pyx_c_prod_float(a, a); - case 3: - z = __Pyx_c_prod_float(a, a); -@@ -8750,7 +7277,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - case 1: - return a; - case 2: -- z = __Pyx_c_prod_double(a, a); - return __Pyx_c_prod_double(a, a); - case 3: - z = __Pyx_c_prod_double(a, a); -@@ -8788,40 +7314,16 @@ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - #endif - #endif - --/* CIntToPy */ --static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { -- const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; -- const int is_unsigned = neg_one > const_zero; -- if (is_unsigned) { -- if (sizeof(enum NPY_TYPES) < sizeof(long)) { -- return PyInt_FromLong((long) value); -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned long)) { -- return PyLong_FromUnsignedLong((unsigned long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(unsigned PY_LONG_LONG)) { -- return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); --#endif -- } -- } else { -- if (sizeof(enum NPY_TYPES) <= sizeof(long)) { -- return PyInt_FromLong((long) value); --#ifdef HAVE_LONG_LONG -- } else if (sizeof(enum NPY_TYPES) <= sizeof(PY_LONG_LONG)) { -- return PyLong_FromLongLong((PY_LONG_LONG) value); --#endif -- } -- } -- { -- int one = 1; int little = (int)*(unsigned char *)&one; -- unsigned char *bytes = (unsigned char *)&value; -- return _PyLong_FromByteArray(bytes, sizeof(enum NPY_TYPES), -- little, !is_unsigned); -- } --} -- - /* CIntFromPy */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { -- const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -9008,9 +7510,130 @@ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - return (int) -1; - } - -+/* CIntToPy */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif -+ const int is_unsigned = neg_one > const_zero; -+ if (is_unsigned) { -+ if (sizeof(long) < sizeof(long)) { -+ return PyInt_FromLong((long) value); -+ } else if (sizeof(long) <= sizeof(unsigned long)) { -+ return PyLong_FromUnsignedLong((unsigned long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) { -+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+#endif -+ } -+ } else { -+ if (sizeof(long) <= sizeof(long)) { -+ return PyInt_FromLong((long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) { -+ return PyLong_FromLongLong((PY_LONG_LONG) value); -+#endif -+ } -+ } -+ { -+ int one = 1; int little = (int)*(unsigned char *)&one; -+ unsigned char *bytes = (unsigned char *)&value; -+ return _PyLong_FromByteArray(bytes, sizeof(long), -+ little, !is_unsigned); -+ } -+} -+ -+/* CIntToPy */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__IClpSimplex_3a__3a_Status(enum IClpSimplex::Status value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const enum IClpSimplex::Status neg_one = (enum IClpSimplex::Status) -1, const_zero = (enum IClpSimplex::Status) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif -+ const int is_unsigned = neg_one > const_zero; -+ if (is_unsigned) { -+ if (sizeof(enum IClpSimplex::Status) < sizeof(long)) { -+ return PyInt_FromLong((long) value); -+ } else if (sizeof(enum IClpSimplex::Status) <= sizeof(unsigned long)) { -+ return PyLong_FromUnsignedLong((unsigned long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(enum IClpSimplex::Status) <= sizeof(unsigned PY_LONG_LONG)) { -+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+#endif -+ } -+ } else { -+ if (sizeof(enum IClpSimplex::Status) <= sizeof(long)) { -+ return PyInt_FromLong((long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(enum IClpSimplex::Status) <= sizeof(PY_LONG_LONG)) { -+ return PyLong_FromLongLong((PY_LONG_LONG) value); -+#endif -+ } -+ } -+ { -+ int one = 1; int little = (int)*(unsigned char *)&one; -+ unsigned char *bytes = (unsigned char *)&value; -+ return _PyLong_FromByteArray(bytes, sizeof(enum IClpSimplex::Status), -+ little, !is_unsigned); -+ } -+} -+ -+/* CIntToPy */ -+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const int neg_one = (int) -1, const_zero = (int) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif -+ const int is_unsigned = neg_one > const_zero; -+ if (is_unsigned) { -+ if (sizeof(int) < sizeof(long)) { -+ return PyInt_FromLong((long) value); -+ } else if (sizeof(int) <= sizeof(unsigned long)) { -+ return PyLong_FromUnsignedLong((unsigned long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) { -+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value); -+#endif -+ } -+ } else { -+ if (sizeof(int) <= sizeof(long)) { -+ return PyInt_FromLong((long) value); -+#ifdef HAVE_LONG_LONG -+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) { -+ return PyLong_FromLongLong((PY_LONG_LONG) value); -+#endif -+ } -+ } -+ { -+ int one = 1; int little = (int)*(unsigned char *)&one; -+ unsigned char *bytes = (unsigned char *)&value; -+ return _PyLong_FromByteArray(bytes, sizeof(int), -+ little, !is_unsigned); -+ } -+} -+ - /* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { -- const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic push -+#pragma GCC diagnostic ignored "-Wconversion" -+#endif -+ const long neg_one = (long) -1, const_zero = (long) 0; -+#ifdef __Pyx_HAS_GCC_DIAGNOSTIC -+#pragma GCC diagnostic pop -+#endif - const int is_unsigned = neg_one > const_zero; - #if PY_MAJOR_VERSION < 3 - if (likely(PyInt_Check(x))) { -@@ -9615,6 +8238,23 @@ static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { - Py_DECREF(x); - return ival; - } -+static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) { -+ if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) { -+ return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o); -+#if PY_MAJOR_VERSION < 3 -+ } else if (likely(PyInt_CheckExact(o))) { -+ return PyInt_AS_LONG(o); -+#endif -+ } else { -+ Py_ssize_t ival; -+ PyObject *x; -+ x = PyNumber_Index(o); -+ if (!x) return -1; -+ ival = PyInt_AsLong(x); -+ Py_DECREF(x); -+ return ival; -+ } -+} - static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { - return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); - } diff --git a/build/pkgs/cylp/patches/01-7c5b21ac6bcc290fd60b83bf48741030d9d0abe7.patch b/build/pkgs/cylp/patches/01-7c5b21ac6bcc290fd60b83bf48741030d9d0abe7.patch deleted file mode 100644 index 036d73f7973..00000000000 --- a/build/pkgs/cylp/patches/01-7c5b21ac6bcc290fd60b83bf48741030d9d0abe7.patch +++ /dev/null @@ -1,2888 +0,0 @@ -From 7c5b21ac6bcc290fd60b83bf48741030d9d0abe7 Mon Sep 17 00:00:00 2001 -From: Ted Ralphs -Date: Mon, 14 Mar 2022 16:19:51 -0400 -Subject: [PATCH] Adding function to detect whether problem is infeasible or an - optimal solution is found - ---- - cylp/cy/CyCbcModel.cpp | 866 +++++++++++++++++++++++++---------------- - cylp/cy/CyCbcModel.pxd | 2 + - cylp/cy/CyCbcModel.pyx | 13 +- - 3 files changed, 536 insertions(+), 345 deletions(-) - -diff --git a/cylp/cy/CyCbcModel.cpp b/cylp/cy/CyCbcModel.cpp -index c62fd3b..8192e18 100644 ---- a/cylp/cy/CyCbcModel.cpp -+++ b/cylp/cy/CyCbcModel.cpp -@@ -1,4 +1,4 @@ --/* Generated by Cython 0.29.25 */ -+/* Generated by Cython 0.29.28 */ - - #ifndef PY_SSIZE_T_CLEAN - #define PY_SSIZE_T_CLEAN -@@ -9,8 +9,8 @@ - #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) - #error Cython requires Python 2.6+ or Python 3.3+. - #else --#define CYTHON_ABI "0_29_25" --#define CYTHON_HEX_VERSION 0x001D19F0 -+#define CYTHON_ABI "0_29_28" -+#define CYTHON_HEX_VERSION 0x001D1CF0 - #define CYTHON_FUTURE_DIVISION 0 - #include - #ifndef offsetof -@@ -172,7 +172,10 @@ - #ifndef CYTHON_UNPACK_METHODS - #define CYTHON_UNPACK_METHODS 1 - #endif -- #ifndef CYTHON_FAST_THREAD_STATE -+ #if PY_VERSION_HEX >= 0x030B00A4 -+ #undef CYTHON_FAST_THREAD_STATE -+ #define CYTHON_FAST_THREAD_STATE 0 -+ #elif !defined(CYTHON_FAST_THREAD_STATE) - #define CYTHON_FAST_THREAD_STATE 1 - #endif - #ifndef CYTHON_FAST_PYCALL -@@ -187,7 +190,10 @@ - #ifndef CYTHON_USE_DICT_VERSIONS - #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) - #endif -- #ifndef CYTHON_USE_EXC_INFO_STACK -+ #if PY_VERSION_HEX >= 0x030B00A4 -+ #undef CYTHON_USE_EXC_INFO_STACK -+ #define CYTHON_USE_EXC_INFO_STACK 0 -+ #elif !defined(CYTHON_USE_EXC_INFO_STACK) - #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) - #endif - #endif -@@ -994,7 +1000,7 @@ static const char *__pyx_f[] = { - "cylp/cy/CyCutGeneratorPythonBase.pxd", - }; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":690 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":690 - * # in Cython to enable them only on the right systems. - * - * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< -@@ -1003,7 +1009,7 @@ static const char *__pyx_f[] = { - */ - typedef npy_int8 __pyx_t_5numpy_int8_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":691 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":691 - * - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< -@@ -1012,7 +1018,7 @@ typedef npy_int8 __pyx_t_5numpy_int8_t; - */ - typedef npy_int16 __pyx_t_5numpy_int16_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":692 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":692 - * ctypedef npy_int8 int8_t - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< -@@ -1021,7 +1027,7 @@ typedef npy_int16 __pyx_t_5numpy_int16_t; - */ - typedef npy_int32 __pyx_t_5numpy_int32_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":693 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":693 - * ctypedef npy_int16 int16_t - * ctypedef npy_int32 int32_t - * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< -@@ -1030,7 +1036,7 @@ typedef npy_int32 __pyx_t_5numpy_int32_t; - */ - typedef npy_int64 __pyx_t_5numpy_int64_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":697 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":697 - * #ctypedef npy_int128 int128_t - * - * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< -@@ -1039,7 +1045,7 @@ typedef npy_int64 __pyx_t_5numpy_int64_t; - */ - typedef npy_uint8 __pyx_t_5numpy_uint8_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":698 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":698 - * - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< -@@ -1048,7 +1054,7 @@ typedef npy_uint8 __pyx_t_5numpy_uint8_t; - */ - typedef npy_uint16 __pyx_t_5numpy_uint16_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":699 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":699 - * ctypedef npy_uint8 uint8_t - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< -@@ -1057,7 +1063,7 @@ typedef npy_uint16 __pyx_t_5numpy_uint16_t; - */ - typedef npy_uint32 __pyx_t_5numpy_uint32_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":700 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":700 - * ctypedef npy_uint16 uint16_t - * ctypedef npy_uint32 uint32_t - * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< -@@ -1066,7 +1072,7 @@ typedef npy_uint32 __pyx_t_5numpy_uint32_t; - */ - typedef npy_uint64 __pyx_t_5numpy_uint64_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":704 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":704 - * #ctypedef npy_uint128 uint128_t - * - * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< -@@ -1075,7 +1081,7 @@ typedef npy_uint64 __pyx_t_5numpy_uint64_t; - */ - typedef npy_float32 __pyx_t_5numpy_float32_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":705 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":705 - * - * ctypedef npy_float32 float32_t - * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< -@@ -1084,7 +1090,7 @@ typedef npy_float32 __pyx_t_5numpy_float32_t; - */ - typedef npy_float64 __pyx_t_5numpy_float64_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":714 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":714 - * # The int types are mapped a bit surprising -- - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t # <<<<<<<<<<<<<< -@@ -1093,7 +1099,7 @@ typedef npy_float64 __pyx_t_5numpy_float64_t; - */ - typedef npy_long __pyx_t_5numpy_int_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":715 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":715 - * # numpy.int corresponds to 'l' and numpy.long to 'q' - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< -@@ -1102,7 +1108,7 @@ typedef npy_long __pyx_t_5numpy_int_t; - */ - typedef npy_longlong __pyx_t_5numpy_long_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":716 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":716 - * ctypedef npy_long int_t - * ctypedef npy_longlong long_t - * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< -@@ -1111,7 +1117,7 @@ typedef npy_longlong __pyx_t_5numpy_long_t; - */ - typedef npy_longlong __pyx_t_5numpy_longlong_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":718 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":718 - * ctypedef npy_longlong longlong_t - * - * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< -@@ -1120,7 +1126,7 @@ typedef npy_longlong __pyx_t_5numpy_longlong_t; - */ - typedef npy_ulong __pyx_t_5numpy_uint_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":719 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":719 - * - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< -@@ -1129,7 +1135,7 @@ typedef npy_ulong __pyx_t_5numpy_uint_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":720 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":720 - * ctypedef npy_ulong uint_t - * ctypedef npy_ulonglong ulong_t - * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< -@@ -1138,7 +1144,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; - */ - typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":722 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":722 - * ctypedef npy_ulonglong ulonglong_t - * - * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< -@@ -1147,7 +1153,7 @@ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; - */ - typedef npy_intp __pyx_t_5numpy_intp_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":723 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":723 - * - * ctypedef npy_intp intp_t - * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< -@@ -1156,7 +1162,7 @@ typedef npy_intp __pyx_t_5numpy_intp_t; - */ - typedef npy_uintp __pyx_t_5numpy_uintp_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":725 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":725 - * ctypedef npy_uintp uintp_t - * - * ctypedef npy_double float_t # <<<<<<<<<<<<<< -@@ -1165,7 +1171,7 @@ typedef npy_uintp __pyx_t_5numpy_uintp_t; - */ - typedef npy_double __pyx_t_5numpy_float_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":726 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":726 - * - * ctypedef npy_double float_t - * ctypedef npy_double double_t # <<<<<<<<<<<<<< -@@ -1174,7 +1180,7 @@ typedef npy_double __pyx_t_5numpy_float_t; - */ - typedef npy_double __pyx_t_5numpy_double_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":727 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":727 - * ctypedef npy_double float_t - * ctypedef npy_double double_t - * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< -@@ -1240,7 +1246,7 @@ struct __pyx_obj_4cylp_2cy_21CyCglCutGeneratorBase_CyCglCutGeneratorBase; - struct __pyx_obj_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase; - struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":729 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":729 - * ctypedef npy_longdouble longdouble_t - * - * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< -@@ -1249,7 +1255,7 @@ struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel; - */ - typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":730 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":730 - * - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< -@@ -1258,7 +1264,7 @@ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; - */ - typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":731 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":731 - * ctypedef npy_cfloat cfloat_t - * ctypedef npy_cdouble cdouble_t - * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< -@@ -1267,7 +1273,7 @@ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; - */ - typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":733 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":733 - * ctypedef npy_clongdouble clongdouble_t - * - * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< -@@ -1291,7 +1297,7 @@ struct __pyx_opt_args_4cylp_2cy_12CyClpSimplex_12CyClpSimplex_readMps { - }; - struct __pyx_opt_args_4cylp_2cy_10CyCbcModel_10CyCbcModel_addCutGenerator; - --/* "cylp/cy/CyCbcModel.pxd":89 -+/* "cylp/cy/CyCbcModel.pxd":91 - * cdef setCppSelf(self, CppICbcModel* cppmodel) - * cdef setClpModel(self, clpmodel) - * cpdef addCutGenerator(self, CyCglCutGenerator generator, # <<<<<<<<<<<<<< -@@ -1707,7 +1713,7 @@ struct __pyx_obj_4cylp_2cy_24CyCutGeneratorPythonBase_CyCutGeneratorPythonBase { - }; - - --/* "cylp/cy/CyCbcModel.pxd":82 -+/* "cylp/cy/CyCbcModel.pxd":84 - * CppOsiSolverInterface* solver() - * - * cdef class CyCbcModel: # <<<<<<<<<<<<<< -@@ -2749,9 +2755,13 @@ static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; - static const char __pyx_k_stopped_on_time[] = "stopped on time"; - static const char __pyx_k_stopped_on_nodes[] = "stopped on nodes"; - static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; -+static const char __pyx_k_relaxation_abondoned[] = "relaxation abondoned"; -+static const char __pyx_k_isRelaxationAbondoned[] = "isRelaxationAbondoned"; - static const char __pyx_k_relaxation_infeasible[] = "relaxation infeasible"; - static const char __pyx_k_stopped_on_user_event[] = "stopped on user event"; -+static const char __pyx_k_isRelaxationInfeasible[] = "isRelaxationInfeasible"; - static const char __pyx_k_pythonCutGeneratorObject[] = "pythonCutGeneratorObject"; -+static const char __pyx_k_problem_proven_infeasible[] = "problem proven infeasible"; - static const char __pyx_k_cylp_py_modeling_CyLPModel[] = "cylp.py.modeling.CyLPModel"; - static const char __pyx_k_numpy_core_multiarray_failed_to[] = "numpy.core.multiarray failed to import"; - static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__"; -@@ -2787,6 +2797,8 @@ static PyObject *__pyx_n_s_import; - static PyObject *__pyx_n_s_indices; - static PyObject *__pyx_n_s_inds; - static PyObject *__pyx_n_s_infeasible; -+static PyObject *__pyx_n_s_isRelaxationAbondoned; -+static PyObject *__pyx_n_s_isRelaxationInfeasible; - static PyObject *__pyx_n_s_itertools; - static PyObject *__pyx_n_s_izip; - static PyObject *__pyx_n_s_keys; -@@ -2799,6 +2811,7 @@ static PyObject *__pyx_n_s_normal; - static PyObject *__pyx_kp_s_numpy_core_multiarray_failed_to; - static PyObject *__pyx_kp_s_numpy_core_umath_failed_to_impor; - static PyObject *__pyx_n_s_problemStatus; -+static PyObject *__pyx_kp_s_problem_proven_infeasible; - static PyObject *__pyx_n_s_product; - static PyObject *__pyx_n_s_pythonCutGeneratorObject; - static PyObject *__pyx_n_s_pyx_vtable; -@@ -2806,6 +2819,7 @@ static PyObject *__pyx_n_s_range; - static PyObject *__pyx_n_s_reduce; - static PyObject *__pyx_n_s_reduce_cython; - static PyObject *__pyx_n_s_reduce_ex; -+static PyObject *__pyx_kp_s_relaxation_abondoned; - static PyObject *__pyx_kp_s_relaxation_infeasible; - static PyObject *__pyx_kp_s_setNodeCompare_argument_should_b; - static PyObject *__pyx_n_s_setstate; -@@ -4773,7 +4787,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_10solve(struct __p - * property status: - * def __get__(self): # <<<<<<<<<<<<<< - * # secondaryStatus() should be used instead of status() (??) -- * #if self.isRelaxationInfeasible(): -+ * if self.isRelaxationInfeasible(): - */ - - /* Python wrapper */ -@@ -4793,29 +4807,196 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status___get__(st - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; -- int __pyx_t_2; -+ PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; -+ int __pyx_t_4; -+ int __pyx_t_5; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":160 -- * # return 'relaxation abondoned' -- * #return problemStatus[self.CppSelf.status()] -+ /* "cylp/cy/CyCbcModel.pyx":155 -+ * def __get__(self): -+ * # secondaryStatus() should be used instead of status() (??) -+ * if self.isRelaxationInfeasible(): # <<<<<<<<<<<<<< -+ * return problemStatus[1] -+ * if self.isRelaxationAbondoned(): -+ */ -+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isRelaxationInfeasible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_2); -+ __pyx_t_3 = NULL; -+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { -+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); -+ if (likely(__pyx_t_3)) { -+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); -+ __Pyx_INCREF(__pyx_t_3); -+ __Pyx_INCREF(function); -+ __Pyx_DECREF_SET(__pyx_t_2, function); -+ } -+ } -+ __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); -+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; -+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; -+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 155, __pyx_L1_error) -+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -+ if (__pyx_t_4) { -+ -+ /* "cylp/cy/CyCbcModel.pyx":156 -+ * # secondaryStatus() should be used instead of status() (??) -+ * if self.isRelaxationInfeasible(): -+ * return problemStatus[1] # <<<<<<<<<<<<<< -+ * if self.isRelaxationAbondoned(): -+ * return 'relaxation abondoned' -+ */ -+ __Pyx_XDECREF(__pyx_r); -+ __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_problemStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_2); -+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -+ __pyx_r = __pyx_t_2; -+ __pyx_t_2 = 0; -+ goto __pyx_L0; -+ -+ /* "cylp/cy/CyCbcModel.pyx":155 -+ * def __get__(self): -+ * # secondaryStatus() should be used instead of status() (??) -+ * if self.isRelaxationInfeasible(): # <<<<<<<<<<<<<< -+ * return problemStatus[1] -+ * if self.isRelaxationAbondoned(): -+ */ -+ } -+ -+ /* "cylp/cy/CyCbcModel.pyx":157 -+ * if self.isRelaxationInfeasible(): -+ * return problemStatus[1] -+ * if self.isRelaxationAbondoned(): # <<<<<<<<<<<<<< -+ * return 'relaxation abondoned' -+ * if self.CppSelf.isProvenInfeasible(): -+ */ -+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isRelaxationAbondoned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_1); -+ __pyx_t_3 = NULL; -+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { -+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); -+ if (likely(__pyx_t_3)) { -+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); -+ __Pyx_INCREF(__pyx_t_3); -+ __Pyx_INCREF(function); -+ __Pyx_DECREF_SET(__pyx_t_1, function); -+ } -+ } -+ __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1); -+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; -+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_2); -+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 157, __pyx_L1_error) -+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; -+ if (__pyx_t_4) { -+ -+ /* "cylp/cy/CyCbcModel.pyx":158 -+ * return problemStatus[1] -+ * if self.isRelaxationAbondoned(): -+ * return 'relaxation abondoned' # <<<<<<<<<<<<<< -+ * if self.CppSelf.isProvenInfeasible(): -+ * return 'problem proven infeasible' -+ */ -+ __Pyx_XDECREF(__pyx_r); -+ __Pyx_INCREF(__pyx_kp_s_relaxation_abondoned); -+ __pyx_r = __pyx_kp_s_relaxation_abondoned; -+ goto __pyx_L0; -+ -+ /* "cylp/cy/CyCbcModel.pyx":157 -+ * if self.isRelaxationInfeasible(): -+ * return problemStatus[1] -+ * if self.isRelaxationAbondoned(): # <<<<<<<<<<<<<< -+ * return 'relaxation abondoned' -+ * if self.CppSelf.isProvenInfeasible(): -+ */ -+ } -+ -+ /* "cylp/cy/CyCbcModel.pyx":159 -+ * if self.isRelaxationAbondoned(): -+ * return 'relaxation abondoned' -+ * if self.CppSelf.isProvenInfeasible(): # <<<<<<<<<<<<<< -+ * return 'problem proven infeasible' -+ * if self.CppSelf.isProvenOptimal(): -+ */ -+ __pyx_t_4 = (__pyx_v_self->CppSelf->isProvenInfeasible() != 0); -+ if (__pyx_t_4) { -+ -+ /* "cylp/cy/CyCbcModel.pyx":160 -+ * return 'relaxation abondoned' -+ * if self.CppSelf.isProvenInfeasible(): -+ * return 'problem proven infeasible' # <<<<<<<<<<<<<< -+ * if self.CppSelf.isProvenOptimal(): -+ * return 'solution' -+ */ -+ __Pyx_XDECREF(__pyx_r); -+ __Pyx_INCREF(__pyx_kp_s_problem_proven_infeasible); -+ __pyx_r = __pyx_kp_s_problem_proven_infeasible; -+ goto __pyx_L0; -+ -+ /* "cylp/cy/CyCbcModel.pyx":159 -+ * if self.isRelaxationAbondoned(): -+ * return 'relaxation abondoned' -+ * if self.CppSelf.isProvenInfeasible(): # <<<<<<<<<<<<<< -+ * return 'problem proven infeasible' -+ * if self.CppSelf.isProvenOptimal(): -+ */ -+ } -+ -+ /* "cylp/cy/CyCbcModel.pyx":161 -+ * if self.CppSelf.isProvenInfeasible(): -+ * return 'problem proven infeasible' -+ * if self.CppSelf.isProvenOptimal(): # <<<<<<<<<<<<<< -+ * return 'solution' -+ * return problemStatus[self.CppSelf.secondaryStatus()] -+ */ -+ __pyx_t_4 = (__pyx_v_self->CppSelf->isProvenOptimal() != 0); -+ if (__pyx_t_4) { -+ -+ /* "cylp/cy/CyCbcModel.pyx":162 -+ * return 'problem proven infeasible' -+ * if self.CppSelf.isProvenOptimal(): -+ * return 'solution' # <<<<<<<<<<<<<< -+ * return problemStatus[self.CppSelf.secondaryStatus()] -+ * -+ */ -+ __Pyx_XDECREF(__pyx_r); -+ __Pyx_INCREF(__pyx_n_s_solution); -+ __pyx_r = __pyx_n_s_solution; -+ goto __pyx_L0; -+ -+ /* "cylp/cy/CyCbcModel.pyx":161 -+ * if self.CppSelf.isProvenInfeasible(): -+ * return 'problem proven infeasible' -+ * if self.CppSelf.isProvenOptimal(): # <<<<<<<<<<<<<< -+ * return 'solution' -+ * return problemStatus[self.CppSelf.secondaryStatus()] -+ */ -+ } -+ -+ /* "cylp/cy/CyCbcModel.pyx":163 -+ * if self.CppSelf.isProvenOptimal(): -+ * return 'solution' - * return problemStatus[self.CppSelf.secondaryStatus()] # <<<<<<<<<<<<<< - * - * property logLevel: - */ - __Pyx_XDECREF(__pyx_r); -- __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_problemStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 160, __pyx_L1_error) -+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_problemStatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error) -+ __Pyx_GOTREF(__pyx_t_2); -+ __pyx_t_5 = __pyx_v_self->CppSelf->secondaryStatus(); -+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_t_5, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 163, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); -- __pyx_t_2 = __pyx_v_self->CppSelf->secondaryStatus(); -- __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, __pyx_t_2, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 160, __pyx_L1_error) -- __Pyx_GOTREF(__pyx_t_3); -- __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; -- __pyx_r = __pyx_t_3; -- __pyx_t_3 = 0; -+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; -+ __pyx_r = __pyx_t_1; -+ __pyx_t_1 = 0; - goto __pyx_L0; - - /* "cylp/cy/CyCbcModel.pyx":153 -@@ -4823,12 +5004,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status___get__(st - * property status: - * def __get__(self): # <<<<<<<<<<<<<< - * # secondaryStatus() should be used instead of status() (??) -- * #if self.isRelaxationInfeasible(): -+ * if self.isRelaxationInfeasible(): - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); -+ __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.status.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; -@@ -4838,7 +5020,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status___get__(st - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":163 -+/* "cylp/cy/CyCbcModel.pyx":166 - * - * property logLevel: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -4868,7 +5050,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel___get__( - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":164 -+ /* "cylp/cy/CyCbcModel.pyx":167 - * property logLevel: - * def __get__(self): - * return self.CppSelf.logLevel() # <<<<<<<<<<<<<< -@@ -4876,13 +5058,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel___get__( - * def __set__(self, value): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->logLevel()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error) -+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->logLevel()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "cylp/cy/CyCbcModel.pyx":163 -+ /* "cylp/cy/CyCbcModel.pyx":166 - * - * property logLevel: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -4901,7 +5083,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel___get__( - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":166 -+/* "cylp/cy/CyCbcModel.pyx":169 - * return self.CppSelf.logLevel() - * - * def __set__(self, value): # <<<<<<<<<<<<<< -@@ -4931,17 +5113,17 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel_2__set__(struc - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__set__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":167 -+ /* "cylp/cy/CyCbcModel.pyx":170 - * - * def __set__(self, value): - * self.CppSelf.setLogLevel(value) # <<<<<<<<<<<<<< - * - * def isRelaxationInfeasible(self): - */ -- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 167, __pyx_L1_error) -+ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 170, __pyx_L1_error) - __pyx_v_self->CppSelf->setLogLevel(__pyx_t_1); - -- /* "cylp/cy/CyCbcModel.pyx":166 -+ /* "cylp/cy/CyCbcModel.pyx":169 - * return self.CppSelf.logLevel() - * - * def __set__(self, value): # <<<<<<<<<<<<<< -@@ -4960,7 +5142,7 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel_2__set__(struc - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":169 -+/* "cylp/cy/CyCbcModel.pyx":172 - * self.CppSelf.setLogLevel(value) - * - * def isRelaxationInfeasible(self): # <<<<<<<<<<<<<< -@@ -4991,7 +5173,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12isRelaxationInfe - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("isRelaxationInfeasible", 0); - -- /* "cylp/cy/CyCbcModel.pyx":170 -+ /* "cylp/cy/CyCbcModel.pyx":173 - * - * def isRelaxationInfeasible(self): - * return self.CppSelf.isInitialSolveProvenPrimalInfeasible() # <<<<<<<<<<<<<< -@@ -4999,13 +5181,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12isRelaxationInfe - * def isRelaxationDualInfeasible(self): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->CppSelf->isInitialSolveProvenPrimalInfeasible()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error) -+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->CppSelf->isInitialSolveProvenPrimalInfeasible()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "cylp/cy/CyCbcModel.pyx":169 -+ /* "cylp/cy/CyCbcModel.pyx":172 - * self.CppSelf.setLogLevel(value) - * - * def isRelaxationInfeasible(self): # <<<<<<<<<<<<<< -@@ -5024,7 +5206,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12isRelaxationInfe - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":172 -+/* "cylp/cy/CyCbcModel.pyx":175 - * return self.CppSelf.isInitialSolveProvenPrimalInfeasible() - * - * def isRelaxationDualInfeasible(self): # <<<<<<<<<<<<<< -@@ -5055,7 +5237,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14isRelaxationDual - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("isRelaxationDualInfeasible", 0); - -- /* "cylp/cy/CyCbcModel.pyx":173 -+ /* "cylp/cy/CyCbcModel.pyx":176 - * - * def isRelaxationDualInfeasible(self): - * return self.CppSelf.isInitialSolveProvenDualInfeasible() # <<<<<<<<<<<<<< -@@ -5063,13 +5245,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14isRelaxationDual - * def isRelaxationOptimal(self): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->CppSelf->isInitialSolveProvenDualInfeasible()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error) -+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->CppSelf->isInitialSolveProvenDualInfeasible()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "cylp/cy/CyCbcModel.pyx":172 -+ /* "cylp/cy/CyCbcModel.pyx":175 - * return self.CppSelf.isInitialSolveProvenPrimalInfeasible() - * - * def isRelaxationDualInfeasible(self): # <<<<<<<<<<<<<< -@@ -5088,7 +5270,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14isRelaxationDual - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":175 -+/* "cylp/cy/CyCbcModel.pyx":178 - * return self.CppSelf.isInitialSolveProvenDualInfeasible() - * - * def isRelaxationOptimal(self): # <<<<<<<<<<<<<< -@@ -5119,7 +5301,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16isRelaxationOpti - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("isRelaxationOptimal", 0); - -- /* "cylp/cy/CyCbcModel.pyx":176 -+ /* "cylp/cy/CyCbcModel.pyx":179 - * - * def isRelaxationOptimal(self): - * return self.CppSelf.isInitialSolveProvenOptimal() # <<<<<<<<<<<<<< -@@ -5127,13 +5309,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16isRelaxationOpti - * def isRelaxationAbondoned(self): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->CppSelf->isInitialSolveProvenOptimal()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error) -+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->CppSelf->isInitialSolveProvenOptimal()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "cylp/cy/CyCbcModel.pyx":175 -+ /* "cylp/cy/CyCbcModel.pyx":178 - * return self.CppSelf.isInitialSolveProvenDualInfeasible() - * - * def isRelaxationOptimal(self): # <<<<<<<<<<<<<< -@@ -5152,7 +5334,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16isRelaxationOpti - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":178 -+/* "cylp/cy/CyCbcModel.pyx":181 - * return self.CppSelf.isInitialSolveProvenOptimal() - * - * def isRelaxationAbondoned(self): # <<<<<<<<<<<<<< -@@ -5183,7 +5365,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbon - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("isRelaxationAbondoned", 0); - -- /* "cylp/cy/CyCbcModel.pyx":179 -+ /* "cylp/cy/CyCbcModel.pyx":182 - * - * def isRelaxationAbondoned(self): - * return self.CppSelf.isInitialSolveAbandoned() # <<<<<<<<<<<<<< -@@ -5191,13 +5373,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbon - * property osiSolverInteface: - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->CppSelf->isInitialSolveAbandoned()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error) -+ __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->CppSelf->isInitialSolveAbandoned()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "cylp/cy/CyCbcModel.pyx":178 -+ /* "cylp/cy/CyCbcModel.pyx":181 - * return self.CppSelf.isInitialSolveProvenOptimal() - * - * def isRelaxationAbondoned(self): # <<<<<<<<<<<<<< -@@ -5216,7 +5398,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbon - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":182 -+/* "cylp/cy/CyCbcModel.pyx":185 - * - * property osiSolverInteface: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -5247,30 +5429,30 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_17osiSolverIntefac - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":183 -+ /* "cylp/cy/CyCbcModel.pyx":186 - * property osiSolverInteface: - * def __get__(self): - * cdef CyOsiSolverInterface osi = CyOsiSolverInterface() # <<<<<<<<<<<<<< - * osi.setCppSelf(self.CppSelf.solver()) - * return osi - */ -- __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error) -+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(((PyObject *)__pyx_ptype_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_v_osi = ((struct __pyx_obj_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface *)__pyx_t_1); - __pyx_t_1 = 0; - -- /* "cylp/cy/CyCbcModel.pyx":184 -+ /* "cylp/cy/CyCbcModel.pyx":187 - * def __get__(self): - * cdef CyOsiSolverInterface osi = CyOsiSolverInterface() - * osi.setCppSelf(self.CppSelf.solver()) # <<<<<<<<<<<<<< - * return osi - * - */ -- __pyx_t_1 = ((struct __pyx_vtabstruct_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface *)__pyx_v_osi->__pyx_vtab)->setCppSelf(__pyx_v_osi, __pyx_v_self->CppSelf->solver()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) -+ __pyx_t_1 = ((struct __pyx_vtabstruct_4cylp_2cy_20CyOsiSolverInterface_CyOsiSolverInterface *)__pyx_v_osi->__pyx_vtab)->setCppSelf(__pyx_v_osi, __pyx_v_self->CppSelf->solver()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - -- /* "cylp/cy/CyCbcModel.pyx":185 -+ /* "cylp/cy/CyCbcModel.pyx":188 - * cdef CyOsiSolverInterface osi = CyOsiSolverInterface() - * osi.setCppSelf(self.CppSelf.solver()) - * return osi # <<<<<<<<<<<<<< -@@ -5282,7 +5464,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_17osiSolverIntefac - __pyx_r = ((PyObject *)__pyx_v_osi); - goto __pyx_L0; - -- /* "cylp/cy/CyCbcModel.pyx":182 -+ /* "cylp/cy/CyCbcModel.pyx":185 - * - * property osiSolverInteface: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -5302,7 +5484,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_17osiSolverIntefac - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":188 -+/* "cylp/cy/CyCbcModel.pyx":191 - * - * property primalVariableSolution: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -5352,7 +5534,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":189 -+ /* "cylp/cy/CyCbcModel.pyx":192 - * property primalVariableSolution: - * def __get__(self): - * ret = self.CppSelf.getPrimalVariableSolution() # <<<<<<<<<<<<<< -@@ -5365,17 +5547,17 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - __pyx_v_ret = __pyx_t_2; - __pyx_t_2 = 0; - -- /* "cylp/cy/CyCbcModel.pyx":190 -+ /* "cylp/cy/CyCbcModel.pyx":193 - * def __get__(self): - * ret = self.CppSelf.getPrimalVariableSolution() - * if self.cyLPModel: # <<<<<<<<<<<<<< - * m = self.cyLPModel - * inds = m.inds - */ -- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->cyLPModel); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 190, __pyx_L1_error) -+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_self->cyLPModel); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 193, __pyx_L1_error) - if (__pyx_t_3) { - -- /* "cylp/cy/CyCbcModel.pyx":191 -+ /* "cylp/cy/CyCbcModel.pyx":194 - * ret = self.CppSelf.getPrimalVariableSolution() - * if self.cyLPModel: - * m = self.cyLPModel # <<<<<<<<<<<<<< -@@ -5387,40 +5569,40 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - __pyx_v_m = __pyx_t_2; - __pyx_t_2 = 0; - -- /* "cylp/cy/CyCbcModel.pyx":192 -+ /* "cylp/cy/CyCbcModel.pyx":195 - * if self.cyLPModel: - * m = self.cyLPModel - * inds = m.inds # <<<<<<<<<<<<<< - * d = {} - * for v in inds.varIndex.keys(): - */ -- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_inds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error) -+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_inds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_inds = __pyx_t_2; - __pyx_t_2 = 0; - -- /* "cylp/cy/CyCbcModel.pyx":193 -+ /* "cylp/cy/CyCbcModel.pyx":196 - * m = self.cyLPModel - * inds = m.inds - * d = {} # <<<<<<<<<<<<<< - * for v in inds.varIndex.keys(): - * d[v] = ret[inds.varIndex[v]] - */ -- __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error) -+ __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_d = __pyx_t_2; - __pyx_t_2 = 0; - -- /* "cylp/cy/CyCbcModel.pyx":194 -+ /* "cylp/cy/CyCbcModel.pyx":197 - * inds = m.inds - * d = {} - * for v in inds.varIndex.keys(): # <<<<<<<<<<<<<< - * d[v] = ret[inds.varIndex[v]] - * var = m.getVarByName(v) - */ -- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_inds, __pyx_n_s_varIndex); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 194, __pyx_L1_error) -+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_inds, __pyx_n_s_varIndex); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 197, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); -- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_keys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 194, __pyx_L1_error) -+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_keys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 197, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = NULL; -@@ -5435,16 +5617,16 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - } - __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error) -+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { - __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; - __pyx_t_7 = NULL; - } else { -- __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 194, __pyx_L1_error) -+ __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 197, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); -- __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 194, __pyx_L1_error) -+ __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 197, __pyx_L1_error) - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - for (;;) { -@@ -5452,17 +5634,17 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - if (likely(PyList_CheckExact(__pyx_t_5))) { - if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 194, __pyx_L1_error) -+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 197, __pyx_L1_error) - #else -- __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error) -+ __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - #endif - } else { - if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 194, __pyx_L1_error) -+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 197, __pyx_L1_error) - #else -- __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error) -+ __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - #endif - } -@@ -5472,7 +5654,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); -- else __PYX_ERR(0, 194, __pyx_L1_error) -+ else __PYX_ERR(0, 197, __pyx_L1_error) - } - break; - } -@@ -5481,32 +5663,32 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_2); - __pyx_t_2 = 0; - -- /* "cylp/cy/CyCbcModel.pyx":195 -+ /* "cylp/cy/CyCbcModel.pyx":198 - * d = {} - * for v in inds.varIndex.keys(): - * d[v] = ret[inds.varIndex[v]] # <<<<<<<<<<<<<< - * var = m.getVarByName(v) - * if var.dims: - */ -- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_inds, __pyx_n_s_varIndex); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error) -+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_inds, __pyx_n_s_varIndex); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); -- __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error) -+ __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 198, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; -- __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_ret, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error) -+ __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_ret, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (unlikely(PyObject_SetItem(__pyx_v_d, __pyx_v_v, __pyx_t_2) < 0)) __PYX_ERR(0, 195, __pyx_L1_error) -+ if (unlikely(PyObject_SetItem(__pyx_v_d, __pyx_v_v, __pyx_t_2) < 0)) __PYX_ERR(0, 198, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - -- /* "cylp/cy/CyCbcModel.pyx":196 -+ /* "cylp/cy/CyCbcModel.pyx":199 - * for v in inds.varIndex.keys(): - * d[v] = ret[inds.varIndex[v]] - * var = m.getVarByName(v) # <<<<<<<<<<<<<< - * if var.dims: - * d[v] = CyLPSolution() - */ -- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_getVarByName); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L1_error) -+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_m, __pyx_n_s_getVarByName); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { -@@ -5520,33 +5702,33 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - } - __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_v_v) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_v); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; -- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 196, __pyx_L1_error) -+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_XDECREF_SET(__pyx_v_var, __pyx_t_2); - __pyx_t_2 = 0; - -- /* "cylp/cy/CyCbcModel.pyx":197 -+ /* "cylp/cy/CyCbcModel.pyx":200 - * d[v] = ret[inds.varIndex[v]] - * var = m.getVarByName(v) - * if var.dims: # <<<<<<<<<<<<<< - * d[v] = CyLPSolution() - * dimRanges = [range(i) for i in var.dims] - */ -- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dims); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error) -+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dims); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); -- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 197, __pyx_L1_error) -+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 200, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__pyx_t_3) { - -- /* "cylp/cy/CyCbcModel.pyx":198 -+ /* "cylp/cy/CyCbcModel.pyx":201 - * var = m.getVarByName(v) - * if var.dims: - * d[v] = CyLPSolution() # <<<<<<<<<<<<<< - * dimRanges = [range(i) for i in var.dims] - * for element in product(*dimRanges): - */ -- __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CyLPSolution); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 198, __pyx_L1_error) -+ __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_CyLPSolution); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { -@@ -5560,30 +5742,30 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - } - __pyx_t_2 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; -- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error) -+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- if (unlikely(PyObject_SetItem(__pyx_v_d, __pyx_v_v, __pyx_t_2) < 0)) __PYX_ERR(0, 198, __pyx_L1_error) -+ if (unlikely(PyObject_SetItem(__pyx_v_d, __pyx_v_v, __pyx_t_2) < 0)) __PYX_ERR(0, 201, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - -- /* "cylp/cy/CyCbcModel.pyx":199 -+ /* "cylp/cy/CyCbcModel.pyx":202 - * if var.dims: - * d[v] = CyLPSolution() - * dimRanges = [range(i) for i in var.dims] # <<<<<<<<<<<<<< - * for element in product(*dimRanges): - * d[v][element] = ret[var.__getitem__(element).indices[0]] - */ -- __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error) -+ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 202, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); -- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dims); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error) -+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_dims); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 202, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { - __pyx_t_8 = __pyx_t_4; __Pyx_INCREF(__pyx_t_8); __pyx_t_9 = 0; - __pyx_t_10 = NULL; - } else { -- __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 199, __pyx_L1_error) -+ __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 202, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); -- __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 199, __pyx_L1_error) -+ __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 202, __pyx_L1_error) - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - for (;;) { -@@ -5591,17 +5773,17 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - if (likely(PyList_CheckExact(__pyx_t_8))) { - if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_8)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 199, __pyx_L1_error) -+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 202, __pyx_L1_error) - #else -- __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error) -+ __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 202, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - #endif - } else { - if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_8)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 199, __pyx_L1_error) -+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 202, __pyx_L1_error) - #else -- __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error) -+ __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 202, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - #endif - } -@@ -5611,7 +5793,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); -- else __PYX_ERR(0, 199, __pyx_L1_error) -+ else __PYX_ERR(0, 202, __pyx_L1_error) - } - break; - } -@@ -5619,27 +5801,27 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - } - __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4); - __pyx_t_4 = 0; -- __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 199, __pyx_L1_error) -+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 202, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); -- if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 199, __pyx_L1_error) -+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 202, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_XDECREF_SET(__pyx_v_dimRanges, ((PyObject*)__pyx_t_2)); - __pyx_t_2 = 0; - -- /* "cylp/cy/CyCbcModel.pyx":200 -+ /* "cylp/cy/CyCbcModel.pyx":203 - * d[v] = CyLPSolution() - * dimRanges = [range(i) for i in var.dims] - * for element in product(*dimRanges): # <<<<<<<<<<<<<< - * d[v][element] = ret[var.__getitem__(element).indices[0]] - * ret = d - */ -- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_product); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error) -+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_product); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); -- __pyx_t_8 = PySequence_Tuple(__pyx_v_dimRanges); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 200, __pyx_L1_error) -+ __pyx_t_8 = PySequence_Tuple(__pyx_v_dimRanges); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 203, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); -- __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 200, __pyx_L1_error) -+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 203, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; -@@ -5647,9 +5829,9 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - __pyx_t_8 = __pyx_t_4; __Pyx_INCREF(__pyx_t_8); __pyx_t_9 = 0; - __pyx_t_10 = NULL; - } else { -- __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 200, __pyx_L1_error) -+ __pyx_t_9 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 203, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); -- __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 200, __pyx_L1_error) -+ __pyx_t_10 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 203, __pyx_L1_error) - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - for (;;) { -@@ -5657,17 +5839,17 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - if (likely(PyList_CheckExact(__pyx_t_8))) { - if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_8)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_4 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 200, __pyx_L1_error) -+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 203, __pyx_L1_error) - #else -- __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 200, __pyx_L1_error) -+ __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 203, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - #endif - } else { - if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_8)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 200, __pyx_L1_error) -+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 203, __pyx_L1_error) - #else -- __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 200, __pyx_L1_error) -+ __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 203, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - #endif - } -@@ -5677,7 +5859,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); -- else __PYX_ERR(0, 200, __pyx_L1_error) -+ else __PYX_ERR(0, 203, __pyx_L1_error) - } - break; - } -@@ -5686,14 +5868,14 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - __Pyx_XDECREF_SET(__pyx_v_element, __pyx_t_4); - __pyx_t_4 = 0; - -- /* "cylp/cy/CyCbcModel.pyx":201 -+ /* "cylp/cy/CyCbcModel.pyx":204 - * dimRanges = [range(i) for i in var.dims] - * for element in product(*dimRanges): - * d[v][element] = ret[var.__getitem__(element).indices[0]] # <<<<<<<<<<<<<< - * ret = d - * else: - */ -- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_getitem); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) -+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_var, __pyx_n_s_getitem); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_11 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { -@@ -5707,25 +5889,25 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - } - __pyx_t_4 = (__pyx_t_11) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_11, __pyx_v_element) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_element); - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; -- if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error) -+ if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 204, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; -- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) -+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_indices); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error) -+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 204, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; -- __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_ret, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 201, __pyx_L1_error) -+ __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_ret, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; -- __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_d, __pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 201, __pyx_L1_error) -+ __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_d, __pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 204, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); -- if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_element, __pyx_t_2) < 0)) __PYX_ERR(0, 201, __pyx_L1_error) -+ if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_element, __pyx_t_2) < 0)) __PYX_ERR(0, 204, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - -- /* "cylp/cy/CyCbcModel.pyx":200 -+ /* "cylp/cy/CyCbcModel.pyx":203 - * d[v] = CyLPSolution() - * dimRanges = [range(i) for i in var.dims] - * for element in product(*dimRanges): # <<<<<<<<<<<<<< -@@ -5735,7 +5917,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - -- /* "cylp/cy/CyCbcModel.pyx":197 -+ /* "cylp/cy/CyCbcModel.pyx":200 - * d[v] = ret[inds.varIndex[v]] - * var = m.getVarByName(v) - * if var.dims: # <<<<<<<<<<<<<< -@@ -5744,7 +5926,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - */ - } - -- /* "cylp/cy/CyCbcModel.pyx":194 -+ /* "cylp/cy/CyCbcModel.pyx":197 - * inds = m.inds - * d = {} - * for v in inds.varIndex.keys(): # <<<<<<<<<<<<<< -@@ -5754,7 +5936,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - -- /* "cylp/cy/CyCbcModel.pyx":202 -+ /* "cylp/cy/CyCbcModel.pyx":205 - * for element in product(*dimRanges): - * d[v][element] = ret[var.__getitem__(element).indices[0]] - * ret = d # <<<<<<<<<<<<<< -@@ -5764,7 +5946,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - __Pyx_INCREF(__pyx_v_d); - __Pyx_DECREF_SET(__pyx_v_ret, __pyx_v_d); - -- /* "cylp/cy/CyCbcModel.pyx":190 -+ /* "cylp/cy/CyCbcModel.pyx":193 - * def __get__(self): - * ret = self.CppSelf.getPrimalVariableSolution() - * if self.cyLPModel: # <<<<<<<<<<<<<< -@@ -5774,7 +5956,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - goto __pyx_L3; - } - -- /* "cylp/cy/CyCbcModel.pyx":204 -+ /* "cylp/cy/CyCbcModel.pyx":207 - * ret = d - * else: - * names = self.clpModel.variableNames # <<<<<<<<<<<<<< -@@ -5782,29 +5964,29 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - * d = CyLPSolution() - */ - /*else*/ { -- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->clpModel, __pyx_n_s_variableNames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 204, __pyx_L1_error) -+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->clpModel, __pyx_n_s_variableNames); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 207, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_v_names = __pyx_t_5; - __pyx_t_5 = 0; - -- /* "cylp/cy/CyCbcModel.pyx":205 -+ /* "cylp/cy/CyCbcModel.pyx":208 - * else: - * names = self.clpModel.variableNames - * if names: # <<<<<<<<<<<<<< - * d = CyLPSolution() - * for i in range(len(names)): - */ -- __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_names); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 205, __pyx_L1_error) -+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_names); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 208, __pyx_L1_error) - if (__pyx_t_3) { - -- /* "cylp/cy/CyCbcModel.pyx":206 -+ /* "cylp/cy/CyCbcModel.pyx":209 - * names = self.clpModel.variableNames - * if names: - * d = CyLPSolution() # <<<<<<<<<<<<<< - * for i in range(len(names)): - * d[names[i]] = ret[i] - */ -- __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_CyLPSolution); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 206, __pyx_L1_error) -+ __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_CyLPSolution); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 209, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) { -@@ -5818,32 +6000,32 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - } - __pyx_t_5 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; -- if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 206, __pyx_L1_error) -+ if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 209, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_v_d = __pyx_t_5; - __pyx_t_5 = 0; - -- /* "cylp/cy/CyCbcModel.pyx":207 -+ /* "cylp/cy/CyCbcModel.pyx":210 - * if names: - * d = CyLPSolution() - * for i in range(len(names)): # <<<<<<<<<<<<<< - * d[names[i]] = ret[i] - * ret = d - */ -- __pyx_t_6 = PyObject_Length(__pyx_v_names); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 207, __pyx_L1_error) -- __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 207, __pyx_L1_error) -+ __pyx_t_6 = PyObject_Length(__pyx_v_names); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 210, __pyx_L1_error) -+ __pyx_t_5 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 210, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); -- __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 207, __pyx_L1_error) -+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) { - __pyx_t_5 = __pyx_t_8; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; - __pyx_t_7 = NULL; - } else { -- __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 207, __pyx_L1_error) -+ __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 210, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); -- __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 207, __pyx_L1_error) -+ __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 210, __pyx_L1_error) - } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - for (;;) { -@@ -5851,17 +6033,17 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - if (likely(PyList_CheckExact(__pyx_t_5))) { - if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 207, __pyx_L1_error) -+ __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 210, __pyx_L1_error) - #else -- __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 207, __pyx_L1_error) -+ __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - #endif - } else { - if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break; - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS -- __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 207, __pyx_L1_error) -+ __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 210, __pyx_L1_error) - #else -- __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 207, __pyx_L1_error) -+ __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 210, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - #endif - } -@@ -5871,7 +6053,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - PyObject* exc_type = PyErr_Occurred(); - if (exc_type) { - if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); -- else __PYX_ERR(0, 207, __pyx_L1_error) -+ else __PYX_ERR(0, 210, __pyx_L1_error) - } - break; - } -@@ -5880,22 +6062,22 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_8); - __pyx_t_8 = 0; - -- /* "cylp/cy/CyCbcModel.pyx":208 -+ /* "cylp/cy/CyCbcModel.pyx":211 - * d = CyLPSolution() - * for i in range(len(names)): - * d[names[i]] = ret[i] # <<<<<<<<<<<<<< - * ret = d - * return ret - */ -- __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_ret, __pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 208, __pyx_L1_error) -+ __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_ret, __pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 211, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); -- __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_names, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error) -+ __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_names, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); -- if (unlikely(PyObject_SetItem(__pyx_v_d, __pyx_t_2, __pyx_t_8) < 0)) __PYX_ERR(0, 208, __pyx_L1_error) -+ if (unlikely(PyObject_SetItem(__pyx_v_d, __pyx_t_2, __pyx_t_8) < 0)) __PYX_ERR(0, 211, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - -- /* "cylp/cy/CyCbcModel.pyx":207 -+ /* "cylp/cy/CyCbcModel.pyx":210 - * if names: - * d = CyLPSolution() - * for i in range(len(names)): # <<<<<<<<<<<<<< -@@ -5905,7 +6087,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - -- /* "cylp/cy/CyCbcModel.pyx":209 -+ /* "cylp/cy/CyCbcModel.pyx":212 - * for i in range(len(names)): - * d[names[i]] = ret[i] - * ret = d # <<<<<<<<<<<<<< -@@ -5915,7 +6097,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - __Pyx_INCREF(__pyx_v_d); - __Pyx_DECREF_SET(__pyx_v_ret, __pyx_v_d); - -- /* "cylp/cy/CyCbcModel.pyx":205 -+ /* "cylp/cy/CyCbcModel.pyx":208 - * else: - * names = self.clpModel.variableNames - * if names: # <<<<<<<<<<<<<< -@@ -5926,7 +6108,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - } - __pyx_L3:; - -- /* "cylp/cy/CyCbcModel.pyx":210 -+ /* "cylp/cy/CyCbcModel.pyx":213 - * d[names[i]] = ret[i] - * ret = d - * return ret # <<<<<<<<<<<<<< -@@ -5938,7 +6120,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - __pyx_r = __pyx_v_ret; - goto __pyx_L0; - -- /* "cylp/cy/CyCbcModel.pyx":188 -+ /* "cylp/cy/CyCbcModel.pyx":191 - * - * property primalVariableSolution: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -5971,7 +6153,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSo - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":213 -+/* "cylp/cy/CyCbcModel.pyx":216 - * - * property solutionCount: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6001,7 +6183,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13solutionCount___ - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":214 -+ /* "cylp/cy/CyCbcModel.pyx":217 - * property solutionCount: - * def __get__(self): - * return self.CppSelf.getSolutionCount() # <<<<<<<<<<<<<< -@@ -6009,13 +6191,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13solutionCount___ - * property numberHeuristicSolutions: - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getSolutionCount()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error) -+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getSolutionCount()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "cylp/cy/CyCbcModel.pyx":213 -+ /* "cylp/cy/CyCbcModel.pyx":216 - * - * property solutionCount: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6034,7 +6216,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13solutionCount___ - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":217 -+/* "cylp/cy/CyCbcModel.pyx":220 - * - * property numberHeuristicSolutions: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6064,7 +6246,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_24numberHeuristicS - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":218 -+ /* "cylp/cy/CyCbcModel.pyx":221 - * property numberHeuristicSolutions: - * def __get__(self): - * return self.CppSelf.getNumberHeuristicSolutions() # <<<<<<<<<<<<<< -@@ -6072,13 +6254,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_24numberHeuristicS - * property nodeCount: - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getNumberHeuristicSolutions()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L1_error) -+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getNumberHeuristicSolutions()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "cylp/cy/CyCbcModel.pyx":217 -+ /* "cylp/cy/CyCbcModel.pyx":220 - * - * property numberHeuristicSolutions: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6097,7 +6279,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_24numberHeuristicS - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":221 -+/* "cylp/cy/CyCbcModel.pyx":224 - * - * property nodeCount: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6127,7 +6309,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_9nodeCount___get__ - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":222 -+ /* "cylp/cy/CyCbcModel.pyx":225 - * property nodeCount: - * def __get__(self): - * return self.CppSelf.getNodeCount() # <<<<<<<<<<<<<< -@@ -6135,13 +6317,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_9nodeCount___get__ - * property objectiveValue: - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getNodeCount()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error) -+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getNodeCount()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "cylp/cy/CyCbcModel.pyx":221 -+ /* "cylp/cy/CyCbcModel.pyx":224 - * - * property nodeCount: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6160,7 +6342,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_9nodeCount___get__ - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":225 -+/* "cylp/cy/CyCbcModel.pyx":228 - * - * property objectiveValue: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6190,7 +6372,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14objectiveValue__ - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":226 -+ /* "cylp/cy/CyCbcModel.pyx":229 - * property objectiveValue: - * def __get__(self): - * return self.CppSelf.getObjValue() # <<<<<<<<<<<<<< -@@ -6198,13 +6380,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14objectiveValue__ - * property bestPossibleObjValue: - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getObjValue()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error) -+ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getObjValue()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "cylp/cy/CyCbcModel.pyx":225 -+ /* "cylp/cy/CyCbcModel.pyx":228 - * - * property objectiveValue: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6223,7 +6405,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14objectiveValue__ - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":229 -+/* "cylp/cy/CyCbcModel.pyx":232 - * - * property bestPossibleObjValue: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6253,7 +6435,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20bestPossibleObjV - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":230 -+ /* "cylp/cy/CyCbcModel.pyx":233 - * property bestPossibleObjValue: - * def __get__(self): - * return self.CppSelf.getBestPossibleObjValue() # <<<<<<<<<<<<<< -@@ -6261,13 +6443,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20bestPossibleObjV - * property numberObjects: - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getBestPossibleObjValue()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error) -+ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getBestPossibleObjValue()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "cylp/cy/CyCbcModel.pyx":229 -+ /* "cylp/cy/CyCbcModel.pyx":232 - * - * property bestPossibleObjValue: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6286,7 +6468,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20bestPossibleObjV - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":233 -+/* "cylp/cy/CyCbcModel.pyx":236 - * - * property numberObjects: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6316,7 +6498,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberObjects___ - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":234 -+ /* "cylp/cy/CyCbcModel.pyx":237 - * property numberObjects: - * def __get__(self): - * return self.CppSelf.numberObjects() # <<<<<<<<<<<<<< -@@ -6324,13 +6506,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberObjects___ - * property integerTolerance: - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->numberObjects()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) -+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->numberObjects()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "cylp/cy/CyCbcModel.pyx":233 -+ /* "cylp/cy/CyCbcModel.pyx":236 - * - * property numberObjects: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6349,7 +6531,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberObjects___ - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":237 -+/* "cylp/cy/CyCbcModel.pyx":240 - * - * property integerTolerance: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6379,7 +6561,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":238 -+ /* "cylp/cy/CyCbcModel.pyx":241 - * property integerTolerance: - * def __get__(self): - * return self.CppSelf.getIntegerTolerance() # <<<<<<<<<<<<<< -@@ -6387,13 +6569,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance - * def __set__(self, value): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getIntegerTolerance()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error) -+ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getIntegerTolerance()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "cylp/cy/CyCbcModel.pyx":237 -+ /* "cylp/cy/CyCbcModel.pyx":240 - * - * property integerTolerance: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6412,7 +6594,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":240 -+/* "cylp/cy/CyCbcModel.pyx":243 - * return self.CppSelf.getIntegerTolerance() - * - * def __set__(self, value): # <<<<<<<<<<<<<< -@@ -6442,17 +6624,17 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance_2__se - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__set__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":241 -+ /* "cylp/cy/CyCbcModel.pyx":244 - * - * def __set__(self, value): - * self.CppSelf.setIntegerTolerance(value) # <<<<<<<<<<<<<< - * - * property maximumSeconds: - */ -- __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 241, __pyx_L1_error) -+ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 244, __pyx_L1_error) - (void)(__pyx_v_self->CppSelf->setIntegerTolerance(__pyx_t_1)); - -- /* "cylp/cy/CyCbcModel.pyx":240 -+ /* "cylp/cy/CyCbcModel.pyx":243 - * return self.CppSelf.getIntegerTolerance() - * - * def __set__(self, value): # <<<<<<<<<<<<<< -@@ -6471,7 +6653,7 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16integerTolerance_2__se - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":244 -+/* "cylp/cy/CyCbcModel.pyx":247 - * - * property maximumSeconds: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6501,7 +6683,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds__ - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":245 -+ /* "cylp/cy/CyCbcModel.pyx":248 - * property maximumSeconds: - * def __get__(self): - * return self.CppSelf.getMaximumSeconds() # <<<<<<<<<<<<<< -@@ -6509,13 +6691,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds__ - * def __set__(self, value): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getMaximumSeconds()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error) -+ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getMaximumSeconds()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "cylp/cy/CyCbcModel.pyx":244 -+ /* "cylp/cy/CyCbcModel.pyx":247 - * - * property maximumSeconds: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6534,7 +6716,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds__ - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":247 -+/* "cylp/cy/CyCbcModel.pyx":250 - * return self.CppSelf.getMaximumSeconds() - * - * def __set__(self, value): # <<<<<<<<<<<<<< -@@ -6564,17 +6746,17 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds_2__set_ - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__set__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":248 -+ /* "cylp/cy/CyCbcModel.pyx":251 - * - * def __set__(self, value): - * self.CppSelf.setMaximumSeconds(value) # <<<<<<<<<<<<<< - * - * property maximumNodes: - */ -- __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 248, __pyx_L1_error) -+ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 251, __pyx_L1_error) - (void)(__pyx_v_self->CppSelf->setMaximumSeconds(__pyx_t_1)); - -- /* "cylp/cy/CyCbcModel.pyx":247 -+ /* "cylp/cy/CyCbcModel.pyx":250 - * return self.CppSelf.getMaximumSeconds() - * - * def __set__(self, value): # <<<<<<<<<<<<<< -@@ -6593,7 +6775,7 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14maximumSeconds_2__set_ - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":251 -+/* "cylp/cy/CyCbcModel.pyx":254 - * - * property maximumNodes: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6623,7 +6805,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes___g - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":252 -+ /* "cylp/cy/CyCbcModel.pyx":255 - * property maximumNodes: - * def __get__(self): - * return self.CppSelf.getMaximumNodes() # <<<<<<<<<<<<<< -@@ -6631,13 +6813,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes___g - * def __set__(self, value): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getMaximumNodes()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error) -+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getMaximumNodes()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 255, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "cylp/cy/CyCbcModel.pyx":251 -+ /* "cylp/cy/CyCbcModel.pyx":254 - * - * property maximumNodes: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6656,7 +6838,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes___g - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":254 -+/* "cylp/cy/CyCbcModel.pyx":257 - * return self.CppSelf.getMaximumNodes() - * - * def __set__(self, value): # <<<<<<<<<<<<<< -@@ -6686,17 +6868,17 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes_2__set__( - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__set__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":255 -+ /* "cylp/cy/CyCbcModel.pyx":258 - * - * def __set__(self, value): - * self.CppSelf.setMaximumNodes(value) # <<<<<<<<<<<<<< - * - * property numberThreads: - */ -- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 255, __pyx_L1_error) -+ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 258, __pyx_L1_error) - (void)(__pyx_v_self->CppSelf->setMaximumNodes(__pyx_t_1)); - -- /* "cylp/cy/CyCbcModel.pyx":254 -+ /* "cylp/cy/CyCbcModel.pyx":257 - * return self.CppSelf.getMaximumNodes() - * - * def __set__(self, value): # <<<<<<<<<<<<<< -@@ -6715,7 +6897,7 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12maximumNodes_2__set__( - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":258 -+/* "cylp/cy/CyCbcModel.pyx":261 - * - * property numberThreads: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6745,7 +6927,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads___ - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":259 -+ /* "cylp/cy/CyCbcModel.pyx":262 - * property numberThreads: - * def __get__(self): - * return self.CppSelf.getNumberThreads() # <<<<<<<<<<<<<< -@@ -6753,13 +6935,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads___ - * def __set__(self, value): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getNumberThreads()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error) -+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getNumberThreads()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "cylp/cy/CyCbcModel.pyx":258 -+ /* "cylp/cy/CyCbcModel.pyx":261 - * - * property numberThreads: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6778,7 +6960,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads___ - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":261 -+/* "cylp/cy/CyCbcModel.pyx":264 - * return self.CppSelf.getNumberThreads() - * - * def __set__(self, value): # <<<<<<<<<<<<<< -@@ -6808,17 +6990,17 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads_2__set__ - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__set__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":262 -+ /* "cylp/cy/CyCbcModel.pyx":265 - * - * def __set__(self, value): - * self.CppSelf.setNumberThreads(value) # <<<<<<<<<<<<<< - * - * property allowableGap: - */ -- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 262, __pyx_L1_error) -+ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 265, __pyx_L1_error) - __pyx_v_self->CppSelf->setNumberThreads(__pyx_t_1); - -- /* "cylp/cy/CyCbcModel.pyx":261 -+ /* "cylp/cy/CyCbcModel.pyx":264 - * return self.CppSelf.getNumberThreads() - * - * def __set__(self, value): # <<<<<<<<<<<<<< -@@ -6837,7 +7019,7 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13numberThreads_2__set__ - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":265 -+/* "cylp/cy/CyCbcModel.pyx":268 - * - * property allowableGap: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6867,7 +7049,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap___g - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":266 -+ /* "cylp/cy/CyCbcModel.pyx":269 - * property allowableGap: - * def __get__(self): - * return self.CppSelf.getAllowableGap() # <<<<<<<<<<<<<< -@@ -6875,13 +7057,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap___g - * def __set__(self, value): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getAllowableGap()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error) -+ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getAllowableGap()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 269, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "cylp/cy/CyCbcModel.pyx":265 -+ /* "cylp/cy/CyCbcModel.pyx":268 - * - * property allowableGap: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6900,7 +7082,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap___g - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":268 -+/* "cylp/cy/CyCbcModel.pyx":271 - * return self.CppSelf.getAllowableGap() - * - * def __set__(self, value): # <<<<<<<<<<<<<< -@@ -6930,17 +7112,17 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap_2__set__( - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__set__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":269 -+ /* "cylp/cy/CyCbcModel.pyx":272 - * - * def __set__(self, value): - * self.CppSelf.setAllowableGap(value) # <<<<<<<<<<<<<< - * - * property allowableFractionGap: - */ -- __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 269, __pyx_L1_error) -+ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 272, __pyx_L1_error) - __pyx_v_self->CppSelf->setAllowableGap(__pyx_t_1); - -- /* "cylp/cy/CyCbcModel.pyx":268 -+ /* "cylp/cy/CyCbcModel.pyx":271 - * return self.CppSelf.getAllowableGap() - * - * def __set__(self, value): # <<<<<<<<<<<<<< -@@ -6959,7 +7141,7 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12allowableGap_2__set__( - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":272 -+/* "cylp/cy/CyCbcModel.pyx":275 - * - * property allowableFractionGap: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -6989,7 +7171,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractio - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":273 -+ /* "cylp/cy/CyCbcModel.pyx":276 - * property allowableFractionGap: - * def __get__(self): - * return self.CppSelf.getAllowableFractionGap() # <<<<<<<<<<<<<< -@@ -6997,13 +7179,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractio - * def __set__(self, value): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getAllowableFractionGap()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error) -+ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getAllowableFractionGap()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "cylp/cy/CyCbcModel.pyx":272 -+ /* "cylp/cy/CyCbcModel.pyx":275 - * - * property allowableFractionGap: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -7022,7 +7204,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractio - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":275 -+/* "cylp/cy/CyCbcModel.pyx":278 - * return self.CppSelf.getAllowableFractionGap() - * - * def __set__(self, value): # <<<<<<<<<<<<<< -@@ -7052,17 +7234,17 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractionGap_2 - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__set__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":276 -+ /* "cylp/cy/CyCbcModel.pyx":279 - * - * def __set__(self, value): - * self.CppSelf.setAllowableFractionGap(value) # <<<<<<<<<<<<<< - * - * property allowablePercentageGap: - */ -- __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 276, __pyx_L1_error) -+ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 279, __pyx_L1_error) - __pyx_v_self->CppSelf->setAllowableFractionGap(__pyx_t_1); - -- /* "cylp/cy/CyCbcModel.pyx":275 -+ /* "cylp/cy/CyCbcModel.pyx":278 - * return self.CppSelf.getAllowableFractionGap() - * - * def __set__(self, value): # <<<<<<<<<<<<<< -@@ -7081,7 +7263,7 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_20allowableFractionGap_2 - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":279 -+/* "cylp/cy/CyCbcModel.pyx":282 - * - * property allowablePercentageGap: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -7111,7 +7293,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercent - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":280 -+ /* "cylp/cy/CyCbcModel.pyx":283 - * property allowablePercentageGap: - * def __get__(self): - * return self.CppSelf.getAllowablePercentageGap() # <<<<<<<<<<<<<< -@@ -7119,13 +7301,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercent - * def __set__(self, value): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getAllowablePercentageGap()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error) -+ __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->CppSelf->getAllowablePercentageGap()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 283, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "cylp/cy/CyCbcModel.pyx":279 -+ /* "cylp/cy/CyCbcModel.pyx":282 - * - * property allowablePercentageGap: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -7144,7 +7326,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercent - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":282 -+/* "cylp/cy/CyCbcModel.pyx":285 - * return self.CppSelf.getAllowablePercentageGap() - * - * def __set__(self, value): # <<<<<<<<<<<<<< -@@ -7174,17 +7356,17 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercentageGap - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__set__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":283 -+ /* "cylp/cy/CyCbcModel.pyx":286 - * - * def __set__(self, value): - * self.CppSelf.setAllowablePercentageGap(value) # <<<<<<<<<<<<<< - * - * property maximumSolutions: - */ -- __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 283, __pyx_L1_error) -+ __pyx_t_1 = __pyx_PyFloat_AsDouble(__pyx_v_value); if (unlikely((__pyx_t_1 == (double)-1) && PyErr_Occurred())) __PYX_ERR(0, 286, __pyx_L1_error) - __pyx_v_self->CppSelf->setAllowablePercentageGap(__pyx_t_1); - -- /* "cylp/cy/CyCbcModel.pyx":282 -+ /* "cylp/cy/CyCbcModel.pyx":285 - * return self.CppSelf.getAllowablePercentageGap() - * - * def __set__(self, value): # <<<<<<<<<<<<<< -@@ -7203,7 +7385,7 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22allowablePercentageGap - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":286 -+/* "cylp/cy/CyCbcModel.pyx":289 - * - * property maximumSolutions: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -7233,7 +7415,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__get__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":287 -+ /* "cylp/cy/CyCbcModel.pyx":290 - * property maximumSolutions: - * def __get__(self): - * return self.CppSelf.getMaximumSolutions() # <<<<<<<<<<<<<< -@@ -7241,13 +7423,13 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions - * def __set__(self, value): - */ - __Pyx_XDECREF(__pyx_r); -- __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getMaximumSolutions()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L1_error) -+ __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->CppSelf->getMaximumSolutions()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 290, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "cylp/cy/CyCbcModel.pyx":286 -+ /* "cylp/cy/CyCbcModel.pyx":289 - * - * property maximumSolutions: - * def __get__(self): # <<<<<<<<<<<<<< -@@ -7266,7 +7448,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions - return __pyx_r; - } - --/* "cylp/cy/CyCbcModel.pyx":289 -+/* "cylp/cy/CyCbcModel.pyx":292 - * return self.CppSelf.getMaximumSolutions() - * - * def __set__(self, value): # <<<<<<<<<<<<<< -@@ -7296,17 +7478,17 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16maximumSolutions_2__se - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("__set__", 0); - -- /* "cylp/cy/CyCbcModel.pyx":290 -+ /* "cylp/cy/CyCbcModel.pyx":293 - * - * def __set__(self, value): - * self.CppSelf.setMaximumSolutions(value) # <<<<<<<<<<<<<< - * - * - */ -- __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 290, __pyx_L1_error) -+ __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 293, __pyx_L1_error) - (void)(__pyx_v_self->CppSelf->setMaximumSolutions(__pyx_t_1)); - -- /* "cylp/cy/CyCbcModel.pyx":289 -+ /* "cylp/cy/CyCbcModel.pyx":292 - * return self.CppSelf.getMaximumSolutions() - * - * def __set__(self, value): # <<<<<<<<<<<<<< -@@ -7440,7 +7622,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22__setstate_cytho - return __pyx_r; - } - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":735 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -@@ -7457,7 +7639,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":736 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":736 - * - * cdef inline object PyArray_MultiIterNew1(a): - * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< -@@ -7471,7 +7653,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":735 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":735 - * ctypedef npy_cdouble complex_t - * - * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< -@@ -7490,7 +7672,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew1(PyObject *__ - return __pyx_r; - } - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":738 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -@@ -7507,7 +7689,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":739 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":739 - * - * cdef inline object PyArray_MultiIterNew2(a, b): - * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< -@@ -7521,7 +7703,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":738 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":738 - * return PyArray_MultiIterNew(1, a) - * - * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< -@@ -7540,7 +7722,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew2(PyObject *__ - return __pyx_r; - } - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":741 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -@@ -7557,7 +7739,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":742 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":742 - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): - * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< -@@ -7571,7 +7753,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":741 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":741 - * return PyArray_MultiIterNew(2, a, b) - * - * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< -@@ -7590,7 +7772,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew3(PyObject *__ - return __pyx_r; - } - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -7607,7 +7789,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":745 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":745 - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): - * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< -@@ -7621,7 +7803,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":744 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":744 - * return PyArray_MultiIterNew(3, a, b, c) - * - * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< -@@ -7640,7 +7822,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew4(PyObject *__ - return __pyx_r; - } - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -7657,7 +7839,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":748 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":748 - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): - * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< -@@ -7671,7 +7853,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - __pyx_t_1 = 0; - goto __pyx_L0; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":747 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":747 - * return PyArray_MultiIterNew(4, a, b, c, d) - * - * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< -@@ -7690,7 +7872,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyArray_MultiIterNew5(PyObject *__ - return __pyx_r; - } - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -7704,7 +7886,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - int __pyx_t_1; - __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -7714,7 +7896,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); - if (__pyx_t_1) { - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":752 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":752 - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): - * return d.subarray.shape # <<<<<<<<<<<<<< -@@ -7726,7 +7908,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); - goto __pyx_L0; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":751 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":751 - * - * cdef inline tuple PyDataType_SHAPE(dtype d): - * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< -@@ -7735,7 +7917,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - */ - } - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":754 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":754 - * return d.subarray.shape - * else: - * return () # <<<<<<<<<<<<<< -@@ -7749,7 +7931,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - goto __pyx_L0; - } - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":750 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":750 - * return PyArray_MultiIterNew(5, a, b, c, d, e) - * - * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< -@@ -7764,7 +7946,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_PyDataType_SHAPE(PyArray_Descr *__ - return __pyx_r; - } - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -7776,7 +7958,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("set_array_base", 0); - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":930 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":930 - * - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< -@@ -7785,7 +7967,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - Py_INCREF(__pyx_v_base); - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":931 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":931 - * cdef inline void set_array_base(ndarray arr, object base): - * Py_INCREF(base) # important to do this before stealing the reference below! - * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< -@@ -7794,7 +7976,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - */ - (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":929 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":929 - * int _import_umath() except -1 - * - * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< -@@ -7806,7 +7988,7 @@ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_a - __Pyx_RefNannyFinishContext(); - } - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -7821,7 +8003,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - int __pyx_t_1; - __Pyx_RefNannySetupContext("get_array_base", 0); - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":934 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":934 - * - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< -@@ -7830,7 +8012,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - __pyx_v_base = PyArray_BASE(__pyx_v_arr); - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -7840,7 +8022,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_t_1 = ((__pyx_v_base == NULL) != 0); - if (__pyx_t_1) { - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":936 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":936 - * base = PyArray_BASE(arr) - * if base is NULL: - * return None # <<<<<<<<<<<<<< -@@ -7851,7 +8033,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":935 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":935 - * cdef inline object get_array_base(ndarray arr): - * base = PyArray_BASE(arr) - * if base is NULL: # <<<<<<<<<<<<<< -@@ -7860,7 +8042,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - */ - } - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":937 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":937 - * if base is NULL: - * return None - * return base # <<<<<<<<<<<<<< -@@ -7872,7 +8054,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - __pyx_r = ((PyObject *)__pyx_v_base); - goto __pyx_L0; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":933 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":933 - * PyArray_SetBaseObject(arr, base) - * - * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< -@@ -7887,7 +8069,7 @@ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__py - return __pyx_r; - } - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< -@@ -7911,7 +8093,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_array", 0); - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -@@ -7927,7 +8109,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":943 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":943 - * cdef inline int import_array() except -1: - * try: - * __pyx_import_array() # <<<<<<<<<<<<<< -@@ -7936,7 +8118,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - */ - __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 943, __pyx_L3_error) - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -@@ -7950,7 +8132,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":944 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":944 - * try: - * __pyx_import_array() - * except Exception: # <<<<<<<<<<<<<< -@@ -7965,7 +8147,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":945 - * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< -@@ -7981,7 +8163,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":942 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":942 - * # Cython code. - * cdef inline int import_array() except -1: - * try: # <<<<<<<<<<<<<< -@@ -7996,7 +8178,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - __pyx_L8_try_end:; - } - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":941 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":941 - * # Versions of the import_* functions which are more suitable for - * # Cython code. - * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< -@@ -8019,7 +8201,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_array(void) { - return __pyx_r; - } - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -8043,7 +8225,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_umath", 0); - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -8059,7 +8241,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":949 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":949 - * cdef inline int import_umath() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< -@@ -8068,7 +8250,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - */ - __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 949, __pyx_L3_error) - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -8082,7 +8264,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":950 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":950 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< -@@ -8097,7 +8279,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -@@ -8113,7 +8295,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":948 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":948 - * - * cdef inline int import_umath() except -1: - * try: # <<<<<<<<<<<<<< -@@ -8128,7 +8310,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - __pyx_L8_try_end:; - } - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":947 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":947 - * raise ImportError("numpy.core.multiarray failed to import") - * - * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< -@@ -8151,7 +8333,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_umath(void) { - return __pyx_r; - } - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -8175,7 +8357,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("import_ufunc", 0); - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -8191,7 +8373,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_XGOTREF(__pyx_t_3); - /*try:*/ { - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":955 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":955 - * cdef inline int import_ufunc() except -1: - * try: - * _import_umath() # <<<<<<<<<<<<<< -@@ -8200,7 +8382,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - */ - __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 955, __pyx_L3_error) - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -8214,7 +8396,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - goto __pyx_L8_try_end; - __pyx_L3_error:; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":956 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":956 - * try: - * _import_umath() - * except Exception: # <<<<<<<<<<<<<< -@@ -8229,7 +8411,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GOTREF(__pyx_t_7); - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":957 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":957 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -@@ -8245,7 +8427,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - goto __pyx_L5_except_error; - __pyx_L5_except_error:; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":954 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":954 - * - * cdef inline int import_ufunc() except -1: - * try: # <<<<<<<<<<<<<< -@@ -8260,7 +8442,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - __pyx_L8_try_end:; - } - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":953 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":953 - * raise ImportError("numpy.core.umath failed to import") - * - * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< -@@ -8283,7 +8465,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_import_ufunc(void) { - return __pyx_r; - } - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":967 - * - * - * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -@@ -8296,7 +8478,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("is_timedelta64_object", 0); - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":979 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":979 - * bool - * """ - * return PyObject_TypeCheck(obj, &PyTimedeltaArrType_Type) # <<<<<<<<<<<<<< -@@ -8306,7 +8488,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ - __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyTimedeltaArrType_Type)); - goto __pyx_L0; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":967 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":967 - * - * - * cdef inline bint is_timedelta64_object(object obj): # <<<<<<<<<<<<<< -@@ -8320,7 +8502,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_timedelta64_object(PyObject *__pyx_v_ - return __pyx_r; - } - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":982 - * - * - * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -@@ -8333,7 +8515,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("is_datetime64_object", 0); - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":994 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":994 - * bool - * """ - * return PyObject_TypeCheck(obj, &PyDatetimeArrType_Type) # <<<<<<<<<<<<<< -@@ -8343,7 +8525,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o - __pyx_r = PyObject_TypeCheck(__pyx_v_obj, (&PyDatetimeArrType_Type)); - goto __pyx_L0; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":982 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":982 - * - * - * cdef inline bint is_datetime64_object(object obj): # <<<<<<<<<<<<<< -@@ -8357,7 +8539,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o - return __pyx_r; - } - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":997 - * - * - * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -@@ -8368,7 +8550,7 @@ static CYTHON_INLINE int __pyx_f_5numpy_is_datetime64_object(PyObject *__pyx_v_o - static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject *__pyx_v_obj) { - npy_datetime __pyx_r; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1004 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":1004 - * also needed. That can be found using `get_datetime64_unit`. - * """ - * return (obj).obval # <<<<<<<<<<<<<< -@@ -8378,7 +8560,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * - __pyx_r = ((PyDatetimeScalarObject *)__pyx_v_obj)->obval; - goto __pyx_L0; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":997 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":997 - * - * - * cdef inline npy_datetime get_datetime64_value(object obj) nogil: # <<<<<<<<<<<<<< -@@ -8391,7 +8573,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * - return __pyx_r; - } - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":1007 - * - * - * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -@@ -8402,7 +8584,7 @@ static CYTHON_INLINE npy_datetime __pyx_f_5numpy_get_datetime64_value(PyObject * - static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject *__pyx_v_obj) { - npy_timedelta __pyx_r; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1011 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":1011 - * returns the int64 value underlying scalar numpy timedelta64 object - * """ - * return (obj).obval # <<<<<<<<<<<<<< -@@ -8412,7 +8594,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject - __pyx_r = ((PyTimedeltaScalarObject *)__pyx_v_obj)->obval; - goto __pyx_L0; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1007 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":1007 - * - * - * cdef inline npy_timedelta get_timedelta64_value(object obj) nogil: # <<<<<<<<<<<<<< -@@ -8425,7 +8607,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject - return __pyx_r; - } - --/* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+/* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":1014 - * - * - * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -@@ -8436,7 +8618,7 @@ static CYTHON_INLINE npy_timedelta __pyx_f_5numpy_get_timedelta64_value(PyObject - static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObject *__pyx_v_obj) { - NPY_DATETIMEUNIT __pyx_r; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1018 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":1018 - * returns the unit part of the dtype for a numpy datetime64 object. - * """ - * return (obj).obmeta.base # <<<<<<<<<<<<<< -@@ -8444,7 +8626,7 @@ static CYTHON_INLINE NPY_DATETIMEUNIT __pyx_f_5numpy_get_datetime64_unit(PyObjec - __pyx_r = ((NPY_DATETIMEUNIT)((PyDatetimeScalarObject *)__pyx_v_obj)->obmeta.base); - goto __pyx_L0; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":1014 - * - * - * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< -@@ -8790,14 +8972,14 @@ static PyTypeObject __pyx_type_4cylp_2cy_10CyCbcModel_CyCbcModel = { - #if PY_VERSION_HEX >= 0x030400a1 - 0, /*tp_finalize*/ - #endif -- #if PY_VERSION_HEX >= 0x030800b1 -+ #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800) - 0, /*tp_vectorcall*/ - #endif - #if PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000 - 0, /*tp_print*/ - #endif -- #if PY_VERSION_HEX >= 0x030B00A2 -- 0, /*tp_inline_values_offset*/ -+ #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 -+ 0, /*tp_pypy_flags*/ - #endif - }; - -@@ -8876,6 +9058,8 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_indices, __pyx_k_indices, sizeof(__pyx_k_indices), 0, 0, 1, 1}, - {&__pyx_n_s_inds, __pyx_k_inds, sizeof(__pyx_k_inds), 0, 0, 1, 1}, - {&__pyx_n_s_infeasible, __pyx_k_infeasible, sizeof(__pyx_k_infeasible), 0, 0, 1, 1}, -+ {&__pyx_n_s_isRelaxationAbondoned, __pyx_k_isRelaxationAbondoned, sizeof(__pyx_k_isRelaxationAbondoned), 0, 0, 1, 1}, -+ {&__pyx_n_s_isRelaxationInfeasible, __pyx_k_isRelaxationInfeasible, sizeof(__pyx_k_isRelaxationInfeasible), 0, 0, 1, 1}, - {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1}, - {&__pyx_n_s_izip, __pyx_k_izip, sizeof(__pyx_k_izip), 0, 0, 1, 1}, - {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1}, -@@ -8888,6 +9072,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_kp_s_numpy_core_multiarray_failed_to, __pyx_k_numpy_core_multiarray_failed_to, sizeof(__pyx_k_numpy_core_multiarray_failed_to), 0, 0, 1, 0}, - {&__pyx_kp_s_numpy_core_umath_failed_to_impor, __pyx_k_numpy_core_umath_failed_to_impor, sizeof(__pyx_k_numpy_core_umath_failed_to_impor), 0, 0, 1, 0}, - {&__pyx_n_s_problemStatus, __pyx_k_problemStatus, sizeof(__pyx_k_problemStatus), 0, 0, 1, 1}, -+ {&__pyx_kp_s_problem_proven_infeasible, __pyx_k_problem_proven_infeasible, sizeof(__pyx_k_problem_proven_infeasible), 0, 0, 1, 0}, - {&__pyx_n_s_product, __pyx_k_product, sizeof(__pyx_k_product), 0, 0, 1, 1}, - {&__pyx_n_s_pythonCutGeneratorObject, __pyx_k_pythonCutGeneratorObject, sizeof(__pyx_k_pythonCutGeneratorObject), 0, 0, 1, 1}, - {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, -@@ -8895,6 +9080,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, -+ {&__pyx_kp_s_relaxation_abondoned, __pyx_k_relaxation_abondoned, sizeof(__pyx_k_relaxation_abondoned), 0, 0, 1, 0}, - {&__pyx_kp_s_relaxation_infeasible, __pyx_k_relaxation_infeasible, sizeof(__pyx_k_relaxation_infeasible), 0, 0, 1, 0}, - {&__pyx_kp_s_setNodeCompare_argument_should_b, __pyx_k_setNodeCompare_argument_should_b, sizeof(__pyx_k_setNodeCompare_argument_should_b), 0, 0, 1, 0}, - {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, -@@ -8920,7 +9106,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 7, __pyx_L1_error) - __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 99, __pyx_L1_error) - __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 112, __pyx_L1_error) -- __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 199, __pyx_L1_error) -+ __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 202, __pyx_L1_error) - return 0; - __pyx_L1_error:; - return -1; -@@ -8949,7 +9135,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_GOTREF(__pyx_tuple__3); - __Pyx_GIVEREF(__pyx_tuple__3); - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":945 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":945 - * __pyx_import_array() - * except Exception: - * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< -@@ -8960,7 +9146,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { - __Pyx_GOTREF(__pyx_tuple__4); - __Pyx_GIVEREF(__pyx_tuple__4); - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":951 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":951 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< -@@ -9665,7 +9851,7 @@ if (!__Pyx_RefNanny) { - if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_7) < 0) __PYX_ERR(0, 1, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - -- /* "../miniforge3/envs/numpy-dev/lib/python3.10/site-packages/numpy/__init__.pxd":1014 -+ /* "../miniforge3/envs/numpy-devel/lib/python3.9/site-packages/numpy/__init__.pxd":1014 - * - * - * cdef inline NPY_DATETIMEUNIT get_datetime64_unit(object obj) nogil: # <<<<<<<<<<<<<< diff --git a/build/pkgs/cylp/patches/02-bc666ccc89a9f6510c8ebf7d54f7a135294dc257.patch b/build/pkgs/cylp/patches/02-bc666ccc89a9f6510c8ebf7d54f7a135294dc257.patch deleted file mode 100644 index 7d6ccfb8002..00000000000 --- a/build/pkgs/cylp/patches/02-bc666ccc89a9f6510c8ebf7d54f7a135294dc257.patch +++ /dev/null @@ -1,280 +0,0 @@ -From bc666ccc89a9f6510c8ebf7d54f7a135294dc257 Mon Sep 17 00:00:00 2001 -From: Ted Ralphs -Date: Tue, 15 Mar 2022 15:37:57 -0400 -Subject: [PATCH] Fixing another typo and clarify menaing of status - ---- - cylp/cy/CyCbcModel.cpp | 87 ++++++++++++++++++++++-------------------- - cylp/cy/CyCbcModel.pyx | 4 +- - 2 files changed, 47 insertions(+), 44 deletions(-) - -diff --git a/cylp/cy/CyCbcModel.cpp b/cylp/cy/CyCbcModel.cpp -index 8192e18..cf3e3b8 100644 ---- a/cylp/cy/CyCbcModel.cpp -+++ b/cylp/cy/CyCbcModel.cpp -@@ -2753,10 +2753,11 @@ static const char __pyx_k_NodeCompareBase[] = "NodeCompareBase"; - static const char __pyx_k_addCutGenerator[] = "addCutGenerator"; - static const char __pyx_k_setstate_cython[] = "__setstate_cython__"; - static const char __pyx_k_stopped_on_time[] = "stopped on time"; -+static const char __pyx_k_search_completed[] = "search completed"; - static const char __pyx_k_stopped_on_nodes[] = "stopped on nodes"; - static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback"; --static const char __pyx_k_relaxation_abondoned[] = "relaxation abondoned"; --static const char __pyx_k_isRelaxationAbondoned[] = "isRelaxationAbondoned"; -+static const char __pyx_k_relaxation_abandoned[] = "relaxation abandoned"; -+static const char __pyx_k_isRelaxationAbandoned[] = "isRelaxationAbandoned"; - static const char __pyx_k_relaxation_infeasible[] = "relaxation infeasible"; - static const char __pyx_k_stopped_on_user_event[] = "stopped on user event"; - static const char __pyx_k_isRelaxationInfeasible[] = "isRelaxationInfeasible"; -@@ -2797,7 +2798,7 @@ static PyObject *__pyx_n_s_import; - static PyObject *__pyx_n_s_indices; - static PyObject *__pyx_n_s_inds; - static PyObject *__pyx_n_s_infeasible; --static PyObject *__pyx_n_s_isRelaxationAbondoned; -+static PyObject *__pyx_n_s_isRelaxationAbandoned; - static PyObject *__pyx_n_s_isRelaxationInfeasible; - static PyObject *__pyx_n_s_itertools; - static PyObject *__pyx_n_s_izip; -@@ -2819,8 +2820,9 @@ static PyObject *__pyx_n_s_range; - static PyObject *__pyx_n_s_reduce; - static PyObject *__pyx_n_s_reduce_cython; - static PyObject *__pyx_n_s_reduce_ex; --static PyObject *__pyx_kp_s_relaxation_abondoned; -+static PyObject *__pyx_kp_s_relaxation_abandoned; - static PyObject *__pyx_kp_s_relaxation_infeasible; -+static PyObject *__pyx_kp_s_search_completed; - static PyObject *__pyx_kp_s_setNodeCompare_argument_should_b; - static PyObject *__pyx_n_s_setstate; - static PyObject *__pyx_n_s_setstate_cython; -@@ -2850,7 +2852,7 @@ static int __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_8logLevel_2__set__(struc - static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_12isRelaxationInfeasible(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_14isRelaxationDualInfeasible(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16isRelaxationOptimal(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */ --static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbondoned(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */ -+static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbandoned(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_17osiSolverInteface___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_22primalVariableSolution___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */ - static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_13solutionCount___get__(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self); /* proto */ -@@ -4821,7 +4823,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status___get__(st - * # secondaryStatus() should be used instead of status() (??) - * if self.isRelaxationInfeasible(): # <<<<<<<<<<<<<< - * return problemStatus[1] -- * if self.isRelaxationAbondoned(): -+ * if self.isRelaxationAbandoned(): - */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isRelaxationInfeasible); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); -@@ -4848,8 +4850,8 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status___get__(st - * # secondaryStatus() should be used instead of status() (??) - * if self.isRelaxationInfeasible(): - * return problemStatus[1] # <<<<<<<<<<<<<< -- * if self.isRelaxationAbondoned(): -- * return 'relaxation abondoned' -+ * if self.isRelaxationAbandoned(): -+ * return 'relaxation abandoned' - */ - __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_problemStatus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error) -@@ -4866,18 +4868,18 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status___get__(st - * # secondaryStatus() should be used instead of status() (??) - * if self.isRelaxationInfeasible(): # <<<<<<<<<<<<<< - * return problemStatus[1] -- * if self.isRelaxationAbondoned(): -+ * if self.isRelaxationAbandoned(): - */ - } - - /* "cylp/cy/CyCbcModel.pyx":157 - * if self.isRelaxationInfeasible(): - * return problemStatus[1] -- * if self.isRelaxationAbondoned(): # <<<<<<<<<<<<<< -- * return 'relaxation abondoned' -+ * if self.isRelaxationAbandoned(): # <<<<<<<<<<<<<< -+ * return 'relaxation abandoned' - * if self.CppSelf.isProvenInfeasible(): - */ -- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isRelaxationAbondoned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) -+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_isRelaxationAbandoned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { -@@ -4900,28 +4902,28 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status___get__(st - - /* "cylp/cy/CyCbcModel.pyx":158 - * return problemStatus[1] -- * if self.isRelaxationAbondoned(): -- * return 'relaxation abondoned' # <<<<<<<<<<<<<< -+ * if self.isRelaxationAbandoned(): -+ * return 'relaxation abandoned' # <<<<<<<<<<<<<< - * if self.CppSelf.isProvenInfeasible(): - * return 'problem proven infeasible' - */ - __Pyx_XDECREF(__pyx_r); -- __Pyx_INCREF(__pyx_kp_s_relaxation_abondoned); -- __pyx_r = __pyx_kp_s_relaxation_abondoned; -+ __Pyx_INCREF(__pyx_kp_s_relaxation_abandoned); -+ __pyx_r = __pyx_kp_s_relaxation_abandoned; - goto __pyx_L0; - - /* "cylp/cy/CyCbcModel.pyx":157 - * if self.isRelaxationInfeasible(): - * return problemStatus[1] -- * if self.isRelaxationAbondoned(): # <<<<<<<<<<<<<< -- * return 'relaxation abondoned' -+ * if self.isRelaxationAbandoned(): # <<<<<<<<<<<<<< -+ * return 'relaxation abandoned' - * if self.CppSelf.isProvenInfeasible(): - */ - } - - /* "cylp/cy/CyCbcModel.pyx":159 -- * if self.isRelaxationAbondoned(): -- * return 'relaxation abondoned' -+ * if self.isRelaxationAbandoned(): -+ * return 'relaxation abandoned' - * if self.CppSelf.isProvenInfeasible(): # <<<<<<<<<<<<<< - * return 'problem proven infeasible' - * if self.CppSelf.isProvenOptimal(): -@@ -4930,7 +4932,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status___get__(st - if (__pyx_t_4) { - - /* "cylp/cy/CyCbcModel.pyx":160 -- * return 'relaxation abondoned' -+ * return 'relaxation abandoned' - * if self.CppSelf.isProvenInfeasible(): - * return 'problem proven infeasible' # <<<<<<<<<<<<<< - * if self.CppSelf.isProvenOptimal(): -@@ -4942,8 +4944,8 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_6status___get__(st - goto __pyx_L0; - - /* "cylp/cy/CyCbcModel.pyx":159 -- * if self.isRelaxationAbondoned(): -- * return 'relaxation abondoned' -+ * if self.isRelaxationAbandoned(): -+ * return 'relaxation abandoned' - * if self.CppSelf.isProvenInfeasible(): # <<<<<<<<<<<<<< - * return 'problem proven infeasible' - * if self.CppSelf.isProvenOptimal(): -@@ -5306,7 +5308,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16isRelaxationOpti - * def isRelaxationOptimal(self): - * return self.CppSelf.isInitialSolveProvenOptimal() # <<<<<<<<<<<<<< - * -- * def isRelaxationAbondoned(self): -+ * def isRelaxationAbandoned(self): - */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->CppSelf->isInitialSolveProvenOptimal()); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error) -@@ -5337,37 +5339,37 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_16isRelaxationOpti - /* "cylp/cy/CyCbcModel.pyx":181 - * return self.CppSelf.isInitialSolveProvenOptimal() - * -- * def isRelaxationAbondoned(self): # <<<<<<<<<<<<<< -+ * def isRelaxationAbandoned(self): # <<<<<<<<<<<<<< - * return self.CppSelf.isInitialSolveAbandoned() - * - */ - - /* Python wrapper */ --static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_19isRelaxationAbondoned(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ --static char __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbondoned[] = "CyCbcModel.isRelaxationAbondoned(self)"; --static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_19isRelaxationAbondoned(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { -+static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_19isRelaxationAbandoned(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -+static char __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbandoned[] = "CyCbcModel.isRelaxationAbandoned(self)"; -+static PyObject *__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_19isRelaxationAbandoned(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations -- __Pyx_RefNannySetupContext("isRelaxationAbondoned (wrapper)", 0); -- __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbondoned(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self)); -+ __Pyx_RefNannySetupContext("isRelaxationAbandoned (wrapper)", 0); -+ __pyx_r = __pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbandoned(((struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *)__pyx_v_self)); - - /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; - } - --static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbondoned(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) { -+static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbandoned(struct __pyx_obj_4cylp_2cy_10CyCbcModel_CyCbcModel *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; -- __Pyx_RefNannySetupContext("isRelaxationAbondoned", 0); -+ __Pyx_RefNannySetupContext("isRelaxationAbandoned", 0); - - /* "cylp/cy/CyCbcModel.pyx":182 - * -- * def isRelaxationAbondoned(self): -+ * def isRelaxationAbandoned(self): - * return self.CppSelf.isInitialSolveAbandoned() # <<<<<<<<<<<<<< - * - * property osiSolverInteface: -@@ -5382,7 +5384,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbon - /* "cylp/cy/CyCbcModel.pyx":181 - * return self.CppSelf.isInitialSolveProvenOptimal() - * -- * def isRelaxationAbondoned(self): # <<<<<<<<<<<<<< -+ * def isRelaxationAbandoned(self): # <<<<<<<<<<<<<< - * return self.CppSelf.isInitialSolveAbandoned() - * - */ -@@ -5390,7 +5392,7 @@ static PyObject *__pyx_pf_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbon - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); -- __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.isRelaxationAbondoned", __pyx_clineno, __pyx_lineno, __pyx_filename); -+ __Pyx_AddTraceback("cylp.cy.CyCbcModel.CyCbcModel.isRelaxationAbandoned", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); -@@ -8883,7 +8885,7 @@ static PyMethodDef __pyx_methods_4cylp_2cy_10CyCbcModel_CyCbcModel[] = { - {"isRelaxationInfeasible", (PyCFunction)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_13isRelaxationInfeasible, METH_NOARGS, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_12isRelaxationInfeasible}, - {"isRelaxationDualInfeasible", (PyCFunction)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_15isRelaxationDualInfeasible, METH_NOARGS, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_14isRelaxationDualInfeasible}, - {"isRelaxationOptimal", (PyCFunction)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_17isRelaxationOptimal, METH_NOARGS, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_16isRelaxationOptimal}, -- {"isRelaxationAbondoned", (PyCFunction)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_19isRelaxationAbondoned, METH_NOARGS, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbondoned}, -+ {"isRelaxationAbandoned", (PyCFunction)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_19isRelaxationAbandoned, METH_NOARGS, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_18isRelaxationAbandoned}, - {"__reduce_cython__", (PyCFunction)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_21__reduce_cython__, METH_NOARGS, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_20__reduce_cython__}, - {"__setstate_cython__", (PyCFunction)__pyx_pw_4cylp_2cy_10CyCbcModel_10CyCbcModel_23__setstate_cython__, METH_O, __pyx_doc_4cylp_2cy_10CyCbcModel_10CyCbcModel_22__setstate_cython__}, - {0, 0, 0, 0} -@@ -9058,7 +9060,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_indices, __pyx_k_indices, sizeof(__pyx_k_indices), 0, 0, 1, 1}, - {&__pyx_n_s_inds, __pyx_k_inds, sizeof(__pyx_k_inds), 0, 0, 1, 1}, - {&__pyx_n_s_infeasible, __pyx_k_infeasible, sizeof(__pyx_k_infeasible), 0, 0, 1, 1}, -- {&__pyx_n_s_isRelaxationAbondoned, __pyx_k_isRelaxationAbondoned, sizeof(__pyx_k_isRelaxationAbondoned), 0, 0, 1, 1}, -+ {&__pyx_n_s_isRelaxationAbandoned, __pyx_k_isRelaxationAbandoned, sizeof(__pyx_k_isRelaxationAbandoned), 0, 0, 1, 1}, - {&__pyx_n_s_isRelaxationInfeasible, __pyx_k_isRelaxationInfeasible, sizeof(__pyx_k_isRelaxationInfeasible), 0, 0, 1, 1}, - {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1}, - {&__pyx_n_s_izip, __pyx_k_izip, sizeof(__pyx_k_izip), 0, 0, 1, 1}, -@@ -9080,8 +9082,9 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1}, - {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1}, -- {&__pyx_kp_s_relaxation_abondoned, __pyx_k_relaxation_abondoned, sizeof(__pyx_k_relaxation_abondoned), 0, 0, 1, 0}, -+ {&__pyx_kp_s_relaxation_abandoned, __pyx_k_relaxation_abandoned, sizeof(__pyx_k_relaxation_abandoned), 0, 0, 1, 0}, - {&__pyx_kp_s_relaxation_infeasible, __pyx_k_relaxation_infeasible, sizeof(__pyx_k_relaxation_infeasible), 0, 0, 1, 0}, -+ {&__pyx_kp_s_search_completed, __pyx_k_search_completed, sizeof(__pyx_k_search_completed), 0, 0, 1, 0}, - {&__pyx_kp_s_setNodeCompare_argument_should_b, __pyx_k_setNodeCompare_argument_should_b, sizeof(__pyx_k_setNodeCompare_argument_should_b), 0, 0, 1, 0}, - {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1}, - {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1}, -@@ -9808,15 +9811,15 @@ if (!__Pyx_RefNanny) { - /* "cylp/cy/CyCbcModel.pyx":33 - * - * # Understandable messages to translate what branchAndBound() returns -- * problemStatus = ['solution', 'relaxation infeasible', # <<<<<<<<<<<<<< -+ * problemStatus = ['search completed', 'relaxation infeasible', # <<<<<<<<<<<<<< - * 'stopped on gap', 'stopped on nodes', 'stopped on time', - * 'stopped on user event', 'stopped on solutions' - */ - __pyx_t_7 = PyList_New(8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 33, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); -- __Pyx_INCREF(__pyx_n_s_solution); -- __Pyx_GIVEREF(__pyx_n_s_solution); -- PyList_SET_ITEM(__pyx_t_7, 0, __pyx_n_s_solution); -+ __Pyx_INCREF(__pyx_kp_s_search_completed); -+ __Pyx_GIVEREF(__pyx_kp_s_search_completed); -+ PyList_SET_ITEM(__pyx_t_7, 0, __pyx_kp_s_search_completed); - __Pyx_INCREF(__pyx_kp_s_relaxation_infeasible); - __Pyx_GIVEREF(__pyx_kp_s_relaxation_infeasible); - PyList_SET_ITEM(__pyx_t_7, 1, __pyx_kp_s_relaxation_infeasible); From 7a763916150284255e007f1b22750301ba2d91ee Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 26 Mar 2022 19:22:38 -0700 Subject: [PATCH 152/751] build/pkgs/cvxpy/requirements.txt: Update git ref --- build/pkgs/cvxpy/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/cvxpy/requirements.txt b/build/pkgs/cvxpy/requirements.txt index 4882cefe710..1c90646f7cd 100644 --- a/build/pkgs/cvxpy/requirements.txt +++ b/build/pkgs/cvxpy/requirements.txt @@ -1 +1 @@ -cvxpy @ git+/~https://github.com/cvxpy/cvxpy.git@refs/pull/1707/head +cvxpy @ git+/~https://github.com/cvxpy/cvxpy.git@30f8e04aa00d0bcdd759bdb8e1b72cdbd9f51c4f From 7cf3d6f5a427b6165ea251845fdf82d49c89ebfe Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 30 Jul 2022 11:26:27 -0700 Subject: [PATCH 153/751] build/pkgs/cvxpy: Make it a normal package, add dependencies qdldl_python, osqp, scs, ecos --- build/pkgs/cvxpy/checksums.ini | 5 +++++ build/pkgs/cvxpy/dependencies | 2 +- build/pkgs/cvxpy/install-requires.txt | 1 + build/pkgs/cvxpy/package-version.txt | 1 + build/pkgs/cvxpy/requirements.txt | 1 - build/pkgs/cvxpy/spkg-install.in | 3 +++ build/pkgs/ecos/SPKG.rst | 18 ++++++++++++++++++ build/pkgs/ecos/checksums.ini | 5 +++++ build/pkgs/ecos/dependencies | 4 ++++ build/pkgs/ecos/install-requires.txt | 1 + build/pkgs/ecos/package-version.txt | 1 + build/pkgs/ecos/spkg-install.in | 2 ++ build/pkgs/ecos/type | 1 + build/pkgs/osqp/SPKG.rst | 18 ++++++++++++++++++ build/pkgs/osqp/checksums.ini | 5 +++++ build/pkgs/osqp/dependencies | 4 ++++ build/pkgs/osqp/install-requires.txt | 1 + build/pkgs/osqp/package-version.txt | 1 + build/pkgs/osqp/spkg-install.in | 2 ++ build/pkgs/osqp/type | 1 + build/pkgs/qdldl_python/SPKG.rst | 18 ++++++++++++++++++ build/pkgs/qdldl_python/checksums.ini | 5 +++++ build/pkgs/qdldl_python/dependencies | 4 ++++ build/pkgs/qdldl_python/install-requires.txt | 1 + build/pkgs/qdldl_python/package-version.txt | 1 + build/pkgs/qdldl_python/spkg-install.in | 2 ++ build/pkgs/qdldl_python/type | 1 + build/pkgs/scs/SPKG.rst | 18 ++++++++++++++++++ build/pkgs/scs/checksums.ini | 5 +++++ build/pkgs/scs/dependencies | 4 ++++ build/pkgs/scs/install-requires.txt | 1 + build/pkgs/scs/package-version.txt | 1 + build/pkgs/scs/spkg-install.in | 2 ++ build/pkgs/scs/type | 1 + 34 files changed, 139 insertions(+), 2 deletions(-) create mode 100644 build/pkgs/cvxpy/checksums.ini create mode 100644 build/pkgs/cvxpy/install-requires.txt create mode 100644 build/pkgs/cvxpy/package-version.txt delete mode 100644 build/pkgs/cvxpy/requirements.txt create mode 100644 build/pkgs/cvxpy/spkg-install.in create mode 100644 build/pkgs/ecos/SPKG.rst create mode 100644 build/pkgs/ecos/checksums.ini create mode 100644 build/pkgs/ecos/dependencies create mode 100644 build/pkgs/ecos/install-requires.txt create mode 100644 build/pkgs/ecos/package-version.txt create mode 100644 build/pkgs/ecos/spkg-install.in create mode 100644 build/pkgs/ecos/type create mode 100644 build/pkgs/osqp/SPKG.rst create mode 100644 build/pkgs/osqp/checksums.ini create mode 100644 build/pkgs/osqp/dependencies create mode 100644 build/pkgs/osqp/install-requires.txt create mode 100644 build/pkgs/osqp/package-version.txt create mode 100644 build/pkgs/osqp/spkg-install.in create mode 100644 build/pkgs/osqp/type create mode 100644 build/pkgs/qdldl_python/SPKG.rst create mode 100644 build/pkgs/qdldl_python/checksums.ini create mode 100644 build/pkgs/qdldl_python/dependencies create mode 100644 build/pkgs/qdldl_python/install-requires.txt create mode 100644 build/pkgs/qdldl_python/package-version.txt create mode 100644 build/pkgs/qdldl_python/spkg-install.in create mode 100644 build/pkgs/qdldl_python/type create mode 100644 build/pkgs/scs/SPKG.rst create mode 100644 build/pkgs/scs/checksums.ini create mode 100644 build/pkgs/scs/dependencies create mode 100644 build/pkgs/scs/install-requires.txt create mode 100644 build/pkgs/scs/package-version.txt create mode 100644 build/pkgs/scs/spkg-install.in create mode 100644 build/pkgs/scs/type diff --git a/build/pkgs/cvxpy/checksums.ini b/build/pkgs/cvxpy/checksums.ini new file mode 100644 index 00000000000..dc48984b115 --- /dev/null +++ b/build/pkgs/cvxpy/checksums.ini @@ -0,0 +1,5 @@ +tarball=cvxpy-VERSION.tar.gz +sha1=03d4c4cbe3161771d3978135d44c06a868e69988 +md5=893c1fd38be2b847c389f785555d8f59 +cksum=1338249214 +upstream_url=https://pypi.io/packages/source/c/cvxpy/cvxpy-VERSION.tar.gz diff --git a/build/pkgs/cvxpy/dependencies b/build/pkgs/cvxpy/dependencies index 888fc3e4481..2e1f6cc3357 100644 --- a/build/pkgs/cvxpy/dependencies +++ b/build/pkgs/cvxpy/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) numpy scipy pybind11 glpk cvxopt | $(PYTHON_TOOLCHAIN) +$(PYTHON) numpy scipy glpk cvxopt osqp ecos scs | $(PYTHON_TOOLCHAIN) ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/cvxpy/install-requires.txt b/build/pkgs/cvxpy/install-requires.txt new file mode 100644 index 00000000000..187142bb93e --- /dev/null +++ b/build/pkgs/cvxpy/install-requires.txt @@ -0,0 +1 @@ +cvxpy diff --git a/build/pkgs/cvxpy/package-version.txt b/build/pkgs/cvxpy/package-version.txt new file mode 100644 index 00000000000..6085e946503 --- /dev/null +++ b/build/pkgs/cvxpy/package-version.txt @@ -0,0 +1 @@ +1.2.1 diff --git a/build/pkgs/cvxpy/requirements.txt b/build/pkgs/cvxpy/requirements.txt deleted file mode 100644 index 1c90646f7cd..00000000000 --- a/build/pkgs/cvxpy/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -cvxpy @ git+/~https://github.com/cvxpy/cvxpy.git@30f8e04aa00d0bcdd759bdb8e1b72cdbd9f51c4f diff --git a/build/pkgs/cvxpy/spkg-install.in b/build/pkgs/cvxpy/spkg-install.in new file mode 100644 index 00000000000..a143d1eff96 --- /dev/null +++ b/build/pkgs/cvxpy/spkg-install.in @@ -0,0 +1,3 @@ +cd src +# --no-build-isolation to ignore the numpy version pin in pyproject.toml +sdh_pip_install --no-build-isolation . diff --git a/build/pkgs/ecos/SPKG.rst b/build/pkgs/ecos/SPKG.rst new file mode 100644 index 00000000000..75828ea9c37 --- /dev/null +++ b/build/pkgs/ecos/SPKG.rst @@ -0,0 +1,18 @@ +ecos: This is the Python package for ECOS: Embedded Cone Solver. See Github page for more information. +====================================================================================================== + +Description +----------- + +This is the Python package for ECOS: Embedded Cone Solver. See Github page for more information. + +License +------- + +GPLv3 + +Upstream Contact +---------------- + +https://pypi.org/project/ecos/ + diff --git a/build/pkgs/ecos/checksums.ini b/build/pkgs/ecos/checksums.ini new file mode 100644 index 00000000000..1d660c0b9a5 --- /dev/null +++ b/build/pkgs/ecos/checksums.ini @@ -0,0 +1,5 @@ +tarball=ecos-VERSION.tar.gz +sha1=6d980399f0b7fe0aab243a0cc8e4578b3a7bbd2c +md5=2d8cd61259dfd47fedb0bf23ab31520a +cksum=4227060546 +upstream_url=https://pypi.io/packages/source/e/ecos/ecos-VERSION.tar.gz diff --git a/build/pkgs/ecos/dependencies b/build/pkgs/ecos/dependencies new file mode 100644 index 00000000000..ecd3af7675b --- /dev/null +++ b/build/pkgs/ecos/dependencies @@ -0,0 +1,4 @@ +$(PYTHON) numpy scipy | $(PYTHON_TOOLCHAIN) + +---------- +All lines of this file are ignored except the first. diff --git a/build/pkgs/ecos/install-requires.txt b/build/pkgs/ecos/install-requires.txt new file mode 100644 index 00000000000..d75c5988ca8 --- /dev/null +++ b/build/pkgs/ecos/install-requires.txt @@ -0,0 +1 @@ +ecos diff --git a/build/pkgs/ecos/package-version.txt b/build/pkgs/ecos/package-version.txt new file mode 100644 index 00000000000..0a692060f9b --- /dev/null +++ b/build/pkgs/ecos/package-version.txt @@ -0,0 +1 @@ +2.0.10 diff --git a/build/pkgs/ecos/spkg-install.in b/build/pkgs/ecos/spkg-install.in new file mode 100644 index 00000000000..37ac1a53437 --- /dev/null +++ b/build/pkgs/ecos/spkg-install.in @@ -0,0 +1,2 @@ +cd src +sdh_pip_install . diff --git a/build/pkgs/ecos/type b/build/pkgs/ecos/type new file mode 100644 index 00000000000..134d9bc32d5 --- /dev/null +++ b/build/pkgs/ecos/type @@ -0,0 +1 @@ +optional diff --git a/build/pkgs/osqp/SPKG.rst b/build/pkgs/osqp/SPKG.rst new file mode 100644 index 00000000000..f97c2120160 --- /dev/null +++ b/build/pkgs/osqp/SPKG.rst @@ -0,0 +1,18 @@ +osqp: OSQP: The Operator Splitting QP Solver +============================================ + +Description +----------- + +OSQP: The Operator Splitting QP Solver + +License +------- + +Apache 2.0 + +Upstream Contact +---------------- + +https://pypi.org/project/osqp/ + diff --git a/build/pkgs/osqp/checksums.ini b/build/pkgs/osqp/checksums.ini new file mode 100644 index 00000000000..1fbb958ee11 --- /dev/null +++ b/build/pkgs/osqp/checksums.ini @@ -0,0 +1,5 @@ +tarball=osqp-VERSION.tar.gz +sha1=2f6493ecb34dd129531ac955abdd7ed03af8f78f +md5=2e7491f53e4825515db6db4e97d2ef45 +cksum=1539597175 +upstream_url=https://pypi.io/packages/source/o/osqp/osqp-VERSION.tar.gz diff --git a/build/pkgs/osqp/dependencies b/build/pkgs/osqp/dependencies new file mode 100644 index 00000000000..138a24dc010 --- /dev/null +++ b/build/pkgs/osqp/dependencies @@ -0,0 +1,4 @@ +$(PYTHON) qdldl_python numpy scipy | $(PYTHON_TOOLCHAIN) + +---------- +All lines of this file are ignored except the first. diff --git a/build/pkgs/osqp/install-requires.txt b/build/pkgs/osqp/install-requires.txt new file mode 100644 index 00000000000..c2c8a965707 --- /dev/null +++ b/build/pkgs/osqp/install-requires.txt @@ -0,0 +1 @@ +osqp diff --git a/build/pkgs/osqp/package-version.txt b/build/pkgs/osqp/package-version.txt new file mode 100644 index 00000000000..8c6bbf4a781 --- /dev/null +++ b/build/pkgs/osqp/package-version.txt @@ -0,0 +1 @@ +0.6.2.post5 diff --git a/build/pkgs/osqp/spkg-install.in b/build/pkgs/osqp/spkg-install.in new file mode 100644 index 00000000000..37ac1a53437 --- /dev/null +++ b/build/pkgs/osqp/spkg-install.in @@ -0,0 +1,2 @@ +cd src +sdh_pip_install . diff --git a/build/pkgs/osqp/type b/build/pkgs/osqp/type new file mode 100644 index 00000000000..134d9bc32d5 --- /dev/null +++ b/build/pkgs/osqp/type @@ -0,0 +1 @@ +optional diff --git a/build/pkgs/qdldl_python/SPKG.rst b/build/pkgs/qdldl_python/SPKG.rst new file mode 100644 index 00000000000..f2ddd73224a --- /dev/null +++ b/build/pkgs/qdldl_python/SPKG.rst @@ -0,0 +1,18 @@ +qdldl_python: QDLDL, a free LDL factorization routine (Python wrapper) +====================================================================== + +Description +----------- + +QDLDL, a free LDL factorization routine. + +License +------- + +Apache 2.0 + +Upstream Contact +---------------- + +https://pypi.org/project/qdldl/ + diff --git a/build/pkgs/qdldl_python/checksums.ini b/build/pkgs/qdldl_python/checksums.ini new file mode 100644 index 00000000000..6a9e416028c --- /dev/null +++ b/build/pkgs/qdldl_python/checksums.ini @@ -0,0 +1,5 @@ +tarball=qdldl-VERSION.tar.gz +sha1=ccecff38b06eef36a38e91635464b9f357a6f198 +md5=a7ca53ba719a12e4303a1274506c55a8 +cksum=3447836333 +upstream_url=https://pypi.io/packages/source/q/qdldl/qdldl-VERSION.tar.gz diff --git a/build/pkgs/qdldl_python/dependencies b/build/pkgs/qdldl_python/dependencies new file mode 100644 index 00000000000..48c2586b9f4 --- /dev/null +++ b/build/pkgs/qdldl_python/dependencies @@ -0,0 +1,4 @@ +$(PYTHON) pybind11 numpy scipy | $(PYTHON_TOOLCHAIN) cmake + +---------- +All lines of this file are ignored except the first. diff --git a/build/pkgs/qdldl_python/install-requires.txt b/build/pkgs/qdldl_python/install-requires.txt new file mode 100644 index 00000000000..19334259738 --- /dev/null +++ b/build/pkgs/qdldl_python/install-requires.txt @@ -0,0 +1 @@ +qdldl diff --git a/build/pkgs/qdldl_python/package-version.txt b/build/pkgs/qdldl_python/package-version.txt new file mode 100644 index 00000000000..d5b60a259f6 --- /dev/null +++ b/build/pkgs/qdldl_python/package-version.txt @@ -0,0 +1 @@ +0.1.5.post2 diff --git a/build/pkgs/qdldl_python/spkg-install.in b/build/pkgs/qdldl_python/spkg-install.in new file mode 100644 index 00000000000..37ac1a53437 --- /dev/null +++ b/build/pkgs/qdldl_python/spkg-install.in @@ -0,0 +1,2 @@ +cd src +sdh_pip_install . diff --git a/build/pkgs/qdldl_python/type b/build/pkgs/qdldl_python/type new file mode 100644 index 00000000000..134d9bc32d5 --- /dev/null +++ b/build/pkgs/qdldl_python/type @@ -0,0 +1 @@ +optional diff --git a/build/pkgs/scs/SPKG.rst b/build/pkgs/scs/SPKG.rst new file mode 100644 index 00000000000..e98a19d199e --- /dev/null +++ b/build/pkgs/scs/SPKG.rst @@ -0,0 +1,18 @@ +scs: scs: splitting conic solver +================================ + +Description +----------- + +scs: splitting conic solver + +License +------- + +MIT + +Upstream Contact +---------------- + +https://pypi.org/project/scs/ + diff --git a/build/pkgs/scs/checksums.ini b/build/pkgs/scs/checksums.ini new file mode 100644 index 00000000000..f92f46b9f2c --- /dev/null +++ b/build/pkgs/scs/checksums.ini @@ -0,0 +1,5 @@ +tarball=scs-VERSION.tar.gz +sha1=938174ef98ba1b92d108a47abcbf12b1d2119dcb +md5=336840dd28db0fd90d2b0570c8372291 +cksum=3980097253 +upstream_url=https://pypi.io/packages/source/s/scs/scs-VERSION.tar.gz diff --git a/build/pkgs/scs/dependencies b/build/pkgs/scs/dependencies new file mode 100644 index 00000000000..56c3c7a111c --- /dev/null +++ b/build/pkgs/scs/dependencies @@ -0,0 +1,4 @@ +$(PYTHON) numpy | $(PYTHON_TOOLCHAIN) cmake + +---------- +All lines of this file are ignored except the first. diff --git a/build/pkgs/scs/install-requires.txt b/build/pkgs/scs/install-requires.txt new file mode 100644 index 00000000000..846d47b8e24 --- /dev/null +++ b/build/pkgs/scs/install-requires.txt @@ -0,0 +1 @@ +scs diff --git a/build/pkgs/scs/package-version.txt b/build/pkgs/scs/package-version.txt new file mode 100644 index 00000000000..944880fa15e --- /dev/null +++ b/build/pkgs/scs/package-version.txt @@ -0,0 +1 @@ +3.2.0 diff --git a/build/pkgs/scs/spkg-install.in b/build/pkgs/scs/spkg-install.in new file mode 100644 index 00000000000..37ac1a53437 --- /dev/null +++ b/build/pkgs/scs/spkg-install.in @@ -0,0 +1,2 @@ +cd src +sdh_pip_install . diff --git a/build/pkgs/scs/type b/build/pkgs/scs/type new file mode 100644 index 00000000000..134d9bc32d5 --- /dev/null +++ b/build/pkgs/scs/type @@ -0,0 +1 @@ +optional From f6396e10513da1f261bf0c299fb24fa3164b326f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 30 Jul 2022 12:01:52 -0700 Subject: [PATCH 154/751] build/pkgs/{ecos,osqp}_python: Renamed from ecos, osqp --- build/pkgs/cvxpy/dependencies | 2 +- build/pkgs/ecos/SPKG.rst | 18 ----------------- build/pkgs/ecos_python/SPKG.rst | 20 +++++++++++++++++++ .../pkgs/{ecos => ecos_python}/checksums.ini | 0 build/pkgs/{ecos => ecos_python}/dependencies | 0 .../install-requires.txt | 0 .../{ecos => ecos_python}/package-version.txt | 0 .../{ecos => ecos_python}/spkg-install.in | 0 build/pkgs/{ecos => ecos_python}/type | 0 build/pkgs/osqp/SPKG.rst | 18 ----------------- build/pkgs/osqp_python/SPKG.rst | 20 +++++++++++++++++++ .../pkgs/{osqp => osqp_python}/checksums.ini | 0 build/pkgs/{osqp => osqp_python}/dependencies | 0 .../install-requires.txt | 0 .../{osqp => osqp_python}/package-version.txt | 0 .../{osqp => osqp_python}/spkg-install.in | 0 build/pkgs/{osqp => osqp_python}/type | 0 build/pkgs/scs/SPKG.rst | 4 ++-- 18 files changed, 43 insertions(+), 39 deletions(-) delete mode 100644 build/pkgs/ecos/SPKG.rst create mode 100644 build/pkgs/ecos_python/SPKG.rst rename build/pkgs/{ecos => ecos_python}/checksums.ini (100%) rename build/pkgs/{ecos => ecos_python}/dependencies (100%) rename build/pkgs/{ecos => ecos_python}/install-requires.txt (100%) rename build/pkgs/{ecos => ecos_python}/package-version.txt (100%) rename build/pkgs/{ecos => ecos_python}/spkg-install.in (100%) rename build/pkgs/{ecos => ecos_python}/type (100%) delete mode 100644 build/pkgs/osqp/SPKG.rst create mode 100644 build/pkgs/osqp_python/SPKG.rst rename build/pkgs/{osqp => osqp_python}/checksums.ini (100%) rename build/pkgs/{osqp => osqp_python}/dependencies (100%) rename build/pkgs/{osqp => osqp_python}/install-requires.txt (100%) rename build/pkgs/{osqp => osqp_python}/package-version.txt (100%) rename build/pkgs/{osqp => osqp_python}/spkg-install.in (100%) rename build/pkgs/{osqp => osqp_python}/type (100%) diff --git a/build/pkgs/cvxpy/dependencies b/build/pkgs/cvxpy/dependencies index 2e1f6cc3357..540b44ff0f2 100644 --- a/build/pkgs/cvxpy/dependencies +++ b/build/pkgs/cvxpy/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) numpy scipy glpk cvxopt osqp ecos scs | $(PYTHON_TOOLCHAIN) +$(PYTHON) numpy scipy glpk cvxopt osqp_python ecos_python scs | $(PYTHON_TOOLCHAIN) ---------- All lines of this file are ignored except the first. diff --git a/build/pkgs/ecos/SPKG.rst b/build/pkgs/ecos/SPKG.rst deleted file mode 100644 index 75828ea9c37..00000000000 --- a/build/pkgs/ecos/SPKG.rst +++ /dev/null @@ -1,18 +0,0 @@ -ecos: This is the Python package for ECOS: Embedded Cone Solver. See Github page for more information. -====================================================================================================== - -Description ------------ - -This is the Python package for ECOS: Embedded Cone Solver. See Github page for more information. - -License -------- - -GPLv3 - -Upstream Contact ----------------- - -https://pypi.org/project/ecos/ - diff --git a/build/pkgs/ecos_python/SPKG.rst b/build/pkgs/ecos_python/SPKG.rst new file mode 100644 index 00000000000..5c7bb0d9a22 --- /dev/null +++ b/build/pkgs/ecos_python/SPKG.rst @@ -0,0 +1,20 @@ +ecos_python: Embedded Cone Solver (Python wrapper) +================================================== + +Description +----------- + +This is the Python package for ECOS: Embedded Cone Solver. + +It vendors ECOS. + +License +------- + +GPLv3 + +Upstream Contact +---------------- + +https://pypi.org/project/ecos/ + diff --git a/build/pkgs/ecos/checksums.ini b/build/pkgs/ecos_python/checksums.ini similarity index 100% rename from build/pkgs/ecos/checksums.ini rename to build/pkgs/ecos_python/checksums.ini diff --git a/build/pkgs/ecos/dependencies b/build/pkgs/ecos_python/dependencies similarity index 100% rename from build/pkgs/ecos/dependencies rename to build/pkgs/ecos_python/dependencies diff --git a/build/pkgs/ecos/install-requires.txt b/build/pkgs/ecos_python/install-requires.txt similarity index 100% rename from build/pkgs/ecos/install-requires.txt rename to build/pkgs/ecos_python/install-requires.txt diff --git a/build/pkgs/ecos/package-version.txt b/build/pkgs/ecos_python/package-version.txt similarity index 100% rename from build/pkgs/ecos/package-version.txt rename to build/pkgs/ecos_python/package-version.txt diff --git a/build/pkgs/ecos/spkg-install.in b/build/pkgs/ecos_python/spkg-install.in similarity index 100% rename from build/pkgs/ecos/spkg-install.in rename to build/pkgs/ecos_python/spkg-install.in diff --git a/build/pkgs/ecos/type b/build/pkgs/ecos_python/type similarity index 100% rename from build/pkgs/ecos/type rename to build/pkgs/ecos_python/type diff --git a/build/pkgs/osqp/SPKG.rst b/build/pkgs/osqp/SPKG.rst deleted file mode 100644 index f97c2120160..00000000000 --- a/build/pkgs/osqp/SPKG.rst +++ /dev/null @@ -1,18 +0,0 @@ -osqp: OSQP: The Operator Splitting QP Solver -============================================ - -Description ------------ - -OSQP: The Operator Splitting QP Solver - -License -------- - -Apache 2.0 - -Upstream Contact ----------------- - -https://pypi.org/project/osqp/ - diff --git a/build/pkgs/osqp_python/SPKG.rst b/build/pkgs/osqp_python/SPKG.rst new file mode 100644 index 00000000000..7672b270ec9 --- /dev/null +++ b/build/pkgs/osqp_python/SPKG.rst @@ -0,0 +1,20 @@ +osqp_python: The Operator Splitting QP Solver (Python wrapper) +============================================================== + +Description +----------- + +This is the Python wrapper for OSQP: The Operator Splitting QP Solver. + +It vendors OSQP. + +License +------- + +Apache 2.0 + +Upstream Contact +---------------- + +https://pypi.org/project/osqp/ + diff --git a/build/pkgs/osqp/checksums.ini b/build/pkgs/osqp_python/checksums.ini similarity index 100% rename from build/pkgs/osqp/checksums.ini rename to build/pkgs/osqp_python/checksums.ini diff --git a/build/pkgs/osqp/dependencies b/build/pkgs/osqp_python/dependencies similarity index 100% rename from build/pkgs/osqp/dependencies rename to build/pkgs/osqp_python/dependencies diff --git a/build/pkgs/osqp/install-requires.txt b/build/pkgs/osqp_python/install-requires.txt similarity index 100% rename from build/pkgs/osqp/install-requires.txt rename to build/pkgs/osqp_python/install-requires.txt diff --git a/build/pkgs/osqp/package-version.txt b/build/pkgs/osqp_python/package-version.txt similarity index 100% rename from build/pkgs/osqp/package-version.txt rename to build/pkgs/osqp_python/package-version.txt diff --git a/build/pkgs/osqp/spkg-install.in b/build/pkgs/osqp_python/spkg-install.in similarity index 100% rename from build/pkgs/osqp/spkg-install.in rename to build/pkgs/osqp_python/spkg-install.in diff --git a/build/pkgs/osqp/type b/build/pkgs/osqp_python/type similarity index 100% rename from build/pkgs/osqp/type rename to build/pkgs/osqp_python/type diff --git a/build/pkgs/scs/SPKG.rst b/build/pkgs/scs/SPKG.rst index e98a19d199e..5d8430bfd6a 100644 --- a/build/pkgs/scs/SPKG.rst +++ b/build/pkgs/scs/SPKG.rst @@ -1,5 +1,5 @@ -scs: scs: splitting conic solver -================================ +scs: Splitting conic solver +=========================== Description ----------- From a4fc1d54575e31613a421093469e2187e41f8c9a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 30 Jul 2022 12:09:36 -0700 Subject: [PATCH 155/751] build/pkgs/ecos_python/dependencies: Add suitesparse --- build/pkgs/ecos_python/dependencies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/ecos_python/dependencies b/build/pkgs/ecos_python/dependencies index ecd3af7675b..ecda51b7d05 100644 --- a/build/pkgs/ecos_python/dependencies +++ b/build/pkgs/ecos_python/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) numpy scipy | $(PYTHON_TOOLCHAIN) +$(PYTHON) numpy scipy suitesparse | $(PYTHON_TOOLCHAIN) ---------- All lines of this file are ignored except the first. From dc9ed47753ea4da7be3a1d4bf769d9fde694dcc4 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 30 Jul 2022 12:09:58 -0700 Subject: [PATCH 156/751] build/pkgs/{ecos,osqp}_python: Use --no-build-isolation --- build/pkgs/ecos_python/spkg-install.in | 3 ++- build/pkgs/osqp_python/spkg-install.in | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build/pkgs/ecos_python/spkg-install.in b/build/pkgs/ecos_python/spkg-install.in index 37ac1a53437..a143d1eff96 100644 --- a/build/pkgs/ecos_python/spkg-install.in +++ b/build/pkgs/ecos_python/spkg-install.in @@ -1,2 +1,3 @@ cd src -sdh_pip_install . +# --no-build-isolation to ignore the numpy version pin in pyproject.toml +sdh_pip_install --no-build-isolation . diff --git a/build/pkgs/osqp_python/spkg-install.in b/build/pkgs/osqp_python/spkg-install.in index 37ac1a53437..a143d1eff96 100644 --- a/build/pkgs/osqp_python/spkg-install.in +++ b/build/pkgs/osqp_python/spkg-install.in @@ -1,2 +1,3 @@ cd src -sdh_pip_install . +# --no-build-isolation to ignore the numpy version pin in pyproject.toml +sdh_pip_install --no-build-isolation . From 532ab013a1875270c2f9bdcdd220ab39584587df Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 30 Jul 2022 13:26:47 -0700 Subject: [PATCH 157/751] src/sage/numerical/backends/cvxpy_backend.pyx: Make doctests pass --- src/sage/numerical/backends/cvxpy_backend.pyx | 55 +++++++++++-------- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/src/sage/numerical/backends/cvxpy_backend.pyx b/src/sage/numerical/backends/cvxpy_backend.pyx index d7651bd568b..6069a0d5adc 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pyx +++ b/src/sage/numerical/backends/cvxpy_backend.pyx @@ -163,6 +163,9 @@ cdef class CVXPYBackend: cpdef cvxpy_problem(self): return self.problem + def cvxpy_variables(self): + return self.variables + cpdef int add_variable(self, lower_bound=0, upper_bound=None, binary=False, continuous=True, integer=False, obj=None, name=None, coefficients=None) except -1: @@ -215,7 +218,7 @@ cdef class CVXPYBackend: sage: p.col_name(1) 'x' sage: p.objective_coefficient(1) - 1 + 1.0 """ cdef int vtype = int(binary) + int(continuous) + int(integer) if vtype == 0: @@ -224,9 +227,13 @@ cdef class CVXPYBackend: raise ValueError("Exactly one parameter of 'binary', 'integer' and 'continuous' must be 'True'.") for i in range(len(self.Matrix)): - self.Matrix[i].append(0) + self.Matrix[i].append(0.0) self.col_lower_bound.append(lower_bound) self.col_upper_bound.append(upper_bound) + if obj is None: + obj = 0.0 + else: + obj = float(obj) self.objective_coefficients.append(obj) if binary: @@ -245,7 +252,7 @@ cdef class CVXPYBackend: if not isinstance(constraints[i], Equality): raise NotImplementedError('adding coefficients to inequalities is ambiguous ' 'because cvxpy rewrites all inequalities as <=') - constraints[i] = type(constraints[i])(constraints[i].args[0] + v * variable, + constraints[i] = type(constraints[i])(constraints[i].args[0] + float(v) * variable, constraints[i].args[1]) self.problem = cvxpy.Problem(self.problem.objective, constraints) @@ -298,19 +305,20 @@ cdef class CVXPYBackend: sage: p = get_solver(solver="CVXPY") sage: p.add_variables(5) 4 + sage: index = p.nrows() sage: p.add_linear_constraint( zip(range(5), range(5)), 2, 2) - sage: p.row(0) + sage: p.row(index) ([1, 2, 3, 4], [1, 2, 3, 4]) - sage: p.row_bounds(0) + sage: p.row_bounds(index) (2, 2) sage: p.add_linear_constraint( zip(range(5), range(5)), 1, 1, name='foo') sage: p.row_name(1) - 'foo' + 'constraint_1' """ last = len(self.Matrix) self.Matrix.append([]) for i in range(len(self.objective_coefficients)): - self.Matrix[last].append(0) + self.Matrix[last].append(0.0) for a in coefficients: self.Matrix[last][a[0]] = a[1] @@ -362,6 +370,9 @@ cdef class CVXPYBackend: 0 sage: p.add_linear_constraints(5, 0, None) sage: p.add_col(list(range(5)), list(range(5))) + Traceback (most recent call last): + ... + NotImplementedError: adding coefficients to inequalities is ambiguous because cvxpy rewrites all inequalities as <= sage: p.nrows() 5 """ @@ -399,7 +410,7 @@ cdef class CVXPYBackend: if self.variables: expr = AddExpression([c * x for c, x in zip(coeff, self.variables)]) for i in range(len(coeff)): - self.objective_coefficients[i] = coeff[i] + self.objective_coefficients[i] = float(coeff[i]) else: expr = Constant(0) objective = type(self.problem.objective)(expr) @@ -454,9 +465,9 @@ cdef class CVXPYBackend: 0 sage: p.objective_coefficient(0) 0.0 - sage: p.objective_coefficient(0,2) + sage: p.objective_coefficient(0, 2) sage: p.objective_coefficient(0) - 2.0 + 2 """ if coeff is not None: self.objective_coefficients[variable] = coeff @@ -486,6 +497,9 @@ cdef class CVXPYBackend: sage: p = get_solver(solver="CVXPY") sage: p.add_linear_constraints(5, 0, None) sage: p.add_col(list(range(5)), list(range(5))) + Traceback (most recent call last): + ... + NotImplementedError: adding coefficients to inequalities is ambiguous because cvxpy rewrites all inequalities as <= sage: p.solve() 0 sage: p.objective_coefficient(0,1) @@ -656,10 +670,11 @@ cdef class CVXPYBackend: sage: p = get_solver(solver="CVXPY") sage: p.add_variables(5) 4 + sage: index = p.nrows() sage: p.add_linear_constraint(zip(range(5), range(5)), 2, 2) - sage: p.row(0) + sage: p.row(index) ([1, 2, 3, 4], [1, 2, 3, 4]) - sage: p.row_bounds(0) + sage: p.row_bounds(index) (2, 2) """ idx = [] @@ -690,10 +705,11 @@ cdef class CVXPYBackend: sage: p = get_solver(solver="CVXPY") sage: p.add_variables(5) 4 + sage: index = p.nrows() sage: p.add_linear_constraint(zip(range(5), range(5)), 2, 2) - sage: p.row(0) + sage: p.row(index) ([1, 2, 3, 4], [1, 2, 3, 4]) - sage: p.row_bounds(0) + sage: p.row_bounds(index) (2, 2) """ return (self.row_lower_bound[index], self.row_upper_bound[index]) @@ -726,7 +742,6 @@ cdef class CVXPYBackend: """ return (self.col_lower_bound[index], self.col_upper_bound[index]) - cpdef bint is_variable_binary(self, int index): """ Test whether the given variable is of binary type. @@ -803,10 +818,8 @@ cdef class CVXPYBackend: sage: from sage.numerical.backends.generic_backend import get_solver sage: p = get_solver(solver="CVXPY") sage: p.row_name(0) - 'Empty constraint 1' + 'constraint_0' """ - #if self.row_name_var[index] is not None: - # return self.row_name_var[index] return "constraint_" + repr(index) cpdef col_name(self, int index): @@ -827,11 +840,9 @@ cdef class CVXPYBackend: sage: p.add_variable() 0 sage: p.col_name(0) - 'I am a variable' + 'var458' """ - #if self.col_name_var[index] is not None: - # return self.col_name_var[index] - return "x_" + repr(index) + return self.variables[index].name() cpdef variable_upper_bound(self, int index, value = False): """ From 260eed0324ce8878344478030ecaea0bd19fc3df Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 30 Jul 2022 13:56:59 -0700 Subject: [PATCH 158/751] build/pkgs/cylp/spkg-install.in: Use --no-build-isolation --- build/pkgs/cylp/spkg-install.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/pkgs/cylp/spkg-install.in b/build/pkgs/cylp/spkg-install.in index 26ae9ae59f7..e840732a8e5 100644 --- a/build/pkgs/cylp/spkg-install.in +++ b/build/pkgs/cylp/spkg-install.in @@ -1,5 +1,5 @@ cd src -#export CYLP_USE_CYTHON=1 # use pkg-config to discover coin installation unset COIN_INSTALL_DIR -sdh_pip_install . +# --no-build-isolation to ignore the numpy version pin in pyproject.toml +sdh_pip_install --no-build-isolation . From e6803330a690cd3afdf4872988be82825cecb06b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 30 Jul 2022 14:12:11 -0700 Subject: [PATCH 159/751] src/sage/numerical/backends/cvxpy_backend.pyx: Store constraint names --- src/sage/numerical/backends/cvxpy_backend.pxd | 1 + src/sage/numerical/backends/cvxpy_backend.pyx | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/sage/numerical/backends/cvxpy_backend.pxd b/src/sage/numerical/backends/cvxpy_backend.pxd index c311f51b885..ed4d63ccc63 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pxd +++ b/src/sage/numerical/backends/cvxpy_backend.pxd @@ -13,6 +13,7 @@ cdef class CVXPYBackend(GenericBackend): cdef object variables cdef object problem cdef object prob_name + cdef object constraint_names cdef object _cvxpy_solver cdef object _cvxpy_solver_args diff --git a/src/sage/numerical/backends/cvxpy_backend.pyx b/src/sage/numerical/backends/cvxpy_backend.pyx index 6069a0d5adc..6c54e070d9c 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pyx +++ b/src/sage/numerical/backends/cvxpy_backend.pyx @@ -118,6 +118,7 @@ cdef class CVXPYBackend: self.set_verbosity(0) self.variables = [] + self.constraint_names = [] self.Matrix = [] self.row_lower_bound = [] self.row_upper_bound = [] @@ -151,6 +152,7 @@ cdef class CVXPYBackend: cdef CVXPYBackend cp = type(self)(base_ring=self.base_ring()) cp.problem = self.problem # it's considered immutable; so no need to copy. cp.variables = copy(self.variables) + cp.constraint_names = copy(self.constraint_names) cp.Matrix = [row[:] for row in self.Matrix] cp.row_lower_bound = self.row_lower_bound[:] cp.row_upper_bound = self.row_upper_bound[:] @@ -337,6 +339,7 @@ cdef class CVXPYBackend: constraints.append(lower_bound <= expr) elif upper_bound is not None: constraints.append(expr <= upper_bound) + self.constraint_names.append(name) self.problem = cvxpy.Problem(self.problem.objective, constraints) cpdef add_col(self, indices, coeffs): @@ -817,10 +820,11 @@ cdef class CVXPYBackend: sage: from sage.numerical.backends.generic_backend import get_solver sage: p = get_solver(solver="CVXPY") + sage: p.add_linear_constraint([], 2, 2) sage: p.row_name(0) 'constraint_0' """ - return "constraint_" + repr(index) + return self.constraint_names[index] or ("constraint_" + repr(index)) cpdef col_name(self, int index): """ @@ -840,7 +844,7 @@ cdef class CVXPYBackend: sage: p.add_variable() 0 sage: p.col_name(0) - 'var458' + 'var...' """ return self.variables[index].name() From 5c0291dd042a0f9d9b07000a41f387d1204b4fcb Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 30 Jul 2022 14:18:32 -0700 Subject: [PATCH 160/751] src/sage/numerical/backends/cvxpy_backend.pyx: Use our column names when no name is given --- src/sage/numerical/backends/cvxpy_backend.pyx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sage/numerical/backends/cvxpy_backend.pyx b/src/sage/numerical/backends/cvxpy_backend.pyx index 6c54e070d9c..da63c7445a3 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pyx +++ b/src/sage/numerical/backends/cvxpy_backend.pyx @@ -238,6 +238,9 @@ cdef class CVXPYBackend: obj = float(obj) self.objective_coefficients.append(obj) + if name is None: + name = f'x_{self.ncols()}' + if binary: variable = cvxpy.Variable(name=name, boolean=True) elif integer: @@ -844,7 +847,7 @@ cdef class CVXPYBackend: sage: p.add_variable() 0 sage: p.col_name(0) - 'var...' + 'x_0' """ return self.variables[index].name() From 2dd0c0679c032edc6db855105d2c34d19f992304 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 30 Jul 2022 14:21:27 -0700 Subject: [PATCH 161/751] src/sage/numerical/backends/cvxpy_backend.pyx: Convert lower, upper variable bounds to float --- src/sage/numerical/backends/cvxpy_backend.pyx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sage/numerical/backends/cvxpy_backend.pyx b/src/sage/numerical/backends/cvxpy_backend.pyx index da63c7445a3..a43eaa56c05 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pyx +++ b/src/sage/numerical/backends/cvxpy_backend.pyx @@ -230,7 +230,11 @@ cdef class CVXPYBackend: for i in range(len(self.Matrix)): self.Matrix[i].append(0.0) + if lower_bound is not None: + lower_bound = float(lower_bound) self.col_lower_bound.append(lower_bound) + if upper_bound is not None: + upper_bound = float(upper_bound) self.col_upper_bound.append(upper_bound) if obj is None: obj = 0.0 From 188a840c5c033af951804a8a462fa5617d490c80 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 30 Jul 2022 14:21:44 -0700 Subject: [PATCH 162/751] src/sage/combinat/matrices/dancing_links.pyx: Make doctest more flexible --- src/sage/combinat/matrices/dancing_links.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/combinat/matrices/dancing_links.pyx b/src/sage/combinat/matrices/dancing_links.pyx index 9b5ee82aa81..c468c83231f 100644 --- a/src/sage/combinat/matrices/dancing_links.pyx +++ b/src/sage/combinat/matrices/dancing_links.pyx @@ -1030,7 +1030,7 @@ cdef class dancing_linksWrapper: sage: d = dlx_solver(rows) sage: p,x = d.to_milp() sage: p - Boolean Program (no objective, 4 variables, 4 constraints) + Boolean Program (no objective, 4 variables, ... constraints) sage: x MIPVariable with 4 binary components @@ -1041,7 +1041,7 @@ cdef class dancing_linksWrapper: Maximization: - Constraints: + Constraints:... one 1 in 0-th column: 1.0 <= x_0 + x_1 <= 1.0 one 1 in 1-th column: 1.0 <= x_0 + x_2 <= 1.0 one 1 in 2-th column: 1.0 <= x_0 + x_1 <= 1.0 From 55fc4fbbcbaf437977a87b55829c406c7a6ffd02 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 5 Aug 2022 15:04:04 -0700 Subject: [PATCH 163/751] build/pkgs/{cvxpy,scs,osqp_python,ecos_python,qdldl_python}: Add distros/conda.txt --- build/pkgs/cvxpy/distros/conda.txt | 1 + build/pkgs/ecos_python/distros/conda.txt | 1 + build/pkgs/osqp_python/distros/conda.txt | 1 + build/pkgs/qdldl_python/distros/conda.txt | 1 + build/pkgs/scs/distros/conda.txt | 1 + 5 files changed, 5 insertions(+) create mode 100644 build/pkgs/cvxpy/distros/conda.txt create mode 100644 build/pkgs/ecos_python/distros/conda.txt create mode 100644 build/pkgs/osqp_python/distros/conda.txt create mode 100644 build/pkgs/qdldl_python/distros/conda.txt create mode 100644 build/pkgs/scs/distros/conda.txt diff --git a/build/pkgs/cvxpy/distros/conda.txt b/build/pkgs/cvxpy/distros/conda.txt new file mode 100644 index 00000000000..187142bb93e --- /dev/null +++ b/build/pkgs/cvxpy/distros/conda.txt @@ -0,0 +1 @@ +cvxpy diff --git a/build/pkgs/ecos_python/distros/conda.txt b/build/pkgs/ecos_python/distros/conda.txt new file mode 100644 index 00000000000..d75c5988ca8 --- /dev/null +++ b/build/pkgs/ecos_python/distros/conda.txt @@ -0,0 +1 @@ +ecos diff --git a/build/pkgs/osqp_python/distros/conda.txt b/build/pkgs/osqp_python/distros/conda.txt new file mode 100644 index 00000000000..c2c8a965707 --- /dev/null +++ b/build/pkgs/osqp_python/distros/conda.txt @@ -0,0 +1 @@ +osqp diff --git a/build/pkgs/qdldl_python/distros/conda.txt b/build/pkgs/qdldl_python/distros/conda.txt new file mode 100644 index 00000000000..a540df83800 --- /dev/null +++ b/build/pkgs/qdldl_python/distros/conda.txt @@ -0,0 +1 @@ +qdldl-python diff --git a/build/pkgs/scs/distros/conda.txt b/build/pkgs/scs/distros/conda.txt new file mode 100644 index 00000000000..846d47b8e24 --- /dev/null +++ b/build/pkgs/scs/distros/conda.txt @@ -0,0 +1 @@ +scs From 18e7434763226568a693d0702924bd47ab7c8b60 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 6 Aug 2022 05:39:33 -0700 Subject: [PATCH 164/751] build/pkgs/osqp_python/dependencies: Add cmake --- build/pkgs/osqp_python/dependencies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/osqp_python/dependencies b/build/pkgs/osqp_python/dependencies index 138a24dc010..4f344bba626 100644 --- a/build/pkgs/osqp_python/dependencies +++ b/build/pkgs/osqp_python/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) qdldl_python numpy scipy | $(PYTHON_TOOLCHAIN) +$(PYTHON) qdldl_python numpy scipy | $(PYTHON_TOOLCHAIN) cmake ---------- All lines of this file are ignored except the first. From 11e4de8d045ee27cfdb8439fe84f5a5de67d1fd9 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 6 Aug 2022 05:40:25 -0700 Subject: [PATCH 165/751] build/pkgs/ecos_python/dependencies: Remove suitesparse --- build/pkgs/ecos_python/dependencies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/ecos_python/dependencies b/build/pkgs/ecos_python/dependencies index ecda51b7d05..ecd3af7675b 100644 --- a/build/pkgs/ecos_python/dependencies +++ b/build/pkgs/ecos_python/dependencies @@ -1,4 +1,4 @@ -$(PYTHON) numpy scipy suitesparse | $(PYTHON_TOOLCHAIN) +$(PYTHON) numpy scipy | $(PYTHON_TOOLCHAIN) ---------- All lines of this file are ignored except the first. From 9a1eeec2c8cef1f1e7daf41e7b1f21aff92591e7 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 20 Sep 2022 12:42:33 -0700 Subject: [PATCH 166/751] build/pkgs/cylp/SPKG.rst: Add more detailed license info --- build/pkgs/cylp/SPKG.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build/pkgs/cylp/SPKG.rst b/build/pkgs/cylp/SPKG.rst index 1bb0c61738d..f7906322538 100644 --- a/build/pkgs/cylp/SPKG.rst +++ b/build/pkgs/cylp/SPKG.rst @@ -9,7 +9,11 @@ A Python interface for CLP, CBC, and CGL License ------- -Eclipse Public License +Eclipse Public License (EPL) version 2 (without a Secondary Licenses Notice). + +Note: This license is incompatible with the GPL according to +​https://www.gnu.org/licenses/license-list.html#EPL2; +see also the discussion in :trac:`26511`. Upstream Contact ---------------- From b9c92aec7237099e0b31120cc06bb3335c4e523c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 24 Sep 2022 15:42:01 -0700 Subject: [PATCH 167/751] src/sage/numerical/backends/cvxpy_backend.pyx: Add doc for init args --- src/sage/numerical/backends/cvxpy_backend.pyx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/sage/numerical/backends/cvxpy_backend.pyx b/src/sage/numerical/backends/cvxpy_backend.pyx index a43eaa56c05..a628dd5e79f 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pyx +++ b/src/sage/numerical/backends/cvxpy_backend.pyx @@ -93,6 +93,19 @@ cdef class CVXPYBackend: """ Cython constructor + INPUT: + + - ``maximization`` (boolean, default: ``True``) -- Whether this is a + maximization or minimization problem. + + - ``base_ring`` (optional): Must be ``RDF`` if provided. + + - ``cvxpy_solver (optional): Passed to :meth:`cvxpy.Problem.solve` as the + parameter ``solver``. + + - ``cvxpy_solver_args`` (optional dict): Passed to :meth:`cvxpy.Problem.solve` + as additional keyword arguments. + EXAMPLES:: sage: from sage.numerical.backends.generic_backend import get_solver From 5b840bddd970e89247a6f17625cdd59c959a2c69 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 24 Sep 2022 15:42:41 -0700 Subject: [PATCH 168/751] src/sage/numerical/backends: Remove unnecessary imports, muffle unused variable warnings --- src/sage/numerical/backends/cvxpy_backend.pyx | 3 +-- src/sage/numerical/backends/generic_backend.pyx | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/sage/numerical/backends/cvxpy_backend.pyx b/src/sage/numerical/backends/cvxpy_backend.pyx index a628dd5e79f..bf81ca6ae48 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pyx +++ b/src/sage/numerical/backends/cvxpy_backend.pyx @@ -124,8 +124,7 @@ cdef class CVXPYBackend: if cvxpy_solver.startswith("SCIPY/"): cvxpy_solver_args['scipy_options'] = {"method": cvxpy_solver[len("SCIPY/"):]} cvxpy_solver = "SCIPY" - import cvxpy as cp - cvxpy_solver = getattr(cp, cvxpy_solver) + cvxpy_solver = getattr(cvxpy, cvxpy_solver) self._cvxpy_solver = cvxpy_solver self._cvxpy_solver_args = cvxpy_solver_args diff --git a/src/sage/numerical/backends/generic_backend.pyx b/src/sage/numerical/backends/generic_backend.pyx index d709402b150..1a2217857d5 100644 --- a/src/sage/numerical/backends/generic_backend.pyx +++ b/src/sage/numerical/backends/generic_backend.pyx @@ -1651,6 +1651,7 @@ def default_mip_solver(solver=None): except ImportError: raise ValueError("CVXPY is not available. Please refer to the documentation to install it.") else: + assert CVXPYBackend default_solver = solver elif solver.startswith("Cvxpy"): @@ -1821,7 +1822,6 @@ cpdef GenericBackend get_solver(constraint_generation = False, solver = None, ba elif solver.startswith("Cvxpy"): from sage.numerical.backends.cvxpy_backend import CVXPYBackend - from functools import partial if solver == "Cvxpy": return CVXPYBackend() if solver.startswith("Cvxpy/"): From 7132302e349532f02a7eb174114c3dcac5808250 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 24 Sep 2022 15:46:15 -0700 Subject: [PATCH 169/751] src/sage/numerical/backends: Fix copy-pasted typos in documentation (binary/continuous/integer) --- src/sage/numerical/backends/cvxpy_backend.pyx | 4 ++-- src/sage/numerical/backends/generic_backend.pyx | 4 ++-- src/sage/numerical/backends/glpk_backend.pyx | 4 ++-- src/sage/numerical/backends/interactivelp_backend.pyx | 4 ++-- src/sage/numerical/backends/ppl_backend.pyx | 8 ++++---- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/sage/numerical/backends/cvxpy_backend.pyx b/src/sage/numerical/backends/cvxpy_backend.pyx index bf81ca6ae48..81bdef121ff 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pyx +++ b/src/sage/numerical/backends/cvxpy_backend.pyx @@ -199,9 +199,9 @@ cdef class CVXPYBackend: - ``binary`` - ``True`` if the variable is binary (default: ``False``). - - ``continuous`` - ``True`` if the variable is binary (default: ``True``). + - ``continuous`` - ``True`` if the variable is continuous (default: ``True``). - - ``integer`` - ``True`` if the variable is binary (default: ``False``). + - ``integer`` - ``True`` if the variable is integral (default: ``False``). - ``obj`` - (optional) coefficient of this variable in the objective function (default: 0) diff --git a/src/sage/numerical/backends/generic_backend.pyx b/src/sage/numerical/backends/generic_backend.pyx index 1a2217857d5..50b66bc8a7d 100644 --- a/src/sage/numerical/backends/generic_backend.pyx +++ b/src/sage/numerical/backends/generic_backend.pyx @@ -57,9 +57,9 @@ cdef class GenericBackend: - ``binary`` - ``True`` if the variable is binary (default: ``False``). - - ``continuous`` - ``True`` if the variable is binary (default: ``True``). + - ``continuous`` - ``True`` if the variable is continuous (default: ``True``). - - ``integer`` - ``True`` if the variable is binary (default: ``False``). + - ``integer`` - ``True`` if the variable is integral (default: ``False``). - ``obj`` - (optional) coefficient of this variable in the objective function (default: 0.0) diff --git a/src/sage/numerical/backends/glpk_backend.pyx b/src/sage/numerical/backends/glpk_backend.pyx index 58595389f3c..c42b1e95aa6 100644 --- a/src/sage/numerical/backends/glpk_backend.pyx +++ b/src/sage/numerical/backends/glpk_backend.pyx @@ -80,9 +80,9 @@ cdef class GLPKBackend(GenericBackend): - ``binary`` - ``True`` if the variable is binary (default: ``False``). - - ``continuous`` - ``True`` if the variable is binary (default: ``True``). + - ``continuous`` - ``True`` if the variable is continuous (default: ``True``). - - ``integer`` - ``True`` if the variable is binary (default: ``False``). + - ``integer`` - ``True`` if the variable is integral (default: ``False``). - ``obj`` - (optional) coefficient of this variable in the objective function (default: 0.0) diff --git a/src/sage/numerical/backends/interactivelp_backend.pyx b/src/sage/numerical/backends/interactivelp_backend.pyx index 89b823f2491..4a4e257596f 100644 --- a/src/sage/numerical/backends/interactivelp_backend.pyx +++ b/src/sage/numerical/backends/interactivelp_backend.pyx @@ -191,9 +191,9 @@ cdef class InteractiveLPBackend: - ``binary`` - ``True`` if the variable is binary (default: ``False``). - - ``continuous`` - ``True`` if the variable is binary (default: ``True``). + - ``continuous`` - ``True`` if the variable is continuous (default: ``True``). - - ``integer`` - ``True`` if the variable is binary (default: ``False``). + - ``integer`` - ``True`` if the variable is integral (default: ``False``). - ``obj`` - (optional) coefficient of this variable in the objective function (default: 0) diff --git a/src/sage/numerical/backends/ppl_backend.pyx b/src/sage/numerical/backends/ppl_backend.pyx index 9d59c226743..f4884fbe6b1 100644 --- a/src/sage/numerical/backends/ppl_backend.pyx +++ b/src/sage/numerical/backends/ppl_backend.pyx @@ -257,9 +257,9 @@ cdef class PPLBackend(GenericBackend): - ``binary`` -- ``True`` if the variable is binary (default: ``False``). - - ``continuous`` -- ``True`` if the variable is binary (default: ``True``). + - ``continuous`` -- ``True`` if the variable is continuous (default: ``True``). - - ``integer`` -- ``True`` if the variable is binary (default: ``False``). + - ``integer`` -- ``True`` if the variable is integral (default: ``False``). - ``obj`` -- (optional) coefficient of this variable in the objective function (default: 0) @@ -328,9 +328,9 @@ cdef class PPLBackend(GenericBackend): - ``binary`` -- ``True`` if the variable is binary (default: ``False``). - - ``continuous`` -- ``True`` if the variable is binary (default: ``True``). + - ``continuous`` -- ``True`` if the variable is continuous (default: ``True``). - - ``integer`` -- ``True`` if the variable is binary (default: ``False``). + - ``integer`` -- ``True`` if the variable is integral (default: ``False``). - ``obj`` -- (optional) coefficient of all variables in the objective function (default: 0) From b5cbc5acda3505f8aa31b53052d6b21391a35498 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 24 Sep 2022 16:27:08 -0700 Subject: [PATCH 170/751] src/sage/numerical/backends/cvxpy_backend.pyx: Add to doc --- src/sage/numerical/backends/cvxpy_backend.pyx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sage/numerical/backends/cvxpy_backend.pyx b/src/sage/numerical/backends/cvxpy_backend.pyx index 81bdef121ff..ade10d3a941 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pyx +++ b/src/sage/numerical/backends/cvxpy_backend.pyx @@ -290,6 +290,8 @@ cdef class CVXPYBackend: """ Set the log (verbosity) level + This is currently ignored. + INPUT: - ``level`` (integer) -- From 0 (no verbosity) to 3. From 83ce468ea3d852f4f3b1131c512d3380a82ab27b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 24 Sep 2022 20:12:39 -0700 Subject: [PATCH 171/751] build/pkgs/scs/spkg-install.in: Use --no-build-isolation --- build/pkgs/scs/spkg-install.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build/pkgs/scs/spkg-install.in b/build/pkgs/scs/spkg-install.in index 37ac1a53437..a143d1eff96 100644 --- a/build/pkgs/scs/spkg-install.in +++ b/build/pkgs/scs/spkg-install.in @@ -1,2 +1,3 @@ cd src -sdh_pip_install . +# --no-build-isolation to ignore the numpy version pin in pyproject.toml +sdh_pip_install --no-build-isolation . From 539c9705baef065d773f8a5349096679e6248e48 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 24 Sep 2022 20:15:06 -0700 Subject: [PATCH 172/751] src/sage/numerical/backends/cvxpy_backend.pyx: Update doctest output for bounds methods --- src/sage/numerical/backends/cvxpy_backend.pyx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/sage/numerical/backends/cvxpy_backend.pyx b/src/sage/numerical/backends/cvxpy_backend.pyx index ade10d3a941..f3f9da82c93 100644 --- a/src/sage/numerical/backends/cvxpy_backend.pyx +++ b/src/sage/numerical/backends/cvxpy_backend.pyx @@ -759,10 +759,10 @@ cdef class CVXPYBackend: sage: p.add_variable() 0 sage: p.col_bounds(0) - (0, None) + (0.0, None) sage: p.variable_upper_bound(0, 5) sage: p.col_bounds(0) - (0, 5) + (0.0, 5) """ return (self.col_lower_bound[index], self.col_upper_bound[index]) @@ -888,13 +888,13 @@ cdef class CVXPYBackend: sage: p.add_variable() 0 sage: p.col_bounds(0) - (0, None) + (0.0, None) sage: p.variable_upper_bound(0, 5) sage: p.col_bounds(0) - (0, 5) + (0.0, 5) sage: p.variable_upper_bound(0, None) sage: p.col_bounds(0) - (0, None) + (0.0, None) """ if value is not False: self.col_upper_bound[index] = value @@ -920,7 +920,7 @@ cdef class CVXPYBackend: sage: p.add_variable() 0 sage: p.col_bounds(0) - (0, None) + (0.0, None) sage: p.variable_lower_bound(0, 5) sage: p.col_bounds(0) (5, None) From 1e0cfc8989beebeeb4353344795ef47d0df10242 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 3 Oct 2022 11:28:47 +0200 Subject: [PATCH 173/751] (minor) Remove a blank line in DrinfeldModules --- src/sage/categories/drinfeld_modules.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index f222795f947..7df87ad55ef 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -193,7 +193,6 @@ class DrinfeldModules(Category_over_base): ... TypeError: function ring base must be a finite field """ - def __init__(self, base, name='t'): # Check input is a ring Morphism if not isinstance(base, RingHomomorphism): From e0b22d4d2d137e3dee9413ce36088eb6f637a779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 4 Oct 2022 19:11:56 +0200 Subject: [PATCH 174/751] (minor) Change Sage to SageMath in Drinfeld modules reference --- src/doc/en/reference/drinfeld_modules/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/en/reference/drinfeld_modules/index.rst b/src/doc/en/reference/drinfeld_modules/index.rst index 316f50cb830..d7485c9762e 100644 --- a/src/doc/en/reference/drinfeld_modules/index.rst +++ b/src/doc/en/reference/drinfeld_modules/index.rst @@ -1,7 +1,7 @@ Drinfeld modules ==================================== -Sage include facilities to manipulate Drinfeld modules and their morphisms. The +SageMath include facilities to manipulate Drinfeld modules and their morphisms. The main entry point is the class :class:`sage.rings.function_field.drinfeld_modules.drinfeld_module.DrinfeldModule`. From e9c99e843c73f06b53184bc21202f463affc4197 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 4 Oct 2022 16:44:57 +0200 Subject: [PATCH 175/751] (minor) Remove unused import --- src/sage/categories/drinfeld_modules.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 7df87ad55ef..9aec38e4347 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -20,7 +20,6 @@ from sage.categories.category_types import Category_over_base from sage.categories.homsets import Homsets -from sage.misc.cachefunc import cached_method from sage.misc.functional import log from sage.misc.latex import latex from sage.rings.integer import Integer From a687972e1158c18330edf577fbed2bf484531b84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Wed, 5 Oct 2022 11:12:46 +0200 Subject: [PATCH 176/751] (minor) Remove useless comment --- src/sage/categories/drinfeld_modules.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 9aec38e4347..8c20fbdaea0 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -466,7 +466,6 @@ def random_object(self, rank): def super_categories(self): return [] - # Somehow required for the class definition class ParentMethods: def base(self): From 15df1104c93a76642889d1eb57081320760bfda3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 3 Oct 2022 11:30:14 +0200 Subject: [PATCH 177/751] (fix) Address first part of ticket 33713 comment 123 Thank you David. All suggestions of comment 123 were addressed. The last one, concerning non finite Drinfeld modules in doctesting is for another commit. In particular, the `if` statement (cf. comment) was removed. --- .../drinfeld_modules/drinfeld_module.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index dc3bfaa5944..f5d3b977f21 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -60,7 +60,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): morphism `\phi: \Fq[X] \to K\{\tau\}` such that: 1. The image of `\phi` contains non-constant Ore polynomials. - 2. For every element `a` in the function ring, the constant + 2. For every element `a` in the `\Fq[X]`, the constant coefficient `\phi(a)` is `\gamma(a)`. For `a` in the function ring, `\phi(a)` is denoted `\phi_a`. @@ -202,7 +202,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): To: Finite Field in z of size 3^12 Defn: X |--> z^10 + 2*z^9 + z^8 + z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z - Drinfeld modules `\phi` and `\rho` have different based. That of + Drinfeld modules `\phi` and `\rho` have different bases. That of `\phi` is surjective while that of `\rho` is note:: sage: rho.category().base() @@ -427,7 +427,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): .. NOTE:: - In this implementation, `L` is `L`. + In this implementation, `L` is `K`. sage: action = phi.action() sage: action @@ -517,9 +517,6 @@ def __classcall_private__(cls, function_ring, gen, name='t'): category = DrinfeldModules(base, name=name) # Check gen as Ore polynomial - if ore_polring is not None and \ - ore_polring != category.ore_polring(): - raise ValueError(f'generator must lie in {category.ore_polring()}') ore_polring = category.ore_polring() # Sanity cast gen = ore_polring(gen) if gen.degree() <= 0: @@ -709,7 +706,7 @@ def action(self): def coefficient(self, n): r""" - Return the n-th coefficient of the generator. + Return the `n`-th coefficient of the generator. INPUT: @@ -1091,7 +1088,7 @@ def rank(self): sage: rho.rank() 4 """ - return self.gen().degree() + return self._gen.degree() def velu(self, isog): r""" From f55ebfe55d9d02fbdc93cce53cc746e2673df3c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 3 Oct 2022 18:23:29 +0200 Subject: [PATCH 178/751] Emphasis on K infinite in DrinfeldModule docstring In the DrinfeldModule doctest, emphasis that the field K can be any extension of Fq. See ticket 33713, comment 123. --- .../drinfeld_modules/drinfeld_module.py | 123 +++++++++--------- 1 file changed, 61 insertions(+), 62 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index f5d3b977f21..f193f805a29 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -43,13 +43,14 @@ class DrinfeldModule(Parent, UniqueRepresentation): Let `\Fq[X]` be a polynomial ring with coefficients in a finite field `\Fq` and let `K` be a field. We fix a ring morphism `\gamma: \Fq[X] \to K`, which we call the *base* of the Drinfeld module. - Please note that the base is not a ring; in particular, it is - not the field `K`. We also call `K` an *`\Fq[X]`-field*. .. NOTE:: + The base is not a ring. Specifically, it is not the field `K`. We say + however that `K` is an *`\Fq[X]`-field*. + The base of the Drinfeld module is the base of the category of - the Drinfeld module. + the Drinfeld module. The monic polynomial that generates the kernel of the base is called the *`\Fq[X]`-characteristic of the `\Fq[X]`-field `K`*. @@ -66,14 +67,42 @@ class DrinfeldModule(Parent, UniqueRepresentation): For `a` in the function ring, `\phi(a)` is denoted `\phi_a`. The Drinfeld module `\phi` is uniquely determined by the image - `\phi_X` of `X`, which is an input of the class. + `\phi_X` of `X`. This serves as input of the class. + + Despite an emphasis on the finite case, the base codomain can be any + extension of the field `\Fq`:: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: phi = DrinfeldModule(FqX, [z, 4, 1]) + sage: phi + Drinfeld module defined by X |--> t^2 + 4*t + z over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + To: Finite Field in z of size 5^12 + Defn: X |--> z + + sage: Fq = GF(49) + sage: FqX. = Fq[] + sage: K. = Frac(FqX) + sage: phi = DrinfeldModule(FqX, [z, X+1]) + sage: phi + Drinfeld module defined by X |--> (X + 1)*t + X over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 7^2 + To: Fraction Field of Univariate Polynomial Ring in X over Finite Field in z2 of size 7^2 + Defn: X |--> X + + .. NOTE:: + + In the first case, the Drinfeld module is said to be *finite*. See + :class:`sage.rings.function_field.drinfeld_modules.finite_drinfeld_module`. We say that `\Fq[X]` is the *function ring of `\phi`*; *K\{\tau\}* is the *Ore polynomial ring of `\phi`*. Further, the *generator of `\phi`* is `\phi_X` and its *constant coefficient* is the constant coefficient of `\phi_X`. The `\Fq[X]`-characteristic of the `\Fq[X]`-field `K` can also be referred to as its *function - ring-characteristic*. Finally, `K` is just refered to as the + ring-characteristic*. Finally, `K` is just referred to as the codomain base. Classical references on Drinfeld modules include [Gos1998]_, @@ -98,7 +127,8 @@ class DrinfeldModule(Parent, UniqueRepresentation): .. RUBRIC:: Construction - A Drinfeld module object is constructed as follows:: + A Drinfeld module object is constructed by precising the function + ring and the generator:: sage: Fq. = GF(3^2) sage: FqX. = Fq[] @@ -110,20 +140,34 @@ class DrinfeldModule(Parent, UniqueRepresentation): To: Finite Field in z of size 3^12 Defn: X |--> z - In this example, we used a list of coefficients (``[z, 1, 1]``) to - represent the generator `\phi_X = z + t + t^2`, `K = \Fq(z)`. One can - also use regular Ore polynomials:: + The above Drinfeld module is finite; it can also be infinite:: + + sage: L = Frac(FqX) + sage: psi = DrinfeldModule(FqX, [L(X), 1, X^3 + X + 1]) + sage: psi + Drinfeld module defined by X |--> (X^3 + X + 1)*t^2 + t + X over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + To: Fraction Field of Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + Defn: X |--> X + sage: phi.is_finite() + True + sage: psi.is_finite() + False + + In those examples, we used a list of coefficients (``[z, 1, 1]``) to + represent the generator `\phi_X = z + t + t^2`. One can also use + regular Ore polynomials:: sage: ore_polring = phi.ore_polring() sage: t = phi.ore_polring().gen() - sage: psi_X = z + t^3 - sage: psi = DrinfeldModule(FqX, psi_X) - sage: psi + sage: rho_X = z + t^3 + sage: rho = DrinfeldModule(FqX, rho_X) + sage: rho Drinfeld module defined by X |--> t^3 + z over base Ring morphism: From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 To: Finite Field in z of size 3^12 Defn: X |--> z - sage: psi(X) == psi_X + sage: rho(X) == rho_X True The generator must have positive degree:: @@ -185,51 +229,6 @@ class DrinfeldModule(Parent, UniqueRepresentation): deduced from the generator, and we omit the base in the input of the class for conciseness. - .. RUBRIC:: Possible bases - - The base does not need be surjective like in the above examples. In - the following example, the base codomain is still a degree six - extension of `\Fq`, but the base is a projection over a degree two - extension with modulus `X^3 + (z_2 + 2)X^2 + (6*z_2 + 1)X + 3z_2 + - 5`:: - - sage: p = X^2 + z2 + 2 - sage: p_root = z^10 + 2*z^9 + z^8 + z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z - sage: rho = DrinfeldModule(FqX, [p_root, 1, 1]) - sage: rho - Drinfeld module defined by X |--> t^2 + t + z^10 + 2*z^9 + z^8 + z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - To: Finite Field in z of size 3^12 - Defn: X |--> z^10 + 2*z^9 + z^8 + z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z - - Drinfeld modules `\phi` and `\rho` have different bases. That of - `\phi` is surjective while that of `\rho` is note:: - - sage: rho.category().base() - Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - To: Finite Field in z of size 3^12 - Defn: X |--> z^10 + 2*z^9 + z^8 + z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z - sage: phi.category().base() - Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - To: Finite Field in z of size 3^12 - Defn: X |--> z - - Note that ``phi`` and ``psi`` are *finite* Drinfeld modules, in the - sense that `K` is finite. But `K` can be infinite:: - - sage: sigma = DrinfeldModule(FqX, [Frac(FqX).gen(), 1, 1]) - sage: sigma - Drinfeld module defined by X |--> t^2 + t + X over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - To: Fraction Field of Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - Defn: X |--> X - sage: sigma.is_finite() - False - sage: phi.is_finite() - True - .. RUBRIC:: The category of Drinfeld modules Drinfeld modules have their own category (see class @@ -241,9 +240,9 @@ class DrinfeldModule(Parent, UniqueRepresentation): To: Finite Field in z of size 3^12 Defn: X |--> z sage: phi.category() is psi.category() - True - sage: phi.category() is sigma.category() False + sage: phi.category() is rho.category() + True This category holds crucial information, like the function ring-characteristic of the base:: @@ -334,11 +333,11 @@ class DrinfeldModule(Parent, UniqueRepresentation): True sage: t^5 + 2*t^3 + 1 in Hom(phi, phi) False - sage: 1 in Hom(phi, psi) + sage: 1 in Hom(phi, rho) False sage: 1 in Hom(phi, phi) True - sage: 0 in Hom(phi, psi) + sage: 0 in Hom(phi, rho) True To create a SageMath object representing the morphism, call the From a207fdd64ed4fcd964f72e1f73d9c7e8733dba35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 3 Oct 2022 19:13:23 +0200 Subject: [PATCH 179/751] Add 100% doctest coverage Thank you Travis, see ticket 33713, comment 259. I added docstrings and doctests for the following methods: - DrinfeldModule.__classcall_private__ - DrinfeldModule.__init__ - DrinfeldModule._check_rank_two - FiniteDrinfeldModule.__init__ - DrinfeldModuleAction.__init__ - DrinfeldModuleHomset.__init__ - DrinfeldModuleMorphism.__init__ - DrinfeldModuleMorphism.__classcall_private__ - DrinfeldModules.__init__ - DrinfeldModules.Homsets - DrinfeldModules.Endsets - DrinfeldModules.super_categories --- src/sage/categories/drinfeld_modules.py | 82 +++++++++++++++++-- .../function_field/drinfeld_modules/action.py | 17 ++++ .../drinfeld_modules/drinfeld_module.py | 78 ++++++++++++++++++ .../finite_drinfeld_module.py | 26 ++++++ .../function_field/drinfeld_modules/homset.py | 39 +++++++++ .../drinfeld_modules/morphism.py | 62 ++++++++++++++ 6 files changed, 299 insertions(+), 5 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 8c20fbdaea0..89ae3e4bf2c 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -56,7 +56,7 @@ class DrinfeldModules(Category_over_base): be referred to as its *function ring-characteristic*. Finally, `K` is just refered to as the codomain base. - INPUT: the base, a ring morphism + INPUT: the base ring morphism .. RUBRIC:: Construction @@ -193,6 +193,36 @@ class DrinfeldModules(Category_over_base): TypeError: function ring base must be a finite field """ def __init__(self, base, name='t'): + r""" + Initialize `self`. + + INPUT: + + - ``base`` -- the base ring morphism + - ``name`` (default: `'t'`) -- the name of the Ore polynomial + ring generator + + TESTS:: + + sage: Fq = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(4) + sage: p_root = z^3 + 7*z^2 + 6*z + 10 + sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: cat = phi.category() + sage: ore_polring. = OrePolynomialRing(K, K.frobenius_endomorphism()) + sage: cat._ore_polring is ore_polring + True + sage: base = Hom(FqX, K)(p_root) + sage: cat._base == base + True + sage: cat._function_ring is FqX + True + sage: cat._constant_coefficient == base(X) + True + sage: cat._characteristic(cat._constant_coefficient) + 0 + """ # Check input is a ring Morphism if not isinstance(base, RingHomomorphism): raise TypeError('input must be a Ring morphism') @@ -281,12 +311,44 @@ def _repr_(self): """ return f'Category of Drinfeld modules defined over base {self._base}' - # Somehow required for the class definition def Homsets(self): + r""" + Return the category of homsets. + + OUTPUT: the category of homsets + + EXAMPLE:: + + sage: Fq = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(4) + sage: p_root = z^3 + 7*z^2 + 6*z + 10 + sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: cat = phi.category() + sage: from sage.categories.homsets import Homsets + sage: cat.Homsets() is Homsets() + True + """ return Homsets() - # Somehow required for the class definition def Endsets(self): + r""" + Return the category of endsets. + + OUTPUT: the category of endsets + + EXAMPLE:: + + sage: Fq = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(4) + sage: p_root = z^3 + 7*z^2 + 6*z + 10 + sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: cat = phi.category() + sage: from sage.categories.homsets import Endsets + sage: cat.Endsets() is Endsets() + True + """ return Homsets() def characteristic(self): @@ -461,9 +523,19 @@ def random_object(self, rank): return self.object(coeffs) - # Somehow required for the class definition - @cached_method def super_categories(self): + """ + EXAMPLES:: + + sage: Fq = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(4) + sage: p_root = z^3 + 7*z^2 + 6*z + 10 + sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: cat = phi.category() + sage: cat.super_categories() + [] + """ return [] class ParentMethods: diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index b3c1b8a8c5d..0c85caea7bf 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -75,6 +75,23 @@ class DrinfeldModuleAction(Action): """ def __init__(self, drinfeld_module): + """ + Initialize `self`. + + INPUT: the Drinfeld module + + TESTS: + + sage: Fq. = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(2) + sage: phi = DrinfeldModule(FqX, [z, 0, 0, 1]) + sage: action = phi.action() + sage: action._drinfeld_module is phi + True + sage: action._field is phi.base().codomain() + True + """ if not isinstance(drinfeld_module, DrinfeldModule): raise TypeError('input must be a DrinfeldModule') self._drinfeld_module = drinfeld_module diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index f193f805a29..c4992558db6 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -475,6 +475,36 @@ class DrinfeldModule(Parent, UniqueRepresentation): @staticmethod def __classcall_private__(cls, function_ring, gen, name='t'): + """ + Check input validity and return a `DrinfeldModule` or + `FiniteDrinfeldModule` object accordingly. + + INPUT: + + - ``function_ring`` -- a univariate polynomial ring whose base + is a finite field + - ``gen`` -- the generator of the Drinfeld module; as a list of + coefficients or an Ore polynomial + - ``name`` (optional) -- the name of the Ore polynomial ring gen + + OUTPUT: a DrinfeldModule or FiniteDrinfeldModule + + TESTS: + + sage: from sage.rings.function_field.drinfeld_modules.finite_drinfeld_module import FiniteDrinfeldModule + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: isinstance(phi, FiniteDrinfeldModule) + True + + sage: K = Frac(FqX) + sage: phi = DrinfeldModule(FqX, [K(X), 1]) + sage: isinstance(psi, FiniteDrinfeldModule) + False + """ # FIXME: function_ring must be checked before calling base_ring # on it. But then it is checked twice: firstly here, secondly in @@ -528,6 +558,40 @@ def __classcall_private__(cls, function_ring, gen, name='t'): return cls.__classcall__(cls, gen, category) def __init__(self, gen, category): + """ + Initialize `self`. + + Validity of the input is checked in `__classcall_private__`. The + `__init__` just saves attributes. + + INPUT: + + - ``function_ring`` -- a univariate polynomial ring whose base + is a finite field + - ``gen`` -- the generator of the Drinfeld module; as a list of + coefficients or an Ore polynomial + - ``name`` (optional) -- the name of the Ore polynomial ring gen + + TESTS: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: gen = [p_root, z12^3, z12^5] + sage: phi = DrinfeldModule(FqX, gen) + sage: ore_polring = phi.ore_polring() + sage: phi._base == phi.category().base() + True + sage: phi._function_ring == FqX + True + sage: phi._gen == ore_polring(gen) + True + sage: phi._ore_polring == ore_polring + True + sage: phi._morphism == Hom(FqX, ore_polring)(phi._gen) + True + """ self._base = category.base() self._function_ring = category.function_ring() self._gen = gen @@ -614,6 +678,20 @@ def _Hom_(self, other, category): def _check_rank_two(self): r""" Raise ``NotImplementedError`` if the rank is not two. + + TESTS: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi._check_rank_two() + sage: phi = DrinfeldModule(FqX, [p_root, 1]) + sage: phi._check_rank_two() + Traceback (most recent call last): + ... + NotImplementedError: rank must be 2 """ if self.rank() != 2: raise NotImplementedError('rank must be 2') diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 1b51ed079ad..1044fc4a618 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -102,6 +102,32 @@ class FiniteDrinfeldModule(DrinfeldModule): """ def __init__(self, gen, category): + """ + Initialize `self`. + + Validity of the input is checked in `__classcall_private__`. The + `__init__` just saves attributes. + + INPUT: + + - ``function_ring`` -- a univariate polynomial ring whose base + is a finite field + - ``gen`` -- the generator of the Drinfeld module; as a list of + coefficients or an Ore polynomial + - ``name`` (optional) -- the name of the Ore polynomial ring gen + + TESTS: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: gen = [p_root, z12^3, z12^5] + sage: phi = DrinfeldModule(FqX, gen) + sage: ore_polring = phi.ore_polring() + sage: phi._gen == ore_polring(gen) + True + """ # NOTE: There used to be no __init__ here (which was fine). I # added one to ensure that FiniteDrinfeldModule would always diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index 1b8f0004e1b..51b69fab180 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -59,6 +59,21 @@ class DrinfeldModuleHomset(Homset): sage: end is Hom(phi, phi) True + The domain and codomain must have the same Drinfeld modules + category:: + + sage: rho = DrinfeldModule(FqX, [Frac(FqX)(X), 1]) + sage: Hom(phi, rho) + Traceback (most recent call last): + ... + ValueError: Drinfeld modules must be in the same category + + sage: sigma = DrinfeldModule(FqX, [1, z6, 2]) + sage: Hom(phi, sigma) + Traceback (most recent call last): + ... + ValueError: Drinfeld modules must be in the same category + One can create morphism objects by calling the homset:: sage: t = phi.ore_polring().gen() @@ -115,6 +130,30 @@ class DrinfeldModuleHomset(Homset): __contains__ = Parent.__contains__ def __init__(self, X, Y, category=None, check=True): + """ + Initialize `self`. + + INPUT: + + - ``X`` -- the domain of the homset + - ``Y`` -- the codomain of the homset + - ``category`` (default: None) -- the Drinfeld modules category of + the domain and codomain + - ``check`` (default: True) -- check the validity of the category + + TESTS:: + + sage: Fq = GF(27) + sage: FqX. = Fq[] + sage: K. = Fq.extension(2) + sage: phi = DrinfeldModule(FqX, [z6, z6, 2]) + sage: psi = DrinfeldModule(FqX, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) + sage: hom = Hom(phi, psi) + sage: hom.domain() is phi + True + sage: hom.codomain() is psi + True + """ if category is None: category = X.category() if check: diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index c96ca7b438d..4f8fd2fa1e7 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -54,6 +54,13 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, To (gen): (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 Defn: t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 + The input Ore polynomial must indeed define a morphism:: + + sage: morphism = Hom(phi, psi)(1) + Traceback (most recent call last): + ... + ValueError: Ore polynomial does not define a morphism + We can get basic data on the morphism:: sage: morphism.domain() @@ -115,6 +122,36 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, @staticmethod def __classcall_private__(cls, parent, x): + """ + Create the morphism. + + INPUT: + + - ``cls`` -- DrinfeldModuleMorphism + - ``parent`` -- The Drinfeld module homset + - ``x`` -- the Ore polynomial defining the morphism or a + DrinfeldModuleMorphism + + OUTPUT: the morphism object + + TESTS:: + + sage: Fq = GF(2) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) + sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) + sage: t = phi.ore_polring().gen() + sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) + sage: morphism is Hom(phi, psi)(morphism) + True + + sage: from sage.rings.function_field.drinfeld_modules.morphism import DrinfeldModuleMorphism + sage: morphism = DrinfeldModuleMorphism(Sets(), t + 1) + Traceback (most recent call last): + ... + TypeError: parent should be a DrinfeldModuleHomset + """ from sage.rings.function_field.drinfeld_modules.homset import DrinfeldModuleHomset if not isinstance(parent, DrinfeldModuleHomset): raise TypeError('parent should be a DrinfeldModuleHomset') @@ -132,6 +169,31 @@ def __classcall_private__(cls, parent, x): return cls.__classcall__(cls, parent, ore_pol) def __init__(self, parent, ore_pol): + r""" + Initialize `self`. + + INPUT: + + - ``parent`` -- The Drinfeld module homset + - ``ore_pol`` -- The Ore polynomial that defines the morphism + + TESTS:: + + sage: Fq = GF(2) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) + sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) + sage: t = phi.ore_polring().gen() + sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) + sage: morphism._domain is phi + True + sage: morphism._codomain is psi + True + sage: morphism._ore_polynomial == t + z6^5 + z6^2 + 1 + True + """ + super().__init__(parent) self._domain = parent.domain() self._codomain = parent.codomain() From e042ae219c56574cef4ac7a9deb663fc8ba270b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 4 Oct 2022 11:11:13 +0200 Subject: [PATCH 180/751] State that the code is for Drinfeld Fq[X]-modules in DrinfeldModule docstring --- .../function_field/drinfeld_modules/drinfeld_module.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index c4992558db6..592a3f9c4c4 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -38,7 +38,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): r""" - This class represents a Drinfeld module. + This class represents a Drinfeld `\Fq[X]`-module. Let `\Fq[X]` be a polynomial ring with coefficients in a finite field `\Fq` and let `K` be a field. We fix a ring morphism `\gamma: @@ -66,8 +66,8 @@ class DrinfeldModule(Parent, UniqueRepresentation): For `a` in the function ring, `\phi(a)` is denoted `\phi_a`. - The Drinfeld module `\phi` is uniquely determined by the image - `\phi_X` of `X`. This serves as input of the class. + The Drinfeld `\Fq[X]`-module `\phi` is uniquely determined by the + image `\phi_X` of `X`. This serves as input of the class. Despite an emphasis on the finite case, the base codomain can be any extension of the field `\Fq`:: From 89fa35188ec3a89ac332ac7f7a27f8bb774c6f2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 4 Oct 2022 13:58:59 +0200 Subject: [PATCH 181/751] (fix) Change a NotImplementedError to ValueError in DrinfeldModuleHomset --- src/sage/rings/function_field/drinfeld_modules/homset.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index 51b69fab180..7eed56a5326 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -159,10 +159,10 @@ def __init__(self, X, Y, category=None, check=True): if check: if X.category() != Y.category() \ or not isinstance(X.category(), DrinfeldModules): - raise NotImplementedError('Drinfeld modules must be in the ' - 'same category') + raise ValueError('Drinfeld modules must be in the same ' + 'category') if category != X.category(): - raise NotImplementedError('category should be DrinfeldModules') + raise ValueError('category should be DrinfeldModules') base = category.base() super().__init__(X, Y, category=category, base=base, check=check) From e0846a39cfddc8abe13912c692d5a3b674c04132 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 4 Oct 2022 14:03:16 +0200 Subject: [PATCH 182/751] (fix) In INPUT docstring fields, change `default` to `optional: ...` --- src/sage/rings/function_field/drinfeld_modules/action.py | 2 +- .../function_field/drinfeld_modules/drinfeld_module.py | 8 +++++--- .../drinfeld_modules/finite_drinfeld_module.py | 7 +++---- .../rings/function_field/drinfeld_modules/morphism.py | 6 +++--- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index 0c85caea7bf..911fd11a26c 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -40,7 +40,7 @@ class DrinfeldModuleAction(Action): The action is instantiated as follows. Note that the user should never explicitly instantiate the class `DrinfeldModuleAction`:: - INPUT: a Drinfeld module + INPUT: the Drinfeld module EXAMPLES: diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 592a3f9c4c4..fe8dbb0b5a7 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -123,7 +123,8 @@ class DrinfeldModule(Parent, UniqueRepresentation): finite field - ``gen`` -- the generator of the Drinfeld module; as a list of coefficients or an Ore polynomial - - ``name`` (optional) -- the name of the Ore polynomial ring gen + - ``name`` (default: `'t'`) -- the name of the Ore polynomial ring + generator .. RUBRIC:: Construction @@ -485,7 +486,8 @@ def __classcall_private__(cls, function_ring, gen, name='t'): is a finite field - ``gen`` -- the generator of the Drinfeld module; as a list of coefficients or an Ore polynomial - - ``name`` (optional) -- the name of the Ore polynomial ring gen + - ``name`` (default: `'t'`) -- the name of the Ore polynomial + ring gen OUTPUT: a DrinfeldModule or FiniteDrinfeldModule @@ -570,7 +572,7 @@ def __init__(self, gen, category): is a finite field - ``gen`` -- the generator of the Drinfeld module; as a list of coefficients or an Ore polynomial - - ``name`` (optional) -- the name of the Ore polynomial ring gen + - ``name`` (default: `'t'`) -- the name of the Ore polynomial ring gen TESTS: diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 1044fc4a618..1ef152573d1 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -114,7 +114,8 @@ def __init__(self, gen, category): is a finite field - ``gen`` -- the generator of the Drinfeld module; as a list of coefficients or an Ore polynomial - - ``name`` (optional) -- the name of the Ore polynomial ring gen + - ``name`` (default: `'t'`) -- the name of the Ore polynomial + ring gen TESTS: @@ -194,9 +195,7 @@ def frobenius_charpoly(self, var='T'): Note that the *Frobenius trace* is defined as `A(X)` and the *Frobenius norm* is defined as `B(X)`. - INPUT: - - - ``var`` -- (optional) the name of the second variable + INPUT: (default: `'T'`) the name of the second variable OUTPUT: an univariate polynomial with coefficients in the function ring diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 4f8fd2fa1e7..d0acab5b98a 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -128,7 +128,7 @@ def __classcall_private__(cls, parent, x): INPUT: - ``cls`` -- DrinfeldModuleMorphism - - ``parent`` -- The Drinfeld module homset + - ``parent`` -- the Drinfeld module homset - ``x`` -- the Ore polynomial defining the morphism or a DrinfeldModuleMorphism @@ -174,8 +174,8 @@ def __init__(self, parent, ore_pol): INPUT: - - ``parent`` -- The Drinfeld module homset - - ``ore_pol`` -- The Ore polynomial that defines the morphism + - ``parent`` -- the Drinfeld module homset + - ``ore_pol`` -- the Ore polynomial that defines the morphism TESTS:: From f71aff4637d5e3546bfe529c72d76d25c6ea88ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 4 Oct 2022 15:29:39 +0200 Subject: [PATCH 183/751] (fix) Move base_ring from DrinfeldModules.ParentMethods to DrinfeldModule This is because calling `phi.base_ring()` used to call the `base_ring` method of `CategoryObject` and not the one defined in `DrinfeldModules.ParentMethod`. This works, but any better solution would be welcome. --- src/sage/categories/drinfeld_modules.py | 22 ++++++++--------- .../drinfeld_modules/drinfeld_module.py | 24 +++++++++++++++++++ 2 files changed, 34 insertions(+), 12 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 89ae3e4bf2c..c6f5ace355d 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -596,18 +596,6 @@ def base(self): """ return self.category().base() - def base_ring(self): - r""" - Raise an exception. - - The base of a Drinfeld module is a ring morphism, not a ring. - - This method is implemented in CategoryObjects, of which - Parent inherits. It returns the base of the category. I - overloaded it to avoid confusion. - """ - raise TypeError('the base of a Drinfeld module is a morphism') - def characteristic(self): r""" Return the function ring-characteristic. @@ -728,3 +716,13 @@ def ore_polring(self): True """ return self.category().ore_polring() + + # FIXME + # The parent method `base_ring` is defined not here, as it + # should be, but in `DrinfeldModule`. + # + # This is because calling `phi.base_ring()` calls the + # `base_ring` method of `CategoryObject` and not the one defined + # here. + # + # This works, but any better solution would be welcome. diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index fe8dbb0b5a7..74a6444c6ef 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -602,6 +602,30 @@ def __init__(self, gen, category): self._Fq = self._function_ring.base_ring() # Must be last super().__init__(base=self._base, category=category) + def base_ring(self): + r""" + Raise an exception. + + The base of a Drinfeld module is a ring morphism, not a ring. + + This method is implemented in CategoryObjects, of which + Parent inherits. It returns the base of the category. I + overloaded it to avoid confusion. + + TESTS:: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi.base_ring() + Traceback (most recent call last): + ... + AttributeError: the base of a Drinfeld module is a morphism + """ + raise AttributeError('the base of a Drinfeld module is a morphism') + def __call__(self, a): r""" Return the image of ``a`` by the morphism that defines the From bf5a4a44e64ffb48a7d24fe487a7bd36dcf9b82d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 4 Oct 2022 16:45:47 +0200 Subject: [PATCH 184/751] (fix) Replace TESTS: by TESTS:: and EXAMPLES: by EXAMPLES:: This was the cause for `make doc` errors. --- src/sage/categories/drinfeld_modules.py | 32 +++++++-------- .../function_field/drinfeld_modules/action.py | 12 +++--- .../drinfeld_modules/drinfeld_module.py | 40 +++++++++---------- .../finite_drinfeld_module.py | 14 +++---- .../function_field/drinfeld_modules/homset.py | 10 ++--- .../drinfeld_modules/morphism.py | 14 ++++--- 6 files changed, 62 insertions(+), 60 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index c6f5ace355d..4212e6b063c 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -159,7 +159,7 @@ class DrinfeldModules(Category_over_base): sage: rho.category() is cat True - TESTS: + TESTS:: sage: Fq = GF(11) sage: FqX. = Fq[] @@ -270,7 +270,7 @@ def _latex_(self): OUTPUT: a string - EXAMPLE: + EXAMPLES:: sage: Fq = GF(11) sage: FqX. = Fq[] @@ -295,7 +295,7 @@ def _repr_(self): OUTPUT: a string - EXAMPLE: + EXAMPLES:: sage: Fq = GF(11) sage: FqX. = Fq[] @@ -317,7 +317,7 @@ def Homsets(self): OUTPUT: the category of homsets - EXAMPLE:: + EXAMPLES:: sage: Fq = GF(11) sage: FqX. = Fq[] @@ -337,7 +337,7 @@ def Endsets(self): OUTPUT: the category of endsets - EXAMPLE:: + EXAMPLES:: sage: Fq = GF(11) sage: FqX. = Fq[] @@ -357,7 +357,7 @@ def characteristic(self): OUTPUT: `0` or a monic prime polynomial in the function ring - EXAMPLES: + EXAMPLES:: sage: Fq = GF(11) sage: FqX. = Fq[] @@ -390,7 +390,7 @@ def constant_coefficient(self): OUTPUT: an element in the base codomain - EXAMPLES: + EXAMPLES:: sage: Fq = GF(11) sage: FqX. = Fq[] @@ -411,7 +411,7 @@ def function_ring(self): OUTPUT: a univariate polynomial ring - EXAMPLES: + EXAMPLES:: sage: Fq = GF(11) sage: FqX. = Fq[] @@ -436,7 +436,7 @@ def object(self, gen): OUTPUT: a Drinfeld module in the category - EXAMPLES: + EXAMPLES:: sage: Fq = GF(11) sage: FqX. = Fq[] @@ -470,7 +470,7 @@ def ore_polring(self): OUTPUT: an Ore polynomial ring - EXAMPLES: + EXAMPLES:: sage: Fq = GF(11) sage: FqX. = Fq[] @@ -494,7 +494,7 @@ def random_object(self, rank): OUTPUT: a Drinfeld module in the category - EXAMPLES: + EXAMPLES:: sage: Fq = GF(11) sage: FqX. = Fq[] @@ -546,7 +546,7 @@ def base(self): OUTPUT: a ring morphism - EXAMPLES: + EXAMPLES:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -602,7 +602,7 @@ def characteristic(self): OUTPUT: a univariate polynomial ring - EXAMPLES: + EXAMPLES:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -627,7 +627,7 @@ def function_ring(self): OUTPUT: a univariate polynomial ring - EXAMPLES: + EXAMPLES:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -645,7 +645,7 @@ def constant_coefficient(self): OUTPUT: an element in the base codomain - EXAMPLES: + EXAMPLES:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -692,7 +692,7 @@ def ore_polring(self): OUTPUT: an Ore polynomial ring - EXAMPLES: + EXAMPLES:: sage: Fq = GF(25) sage: FqX. = Fq[] diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index 911fd11a26c..558c102b244 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -42,7 +42,7 @@ class DrinfeldModuleAction(Action): INPUT: the Drinfeld module - EXAMPLES: + EXAMPLES:: sage: Fq. = GF(11) sage: FqX. = Fq[] @@ -80,7 +80,7 @@ def __init__(self, drinfeld_module): INPUT: the Drinfeld module - TESTS: + TESTS:: sage: Fq. = GF(11) sage: FqX. = Fq[] @@ -109,7 +109,7 @@ def _act_(self, pol, x): OUTPUT: an element in the base codomain - EXAMPLES: + EXAMPLES:: sage: Fq. = GF(11) sage: FqX. = Fq[] @@ -137,7 +137,7 @@ def _latex_(self): OUTPUT: a string - EXAMPLES: + EXAMPLES:: sage: Fq. = GF(11) sage: FqX. = Fq[] @@ -162,7 +162,7 @@ def _repr_(self): OUTPUT: a string - EXAMPLES: + EXAMPLES:: sage: Fq. = GF(11) sage: FqX. = Fq[] @@ -184,7 +184,7 @@ def drinfeld_module(self): OUTPUT: a Drinfeld module - EXAMPLES: + EXAMPLES:: sage: Fq. = GF(11) sage: FqX. = Fq[] diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 74a6444c6ef..d83acc3d73a 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -458,7 +458,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: phi.invert(phi(a)) == a True - TESTS: + TESTS:: sage: Fq = K = GF(2) sage: FqX. = Fq[] @@ -491,7 +491,7 @@ def __classcall_private__(cls, function_ring, gen, name='t'): OUTPUT: a DrinfeldModule or FiniteDrinfeldModule - TESTS: + TESTS:: sage: from sage.rings.function_field.drinfeld_modules.finite_drinfeld_module import FiniteDrinfeldModule sage: Fq = GF(25) @@ -574,7 +574,7 @@ def __init__(self, gen, category): coefficients or an Ore polynomial - ``name`` (default: `'t'`) -- the name of the Ore polynomial ring gen - TESTS: + TESTS:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -638,7 +638,7 @@ def __call__(self, a): OUTPUT: an element in the base codomain - TESTS: + TESTS:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -681,7 +681,7 @@ def _Hom_(self, other, category): OUTPUT: an homset - EXAMPLES: + EXAMPLES:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -704,8 +704,8 @@ def _Hom_(self, other, category): def _check_rank_two(self): r""" Raise ``NotImplementedError`` if the rank is not two. - - TESTS: + + TESTS:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -728,7 +728,7 @@ def _latex_(self): OUTPUT: a string - EXAMPLES: + EXAMPLES:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -754,7 +754,7 @@ def _repr_(self): OUTPUT: a string - EXAMPLES: + EXAMPLES:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -779,7 +779,7 @@ def action(self): OUTPUT: a Drinfeld module action object - EXAMPLES: + EXAMPLES:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -817,7 +817,7 @@ def coefficient(self, n): OUTPUT: an element in the base codomain - EXAMPLES: + EXAMPLES:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -856,7 +856,7 @@ def coefficients(self, sparse=True): OUTPUT: a list of elements in the base codomain - EXAMPLES: + EXAMPLES:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -890,7 +890,7 @@ def gen(self): OUTPUT: an Ore polynomial - EXAMPLES: + EXAMPLES:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -924,7 +924,7 @@ def height(self): OUTPUT: an integer - EXAMPLES: + EXAMPLES:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -976,7 +976,7 @@ def invert(self, ore_pol): OUTPUT: a function ring element - EXAMPLES: + EXAMPLES:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -1061,7 +1061,7 @@ def is_finite(self): OUTPUT: a boolean - EXAMPLES: + EXAMPLES:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -1090,7 +1090,7 @@ def j_invariant(self): OUTPUT: an element in the base codomain - EXAMPLES: + EXAMPLES:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -1127,7 +1127,7 @@ def morphism(self): OUTPUT: a ring morphism from the function ring to the Ore polynomial ring - EXAMPLES: + EXAMPLES:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -1175,7 +1175,7 @@ def rank(self): OUTPUT: an integer - EXAMPLES: + EXAMPLES:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -1225,7 +1225,7 @@ def velu(self, isog): Another possible algorithm is to recursively solve a system, see :arxiv:`2203.06970`, eq. 1.1. - EXAMPLES: + EXAMPLES:: sage: Fq = GF(25) sage: FqX. = Fq[] diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 1ef152573d1..1cfd2af886f 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -117,7 +117,7 @@ def __init__(self, gen, category): - ``name`` (default: `'t'`) -- the name of the Ore polynomial ring gen - TESTS: + TESTS:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -149,7 +149,7 @@ def frobenius_endomorphism(self): OUTPUT: a Drinfeld module morphism - EXAMPLES: + EXAMPLES:: sage: Fq = GF(343) sage: FqX. = Fq[] @@ -200,7 +200,7 @@ def frobenius_charpoly(self, var='T'): OUTPUT: an univariate polynomial with coefficients in the function ring - EXAMPLES: + EXAMPLES:: sage: Fq = GF(343) sage: FqX. = Fq[] @@ -260,7 +260,7 @@ def frobenius_norm(self): OUTPUT: an element in the function ring - EXAMPLES: + EXAMPLES:: sage: Fq = GF(343) sage: FqX. = Fq[] @@ -323,7 +323,7 @@ def frobenius_trace(self): :meth:`sage.rings.function_fields.drinfeld_module.drinfeld_module.DrinfeldModule.invert`, see its docstring for details. - EXAMPLES: + EXAMPLES:: sage: Fq = GF(343) sage: FqX. = Fq[] @@ -364,7 +364,7 @@ def is_ordinary(self): OUTPUT: a boolean - EXAMPLES: + EXAMPLES:: sage: Fq = GF(343) sage: FqX. = Fq[] @@ -400,7 +400,7 @@ def is_supersingular(self): OUTPUT: a boolean - EXAMPLES: + EXAMPLES:: sage: Fq = GF(343) sage: FqX. = Fq[] diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index 7eed56a5326..dc3484c759a 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -36,7 +36,7 @@ class DrinfeldModuleHomset(Homset): - ``X`` -- the domain - ``Y`` -- the codomain - EXAMPLES: + EXAMPLES:: sage: Fq = GF(27) sage: FqX. = Fq[] @@ -172,7 +172,7 @@ def _latex_(self): OUTPUT: a string - EXAMPLES: + EXAMPLES:: sage: Fq = GF(27) sage: FqX. = Fq[] @@ -194,7 +194,7 @@ def _repr_(self): OUTPUT: a string - EXAMPLES: + EXAMPLES:: sage: Fq = GF(27) sage: FqX. = Fq[] @@ -219,7 +219,7 @@ def __contains__(self, x): OUTPUT: a boolean - EXAMPLES: + EXAMPLES:: In the next examples, the input is an Ore polynomial:: @@ -274,7 +274,7 @@ def _element_constructor_(self, *args, **kwds): OUTPUT: a Drinfeld module morphism - EXAMPLES: + EXAMPLES:: sage: Fq = GF(27) sage: FqX. = Fq[] diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index d0acab5b98a..bf511bc7df1 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -205,7 +205,8 @@ def _latex_(self): OUTPUT: a string - EXAMPLES: + EXAMPLES:: + sage: Fq = GF(2) sage: FqX. = Fq[] sage: K. = Fq.extension(6) @@ -237,7 +238,8 @@ def _repr_(self): OUTPUT: a string - EXAMPLES: + EXAMPLES:: + sage: Fq = GF(2) sage: FqX. = Fq[] sage: K. = Fq.extension(6) @@ -260,7 +262,7 @@ def is_zero(self): r""" Return ``True`` whether the morphism is the zero morphism. - EXAMPLES: + EXAMPLES:: sage: Fq = GF(2) sage: FqX. = Fq[] @@ -282,7 +284,7 @@ def is_isogeny(self): r""" Return ``True`` whether the morphism is an isogeny. - EXAMPLES: + EXAMPLES:: sage: Fq = GF(2) sage: FqX. = Fq[] @@ -312,7 +314,7 @@ def is_isomorphism(self): r""" Return ``True`` whether the morphism is an isomorphism. - EXAMPLES: + EXAMPLES:: sage: Fq = GF(2) sage: FqX. = Fq[] @@ -342,7 +344,7 @@ def ore_polynomial(self): r""" Return the Ore polynomial that defines the morphism. - EXAMPLES: + EXAMPLES:: sage: Fq = GF(2) sage: FqX. = Fq[] From c821b208b0840b3d83407e8b2332fe4ff63daee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 4 Oct 2022 18:10:55 +0200 Subject: [PATCH 185/751] (fix) Fix various small issues in doc and `make doc` (see description) Fixes: - fix some broken references; - change some `:` to `::`; - change some ` to ``; - change `\Fq` to `\mathbb{F}_q`; - remove some italics (`*...*`) in inline definitions as Mathjax in italics is not rendered properly. --- src/sage/categories/drinfeld_modules.py | 42 ++--- .../function_field/drinfeld_modules/action.py | 13 +- .../drinfeld_modules/drinfeld_module.py | 151 +++++++++--------- .../finite_drinfeld_module.py | 46 +++--- .../function_field/drinfeld_modules/homset.py | 6 +- .../drinfeld_modules/morphism.py | 12 +- 6 files changed, 140 insertions(+), 130 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 4212e6b063c..7feba60d0b0 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -33,28 +33,30 @@ class DrinfeldModules(Category_over_base): This class represents the category of Drinfeld modules on a given base. - Let `\Fq[X]` be a polynomial ring with coefficients in a finite - field `\Fq` and let `K` be a field. We fix a ring morphism `\gamma: - \Fq[X] \to K`, which we call the *base* of the category (it is the - base of the Drinfeld modules in the category). - Please note that the base is not a ring; in particular, it is - not the field `K`. We also call `K` an *`\Fq[X]`-field*. + Let `\mathbb{F}_q[X]` be a polynomial ring with coefficients in a + finite field `\mathbb{F}_q` and let `K` be a field. We fix a ring + morphism `\gamma: \mathbb{F}_q[X] \to K`, which we call the *base* + of the category (it is the base of the Drinfeld modules in the + category). Please note that the base is not a ring; in particular, + it is not the field `K`. We also call `K` an + `\mathbb{F}_q[X]`-field. The category is uniquely defined by its base. The monic polynomial that generates the kernel of the base is called - the *`\Fq[X]`-characteristic of the `\Fq[X]`-field `K`*. + the `\mathbb{F}_q[X]`-characteristic of the `\mathbb{F}_q[X]`-field + `K`. .. NOTE:: These notations will be used throughout this documentation. - We say that `\Fq[X]` is the *function ring of the category*; - *K\{\tau\}* is the *Ore polynomial ring of the category*. The - *constant coefficient of the category* is the image of `X` under the - base. The `\Fq[X]`-characteristic of the `\Fq[X]`-field `K` can also - be referred to as its *function ring-characteristic*. Finally, `K` - is just refered to as the codomain base. + We say that `\mathbb{F}_q[X]` is the function ring of the category; + `K\{\tau\}` is the re polynomial ring of the category. The constant + coefficient of the category is the image of `X` under the base. The + `\mathbb{F}_q[X]`-characteristic of the `\mathbb{F}_q[X]`-field `K` + can also be referred to as its function ring-characteristic. + Finally, `K` is just refered to as the codomain base. INPUT: the base ring morphism @@ -90,7 +92,7 @@ class DrinfeldModules(Category_over_base): To: Finite Field in z of size 11^4 Defn: X |--> z^3 + 7*z^2 + 6*z + 10 - The so-called *constant coefficient* --- which is the same for all + The so-called constant coefficient --- which is the same for all Drinfeld modules in the category --- is simply the image of `X` by this morphism: @@ -99,9 +101,9 @@ class DrinfeldModules(Category_over_base): sage: cat.base()(X) == cat.constant_coefficient() True - Similarly, the *function ring-characteristic* of the category is either - `0` or the unique monic polynomial in `\Fq[X]` that generates - the kernel of the base:: + Similarly, the function ring-characteristic of the category is + either `0` or the unique monic polynomial in `\mathbb{F}_q[X]` that + generates the kernel of the base:: sage: cat.characteristic() X^2 + 7*X + 2 @@ -655,9 +657,9 @@ def constant_coefficient(self): sage: phi.constant_coefficient() == p_root True - Let `\Fq[X]` be the function ring, and let `\gamma` the base of - the Drinfeld module. The constant coefficient equals - `\gamma(X)`:: + Let `\mathbb{F}_q[X]` be the function ring, and let `\gamma` + the base of the Drinfeld module. The constant coefficient + equals `\gamma(X)`:: sage: cat = phi.category() sage: base = cat.base() diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index 558c102b244..096b5428059 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -29,16 +29,17 @@ class DrinfeldModuleAction(Action): This class represents the module action induced by a Drinfeld module. - Let `\phi` be a Drinfeld module with base `\gamma: \Fq[X] \to K`. - Let `L/K` be a field extension, let `x \in L`, let `a` be a function - ring element; the action is defined as `(a, x) \mapsto \phi_a(x)`. + Let `\phi` be a Drinfeld module with base `\gamma: \mathbb{F}_q[X] + \to K`. Let `L/K` be a field extension, let `x \in L`, let `a` be a + function ring element; the action is defined as `(a, x) \mapsto + \phi_a(x)`. .. NOTE:: In this implementation, `L` is `K`. - The action is instantiated as follows. Note that the user should - never explicitly instantiate the class `DrinfeldModuleAction`:: + The user should never explicitly instantiate the class + `DrinfeldModuleAction`. INPUT: the Drinfeld module @@ -76,7 +77,7 @@ class DrinfeldModuleAction(Action): def __init__(self, drinfeld_module): """ - Initialize `self`. + Initialize ``self``. INPUT: the Drinfeld module diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index d83acc3d73a..b63b5aaef7c 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -4,7 +4,7 @@ This module provides the class :class:`sage.rings.function_field.drinfeld_module.drinfeld_module.DrinfeldModule`. -For *finite* Drinfeld modules and their theory of complex multiplication, see +For finite Drinfeld modules and their theory of complex multiplication, see class :class:`sage.rings.function_field.drinfeld_module.finite_drinfeld_module.DrinfeldModule`. @@ -38,39 +38,42 @@ class DrinfeldModule(Parent, UniqueRepresentation): r""" - This class represents a Drinfeld `\Fq[X]`-module. + This class represents a Drinfeld `\mathbb{F}_q[X]`-module. - Let `\Fq[X]` be a polynomial ring with coefficients in a finite - field `\Fq` and let `K` be a field. We fix a ring morphism `\gamma: - \Fq[X] \to K`, which we call the *base* of the Drinfeld module. + Let `\mathbb{F}_q[X]` be a polynomial ring with coefficients in a + finite field `\mathbb{F}_q` and let `K` be a field. We fix a ring + morphism `\gamma: \mathbb{F}_q[X] \to K`, which we call the base of + the Drinfeld module. .. NOTE:: - The base is not a ring. Specifically, it is not the field `K`. We say - however that `K` is an *`\Fq[X]`-field*. + The base is not a ring. Specifically, it is not the field `K`. + We say however that `K` is an `\mathbb{F}_q[X]`-field. The base of the Drinfeld module is the base of the category of the Drinfeld module. The monic polynomial that generates the kernel of the base is called - the *`\Fq[X]`-characteristic of the `\Fq[X]`-field `K`*. + the `\mathbb{F}_q[X]`-characteristic of the `\mathbb{F}_q[X]`-field + `K`. Let `K\{\tau\}` be the ring of Ore polynomials with coefficients in - `K` and Frobenius variable `\tau: x \mapsto x^q`. A *Drinfeld - `\Fq[X]`-module over the base `\gamma`* is an `\Fq`-algebra - morphism `\phi: \Fq[X] \to K\{\tau\}` such that: + `K` and Frobenius variable `\tau: x \mapsto x^q`. A Drinfeld + `\mathbb{F}_q[X]`-module over the base `\gamma` is an + `\mathbb{F}_q`-algebra morphism `\phi: \mathbb{F}_q[X] \to + K\{\tau\}` such that: - 1. The image of `\phi` contains non-constant Ore polynomials. - 2. For every element `a` in the `\Fq[X]`, the constant - coefficient `\phi(a)` is `\gamma(a)`. + 1. The image of `\phi` contains non-constant Ore polynomials. + 2. For every element `a` in the `\mathbb{F}_q[X]`, the constant + coefficient `\phi(a)` is `\gamma(a)`. For `a` in the function ring, `\phi(a)` is denoted `\phi_a`. - The Drinfeld `\Fq[X]`-module `\phi` is uniquely determined by the - image `\phi_X` of `X`. This serves as input of the class. + The Drinfeld `\mathbb{F}_q[X]`-module `\phi` is uniquely determined + by the image `\phi_X` of `X`. This serves as input of the class. Despite an emphasis on the finite case, the base codomain can be any - extension of the field `\Fq`:: + extension of the field `\mathbb{F}_q`:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -94,28 +97,29 @@ class DrinfeldModule(Parent, UniqueRepresentation): .. NOTE:: - In the first case, the Drinfeld module is said to be *finite*. See + In the first case, the Drinfeld module is said to be finite. See :class:`sage.rings.function_field.drinfeld_modules.finite_drinfeld_module`. - We say that `\Fq[X]` is the *function ring of `\phi`*; *K\{\tau\}* - is the *Ore polynomial ring of `\phi`*. Further, the *generator of - `\phi`* is `\phi_X` and its *constant coefficient* is the constant - coefficient of `\phi_X`. The `\Fq[X]`-characteristic of the - `\Fq[X]`-field `K` can also be referred to as its *function - ring-characteristic*. Finally, `K` is just referred to as the - codomain base. + We say that `\mathbb{F}_q[X]` is the function ring of `\phi`; + `K\{\tau\}` is the Ore polynomial ring of `\phi`. Further, the + generator of `\phi` is `\phi_X` and its constant coefficient is the + constant coefficient of `\phi_X`. The + `\mathbb{F}_q[X]`-characteristic of the `\mathbb{F}_q[X]`-field `K` + can also be referred to as its function ring-characteristic. + Finally, `K` is just referred to as the codomain base. Classical references on Drinfeld modules include [Gos1998]_, - [Rosen2002]_, [VS06]_ and [Gek1998]_. + [Rosen2002]_, [VS06]_ and [Gek1991]_. .. NOTE:: Drinfeld modules are defined in a larger setting, in which the - polynomial ring `\Fq[X]` is replaced by a more general function - ring: the ring of functions in `k` that are regular outside - `\infty`, where `k` is a function field over `\Fq` with - transcendence degree `1` and `\infty` is a fixed place of `k`. - This is out of the scope of this implementation. + polynomial ring `\mathbb{F}_q[X]` is replaced by a more general + function ring: the ring of functions in `k` that are regular + outside `\infty`, where `k` is a function field over + `\mathbb{F}_q` with transcendence degree `1` and `\infty` is a + fixed place of `k`. This is out of the scope of this + implementation. INPUT: @@ -123,7 +127,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): finite field - ``gen`` -- the generator of the Drinfeld module; as a list of coefficients or an Ore polynomial - - ``name`` (default: `'t'`) -- the name of the Ore polynomial ring + - ``name`` (default: ``'t'``) -- the name of the Ore polynomial ring generator .. RUBRIC:: Construction @@ -185,8 +189,9 @@ class DrinfeldModule(Parent, UniqueRepresentation): ... ValueError: base must be a non zero morphism - The coefficients of the generator must lie in an `\Fq[X]`-field, - where `\Fq[X]` is the function ring of the Drinfeld module:: + The coefficients of the generator must lie in an + `\mathbb{F}_q[X]`-field, where `\mathbb{F}_q[X]` is the function + ring of the Drinfeld module:: sage: DrinfeldModule(FqX, [z, QQ(1)]) Traceback (most recent call last): @@ -259,14 +264,14 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: phi(X) # phi_X t^2 + t + z - sage: phi(X^3 + X + 1) # phi_X^3 +X + 1 + sage: phi(X^3 + X + 1) # phi_(X^3 +X + 1) t^6 + (z^11 + z^9 + 2*z^6 + 2*z^4 + 2*z + 1)*t^4 + (2*z^11 + 2*z^10 + z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^3)*t^3 + (2*z^11 + z^10 + z^9 + 2*z^7 + 2*z^6 + z^5 + z^4 + 2*z^3 + 2*z + 2)*t^2 + (2*z^11 + 2*z^8 + 2*z^6 + z^5 + z^4 + 2*z^2)*t + z^3 + z + 1 sage: phi(1) # phi_1 1 This is useful to quickly retrieve the generator of the Drinfeld - module. Furthermore, a Drinfeld `\Fq[X]`-module can be seen as an - Ore polynomial with positive degree and constant coefficient + module. Furthermore, a Drinfeld `\mathbb{F}_q[X]`-module can be seen + as an Ore polynomial with positive degree and constant coefficient `\gamma(X)`, where `\gamma` is the base. This analogy is the motivation for the following methods:: @@ -320,10 +325,10 @@ class DrinfeldModule(Parent, UniqueRepresentation): .. RUBRIC:: Morphisms, isogenies - A *morphism of Drinfeld modules `\phi \to \psi`* is an Ore - polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for - every `a` in the function ring. In our case, this is equivalent to - `f \phi_X = \psi_X f`. An *isogeny* is a non-zero morphism. + A morphism of Drinfeld modules `\phi \to \psi` is an Ore polynomial + `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for every `a` in + the function ring. In our case, this is equivalent to `f \phi_X = + \psi_X f`. An isogeny is a non-zero morphism. Use the ``in`` syntax to test if an Ore polynomial defines a morphism:: @@ -419,22 +424,22 @@ class DrinfeldModule(Parent, UniqueRepresentation): .. RUBRIC:: The action of a Drinfeld module - The `\Fq[X]`-Drinfeld module `\phi` induces a special left - `\Fq[X]`-module structure on any field extension `L/K`. Let `x \in - L` and `a` be in the function ring; the action is defined as `(a, - x) \mapsto \phi_a(x)`. The method :meth:`action` returns an + The `\mathbb{F}_q[X]`-Drinfeld module `\phi` induces a special left + `\mathbb{F}_q[X]`-module structure on any field extension `L/K`. Let + `x \in L` and `a` be in the function ring; the action is defined as + `(a, x) \mapsto \phi_a(x)`. The method :meth:`action` returns an ``Action`` object representing the Drinfeld module action. .. NOTE:: - In this implementation, `L` is `K`. + In this implementation, `L` is `K`:: - sage: action = phi.action() - sage: action - Action on Finite Field in z of size 3^12 induced by Drinfeld module defined by X |--> t^2 + t + z over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - To: Finite Field in z of size 3^12 - Defn: X |--> z + sage: action = phi.action() + sage: action + Action on Finite Field in z of size 3^12 induced by Drinfeld module defined by X |--> t^2 + t + z over base Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + To: Finite Field in z of size 3^12 + Defn: X |--> z The action on elements is computed by calling the action object:: @@ -477,8 +482,8 @@ class DrinfeldModule(Parent, UniqueRepresentation): @staticmethod def __classcall_private__(cls, function_ring, gen, name='t'): """ - Check input validity and return a `DrinfeldModule` or - `FiniteDrinfeldModule` object accordingly. + Check input validity and return a ``DrinfeldModule`` or + ``FiniteDrinfeldModule`` object accordingly. INPUT: @@ -486,7 +491,7 @@ def __classcall_private__(cls, function_ring, gen, name='t'): is a finite field - ``gen`` -- the generator of the Drinfeld module; as a list of coefficients or an Ore polynomial - - ``name`` (default: `'t'`) -- the name of the Ore polynomial + - ``name`` (default: ``'t'``) -- the name of the Ore polynomial ring gen OUTPUT: a DrinfeldModule or FiniteDrinfeldModule @@ -561,10 +566,10 @@ def __classcall_private__(cls, function_ring, gen, name='t'): def __init__(self, gen, category): """ - Initialize `self`. + Initialize ``self``. - Validity of the input is checked in `__classcall_private__`. The - `__init__` just saves attributes. + Validity of the input is checked in ``__classcall_private__``. + The ``__init__`` just saves attributes. INPUT: @@ -572,7 +577,8 @@ def __init__(self, gen, category): is a finite field - ``gen`` -- the generator of the Drinfeld module; as a list of coefficients or an Ore polynomial - - ``name`` (default: `'t'`) -- the name of the Ore polynomial ring gen + - ``name`` (default: ``'t'``) -- the name of the Ore polynomial + ring gen TESTS:: @@ -628,7 +634,7 @@ def base_ring(self): def __call__(self, a): r""" - Return the image of ``a`` by the morphism that defines the + Return the image of input ``a`` by the morphism that defines the Drinfeld module; i.e. `\phi_a` if the Drinfeld module is denoted `phi`. @@ -677,7 +683,7 @@ def _Hom_(self, other, category): - ``other`` -- the codomain of the homset - ``category`` -- the category in which we consider the - morphisms, usually `self.category()` + morphisms, usually ``self.category()`` OUTPUT: an homset @@ -911,8 +917,8 @@ def height(self): field characteristic is a prime ideal. In our case, this ideal is even generated by a monic polynomial `\mathfrak{p}` in the function field. Write `\phi_\mathfrak{p} = a_s \tau^s + \dots + - \tau^{r*\deg(\mathfrak{p})}`. The *height* of the Drinfeld - module is the well-defined positive integer `h = + \tau^{r*\deg(\mathfrak{p})}`. The height of the Drinfeld module + is the well-defined positive integer `h = \frac{s}{\deg(\mathfrak{p})}`. .. NOTE:: @@ -1143,7 +1149,7 @@ def morphism(self): sage: isinstance(phi.morphism(), RingHomomorphism) True - Actually, the ``DrinfeldModule`` method ``__call__`` simply + Actually, the ``DrinfeldModule`` method :meth:`__call__` simply class the ``__call__`` method of this morphism:: sage: phi.morphism()(X) == phi(X) @@ -1208,12 +1214,13 @@ def velu(self, isog): ALGORITHM: The input defines an isogeny if only if: - 1. The degree of the characteristic divides the height - of the input. (The height of an Ore polynomial - `P(t)` is the maximum `n` such that `t^n` right-divides - `P(t)`.) - 2. The input right-divides the generator, which can - be tested with Euclidean division. + + 1. The degree of the characteristic divides the height of + the input. (The height of an Ore polynomial `P(\tau)` is the + maximum `n` such that `\tau^n` right-divides `P(\tau)`.) + + 2. The input right-divides the generator, which can + be tested with Euclidean division. We test if the input is an isogeny, and, if it is, we return the quotient of the Euclidean division. @@ -1223,7 +1230,7 @@ def velu(self, isog): :class:`sage.rings.polynomial.ore_polynomial_element.OrePolynomial`. Another possible algorithm is to recursively solve a system, - see :arxiv:`2203.06970`, eq. 1.1. + see :arxiv:`2203.06970`, Eq. 1.1. EXAMPLES:: @@ -1251,7 +1258,7 @@ def velu(self, isog): True The following inputs do not define isogenies, and the method - returns None:: + returns ``None``:: sage: phi.velu(0) Traceback (most recent call last): diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 1cfd2af886f..2e8fa854a7e 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -176,7 +176,7 @@ def frobenius_charpoly(self, var='T'): endomorphism, if the rank is two; raise a NotImplementedError otherwise. - Let `\Fq` be the base ring of the function ring. The + Let `\mathbb{F}_q` be the base ring of the function ring. The *characteristic polynomial `\chi` of the Frobenius endomorphism* is defined in [Gek1991]_. An important feature of this polynomial is that it is a monic univariate polynomial with @@ -188,14 +188,14 @@ def frobenius_charpoly(self, var='T'): Let `\chi = T^2 - A(X)T + B(X)` be the characteristic polynomial of the Frobenius endomorphism, let `t^n` be the Ore polynomial that defines the Frobenius endomorphism of `\phi`; by - definition, `n` is the degree over `\Fq` of the base codomain. We - have `\chi(t^n)(\phi(X)) = t^{2n} - \phi_A t^n + \phi_B = 0`, - with `\deg(A) \leq \frac{n}{2}` and `\deg(B) = n`. + definition, `n` is the degree over `\mathbb{F}_q` of the base + codomain. We have `\chi(t^n)(\phi(X)) = t^{2n} - \phi_A t^n + + \phi_B = 0`, with `\deg(A) \leq \frac{n}{2}` and `\deg(B) = n`. Note that the *Frobenius trace* is defined as `A(X)` and the *Frobenius norm* is defined as `B(X)`. - INPUT: (default: `'T'`) the name of the second variable + INPUT: (default: ``'T'``) the name of the second variable OUTPUT: an univariate polynomial with coefficients in the function ring @@ -231,7 +231,7 @@ def frobenius_charpoly(self, var='T'): We compute the Frobenius norm, and with it the Frobenius trace. This gives the Frobenius characteristic polynomial. - See [SM2019]_, Section 4. + See [MS2019]_, Section 4. See docstrings of methods :meth:`frobenius_norm` and :meth:`frobenius_trace` for furthere details on the @@ -250,13 +250,13 @@ def frobenius_norm(self): Return Frobenius norm of the Drinfeld module, if the rank is two; raise a NotImplementedError otherwise. - Let `\Fq[X]` be the function ring, write `\chi = T^2 - A(X)T + - B(X) \in \Fq[X][T]` for the characteristic polynomial of the - Frobenius endomorphism. The *Frobenius norm* is defined as the - polynomial `B(X) \in \Fq[X]`. + Let `\mathbb{F}_q[X]` be the function ring, write `\chi = T^2 - + A(X)T + B(X) \in \mathbb{F}_q[X][T]` for the characteristic + polynomial of the Frobenius endomorphism. The *Frobenius norm* + is defined as the polynomial `B(X) \in \mathbb{F}_q[X]`. - Let `n` be the degree over `\Fq` of the base codomain. Then the - Frobenius norm has degree `n`. + Let `n` be the degree over `\mathbb{F}_q` of the base codomain. + Then the Frobenius norm has degree `n`. OUTPUT: an element in the function ring @@ -280,7 +280,7 @@ def frobenius_norm(self): ALGORITHM: The Frobenius norm is computed using the formula, by - Gekeler, given in [SM2019]_, Section 4, Proposition 3. + Gekeler, given in [MS2019]_, Section 4, Proposition 3. """ self._check_rank_two() L = self._base.codomain().over(self._Fq) @@ -300,13 +300,13 @@ def frobenius_trace(self): Return Frobenius norm of the Drinfeld module, if the rank is two; raise a NotImplementedError otherwise. - Let `\Fq[X]` be the function ring, write `\chi = T^2 - A(X)T + - B(X) \in \Fq[X][T]` for the characteristic polynomial of the - Frobenius endomorphism. The *Frobenius norm* is defined as the - polynomial `B(X) \in \Fq[X]`. + Let `\mathbb{F}_q[X]` be the function ring, write `\chi = T^2 - + A(X)T + B(X) \in \mathbb{F}_q[X][T]` for the characteristic + polynomial of the Frobenius endomorphism. The *Frobenius norm* + is defined as the polynomial `B(X) \in \mathbb{F}_q[X]`. - Let `n` be the degree over `\Fq` of the base codomain. Then the - Frobenius trace has degree `\leq \frac{n}{2}`. + Let `n` be the degree over `\mathbb{F}_q` of the base codomain. + Then the Frobenius trace has degree `\leq \frac{n}{2}`. OUTPUT: an element in the function ring @@ -378,12 +378,12 @@ def is_ordinary(self): ALGORITHM: - Compute the Frobenius trace and test if the `\Fq[X]` - characteristic divides it. + Compute the Frobenius trace and test if the + `\mathbb{F}_q[X]` characteristic divides it. We could also test if the image of the - `\Fq[X]`-characteristic under the Drinfeld module is purely - inseparable; see [Gek1991]_, Proposition 4.1. + `\mathbb{F}_q[X]`-characteristic under the Drinfeld module + is purely inseparable; see [Gek1991]_, Proposition 4.1. """ self._check_rank_two() return not self.is_supersingular() diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index dc3484c759a..f70bc0d9de5 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -131,15 +131,15 @@ class DrinfeldModuleHomset(Homset): def __init__(self, X, Y, category=None, check=True): """ - Initialize `self`. + Initialize ``self``. INPUT: - ``X`` -- the domain of the homset - ``Y`` -- the codomain of the homset - - ``category`` (default: None) -- the Drinfeld modules category of + - ``category`` (default: ``None``) -- the Drinfeld modules category of the domain and codomain - - ``check`` (default: True) -- check the validity of the category + - ``check`` (default: ``True``) -- check the validity of the category TESTS:: diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index bf511bc7df1..847ce0233bb 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -29,14 +29,14 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, r""" This class represents a Drinfeld module morphism. - Let `\phi, \psi` be two Drinfeld modules with base `\gamma: \Fq[X] + Let `\phi, \psi` be two Drinfeld modules with base `\gamma: \mathbb{F}_q[X] \to K`. A *morphism of Drinfeld modules `\phi \to \psi`* is an Ore - polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for - every `a \in \Fq[X]`. In our case, this is equivalent to `f \phi_X = - \psi_X f`. An *isogeny* is a non-zero morphism. + polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for every `a + \in \mathbb{F}_q[X]`. In our case, this is equivalent to `f \phi_X = \psi_X + f`. An *isogeny* is a non-zero morphism. To create a morphism object, the user should never explicitly - instantiate `DrinfeldModuleMorphism`, but rather call the parent + instantiate :class:`DrinfeldModuleMorphism`, but rather call the parent homset with the defining Ore polynomial:: sage: Fq = GF(25) @@ -170,7 +170,7 @@ def __classcall_private__(cls, parent, x): def __init__(self, parent, ore_pol): r""" - Initialize `self`. + Initialize ``self``. INPUT: From c2691352c3322851cccefc089119cb69d0a60534 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 4 Oct 2022 18:42:03 +0200 Subject: [PATCH 186/751] (fix) Fix DrinfeldModule.base_ring docstring --- .../function_field/drinfeld_modules/drinfeld_module.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index b63b5aaef7c..cbcf0cc0a96 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -610,15 +610,15 @@ def __init__(self, gen, category): def base_ring(self): r""" - Raise an exception. + Raise exception ``AttributeError``. The base of a Drinfeld module is a ring morphism, not a ring. - This method is implemented in CategoryObjects, of which - Parent inherits. It returns the base of the category. I - overloaded it to avoid confusion. + This method is implemented in ``CategoryObject``, of which Parent + inherits. It returns the base of the category. I overloaded it + to avoid confusion. - TESTS:: + EXAMPLES:: sage: Fq = GF(25) sage: FqX. = Fq[] From b59d83624afeda23ed07c16115dd37f889b569b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Wed, 5 Oct 2022 10:46:57 +0200 Subject: [PATCH 187/751] (fix) Fix DrinfeldModules.Endsets It used to return Homsets(). Now it returns Homsets().Endsets(). --- src/sage/categories/drinfeld_modules.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 7feba60d0b0..01dc332fc27 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -347,11 +347,11 @@ def Endsets(self): sage: p_root = z^3 + 7*z^2 + 6*z + 10 sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) sage: cat = phi.category() - sage: from sage.categories.homsets import Endsets - sage: cat.Endsets() is Endsets() + sage: from sage.categories.homsets import Homsets + sage: cat.Endsets() is Homsets().Endsets() True """ - return Homsets() + return Homsets().Endsets() def characteristic(self): r""" From b7638276a45bbefb066b5da8ee3d58eb37303c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 4 Oct 2022 19:06:56 +0200 Subject: [PATCH 188/751] Split some code blocks using :: Change sage: foo sage: bar to sage: foo :: sage: bar --- src/sage/categories/drinfeld_modules.py | 5 +++- .../drinfeld_modules/drinfeld_module.py | 27 +++++++++++++++-- .../finite_drinfeld_module.py | 14 +++++++++ .../function_field/drinfeld_modules/homset.py | 13 ++++++++- .../drinfeld_modules/morphism.py | 29 +++++++++++++++++-- 5 files changed, 82 insertions(+), 6 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 01dc332fc27..7f88954ef96 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -115,7 +115,6 @@ class DrinfeldModules(Category_over_base): sage: cat.base() is phi.base() True - sage: cat.function_ring() is phi.function_ring() True sage: cat.function_ring() @@ -370,6 +369,8 @@ def characteristic(self): sage: cat.characteristic() X^2 + 7*X + 2 + :: + sage: L = Frac(FqX) sage: psi = DrinfeldModule(FqX, [L.gen(), 1]) sage: psi @@ -592,6 +593,8 @@ def base(self): sage: psi.ore_polring().twisting_morphism().is_identity() True + :: + sage: psi.base().codomain() is psi.function_ring().base_ring() True diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index cbcf0cc0a96..df68ab80502 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -85,6 +85,8 @@ class DrinfeldModule(Parent, UniqueRepresentation): To: Finite Field in z of size 5^12 Defn: X |--> z + :: + sage: Fq = GF(49) sage: FqX. = Fq[] sage: K. = Frac(FqX) @@ -198,6 +200,8 @@ class DrinfeldModule(Parent, UniqueRepresentation): ... ValueError: function ring base must coerce into base codomain + :: + sage: DrinfeldModule(FqX, [1, QQ(1)]) Traceback (most recent call last): ... @@ -211,6 +215,8 @@ class DrinfeldModule(Parent, UniqueRepresentation): ... NotImplementedError: function ring must be a polynomial ring + :: + sage: FqXY. = FqX[] sage: DrinfeldModule(FqXY, [z, 1, 1]) Traceback (most recent call last): @@ -278,8 +284,8 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: phi.coefficients() [z, 1, 1] - sage: phi.coefficient(1) - 1 + :: + sage: phi.coefficient(1) 1 @@ -291,20 +297,30 @@ class DrinfeldModule(Parent, UniqueRepresentation): To: Finite Field in z of size 3^12 Defn: X |--> z + :: + sage: phi.ore_polring() # K{t} Ore Polynomial Ring in t over Finite Field in z of size 3^12 twisted by z |--> z^(3^2) + :: + sage: phi.function_ring() # Fq[X] Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + :: + sage: phi.gen() # phi_X t^2 + t + z sage: phi.gen() == phi(X) True + :: + sage: phi.constant_coefficient() # Constant coefficient of phi_X z + :: + sage: phi.morphism() # The Drinfeld module as a morphism Ring morphism: From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 @@ -507,6 +523,8 @@ def __classcall_private__(cls, function_ring, gen, name='t'): sage: isinstance(phi, FiniteDrinfeldModule) True + :: + sage: K = Frac(FqX) sage: phi = DrinfeldModule(FqX, [K(X), 1]) sage: isinstance(psi, FiniteDrinfeldModule) @@ -652,12 +670,15 @@ def __call__(self, a): sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + :: sage: a = X^3 + 4*X + 2 sage: phi(a) == phi(X)^3 + 4*phi(X) + 2 True sage: phi(a)[0] == p_root^3 + 4*p_root + 2 True + :: + sage: phi(0) 0 sage: phi(1) @@ -665,6 +686,8 @@ def __call__(self, a): sage: phi(X) == phi._gen True + :: + sage: a = FqX.random_element(5) sage: phi(a)[0] == phi.category().base()(a) True diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 2e8fa854a7e..0991a343b35 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -210,10 +210,14 @@ def frobenius_charpoly(self, var='T'): sage: chi T^2 + ((3*z3^2 + z3 + 4)*X + 4*z3^2 + 6*z3 + 3)*T + (5*z3^2 + 2*z3)*X^2 + (4*z3^2 + 3*z3)*X + 5*z3^2 + 2*z3 + :: + sage: frob_pol = phi.frobenius_endomorphism().ore_polynomial() sage: chi(frob_pol, phi(X)) 0 + :: + sage: A = phi.frobenius_trace() sage: A (4*z3^2 + 6*z3 + 3)*X + 3*z3^2 + z3 + 4 @@ -221,6 +225,8 @@ def frobenius_charpoly(self, var='T'): sage: B (5*z3^2 + 2*z3)*X^2 + (4*z3^2 + 3*z3)*X + 5*z3^2 + 2*z3 + :: + sage: n = 2 # Degree over Fq of the base codomain sage: A.degree() <= n/2 True @@ -270,10 +276,14 @@ def frobenius_norm(self): sage: B (5*z3^2 + 2*z3)*X^2 + (4*z3^2 + 3*z3)*X + 5*z3^2 + 2*z3 + :: + sage: n = 2 # Degree over Fq of the base codomain sage: B.degree() == n True + :: + sage: B == phi.frobenius_charpoly()[0] True @@ -333,10 +343,14 @@ def frobenius_trace(self): sage: A (4*z3^2 + 6*z3 + 3)*X + 3*z3^2 + z3 + 4 + :: + sage: n = 2 # Degree over Fq of the base codomain sage: A.degree() <= n/2 True + :: + sage: A == -phi.frobenius_charpoly()[1] True """ diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index f70bc0d9de5..53cd6719b79 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -47,6 +47,8 @@ class DrinfeldModuleHomset(Homset): sage: hom Set of Drinfeld module morphisms from (gen) 2*t^2 + z6*t + z6 to (gen) 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 + :: + sage: from sage.rings.function_field.drinfeld_modules.homset import DrinfeldModuleHomset sage: isinstance(hom, DrinfeldModuleHomset) True @@ -68,6 +70,8 @@ class DrinfeldModuleHomset(Homset): ... ValueError: Drinfeld modules must be in the same category + :: + sage: sigma = DrinfeldModule(FqX, [1, z6, 2]) sage: Hom(phi, sigma) Traceback (most recent call last): @@ -84,6 +88,8 @@ class DrinfeldModuleHomset(Homset): To (gen): 2*t^2 + z6*t + z6 Defn: 1 + :: + sage: frobenius_endomorphism = end(t^6) sage: frobenius_endomorphism Drinfeld Module morphism: @@ -91,6 +97,8 @@ class DrinfeldModuleHomset(Homset): To (gen): 2*t^2 + z6*t + z6 Defn: t^6 + :: + sage: isogeny = hom(t + 1) sage: isogeny Drinfeld Module morphism: @@ -231,7 +239,6 @@ def __contains__(self, x): sage: hom = Hom(phi, psi) sage: end = End(phi) sage: t = phi.ore_polring().gen() - sage: 1 in hom False sage: t^6 in hom @@ -291,6 +298,8 @@ def _element_constructor_(self, *args, **kwds): To (gen): 2*t^2 + z6*t + z6 Defn: 1 + :: + sage: frobenius_endomorphism = end(t^6) sage: frobenius_endomorphism Drinfeld Module morphism: @@ -298,6 +307,8 @@ def _element_constructor_(self, *args, **kwds): To (gen): 2*t^2 + z6*t + z6 Defn: t^6 + :: + sage: isogeny = hom(t + 1) sage: isogeny Drinfeld Module morphism: diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 847ce0233bb..459b2fdf7b3 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -61,7 +61,7 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, ... ValueError: Ore polynomial does not define a morphism - We can get basic data on the morphism:: + One can get basic data on the morphism:: sage: morphism.domain() Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Ring morphism: @@ -71,6 +71,8 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, sage: morphism.domain() is phi True + :: + sage: morphism.codomain() Drinfeld module defined by X |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Ring morphism: From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 @@ -79,12 +81,17 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, sage: morphism.codomain() is psi True + :: + sage: morphism.ore_polynomial() t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 + + :: + sage: morphism.ore_polynomial() is ore_pol True - We can check various properties:: + One can check various properties:: sage: morphism.is_zero() False @@ -146,6 +153,8 @@ def __classcall_private__(cls, parent, x): sage: morphism is Hom(phi, psi)(morphism) True + :: + sage: from sage.rings.function_field.drinfeld_modules.morphism import DrinfeldModuleMorphism sage: morphism = DrinfeldModuleMorphism(Sets(), t + 1) Traceback (most recent call last): @@ -274,6 +283,8 @@ def is_zero(self): sage: morphism.is_zero() False + :: + sage: zero_morphism = End(phi)(0) sage: zero_morphism.is_zero() True @@ -296,14 +307,20 @@ def is_isogeny(self): sage: morphism.is_isogeny() True + :: + sage: zero_morphism = End(phi)(0) sage: zero_morphism.is_isogeny() False + :: + sage: identity_morphism = End(phi)(1) sage: identity_morphism.is_isogeny() True + :: + sage: frobenius_endomorphism = phi.frobenius_endomorphism() sage: frobenius_endomorphism.is_isogeny() True @@ -326,14 +343,20 @@ def is_isomorphism(self): sage: morphism.is_isomorphism() False + :: + sage: zero_morphism = End(phi)(0) sage: zero_morphism.is_isomorphism() False + :: + sage: identity_morphism = End(phi)(1) sage: identity_morphism.is_isomorphism() True + :: + sage: frobenius_endomorphism = phi.frobenius_endomorphism() sage: frobenius_endomorphism.is_isomorphism() False @@ -357,6 +380,8 @@ def ore_polynomial(self): sage: ore_pol t + z6^5 + z6^2 + 1 + :: + sage: ore_pol * phi(X) == psi(X) * ore_pol True """ From 7d8e358cde69671bee9978ea4793fc32cfae7965 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Wed, 5 Oct 2022 17:25:40 +0200 Subject: [PATCH 189/751] (fix) Fix lint check Github job See /~https://github.com/sagemath/sagetrac-mirror/actions/runs/3190135097/jobs/5204830911#step:5:23. --- src/sage/rings/function_field/drinfeld_modules/homset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index 53cd6719b79..690d35653b8 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -227,7 +227,7 @@ def __contains__(self, x): OUTPUT: a boolean - EXAMPLES:: + EXAMPLES: In the next examples, the input is an Ore polynomial:: From 26fe42659d8bed43835721f8a9d40303f4dca6da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 10 Oct 2022 18:21:04 +0200 Subject: [PATCH 190/751] (fix) Adress typos from comment 264 Thanks David. I changed the first typo and the nonXYZ typos. --- src/sage/categories/drinfeld_modules.py | 8 ++++---- .../drinfeld_modules/drinfeld_module.py | 16 ++++++++-------- .../function_field/drinfeld_modules/morphism.py | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 7f88954ef96..d6c4ca17c6a 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -52,7 +52,7 @@ class DrinfeldModules(Category_over_base): These notations will be used throughout this documentation. We say that `\mathbb{F}_q[X]` is the function ring of the category; - `K\{\tau\}` is the re polynomial ring of the category. The constant + `K\{\tau\}` is the polynomial ring of the category. The constant coefficient of the category is the image of `X` under the base. The `\mathbb{F}_q[X]`-characteristic of the `\mathbb{F}_q[X]`-field `K` can also be referred to as its function ring-characteristic. @@ -170,7 +170,7 @@ class DrinfeldModules(Category_over_base): sage: cat = DrinfeldModules(base) Traceback (most recent call last): ... - ValueError: base must be a non zero morphism + ValueError: base must be a nonzero morphism sage: base = Hom(FqX, FqX)(1) sage: cat = DrinfeldModules(base) @@ -245,9 +245,9 @@ def __init__(self, base, name='t'): K = base.codomain() if not K.is_field(): raise TypeError('base codomain must be a field') - # Check base is a non zero morphism + # Check base is a nonzero morphism if base(X).is_zero(): - raise ValueError('base must be a non zero morphism') + raise ValueError('base must be a nonzero morphism') # Build K{t} d = log(Fq.cardinality(), Fq.characteristic()) tau = K.frobenius_endomorphism(d) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index df68ab80502..9b4830488e6 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -63,7 +63,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): `\mathbb{F}_q`-algebra morphism `\phi: \mathbb{F}_q[X] \to K\{\tau\}` such that: - 1. The image of `\phi` contains non-constant Ore polynomials. + 1. The image of `\phi` contains nonconstant Ore polynomials. 2. For every element `a` in the `\mathbb{F}_q[X]`, the constant coefficient `\phi(a)` is `\gamma(a)`. @@ -184,12 +184,12 @@ class DrinfeldModule(Parent, UniqueRepresentation): ... ValueError: generator must have positive degree - The constant coefficient must be non zero:: + The constant coefficient must be nonzero:: sage: DrinfeldModule(FqX, [K(0), K(1)]) Traceback (most recent call last): ... - ValueError: base must be a non zero morphism + ValueError: base must be a nonzero morphism The coefficients of the generator must lie in an `\mathbb{F}_q[X]`-field, where `\mathbb{F}_q[X]` is the function @@ -344,7 +344,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): A morphism of Drinfeld modules `\phi \to \psi` is an Ore polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for every `a` in the function ring. In our case, this is equivalent to `f \phi_X = - \psi_X f`. An isogeny is a non-zero morphism. + \psi_X f`. An isogeny is a nonzero morphism. Use the ``in`` syntax to test if an Ore polynomial defines a morphism:: @@ -411,7 +411,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): .. RUBRIC:: The Vélu formula - Let ``ore_pol`` be a non-zero Ore polynomial. We can decide if there + Let ``ore_pol`` be a nonzero Ore polynomial. We can decide if there exists a Drinfeld module ``psi`` such that ``ore_pol`` is an isogeny from ``self`` to ``psi``. If so, we find ``psi``:: @@ -842,7 +842,7 @@ def coefficient(self, n): INPUT: - - ``n`` -- a non-negative integer + - ``n`` -- a nonnegative integer OUTPUT: an element in the base codomain @@ -877,7 +877,7 @@ def coefficients(self, sparse=True): Return the coefficients of the generator, as a list. If the flag ``sparse`` is ``True`` (default), only return the - non-zero coefficients; otherwise, return all of them. + nonzero coefficients; otherwise, return all of them. INPUT: @@ -897,7 +897,7 @@ def coefficients(self, sparse=True): z12^3, z12^5] - Careful, the method only returns the non-zero coefficients, + Careful, the method only returns the nonzero coefficients, unless otherwise specified:: sage: rho = DrinfeldModule(FqX, [p_root, 0, 0, 0, 1]) diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 459b2fdf7b3..9f36cdeca13 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -33,7 +33,7 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, \to K`. A *morphism of Drinfeld modules `\phi \to \psi`* is an Ore polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for every `a \in \mathbb{F}_q[X]`. In our case, this is equivalent to `f \phi_X = \psi_X - f`. An *isogeny* is a non-zero morphism. + f`. An *isogeny* is a nonzero morphism. To create a morphism object, the user should never explicitly instantiate :class:`DrinfeldModuleMorphism`, but rather call the parent From bee20a07453c5b18ac51a36835e6d20c1e33a1c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 11 Oct 2022 18:48:18 +0200 Subject: [PATCH 191/751] Add details on the base definition in DrinfeldModule doc See comments 264 and 265 for context. --- .../drinfeld_modules/drinfeld_module.py | 62 ++++++++++++++++++- 1 file changed, 59 insertions(+), 3 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 9b4830488e6..efac5f6cdb5 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -72,8 +72,9 @@ class DrinfeldModule(Parent, UniqueRepresentation): The Drinfeld `\mathbb{F}_q[X]`-module `\phi` is uniquely determined by the image `\phi_X` of `X`. This serves as input of the class. - Despite an emphasis on the finite case, the base codomain can be any - extension of the field `\mathbb{F}_q`:: + A Drinfeld module is saif to be finite if the base ring codomain is + a finite field. Despite an emphasis on this case, the base codomain + can be any extension of the field `\mathbb{F}_q`:: sage: Fq = GF(25) sage: FqX. = Fq[] @@ -99,7 +100,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): .. NOTE:: - In the first case, the Drinfeld module is said to be finite. See + Finite Drinfeld modules are implemented in the class :class:`sage.rings.function_field.drinfeld_modules.finite_drinfeld_module`. We say that `\mathbb{F}_q[X]` is the function ring of `\phi`; @@ -147,6 +148,19 @@ class DrinfeldModule(Parent, UniqueRepresentation): To: Finite Field in z of size 3^12 Defn: X |--> z + Note that the definition of the base morphism is implicit; it is + defined as the `\mathbb{F}_q`-algebra morphism `\mathbb{F}_q[X] \to + K` which maps `X` to the constant coefficient of the generator, and + where `K` is the compositum of all the parents of the coefficients:: + + sage: phi.base().codomain() is K + True + + .. NOTE:: + + Formally, `K` is defined as `Sequence(gen).universe()`, where + `gen` is the generator of the Drinfeld module. + The above Drinfeld module is finite; it can also be infinite:: sage: L = Frac(FqX) @@ -493,6 +507,48 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: phi = DrinfeldModule(FqX, [K(1), 1]) sage: isinstance(phi.ore_polring(), OrePolynomialRing) True + + Test that the base morphism is correct:: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K = Frac(Fq) + sage: phi = DrinfeldModule(FqX, [Fq.gen(), K(1)]) + sage: phi.base().codomain() is K + True + + :: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: k = Frac(Fq) + sage: kT. = k[] + sage: K = k.extension(T^3 + T + 1) + sage: phi = DrinfeldModule(FqX, [Fq.gen(), K.gen()]) + sage: phi.base().codomain() is K + True + + In particular, note that the field `K` may not be the smallest field + of definition of the coefficients:: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: k = Frac(Fq) + sage: kT. = k[] + sage: K = k.extension(T^3 + T + 1) + sage: phi = DrinfeldModule(FqX, [K(k.gen()), 1]) + sage: phi.base().codomain() is K + True + + :: + + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K = Fq.extension(2) + sage: phi = DrinfeldModule(FqX, [Fq.gen(), K(Fq.gen())]) + sage: phi.base().codomain() is K + True + """ @staticmethod From 78c99e05e5b12568dcb2def70da21cfc0d8fa870 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 11 Oct 2022 18:54:43 +0200 Subject: [PATCH 192/751] Enhance "base ring comment" See comment 264 for context. --- src/sage/categories/drinfeld_modules.py | 10 ---------- .../function_field/drinfeld_modules/drinfeld_module.py | 7 +++++++ 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index d6c4ca17c6a..dc11284e7fa 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -721,13 +721,3 @@ def ore_polring(self): True """ return self.category().ore_polring() - - # FIXME - # The parent method `base_ring` is defined not here, as it - # should be, but in `DrinfeldModule`. - # - # This is because calling `phi.base_ring()` calls the - # `base_ring` method of `CategoryObject` and not the one defined - # here. - # - # This works, but any better solution would be welcome. diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index efac5f6cdb5..cbc1c8ac8f2 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -704,6 +704,13 @@ def base_ring(self): ... AttributeError: the base of a Drinfeld module is a morphism """ + # FIXME + # This method depends on the sole category of the Drinfeld + # module. It should therefore be implemented in the + # `ParentMethods` bloc of `DrinfeldModule`. This is not possible + # as the method `base_ring` from `CategoryObject` --- of which + # `Parent` and so `DrinfeldModule inherit --- is called instead. + # Any better way would be welcome. raise AttributeError('the base of a Drinfeld module is a morphism') def __call__(self, a): From 9eed85bc95c28581493cf3632cd26f85ff5ac397 Mon Sep 17 00:00:00 2001 From: dcoudert Date: Sat, 15 Oct 2022 18:42:36 +0200 Subject: [PATCH 193/751] trac #32136: add iterator over full subgraphs --- src/sage/graphs/base/static_dense_graph.pyx | 225 ++++++++++++++++++++ 1 file changed, 225 insertions(+) diff --git a/src/sage/graphs/base/static_dense_graph.pyx b/src/sage/graphs/base/static_dense_graph.pyx index f14ebf789cc..98fd38c1118 100644 --- a/src/sage/graphs/base/static_dense_graph.pyx +++ b/src/sage/graphs/base/static_dense_graph.pyx @@ -49,6 +49,7 @@ Functions """ from sage.data_structures.binary_matrix cimport * from cysignals.signals cimport sig_on, sig_off, sig_check +from memory_allocator cimport MemoryAllocator cdef dict dense_graph_init(binary_matrix_t m, g, translation=None, force_undirected=False): @@ -378,6 +379,230 @@ def triangles_count(G): return ans +def connected_full_subgraphs(G, edges_only=False, labels=False): + r""" + Iterator over the connected subgraphs of `G` with same vertex set. + + This method implements a iterator over the connected subgraphs of the input + (di)graph with the same ground set of vertices. That is, it iterates over + every subgraph `H = (V_H, E_H)` of `G = (V, E)` such that `V_H = V`, + `E_H \subseteq E` and `H` is connected. Hence, this method may yield a huge + number of graphs. + + When the input (di)graph `D` is not connected, this method returns nothing. + + As for method :meth:`sage.graphs.generic_graph.connected_components`, edge + orientation is ignored. Hence, the directed graph with a single arc `0 \to + 1` is considered connected. + + INPUT: + + - ``G`` -- a :class:`Graph` or a :class:`DiGraph`; loops and multiple edges + are *not* allowed + + - ``edges_only`` -- boolean (default: ``False``); whether to return + (Di)Graph or list of vertices + + - ``labels`` -- boolean (default: ``False``); whether to return labeled + edges or not. This parameter is used only when ``edges_only`` is ``True``. + + .. NOTE:: + + Roughly, this method explores all possible subsets of neighbors of each + vertex, which represents a huge number of subsets. We have thus chosen + to limit the degree of the vertices of the graphs that can be + considered, even if the graph has a single connected subgraph (e.g., a + tree). This can certainly be improved using a decomposition into + biconnected components. + + EXAMPLES: + + The complete graph of order 3 has 4 connected subgraphs:: + + sage: from sage.graphs.base.static_dense_graph import connected_full_subgraphs + sage: G = graphs.CompleteGraph(3) + sage: len(list(connected_full_subgraphs(G))) + 4 + + A cycle of order 5 has 6 connected subgraphs:: + + sage: from sage.graphs.base.static_dense_graph import connected_full_subgraphs + sage: G = graphs.CycleGraph(5) + sage: len(list(connected_full_subgraphs(G))) + 6 + + The House graph has 18 connected subgraphs of order 5:: + + sage: from sage.graphs.base.static_dense_graph import connected_full_subgraphs + sage: G = graphs.HouseGraph() + sage: L = list(connected_full_subgraphs(G)) + sage: len(L) + 18 + sage: all(g.order() == 5 for g in L) + True + sage: all(g.is_connected() for g in L) + True + sage: F = frozenset(frozenset(g.edges(sort=False, labels=False)) for g in L) + sage: len(F) + 18 + + Asking for edges only:: + + sage: from sage.graphs.base.static_dense_graph import connected_full_subgraphs + sage: G = Graph([(0, 1, "01"), (0, 2, "02"), (1, 2, "12")]) + sage: it = connected_full_subgraphs(G, edges_only=True) + sage: next(it) + [(0, 1), (0, 2), (1, 2)] + sage: next(it) + [(0, 1), (0, 2)] + sage: it = connected_full_subgraphs(G, edges_only=True, labels=True) + sage: next(it) + [(0, 1, '01'), (0, 2, '02'), (1, 2, '12')] + sage: next(it) + [(0, 1, '01'), (0, 2, '02')] + + TESTS: + + Non connected input graph:: + + sage: from sage.graphs.base.static_dense_graph import connected_full_subgraphs + sage: list(connected_full_subgraphs(Graph(2))) + Traceback (most recent call last) + ... + ValueError: the input (di)graph is not connected + + Too large degree:: + + sage: from sage.graphs.base.static_dense_graph import connected_full_subgraphs + sage: G = graphs.StarGraph(100) + sage: list(connected_full_subgraphs(G)) + Traceback (most recent call last) + ... + ValueError: the degree of the graph is too large for this method + """ + G._scream_if_not_simple() + if not G.is_connected(): + raise ValueError("the input (di)graph is not connected") + + for d in G.degree(): + if d >= 8 * sizeof(unsigned long) - 1: + raise ValueError("the degree of the graph is too large for this method") + + cdef Py_ssize_t n = G.order() + if n <= 2: + if edges_only: + return list(G.edges(sort=False, labels=labels)) + else: + return G.copy() + + # We map vertices to integers. We sort them by degree as a heuristic to + # reduce the number of operations. + cdef list int_to_vertex = sorted(G, key=G.degree) + cdef binary_matrix_t DG + sig_on() + dense_graph_init(DG, G, translation=int_to_vertex, force_undirected=True) + + cdef MemoryAllocator mem = MemoryAllocator() + cdef int * order = mem.calloc(n, sizeof(int)) + cdef unsigned long * n_cpt = mem.calloc(n, sizeof(unsigned long)) + + # We use a several bitsets to store the current boundary and active neighbors. + # We also need another bitset that we create at the same time + cdef binary_matrix_t boundaries + binary_matrix_init(boundaries, n + 1, n) + cdef binary_matrix_t neighborhoods + binary_matrix_init(neighborhoods, n, n) + sig_off() + + cdef bitset_t active = boundaries.rows[n] # remaining vertices to consider + cdef bitset_t boundary # neighbors of the current subset + + # Initialize the process + cdef Py_ssize_t i = 0 + order[0] = 0 + bitset_complement(active, active) + bitset_discard(active, 0) + bitset_copy(neighborhoods.rows[0], DG.rows[0]) + n_cpt[0] = 1 << bitset_len(DG.rows[0]) + + cdef long u, v, j + cdef unsigned long c + cdef list E = [] + cdef list edges + + while i >= 0: + sig_check() + if i == n - 1: + # yield the current solution + edges = [(int_to_vertex[u], int_to_vertex[v]) for le in E for u, v in le] + if edges_only: + if labels: + yield [(u, v, G.edge_label(u, v)) for u, v in edges] + else: + yield edges + else: + yield G.subgraph(vertices=int_to_vertex, edges=edges) + + if n_cpt[i] > 1: + # Consider the next neighborhood of the current vertex. + # If vertex u has k active neighbors, we have 2^k possibilities. We + # use the binary representation of n_cpt[i] to indicate which of the + # k neighbors are selected. We omit the empty neighborhood which is + # considered else where. + boundary = boundaries.rows[i + 1] + bitset_copy(boundary, boundaries.rows[i]) + n_cpt[i] -= 1 + c = n_cpt[i] + edges = [] + j = bitset_first(neighborhoods.rows[i]) + while c and j != -1: + if c & 1: + bitset_add(boundary, j) + edges.append((order[i], j)) + c >>= 1 + j = bitset_next(neighborhoods.rows[i], j + 1) + + if not bitset_len(boundary): + # We cannot extend + print("cannot extend") + continue + E.append(edges) + # otherwise, we select a vertex from the boundary and extend the order + + elif bitset_len(boundaries.rows[i]): + # We prepare the boundary for the selection of the next vertex. + # This is equivalalnt to consider an empty neighborhood. + bitset_copy(boundaries.rows[i + 1], boundaries.rows[i]) + bitset_clear(boundaries.rows[i]) # to prevent doing twice this operation + E.append([]) + + else: + # We have considered all possible extensions + bitset_add(active, order[i]) + i -= 1 + if E: + E.pop() + continue + + # We select a vertex from the boundary to add to the order + i += 1 + boundary = boundaries.rows[i] + u = bitset_first(boundary) + order[i] = u + bitset_discard(boundary, u) + bitset_discard(active, u) + # prepare neighborhood of u + bitset_and(neighborhoods.rows[i], active, DG.rows[u]) + j = bitset_len(neighborhoods.rows[i]) + n_cpt[i] = bool(j) << j # 0 if not j else 2^j + + sig_on() + binary_matrix_free(boundaries) + binary_matrix_free(neighborhoods) + binary_matrix_free(DG) + sig_off() + + def connected_subgraph_iterator(G, k=None, bint vertices_only=False): r""" Iterator over the induced connected subgraphs of order at most `k`. From f6136613085e0c9a8b74a9c3c4c8a4b44a87c3b7 Mon Sep 17 00:00:00 2001 From: dcoudert Date: Sat, 15 Oct 2022 19:33:04 +0200 Subject: [PATCH 194/751] trac #32136: extend method connected_subgraph_iterator to non-induced subgraphs --- src/sage/graphs/base/static_dense_graph.pyx | 66 +++++++++++++++++---- 1 file changed, 54 insertions(+), 12 deletions(-) diff --git a/src/sage/graphs/base/static_dense_graph.pyx b/src/sage/graphs/base/static_dense_graph.pyx index 98fd38c1118..dbb0dfdc06f 100644 --- a/src/sage/graphs/base/static_dense_graph.pyx +++ b/src/sage/graphs/base/static_dense_graph.pyx @@ -403,7 +403,7 @@ def connected_full_subgraphs(G, edges_only=False, labels=False): - ``edges_only`` -- boolean (default: ``False``); whether to return (Di)Graph or list of vertices - - ``labels`` -- boolean (default: ``False``); whether to return labeled + - ``labels`` -- boolean (default: ``False``); whether to return labelled edges or not. This parameter is used only when ``edges_only`` is ``True``. .. NOTE:: @@ -491,9 +491,10 @@ def connected_full_subgraphs(G, edges_only=False, labels=False): cdef Py_ssize_t n = G.order() if n <= 2: if edges_only: - return list(G.edges(sort=False, labels=labels)) + yield list(G.edges(sort=False, labels=labels)) else: - return G.copy() + yield G.copy() + return # We map vertices to integers. We sort them by degree as a heuristic to # reduce the number of operations. @@ -564,8 +565,8 @@ def connected_full_subgraphs(G, edges_only=False, labels=False): if not bitset_len(boundary): # We cannot extend - print("cannot extend") continue + E.append(edges) # otherwise, we select a vertex from the boundary and extend the order @@ -603,7 +604,8 @@ def connected_full_subgraphs(G, edges_only=False, labels=False): sig_off() -def connected_subgraph_iterator(G, k=None, bint vertices_only=False): +def connected_subgraph_iterator(G, k=None, bint vertices_only=False, + edges_only=False, labels=False, induced=True): r""" Iterator over the induced connected subgraphs of order at most `k`. @@ -626,7 +628,20 @@ def connected_subgraph_iterator(G, k=None, bint vertices_only=False): (equivalent to ``k == n``) - ``vertices_only`` -- boolean (default: ``False``); whether to return - (Di)Graph or list of vertices + (Di)Graph or list of vertices. This parameter is ignored when ``induced`` + is ``True``. + + - ``edges_only`` -- boolean (default: ``False``); whether to + return (Di)Graph or list of edges. When ``vertices_only`` is + ``True``, this parameter is ignored. + + - ``labels`` -- boolean (default: ``False``); whether to return labelled + edges or not. This parameter is used only when ``vertices_only`` is + ``False`` and ``edges_only`` is ``True``. + + - ``induced`` -- boolean (default: ``True``); whether to return induced + connected sub(di)graph only or also non-induced sub(di)graphs. + This parameter can be set to ``False`` for simple (di)graphs only. EXAMPLES:: @@ -667,6 +682,15 @@ def connected_subgraph_iterator(G, k=None, bint vertices_only=False): sage: list(G.connected_subgraph_iterator(vertices_only=True)) [[1], [1, 2], [2]] + sage: G = graphs.CompleteGraph(3) + sage: len(list(G.connected_subgraph_iterator())) + 7 + sage: len(list(G.connected_subgraph_iterator(vertices_only=True))) + 7 + sage: len(list(G.connected_subgraph_iterator(edges_only=True))) + 7 + sage: len(list(G.connected_subgraph_iterator(induced=False))) + TESTS: The Path Graph of order `n` has `n (n + 1) / 2` connected subgraphs:: @@ -707,6 +731,10 @@ def connected_subgraph_iterator(G, k=None, bint vertices_only=False): sage: len(list(G.connected_subgraph_iterator(vertices_only=True))) 3 """ + if not induced: + G._scream_if_not_simple() + vertices_only = False + cdef Py_ssize_t mk = G.order() if k is None else k cdef Py_ssize_t n = G.order() if not n or mk < 1: @@ -733,6 +761,7 @@ def connected_subgraph_iterator(G, k=None, bint vertices_only=False): cdef Py_ssize_t level cdef Py_ssize_t u, v, a + cdef list vertices # We first generate subsets containing vertex 0, then the subsets containing # vertex 1 but not vertex 0 since we have already generated all subsets @@ -740,10 +769,15 @@ def connected_subgraph_iterator(G, k=None, bint vertices_only=False): for u in range(n): sig_check() + vertices = [int_to_vertex[u]] if vertices_only: - yield [int_to_vertex[u]] + yield vertices else: - yield G.subgraph([int_to_vertex[u]]) + H = G.subgraph(vertices) + if edges_only: + yield H.edges(sort=False, labels=labels) + else: + yield H # We initialize the loop with vertices u in current, {u+1, ..., n-1} # in left, and N(u) in boundary @@ -783,12 +817,20 @@ def connected_subgraph_iterator(G, k=None, bint vertices_only=False): bitset_union(stack.rows[level + 2], boundary, DG.rows[v]) # We yield that new subset + vertices = [int_to_vertex[a] for a in range(u, n) + if bitset_in(stack.rows[level], a)] if vertices_only: - yield [int_to_vertex[a] for a in range(u, n) - if bitset_in(stack.rows[level], a)] + yield vertices else: - yield G.subgraph([int_to_vertex[a] for a in range(u, n) - if bitset_in(stack.rows[level], a)]) + H = G.subgraph(vertices) + if induced: + if edges_only: + yield H.edges(sort=False, labels=labels) + else: + yield H + else: + yield from connected_full_subgraphs(H, edges_only=edges_only, + labels=labels) else: # We cannot extend the current subset, either due to a lack of From 78d9d93f8cd2d70bb0328980b9895d14cda52fb7 Mon Sep 17 00:00:00 2001 From: dcoudert Date: Sat, 15 Oct 2022 19:59:28 +0200 Subject: [PATCH 195/751] trac #32136: fix doctests --- src/sage/graphs/base/static_dense_graph.pyx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sage/graphs/base/static_dense_graph.pyx b/src/sage/graphs/base/static_dense_graph.pyx index dbb0dfdc06f..a953a2b7a5e 100644 --- a/src/sage/graphs/base/static_dense_graph.pyx +++ b/src/sage/graphs/base/static_dense_graph.pyx @@ -467,7 +467,7 @@ def connected_full_subgraphs(G, edges_only=False, labels=False): sage: from sage.graphs.base.static_dense_graph import connected_full_subgraphs sage: list(connected_full_subgraphs(Graph(2))) - Traceback (most recent call last) + Traceback (most recent call last): ... ValueError: the input (di)graph is not connected @@ -476,7 +476,7 @@ def connected_full_subgraphs(G, edges_only=False, labels=False): sage: from sage.graphs.base.static_dense_graph import connected_full_subgraphs sage: G = graphs.StarGraph(100) sage: list(connected_full_subgraphs(G)) - Traceback (most recent call last) + Traceback (most recent call last): ... ValueError: the degree of the graph is too large for this method """ @@ -690,6 +690,7 @@ def connected_subgraph_iterator(G, k=None, bint vertices_only=False, sage: len(list(G.connected_subgraph_iterator(edges_only=True))) 7 sage: len(list(G.connected_subgraph_iterator(induced=False))) + 10 TESTS: From 9c3e732c201e7ab5a767f732a42ad034042583c4 Mon Sep 17 00:00:00 2001 From: dcoudert Date: Sun, 16 Oct 2022 15:05:05 +0200 Subject: [PATCH 196/751] trac #32136: fix typos --- src/sage/graphs/base/static_dense_graph.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/graphs/base/static_dense_graph.pyx b/src/sage/graphs/base/static_dense_graph.pyx index a953a2b7a5e..feee4df958e 100644 --- a/src/sage/graphs/base/static_dense_graph.pyx +++ b/src/sage/graphs/base/static_dense_graph.pyx @@ -389,7 +389,7 @@ def connected_full_subgraphs(G, edges_only=False, labels=False): `E_H \subseteq E` and `H` is connected. Hence, this method may yield a huge number of graphs. - When the input (di)graph `D` is not connected, this method returns nothing. + When the input (di)graph `G` is not connected, this method returns nothing. As for method :meth:`sage.graphs.generic_graph.connected_components`, edge orientation is ignored. Hence, the directed graph with a single arc `0 \to @@ -572,7 +572,7 @@ def connected_full_subgraphs(G, edges_only=False, labels=False): elif bitset_len(boundaries.rows[i]): # We prepare the boundary for the selection of the next vertex. - # This is equivalalnt to consider an empty neighborhood. + # This is equivalant to consider an empty neighborhood. bitset_copy(boundaries.rows[i + 1], boundaries.rows[i]) bitset_clear(boundaries.rows[i]) # to prevent doing twice this operation E.append([]) From 6d7ab9c14e94bffa959e9c310ee3d16529006d77 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Tue, 18 Oct 2022 14:56:08 +0200 Subject: [PATCH 197/751] initial commit --- src/doc/en/reference/combinat/module_list.rst | 1 + src/sage/combinat/all.py | 4 + src/sage/combinat/bijectionist.py | 2720 +++++++++++++++++ 3 files changed, 2725 insertions(+) create mode 100644 src/sage/combinat/bijectionist.py diff --git a/src/doc/en/reference/combinat/module_list.rst b/src/doc/en/reference/combinat/module_list.rst index e42e3891d45..cee2984b1e0 100644 --- a/src/doc/en/reference/combinat/module_list.rst +++ b/src/doc/en/reference/combinat/module_list.rst @@ -22,6 +22,7 @@ Comprehensive Module List sage/combinat/alternating_sign_matrix sage/combinat/backtrack sage/combinat/baxter_permutations + sage/combinat/bijectionist sage/combinat/binary_recurrence_sequences sage/combinat/binary_tree sage/combinat/blob_algebra diff --git a/src/sage/combinat/all.py b/src/sage/combinat/all.py index e0450a1fbe3..af3af86a1a8 100644 --- a/src/sage/combinat/all.py +++ b/src/sage/combinat/all.py @@ -27,6 +27,7 @@ - :ref:`sage.combinat.designs.all` - :ref:`sage.combinat.posets.all` - :ref:`sage.combinat.words` +- :ref:`sage.combinat.bijectionist` Utilities --------- @@ -298,3 +299,6 @@ # Path Tableaux lazy_import('sage.combinat.path_tableaux', 'catalog', as_='path_tableaux') + +# Bijectionist +lazy_import('sage.combinat.bijectionist', 'Bijectionist') diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py new file mode 100644 index 00000000000..452a013b470 --- /dev/null +++ b/src/sage/combinat/bijectionist.py @@ -0,0 +1,2720 @@ +# -*- coding: utf-8 -*- +# pylint: disable=all + +# TODO: (high): +# +# check whether it makes sense to keep a list of solutions, and keep +# a global MILP up to date with this list + +# TODO: (medium): +# +# can we somehow tweak gurobi so that +# minimal_subdistributions_iterator considers the minimal +# subdistributions with "smallest" (e.g., in the sorting order +# defined above) elements first? + +r""" +A bijectionist's toolkit + +AUTHORS: + +- Alexander Grosz, Tobias Kietreiber, Stephan Pfannerer and Martin + Rubey (2020): Initial version + +Quick reference +=============== + +.. csv-table:: + :class: contentstable + :widths: 30, 70 + :delim: | + + :meth:`~Bijectionist.set_intertwining_relations` | Set + :meth:`~Bijectionist.set_constant_blocks` | Set + :meth:`~Bijectionist.set_statistics` | Set + :meth:`~Bijectionist.set_value_restrictions` | Set + :meth:`~Bijectionist.set_distributions` | Set + + :meth:`~Bijectionist.statistics_table` | Return + :meth:`~Bijectionist.statistics_fibers` | Return + + :meth:`~Bijectionist.constant_blocks` | Return + :meth:`~Bijectionist.solutions_iterator` | Return + :meth:`~Bijectionist.possible_values` | Return + :meth:`~Bijectionist.minimal_subdistributions_iterator` | Return + :meth:`~Bijectionist.minimal_subdistributions_blocks_iterator` | Return + +A guided tour +============= + + EXAMPLES: + + We find a statistic `s` such that + `(s, wex, fix) \sim (llis, des, adj)`:: + + sage: N = 3 + sage: As = [list(Permutations(n)) for n in range(N+1)] + sage: A = B = sum(As, []) + sage: alpha1 = lambda p: len(p.weak_excedences()) + sage: alpha2 = lambda p: len(p.fixed_points()) + sage: beta1 = lambda p: len(p.descents(final_descent=True)) if p else 0 + sage: beta2 = lambda p: len([e for (e, f) in zip(p, p[1:]+[0]) if e == f+1]) + sage: tau = Permutation.longest_increasing_subsequence_length + sage: def rotate_permutation(p): + ....: cycle = Permutation(tuple(range(1, len(p)+1))) + ....: return Permutation([cycle.inverse()(p(cycle(i))) for i in range(1, len(p)+1)]) + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_statistics((len, len), (alpha1, beta1), (alpha2, beta2)) + sage: a, b = bij.statistics_table() + sage: table(a, header_row=True, frame=True) + +-----------+--------+--------+--------+ + | a | α_1(a) | α_2(a) | α_3(a) | + +===========+========+========+========+ + | [] | 0 | 0 | 0 | + +-----------+--------+--------+--------+ + | [1] | 1 | 1 | 1 | + +-----------+--------+--------+--------+ + | [1, 2] | 2 | 2 | 2 | + +-----------+--------+--------+--------+ + | [2, 1] | 2 | 1 | 0 | + +-----------+--------+--------+--------+ + | [1, 2, 3] | 3 | 3 | 3 | + +-----------+--------+--------+--------+ + | [1, 3, 2] | 3 | 2 | 1 | + +-----------+--------+--------+--------+ + | [2, 1, 3] | 3 | 2 | 1 | + +-----------+--------+--------+--------+ + | [2, 3, 1] | 3 | 2 | 0 | + +-----------+--------+--------+--------+ + | [3, 1, 2] | 3 | 1 | 0 | + +-----------+--------+--------+--------+ + | [3, 2, 1] | 3 | 2 | 1 | + +-----------+--------+--------+--------+ + + sage: table(b, header_row=True, frame=True) + +-----------+---+--------+--------+--------+ + | b | τ | β_1(b) | β_2(b) | β_3(b) | + +===========+===+========+========+========+ + | [] | 0 | 0 | 0 | 0 | + +-----------+---+--------+--------+--------+ + | [1] | 1 | 1 | 1 | 1 | + +-----------+---+--------+--------+--------+ + | [1, 2] | 2 | 2 | 1 | 0 | + +-----------+---+--------+--------+--------+ + | [2, 1] | 1 | 2 | 2 | 2 | + +-----------+---+--------+--------+--------+ + | [1, 2, 3] | 3 | 3 | 1 | 0 | + +-----------+---+--------+--------+--------+ + | [1, 3, 2] | 2 | 3 | 2 | 1 | + +-----------+---+--------+--------+--------+ + | [2, 1, 3] | 2 | 3 | 2 | 1 | + +-----------+---+--------+--------+--------+ + | [2, 3, 1] | 2 | 3 | 2 | 1 | + +-----------+---+--------+--------+--------+ + | [3, 1, 2] | 2 | 3 | 2 | 0 | + +-----------+---+--------+--------+--------+ + | [3, 2, 1] | 1 | 3 | 3 | 3 | + +-----------+---+--------+--------+--------+ + + sage: from sage.combinat.cyclic_sieving_phenomenon import orbit_decomposition + sage: bij.set_constant_blocks(sum([orbit_decomposition(A, rotate_permutation) for A in As], [])) + sage: bij.constant_blocks() + {{[1, 3, 2], [2, 1, 3], [3, 2, 1]}} + sage: next(bij.solutions_iterator()) + {[]: 0, + [1]: 1, + [1, 2]: 1, + [1, 2, 3]: 1, + [1, 3, 2]: 2, + [2, 1]: 2, + [2, 1, 3]: 2, + [2, 3, 1]: 2, + [3, 1, 2]: 3, + [3, 2, 1]: 2} + + There is no rotation invariant statistic on non crossing set partitions which is equidistributed + with the Strahler number on ordered trees:: + + sage: N=8; As = [[SetPartition(d.to_noncrossing_partition()) for d in DyckWords(n)] for n in range(N)] + sage: A = sum(As, []) + sage: B = sum([list(OrderedTrees(n)) for n in range(1, N+1)], []) + sage: theta = lambda m: SetPartition([[i % m.size() + 1 for i in b] for b in m]) + + The following code is equivalent to ``tau = findstat(397)``:: + + sage: def tau(T): + ....: if len(T) == 0: + ....: return 1 + ....: else: + ....: l = [tau(S) for S in T] + ....: m = max(l) + ....: if l.count(m) == 1: + ....: return m + ....: else: + ....: return m+1 + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_statistics((lambda a: a.size(), lambda b: b.node_number()-1)) + sage: from sage.combinat.cyclic_sieving_phenomenon import orbit_decomposition + sage: bij.set_constant_blocks(sum([orbit_decomposition(A_n, theta) for A_n in As], [])) + sage: list(bij.solutions_iterator()) + [] + + An example identifying `s` and `S`:: + + sage: N = 4 + sage: A = [dyck_word for n in range(1, N) for dyck_word in DyckWords(n)] + sage: B = [binary_tree for n in range(1, N) for binary_tree in BinaryTrees(n)] + sage: concat_path = lambda D1, D2: DyckWord(list(D1) + list(D2)) + sage: concat_tree = lambda B1, B2: concat_path(B1.to_dyck_word(), + ....: B2.to_dyck_word()).to_binary_tree() + sage: bij = Bijectionist(A, B) + sage: bij.set_intertwining_relations((2, concat_path, concat_tree)) + sage: bij.set_statistics((lambda d: d.semilength(), lambda t: t.node_number())) + sage: for D in bij.minimal_subdistributions_iterator(): + ....: ascii_art(D) + ( [ /\ ], [ o ] ) + ( [ o ] ) + ( [ \ ] ) + ( [ /\/\ ], [ o ] ) + ( [ o ] ) + ( [ /\ ] [ / ] ) + ( [ / \ ], [ o ] ) + ( [ o ] ) + ( [ \ ] ) + ( [ o ] ) + ( [ \ ] ) + ( [ /\/\/\ ], [ o ] ) + ( [ o ] ) + ( [ \ ] ) + ( [ o ] ) + ( [ /\ ] [ / ] ) + ( [ /\/ \ ], [ o ] ) + ( [ o ] ) + ( [ /\ ] [ / \ ] ) + ( [ / \/\ ], [ o o ] ) + ( [ o, o ] ) + ( [ / / ] ) + ( [ /\ ] [ o o ] ) + ( [ /\/\ / \ ] [ \ / ] ) + ( [ / \, / \ ], [ o o ] ) + + TESTS: + + The following failed before commit c6d4d2e8804aa42afa08c72c887d50c725cc1a91:: + + sage: N=4; A = B = [permutation for n in range(N) for permutation in Permutations(n)] + sage: theta = lambda pi: Permutation([x+1 if x != len(pi) else 1 for x in pi[-1:]+pi[:-1]]) + sage: def tau(pi): + ....: n = len(pi) + ....: return sum([1 for i in range(1, n+1) for j in range(1, n+1) + ....: if i +# Stephan Pfannerer +# Tobias Kietreiber +# Alexander Grosz +# +# Distributed under the terms of the GNU General Public License (GPL) +# +# This code is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# The full text of the GPL is available at: +# +# https://www.gnu.org/licenses/ +# *************************************************************************** +import itertools +from collections import namedtuple +from sage.numerical.mip import MixedIntegerLinearProgram, MIPSolverException +from sage.rings.integer_ring import ZZ +from sage.combinat.set_partition import SetPartition +from sage.sets.disjoint_set import DisjointSet +from sage.structure.sage_object import SageObject +from copy import copy, deepcopy +from sage.misc.verbose import get_verbose + +# TODO: (low) für sagemath sollten wir Zeilen möglichst auf 79 +# Zeichen beschränken, das ist zwar nicht streng, wird aber lieber +# gesehen. + +# TODO: (low) we frequently need variable names for subsets of A, B, +# Z. In LaTeX, we mostly call them \tilde A, \tilde Z, etc. now. It +# would be good to have a standard name in code, too. + +# TODO: (medium) wann immer möglich, sollten die Tests in einer +# Methode nur diese eine Methode testen. Wir haben in fast allen +# Methoden "system tests", das ist unpraktisch, wenn man größere +# Änderungen durchführt. + + +class Bijectionist(SageObject): + r"""Solver class for bijection-statistic problems. + + INPUT: + + - ``A``, ``B`` -- sets of equal size, given as a list + + - ``tau`` (optional, default: ``None``) -- a function from ``B`` + to ``Z``, in case of ``None``, the identity map ``lambda x: x`` + is used + + - ``alpha`` (optional) -- a statistic from ``A`` to ``W`` + + - ``beta`` (optional) -- a statistic from ``B`` to ``W`` + + - ``P`` (optional) -- a partition of ``A`` + + - ``pi_rho`` (optional) -- a triple ``(k, pi, rho)`` where + + - ``pi`` is a ``k``-ary operation composing objects in ``A`` + and + + - ``rho`` is a ``k``-ary function composing statistic values + in `Z` + + ``W`` and ``Z`` can be arbitrary sets. As a natural example we + may think of the natural numbers or tuples of integers. + + We are looking for a statistic `s: A\to Z` and a bijection `S: + A\to B` such that + + - `s = \tau \circ S`: the statistics `s` and `\tau` are + equidistributed and `S` is an intertwining bijection. + + - `\alpha = \beta \circ S`: the statistics `\alpha` and `\beta` + are equidistributed and `S` is an intertwining bijection. + + - `s` is constant on the blocks of `P`. + + - `s(\pi(a_1,\dots, a_k)) = \rho(s(a_1),\dots, s(a_k))`. + + Additionally, we may require that + + - `s(a)\in Z_a` for specified sets `Z_a\subseteq Z`, and + + - `s|_{\tilde A}` has a specified distribution for specified sets + `\tilde A \subset A`. + + If `\tau` is the identity, the two unknown functions `s` and `S` + coincide. Although we do not exclude other bijective choices for + `\tau`, they probably do not make sense. + + If we want that `S` is graded, i.e. if elements of `A` and `B` + have a notion of size and `S` should preserve this size, we can + add grading statistics as `\alpha` and `\beta`. Since `\alpha` + and `\beta` will be equidistributed with `S` as an intertwining + bijection, `S` will then also be graded. + + In summary, we have the following two commutative diagrams, where + `s` and `S` are unknown functions. + + .. MATH:: + + \begin{array}{rrl} + & A \\ + {\scriptstyle\alpha}\swarrow & {\scriptstyle S}\downarrow & \searrow{\scriptstyle s}\\ + W \overset{\beta}{\leftarrow} & B & \overset{\tau}{\rightarrow} Z + \end{array} + \qquad + \begin{array}{lcl} + A^k &\overset{\pi}{\rightarrow} & A\\ + \downarrow{\scriptstyle s^k} & & \downarrow{\scriptstyle s}\\ + Z^k &\overset{\rho}{\rightarrow} & Z\\ + \end{array} + + .. NOTE:: + + If `\tau` is the identity map, the partition `P` of `A` + necessarily consists only of singletons. + + .. NOTE:: + + The order of invocation of the methods with prefix ``set``, + i.e., :meth:`set_statistics`, + :meth:`set_intertwining_relations`, + :meth:`set_constant_blocks`, etc., is irrelevant. Calling + any of these methods a second time overrides the previous + specification. + + """ + def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], pi_rho=tuple(), elements_distributions=tuple(), a_values=tuple(), solver=None, key=None): + # glossary of standard letters: + # A, B, Z, W ... finite sets + # ???? tilde_A, tilde_Z, ..., subsets? + # P ... set partition of A + # a in A, b in B, p in P + # S: A -> B + # alpha: A -> W, beta: B -> W + # s: A -> Z, tau: B -> Z + # k arity of pi and rho + # pi: A^k -> A, rho: Z^k -> Z + # a_tuple in A^k + + assert len(A) == len(set(A)), "A must have distinct items" + assert len(B) == len(set(B)), "B must have distinct items" + self._A = A + self._B = B + self._sorter = {} + self._sorter["A"] = lambda x: sorted(x, key=self._A.index) + self._sorter["B"] = lambda x: sorted(x, key=self._B.index) + + if tau is None: + self._tau = {b: b for b in self._B} + else: + self._tau = {b: tau(b) for b in self._B} + self._Z = set(self._tau.values()) + if key is not None and "Z" in key: + self._sorter["Z"] = lambda x: sorted(x, key=key["Z"]) + self._Z = self._sorter["Z"](self._Z) + else: + try: + self._Z = sorted(self._Z) + self._sorter["Z"] = lambda x: sorted(x) + except TypeError: + self._sorter["Z"] = lambda x: list(x) + self._Z = list(self._Z) + + # set optional inputs + self.set_statistics(*alpha_beta) + self.set_value_restrictions(*a_values) + self.set_distributions(*elements_distributions) + self.set_intertwining_relations(*pi_rho) + self.set_constant_blocks(P) + + self._solver = solver + + def set_constant_blocks(self, P): + r""" + Declare that `s: A\to Z` is constant on each block of `P`. + + .. WARNING:: + + Any restriction imposed by a previous invocation of + :meth:`set_constant_blocks` will be overwritten, + including restrictions discovered by + :meth:`set_intertwining_relations` and + :meth:`solutions_iterator`! + + A common example is to use the orbits of a bijection acting + on `A`. This can be achieved using the function + :meth:`~sage.combinat.cyclic_sieving_phenomenon.orbit_decomposition`. + + INPUT: + + - ``P`` -- a set partition of `A`, singletons may be omitted + + EXAMPLES: + + Initially the partitions are set to singleton blocks. The + current partition can be reviewed using + :meth:`constant_blocks`:: + + sage: A = B = list('abcd') + sage: bij = Bijectionist(A, B, lambda x: B.index(x) % 2) + sage: bij.constant_blocks() + {} + + sage: bij.set_constant_blocks([['a', 'c']]) + sage: bij.constant_blocks() + {{'a', 'c'}} + + We now add a map that combines some blocks:: + + sage: pi = lambda p1, p2: 'abcdefgh'[A.index(p1) + A.index(p2)] + sage: rho = lambda s1, s2: (s1 + s2) % 2 + sage: bij.set_intertwining_relations((2, pi, rho)) + sage: list(bij.solutions_iterator()) + [{'a': 0, 'b': 1, 'c': 0, 'd': 1}] + sage: bij.constant_blocks() + {{'a', 'c'}, {'b', 'd'}} + + Setting constant blocks overrides any previous assignment:: + + sage: bij.set_constant_blocks([['a', 'b']]) + sage: bij.constant_blocks() + {{'a', 'b'}} + + If there is no solution, and the coarsest partition is + requested, an error is raised:: + + sage: bij.constant_blocks(optimal=True) + Traceback (most recent call last): + ... + MIPSolverException: ... + + """ + self._P = DisjointSet(self._A) + P = sorted(self._sorter["A"](p) for p in P) + for p in P: + for a in p: + self._P.union(p[0], a) + + self._compute_possible_block_values() + + def constant_blocks(self, singletons=False, optimal=False): + r""" + Return the set partition `P` of `A` such that `s: A\to Z` is + known to be constant on the blocks of `P`. + + INPUT: + + - ``singletons`` (optional, default: ``False``) -- whether or + not to include singleton blocks in the output + + - ``optimal`` (optional, default: ``False``) -- whether or + not to compute the coarsest possible partition + + .. NOTE:: + + computing the coarsest possible partition may be + computationally expensive, but may speed up generating + solutions. + + EXAMPLES:: + + sage: A = B = ["a", "b", "c"] + sage: bij = Bijectionist(A, B, lambda x: 0) + sage: bij.set_constant_blocks([["a", "b"]]) + sage: bij.constant_blocks() + {{'a', 'b'}} + + sage: bij.constant_blocks(singletons=True) + {{'a', 'b'}, {'c'}} + + """ + if optimal: + self._forced_constant_blocks() + if singletons: + return SetPartition(self._P) + return SetPartition(p for p in self._P if len(p) > 1) + + def set_statistics(self, *alpha_beta): + r""" + Set constraints of the form `\alpha = \beta\circ S`. + + .. WARNING:: + + Any restriction imposed by a previous invocation of + :meth:`set_statistics` will be overwritten! + + INPUT: + + - ``alpha_beta`` -- one or more pairs `(\alpha: A\to W, + \beta: B\to W)` + + If the statistics `\alpha` and `\beta` are not + equidistributed, an error is raised. + + EXAMPLES: + + We look for bijections `S` on permutations such that the + number of weak exceedences of `S(\pi)` equals the number of + descents of `\pi`, and statistics `s`, such that the number + of fixed points of `S(\pi)` equals `s(\pi)`:: + + sage: N = 4; A = B = [permutation for n in range(N) for permutation in Permutations(n)] + sage: wex = lambda p: len(p.weak_excedences()) + sage: fix = lambda p: len(p.fixed_points()) + sage: des = lambda p: len(p.descents(final_descent=True)) if p else 0 + sage: adj = lambda p: len([e for (e, f) in zip(p, p[1:]+[0]) if e == f+1]) + sage: bij = Bijectionist(A, B, fix) + sage: bij.set_statistics((wex, des), (len, len)) + sage: for solution in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): + ....: print(solution) + {[]: 0, [1]: 1, [1, 2]: 0, [2, 1]: 2, [1, 2, 3]: 1, [1, 3, 2]: 0, [2, 1, 3]: 0, [2, 3, 1]: 1, [3, 1, 2]: 3, [3, 2, 1]: 1} + {[]: 0, [1]: 1, [1, 2]: 0, [2, 1]: 2, [1, 2, 3]: 1, [1, 3, 2]: 0, [2, 1, 3]: 1, [2, 3, 1]: 0, [3, 1, 2]: 3, [3, 2, 1]: 1} + {[]: 0, [1]: 1, [1, 2]: 0, [2, 1]: 2, [1, 2, 3]: 1, [1, 3, 2]: 0, [2, 1, 3]: 1, [2, 3, 1]: 1, [3, 1, 2]: 3, [3, 2, 1]: 0} + {[]: 0, [1]: 1, [1, 2]: 0, [2, 1]: 2, [1, 2, 3]: 1, [1, 3, 2]: 1, [2, 1, 3]: 0, [2, 3, 1]: 0, [3, 1, 2]: 3, [3, 2, 1]: 1} + {[]: 0, [1]: 1, [1, 2]: 0, [2, 1]: 2, [1, 2, 3]: 1, [1, 3, 2]: 1, [2, 1, 3]: 0, [2, 3, 1]: 1, [3, 1, 2]: 3, [3, 2, 1]: 0} + {[]: 0, [1]: 1, [1, 2]: 0, [2, 1]: 2, [1, 2, 3]: 1, [1, 3, 2]: 1, [2, 1, 3]: 1, [2, 3, 1]: 0, [3, 1, 2]: 3, [3, 2, 1]: 0} + + sage: bij = Bijectionist(A, B, fix) + sage: bij.set_statistics((wex, des), (fix, adj), (len, len)) + sage: for solution in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): + ....: print(solution) + {[]: 0, [1]: 1, [1, 2]: 0, [2, 1]: 2, [1, 2, 3]: 1, [1, 3, 2]: 0, [2, 1, 3]: 1, [2, 3, 1]: 0, [3, 1, 2]: 3, [3, 2, 1]: 1} + {[]: 0, [1]: 1, [1, 2]: 0, [2, 1]: 2, [1, 2, 3]: 1, [1, 3, 2]: 1, [2, 1, 3]: 0, [2, 3, 1]: 0, [3, 1, 2]: 3, [3, 2, 1]: 1} + {[]: 0, [1]: 1, [1, 2]: 0, [2, 1]: 2, [1, 2, 3]: 1, [1, 3, 2]: 1, [2, 1, 3]: 1, [2, 3, 1]: 0, [3, 1, 2]: 3, [3, 2, 1]: 0} + + Calling this with non-equidistributed statistics yields an error:: + + sage: bij = Bijectionist(A, B, fix) + sage: bij.set_statistics((wex, fix)) + Traceback (most recent call last): + ... + ValueError: Statistics alpha and beta are not equidistributed! + + TESTS: + + Calling ``set_statistics`` without arguments should restore the previous state.:: + + sage: N = 3; A = B = [permutation for n in range(N) for permutation in Permutations(n)] + sage: wex = lambda p: len(p.weak_excedences()) + sage: fix = lambda p: len(p.fixed_points()) + sage: des = lambda p: len(p.descents(final_descent=True)) if p else 0 + sage: bij = Bijectionist(A, B, fix) + sage: bij.set_statistics((wex, des), (len, len)) + sage: for solution in bij.solutions_iterator(): + ....: print(solution) + {[]: 0, [1]: 1, [1, 2]: 0, [2, 1]: 2} + sage: bij.set_statistics() + sage: for solution in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): + ....: print(solution) + {[]: 0, [1]: 0, [1, 2]: 1, [2, 1]: 2} + {[]: 0, [1]: 0, [1, 2]: 2, [2, 1]: 1} + {[]: 0, [1]: 1, [1, 2]: 0, [2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 0} + {[]: 0, [1]: 2, [1, 2]: 0, [2, 1]: 1} + {[]: 0, [1]: 2, [1, 2]: 1, [2, 1]: 0} + {[]: 1, [1]: 0, [1, 2]: 0, [2, 1]: 2} + {[]: 1, [1]: 0, [1, 2]: 2, [2, 1]: 0} + {[]: 1, [1]: 2, [1, 2]: 0, [2, 1]: 0} + {[]: 2, [1]: 0, [1, 2]: 0, [2, 1]: 1} + {[]: 2, [1]: 0, [1, 2]: 1, [2, 1]: 0} + {[]: 2, [1]: 1, [1, 2]: 0, [2, 1]: 0} + + """ + # reset values + self._statistics_possible_values = {a: set(self._Z) for a in self._A} + + self._n_statistics = len(alpha_beta) + # TODO: (low) do we really want to recompute statistics every time? + self._alpha = lambda p: tuple(arg[0](p) for arg in alpha_beta) + self._beta = lambda p: tuple(arg[1](p) for arg in alpha_beta) + + # generate fibers + self._statistics_fibers = {} + for a in self._A: + v = self._alpha(a) + if v not in self._statistics_fibers: + self._statistics_fibers[v] = ([], []) + self._statistics_fibers[v][0].append(a) + + for b in self._B: + v = self._beta(b) + if v not in self._statistics_fibers: + raise ValueError(f"Statistics alpha and beta do not have the same image, {v} is not a value of alpha, but of beta!") + self._statistics_fibers[v][1].append(b) + + # check compatibility + if not all(len(fiber[0]) == len(fiber[1]) + for fiber in self._statistics_fibers.values()): + raise ValueError("Statistics alpha and beta are not equidistributed!") + + self._W = list(self._statistics_fibers) + + # the possible values of s(a) are tau(beta^{-1}(alpha(a))) + self._statistics_possible_values = {a: set(self._tau[b] + for b in self._statistics_fibers[self._alpha(a)][1]) + for a in self._A} + + def statistics_fibers(self): + r""" + Return a dictionary mapping statistic values in `W` to their + preimages in `A` and `B`. + + This is a (computationally) fast way to obtain a first + impression which objects in `A` should be mapped to which + objects in `B`. + + EXAMPLES:: + + sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] + sage: tau = Permutation.longest_increasing_subsequence_length + sage: wex = lambda p: len(p.weak_excedences()) + sage: fix = lambda p: len(p.fixed_points()) + sage: des = lambda p: len(p.descents(final_descent=True)) if p else 0 + sage: adj = lambda p: len([e for (e, f) in zip(p, p[1:]+[0]) if e == f+1]) + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_statistics((len, len), (wex, des), (fix, adj)) + sage: table([[key, AB[0], AB[1]] for key, AB in bij.statistics_fibers().items()]) + (0, 0, 0) [[]] [[]] + (1, 1, 1) [[1]] [[1]] + (2, 2, 2) [[1, 2]] [[2, 1]] + (2, 1, 0) [[2, 1]] [[1, 2]] + (3, 3, 3) [[1, 2, 3]] [[3, 2, 1]] + (3, 2, 1) [[1, 3, 2], [2, 1, 3], [3, 2, 1]] [[1, 3, 2], [2, 1, 3], [2, 3, 1]] + (3, 2, 0) [[2, 3, 1]] [[3, 1, 2]] + (3, 1, 0) [[3, 1, 2]] [[1, 2, 3]] + + """ + return self._statistics_fibers + + def statistics_table(self, header=True): + r""" + Provide information about all elements of `A` with corresponding + `\alpha` values and all elements of `B` with corresponding + `\beta` and `\tau` values. + + INPUT: + + - ``header`` (optional, default: ``True``) -- whether to + include a header with the standard greek letters. + + OUTPUT: + + A pair of lists suitable for :class:`~sage.misc.table.table`, + where + + - the first contains the elements of `A` together with the + values of `\alpha` + + - the second contains the elements of `B` together with the + values of `\tau` and `\beta` + + EXAMPLES:: + + sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] + sage: tau = Permutation.longest_increasing_subsequence_length + sage: wex = lambda p: len(p.weak_excedences()) + sage: fix = lambda p: len(p.fixed_points()) + sage: des = lambda p: len(p.descents(final_descent=True)) if p else 0 + sage: adj = lambda p: len([e for (e, f) in zip(p, p[1:]+[0]) if e == f+1]) + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_statistics((wex, des), (fix, adj)) + sage: a, b = bij.statistics_table() + sage: table(a, header_row=True, frame=True) + +-----------+--------+--------+ + | a | α_1(a) | α_2(a) | + +===========+========+========+ + | [] | 0 | 0 | + +-----------+--------+--------+ + | [1] | 1 | 1 | + +-----------+--------+--------+ + | [1, 2] | 2 | 2 | + +-----------+--------+--------+ + | [2, 1] | 1 | 0 | + +-----------+--------+--------+ + | [1, 2, 3] | 3 | 3 | + +-----------+--------+--------+ + | [1, 3, 2] | 2 | 1 | + +-----------+--------+--------+ + | [2, 1, 3] | 2 | 1 | + +-----------+--------+--------+ + | [2, 3, 1] | 2 | 0 | + +-----------+--------+--------+ + | [3, 1, 2] | 1 | 0 | + +-----------+--------+--------+ + | [3, 2, 1] | 2 | 1 | + +-----------+--------+--------+ + sage: table(b, header_row=True, frame=True) + +-----------+---+--------+--------+ + | b | τ | β_1(b) | β_2(b) | + +===========+===+========+========+ + | [] | 0 | 0 | 0 | + +-----------+---+--------+--------+ + | [1] | 1 | 1 | 1 | + +-----------+---+--------+--------+ + | [1, 2] | 2 | 1 | 0 | + +-----------+---+--------+--------+ + | [2, 1] | 1 | 2 | 2 | + +-----------+---+--------+--------+ + | [1, 2, 3] | 3 | 1 | 0 | + +-----------+---+--------+--------+ + | [1, 3, 2] | 2 | 2 | 1 | + +-----------+---+--------+--------+ + | [2, 1, 3] | 2 | 2 | 1 | + +-----------+---+--------+--------+ + | [2, 3, 1] | 2 | 2 | 1 | + +-----------+---+--------+--------+ + | [3, 1, 2] | 2 | 2 | 0 | + +-----------+---+--------+--------+ + | [3, 2, 1] | 1 | 3 | 3 | + +-----------+---+--------+--------+ + + TESTS: + + If no statistics are given, the table should still be able to be generated:: + + sage: A = B = [permutation for n in range(3) for permutation in Permutations(n)] + sage: tau = Permutation.longest_increasing_subsequence_length + sage: bij = Bijectionist(A, B, tau) + sage: a, b = bij.statistics_table() + sage: table(a, header_row=True, frame=True) + +--------+ + | a | + +========+ + | [] | + +--------+ + | [1] | + +--------+ + | [1, 2] | + +--------+ + | [2, 1] | + +--------+ + sage: table(b, header_row=True, frame=True) + +--------+---+ + | b | τ | + +========+===+ + | [] | 0 | + +--------+---+ + | [1] | 1 | + +--------+---+ + | [1, 2] | 2 | + +--------+---+ + | [2, 1] | 1 | + +--------+---+ + + We can omit the header:: + + sage: bij.statistics_table(header=True)[1] + [['b', 'τ'], [[], 0], [[1], 1], [[1, 2], 2], [[2, 1], 1]] + sage: bij.statistics_table(header=False)[1] + [[[], 0], [[1], 1], [[1, 2], 2], [[2, 1], 1]] + + """ + # table for alpha + n_statistics = self._n_statistics + if header: + output_alphas = [["a"] + ["\u03b1_" + str(i) + "(a)" + for i in range(1, n_statistics + 1)]] + else: + output_alphas = [] + + for a in self._A: + if n_statistics > 0: + output_alphas.append([a] + list(self._alpha(a))) + else: + output_alphas.append([a]) + + # table for beta and tau + if header: + output_tau_betas = [["b", "\u03c4"] + ["\u03b2_" + str(i) + "(b)" + for i in range(1, n_statistics + 1)]] + else: + output_tau_betas = [] + for b in self._B: + if n_statistics > 0: + output_tau_betas.append([b, self._tau[b]] + list(self._beta(b))) + else: + output_tau_betas.append([b, self._tau[b]]) + + return output_alphas, output_tau_betas + + def set_value_restrictions(self, *a_values): + r""" + Restrict the set of possible values `s(a)` for a given element + `a`. + + .. WARNING:: + + Any restriction imposed by a previous invocation of + :meth:`set_value_restrictions` will be overwritten! + + INPUT: + + - ``a_values`` -- one or more pairs `(a\in A, \tilde + Z\subseteq Z)` + + EXAMPLES: + + We may want to restrict the value of a given element to a + single or multiple values. We do not require that the + specified values are in the image of `\tau`. In some + cases, the restriction may not be able to provide a better + solution, as for size 3 in the following example. :: + + sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] + sage: tau = Permutation.longest_increasing_subsequence_length + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_statistics((len, len)) + sage: bij.set_value_restrictions((Permutation([1, 2]), [1]), + ....: (Permutation([3, 2, 1]), [2, 3, 4])) + sage: for sol in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): + ....: print(sol) + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 1, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 3} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 1, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 3, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 1, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 3, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 1, [1, 3, 2]: 2, [2, 1, 3]: 3, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 1, [1, 3, 2]: 3, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 2, [1, 3, 2]: 1, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 3} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 2, [1, 3, 2]: 1, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 3, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 2, [1, 3, 2]: 1, [2, 1, 3]: 2, [2, 3, 1]: 3, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 2, [1, 3, 2]: 1, [2, 1, 3]: 3, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 2, [1, 3, 2]: 2, [2, 1, 3]: 1, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 3} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 2, [1, 3, 2]: 2, [2, 1, 3]: 1, [2, 3, 1]: 2, [3, 1, 2]: 3, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 2, [1, 3, 2]: 2, [2, 1, 3]: 1, [2, 3, 1]: 3, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 2, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 1, [3, 1, 2]: 2, [3, 2, 1]: 3} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 2, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 1, [3, 1, 2]: 3, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 2, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 1, [3, 2, 1]: 3} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 2, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 3, [3, 1, 2]: 1, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 2, [1, 3, 2]: 2, [2, 1, 3]: 3, [2, 3, 1]: 1, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 2, [1, 3, 2]: 2, [2, 1, 3]: 3, [2, 3, 1]: 2, [3, 1, 2]: 1, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 2, [1, 3, 2]: 3, [2, 1, 3]: 1, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 2, [1, 3, 2]: 3, [2, 1, 3]: 2, [2, 3, 1]: 1, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 2, [1, 3, 2]: 3, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 1, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 3, [1, 3, 2]: 1, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 3, [1, 3, 2]: 2, [2, 1, 3]: 1, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 3, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 1, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 3, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 1, [3, 2, 1]: 2} + + However, an error occurs if the set of possible values is + empty. In this example, the image of `\tau` under any + legal bijection is disjoint to the specified values. :: TODO: we now have to call _compute_possible_block_values() for the error message. Is this intended behaviour? + + sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] + sage: tau = Permutation.longest_increasing_subsequence_length + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_value_restrictions((Permutation([1, 2]), [4, 5])) + sage: bij._compute_possible_block_values() + Traceback (most recent call last): + ... + ValueError: No possible values found for singleton block [[1, 2]] + + TESTS:: + + sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] + sage: tau = Permutation.longest_increasing_subsequence_length + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_constant_blocks([[permutation for permutation in Permutations(n)] for n in range(4)]) + sage: bij.set_value_restrictions((Permutation([1, 2]), [4, 5])) + sage: bij._compute_possible_block_values() + Traceback (most recent call last): + ... + ValueError: No possible values found for block [[1, 2], [2, 1]] + + sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] + sage: tau = Permutation.longest_increasing_subsequence_length + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_value_restrictions(((1, 2), [4, 5, 6])) + Traceback (most recent call last): + ... + AssertionError: Element (1, 2) was not found in A + + """ + # reset values + self._restrictions_possible_values = {a: set(self._Z) for a in self._A} + for a, values in a_values: + assert a in self._A, f"Element {a} was not found in A" + self._restrictions_possible_values[a].intersection_update(values) + + def _compute_possible_block_values(self): + r""" + Update the dictionary of possible values of each block. + """ + self._possible_block_values = {} # P -> Power(Z) + for p, block in self._P.root_to_elements_dict().items(): + self._possible_block_values[p] = set.intersection(*[self._restrictions_possible_values[a] for a in block], *[self._statistics_possible_values[a] for a in block]) + if not self._possible_block_values[p]: + if len(block) == 1: + raise ValueError(f"No possible values found for singleton block {block}") + else: + raise ValueError(f"No possible values found for block {block}") + + def set_distributions(self, *elements_distributions): + r""" + Specify the distribution of `s` for a subset of elements. + + .. WARNING:: + + Any restriction imposed by a previous invocation of + :meth:`set_distributions` will be overwritten! + + INPUT: + + - one or more pairs of `(\tilde A\subseteq A, \tilde Z)`, + where `\tilde Z` is a list of values in `Z` of the same + size as `\tilde A` + + This method specifies that `\{s(a) | a\in\tilde A\}` equals + ``\tilde Z`` as a multiset for each of the pairs. + + When specifying several distributions, the subsets of `A` do + not have to be disjoint. + + EXAMPLES:: + + sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] + sage: tau = Permutation.longest_increasing_subsequence_length + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_statistics((len, len)) + sage: bij.set_distributions(([Permutation([1, 2, 3]), Permutation([1, 3, 2])], [1, 3])) + sage: for sol in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): + ....: print(sol) + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 1, [1, 3, 2]: 3, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 3, [1, 3, 2]: 1, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 1, [1, 3, 2]: 3, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 3, [1, 3, 2]: 1, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 2} + + sage: bij.constant_blocks(optimal=True) + {{[2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]}} + sage: sorted(bij.minimal_subdistributions_blocks_iterator(), key=lambda d: (len(d[0]), d[0])) + [([[]], [0]), + ([[1]], [1]), + ([[2, 1, 3]], [2]), + ([[1, 2], [2, 1]], [1, 2]), + ([[1, 2, 3], [1, 3, 2]], [1, 3])] + + We may also specify multiple, possibly overlapping distributions:: + + sage: bij.set_distributions(([Permutation([1, 2, 3]), Permutation([1, 3, 2])], [1, 3]), + ....: ([Permutation([1, 3, 2]), Permutation([3, 2, 1]), + ....: Permutation([2, 1, 3])], [1, 2, 2])) + sage: for sol in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): + ....: print(sol) + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 3, [1, 3, 2]: 1, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 3, [1, 3, 2]: 1, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 2} + + sage: bij.constant_blocks(optimal=True) + {{[1], [1, 3, 2]}, {[2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1]}} + sage: sorted(bij.minimal_subdistributions_blocks_iterator(), key=lambda d: (len(d[0]), d[0])) + [([[]], [0]), + ([[1]], [1]), + ([[1, 2, 3]], [3]), + ([[2, 1, 3]], [2]), + ([[1, 2], [2, 1]], [1, 2])] + + TESTS: + + Because of the current implementation of the output + calculation, we do not improve our solution if we do not gain + any unique solutions.:: + + sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] + sage: tau = Permutation.longest_increasing_subsequence_length + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_statistics((len, len)) + sage: bij.set_distributions(([Permutation([1, 2, 3]), Permutation([1, 3, 2])], [2, 3])) + sage: for sol in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): + ....: print(sol) + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 2, [1, 3, 2]: 3, [2, 1, 3]: 1, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 2, [1, 3, 2]: 3, [2, 1, 3]: 2, [2, 3, 1]: 1, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 2, [1, 3, 2]: 3, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 1, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 2, [1, 3, 2]: 3, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 1} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 3, [1, 3, 2]: 2, [2, 1, 3]: 1, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 3, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 1, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 3, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 1, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 3, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 1} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 2, [1, 3, 2]: 3, [2, 1, 3]: 1, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 2, [1, 3, 2]: 3, [2, 1, 3]: 2, [2, 3, 1]: 1, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 2, [1, 3, 2]: 3, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 1, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 2, [1, 3, 2]: 3, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 1} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 3, [1, 3, 2]: 2, [2, 1, 3]: 1, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 3, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 1, [3, 1, 2]: 2, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 3, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 1, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 3, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 1} + + Another example with statistics:: + + sage: bij = Bijectionist(A, B, tau) + sage: alpha = lambda p: p(1) if len(p) > 0 else 0 + sage: beta = lambda p: p(1) if len(p) > 0 else 0 + sage: bij.set_statistics((alpha, beta), (len, len)) + sage: for sol in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): + ....: print(sol) + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 2, [1, 3, 2]: 3, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 1, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 2, [1, 3, 2]: 3, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 1} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 3, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 1, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 3, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 1} + + The solution above is not unique. We can add a feasible distribution to force uniqueness:: + + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_statistics((alpha, beta), (len, len)) + sage: bij.set_distributions(([Permutation([1, 2, 3]), Permutation([3, 2, 1])], [1, 3])) + sage: for sol in bij.solutions_iterator(): + ....: print(sol) + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 3, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 1} + + Let us try to add a distribution that cannot be satisfied, + because there is no solution where a permutation that starts + with 1 is mapped onto 1:: + + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_statistics((alpha, beta), (len, len)) + sage: bij.set_distributions(([Permutation([1, 2, 3]), Permutation([1, 3, 2])], [1, 3])) + sage: list(bij.solutions_iterator()) + [] + + The specified elements have to be in `A` and have to be of the same size:: + + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_statistics((len, len)) + sage: bij.set_distributions(([Permutation([1, 2, 3, 4])], [1])) + Traceback (most recent call last): + ... + ValueError: Element [1, 2, 3, 4] was not found in A! + sage: bij.set_distributions(([Permutation([1, 2, 3])], [-1])) + Traceback (most recent call last): + ... + ValueError: Value -1 was not found in tau(A)! + + Note that the same error occurs when an element that is not the first element of the list is + not in `A`. + + """ + for elements, values in elements_distributions: + assert len(elements) == len(values), f"{elements} and {values} are not of the same size!" + for a, z in zip(elements, values): + if a not in self._A: + raise ValueError(f"Element {a} was not found in A!") + if z not in self._Z: + raise ValueError(f"Value {z} was not found in tau(A)!") + self._elements_distributions = elements_distributions + + def set_intertwining_relations(self, *pi_rho): + r""" + Add restrictions of the form `s(\pi(a_1,\dots, a_k)) = + \rho(s(a_1),\dots, s(a_k))`. + + .. WARNING:: + + Any restriction imposed by a previous invocation of + :meth:`set_intertwining_relations` will be overwritten! + + INPUT: + + - ``pi_rho`` -- one or more tuples `(k, \pi: A^k\to A, \rho: + Z^k\to Z, \tilde A)` where `\tilde A` (optional) is an + `k`-ary function that returns true if and only if an + `k`-tuple of objects in `A` is in the domain of `\pi` + + EXAMPLES: + + We can concatenate two permutations, by increasing the values + of the second permutation by the length of the first + permutation:: + + sage: concat = lambda p1, p2: Permutation(p1 + [i + len(p1) for i in p2]) + + We may be interested in statistics on permutations which are + equidistributed with the number of fixed points, such that + concatenating permutations corresponds to adding statistic + values:: + + sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] + sage: bij = Bijectionist(A, B, Permutation.number_of_fixed_points) + sage: bij.set_statistics((len, len)) + sage: for solution in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): + ....: print(solution) + ... + {[]: 0, [1]: 1, [1, 2]: 0, [2, 1]: 2, [1, 2, 3]: 1, [1, 3, 2]: 0, [2, 1, 3]: 0, [2, 3, 1]: 1, [3, 1, 2]: 1, [3, 2, 1]: 3} + ... + {[]: 0, [1]: 1, [1, 2]: 0, [2, 1]: 2, [1, 2, 3]: 1, [1, 3, 2]: 1, [2, 1, 3]: 3, [2, 3, 1]: 0, [3, 1, 2]: 0, [3, 2, 1]: 1} + ... + + sage: bij.set_intertwining_relations((2, concat, lambda x, y: x + y)) + sage: for solution in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): + ....: print(solution) + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 0, [1, 2, 3]: 3, [1, 3, 2]: 1, [2, 1, 3]: 1, [2, 3, 1]: 0, [3, 1, 2]: 0, [3, 2, 1]: 1} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 0, [1, 2, 3]: 3, [1, 3, 2]: 1, [2, 1, 3]: 1, [2, 3, 1]: 0, [3, 1, 2]: 1, [3, 2, 1]: 0} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 0, [1, 2, 3]: 3, [1, 3, 2]: 1, [2, 1, 3]: 1, [2, 3, 1]: 1, [3, 1, 2]: 0, [3, 2, 1]: 0} + + The domain of the composition may be restricted. E.g., if we + concatenate only permutations starting with a 1, we obtain + fewer forced elements:: + + sage: in_domain = lambda p1, p2: (not p1 or p1(1) == 1) and (not p2 or p2(1) == 1) + sage: bij.set_intertwining_relations((2, concat, lambda x, y: x + y, in_domain)) + sage: for solution in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): + ....: print(solution) + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 0, [1, 2, 3]: 3, [1, 3, 2]: 0, [2, 1, 3]: 0, [2, 3, 1]: 1, [3, 1, 2]: 1, [3, 2, 1]: 1} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 0, [1, 2, 3]: 3, [1, 3, 2]: 0, [2, 1, 3]: 1, [2, 3, 1]: 0, [3, 1, 2]: 1, [3, 2, 1]: 1} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 0, [1, 2, 3]: 3, [1, 3, 2]: 0, [2, 1, 3]: 1, [2, 3, 1]: 1, [3, 1, 2]: 0, [3, 2, 1]: 1} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 0, [1, 2, 3]: 3, [1, 3, 2]: 0, [2, 1, 3]: 1, [2, 3, 1]: 1, [3, 1, 2]: 1, [3, 2, 1]: 0} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 0, [1, 2, 3]: 3, [1, 3, 2]: 1, [2, 1, 3]: 0, [2, 3, 1]: 0, [3, 1, 2]: 1, [3, 2, 1]: 1} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 0, [1, 2, 3]: 3, [1, 3, 2]: 1, [2, 1, 3]: 0, [2, 3, 1]: 1, [3, 1, 2]: 0, [3, 2, 1]: 1} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 0, [1, 2, 3]: 3, [1, 3, 2]: 1, [2, 1, 3]: 0, [2, 3, 1]: 1, [3, 1, 2]: 1, [3, 2, 1]: 0} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 0, [1, 2, 3]: 3, [1, 3, 2]: 1, [2, 1, 3]: 1, [2, 3, 1]: 0, [3, 1, 2]: 0, [3, 2, 1]: 1} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 0, [1, 2, 3]: 3, [1, 3, 2]: 1, [2, 1, 3]: 1, [2, 3, 1]: 0, [3, 1, 2]: 1, [3, 2, 1]: 0} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 0, [1, 2, 3]: 3, [1, 3, 2]: 1, [2, 1, 3]: 1, [2, 3, 1]: 1, [3, 1, 2]: 0, [3, 2, 1]: 0} + + We can also restrict according to several composition + functions. For example, we may additionally concatenate + permutations by incrementing the elements of the first:: + + sage: skew_concat = lambda p1, p2: Permutation([i + len(p2) for i in p1] + list(p2)) + sage: bij.set_intertwining_relations((2, skew_concat, lambda x, y: x + y)) + sage: for solution in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): + ....: print(solution) + {[]: 0, [1]: 1, [1, 2]: 0, [2, 1]: 2, [1, 2, 3]: 0, [1, 3, 2]: 0, [2, 1, 3]: 1, [2, 3, 1]: 1, [3, 1, 2]: 1, [3, 2, 1]: 3} + {[]: 0, [1]: 1, [1, 2]: 0, [2, 1]: 2, [1, 2, 3]: 0, [1, 3, 2]: 1, [2, 1, 3]: 0, [2, 3, 1]: 1, [3, 1, 2]: 1, [3, 2, 1]: 3} + {[]: 0, [1]: 1, [1, 2]: 0, [2, 1]: 2, [1, 2, 3]: 1, [1, 3, 2]: 0, [2, 1, 3]: 0, [2, 3, 1]: 1, [3, 1, 2]: 1, [3, 2, 1]: 3} + + However, this yields no solution:: + + sage: bij.set_intertwining_relations((2, concat, lambda x, y: x + y), (2, skew_concat, lambda x, y: x + y)) + sage: list(bij.solutions_iterator()) + [] + + """ + Pi_Rho = namedtuple("Pi_Rho", "numargs pi rho domain") + self._pi_rho = [] + + for pi_rho_tuple in pi_rho: + if len(pi_rho_tuple) == 3: + k, pi, rho = pi_rho_tuple + domain = None + else: + k, pi, rho, domain = pi_rho_tuple + + self._pi_rho.append(Pi_Rho(numargs=k, pi=pi, rho=rho, domain=domain)) + + def _forced_constant_blocks(self): + r""" + Modify current partition into blocks to the coarsest possible + one, meaning that after calling this function for every two + distinct blocks `p_1`, `p_2` there exists a solution `s` with + `s(p_1)\neq s(p_2)`. + + ALGORITHM: + + First we generate an initial solution. For all blocks i, j + that have the same value under this initial solution, we add + the constraint `x[i, z] + x[j, z] <= 1` for all possible + values `z\in Z`. This constraint ensures that the `s` differs + on the two blocks. If this modified problem does not have a + solution, we know that the two blocks always have the same + value and join them. Then we save all values of this new + solution and continue looking at pairs of blocks that had the + same value under all calculated solutions, until no blocks + can be joined anymore. + + EXAMPLES: + + The easiest example is given by a constant `tau`, so everything + is forced to be the same value: + + sage: A = B = [permutation for n in range(3) for permutation in Permutations(n)] + sage: bij = Bijectionist(A, B, lambda x: 0) + sage: bij.constant_blocks() + {} + sage: bij.constant_blocks(optimal=True) + {{[], [1], [1, 2], [2, 1]}} + + In this other example we look at permutations with length 2 and 3:: + + sage: N = 4 + sage: A = B = [permutation for n in range(2, N) for permutation in Permutations(n)] + sage: tau = lambda p: p[0] if len(p) else 0 + sage: add_n = lambda p1: Permutation(p1 + [1 + len(p1)]) + sage: add_1 = lambda p1: Permutation([1] + [1 + i for i in p1]) + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_intertwining_relations((1, add_n, lambda x: x + 1), (1, add_1, lambda x: x + 1)) + sage: bij.set_statistics((len, len)) + + sage: bij.constant_blocks() + {} + sage: bij.constant_blocks(optimal=True) + {{[1, 3, 2], [2, 1, 3]}} + + Indeed, ``[1,3,2]`` and ``[2,1,3]`` have the same value in + all solutions, but different values are possible:: + + sage: pi1 = Permutation([1,3,2]); pi2 = Permutation([2,1,3]); + sage: set([(solution[pi1], solution[pi2]) for solution in bij.solutions_iterator()]) + {(2, 2), (3, 3)} + + Another example involving the cycle type of permutations:: + + sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] + sage: bij = Bijectionist(A, B, lambda x: x.cycle_type()) + + Let us require that each permutation has the same value as its inverse:: + + sage: from sage.combinat.cyclic_sieving_phenomenon import orbit_decomposition + sage: P = orbit_decomposition([permutation for n in range(4) for permutation in Permutations(n)], Permutation.inverse) + sage: bij.set_constant_blocks(P) + sage: bij.constant_blocks() + {{[2, 3, 1], [3, 1, 2]}} + + sage: concat = lambda p1, p2: Permutation(p1 + [i + len(p1) for i in p2]) + sage: union = lambda p1, p2: Partition(sorted(list(p1) + list(p2), reverse=True)) + sage: bij.set_intertwining_relations((2, concat, union)) + + In this case we do not discover constant blocks by looking at the intertwining_relations only:: + + sage: next(bij.solutions_iterator()) + ... + sage: bij.constant_blocks() + {{[2, 3, 1], [3, 1, 2]}} + + sage: bij.constant_blocks(optimal=True) + {{[1, 3, 2], [2, 1, 3], [3, 2, 1]}, {[2, 3, 1], [3, 1, 2]}} + + TESTS:: + + sage: N = 4 + sage: A = B = [permutation for n in range(N + 1) for permutation in Permutations(n)] + sage: alpha1 = lambda p: len(p.weak_excedences()) + sage: alpha2 = lambda p: len(p.fixed_points()) + sage: beta1 = lambda p: len(p.descents(final_descent=True)) if p else 0 + sage: beta2 = lambda p: len([e for (e, f) in zip(p, p[1:] + [0]) if e == f + 1]) + sage: tau = Permutation.longest_increasing_subsequence_length + sage: def rotate_permutation(p): + ....: cycle = Permutation(tuple(range(1, len(p) + 1))) + ....: return Permutation([cycle.inverse()(p(cycle(i))) for i in range(1, len(p) + 1)]) + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_statistics((alpha1, beta1), (alpha2, beta2)) + sage: from sage.combinat.cyclic_sieving_phenomenon import orbit_decomposition + sage: bij.set_constant_blocks(orbit_decomposition(A, rotate_permutation)) + sage: for p in bij.constant_blocks(): print(list(p)) + [[2, 1, 3, 4], [1, 2, 4, 3], [1, 3, 2, 4], [4, 2, 3, 1]] + [[3, 2, 1], [1, 3, 2], [2, 1, 3]] + [[2, 4, 3, 1], [3, 2, 4, 1], [2, 3, 1, 4], [1, 3, 4, 2]] + [[1, 4, 2, 3], [3, 1, 2, 4], [4, 2, 1, 3], [4, 1, 3, 2]] + [[1, 4, 3, 2], [3, 2, 1, 4]] + [[2, 1, 4, 3], [4, 3, 2, 1]] + [[2, 4, 1, 3], [3, 4, 2, 1], [4, 3, 1, 2], [3, 1, 4, 2]] + + sage: for p in bij.constant_blocks(optimal=True): sorted(p, key=len) + [[1], [1, 2], [1, 2, 3], [1, 2, 3, 4]] + [[1, 3, 2], + [2, 1, 3], + [3, 2, 1], + [2, 3, 4, 1], + [1, 3, 4, 2], + [2, 1, 3, 4], + [1, 3, 2, 4], + [2, 3, 1, 4], + [1, 2, 4, 3], + [3, 2, 4, 1], + [2, 1, 4, 3], + [2, 4, 3, 1], + [4, 2, 3, 1], + [4, 3, 2, 1], + [1, 4, 3, 2], + [3, 2, 1, 4]] + [[1, 4, 2, 3], + [4, 2, 1, 3], + [2, 4, 1, 3], + [4, 3, 1, 2], + [4, 1, 3, 2], + [3, 4, 2, 1], + [3, 1, 2, 4], + [3, 1, 4, 2]] + + The permutation `[2, 1]` is in none of these blocks:: + + sage: bij.set_constant_blocks(orbit_decomposition(A, rotate_permutation)) + sage: all(s[Permutation([2, 1])] == s[Permutation([1])] for s in bij.solutions_iterator()) + False + + sage: all(s[Permutation([2, 1])] == s[Permutation([1, 3, 2])] for s in bij.solutions_iterator()) + False + + sage: all(s[Permutation([2, 1])] == s[Permutation([1, 4, 2, 3])] for s in bij.solutions_iterator()) + False + + + + sage: A = B = ["a", "b", "c", "d", "e", "f"] + sage: tau = {"a": 1, "b": 1, "c": 3, "d": 4, "e": 5, "f": 6}.get + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_distributions((["a", "b"], [1, 1]), (["c", "d", "e"], [3, 4, 5])) + sage: bij.constant_blocks() + {} + sage: bij.constant_blocks(optimal=True) + {{'a', 'b'}} + + sage: A = B = ["a", "b", "c", "d", "e", "f"] + sage: tau = {"a": 1, "b": 1, "c": 5, "d": 4, "e": 4, "f": 6}.get + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_distributions((["a", "b"], [1, 1]), (["d", "e"], [4, 4])) + sage: bij.constant_blocks(optimal=True) + {{'a', 'b'}, {'d', 'e'}} + + sage: A = B = ["a", "b", "c", "d"] + sage: tau = {"a": 1, "b": 1, "c": 2, "d": 2}.get + sage: bij = Bijectionist(A, B, tau) + sage: bij.constant_blocks(optimal=True) + {} + sage: bij.set_constant_blocks([["a", "b"]]) + sage: bij.constant_blocks() + {{'a', 'b'}} + sage: bij.constant_blocks(optimal=True) + {{'a', 'b'}, {'c', 'd'}} + + """ + bmilp = self._generate_and_solve_initial_bmilp() # may throw Exception + + # generate blockwise preimage to determine which blocks have the same image + solution = self._solution_by_blocks(bmilp) + multiple_preimages = {(value,): preimages + for value, preimages in _invert_dict(solution).items() + if len(preimages) > 1} + + # check for each pair of blocks if a solution with different values on these block exists + # if yes, use the new solution to update the multiple_preimages dictionary, restart the check + # if no, the two blocks can be joined + + # _P has to be copied to not mess with the solution-process + # since we do not want to regenerate the bmilp in each step, so blocks + # have to stay consistent during the whole process + tmp_P = deepcopy(self._P) + updated_preimages = True + while updated_preimages: + updated_preimages = False + for values in copy(multiple_preimages): # copy to be able to modify dict + if updated_preimages: + break + for i, j in itertools.combinations(copy(multiple_preimages[values]), r=2): # copy to be able to modify list + bmilp_veto = deepcopy(bmilp) # adding constraints to a simple copy adds them to the original instance, too + try: + # veto the two blocks having the same value + for z in self._possible_block_values[i]: + if z in self._possible_block_values[j]: # intersection + bmilp_veto.milp.add_constraint(bmilp_veto._x[i, z] + bmilp_veto._x[j, z] <= 1) + bmilp_veto.milp.solve() + + # solution exists, update dictionary + solution = self._solution_by_blocks(bmilp_veto) + updated_multiple_preimages = {} + for values in multiple_preimages: + for p in multiple_preimages[values]: + solution_tuple = (*values, solution[p]) # tuple so actual solutions were equal in lookup + if solution_tuple not in updated_multiple_preimages: + updated_multiple_preimages[solution_tuple] = [] + updated_multiple_preimages[solution_tuple].append(p) + updated_preimages = True + multiple_preimages = updated_multiple_preimages + break + except MIPSolverException: + # no solution exists, join blocks + tmp_P.union(i, j) + if i in multiple_preimages[values] and j in multiple_preimages[values]: # only one of the joined blocks should remain in the list + multiple_preimages[values].remove(j) + if len(multiple_preimages[values]) == 1: + del multiple_preimages[values] + break + + self.set_constant_blocks(tmp_P) + + def possible_values(self, p=None, optimal=False): + r""" + Return for each block the values of `s` compatible with the + imposed restrictions. + + TODO: should this method update and return ``self._possible_block_values``? + + INPUT: + + - ``p`` (optional, default: ``None``) -- a block of `P`, or + an element of a block of `P`, or a list of these + + - ``optimal`` (optional, default: ``False``) -- whether or + not to compute the minimal possible set of statistic values, + throws a MIPSolverException if no solution is found. + + .. NOTE:: + + computing the minimal possible set of statistic values + may be computationally expensive. + + TESTS:: + + sage: A = B = ["a", "b", "c", "d"] + sage: tau = {"a": 1, "b": 1, "c": 2, "d": 2}.get + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_constant_blocks([["a", "b"]]) + + Test if all formats are really possible:: + + sage: bij.possible_values(p="a") + {'a': {1, 2}, 'b': {1, 2}} + sage: bij.possible_values(p=["a", "b"]) + {'a': {1, 2}, 'b': {1, 2}} + sage: bij.possible_values(p=[["a", "b"]]) + {'a': {1, 2}, 'b': {1, 2}} + sage: bij.possible_values(p=[["a", "b"], ["c"]]) + {'a': {1, 2}, 'b': {1, 2}, 'c': {1, 2}} + + Test optimal:: + + sage: bij.possible_values(p=["a", "c"], optimal=True) + {'a': {1, 2}, 'b': {1, 2}, 'c': {1, 2}} + + Verify by listing all solutions:: + + sage: sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))) + [{'a': 1, 'b': 1, 'c': 2, 'd': 2}, {'a': 2, 'b': 2, 'c': 1, 'd': 1}] + + Test if MIPSolverException is thrown:: + + sage: A = B = list('ab') + sage: bij = Bijectionist(A, B, lambda x: B.index(x) % 2) + sage: bij.set_constant_blocks([['a', 'b']]) + sage: bij.possible_values(p="a") + {'a': {0, 1}, 'b': {0, 1}} + sage: bij.possible_values(p="a", optimal=True) + Traceback (most recent call last): + ... + sage.numerical.mip.MIPSolverException: ... + + Another example:: + + sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] + sage: tau = Permutation.longest_increasing_subsequence_length + sage: bij = Bijectionist(A, B, tau) + sage: alpha = lambda p: p(1) if len(p) > 0 else 0 + sage: beta = lambda p: p(1) if len(p) > 0 else 0 + sage: bij.set_statistics((alpha, beta), (len, len)) + sage: for sol in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): + ....: print(sol) + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 2, [1, 3, 2]: 3, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 1, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 2, [1, 3, 2]: 3, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 1} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 3, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 1, [3, 2, 1]: 2} + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 3, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 1} + sage: bij.possible_values(p=[Permutation([1]), Permutation([1, 2, 3]), Permutation([3, 1, 2])], optimal=True) + {[1]: {1}, [1, 2, 3]: {2, 3}, [3, 1, 2]: {1, 2}} + + Another example:: + + sage: N = 2; A = B = [dyck_word for n in range(N+1) for dyck_word in DyckWords(n)] + sage: tau = lambda D: D.number_of_touch_points() + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_statistics((lambda d: d.semilength(), lambda d: d.semilength())) + sage: for solution in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): + ....: print(solution) + {[]: 0, [1, 0]: 1, [1, 0, 1, 0]: 1, [1, 1, 0, 0]: 2} + {[]: 0, [1, 0]: 1, [1, 0, 1, 0]: 2, [1, 1, 0, 0]: 1} + sage: bij.possible_values(p=[DyckWord([]), DyckWord([1, 0]), DyckWord([1, 0, 1, 0]), DyckWord([1, 1, 0, 0])], optimal=True) + {[]: {0}, [1, 0]: {1}, [1, 0, 1, 0]: {1, 2}, [1, 1, 0, 0]: {1, 2}} + + .. TODO: + + test der zeigt, dass die Lösung für alle Blöcke nicht + langsamer ist als mit solutions_iterator + + """ + # convert input to set of block representatives + blocks = set() + if p in self._A: + blocks.add(self._P.find(p)) + elif type(p) is list: + for p1 in p: + if p1 in self._A: + blocks.add(self._P.find(p1)) + elif type(p1) is list: + for p2 in p1: + blocks.add(self._P.find(p2)) + + if optimal: + # function adding a solution to dict of solutions + def add_solution(solutions, solution): + for p, value in solution.items(): + if p not in solutions: + solutions[p] = set() + solutions[p].add(value) + + # generate initial solution, solution dict and add solution + bmilp = self._generate_and_solve_initial_bmilp() + solution = self._solution(bmilp) + solutions = {} + add_solution(solutions, solution) + + # iterate through blocks and generate all values + for p in blocks: + veto_bmilp = deepcopy(bmilp) # adding constraints to a simple copy adds them to the original instance, too + for value in solutions[p]: + veto_bmilp.milp.add_constraint(veto_bmilp._x[p, value] == 0) + while True: + try: + veto_bmilp.milp.solve() + # problem has a solution, so new value was found + solution = self._solution(veto_bmilp) + add_solution(solutions, solution) + # veto new value and try again + veto_bmilp.milp.add_constraint(veto_bmilp._x[p, solution[p]] == 0) + except MIPSolverException: + # no solution, so all possible values have been found + break + + # TODO: update possible block values if wanted + + # create dictionary to return + possible_values = {} + for p in blocks: + for a in self._P.root_to_elements_dict()[p]: # TODO: is this the format we want to return in or possible_values[block]? + if optimal: + possible_values[a] = solutions[p] + else: + possible_values[a] = self._possible_block_values[p] + + return possible_values + + def minimal_subdistributions_iterator(self, tA=None): + r""" + Return all minimal subsets `\tilde A` of `A` containing `tA` + together with submultisets `\tilde Z` with `s(\tilde A) = + \tilde Z` as multisets. + + TODO: should this method interact with ``self._elements_distributions``? + + INPUT: + + - ``tA`` (optional, default: ``None``) -- a subset of `A` TODO: add this + + If ``tA`` is not ``None``, return an iterator of the + subdistributions containing ``tA``. + + TESTS:: + + sage: A = B = [permutation for n in range(3) for permutation in Permutations(n)] + sage: bij = Bijectionist(A, B, len) + sage: bij.set_statistics((len, len)) + sage: for sol in bij.solutions_iterator(): + ....: print(sol) + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 2} + sage: sorted(bij.minimal_subdistributions_iterator()) + [([[]], [0]), ([[1]], [1]), ([[1, 2]], [2]), ([[2, 1]], [2])] + + Another example:: + + sage: N = 2; A = B = [dyck_word for n in range(N+1) for dyck_word in DyckWords(n)] + sage: tau = lambda D: D.number_of_touch_points() + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_statistics((lambda d: d.semilength(), lambda d: d.semilength())) + sage: for solution in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): + ....: print(solution) + {[]: 0, [1, 0]: 1, [1, 0, 1, 0]: 1, [1, 1, 0, 0]: 2} + {[]: 0, [1, 0]: 1, [1, 0, 1, 0]: 2, [1, 1, 0, 0]: 1} + sage: for subdistribution in bij.minimal_subdistributions_iterator(): + ....: print(subdistribution) + ([[]], [0]) + ([[1, 0]], [1]) + ([[1, 0, 1, 0], [1, 1, 0, 0]], [1, 2]) + + An example with two elements of the same block in a subdistribution:: + + sage: A = B = ["a", "b", "c", "d", "e"] + sage: tau = {"a": 1, "b": 1, "c": 2, "d": 2, "e": 3}.get + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_constant_blocks([["a", "b"]]) + sage: bij.set_value_restrictions(("a", [1, 2])) + sage: bij.constant_blocks(optimal=True) + {{'a', 'b'}} + sage: list(bij.minimal_subdistributions_iterator()) + [(['a', 'b', 'c', 'd', 'e'], [1, 1, 2, 2, 3])] + """ + # see + # https://mathoverflow.net/questions/406751/find-a-subdistribution/406975 + # and + # https://gitlab.com/mantepse/bijection-tools/-/issues/29 + + minimal_subdistribution = MixedIntegerLinearProgram(maximization=False, solver=self._solver) + D = minimal_subdistribution.new_variable(binary=True) # the subset of elements + V = minimal_subdistribution.new_variable(integer=True) # the subdistribution + minimal_subdistribution.set_objective(sum(D[a] for a in self._A)) + minimal_subdistribution.add_constraint(sum(D[a] for a in self._A) >= 1) + + try: + bmilp = self._generate_and_solve_initial_bmilp() + except MIPSolverException: + return + s = self._solution(bmilp) + while True: + for v in self._Z: + minimal_subdistribution.add_constraint(sum(D[a] for a in self._A if s[a] == v) == V[v]) + try: + minimal_subdistribution.solve() + except MIPSolverException: + return + d = minimal_subdistribution.get_values(D) # a dict from A to {0, 1} + new_s = self._find_counter_example(bmilp, s, d) + if new_s is None: + values = self._sorter["Z"](s[a] for a in self._A if d[a]) + yield ([a for a in self._A if d[a]], values) + + # get all variables with value 1 + active_vars = [D[a] for a in self._A + if minimal_subdistribution.get_values(D[a])] + + # add constraint that not all of these can be 1, thus vetoing + # the current solution + minimal_subdistribution.add_constraint(sum(active_vars) <= len(active_vars) - 1, + name="veto") + # TODO: can we ignore that in the next step the same constraint is added again? + else: + s = new_s + + def _find_counter_example(self, bmilp, s0, d): + r""" + Return a solution `s` such that ``d`` is not a subdistribution of + `s0`. + + TODO: better name + + INPUT: + + - ``bmilp``, the mixed linear integer program + + - ``s0``, a solution + + - ``d``, a subset of `A`, in the form of a dict from `A` to `\{0, 1\}` + """ + for v in self._Z: + v_in_d_count = sum(d[a] for a in self._A if s0[a] == v) + if not v_in_d_count: + continue + + veto_bmilp = deepcopy(bmilp) # adding constraints to a simple copy adds them to the original instance, too + # try to find a solution which has a different + # subdistribution on d than s0 + v_in_d = sum(d[a] * veto_bmilp._x[self._P.find(a), v] + for a in self._A + if v in self._possible_block_values[self._P.find(a)]) + + # it is sufficient to require that v occurs less often as + # a value among {a | d[a] == 1} than it does in + # v_in_d_count, because, if the distributions are + # different, one such v must exist + veto_bmilp.milp.add_constraint(v_in_d <= v_in_d_count - 1) + try: + veto_bmilp.milp.solve() + return self._solution(veto_bmilp) + except MIPSolverException: + pass + return + + def minimal_subdistributions_blocks_iterator(self, p=None): + r"""Return all representatives of minimal subsets `\tilde P` + of `P` containing `p` together with submultisets `\tilde Z` + with `s(\tilde P) = \tilde Z` as multisets. + + .. WARNING:: + + If there are several solutions with the same support + (i.e., the sets of block representatives are the same), + only one of these will be found, even if the + distributions are different, see the doctest below. To + find all solutions, use + :meth:`minimal_subdistributions_iterator`, which is, + however, computationally more expensive. + + TODO: should this method interact with ``self._elements_distributions``? + + INPUT: + + - ``p`` (optional, default: ``None``) -- a subset of `P` TODO: add this + + If ``p`` is not ``None``, return an iterator of the + subdistributions containing ``p``. + + EXAMPLES:: + + sage: A = B = [permutation for n in range(3) for permutation in Permutations(n)] + sage: bij = Bijectionist(A, B, len) + sage: bij.set_statistics((len, len)) + sage: for sol in bij.solutions_iterator(): + ....: print(sol) + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 2} + sage: sorted(bij.minimal_subdistributions_blocks_iterator()) + [([[]], [0]), ([[1]], [1]), ([[1, 2]], [2]), ([[2, 1]], [2])] + + Another example:: + + sage: N = 2; A = B = [dyck_word for n in range(N+1) for dyck_word in DyckWords(n)] + sage: tau = lambda D: D.number_of_touch_points() + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_statistics((lambda d: d.semilength(), lambda d: d.semilength())) + sage: for solution in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): + ....: print(solution) + {[]: 0, [1, 0]: 1, [1, 0, 1, 0]: 1, [1, 1, 0, 0]: 2} + {[]: 0, [1, 0]: 1, [1, 0, 1, 0]: 2, [1, 1, 0, 0]: 1} + sage: for subdistribution in bij.minimal_subdistributions_blocks_iterator(): + ....: print(subdistribution) + ([[]], [0]) + ([[1, 0]], [1]) + ([[1, 0, 1, 0], [1, 1, 0, 0]], [1, 2]) + + An example with two elements of the same block in a subdistribution:: + + sage: A = B = ["a", "b", "c", "d", "e"] + sage: tau = {"a": 1, "b": 1, "c": 2, "d": 2, "e": 3}.get + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_constant_blocks([["a", "b"]]) + sage: bij.set_value_restrictions(("a", [1, 2])) + sage: bij.constant_blocks(optimal=True) + {{'a', 'b'}} + sage: list(bij.minimal_subdistributions_blocks_iterator()) + [(['a', 'a', 'c', 'd', 'e'], [1, 1, 2, 2, 3])] + + An example with overlapping minimal subdistributions:: + + sage: A = B = ["a", "b", "c", "d", "e"] + sage: tau = {"a": 1, "b": 1, "c": 2, "d": 2, "e": 3}.get + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_distributions((["a", "b"], [1, 2]), (["a", "c", "d"], [1, 2, 3])) + sage: sorted(bij.solutions_iterator(), key=lambda d: tuple(sorted(d.items()))) + [{'a': 1, 'b': 2, 'c': 2, 'd': 3, 'e': 1}, + {'a': 1, 'b': 2, 'c': 3, 'd': 2, 'e': 1}, + {'a': 2, 'b': 1, 'c': 1, 'd': 3, 'e': 2}, + {'a': 2, 'b': 1, 'c': 3, 'd': 1, 'e': 2}] + sage: bij.constant_blocks(optimal=True) + {{'a', 'e'}} + sage: list(bij.minimal_subdistributions_blocks_iterator()) + [(['a', 'b'], [1, 2]), (['a', 'c', 'd'], [1, 2, 3])] + + Fedor Petrov's example from https://mathoverflow.net/q/424187:: + + sage: A = B = ["a"+str(i) for i in range(1, 9)] + ["b"+str(i) for i in range(3, 9)] + ["d"] + sage: tau = {b: 0 if i < 10 else 1 for i, b in enumerate(B)}.get + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_constant_blocks([["a"+str(i), "b"+str(i)] for i in range(1, 9) if "b"+str(i) in A]) + sage: d = [0]*8+[1]*4 + sage: bij.set_distributions((A[:8] + A[8+2:-1], d), (A[:8] + A[8:-3], d)) + sage: sorted([s[a] for a in A] for s in bij.solutions_iterator()) + [[0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1], + [0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0], + [0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0], + [0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0], + [0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0], + [1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0], + [1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0], + [1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0], + [1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0], + [1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1], + [1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1]] + + sage: sorted(bij.minimal_subdistributions_blocks_iterator()) + [(['a1', 'a2', 'a3', 'a4', 'a5', 'a5', 'a6', 'a6', 'a7', 'a7', 'a8', 'a8'], + [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]), + (['a3', 'a4', 'd'], [0, 0, 1]), + (['a7', 'a8', 'd'], [0, 0, 1])] + + The following solution is not found, because it happens to + have the same support as the other:: + + sage: D = set(A).difference(['b7', 'b8', 'd']) + sage: sorted(a.replace("b", "a") for a in D) + ['a1', 'a2', 'a3', 'a3', 'a4', 'a4', 'a5', 'a5', 'a6', 'a6', 'a7', 'a8'] + sage: set(tuple(sorted(s[a] for a in D)) for s in bij.solutions_iterator()) + {(0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1)} + + But it is, by design, included here:: + + sage: sorted(D) in [d for d, _ in bij.minimal_subdistributions_iterator()] + True + + """ + # see + # https://mathoverflow.net/questions/406751/find-a-subdistribution/406975 + # and + # https://gitlab.com/mantepse/bijection-tools/-/issues/29 + # see https://mathoverflow.net/q/424187 for Fedor Petrov's example + + minimal_subdistribution = MixedIntegerLinearProgram(maximization=False, solver=self._solver) + D = minimal_subdistribution.new_variable(integer=True, nonnegative=True) # the submultiset of elements + X = minimal_subdistribution.new_variable(binary=True) # the support of D + V = minimal_subdistribution.new_variable(integer=True, nonnegative=True) # the subdistribution + P = _disjoint_set_roots(self._P) + minimal_subdistribution.set_objective(sum(D[p] for p in P)) + minimal_subdistribution.add_constraint(sum(D[p] for p in P) >= 1) + for p in P: + minimal_subdistribution.add_constraint(D[p] <= len(self._P.root_to_elements_dict()[p])) + minimal_subdistribution.add_constraint(X[p]*len(self._P.root_to_elements_dict()[p]) >= D[p] >= X[p]) + + def add_counter_example_constraint(s): + for v in self._Z: + minimal_subdistribution.add_constraint(sum(D[p] for p in P + if s[p] == v) == V[v]) + + try: + bmilp = self._generate_and_solve_initial_bmilp() + except MIPSolverException: + return + s = self._solution_by_blocks(bmilp) + add_counter_example_constraint(s) + while True: + try: + minimal_subdistribution.solve() + except MIPSolverException: + return + d = minimal_subdistribution.get_values(D) # a dict from P to multiplicities + new_s = self._find_counter_example2(bmilp, P, s, d) + if new_s is None: + yield ([p for p in P for _ in range(ZZ(d[p]))], + self._sorter["Z"](s[p] + for p in P + for _ in range(ZZ(d[p])))) + + support = [X[p] for p in P if d[p]] + # add constraint that the support is different + minimal_subdistribution.add_constraint(sum(support) <= len(support) - 1, + name="veto") + else: + s = new_s + add_counter_example_constraint(s) + + def _find_counter_example2(self, bmilp, P, s0, d): + r""" + Return a solution `s` such that ``d`` is not a subdistribution of + `s0`. + + TODO: better name + + INPUT: + + - ``bmilp``, the mixed linear integer program + + - ``P``, the representatives of the blocks + + - ``s0``, a solution + + - ``d``, a subset of `A`, in the form of a dict from `A` to `\{0, 1\}` + """ + for v in self._Z: + v_in_d_count = sum(d[p] for p in P if s0[p] == v) + if not v_in_d_count: + continue + + veto_bmilp = deepcopy(bmilp) # adding constraints to a simple copy adds them to the original instance, too + # try to find a solution which has a different + # subdistribution on d than s0 + v_in_d = sum(d[p] * veto_bmilp._x[p, v] + for p in P + if v in self._possible_block_values[p]) + + # it is sufficient to require that v occurs less often as + # a value among {a | d[a] == 1} than it does in + # v_in_d_count, because, if the distributions are + # different, one such v must exist + veto_bmilp.milp.add_constraint(v_in_d <= v_in_d_count - 1) + try: + veto_bmilp.milp.solve() + return self._solution_by_blocks(veto_bmilp) + except MIPSolverException: + pass + return + + def _preprocess_intertwining_relations(self): + r""" + TODO: (medium) untangle side effect and return value if possible + + Make `self._P` be the finest set partition coarser than `self._P` + such that composing elements preserves blocks. + + Suppose that `p_1`, `p_2` are blocks of `P`, and `a_1, a'_1 + \in p_1` and `a_2, a'_2\in p_2`. Then, + + .. MATH: + + s(\pi(a_1, a_2)) + = \rho(s(a_1), s(a_2)) + = \rho(s(a'_1), s(a'_2)) + = s(\pi(a'_1, a'_2)). + + Therefore, `\pi(a_1, a_2)` and `\pi(a'_1, a'_2)` are in the + same block. + + In other words, `s(\pi(a_1,\dots,a_k))` only depends on the + blocks of `a_1,\dots,a_k`. + + TESTS:: + + TODO: create one test with one and one test with two + intertwining_relations + + """ + images = {} # A^k -> A, a_1,...,a_k to pi(a_1,...,a_k), for all pi + origins_by_elements = [] # (pi/rho, pi(a_1,...,a_k), a_1,...,a_k) + for composition_index, pi_rho in enumerate(self._pi_rho): + for a_tuple in itertools.product(*([self._A]*pi_rho.numargs)): + if pi_rho.domain is not None and not pi_rho.domain(*a_tuple): + continue + a = pi_rho.pi(*a_tuple) + if a in self._A: + if a in images: + # this happens if there are several pi's of the same arity + images[a_tuple].add(a) # TODO: (low) wouldn't self._P.find(a) be more efficient here? + else: + images[a_tuple] = set((a,)) # TODO: (low) wouldn't self._P.find(a) be more efficient here? + origins_by_elements.append((composition_index, a, a_tuple)) + + # merge blocks + something_changed = True + while something_changed: + something_changed = False + # collect (preimage, image) pairs by (representatives) of + # the blocks of the elements of the preimage + updated_images = {} # (p_1,...,p_k) to {a_1,....} + for a_tuple, image_set in images.items(): + representatives = tuple(self._P.find(a) for a in a_tuple) + if representatives in updated_images: + updated_images[representatives].update(image_set) + else: + updated_images[representatives] = image_set + + # merge blocks + for a_tuple, image_set in updated_images.items(): + image = image_set.pop() + while image_set: + self._P.union(image, image_set.pop()) + something_changed = True + # we keep a representative + image_set.add(image) + + images = updated_images + + origins = set() + for composition_index, image, preimage in origins_by_elements: + origins.add((composition_index, + self._P.find(image), + tuple(self._P.find(a) for a in preimage))) + return origins + + def solutions_iterator(self): + r""" + An iterator over all solutions of the problem. + + OUTPUT: An iterator over all possible mappings `s: A\to Z` + + ALGORITHM: + + We solve an integer linear program with a binary variable + `x_{p, z}` for each partition block `p\in P` and each + statistic value `z\in Z`: + + - `x_{p, z} = 1` if and only if `s(a) = z` for all `a\in p`. + + Then we add the constraint `\sum_{x\in V} x<|V|`, where `V` + is the set containing all `x` with `x = 1`, that is, those + indicator variables representing the current solution. + Therefore, a solution of this new program must be different + from all those previously obtained. + + INTEGER LINEAR PROGRAM: + + * Let `m_w(p)`, for a block `p` of `P`, be the multiplicity + of the value `w` in `W` under `\alpha`, that is, the number + of elements `a \in p` with `\alpha(a)=w`. + + * Let `n_w(z)` be the number of elements `b \in B` with + `\beta(b)=w` and `\tau(b)=z` for `w \in W`, `z \in Z`. + + * Let `k` be the arity of a pair `(\pi, \rho)` in an + intertwining relation. + + and the following constraints: + + * because every block is assigned precisely one value, for + all `p\in P`, + + .. MATH:: + + \sum_z x_{p, z} = 1. + + * because the statistics `s` and `\tau` and also `\alpha` and + `\beta` are equidistributed, for all `w\in W` and `z\in Z`, + + .. MATH:: + + \sum_p m_w(p) x_{p, z} = n_w(z). + + * for each intertwining relation `s(\pi(a_1,\dots, a_k)) = + \rho(s(a_1),\dots, s(a_r))`, and for all `k`-combinations + of blocks `p_i\in P` such that there exist `(a_1,\dots, + a_k)\in p_1\times\dots\times p_k` with `\pi(a_1,\dots, + a_k)\in W` and `z = \rho(z_1,\dots, z_k)`, + + .. MATH:: + + x_{p, z} \geq 1-k + \sum_{i=1}^k x_{p_i, z_i}. + + * for each distribution restriction, i.e. a set of elements + `e` and a distribution of values given by integers `d_z` + representing the multiplicity of each `z \in Z`, and `r_p = + |p \cap e|` indicating the relative size of block `p` in + the set of elements of the distribution, + + .. MATH:: + + \sum_p r_p x_{p, z} = d_z. + + EXAMPLES:: + + sage: A = B = list('abc') + sage: bij = Bijectionist(A, B, lambda x: B.index(x) % 2, solver="GLPK") + sage: next(bij.solutions_iterator()) + {'a': 0, 'b': 1, 'c': 0} + + sage: list(bij.solutions_iterator()) + [{'a': 0, 'b': 1, 'c': 0}, + {'a': 1, 'b': 0, 'c': 0}, + {'a': 0, 'b': 0, 'c': 1}] + + sage: N = 4 + sage: A = B = [permutation for n in range(N) for permutation in Permutations(n)] + + Let `\tau` be the number of non-left-to-right-maxima of a + permutation:: + + sage: def tau(pi): + ....: pi = list(pi) + ....: i = count = 0 + ....: for j in range(len(pi)): + ....: if pi[j] > i: + ....: i = pi[j] + ....: else: + ....: count += 1 + ....: return count + + We look for a statistic which is constant on conjugacy classes:: + + sage: P = [list(a) for n in range(N) for a in Permutations(n).conjugacy_classes()] + + sage: bij = Bijectionist(A, B, tau, solver="GLPK") + sage: bij.set_statistics((len, len)) + sage: bij.set_constant_blocks(P) + sage: for solution in bij.solutions_iterator(): + ....: print(solution) + {[]: 0, [1]: 0, [1, 2]: 1, [2, 1]: 0, [1, 2, 3]: 0, [1, 3, 2]: 1, [2, 1, 3]: 1, [3, 2, 1]: 1, [2, 3, 1]: 2, [3, 1, 2]: 2} + {[]: 0, [1]: 0, [1, 2]: 0, [2, 1]: 1, [1, 2, 3]: 0, [1, 3, 2]: 1, [2, 1, 3]: 1, [3, 2, 1]: 1, [2, 3, 1]: 2, [3, 1, 2]: 2} + + Setting the verbosity prints the MILP which is solved:: + + sage: set_verbose(2) + sage: _ = list(bij.solutions_iterator()) + Constraints are: + block []: 1 <= x_0 <= 1 + block [1]: 1 <= x_1 <= 1 + block [1, 2]: 1 <= x_2 + x_3 <= 1 + block [2, 1]: 1 <= x_4 + x_5 <= 1 + block [1, 2, 3]: 1 <= x_6 + x_7 + x_8 <= 1 + block [1, 3, 2]: 1 <= x_9 + x_10 + x_11 <= 1 + block [2, 3, 1]: 1 <= x_12 + x_13 + x_14 <= 1 + statistics: 1 <= x_0 <= 1 + statistics: 1 <= x_1 <= 1 + statistics: 1 <= x_2 + x_4 <= 1 + statistics: 1 <= x_3 + x_5 <= 1 + statistics: 1 <= x_6 + 3 x_9 + 2 x_12 <= 1 + statistics: 3 <= x_7 + 3 x_10 + 2 x_13 <= 3 + statistics: 2 <= x_8 + 3 x_11 + 2 x_14 <= 2 + Variables are: + x_0: s([]) = 0 + x_1: s([1]) = 0 + x_2: s([1, 2]) = 0 + x_3: s([1, 2]) = 1 + x_4: s([2, 1]) = 0 + x_5: s([2, 1]) = 1 + x_6: s([1, 2, 3]) = 0 + x_7: s([1, 2, 3]) = 1 + x_8: s([1, 2, 3]) = 2 + x_9: s([1, 3, 2]) = s([2, 1, 3]) = s([3, 2, 1]) = 0 + x_10: s([1, 3, 2]) = s([2, 1, 3]) = s([3, 2, 1]) = 1 + x_11: s([1, 3, 2]) = s([2, 1, 3]) = s([3, 2, 1]) = 2 + x_12: s([2, 3, 1]) = s([3, 1, 2]) = 0 + x_13: s([2, 3, 1]) = s([3, 1, 2]) = 1 + x_14: s([2, 3, 1]) = s([3, 1, 2]) = 2 + after vetoing + Constraints are: + block []: 1 <= x_0 <= 1 + block [1]: 1 <= x_1 <= 1 + block [1, 2]: 1 <= x_2 + x_3 <= 1 + block [2, 1]: 1 <= x_4 + x_5 <= 1 + block [1, 2, 3]: 1 <= x_6 + x_7 + x_8 <= 1 + block [1, 3, 2]: 1 <= x_9 + x_10 + x_11 <= 1 + block [2, 3, 1]: 1 <= x_12 + x_13 + x_14 <= 1 + statistics: 1 <= x_0 <= 1 + statistics: 1 <= x_1 <= 1 + statistics: 1 <= x_2 + x_4 <= 1 + statistics: 1 <= x_3 + x_5 <= 1 + statistics: 1 <= x_6 + 3 x_9 + 2 x_12 <= 1 + statistics: 3 <= x_7 + 3 x_10 + 2 x_13 <= 3 + statistics: 2 <= x_8 + 3 x_11 + 2 x_14 <= 2 + veto: x_0 + x_1 + x_3 + x_4 + x_6 + x_10 + x_14 <= 6 + after vetoing + Constraints are: + block []: 1 <= x_0 <= 1 + block [1]: 1 <= x_1 <= 1 + block [1, 2]: 1 <= x_2 + x_3 <= 1 + block [2, 1]: 1 <= x_4 + x_5 <= 1 + block [1, 2, 3]: 1 <= x_6 + x_7 + x_8 <= 1 + block [1, 3, 2]: 1 <= x_9 + x_10 + x_11 <= 1 + block [2, 3, 1]: 1 <= x_12 + x_13 + x_14 <= 1 + statistics: 1 <= x_0 <= 1 + statistics: 1 <= x_1 <= 1 + statistics: 1 <= x_2 + x_4 <= 1 + statistics: 1 <= x_3 + x_5 <= 1 + statistics: 1 <= x_6 + 3 x_9 + 2 x_12 <= 1 + statistics: 3 <= x_7 + 3 x_10 + 2 x_13 <= 3 + statistics: 2 <= x_8 + 3 x_11 + 2 x_14 <= 2 + veto: x_0 + x_1 + x_3 + x_4 + x_6 + x_10 + x_14 <= 6 + veto: x_0 + x_1 + x_2 + x_5 + x_6 + x_10 + x_14 <= 6 + + sage: set_verbose(0) + + TESTS: + + An unfeasible problem:: + + sage: A = ["a", "b", "c", "d"]; B = [1, 2, 3, 4] + sage: bij = Bijectionist(A, B) + sage: bij.set_value_restrictions(("a", [1, 2]), ("b", [1, 2]), ("c", [1, 3]), ("d", [2, 3])) + sage: list(bij.solutions_iterator()) + [] + + """ + try: + bmilp = self._generate_and_solve_initial_bmilp() + except MIPSolverException: + return + while True: + yield self._solution(bmilp) + bmilp.veto_current_solution() + if get_verbose() >= 2: + print("after vetoing") + self._show_bmilp(bmilp, variables=False) + try: + bmilp.milp.solve() + except MIPSolverException: + return + + def _solution(self, bmilp): + """ + Return the bmilp solution as a dictionary from `A` to + `Z`. + + """ + map = {} # A -> Z, a +-> s(a) + for p, block in self._P.root_to_elements_dict().items(): + for z in self._possible_block_values[p]: + if bmilp.milp.get_values(bmilp._x[p, z]) == 1: + for a in block: + map[a] = z + break + return map + + def _solution_by_blocks(self, bmilp): + """ + Return the bmilp solution as a dictionary from block + representatives of `P` to `Z`. + + """ + map = {} # P -> Z, a +-> s(a) + for p in _disjoint_set_roots(self._P): + for z in self._possible_block_values[p]: + if bmilp.milp.get_values(bmilp._x[p, z]) == 1: + map[p] = z + break + return map + + def _show_bmilp(self, bmilp, variables=True): + """ + Print the constraints and variables of the current MILP + together with some explanations. + + """ + print("Constraints are:") + b = bmilp.milp.get_backend() + varid_name = {} + for i in range(b.ncols()): + s = b.col_name(i) + default_name = str(bmilp.milp.linear_functions_parent()({i: 1})) + if s and s != default_name: + varid_name[i] = s + else: + varid_name[i] = default_name + for i, (lb, (indices, values), ub) in enumerate(bmilp.milp.constraints()): + if b.row_name(i): + print(" "+b.row_name(i)+":", end=" ") + if lb is not None: + print(str(ZZ(lb))+" <=", end=" ") + first = True + for j, c in sorted(zip(indices, values)): + c = ZZ(c) + if c == 0: + continue + print((("+ " if (not first and c > 0) else "") + + ("" if c == 1 else + ("- " if c == -1 else + (str(c) + " " if first and c < 0 else + ("- " + str(abs(c)) + " " if c < 0 else str(c) + " ")))) + + varid_name[j]), end=" ") + first = False + # Upper bound + print("<= "+str(ZZ(ub)) if ub is not None else "") + + if variables: + print("Variables are:") + for (p, z), v in bmilp._x.items(): + print(f" {v}: " + "".join([f"s({a}) = " + for a in self._P.root_to_elements_dict()[p]]) + f"{z}") + + def _generate_and_solve_initial_bmilp(self): + r""" + Generate a _BijectionistMILP, add all relevant constraints and call MILP.solve(). + """ + preimage_blocks = self._preprocess_intertwining_relations() + self._compute_possible_block_values() + + bmilp = _BijectionistMILP(self) + n = bmilp.milp.number_of_variables() + bmilp.add_alpha_beta_constraints() + bmilp.add_distribution_constraints() + bmilp.add_interwining_relation_constraints(preimage_blocks) + if get_verbose() >= 2: + self._show_bmilp(bmilp) + assert n == bmilp.milp.number_of_variables(), "The number of variables increased." + bmilp.milp.solve() + return bmilp + + +class _BijectionistMILP(SageObject): + r""" + Wrapper class for the MixedIntegerLinearProgram (MILP). This class is used to manage the MILP, + add constraints, solve the problem and check for uniqueness of solution values. + """ + def __init__(self, bijectionist: Bijectionist): + # TODO: it would be cleaner not to pass the full bijectionist + # instance, but only those attributes we actually use: + # _possible_block_values + # _elements_distributions + # _W, _Z, _A, _B, _P, _alpha, _beta, _tau, _pi_rho + self.milp = MixedIntegerLinearProgram(solver=bijectionist._solver) + self.milp.set_objective(None) + self._x = self.milp.new_variable(binary=True) # indexed by P x Z + + self._bijectionist = bijectionist + + for p in _disjoint_set_roots(bijectionist._P): + name = f"block {p}" + self.milp.add_constraint(sum(self._x[p, z] + for z in bijectionist._possible_block_values[p]) == 1, + name=name[:50]) + + def add_alpha_beta_constraints(self): + r""" + Add constraints enforcing that `(alpha, s)` is equidistributed + with `(beta, tau)` and `S` is the intertwining bijection. + + We do this by adding + + .. MATH:: + + \sum_{a\in A, z\in Z} x_{p(a), z} s^z t^{\alpha(a)} + = \sum_{b\in B} s^{\tau(b)} t(\beta(b)) + + as a matrix equation. + + """ + W = self._bijectionist._W + Z = self._bijectionist._Z + AZ_matrix = [[ZZ(0)]*len(W) for _ in range(len(Z))] + B_matrix = [[ZZ(0)]*len(W) for _ in range(len(Z))] + + W_dict = {w: i for i, w in enumerate(W)} + Z_dict = {z: i for i, z in enumerate(Z)} + + for a in self._bijectionist._A: + p = self._bijectionist._P.find(a) + for z in self._bijectionist._possible_block_values[p]: + w_index = W_dict[self._bijectionist._alpha(a)] + z_index = Z_dict[z] + AZ_matrix[z_index][w_index] += self._x[p, z] + + for b in self._bijectionist._B: + w_index = W_dict[self._bijectionist._beta(b)] + z_index = Z_dict[self._bijectionist._tau[b]] + B_matrix[z_index][w_index] += 1 + + # TODO: (low) I am not sure that this is the best way to + # filter out empty conditions + for w in range(len(W)): + for z in range(len(Z)): + c = AZ_matrix[z][w] - B_matrix[z][w] + if c.is_zero(): + continue + if c in ZZ: + raise MIPSolverException + self.milp.add_constraint(c == 0, name="statistics") + + def add_distribution_constraints(self): + r""" + Add constraints so the distributions given by + :meth:`~Bijectionist.set_distributions` are fulfilled. + + To accomplish this we add + + .. MATH:: + + \sum_{a\in elements} x_{p(a), z}t^z = \sum_{z\in values} t^z, + + where `p(a)` is the block containing `a`, for each given + distribution as a vector equation. + + """ + Z = self._bijectionist._Z + Z_dict = {z: i for i, z in enumerate(Z)} + for elements, values in self._bijectionist._elements_distributions: + elements_sum = [ZZ(0)]*len(Z_dict) + values_sum = [ZZ(0)]*len(Z_dict) + for a in elements: + p = self._bijectionist._P.find(a) + for z in self._bijectionist._possible_block_values[p]: + elements_sum[Z_dict[z]] += self._x[p, z] + for z in values: + values_sum[Z_dict[z]] += 1 + + # TODO: (low) I am not sure that this is the best way to + # filter out empty conditions + for element, value in zip(elements_sum, values_sum): + c = element - value + if c.is_zero(): + continue + if c in ZZ: + raise MIPSolverException + self.milp.add_constraint(c == 0, name=f"d: {element} == {value}") + + def add_interwining_relation_constraints(self, origins): + r""" + Add constraints corresponding to the given intertwining + relations. + + This adds the constraints imposed by + :meth:`~Bijectionist.set_intertwining_relations`. + + .. MATH:: + + s(\pi(a_1,\dots, a_k)) = \rho(s(a_1),\dots, s(a_k))` + + for each pair `(\pi, \rho)`. The relation implies + immediately that `s(\pi(a_1,\dots, a_k))` only depends on the + blocks of `a_1,\dots, a_k`. + + The MILP formulation is as follows. Let `a_1,\dots,a_k \in + A` and let `a = \pi(a_1,\dots,a_k)`. Let `z_1,\dots,z_k \in + Z` and let `z = \rho(z_1,\dots,z_k)`. Suppose that `a_i\in + p_i` for all `i` and that `a\in p`. + + We then want to model the implication + + .. MATH:: + + x_{p_1, z_1} = 1,\dots, x_{p_k, z_k} = 1 \Rightarrow x_{p, z} = 1. + + We achieve this by requiring + + .. MATH:: + + x_{p, z}\geq 1 - k + \sum_{i=1}^k x_{p_i, z_i}. + + Not that `z` must be a possible value of `p` and each `z_i` + must be a possible value of `p_i`. + + INPUT: + + - origins, a list of triples `((\pi/\rho, p, + (p_1,\dots,p_k))`, where `p` is the block of + `\rho(s(a_1),\dots, s(a_k))`, for any `a_i\in p_i`. + + TODO: TESTS + + """ + for composition_index, image_block, preimage_blocks in origins: + pi_rho = self._bijectionist._pi_rho[composition_index] + # iterate over all possible value combinations of the origin blocks + for z_tuple in itertools.product(*[self._bijectionist._possible_block_values[p] + for p in preimage_blocks]): + rhs = 1 - pi_rho.numargs + sum(self._x[p_i, z_i] + for p_i, z_i in zip(preimage_blocks, z_tuple)) + z = pi_rho.rho(*z_tuple) + if z in self._bijectionist._possible_block_values[image_block]: + c = self._x[image_block, z] - rhs + if c.is_zero(): + continue + self.milp.add_constraint(c >= 0, + name=f"pi/rho({composition_index})") + else: + self.milp.add_constraint(rhs <= 0, + name=f"pi/rho({composition_index})") + + def veto_current_solution(self): + r""" + Add a constraint vetoing the current solution. + + This adds a constraint such that the next call to + :meth:`MixedIntegerLinearProgram.solve()` must return a + solution different from the current one. + + We require that the MILP currently has a solution. + + .. WARNING:: + + The underlying MILP will be modified! + + ALGORITHM: + + We add the constraint `\sum_{x\in V} x < |V|`` where `V` is + the set of variables `x_{p, z}` with value 1, that is, the + set of variables indicating the current solution. + + """ + # get all variables with value 1 + active_vars = [self._x[p, z] + for p in _disjoint_set_roots(self._bijectionist._P) + for z in self._bijectionist._possible_block_values[p] + if self.milp.get_values(self._x[p, z])] + + # add constraint that not all of these can be 1, thus vetoing + # the current solution + self.milp.add_constraint(sum(active_vars) <= len(active_vars) - 1, + name="veto") + + +def _invert_dict(d): + """ + Return the dictionary whose keys are the values of the input and + whose values are the lists of preimages. + """ + preimages = {} + for k, v in d.items(): + preimages[v] = preimages.get(v, []) + [k] + return preimages + + +def _disjoint_set_roots(d): + """ + Return the representatives of the blocks of the disjoint set. + """ + return d.root_to_elements_dict().keys() + + +""" +TESTS:: + + sage: As = Bs = [[], + ....: [(1,i,j) for i in [-1,0,1] for j in [-1,1]], + ....: [(2,i,j) for i in [-1,0,1] for j in [-1,1]], + ....: [(3,i,j) for i in [-2,-1,0,1,2] for j in [-1,1]]] + + # adding [(2,-2,-1), (2,2,-1), (2,-2,1), (2,2,1)] makes it take (seemingly) forever + + sage: c1 = lambda a, b: (a[0]+b[0], a[1]*b[1], a[2]*b[2]) + sage: c2 = lambda a: (a[0], -a[1], a[2]) + + sage: bij = Bijectionist(sum(As, []), sum(Bs, [])) + sage: bij.set_statistics((lambda x: x[0], lambda x: x[0])) + sage: bij.set_intertwining_relations((2, c1, c1), (1, c2, c2)) + sage: l = list(bij.solutions_iterator()); len(l) + 64 + +A brute force check would be difficult:: + + sage: prod([factorial(len(A)) for A in As]) + 1881169920000 + +Let us try a smaller example:: + + sage: As = Bs = [[], + ....: [(1,i,j) for i in [-1,0,1] for j in [-1,1]], + ....: [(2,i,j) for i in [-1,1] for j in [-1,1]], + ....: [(3,i,j) for i in [-1,1] for j in [-1,1]]] + + sage: bij = Bijectionist(sum(As, []), sum(Bs, [])) + sage: bij.set_statistics((lambda x: x[0], lambda x: x[0])) + sage: bij.set_intertwining_relations((2, c1, c1), (1, c2, c2)) + sage: l1 = list(bij.solutions_iterator()); len(l1) + 16 + sage: prod([factorial(len(A)) for A in As]) + 414720 + + sage: pis = cartesian_product([Permutations(len(A)) for A in As]) + sage: it = ({a: Bs[n][pi[n][i]-1] for n, A in enumerate(As) for i, a in enumerate(A)} for pi in pis) + sage: A = sum(As, []) + sage: respects_c1 = lambda s: all(c1(a1, a2) not in A or s[c1(a1, a2)] == c1(s[a1], s[a2]) for a1 in A for a2 in A) + sage: respects_c2 = lambda s: all(c2(a1) not in A or s[c2(a1)] == c2(s[a1]) for a1 in A) + sage: l2 = [s for s in it if respects_c1(s) and respects_c2(s)] + sage: sorted(l1, key=lambda s: tuple(s.items())) == l2 + True + +""" + + +""" +Our benchmark example:: + + sage: from sage.combinat.cyclic_sieving_phenomenon import orbit_decomposition + sage: alpha1 = lambda p: len(p.weak_excedences()) + sage: alpha2 = lambda p: len(p.fixed_points()) + sage: beta1 = lambda p: len(p.descents(final_descent=True)) if p else 0 + sage: beta2 = lambda p: len([e for (e, f) in zip(p, p[1:]+[0]) if e == f+1]) + sage: gamma = Permutation.longest_increasing_subsequence_length + sage: def rotate_permutation(p): + ....: cycle = Permutation(tuple(range(1, len(p)+1))) + ....: return Permutation([cycle.inverse()(p(cycle(i))) for i in range(1, len(p)+1)]) + + sage: N=5; As = [list(Permutations(n)) for n in range(N+1)]; A = B = sum(As, []); bij = Bijectionist(A, B, gamma); bij.set_statistics((len, len), (alpha1, beta1), (alpha2, beta2)); bij.set_constant_blocks(sum([orbit_decomposition(A, rotate_permutation) for A in As], [])) + + sage: P = bij.constant_blocks(optimal=True) + sage: P = [sorted(p, key=lambda p: (len(p), p)) for p in P] + sage: P = sorted(P, key=lambda p: (len(next(iter(p))), len(p))) + sage: for p in P: + ....: print(p) + [[1], [1, 2], [1, 2, 3], [1, 2, 3, 4], [1, 2, 3, 4, 5]] + [[2, 1], [1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 2, 1], ... + [[3, 1, 2], [1, 4, 2, 3], [2, 4, 1, 3], [3, 1, 2, 4], [3, 1, 4, 2], ... + [[4, 1, 2, 3], [1, 5, 2, 3, 4], [4, 1, 2, 3, 5], [4, 5, 1, 2, 3], [5, 1, 2, 4, 3], ... + [[1, 3, 2, 5, 4], [2, 1, 3, 5, 4], [2, 1, 4, 3, 5], [5, 2, 4, 3, 1], [5, 3, 2, 4, 1]] + [[1, 3, 5, 2, 4], [2, 4, 1, 3, 5], [3, 5, 2, 4, 1], [4, 1, 3, 5, 2], [5, 2, 4, 1, 3]] + ... + + sage: for d in sorted(bij.minimal_subdistributions_blocks_iterator(), key=lambda d: (len(d[0]), d[0])): + ....: print(d) + ([[]], [0]) + ([[1]], [1]) + ([[2, 1]], [2]) + ([[3, 1, 2]], [3]) + ([[4, 1, 2, 3]], [4]) + ([[5, 1, 2, 3, 4]], [5]) + ([[2, 1, 4, 5, 3], [2, 3, 5, 1, 4], [2, 4, 1, 5, 3], [2, 4, 5, 1, 3]], [2, 3, 3, 3]) + ([[2, 1, 5, 3, 4], [2, 5, 1, 3, 4], [3, 1, 5, 2, 4], [3, 5, 1, 2, 4]], [3, 3, 4, 4]) + ([[1, 3, 2, 5, 4], [1, 3, 5, 2, 4], [1, 4, 2, 5, 3], [1, 4, 5, 2, 3], [1, 4, 5, 3, 2], [1, 5, 4, 2, 3], [1, 5, 4, 3, 2]], [2, 2, 3, 3, 3, 3, 3]) + + sage: l = list(bij.solutions_iterator()); len(l) # long time + 504 + + sage: for a, d in bij.minimal_subdistributions_iterator(): # long time + ....: print(sorted(a), sorted(d)) +""" From 6149eb25ff2301cd9ac7f41f8c2c6a6da367dccc Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Tue, 18 Oct 2022 15:23:48 +0200 Subject: [PATCH 198/751] make the linter happier --- src/sage/combinat/bijectionist.py | 76 ++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 27 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 452a013b470..12ce11ba64f 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -383,18 +383,13 @@ from copy import copy, deepcopy from sage.misc.verbose import get_verbose -# TODO: (low) für sagemath sollten wir Zeilen möglichst auf 79 -# Zeichen beschränken, das ist zwar nicht streng, wird aber lieber -# gesehen. - # TODO: (low) we frequently need variable names for subsets of A, B, # Z. In LaTeX, we mostly call them \tilde A, \tilde Z, etc. now. It # would be good to have a standard name in code, too. -# TODO: (medium) wann immer möglich, sollten die Tests in einer -# Methode nur diese eine Methode testen. Wir haben in fast allen -# Methoden "system tests", das ist unpraktisch, wenn man größere -# Änderungen durchführt. +# TODO: (medium) whenever possible, doctests of a method should only +# test this method. Currently we have very many system tests, which +# is inconvenient when modifying the design substantially. class Bijectionist(SageObject): @@ -1000,7 +995,13 @@ def set_value_restrictions(self, *a_values): However, an error occurs if the set of possible values is empty. In this example, the image of `\tau` under any - legal bijection is disjoint to the specified values. :: TODO: we now have to call _compute_possible_block_values() for the error message. Is this intended behaviour? + legal bijection is disjoint to the specified values. + + .. TODO:: + + we now have to call + :meth:`_compute_possible_block_values` for the error + message. Is this intended behaviour? sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] sage: tau = Permutation.longest_increasing_subsequence_length @@ -1044,7 +1045,8 @@ def _compute_possible_block_values(self): """ self._possible_block_values = {} # P -> Power(Z) for p, block in self._P.root_to_elements_dict().items(): - self._possible_block_values[p] = set.intersection(*[self._restrictions_possible_values[a] for a in block], *[self._statistics_possible_values[a] for a in block]) + self._possible_block_values[p] = set.intersection(*[self._restrictions_possible_values[a] for a in block], + *[self._statistics_possible_values[a] for a in block]) if not self._possible_block_values[p]: if len(block) == 1: raise ValueError(f"No possible values found for singleton block {block}") @@ -1531,11 +1533,13 @@ def _forced_constant_blocks(self): self.set_constant_blocks(tmp_P) def possible_values(self, p=None, optimal=False): - r""" - Return for each block the values of `s` compatible with the + r"""Return for each block the values of `s` compatible with the imposed restrictions. - TODO: should this method update and return ``self._possible_block_values``? + .. TODO:: + + should this method update and return + ``self._possible_block_values``? INPUT: @@ -1621,10 +1625,10 @@ def possible_values(self, p=None, optimal=False): sage: bij.possible_values(p=[DyckWord([]), DyckWord([1, 0]), DyckWord([1, 0, 1, 0]), DyckWord([1, 1, 0, 0])], optimal=True) {[]: {0}, [1, 0]: {1}, [1, 0, 1, 0]: {1, 2}, [1, 1, 0, 0]: {1, 2}} - .. TODO: + .. TODO:: - test der zeigt, dass die Lösung für alle Blöcke nicht - langsamer ist als mit solutions_iterator + test to show that the solution for all blocks is not more + expensive than using :meth:`solutions_iterator` """ # convert input to set of block representatives @@ -1689,7 +1693,9 @@ def minimal_subdistributions_iterator(self, tA=None): together with submultisets `\tilde Z` with `s(\tilde A) = \tilde Z` as multisets. - TODO: should this method interact with ``self._elements_distributions``? + .. TODO:: + + should this method interact with ``self._elements_distributions``? INPUT: @@ -1832,15 +1838,21 @@ def minimal_subdistributions_blocks_iterator(self, p=None): :meth:`minimal_subdistributions_iterator`, which is, however, computationally more expensive. - TODO: should this method interact with ``self._elements_distributions``? + .. TODO:: + + should this method interact with ``self._elements_distributions``? INPUT: - - ``p`` (optional, default: ``None``) -- a subset of `P` TODO: add this + - ``p`` (optional, default: ``None``) -- a subset of `P` If ``p`` is not ``None``, return an iterator of the subdistributions containing ``p``. + .. TODO:: + + the optional argument is not yet supported + EXAMPLES:: sage: A = B = [permutation for n in range(3) for permutation in Permutations(n)] @@ -1992,7 +2004,10 @@ def _find_counter_example2(self, bmilp, P, s0, d): Return a solution `s` such that ``d`` is not a subdistribution of `s0`. - TODO: better name + .. TODO:: + + find a better name - possibly not relevant if we + implement the cache of solutions INPUT: @@ -2003,6 +2018,7 @@ def _find_counter_example2(self, bmilp, P, s0, d): - ``s0``, a solution - ``d``, a subset of `A`, in the form of a dict from `A` to `\{0, 1\}` + """ for v in self._Z: v_in_d_count = sum(d[p] for p in P if s0[p] == v) @@ -2030,7 +2046,10 @@ def _find_counter_example2(self, bmilp, P, s0, d): def _preprocess_intertwining_relations(self): r""" - TODO: (medium) untangle side effect and return value if possible + + .. TODO:: + + (medium) untangle side effect and return value if possible Make `self._P` be the finest set partition coarser than `self._P` such that composing elements preserves blocks. @@ -2051,10 +2070,10 @@ def _preprocess_intertwining_relations(self): In other words, `s(\pi(a_1,\dots,a_k))` only depends on the blocks of `a_1,\dots,a_k`. - TESTS:: + .. TODO:: - TODO: create one test with one and one test with two - intertwining_relations + create one test with one and one test with two + intertwining_relations """ images = {} # A^k -> A, a_1,...,a_k to pi(a_1,...,a_k), for all pi @@ -2549,8 +2568,6 @@ def add_interwining_relation_constraints(self, origins): (p_1,\dots,p_k))`, where `p` is the block of `\rho(s(a_1),\dots, s(a_k))`, for any `a_i\in p_i`. - TODO: TESTS - """ for composition_index, image_block, preimage_blocks in origins: pi_rho = self._bijectionist._pi_rho[composition_index] @@ -2685,7 +2702,12 @@ def _disjoint_set_roots(d): ....: cycle = Permutation(tuple(range(1, len(p)+1))) ....: return Permutation([cycle.inverse()(p(cycle(i))) for i in range(1, len(p)+1)]) - sage: N=5; As = [list(Permutations(n)) for n in range(N+1)]; A = B = sum(As, []); bij = Bijectionist(A, B, gamma); bij.set_statistics((len, len), (alpha1, beta1), (alpha2, beta2)); bij.set_constant_blocks(sum([orbit_decomposition(A, rotate_permutation) for A in As], [])) + sage: N=5 + sage: As = [list(Permutations(n)) for n in range(N+1)] + sage: A = B = sum(As, []) + sage: bij = Bijectionist(A, B, gamma) + sage: bij.set_statistics((len, len), (alpha1, beta1), (alpha2, beta2)) + sage: bij.set_constant_blocks(sum([orbit_decomposition(A, rotate_permutation) for A in As], [])) sage: P = bij.constant_blocks(optimal=True) sage: P = [sorted(p, key=lambda p: (len(p), p)) for p in P] From 9d4bfb97b1667fc7fc7e58527a9d8beae9e1f621 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Tue, 18 Oct 2022 18:10:06 +0200 Subject: [PATCH 199/751] remove useless assignment --- src/sage/combinat/bijectionist.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 12ce11ba64f..ac41442e414 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -719,9 +719,6 @@ def set_statistics(self, *alpha_beta): {[]: 2, [1]: 1, [1, 2]: 0, [2, 1]: 0} """ - # reset values - self._statistics_possible_values = {a: set(self._Z) for a in self._A} - self._n_statistics = len(alpha_beta) # TODO: (low) do we really want to recompute statistics every time? self._alpha = lambda p: tuple(arg[0](p) for arg in alpha_beta) @@ -1034,7 +1031,8 @@ def set_value_restrictions(self, *a_values): """ # reset values - self._restrictions_possible_values = {a: set(self._Z) for a in self._A} + set_Z = set(self._Z) + self._restrictions_possible_values = {a: set_Z.copy() for a in self._A} for a, values in a_values: assert a in self._A, f"Element {a} was not found in A" self._restrictions_possible_values[a].intersection_update(values) From 6ee34e1d761af4b8ec23c721a12a0d123318661a Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Wed, 19 Oct 2022 00:36:54 +0200 Subject: [PATCH 200/751] make initialisation more efficient --- src/sage/combinat/bijectionist.py | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index ac41442e414..95637fcae32 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -483,6 +483,16 @@ class Bijectionist(SageObject): """ def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], pi_rho=tuple(), elements_distributions=tuple(), a_values=tuple(), solver=None, key=None): + """ + Initialize the bijectionist. + + TESTS: + + Check that large input sets are handled well:: + + sage: A = B = list(range(7000)) + sage: bij = Bijectionist(A, B) + """ # glossary of standard letters: # A, B, Z, W ... finite sets # ???? tilde_A, tilde_Z, ..., subsets? @@ -746,9 +756,14 @@ def set_statistics(self, *alpha_beta): self._W = list(self._statistics_fibers) # the possible values of s(a) are tau(beta^{-1}(alpha(a))) - self._statistics_possible_values = {a: set(self._tau[b] - for b in self._statistics_fibers[self._alpha(a)][1]) - for a in self._A} + tau_beta_inverse = {} + self._statistics_possible_values = {} + for a in self._A: + alpha_a = self._alpha(a) + if alpha_a not in tau_beta_inverse: + tau_beta_inverse[alpha_a] = set(self._tau[b] + for b in self._statistics_fibers[alpha_a][1]) + self._statistics_possible_values[a] = tau_beta_inverse[alpha_a] def statistics_fibers(self): r""" @@ -1032,10 +1047,10 @@ def set_value_restrictions(self, *a_values): """ # reset values set_Z = set(self._Z) - self._restrictions_possible_values = {a: set_Z.copy() for a in self._A} + self._restrictions_possible_values = {a: set_Z for a in self._A} for a, values in a_values: assert a in self._A, f"Element {a} was not found in A" - self._restrictions_possible_values[a].intersection_update(values) + self._restrictions_possible_values[a] = self._restrictions_possible_values[a].intersection(values) def _compute_possible_block_values(self): r""" From 1a14bcfcbd8202fb81481a0017c1df0974547797 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Wed, 19 Oct 2022 00:50:14 +0200 Subject: [PATCH 201/751] consistently name variable --- src/sage/combinat/bijectionist.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 95637fcae32..10c076858dc 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -759,11 +759,11 @@ def set_statistics(self, *alpha_beta): tau_beta_inverse = {} self._statistics_possible_values = {} for a in self._A: - alpha_a = self._alpha(a) - if alpha_a not in tau_beta_inverse: - tau_beta_inverse[alpha_a] = set(self._tau[b] - for b in self._statistics_fibers[alpha_a][1]) - self._statistics_possible_values[a] = tau_beta_inverse[alpha_a] + v = self._alpha(a) + if v not in tau_beta_inverse: + tau_beta_inverse[v] = set(self._tau[b] + for b in self._statistics_fibers[v][1]) + self._statistics_possible_values[a] = tau_beta_inverse[v] def statistics_fibers(self): r""" From 0901ec7a2dd6de58de2307489e844dd2978d79bb Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Wed, 19 Oct 2022 17:02:14 +0200 Subject: [PATCH 202/751] slightly improve documentation --- src/sage/combinat/bijectionist.py | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 10c076858dc..0124994c022 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -393,7 +393,9 @@ class Bijectionist(SageObject): - r"""Solver class for bijection-statistic problems. + r""" + A toolbox to list all possible bijections between two finite sets + under various constraints. INPUT: @@ -517,6 +519,7 @@ def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], pi_rho=tuple(), ele self._tau = {b: b for b in self._B} else: self._tau = {b: tau(b) for b in self._B} + # we store Z as a list to keep an order self._Z = set(self._tau.values()) if key is not None and "Z" in key: self._sorter["Z"] = lambda x: sorted(x, key=key["Z"]) @@ -526,8 +529,8 @@ def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], pi_rho=tuple(), ele self._Z = sorted(self._Z) self._sorter["Z"] = lambda x: sorted(x) except TypeError: - self._sorter["Z"] = lambda x: list(x) self._Z = list(self._Z) + self._sorter["Z"] = lambda x: list(x) # set optional inputs self.set_statistics(*alpha_beta) @@ -1045,7 +1048,10 @@ def set_value_restrictions(self, *a_values): AssertionError: Element (1, 2) was not found in A """ - # reset values + # it might be much cheaper to construct the sets as subsets + # of _statistics_possible_values - however, we do not want to + # insist that set_value_restrictions is called after + # set_statistics set_Z = set(self._Z) self._restrictions_possible_values = {a: set_Z for a in self._A} for a, values in a_values: @@ -1055,6 +1061,15 @@ def set_value_restrictions(self, *a_values): def _compute_possible_block_values(self): r""" Update the dictionary of possible values of each block. + + This has to be called whenever `self._P` was modified. + + .. TODO:: + + If `self._Z` is large, this is very memory expensive. In + this case it would be good if equal values of the dictionary + `self._possible_block_values` would share memory. + """ self._possible_block_values = {} # P -> Power(Z) for p, block in self._P.root_to_elements_dict().items(): @@ -1546,7 +1561,8 @@ def _forced_constant_blocks(self): self.set_constant_blocks(tmp_P) def possible_values(self, p=None, optimal=False): - r"""Return for each block the values of `s` compatible with the + r""" + Return for each block the values of `s` compatible with the imposed restrictions. .. TODO:: @@ -1837,7 +1853,8 @@ def _find_counter_example(self, bmilp, s0, d): return def minimal_subdistributions_blocks_iterator(self, p=None): - r"""Return all representatives of minimal subsets `\tilde P` + r""" + Return all representatives of minimal subsets `\tilde P` of `P` containing `p` together with submultisets `\tilde Z` with `s(\tilde P) = \tilde Z` as multisets. @@ -2416,7 +2433,9 @@ def _show_bmilp(self, bmilp, variables=True): def _generate_and_solve_initial_bmilp(self): r""" - Generate a _BijectionistMILP, add all relevant constraints and call MILP.solve(). + Generate a ``_BijectionistMILP``, add all relevant constraints + and call ``MILP.solve()``. + """ preimage_blocks = self._preprocess_intertwining_relations() self._compute_possible_block_values() From 720368f24ab533c3d00903980528039ed0cb888c Mon Sep 17 00:00:00 2001 From: dcoudert Date: Fri, 28 Oct 2022 10:18:59 +0200 Subject: [PATCH 203/751] trac #32136: add bounds on the number of edges --- src/sage/graphs/base/static_dense_graph.pyx | 64 ++++++++++++++++++--- 1 file changed, 57 insertions(+), 7 deletions(-) diff --git a/src/sage/graphs/base/static_dense_graph.pyx b/src/sage/graphs/base/static_dense_graph.pyx index feee4df958e..c300740d906 100644 --- a/src/sage/graphs/base/static_dense_graph.pyx +++ b/src/sage/graphs/base/static_dense_graph.pyx @@ -379,7 +379,8 @@ def triangles_count(G): return ans -def connected_full_subgraphs(G, edges_only=False, labels=False): +def connected_full_subgraphs(G, edges_only=False, labels=False, + min_edges=None, max_edges=None): r""" Iterator over the connected subgraphs of `G` with same vertex set. @@ -406,6 +407,14 @@ def connected_full_subgraphs(G, edges_only=False, labels=False): - ``labels`` -- boolean (default: ``False``); whether to return labelled edges or not. This parameter is used only when ``edges_only`` is ``True``. + - ``min_edges`` -- integer (default: ``None``); minimum number of edges of + reported subgraphs. By default (``None``), this lower bound will be set to + `n - 1`. + + - ``max_edges`` -- integer (default: ``None``); maximum number of edges of + reported subgraphs. By default (``None``), this lower bound will be set to + the number of edges of the input (di)graph. + .. NOTE:: Roughly, this method explores all possible subsets of neighbors of each @@ -446,6 +455,19 @@ def connected_full_subgraphs(G, edges_only=False, labels=False): sage: len(F) 18 + Specifying bounds on the number of edges:: + + sage: from sage.graphs.base.static_dense_graph import connected_full_subgraphs + sage: G = graphs.HouseGraph() + sage: [g.size() for g in connected_full_subgraphs(G)] + [6, 5, 5, 5, 4, 4, 5, 4, 4, 4, 5, 4, 4, 4, 5, 4, 4, 4] + sage: [g.size() for g in connected_full_subgraphs(G, max_edges=4)] + [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4] + sage: [g.size() for g in connected_full_subgraphs(G, min_edges=6)] + [6] + sage: [g.size() for g in connected_full_subgraphs(G, min_edges=5, max_edges=5)] + [5, 5, 5, 5, 5, 5] + Asking for edges only:: sage: from sage.graphs.base.static_dense_graph import connected_full_subgraphs @@ -479,6 +501,19 @@ def connected_full_subgraphs(G, edges_only=False, labels=False): Traceback (most recent call last): ... ValueError: the degree of the graph is too large for this method + + Wrong bounds on the number of edges:: + + sage: from sage.graphs.base.static_dense_graph import connected_full_subgraphs + sage: G = graphs.HouseGraph() + sage: [g.size() for g in connected_full_subgraphs(G, min_edges=G.size() + 1)] + Traceback (most recent call last): + ... + ValueError: we must have 4 <= min_edges <= max_edges <= 6 + sage: [g.size() for g in connected_full_subgraphs(G, max_edges=G.order() - 2)] + Traceback (most recent call last): + ... + ValueError: we must have 4 <= min_edges <= max_edges <= 6 """ G._scream_if_not_simple() if not G.is_connected(): @@ -489,7 +524,15 @@ def connected_full_subgraphs(G, edges_only=False, labels=False): raise ValueError("the degree of the graph is too large for this method") cdef Py_ssize_t n = G.order() - if n <= 2: + cdef Py_ssize_t m = G.size() + if min_edges is None or min_edges < n - 1: + min_edges = n - 1 + if max_edges is None or max_edges > m: + max_edges = m + if min_edges > max_edges: + raise ValueError("we must have {} <= min_edges <= max_edges <= {}".format(n -1, m)) + + if n <= 2 or min_edges == m: if edges_only: yield list(G.edges(sort=False, labels=labels)) else: @@ -505,7 +548,7 @@ def connected_full_subgraphs(G, edges_only=False, labels=False): cdef MemoryAllocator mem = MemoryAllocator() cdef int * order = mem.calloc(n, sizeof(int)) - cdef unsigned long * n_cpt = mem.calloc(n, sizeof(unsigned long)) + cdef mp_bitcnt_t * n_cpt = mem.calloc(n, sizeof(mp_bitcnt_t)) # We use a several bitsets to store the current boundary and active neighbors. # We also need another bitset that we create at the same time @@ -527,13 +570,14 @@ def connected_full_subgraphs(G, edges_only=False, labels=False): n_cpt[0] = 1 << bitset_len(DG.rows[0]) cdef long u, v, j - cdef unsigned long c + cdef mp_bitcnt_t c + cdef Py_ssize_t num_edges = 0 cdef list E = [] cdef list edges while i >= 0: sig_check() - if i == n - 1: + if i == n - 1 and num_edges >= min_edges: # yield the current solution edges = [(int_to_vertex[u], int_to_vertex[v]) for le in E for u, v in le] if edges_only: @@ -550,10 +594,14 @@ def connected_full_subgraphs(G, edges_only=False, labels=False): # use the binary representation of n_cpt[i] to indicate which of the # k neighbors are selected. We omit the empty neighborhood which is # considered else where. - boundary = boundaries.rows[i + 1] - bitset_copy(boundary, boundaries.rows[i]) n_cpt[i] -= 1 c = n_cpt[i] + if num_edges + _bitset_len(&c, 1) > max_edges: + # Too many edges + continue + + boundary = boundaries.rows[i + 1] + bitset_copy(boundary, boundaries.rows[i]) edges = [] j = bitset_first(neighborhoods.rows[i]) while c and j != -1: @@ -568,6 +616,7 @@ def connected_full_subgraphs(G, edges_only=False, labels=False): continue E.append(edges) + num_edges += len(edges) # otherwise, we select a vertex from the boundary and extend the order elif bitset_len(boundaries.rows[i]): @@ -582,6 +631,7 @@ def connected_full_subgraphs(G, edges_only=False, labels=False): bitset_add(active, order[i]) i -= 1 if E: + num_edges -= len(E[-1]) E.pop() continue From e87054681e1aa4a2d72f5027ffdb031abb5b0535 Mon Sep 17 00:00:00 2001 From: dcoudert Date: Fri, 28 Oct 2022 12:42:35 +0200 Subject: [PATCH 204/751] trac #32136: fix result for digraphs --- src/sage/graphs/base/static_dense_graph.pyx | 104 ++++++++++++++++++-- 1 file changed, 96 insertions(+), 8 deletions(-) diff --git a/src/sage/graphs/base/static_dense_graph.pyx b/src/sage/graphs/base/static_dense_graph.pyx index c300740d906..fb211d5337f 100644 --- a/src/sage/graphs/base/static_dense_graph.pyx +++ b/src/sage/graphs/base/static_dense_graph.pyx @@ -50,7 +50,7 @@ Functions from sage.data_structures.binary_matrix cimport * from cysignals.signals cimport sig_on, sig_off, sig_check from memory_allocator cimport MemoryAllocator - +from itertools import product cdef dict dense_graph_init(binary_matrix_t m, g, translation=None, force_undirected=False): r""" @@ -379,6 +379,90 @@ def triangles_count(G): return ans +def _format_result(G, edges, edges_only, labels): + r""" + Helper method for ``connected_full_subgraphs`` to return a result. + + INPUT: + + - ``G`` -- a :class:`DiGraph` + + - ``edges`` -- list of edges ignoring the orientation + + - ``edges_only`` -- boolean; whether to return DiGraph or list of vertices + + - ``labels`` -- boolean; whether to return labelled edges or not. This + parameter is used only when ``edges_only`` is ``True``. + + EXAMPLES: + + The complete graph of order 3 has 4 connected subgraphs:: + + sage: from sage.graphs.base.static_dense_graph import connected_full_subgraphs + sage: G = graphs.CompleteGraph(3) + sage: len(list(connected_full_subgraphs(G))) + 4 + """ + if edges_only: + if labels: + return [(u, v, G.edge_label(u, v)) for u, v in edges] + else: + return edges + else: + return G.subgraph(vertices=G, edges=edges) + + +def _yield_results_for_digraph(G, edges, edges_only, labels, min_edges, max_edges): + r""" + Helper method for ``connected_full_subgraphs`` to yield all subdigraphs. + + INPUT: + + - ``G`` -- a :class:`DiGraph` + + - ``edges`` -- list of edges ignoring the orientation + + - ``edges_only`` -- boolean; whether to return DiGraph or list of vertices + + - ``labels`` -- boolean; whether to return labelled edges or not. This + parameter is used only when ``edges_only`` is ``True``. + + - ``min_edges`` -- integer; minimum number of edges of reported subgraphs + + - ``max_edges`` -- integer; maximum number of edges of reported subgraphs + + EXAMPLES:: + + sage: from sage.graphs.base.static_dense_graph import connected_full_subgraphs + sage: G = digraphs.Complete(3) + sage: len(list(connected_full_subgraphs(G))) + 54 + """ + if not edges: + return + L = [] + for u, v in edges: + tmp = [] + if G.has_edge(u, v): + tmp.append([(u, v)]) + if G.has_edge(v, u): + tmp.append([(v, u)]) + if G.has_edge(u, v): + tmp.append([(u, v), (v, u)]) + L.append(tmp) + + if len(L) == 1: + for F in L[0]: + if min_edges <= len(F) and len(F) <= max_edges: + yield _format_result(G, F, edges_only, labels) + else: + for E in product(*L): + F = [e for le in E for e in le] + if min_edges <= len(F) and len(F) <= max_edges: + yield _format_result(G, F, edges_only, labels) + return + + def connected_full_subgraphs(G, edges_only=False, labels=False, min_edges=None, max_edges=None): r""" @@ -483,6 +567,13 @@ def connected_full_subgraphs(G, edges_only=False, labels=False, sage: next(it) [(0, 1, '01'), (0, 2, '02')] + Subgraphs of a digraph:: + + sage: from sage.graphs.base.static_dense_graph import connected_full_subgraphs + sage: G = digraphs.Complete(2) + sage: list(connected_full_subgraphs(G, edges_only=True)) + [[(0, 1)], [(1, 0)], [(0, 1), (1, 0)]] + TESTS: Non connected input graph:: @@ -532,7 +623,7 @@ def connected_full_subgraphs(G, edges_only=False, labels=False, if min_edges > max_edges: raise ValueError("we must have {} <= min_edges <= max_edges <= {}".format(n -1, m)) - if n <= 2 or min_edges == m: + if n <= 1 or (not G.is_directed() and n == 2) or min_edges == m: if edges_only: yield list(G.edges(sort=False, labels=labels)) else: @@ -580,13 +671,10 @@ def connected_full_subgraphs(G, edges_only=False, labels=False, if i == n - 1 and num_edges >= min_edges: # yield the current solution edges = [(int_to_vertex[u], int_to_vertex[v]) for le in E for u, v in le] - if edges_only: - if labels: - yield [(u, v, G.edge_label(u, v)) for u, v in edges] - else: - yield edges + if G.is_directed(): + yield from _yield_results_for_digraph(G, edges, edges_only, labels, min_edges, max_edges) else: - yield G.subgraph(vertices=int_to_vertex, edges=edges) + yield _format_result(G, edges, edges_only, labels) if n_cpt[i] > 1: # Consider the next neighborhood of the current vertex. From e49602d2a4cf2bf2eda0dbeff47ba787aeed8156 Mon Sep 17 00:00:00 2001 From: Bruno-TT Date: Mon, 31 Oct 2022 17:58:21 +0000 Subject: [PATCH 205/751] forgot to actually put something in the commit lol --- src/sage/graphs/bipartite_graph.py | 35 +++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src/sage/graphs/bipartite_graph.py b/src/sage/graphs/bipartite_graph.py index 1040419c32e..fc0626a44d9 100644 --- a/src/sage/graphs/bipartite_graph.py +++ b/src/sage/graphs/bipartite_graph.py @@ -94,6 +94,10 @@ class BipartiteGraph(Graph): - ``weighted`` -- boolean (default: ``None``); whether graph thinks of itself as weighted or not. See ``self.weighted()`` + - ``hash_labels`` - boolean (default: ``None``); whether to include labels + / weights during hashing. Will raise a warning when __hash__ is invoked + and default to true. + .. NOTE:: All remaining arguments are passed to the ``Graph`` constructor @@ -345,7 +349,7 @@ class BipartiteGraph(Graph): """ - def __init__(self, data=None, partition=None, check=True, *args, **kwds): + def __init__(self, data=None, partition=None, check=True, hash_labels=None, *args, **kwds): """ Create a bipartite graph. @@ -407,6 +411,9 @@ def __init__(self, data=None, partition=None, check=True, *args, **kwds): self.add_edges = MethodType(Graph.add_edges, self) alist_file = True + # if None, then will default to true after the user is warned + self.hash_labels=hash_labels + from sage.structure.element import is_Matrix if isinstance(data, BipartiteGraph): Graph.__init__(self, data, *args, **kwds) @@ -544,6 +551,32 @@ def __init__(self, data=None, partition=None, check=True, *args, **kwds): return + # check whether the user has specified hash_labels parameter, and warn if not + # then default it to true + def _use_hash_labels(self): + if self.hash_labels is not None: + return self.hash_labels + else: + print("WARNING: hash_labels not set in graph constructor.\nIncluding edge labels in hash calculation if present.\nPass parameter hash_labels to BipartiteGraph constructor to stop this warning.") + self.hash_labels=True + + + def __hash__(self): + + left=tuple(sorted(list(self.left))) + right=tuple(sorted(list(self.right))) + + data_to_hash=[left, right] + + # warning logic to determine whether to use labels in hash + use_labels=self._use_hash_labels() + tuple_depth = 3 if use_labels else 2 + + for edge in self.edges(sort=True): + data_to_hash.append(edge[:tuple_depth]) + + return hash(tuple(data_to_hash)) + def _upgrade_from_graph(self): """ Set the left and right sets of vertices from the input graph. From 13f7f552f0e66cce119404781e23d0a872ae9c7f Mon Sep 17 00:00:00 2001 From: Bruno-TT Date: Tue, 1 Nov 2022 16:02:28 +0000 Subject: [PATCH 206/751] tweaks --- src/sage/graphs/bipartite_graph.py | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/sage/graphs/bipartite_graph.py b/src/sage/graphs/bipartite_graph.py index fc0626a44d9..4de0423db30 100644 --- a/src/sage/graphs/bipartite_graph.py +++ b/src/sage/graphs/bipartite_graph.py @@ -94,7 +94,7 @@ class BipartiteGraph(Graph): - ``weighted`` -- boolean (default: ``None``); whether graph thinks of itself as weighted or not. See ``self.weighted()`` - - ``hash_labels`` - boolean (default: ``None``); whether to include labels + - ``hash_labels`` - boolean (default: ``False``); whether to include labels / weights during hashing. Will raise a warning when __hash__ is invoked and default to true. @@ -349,7 +349,7 @@ class BipartiteGraph(Graph): """ - def __init__(self, data=None, partition=None, check=True, hash_labels=None, *args, **kwds): + def __init__(self, data=None, partition=None, check=True, hash_labels=False, *args, **kwds): """ Create a bipartite graph. @@ -411,7 +411,6 @@ def __init__(self, data=None, partition=None, check=True, hash_labels=None, *arg self.add_edges = MethodType(Graph.add_edges, self) alist_file = True - # if None, then will default to true after the user is warned self.hash_labels=hash_labels from sage.structure.element import is_Matrix @@ -551,24 +550,19 @@ def __init__(self, data=None, partition=None, check=True, hash_labels=None, *arg return - # check whether the user has specified hash_labels parameter, and warn if not - # then default it to true + # true if specified by user, or if graph is weighted def _use_hash_labels(self): - if self.hash_labels is not None: - return self.hash_labels - else: - print("WARNING: hash_labels not set in graph constructor.\nIncluding edge labels in hash calculation if present.\nPass parameter hash_labels to BipartiteGraph constructor to stop this warning.") - self.hash_labels=True + return self.weighted() or self.hash_labels def __hash__(self): - left=tuple(sorted(list(self.left))) - right=tuple(sorted(list(self.right))) + left=frozenset(self.left) + right=frozenset(self.right) data_to_hash=[left, right] - # warning logic to determine whether to use labels in hash + # determine whether to hash labels use_labels=self._use_hash_labels() tuple_depth = 3 if use_labels else 2 From 33206afda26e6e74bbf434eeaceef31be65ed014 Mon Sep 17 00:00:00 2001 From: Bruno-TT Date: Tue, 1 Nov 2022 16:02:56 +0000 Subject: [PATCH 207/751] pep8 formatting --- src/sage/graphs/bipartite_graph.py | 96 +++++++++++++++++++----------- 1 file changed, 61 insertions(+), 35 deletions(-) diff --git a/src/sage/graphs/bipartite_graph.py b/src/sage/graphs/bipartite_graph.py index 4de0423db30..ccce4d5cdbd 100644 --- a/src/sage/graphs/bipartite_graph.py +++ b/src/sage/graphs/bipartite_graph.py @@ -411,7 +411,7 @@ def __init__(self, data=None, partition=None, check=True, hash_labels=False, *ar self.add_edges = MethodType(Graph.add_edges, self) alist_file = True - self.hash_labels=hash_labels + self.hash_labels = hash_labels from sage.structure.element import is_Matrix if isinstance(data, BipartiteGraph): @@ -421,7 +421,8 @@ def __init__(self, data=None, partition=None, check=True, hash_labels=False, *ar elif isinstance(data, str): import os alist_file = os.path.exists(data) - Graph.__init__(self, data=None if alist_file else data, *args, **kwds) + Graph.__init__( + self, data=None if alist_file else data, *args, **kwds) # methods; initialize left and right attributes self.left = set() @@ -436,7 +437,8 @@ def __init__(self, data=None, partition=None, check=True, hash_labels=False, *ar if left & right: raise ValueError("the parts are not disjoint") if len(left) + len(right) != self.num_verts(): - raise ValueError("not all vertices appear in partition") + raise ValueError( + "not all vertices appear in partition") if check: if (any(left.intersection(self.neighbor_iterator(a)) for a in left) or @@ -445,11 +447,13 @@ def __init__(self, data=None, partition=None, check=True, hash_labels=False, *ar "respect to the given partition") else: for a in left: - a_nbrs = left.intersection(self.neighbor_iterator(a)) + a_nbrs = left.intersection( + self.neighbor_iterator(a)) if a_nbrs: self.delete_edges((a, b) for b in a_nbrs) for a in right: - a_nbrs = right.intersection(self.neighbor_iterator(a)) + a_nbrs = right.intersection( + self.neighbor_iterator(a)) if a_nbrs: self.delete_edges((a, b) for b in a_nbrs) self.left, self.right = left, right @@ -554,22 +558,21 @@ def __init__(self, data=None, partition=None, check=True, hash_labels=False, *ar def _use_hash_labels(self): return self.weighted() or self.hash_labels - def __hash__(self): - - left=frozenset(self.left) - right=frozenset(self.right) - data_to_hash=[left, right] + left = frozenset(self.left) + right = frozenset(self.right) + + data_to_hash = [left, right] # determine whether to hash labels - use_labels=self._use_hash_labels() + use_labels = self._use_hash_labels() tuple_depth = 3 if use_labels else 2 for edge in self.edges(sort=True): data_to_hash.append(edge[:tuple_depth]) - return hash(tuple(data_to_hash)) + return hash(tuple(data_to_hash)) def _upgrade_from_graph(self): """ @@ -700,7 +703,8 @@ def add_vertex(self, name=None, left=False, right=False): (right and name in self.right)): return else: - raise RuntimeError("cannot add duplicate vertex to other partition") + raise RuntimeError( + "cannot add duplicate vertex to other partition") # add the vertex retval = Graph.add_vertex(self, name) @@ -799,7 +803,8 @@ def add_vertices(self, vertices, left=False, right=False): if ((new_left & self.right) or (new_right & self.left) or (new_right & new_left)): - raise RuntimeError("cannot add duplicate vertex to other partition") + raise RuntimeError( + "cannot add duplicate vertex to other partition") # add vertices Graph.add_vertices(self, vertices) @@ -915,7 +920,8 @@ def delete_vertices(self, vertices): elif vertex in self.right: self.right.remove(vertex) else: - raise RuntimeError("vertex (%s) not found in partitions" % vertex) + raise RuntimeError( + "vertex (%s) not found in partitions" % vertex) def add_edge(self, u, v=None, label=None): r""" @@ -975,11 +981,13 @@ def add_edge(self, u, v=None, label=None): # check for endpoints in different partitions if self.left.issuperset((u, v)) or self.right.issuperset((u, v)): - raise RuntimeError("edge vertices must lie in different partitions") + raise RuntimeError( + "edge vertices must lie in different partitions") # automatically decide partitions for the newly created vertices if u not in self: - self.add_vertex(u, left=(v in self.right or v not in self), right=(v in self.left)) + self.add_vertex( + u, left=(v in self.right or v not in self), right=(v in self.left)) if v not in self: self.add_vertex(v, left=(u in self.right), right=(u in self.left)) @@ -1030,17 +1038,21 @@ def add_edges(self, edges, loops=True): u, v = edge label = None except Exception: - raise TypeError("cannot interpret {!r} as graph edge".format(edge)) + raise TypeError( + "cannot interpret {!r} as graph edge".format(edge)) # check for endpoints in different partitions if self.left.issuperset((u, v)) or self.right.issuperset((u, v)): - raise RuntimeError("edge vertices must lie in different partitions") + raise RuntimeError( + "edge vertices must lie in different partitions") # automatically decide partitions for the newly created vertices if u not in self: - self.add_vertex(u, left=(v in self.right or v not in self), right=(v in self.left)) + self.add_vertex( + u, left=(v in self.right or v not in self), right=(v in self.left)) if v not in self: - self.add_vertex(v, left=(u in self.right), right=(u in self.left)) + self.add_vertex(v, left=(u in self.right), + right=(u in self.left)) self._backend.add_edge(u, v, label, self._directed) @@ -1175,8 +1187,10 @@ def complement_bipartite(self): """ self._scream_if_not_simple() - E = [e for e in itertools.product(self.left, self.right) if not self.has_edge(e)] - H = BipartiteGraph([self, E], format='vertices_and_edges', partition=[self.left, self.right]) + E = [e for e in itertools.product( + self.left, self.right) if not self.has_edge(e)] + H = BipartiteGraph([self, E], format='vertices_and_edges', partition=[ + self.left, self.right]) if self.name(): H.name("complement-bipartite({})".format(self.name())) @@ -1223,7 +1237,8 @@ def project_left(self): G.add_vertices(self.left) for v in G: for u in self.neighbor_iterator(v): - G.add_edges(((v, w) for w in self.neighbor_iterator(u)), loops=False) + G.add_edges(((v, w) + for w in self.neighbor_iterator(u)), loops=False) return G def project_right(self): @@ -1251,7 +1266,8 @@ def project_right(self): G.add_vertices(self.right) for v in G: for u in self.neighbor_iterator(v): - G.add_edges(((v, w) for w in self.neighbor_iterator(u)), loops=False) + G.add_edges(((v, w) + for w in self.neighbor_iterator(u)), loops=False) return G def plot(self, *args, **kwds): @@ -1269,12 +1285,14 @@ def plot(self, *args, **kwds): if kwds["pos"] is None: if self.left: y = 0 if len(self.left) == 1 else 1 - pos = self._line_embedding(sorted(self.left), first=(-1, y), last=(-1, -y), return_dict=True) + pos = self._line_embedding( + sorted(self.left), first=(-1, y), last=(-1, -y), return_dict=True) else: pos = {} if self.right: y = 0 if len(self.right) == 1 else 1 - pos.update(self._line_embedding(sorted(self.right), first=(1, y), last=(1, -y), return_dict=True)) + pos.update(self._line_embedding(sorted(self.right), + first=(1, y), last=(1, -y), return_dict=True)) kwds["pos"] = pos return Graph.plot(self, *args, **kwds) @@ -1818,7 +1836,8 @@ def reduced_adjacency_matrix(self, sparse=True, *, base_ring=None, **kwds): else: # if we're normal or multi-edge, just create the matrix over ZZ for v1, v2, name in self.edge_iterator(): - idx = (right[v2], left[v1]) if v1 in left else (right[v1], left[v2]) + idx = (right[v2], left[v1]) if v1 in left else ( + right[v1], left[v2]) if idx in D: D[idx] += 1 else: @@ -1982,7 +2001,8 @@ class :class:`MixedIntegerLinearProgram # NetworkX matching algorithms for bipartite graphs may fail # when the graph is not connected if not self.is_connected(): - CC = [g for g in self.connected_components_subgraphs() if g.size()] + CC = [g for g in self.connected_components_subgraphs() + if g.size()] else: CC = [self] v2int = {v: i for i, v in enumerate(self)} @@ -2305,7 +2325,8 @@ def _subgraph_by_deleting(self, vertices=None, edges=None, inplace=False, B = self else: # We make a copy of the graph - B = BipartiteGraph(data=self.edges(sort=True), partition=[self.left, self.right]) + B = BipartiteGraph(data=self.edges(sort=True), + partition=[self.left, self.right]) attributes_to_update = ('_pos', '_assoc') for attr in attributes_to_update: if hasattr(self, attr) and getattr(self, attr) is not None: @@ -2315,7 +2336,8 @@ def _subgraph_by_deleting(self, vertices=None, edges=None, inplace=False, B.name("Subgraph of ({})".format(self.name())) vertices = set(vertices) - B.delete_vertices([v for v in B.vertex_iterator() if v not in vertices]) + B.delete_vertices( + [v for v in B.vertex_iterator() if v not in vertices]) edges_to_delete = [] if edges is not None: @@ -2330,7 +2352,8 @@ def _subgraph_by_deleting(self, vertices=None, edges=None, inplace=False, if edge_property is not None: # We might get duplicate edges, but this does handle the case of # multiple edges. - edges_to_delete.extend(e for e in B.edge_iterator() if not edge_property(e)) + edges_to_delete.extend( + e for e in B.edge_iterator() if not edge_property(e)) B.delete_edges(edges_to_delete) return B @@ -2439,7 +2462,8 @@ class by some canonization function `c`. If `G` and `H` are graphs, cert = {} if edge_labels or self.has_multiple_edges(): - G, partition, relabeling = graph_isom_equivalent_non_edge_labeled_graph(self, partition, return_relabeling=True) + G, partition, relabeling = graph_isom_equivalent_non_edge_labeled_graph( + self, partition, return_relabeling=True) G_vertices = list(chain(*partition)) G_to = {u: i for i, u in enumerate(G_vertices)} H = Graph(len(G_vertices)) @@ -2448,7 +2472,8 @@ class by some canonization function `c`. If `G` and `H` are graphs, HB.add_edge(G_to[u], G_to[v], None, False) GC = HB.c_graph()[0] partition = [[G_to[vv] for vv in cell] for cell in partition] - a, b, c = search_tree(GC, partition, certificate=True, dig=False) + a, b, c = search_tree( + GC, partition, certificate=True, dig=False) # c is a permutation to the canonical label of G, # which depends only on isomorphism class of self. cert = {v: c[G_to[relabeling[v]]] for v in self} @@ -2462,7 +2487,8 @@ class by some canonization function `c`. If `G` and `H` are graphs, HB.add_edge(G_to[u], G_to[v], None, False) GC = HB.c_graph()[0] partition = [[G_to[vv] for vv in cell] for cell in partition] - a, b, c = search_tree(GC, partition, certificate=True, dig=False) + a, b, c = search_tree( + GC, partition, certificate=True, dig=False) cert = {v: c[G_to[v]] for v in G_to} C = self.relabel(perm=cert, inplace=False) From aca2b6366fdc174aa0f17d327731748dea9f1952 Mon Sep 17 00:00:00 2001 From: Bruno-TT Date: Tue, 1 Nov 2022 17:16:59 +0000 Subject: [PATCH 208/751] Revert "pep8 formatting" This reverts commit 33206afda26e6e74bbf434eeaceef31be65ed014. --- src/sage/graphs/bipartite_graph.py | 96 +++++++++++------------------- 1 file changed, 35 insertions(+), 61 deletions(-) diff --git a/src/sage/graphs/bipartite_graph.py b/src/sage/graphs/bipartite_graph.py index ccce4d5cdbd..4de0423db30 100644 --- a/src/sage/graphs/bipartite_graph.py +++ b/src/sage/graphs/bipartite_graph.py @@ -411,7 +411,7 @@ def __init__(self, data=None, partition=None, check=True, hash_labels=False, *ar self.add_edges = MethodType(Graph.add_edges, self) alist_file = True - self.hash_labels = hash_labels + self.hash_labels=hash_labels from sage.structure.element import is_Matrix if isinstance(data, BipartiteGraph): @@ -421,8 +421,7 @@ def __init__(self, data=None, partition=None, check=True, hash_labels=False, *ar elif isinstance(data, str): import os alist_file = os.path.exists(data) - Graph.__init__( - self, data=None if alist_file else data, *args, **kwds) + Graph.__init__(self, data=None if alist_file else data, *args, **kwds) # methods; initialize left and right attributes self.left = set() @@ -437,8 +436,7 @@ def __init__(self, data=None, partition=None, check=True, hash_labels=False, *ar if left & right: raise ValueError("the parts are not disjoint") if len(left) + len(right) != self.num_verts(): - raise ValueError( - "not all vertices appear in partition") + raise ValueError("not all vertices appear in partition") if check: if (any(left.intersection(self.neighbor_iterator(a)) for a in left) or @@ -447,13 +445,11 @@ def __init__(self, data=None, partition=None, check=True, hash_labels=False, *ar "respect to the given partition") else: for a in left: - a_nbrs = left.intersection( - self.neighbor_iterator(a)) + a_nbrs = left.intersection(self.neighbor_iterator(a)) if a_nbrs: self.delete_edges((a, b) for b in a_nbrs) for a in right: - a_nbrs = right.intersection( - self.neighbor_iterator(a)) + a_nbrs = right.intersection(self.neighbor_iterator(a)) if a_nbrs: self.delete_edges((a, b) for b in a_nbrs) self.left, self.right = left, right @@ -558,21 +554,22 @@ def __init__(self, data=None, partition=None, check=True, hash_labels=False, *ar def _use_hash_labels(self): return self.weighted() or self.hash_labels - def __hash__(self): - left = frozenset(self.left) - right = frozenset(self.right) + def __hash__(self): + + left=frozenset(self.left) + right=frozenset(self.right) - data_to_hash = [left, right] + data_to_hash=[left, right] # determine whether to hash labels - use_labels = self._use_hash_labels() + use_labels=self._use_hash_labels() tuple_depth = 3 if use_labels else 2 for edge in self.edges(sort=True): data_to_hash.append(edge[:tuple_depth]) - return hash(tuple(data_to_hash)) + return hash(tuple(data_to_hash)) def _upgrade_from_graph(self): """ @@ -703,8 +700,7 @@ def add_vertex(self, name=None, left=False, right=False): (right and name in self.right)): return else: - raise RuntimeError( - "cannot add duplicate vertex to other partition") + raise RuntimeError("cannot add duplicate vertex to other partition") # add the vertex retval = Graph.add_vertex(self, name) @@ -803,8 +799,7 @@ def add_vertices(self, vertices, left=False, right=False): if ((new_left & self.right) or (new_right & self.left) or (new_right & new_left)): - raise RuntimeError( - "cannot add duplicate vertex to other partition") + raise RuntimeError("cannot add duplicate vertex to other partition") # add vertices Graph.add_vertices(self, vertices) @@ -920,8 +915,7 @@ def delete_vertices(self, vertices): elif vertex in self.right: self.right.remove(vertex) else: - raise RuntimeError( - "vertex (%s) not found in partitions" % vertex) + raise RuntimeError("vertex (%s) not found in partitions" % vertex) def add_edge(self, u, v=None, label=None): r""" @@ -981,13 +975,11 @@ def add_edge(self, u, v=None, label=None): # check for endpoints in different partitions if self.left.issuperset((u, v)) or self.right.issuperset((u, v)): - raise RuntimeError( - "edge vertices must lie in different partitions") + raise RuntimeError("edge vertices must lie in different partitions") # automatically decide partitions for the newly created vertices if u not in self: - self.add_vertex( - u, left=(v in self.right or v not in self), right=(v in self.left)) + self.add_vertex(u, left=(v in self.right or v not in self), right=(v in self.left)) if v not in self: self.add_vertex(v, left=(u in self.right), right=(u in self.left)) @@ -1038,21 +1030,17 @@ def add_edges(self, edges, loops=True): u, v = edge label = None except Exception: - raise TypeError( - "cannot interpret {!r} as graph edge".format(edge)) + raise TypeError("cannot interpret {!r} as graph edge".format(edge)) # check for endpoints in different partitions if self.left.issuperset((u, v)) or self.right.issuperset((u, v)): - raise RuntimeError( - "edge vertices must lie in different partitions") + raise RuntimeError("edge vertices must lie in different partitions") # automatically decide partitions for the newly created vertices if u not in self: - self.add_vertex( - u, left=(v in self.right or v not in self), right=(v in self.left)) + self.add_vertex(u, left=(v in self.right or v not in self), right=(v in self.left)) if v not in self: - self.add_vertex(v, left=(u in self.right), - right=(u in self.left)) + self.add_vertex(v, left=(u in self.right), right=(u in self.left)) self._backend.add_edge(u, v, label, self._directed) @@ -1187,10 +1175,8 @@ def complement_bipartite(self): """ self._scream_if_not_simple() - E = [e for e in itertools.product( - self.left, self.right) if not self.has_edge(e)] - H = BipartiteGraph([self, E], format='vertices_and_edges', partition=[ - self.left, self.right]) + E = [e for e in itertools.product(self.left, self.right) if not self.has_edge(e)] + H = BipartiteGraph([self, E], format='vertices_and_edges', partition=[self.left, self.right]) if self.name(): H.name("complement-bipartite({})".format(self.name())) @@ -1237,8 +1223,7 @@ def project_left(self): G.add_vertices(self.left) for v in G: for u in self.neighbor_iterator(v): - G.add_edges(((v, w) - for w in self.neighbor_iterator(u)), loops=False) + G.add_edges(((v, w) for w in self.neighbor_iterator(u)), loops=False) return G def project_right(self): @@ -1266,8 +1251,7 @@ def project_right(self): G.add_vertices(self.right) for v in G: for u in self.neighbor_iterator(v): - G.add_edges(((v, w) - for w in self.neighbor_iterator(u)), loops=False) + G.add_edges(((v, w) for w in self.neighbor_iterator(u)), loops=False) return G def plot(self, *args, **kwds): @@ -1285,14 +1269,12 @@ def plot(self, *args, **kwds): if kwds["pos"] is None: if self.left: y = 0 if len(self.left) == 1 else 1 - pos = self._line_embedding( - sorted(self.left), first=(-1, y), last=(-1, -y), return_dict=True) + pos = self._line_embedding(sorted(self.left), first=(-1, y), last=(-1, -y), return_dict=True) else: pos = {} if self.right: y = 0 if len(self.right) == 1 else 1 - pos.update(self._line_embedding(sorted(self.right), - first=(1, y), last=(1, -y), return_dict=True)) + pos.update(self._line_embedding(sorted(self.right), first=(1, y), last=(1, -y), return_dict=True)) kwds["pos"] = pos return Graph.plot(self, *args, **kwds) @@ -1836,8 +1818,7 @@ def reduced_adjacency_matrix(self, sparse=True, *, base_ring=None, **kwds): else: # if we're normal or multi-edge, just create the matrix over ZZ for v1, v2, name in self.edge_iterator(): - idx = (right[v2], left[v1]) if v1 in left else ( - right[v1], left[v2]) + idx = (right[v2], left[v1]) if v1 in left else (right[v1], left[v2]) if idx in D: D[idx] += 1 else: @@ -2001,8 +1982,7 @@ class :class:`MixedIntegerLinearProgram # NetworkX matching algorithms for bipartite graphs may fail # when the graph is not connected if not self.is_connected(): - CC = [g for g in self.connected_components_subgraphs() - if g.size()] + CC = [g for g in self.connected_components_subgraphs() if g.size()] else: CC = [self] v2int = {v: i for i, v in enumerate(self)} @@ -2325,8 +2305,7 @@ def _subgraph_by_deleting(self, vertices=None, edges=None, inplace=False, B = self else: # We make a copy of the graph - B = BipartiteGraph(data=self.edges(sort=True), - partition=[self.left, self.right]) + B = BipartiteGraph(data=self.edges(sort=True), partition=[self.left, self.right]) attributes_to_update = ('_pos', '_assoc') for attr in attributes_to_update: if hasattr(self, attr) and getattr(self, attr) is not None: @@ -2336,8 +2315,7 @@ def _subgraph_by_deleting(self, vertices=None, edges=None, inplace=False, B.name("Subgraph of ({})".format(self.name())) vertices = set(vertices) - B.delete_vertices( - [v for v in B.vertex_iterator() if v not in vertices]) + B.delete_vertices([v for v in B.vertex_iterator() if v not in vertices]) edges_to_delete = [] if edges is not None: @@ -2352,8 +2330,7 @@ def _subgraph_by_deleting(self, vertices=None, edges=None, inplace=False, if edge_property is not None: # We might get duplicate edges, but this does handle the case of # multiple edges. - edges_to_delete.extend( - e for e in B.edge_iterator() if not edge_property(e)) + edges_to_delete.extend(e for e in B.edge_iterator() if not edge_property(e)) B.delete_edges(edges_to_delete) return B @@ -2462,8 +2439,7 @@ class by some canonization function `c`. If `G` and `H` are graphs, cert = {} if edge_labels or self.has_multiple_edges(): - G, partition, relabeling = graph_isom_equivalent_non_edge_labeled_graph( - self, partition, return_relabeling=True) + G, partition, relabeling = graph_isom_equivalent_non_edge_labeled_graph(self, partition, return_relabeling=True) G_vertices = list(chain(*partition)) G_to = {u: i for i, u in enumerate(G_vertices)} H = Graph(len(G_vertices)) @@ -2472,8 +2448,7 @@ class by some canonization function `c`. If `G` and `H` are graphs, HB.add_edge(G_to[u], G_to[v], None, False) GC = HB.c_graph()[0] partition = [[G_to[vv] for vv in cell] for cell in partition] - a, b, c = search_tree( - GC, partition, certificate=True, dig=False) + a, b, c = search_tree(GC, partition, certificate=True, dig=False) # c is a permutation to the canonical label of G, # which depends only on isomorphism class of self. cert = {v: c[G_to[relabeling[v]]] for v in self} @@ -2487,8 +2462,7 @@ class by some canonization function `c`. If `G` and `H` are graphs, HB.add_edge(G_to[u], G_to[v], None, False) GC = HB.c_graph()[0] partition = [[G_to[vv] for vv in cell] for cell in partition] - a, b, c = search_tree( - GC, partition, certificate=True, dig=False) + a, b, c = search_tree(GC, partition, certificate=True, dig=False) cert = {v: c[G_to[v]] for v in G_to} C = self.relabel(perm=cert, inplace=False) From c39d653071d1d00b73fca4bf961bab8d4a7ba360 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Wed, 2 Nov 2022 10:55:37 +0100 Subject: [PATCH 209/751] non-copying intersection, to save memory when there are almost no restrictions on the values of a block --- src/sage/combinat/bijectionist.py | 51 +++++++++++++++++++++++-------- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 0124994c022..4b4b52089d6 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -13,6 +13,12 @@ # subdistributions with "smallest" (e.g., in the sorting order # defined above) elements first? +# Priorities: + +# 1) for an all-knowing user, code should be as fast as possible +# 2) code should be easy to understand +# 3) anticipate that a user computes things in a bad order + r""" A bijectionist's toolkit @@ -492,7 +498,7 @@ def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], pi_rho=tuple(), ele Check that large input sets are handled well:: - sage: A = B = list(range(7000)) + sage: A = B = list(range(20000)) sage: bij = Bijectionist(A, B) """ # glossary of standard letters: @@ -1062,19 +1068,13 @@ def _compute_possible_block_values(self): r""" Update the dictionary of possible values of each block. - This has to be called whenever `self._P` was modified. - - .. TODO:: - - If `self._Z` is large, this is very memory expensive. In - this case it would be good if equal values of the dictionary - `self._possible_block_values` would share memory. - + This has to be called whenever ``self._P`` was modified. """ self._possible_block_values = {} # P -> Power(Z) for p, block in self._P.root_to_elements_dict().items(): - self._possible_block_values[p] = set.intersection(*[self._restrictions_possible_values[a] for a in block], - *[self._statistics_possible_values[a] for a in block]) + sets = ([self._restrictions_possible_values[a] for a in block] + + [self._statistics_possible_values[a] for a in block]) + self._possible_block_values[p] = _non_copying_intersection(sets) if not self._possible_block_values[p]: if len(block) == 1: raise ValueError(f"No possible values found for singleton block {block}") @@ -2435,7 +2435,6 @@ def _generate_and_solve_initial_bmilp(self): r""" Generate a ``_BijectionistMILP``, add all relevant constraints and call ``MILP.solve()``. - """ preimage_blocks = self._preprocess_intertwining_relations() self._compute_possible_block_values() @@ -2670,6 +2669,34 @@ def _disjoint_set_roots(d): return d.root_to_elements_dict().keys() +def _non_copying_intersection(sets): + """ + Return the intersection of the sets. + + If the intersection is equal to one of the sets, return this + set. + + EXAMPLES:: + + sage: from sage.combinat.bijectionist import _non_copying_intersection + sage: A = set(range(7000)); B = set(range(8000)); + sage: _non_copying_intersection([A, B]) is A + True + + """ + sets = sorted(sets, key=len) + result = set.intersection(*sets) + n = len(result) + if n < len(sets[0]): + return result + for s in sets: + N = len(s) + if N > n: + return result + if s == result: + return s + + """ TESTS:: From eafaf288bf0b6fc26a81f290aa93080f185d356c Mon Sep 17 00:00:00 2001 From: Bruno Edwards Date: Tue, 8 Nov 2022 16:54:47 +0000 Subject: [PATCH 210/751] prevent mutable graph hashing + label warnings --- src/sage/graphs/bipartite_graph.py | 44 ++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 11 deletions(-) diff --git a/src/sage/graphs/bipartite_graph.py b/src/sage/graphs/bipartite_graph.py index 4de0423db30..ef5696ee790 100644 --- a/src/sage/graphs/bipartite_graph.py +++ b/src/sage/graphs/bipartite_graph.py @@ -349,7 +349,7 @@ class BipartiteGraph(Graph): """ - def __init__(self, data=None, partition=None, check=True, hash_labels=False, *args, **kwds): + def __init__(self, data=None, partition=None, check=True, hash_labels=None, *args, **kwds): """ Create a bipartite graph. @@ -552,24 +552,46 @@ def __init__(self, data=None, partition=None, check=True, hash_labels=False, *ar # true if specified by user, or if graph is weighted def _use_hash_labels(self): - return self.weighted() or self.hash_labels + if self.hash_labels is None: + import warnings + fallback=self.weighted() + warnings.warn(f"Warning - hash_labels parameter not passed to BipartiteGraph constructor.\nDefaulting to {fallback} [aka self.weighted()]") + self.hash_labels=fallback + return self.hash_labels def __hash__(self): + + """ + Compute a hash for ``self``, if ``self`` is immutable. + """ + if self.is_immutable(): - left=frozenset(self.left) - right=frozenset(self.right) + left=frozenset(self.left) + right=frozenset(self.right) + + data_to_hash=[left, right] - data_to_hash=[left, right] + # determine whether to hash labels + # warn user if not manually specified + use_labels=self._use_hash_labels() + tuple_depth = 3 if use_labels else 2 - # determine whether to hash labels - use_labels=self._use_hash_labels() - tuple_depth = 3 if use_labels else 2 + for edge in self.edges(sort=True): + data_to_hash.append(edge[:tuple_depth]) - for edge in self.edges(sort=True): - data_to_hash.append(edge[:tuple_depth]) + + # edge_iter = self.edge_iterator(labels=use_labels) + + # if self.allows_multiple_edges(): + # from collections import Counter + # edge_items = Counter(edge_iter).items() + # else: + # edge_items = edge_iter - return hash(tuple(data_to_hash)) + return hash(tuple(data_to_hash)) + else: + raise TypeError("This graph is mutable, and thus not hashable. Create an immutable copy by `g.copy(immutable=True)`") def _upgrade_from_graph(self): """ From 7211f4208965f7dd2c775be7fbf89e589f21fecd Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 15 Nov 2022 00:33:12 -0800 Subject: [PATCH 211/751] build/pkgs/cvxpy: Update to 1.2.2 --- build/pkgs/cvxpy/checksums.ini | 6 +++--- build/pkgs/cvxpy/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/cvxpy/checksums.ini b/build/pkgs/cvxpy/checksums.ini index dc48984b115..0e9043f458c 100644 --- a/build/pkgs/cvxpy/checksums.ini +++ b/build/pkgs/cvxpy/checksums.ini @@ -1,5 +1,5 @@ tarball=cvxpy-VERSION.tar.gz -sha1=03d4c4cbe3161771d3978135d44c06a868e69988 -md5=893c1fd38be2b847c389f785555d8f59 -cksum=1338249214 +sha1=4cb95d1844ecd10b82f944e101ceb95829ee68d9 +md5=c5115e246e45dfcb0bde69c257b90a56 +cksum=3292234281 upstream_url=https://pypi.io/packages/source/c/cvxpy/cvxpy-VERSION.tar.gz diff --git a/build/pkgs/cvxpy/package-version.txt b/build/pkgs/cvxpy/package-version.txt index 6085e946503..23aa8390630 100644 --- a/build/pkgs/cvxpy/package-version.txt +++ b/build/pkgs/cvxpy/package-version.txt @@ -1 +1 @@ -1.2.1 +1.2.2 From 7346fd1e3c2f7ebf4c6b01090dd14bc87b1641c5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 15 Nov 2022 00:34:20 -0800 Subject: [PATCH 212/751] build/pkgs/scs: Update to 3.2.2 --- build/pkgs/scs/checksums.ini | 6 +++--- build/pkgs/scs/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/scs/checksums.ini b/build/pkgs/scs/checksums.ini index f92f46b9f2c..1e2e269bf71 100644 --- a/build/pkgs/scs/checksums.ini +++ b/build/pkgs/scs/checksums.ini @@ -1,5 +1,5 @@ tarball=scs-VERSION.tar.gz -sha1=938174ef98ba1b92d108a47abcbf12b1d2119dcb -md5=336840dd28db0fd90d2b0570c8372291 -cksum=3980097253 +sha1=309a035e5031f7a51c4992d5ad6c9236a406adc2 +md5=c984027aea923fa88e2f73c61bc06dd0 +cksum=1688898932 upstream_url=https://pypi.io/packages/source/s/scs/scs-VERSION.tar.gz diff --git a/build/pkgs/scs/package-version.txt b/build/pkgs/scs/package-version.txt index 944880fa15e..be94e6f53db 100644 --- a/build/pkgs/scs/package-version.txt +++ b/build/pkgs/scs/package-version.txt @@ -1 +1 @@ -3.2.0 +3.2.2 From 0374b6d900171ca54f946e71f52481e6dca2ae43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Tue, 15 Nov 2022 17:08:23 +0100 Subject: [PATCH 213/751] (breaking) Change base morphism to base ring for Drinfeld modules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit WARNING: THIS IS EXTREMELY BUGGY! The base of the category was a ring morphism, it is now a ring extension. This change was discussed in comment 268 of the ticket: https://trac.sagemath.org/ticket/33713#comment:268. I updated both the code, documentation, and doctests. Many tests are unfortunately tagued with `# todo: not tested`, as several bugs need be corrected. Those are the bugs. 1. The first bug is https://trac.sagemath.org/ticket/34752. 2. One cannot create ring extensions using 'exotic' morphisms:: sage: Fq = GF(11) sage: FqX. = Fq[] sage: K = Frac(FqX) sage: f = Hom(FqX, K)(K(1)) sage: K_over = K.over(f) # Exception This a problem to define Drinfeld modules with arbitrary constant coefficient. 3. One cannot see the base ring — which is a ring extension over Fq[X] — as a ring extension over Fq:: sage: Fq = GF(25) sage: FqX. = Fq[] sage: K. = Fq.extension(6) sage: phi = DrinfeldModule(FqX, [z12, 0, 1]) sage: K_over = phi.base_ring() sage: K_over.over(Fq) # Exception This would be very helpful to compute the function-ring characteristic and the Frobenius endomorphism (it requires the degree of the base field over Fq). 4. This other coercion problem causes problem to the ``invert`` method:: Fq = GF(25) FqX. = Fq[] K. = Fq.extension(6) phi = DrinfeldModule(FqX, [z12, 0, 1]) K_over = phi.base_ring() Fq(K_over(1)) # Exception --- src/sage/categories/drinfeld_modules.py | 306 +++++----- .../function_field/drinfeld_modules/action.py | 29 +- .../drinfeld_modules/drinfeld_module.py | 535 +++++++++--------- .../finite_drinfeld_module.py | 83 +-- .../function_field/drinfeld_modules/homset.py | 8 +- .../drinfeld_modules/morphism.py | 20 +- 6 files changed, 484 insertions(+), 497 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index dc11284e7fa..5f78eab3a3f 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -18,45 +18,44 @@ # http://www.gnu.org/licenses/ # ****************************************************************************** -from sage.categories.category_types import Category_over_base +from sage.categories.category_types import Category_over_base_ring from sage.categories.homsets import Homsets from sage.misc.functional import log from sage.misc.latex import latex from sage.rings.integer import Integer -from sage.rings.morphism import RingHomomorphism from sage.rings.polynomial.ore_polynomial_ring import OrePolynomialRing from sage.rings.polynomial.polynomial_ring import PolynomialRing_general +from sage.rings.ring_extension import RingExtension_generic -class DrinfeldModules(Category_over_base): +class DrinfeldModules(Category_over_base_ring): r""" This class represents the category of Drinfeld modules on a given base. Let `\mathbb{F}_q[X]` be a polynomial ring with coefficients in a - finite field `\mathbb{F}_q` and let `K` be a field. We fix a ring - morphism `\gamma: \mathbb{F}_q[X] \to K`, which we call the *base* - of the category (it is the base of the Drinfeld modules in the - category). Please note that the base is not a ring; in particular, - it is not the field `K`. We also call `K` an - `\mathbb{F}_q[X]`-field. - - The category is uniquely defined by its base. - - The monic polynomial that generates the kernel of the base is called - the `\mathbb{F}_q[X]`-characteristic of the `\mathbb{F}_q[X]`-field - `K`. + finite field `\mathbb{F}_q` and let `K` be a field. Fix a ring + morphism `\gamma: \mathbb{F}_q[X] \to K`. We say that the field `K` + is an `\mathbb{F}_q[X]`-field, so that the *base of the category* is + defined as the `\mathbb{F}_q[X]`-field *K*. The base uniquely + defines the category, and we also refer to it as the *base ring* or + *base field*. The *base morphism* is the morphism `\gamma: + \mathbb{F}_q[X] \to K`. .. NOTE:: - These notations will be used throughout this documentation. + Equivalently, the base of the category could be defined as the + base morphism `\gamma: \mathbb{F}_q[X] \to K`. + + The monic polynomial that generates the kernel of the base morphism + is called the `\mathbb{F}_q[X]`-characteristic of the + `\mathbb{F}_q[X]`-field `K`. It cal also be referred to as the + function-field characteristic of `K`. We say that `\mathbb{F}_q[X]` is the function ring of the category; - `K\{\tau\}` is the polynomial ring of the category. The constant - coefficient of the category is the image of `X` under the base. The - `\mathbb{F}_q[X]`-characteristic of the `\mathbb{F}_q[X]`-field `K` - can also be referred to as its function ring-characteristic. - Finally, `K` is just refered to as the codomain base. + `K\{\tau\}` is the Ore polynomial ring of the category. The constant + coefficient of the category is the image of `X` under the base + morphism. INPUT: the base ring morphism @@ -73,32 +72,37 @@ class DrinfeldModules(Category_over_base): sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: cat - Category of Drinfeld modules defined over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field of size 11 - To: Finite Field in z of size 11^4 - Defn: X |--> z^3 + 7*z^2 + 6*z + 10 + Category of Drinfeld modules defined over Finite Field in z of size 11^4 over its base The output tells the user that the category is only defined by its base. .. RUBRIC:: Properties of the category - The base, which is a morphism, is retrieved using the method - :meth:`morphism`:: + The base ring is retrieved using the method :meth:`base` or + :meth:`base_ring`:: sage: cat.base() + Finite Field in z of size 11^4 over its base + sage: cat.base_ring() + Finite Field in z of size 11^4 over its base + + Equivalently, one can use :meth:`base_morphism` to retrieve the base + morphism:: + + sage: cat.base_morphism() Ring morphism: From: Univariate Polynomial Ring in X over Finite Field of size 11 - To: Finite Field in z of size 11^4 + To: Finite Field in z of size 11^4 over its base Defn: X |--> z^3 + 7*z^2 + 6*z + 10 The so-called constant coefficient --- which is the same for all Drinfeld modules in the category --- is simply the image of `X` by - this morphism: + the base morphism:: sage: cat.constant_coefficient() z^3 + 7*z^2 + 6*z + 10 - sage: cat.base()(X) == cat.constant_coefficient() + sage: cat.base_morphism()(X) == cat.constant_coefficient() True Similarly, the function ring-characteristic of the category is @@ -107,25 +111,24 @@ class DrinfeldModules(Category_over_base): sage: cat.characteristic() X^2 + 7*X + 2 - sage: cat.base()(cat.characteristic()) + sage: cat.base_morphism()(cat.characteristic()) 0 - The base, function ring and Ore polynomial ring are the - same for the category and its objects:: + The base ring, base morphism, function ring and Ore polynomial ring + are the same for the category and its objects:: sage: cat.base() is phi.base() True + sage: cat.base_morphism() is phi.base_morphism() + True sage: cat.function_ring() is phi.function_ring() True sage: cat.function_ring() Univariate Polynomial Ring in X over Finite Field of size 11 - sage: cat.function_ring() is cat.base().domain() - True - sage: cat.ore_polring() is phi.ore_polring() True sage: cat.ore_polring() - Ore Polynomial Ring in t over Finite Field in z of size 11^4 twisted by z |--> z^11 + Ore Polynomial Ring in t over Finite Field in z of size 11^4 over its base twisted by Frob .. RUBRIC:: Creating Drinfeld module objects from the category @@ -134,10 +137,7 @@ class DrinfeldModules(Category_over_base): sage: psi = cat.object([p_root, 1]) sage: psi - Drinfeld module defined by X |--> t + z^3 + 7*z^2 + 6*z + 10 over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field of size 11 - To: Finite Field in z of size 11^4 - Defn: X |--> z^3 + 7*z^2 + 6*z + 10 + Drinfeld module defined by X |--> t + z^3 + 7*z^2 + 6*z + 10 over base Finite Field in z of size 11^4 over its base sage: psi.category() is cat True @@ -147,7 +147,7 @@ class DrinfeldModules(Category_over_base): sage: cat.object([z, 1]) Traceback (most recent call last): ... - ValueError: constant coefficient must be the generator of the morphism that defines the category + ValueError: constant coefficient must equal that of the category It is also possible to create a random object in the category. The input is the desired rank:: @@ -170,13 +170,23 @@ class DrinfeldModules(Category_over_base): sage: cat = DrinfeldModules(base) Traceback (most recent call last): ... - ValueError: base must be a nonzero morphism + TypeError: base field must be a ring extension + + :: + + sage: cat.base().defining_morphism() == cat.base_morphism() + True + + :: sage: base = Hom(FqX, FqX)(1) sage: cat = DrinfeldModules(base) Traceback (most recent call last): ... - TypeError: base codomain must be a field + TypeError: base field must be a ring extension + + :: + sage: base = 'I hate Rostropovitch' sage: cat = DrinfeldModules(base) # known bug (blankline) @@ -185,6 +195,8 @@ class DrinfeldModules(Category_over_base): ... TypeError: input must be a ring morphism + :: + sage: ZZT. = ZZ[] sage: base = Hom(ZZT, K)(1) sage: cat = DrinfeldModules(base) # known bug (blankline) @@ -193,15 +205,17 @@ class DrinfeldModules(Category_over_base): ... TypeError: function ring base must be a finite field """ - def __init__(self, base, name='t'): + + def __init__(self, base_field, name='t'): r""" Initialize `self`. INPUT: - - ``base`` -- the base ring morphism + - ``base_ring`` -- the base field, which is a ring extension + over a base - ``name`` (default: `'t'`) -- the name of the Ore polynomial - ring generator + variable TESTS:: @@ -211,25 +225,33 @@ def __init__(self, base, name='t'): sage: p_root = z^3 + 7*z^2 + 6*z + 10 sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) sage: cat = phi.category() - sage: ore_polring. = OrePolynomialRing(K, K.frobenius_endomorphism()) + sage: ore_polring. = OrePolynomialRing(phi.base(), phi.base().frobenius_endomorphism()) sage: cat._ore_polring is ore_polring True - sage: base = Hom(FqX, K)(p_root) - sage: cat._base == base + sage: i = phi.base().coerce_map_from(K) + sage: base_morphism = Hom(FqX, K)(p_root) + sage: cat.base() == K.over(base_morphism) + True + sage: cat._base_morphism == i * base_morphism True sage: cat._function_ring is FqX True - sage: cat._constant_coefficient == base(X) + sage: cat._constant_coefficient == base_morphism(X) True sage: cat._characteristic(cat._constant_coefficient) 0 """ - # Check input is a ring Morphism - if not isinstance(base, RingHomomorphism): - raise TypeError('input must be a Ring morphism') - self._base = base - self._function_ring = base.domain() - # Check domain of base is Fq[X] + # Check input is a ring extension + if not isinstance(base_field, RingExtension_generic): + raise TypeError('base field must be a ring extension') + base_morphism = base_field.defining_morphism() + self._base_morphism = base_morphism + # Check input is a field + if not base_field.is_field(): + raise TypeError('input must be a field') + self._base_field = base_field + self._function_ring = base_morphism.domain() + # Check domain of base morphism is Fq[X] function_ring = self._function_ring if not isinstance(function_ring, PolynomialRing_general): raise NotImplementedError('function ring must be a polynomial ' @@ -238,32 +260,26 @@ def __init__(self, base, name='t'): if not function_ring_base.is_field() \ or not function_ring_base.is_finite(): raise TypeError('function ring base must be a finite field') + # Shortcuts Fq = function_ring_base FqX = function_ring X = FqX.gen() - # Check codomain of base is a field - K = base.codomain() - if not K.is_field(): - raise TypeError('base codomain must be a field') - # Check base is a nonzero morphism - if base(X).is_zero(): - raise ValueError('base must be a nonzero morphism') + K = base_field # A ring extension # Build K{t} d = log(Fq.cardinality(), Fq.characteristic()) tau = K.frobenius_endomorphism(d) self._ore_polring = OrePolynomialRing(K, tau, names=name, polcast=False) # Create constant coefficient - self._constant_coefficient = base(X) + self._constant_coefficient = base_morphism(X) # Create characteristic self._characteristic = None if K.is_finite(): - f = base * FqX.coerce_map_from(Fq) # Fq -> K - E = K.over(f) - self._characteristic = FqX(E(base(X)).minpoly()) + #FIXME: This minpoly is over Fp, not Fq + self._characteristic = FqX(K(base_morphism(X)).minpoly()) elif FqX.is_subring(K): self._characteristic = Integer(0) - super().__init__(base=base) + super().__init__(base=base_field) def _latex_(self): r""" @@ -280,15 +296,10 @@ def _latex_(self): sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: latex(cat) - \text{Category{ }of{ }Drinfeld{ }modules{ }defined{ }over{ }base{ }\begin{array}{l} - \text{\texttt{Ring{ }morphism:}}\\ - \text{\texttt{{ }{ }From:{ }Univariate{ }Polynomial{ }Ring{ }in{ }X{ }over{ }Finite{ }Field{ }of{ }size{ }11}}\\ - \text{\texttt{{ }{ }To:{ }{ }{ }Finite{ }Field{ }in{ }z{ }of{ }size{ }11{\char`\^}4}}\\ - \text{\texttt{{ }{ }Defn:{ }X{ }|{-}{-}>{ }z{\char`\^}3{ }+{ }7*z{\char`\^}2{ }+{ }6*z{ }+{ }10}} - \end{array} + \text{Category{ }of{ }Drinfeld{ }modules{ }defined{ }over{ }\Bold{F}_{11^{4}} """ return f'\\text{{Category{{ }}of{{ }}Drinfeld{{ }}modules{{ }}' \ - f'defined{{ }}over{{ }}base{{ }}{latex(self._base)}' + f'defined{{ }}over{{ }}{latex(self._base_field)}' def _repr_(self): r""" @@ -305,12 +316,9 @@ def _repr_(self): sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: cat - Category of Drinfeld modules defined over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field of size 11 - To: Finite Field in z of size 11^4 - Defn: X |--> z^3 + 7*z^2 + 6*z + 10 + Category of Drinfeld modules defined over Finite Field in z of size 11^4 over its base """ - return f'Category of Drinfeld modules defined over base {self._base}' + return f'Category of Drinfeld modules defined over {self._base_field}' def Homsets(self): r""" @@ -352,6 +360,30 @@ def Endsets(self): """ return Homsets().Endsets() + def base_morphism(self): + r""" + Return the base morphism of the category + + OUTPUT: a ring morphism + + EXAMPLES:: + + sage: Fq = GF(11) + sage: FqX. = Fq[] + sage: K. = Fq.extension(4) + sage: p_root = z^3 + 7*z^2 + 6*z + 10 + sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: cat = phi.category() + sage: cat.base_morphism() + Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field of size 11 + To: Finite Field in z of size 11^4 over its base + Defn: X |--> z^3 + 7*z^2 + 6*z + 10 + sage: cat.constant_coefficient() == cat.base_morphism()(X) + True + """ + return self._base_morphism + def characteristic(self): r""" Return the function ring-characteristic. @@ -371,15 +403,8 @@ def characteristic(self): :: - sage: L = Frac(FqX) - sage: psi = DrinfeldModule(FqX, [L.gen(), 1]) - sage: psi - Drinfeld module defined by X |--> t + X over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field of size 11 - To: Fraction Field of Univariate Polynomial Ring in X over Finite Field of size 11 - Defn: X |--> X - sage: fox = psi.category() - sage: fox.characteristic() + sage: psi = DrinfeldModule(FqX, [Frac(FqX).gen(), 1]) # todo: not tested + sage: psi.category().characteristic() # todo: not tested 0 """ if self._characteristic is None: @@ -449,10 +474,7 @@ def object(self, gen): sage: cat = phi.category() sage: psi = cat.object([p_root, 0, 1]) sage: psi - Drinfeld module defined by X |--> t^2 + z^3 + 7*z^2 + 6*z + 10 over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field of size 11 - To: Finite Field in z of size 11^4 - Defn: X |--> z^3 + 7*z^2 + 6*z + 10 + Drinfeld module defined by X |--> t^2 + z^3 + 7*z^2 + 6*z + 10 over base Finite Field in z of size 11^4 over its base sage: t = phi.ore_polring().gen() sage: cat.object(t^3 + z^3 + 7*z^2 + 6*z + 10) is phi True @@ -461,10 +483,9 @@ def object(self, gen): # If gen is not in the Ore polring, an exception is raised gen = self._ore_polring(gen) X = self._function_ring.gen() - base = self._base - if gen[0] != base(X): - raise ValueError('constant coefficient must be the generator ' - 'of the morphism that defines the category') + if gen[0] != self._base_morphism(X): + raise ValueError('constant coefficient must equal that of the ' \ + 'category') return DrinfeldModule(self._function_ring, gen) def ore_polring(self): @@ -482,7 +503,7 @@ def ore_polring(self): sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: cat.ore_polring() - Ore Polynomial Ring in t over Finite Field in z of size 11^4 twisted by z |--> z^11 + Ore Polynomial Ring in t over Finite Field in z of size 11^4 over its base twisted by Frob sage: cat.ore_polring() is phi.ore_polring() True """ @@ -515,7 +536,7 @@ def random_object(self, rank): if rank <= 0: raise ValueError('rank must be a positive integer') - K = self._base.codomain() + K = self._base_field coeffs = [self._constant_coefficient] for _ in range(rank-1): coeffs.append(K.random_element()) @@ -545,9 +566,9 @@ class ParentMethods: def base(self): r""" - Return the base of the Drinfeld module. + Return the base field of the Drinfeld module. - OUTPUT: a ring morphism + OUTPUT: a field, which is a ring extension over a base EXAMPLES:: @@ -557,49 +578,41 @@ def base(self): sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) sage: phi.base() - Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 - To: Finite Field in z12 of size 5^12 - Defn: X |--> 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + Finite Field in z12 of size 5^12 over its base - The base codomain can be infinite:: + The base can be infinite:: - sage: sigma = DrinfeldModule(FqX, [Frac(FqX).gen(), 1]) - sage: sigma.base() - Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 - To: Fraction Field of Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 - Defn: X |--> X - - And it can also be the base field of the function ring:: - - sage: psi = DrinfeldModule(FqX, [Fq(1), Fq.gen()]) - sage: psi.base() - Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 - To: Finite Field in z2 of size 5^2 - Defn: X |--> 1 - - In this case the Ore polynomial ring is isomorphic to a regular - polynomial ring:: + sage: sigma = DrinfeldModule(FqX, [Frac(FqX).gen(), 1]) # todo: not tested + sage: sigma.base() # todo: not tested + Fraction Field of Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 over its base + """ + return self.category().base() - sage: psi.ore_polring() - Ore Polynomial Ring in t over Finite Field in z2 of size 5^2 twisted by Identity - sage: psi.ore_polring().twisting_morphism() - Identity endomorphism of Finite Field in z2 of size 5^2 + def base_morphism(self): + r""" + Return the base morphism of the Drinfeld module. - TESTS:: + OUTPUT: a ring morphism - sage: psi.ore_polring().twisting_morphism().is_identity() - True + EXAMPLES:: - :: + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi.base_morphism() + Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + To: Finite Field in z12 of size 5^12 over its base + Defn: X |--> 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: psi.base().codomain() is psi.function_ring().base_ring() - True + The base codomain can be infinite:: + sage: sigma = DrinfeldModule(FqX, [Frac(FqX).gen(), 1]) # todo: not tested + sage: sigma.base_morphism() # todo: not tested """ - return self.category().base() + return self.category().base_morphism() def characteristic(self): r""" @@ -614,14 +627,16 @@ def characteristic(self): sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: phi.characteristic() + sage: phi.characteristic() # todo: not tested X^2 + (4*z2 + 2)*X + 2 - sage: phi.characteristic()(phi.constant_coefficient()) + sage: phi.base_morphism()(phi.characteristic()) 0 - sage: L = Frac(FqX) - sage: psi = DrinfeldModule(FqX, [L(1), 0, 0, L(1)]) - sage: psi.characteristic() + :: + + sage: L = Frac(FqX) # todo: not tested + sage: psi = DrinfeldModule(FqX, [L(1), 0, 0, L(1)]) # todo: not tested + sage: psi.characteristic() # todo: not tested 0 """ return self.category().characteristic() @@ -675,10 +690,7 @@ def constant_coefficient(self): sage: t = phi.ore_polring().gen() sage: psi = cat.object(phi.constant_coefficient() + t^3) sage: psi - Drinfeld module defined by X |--> t^3 + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 - To: Finite Field in z12 of size 5^12 - Defn: X |--> 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + Drinfeld module defined by X |--> t^3 + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base Reciprocally, it is impossible to create two Drinfeld modules in this category if they do not share the same constant @@ -687,7 +699,7 @@ def constant_coefficient(self): sage: rho = cat.object(phi.constant_coefficient() + 1 + t^3) Traceback (most recent call last): ... - ValueError: constant coefficient must be the generator of the morphism that defines the category + ValueError: constant coefficient must equal that of the category """ return self.category().constant_coefficient() @@ -706,7 +718,7 @@ def ore_polring(self): sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) sage: ore_polring = phi.ore_polring() sage: ore_polring - Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 twisted by z12 |--> z12^(5^2) + Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 over its base twisted by Frob^2 The Ore polynomial ring can also be retrieved from the category of the Drinfeld module:: diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index 096b5428059..e8319a1f308 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -51,10 +51,7 @@ class DrinfeldModuleAction(Action): sage: phi = DrinfeldModule(FqX, [z, 0, 0, 1]) sage: action = phi.action() sage: action - Action on Finite Field in z of size 11^2 induced by Drinfeld module defined by X |--> t^3 + z over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field of size 11 - To: Finite Field in z of size 11^2 - Defn: X |--> z + Action on Finite Field in z of size 11^2 over its base induced by Drinfeld module defined by X |--> t^3 + z over base Finite Field in z of size 11^2 over its base The action on elements is computed as follows:: @@ -90,14 +87,14 @@ def __init__(self, drinfeld_module): sage: action = phi.action() sage: action._drinfeld_module is phi True - sage: action._field is phi.base().codomain() + sage: action._base_ring is phi.base() True """ if not isinstance(drinfeld_module, DrinfeldModule): raise TypeError('input must be a DrinfeldModule') self._drinfeld_module = drinfeld_module - self._field = drinfeld_module.base().codomain() - super().__init__(drinfeld_module.function_ring(), self._field) + self._base_ring = drinfeld_module.base() + super().__init__(drinfeld_module.function_ring(), self._base_ring) def _act_(self, pol, x): r""" @@ -128,7 +125,7 @@ def _act_(self, pol, x): """ if pol not in self._drinfeld_module.function_ring(): raise TypeError('first input must be in the function ring') - if x not in self._field: + if x not in self._base_ring: raise TypeError('second input must be in the field acted upon') return self._drinfeld_module(pol)(x) @@ -146,15 +143,10 @@ def _latex_(self): sage: phi = DrinfeldModule(FqX, [z, 0, 0, 1]) sage: action = phi.action() sage: latex(action) - \text{Action{ }on{ }}\Bold{F}_{11^{2}}\text{{ }induced{ }by{ }}\text{Drinfeld{ }module{ }defined{ }by{ }} X \mapsto t^{3} + z\text{{ }over{ }base{ }}\begin{array}{l} - \text{\texttt{Ring{ }morphism:}}\\ - \text{\texttt{{ }{ }From:{ }Univariate{ }Polynomial{ }Ring{ }in{ }X{ }over{ }Finite{ }Field{ }of{ }size{ }11}}\\ - \text{\texttt{{ }{ }To:{ }{ }{ }Finite{ }Field{ }in{ }z{ }of{ }size{ }11{\char`\^}2}}\\ - \text{\texttt{{ }{ }Defn:{ }X{ }|{-}{-}>{ }z}} - \end{array} + \text{Action{ }on{ }}\Bold{F}_{11^{2}}\text{{ }induced{ }by{ }}\text{Drinfeld{ }module{ }defined{ }by{ }} X \mapsto t^{3} + z\text{{ }over{ }base{ }}\Bold{F}_{11^{2}} """ return f'\\text{{Action{{ }}on{{ }}}}' \ - f'{latex(self._field)}\\text{{{{ }}' \ + f'{latex(self._base_ring)}\\text{{{{ }}' \ f'induced{{ }}by{{ }}}}{latex(self._drinfeld_module)}' def _repr_(self): @@ -171,12 +163,9 @@ def _repr_(self): sage: phi = DrinfeldModule(FqX, [z, 0, 0, 1]) sage: action = phi.action() sage: action - Action on Finite Field in z of size 11^2 induced by Drinfeld module defined by X |--> t^3 + z over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field of size 11 - To: Finite Field in z of size 11^2 - Defn: X |--> z + Action on Finite Field in z of size 11^2 over its base induced by Drinfeld module defined by X |--> t^3 + z over base Finite Field in z of size 11^2 over its base """ - return f'Action on {self._field} induced by ' \ + return f'Action on {self._base_ring} induced by ' \ f'{self._drinfeld_module}' def drinfeld_module(self): diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index cbc1c8ac8f2..d82632c6db2 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -25,12 +25,14 @@ # ***************************************************************************** from sage.categories.drinfeld_modules import DrinfeldModules +from sage.categories.homset import Hom from sage.matrix.constructor import Matrix from sage.misc.latex import latex from sage.modules.free_module_element import vector from sage.rings.integer import Integer from sage.rings.polynomial.ore_polynomial_element import OrePolynomial from sage.rings.polynomial.polynomial_ring import PolynomialRing_general +from sage.rings.ring_extension import RingExtension_generic from sage.structure.parent import Parent from sage.structure.sequence import Sequence from sage.structure.unique_representation import UniqueRepresentation @@ -41,25 +43,32 @@ class DrinfeldModule(Parent, UniqueRepresentation): This class represents a Drinfeld `\mathbb{F}_q[X]`-module. Let `\mathbb{F}_q[X]` be a polynomial ring with coefficients in a - finite field `\mathbb{F}_q` and let `K` be a field. We fix a ring - morphism `\gamma: \mathbb{F}_q[X] \to K`, which we call the base of - the Drinfeld module. + finite field `\mathbb{F}_q` and let `K` be a field. Fix a ring + morphism `\gamma: \mathbb{F}_q[X] \to K`. We say that the field `K` + is an `\mathbb{F}_q[X]`-field, so that the *base of the Drinfeld + module* is defined as the `\mathbb{F}_q[X]`-field *K*. The base + uniquely defines the category, and we also refer to it as the *base + ring* or *base field*. The *base morphism* is the morphism `\gamma: + \mathbb{F}_q[X] \to K`. .. NOTE:: - The base is not a ring. Specifically, it is not the field `K`. - We say however that `K` is an `\mathbb{F}_q[X]`-field. + Equivalently, the base of the Drinfeld module could be defined as the + base morphism `\gamma: \mathbb{F}_q[X] \to K`. - The base of the Drinfeld module is the base of the category of - the Drinfeld module. - The monic polynomial that generates the kernel of the base is called - the `\mathbb{F}_q[X]`-characteristic of the `\mathbb{F}_q[X]`-field - `K`. + .. NOTE:: + + See also :class:`sage.categories.drinfeld_modules`. + + The monic polynomial that generates the kernel of the base morphism + is called the `\mathbb{F}_q[X]`-characteristic of the + `\mathbb{F}_q[X]`-field `K`. It cal also be referred to as the + function-field characteristic of `K`. Let `K\{\tau\}` be the ring of Ore polynomials with coefficients in `K` and Frobenius variable `\tau: x \mapsto x^q`. A Drinfeld - `\mathbb{F}_q[X]`-module over the base `\gamma` is an + `\mathbb{F}_q[X]`-module over the `\mathbb{F}_q[X]`-field `K` is an `\mathbb{F}_q`-algebra morphism `\phi: \mathbb{F}_q[X] \to K\{\tau\}` such that: @@ -70,33 +79,26 @@ class DrinfeldModule(Parent, UniqueRepresentation): For `a` in the function ring, `\phi(a)` is denoted `\phi_a`. The Drinfeld `\mathbb{F}_q[X]`-module `\phi` is uniquely determined - by the image `\phi_X` of `X`. This serves as input of the class. + by the image `\phi_X` of `X` — this serves as input of the class. - A Drinfeld module is saif to be finite if the base ring codomain is - a finite field. Despite an emphasis on this case, the base codomain - can be any extension of the field `\mathbb{F}_q`:: + A Drinfeld module is said to be finite if the field `K` is. Despite + an emphasis on this case, the base field can be any extension of + `\mathbb{F}_q`:: sage: Fq = GF(25) sage: FqX. = Fq[] sage: K. = Fq.extension(6) sage: phi = DrinfeldModule(FqX, [z, 4, 1]) sage: phi - Drinfeld module defined by X |--> t^2 + 4*t + z over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 - To: Finite Field in z of size 5^12 - Defn: X |--> z + Drinfeld module defined by X |--> t^2 + 4*t + z over base Finite Field in z of size 5^12 over its base :: sage: Fq = GF(49) sage: FqX. = Fq[] sage: K. = Frac(FqX) - sage: phi = DrinfeldModule(FqX, [z, X+1]) - sage: phi - Drinfeld module defined by X |--> (X + 1)*t + X over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 7^2 - To: Fraction Field of Univariate Polynomial Ring in X over Finite Field in z2 of size 7^2 - Defn: X |--> X + sage: psi = DrinfeldModule(FqX, [z, X+1]) # todo: not tested + sage: psi # todo: not tested .. NOTE:: @@ -143,36 +145,29 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: K. = Fq.extension(6) sage: phi = DrinfeldModule(FqX, [z, 1, 1]) sage: phi - Drinfeld module defined by X |--> t^2 + t + z over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - To: Finite Field in z of size 3^12 - Defn: X |--> z + Drinfeld module defined by X |--> t^2 + t + z over base Finite Field in z of size 3^12 over its base Note that the definition of the base morphism is implicit; it is - defined as the `\mathbb{F}_q`-algebra morphism `\mathbb{F}_q[X] \to - K` which maps `X` to the constant coefficient of the generator, and - where `K` is the compositum of all the parents of the coefficients:: - - sage: phi.base().codomain() is K - True - - .. NOTE:: - - Formally, `K` is defined as `Sequence(gen).universe()`, where - `gen` is the generator of the Drinfeld module. + defined as the `\mathbb{F}_q`-algebra morphism defined from + `\mathbb{F}_q[X]` to the base ring, and the base ring is a ring + extension over the base morphism whose underlying ring is the + compositum of all the parents of the coefficients. The above Drinfeld module is finite; it can also be infinite:: - sage: L = Frac(FqX) - sage: psi = DrinfeldModule(FqX, [L(X), 1, X^3 + X + 1]) - sage: psi + sage: L = Frac(FqX) # todo: not tested + sage: psi = DrinfeldModule(FqX, [L(X), 1, X^3 + X + 1]) # todo: not tested + sage: psi # todo: not tested Drinfeld module defined by X |--> (X^3 + X + 1)*t^2 + t + X over base Ring morphism: From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 To: Fraction Field of Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 Defn: X |--> X + + :: + sage: phi.is_finite() True - sage: psi.is_finite() + sage: psi.is_finite() # todo: not tested False In those examples, we used a list of coefficients (``[z, 1, 1]``) to @@ -184,76 +179,18 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: rho_X = z + t^3 sage: rho = DrinfeldModule(FqX, rho_X) sage: rho - Drinfeld module defined by X |--> t^3 + z over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - To: Finite Field in z of size 3^12 - Defn: X |--> z + Drinfeld module defined by X |--> t^3 + z over base Finite Field in z of size 3^12 over its base sage: rho(X) == rho_X True - The generator must have positive degree:: - - sage: DrinfeldModule(FqX, [z]) - Traceback (most recent call last): - ... - ValueError: generator must have positive degree - - The constant coefficient must be nonzero:: - - sage: DrinfeldModule(FqX, [K(0), K(1)]) - Traceback (most recent call last): - ... - ValueError: base must be a nonzero morphism - - The coefficients of the generator must lie in an - `\mathbb{F}_q[X]`-field, where `\mathbb{F}_q[X]` is the function - ring of the Drinfeld module:: - - sage: DrinfeldModule(FqX, [z, QQ(1)]) - Traceback (most recent call last): - ... - ValueError: function ring base must coerce into base codomain - - :: - - sage: DrinfeldModule(FqX, [1, QQ(1)]) - Traceback (most recent call last): - ... - ValueError: function ring base must coerce into base codomain - - The function ring must be an univariate polynomial ring whose - base is a finite field:: - - sage: DrinfeldModule(K, [z, 1, 1]) - Traceback (most recent call last): - ... - NotImplementedError: function ring must be a polynomial ring - - :: - - sage: FqXY. = FqX[] - sage: DrinfeldModule(FqXY, [z, 1, 1]) - Traceback (most recent call last): - ... - TypeError: function ring base must be a finite field - - If you already defined a category of Drinfeld modules, and you - create a Drinfeld module through this category, you must - ensure that the constant coefficient is the generator of the algebra - morphism that defines the category:: - - sage: cat = phi.category() - sage: cat.object([1, 1, K(1)]) - Traceback (most recent call last): - ... - ValueError: constant coefficient must be the generator of the morphism that defines the category - - .. NOTE:: + Images under the Drinfeld module are computed by calling the object:: - The reader may think that it is odd to build a Drinfeld module - without explicitly specifying the base. However, the base can be - deduced from the generator, and we omit the base in the input - of the class for conciseness. + sage: phi(X) # phi_X, the generator of the Drinfeld module + t^2 + t + z + sage: phi(X^3 + X + 1) # phi_(X^3 +X + 1) + t^6 + (z^11 + z^9 + 2*z^6 + 2*z^4 + 2*z + 1)*t^4 + (2*z^11 + 2*z^10 + z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^3)*t^3 + (2*z^11 + z^10 + z^9 + 2*z^7 + 2*z^6 + z^5 + z^4 + 2*z^3 + 2*z + 2)*t^2 + (2*z^11 + 2*z^8 + 2*z^6 + z^5 + z^4 + 2*z^2)*t + z^3 + z + 1 + sage: phi(1) # phi_1 + 1 .. RUBRIC:: The category of Drinfeld modules @@ -261,60 +198,57 @@ class DrinfeldModule(Parent, UniqueRepresentation): :class:`sage.categories.drinfeld_modules.DrinfeldModules`):: sage: phi.category() - Category of Drinfeld modules defined over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - To: Finite Field in z of size 3^12 - Defn: X |--> z - sage: phi.category() is psi.category() + Category of Drinfeld modules defined over Finite Field in z of size 3^12 over its base + sage: phi.category() is psi.category() # todo: not tested False sage: phi.category() is rho.category() True - This category holds crucial information, like the - function ring-characteristic of the base:: + One can use the category to directly create new objects:: - sage: char = phi.category().characteristic() + sage: cat = phi.category() + sage: cat.object([z, 0, 0, 1]) + Drinfeld module defined by X |--> t^3 + z over base Finite Field in z of size 3^12 over its base - As the output of :meth:`category` suggests, the base uniquely - determines the category. + .. RUBRIC:: The base ring of a Drinfeld module - .. RUBRIC:: Basics + The base ring of the Drinfeld module is retrieved using + :meth:`base_ring` or :meth:`base`:: - Images under the Drinfeld module are computed by calling the object:: + sage: phi.base_ring() + Finite Field in z of size 3^12 over its base - sage: phi(X) # phi_X - t^2 + t + z - sage: phi(X^3 + X + 1) # phi_(X^3 +X + 1) - t^6 + (z^11 + z^9 + 2*z^6 + 2*z^4 + 2*z + 1)*t^4 + (2*z^11 + 2*z^10 + z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^3)*t^3 + (2*z^11 + z^10 + z^9 + 2*z^7 + 2*z^6 + z^5 + z^4 + 2*z^3 + 2*z + 2)*t^2 + (2*z^11 + 2*z^8 + 2*z^6 + z^5 + z^4 + 2*z^2)*t + z^3 + z + 1 - sage: phi(1) # phi_1 - 1 + The base morphism is retrieved using :meth:`base_morphism`:: - This is useful to quickly retrieve the generator of the Drinfeld - module. Furthermore, a Drinfeld `\mathbb{F}_q[X]`-module can be seen - as an Ore polynomial with positive degree and constant coefficient - `\gamma(X)`, where `\gamma` is the base. This analogy is the - motivation for the following methods:: + sage: phi.base_morphism() + Ring morphism: + From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + To: Finite Field in z of size 3^12 over its base + Defn: X |--> z - sage: phi.coefficients() - [z, 1, 1] + Note that the base ring is *not* the field `K`. Rather, it is a ring + extension (see :class:`sage.rings.ring_extension.RingExtension`) + whose underlying ring is `K` and whose base is the base morphism:: - :: + sage: phi.base_ring() is K + False - sage: phi.coefficient(1) - 1 + .. RUBRIC:: Getters One can retrieve basic properties:: - sage: phi.base() + :: + + sage: phi.base_morphism() Ring morphism: From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - To: Finite Field in z of size 3^12 + To: Finite Field in z of size 3^12 over its base Defn: X |--> z :: sage: phi.ore_polring() # K{t} - Ore Polynomial Ring in t over Finite Field in z of size 3^12 twisted by z |--> z^(3^2) + Ore Polynomial Ring in t over Finite Field in z of size 3^12 over its base twisted by Frob^2 :: @@ -338,14 +272,14 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: phi.morphism() # The Drinfeld module as a morphism Ring morphism: From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - To: Ore Polynomial Ring in t over Finite Field in z of size 3^12 twisted by z |--> z^(3^2) + To: Ore Polynomial Ring in t over Finite Field in z of size 3^12 over its base twisted by Frob^2 Defn: X |--> t^2 + t + z One can compute the rank and height:: sage: phi.rank() 2 - sage: phi.height() + sage: phi.height() # todo: not tested 1 As well as the j-invariant if the rank is two:: @@ -353,7 +287,21 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: phi.j_invariant() # j-invariant 1 - .. RUBRIC:: Morphisms, isogenies + A Drinfeld `\mathbb{F}_q[X]`-module can be seen as an Ore + polynomial with positive degree and constant coefficient + `\gamma(X)`, where `\gamma` is the base morphism. This analogy is + the motivation for the following methods:: + + sage: phi.coefficients() + [z, 1, 1] + + :: + + sage: phi.coefficient(1) + 1 + + + .. RUBRIC:: Morphisms and isogenies A morphism of Drinfeld modules `\phi \to \psi` is an Ore polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for every `a` in @@ -432,10 +380,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: ore_pol = (2*z^6 + z^3 + 2*z^2 + z + 2)*t + z^11 + 2*z^10 + 2*z^9 + 2*z^8 + z^7 + 2*z^6 + z^5 + z^3 + z^2 + z sage: psi = phi.velu(ore_pol) sage: psi - Drinfeld module defined by X |--> (2*z^11 + 2*z^9 + z^6 + 2*z^5 + 2*z^4 + 2*z^2 + 1)*t^2 + (2*z^11 + 2*z^10 + 2*z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z)*t + z over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - To: Finite Field in z of size 3^12 - Defn: X |--> z + Drinfeld module defined by X |--> (2*z^11 + 2*z^9 + z^6 + 2*z^5 + 2*z^4 + 2*z^2 + 1)*t^2 + (2*z^11 + 2*z^10 + 2*z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z)*t + z over base Finite Field in z of size 3^12 over its base sage: ore_pol in Hom(phi, psi) True sage: ore_pol * phi(X) == psi(X) * ore_pol @@ -466,10 +411,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: action = phi.action() sage: action - Action on Finite Field in z of size 3^12 induced by Drinfeld module defined by X |--> t^2 + t + z over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - To: Finite Field in z of size 3^12 - Defn: X |--> z + Action on Finite Field in z of size 3^12 over its base induced by Drinfeld module defined by X |--> t^2 + t + z over base Finite Field in z of size 3^12 over its base The action on elements is computed by calling the action object:: @@ -485,22 +427,105 @@ class DrinfeldModule(Parent, UniqueRepresentation): .. RUBRIC:: Inverting the Drinfeld module - Given an Ore polynomial that equals `\phi_a` for some function ring - elelement `a`, one can retrieve `a` (as a morphism, a Drinfeld - module is injective, see [Gos1998]_, cor. 4.5.2.):: + The morphism that defines a Drinfeld module is injective. Given an + Ore polynomial that equals `\phi_a` for some function ring elelement + `a`, one can retrieve `a` (as a morphism, a Drinfeld module is + injective, see [Gos1998]_, cor. 4.5.2.):: sage: a = FqX.random_element() - sage: phi.invert(phi(a)) == a + sage: phi.invert(phi(a)) == a # todo: not tested True - TESTS:: + TESTS: + + The generator must have positive degree:: + + sage: Fq = GF(2) + sage: K. = Fq.extension(2) + sage: FqX. = Fq[] + sage: DrinfeldModule(FqX, [K(1)]) + Traceback (most recent call last): + ... + ValueError: generator must have positive degree + + The constant coefficient must be nonzero:: + + sage: Fq = GF(2) + sage: K. = Fq.extension(2) + sage: FqX. = Fq[] + sage: DrinfeldModule(FqX, [K(0), K(1)]) + Traceback (most recent call last): + ... + ValueError: constant coefficient must be nonzero + + The coefficients of the generator must lie in an + `\mathbb{F}_q[X]`-field, where `\mathbb{F}_q[X]` is the function + ring of the Drinfeld module:: + + sage: Fq = GF(2) + sage: K. = Fq.extension(2) + sage: FqX. = Fq[] + sage: DrinfeldModule(FqX, [z, QQ(1)]) + Traceback (most recent call last): + ... + ValueError: function ring base must coerce into base ring + + :: + + sage: Fq = GF(2) + sage: K. = Fq.extension(2) + sage: FqX. = Fq[] + sage: DrinfeldModule(FqX, [1, QQ(1)]) + Traceback (most recent call last): + ... + ValueError: function ring base must coerce into base ring + + The function ring must be an univariate polynomial ring whose + base is a finite field:: + + sage: Fq = GF(2) + sage: K. = Fq.extension(2) + sage: FqX. = Fq[] + sage: DrinfeldModule(K, [z, 1, 1]) + Traceback (most recent call last): + ... + NotImplementedError: function ring must be a polynomial ring + + :: + + sage: Fq = GF(2) + sage: K. = Fq.extension(2) + sage: FqX. = Fq[] + sage: FqXY. = FqX[] + sage: DrinfeldModule(FqXY, [z, 1, 1]) + Traceback (most recent call last): + ... + TypeError: function ring base must be a finite field + + If you already defined a category of Drinfeld modules, and you + create a Drinfeld module through this category, you must ensure that + the constant coefficient is that of the category:: + + sage: Fq = GF(2) + sage: K. = Fq.extension(2) + sage: FqX. = Fq[] + sage: phi = DrinfeldModule(FqX, [z, 1]) + sage: phi.category().object([1, 1, K(1)]) + Traceback (most recent call last): + ... + ValueError: constant coefficient must equal that of the category + + + :: sage: Fq = K = GF(2) sage: FqX. = Fq[] sage: phi = DrinfeldModule(FqX, [1, 1]) Traceback (most recent call last): ... - ValueError: function ring base must coerce into base codomain + ValueError: function ring base must coerce into base ring + + :: sage: Fq = K = GF(2) sage: FqX. = Fq[] @@ -510,45 +535,44 @@ class DrinfeldModule(Parent, UniqueRepresentation): Test that the base morphism is correct:: - sage: Fq = GF(25) - sage: FqX. = Fq[] - sage: K = Frac(Fq) - sage: phi = DrinfeldModule(FqX, [Fq.gen(), K(1)]) - sage: phi.base().codomain() is K - True - - :: + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K = Frac(Fq) + sage: phi = DrinfeldModule(FqX, [Fq.gen(), K(1)]) + sage: phi.base().codomain() is K # todo: not tested + True - sage: Fq = GF(25) - sage: FqX. = Fq[] - sage: k = Frac(Fq) - sage: kT. = k[] - sage: K = k.extension(T^3 + T + 1) - sage: phi = DrinfeldModule(FqX, [Fq.gen(), K.gen()]) - sage: phi.base().codomain() is K - True + :: - In particular, note that the field `K` may not be the smallest field - of definition of the coefficients:: + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: k = Frac(Fq) + sage: kT. = k[] + sage: K = k.extension(T^3 + T + 1) + sage: phi = DrinfeldModule(FqX, [Fq.gen(), K.gen()]) + sage: phi.base().codomain() is K # todo: not tested + True - sage: Fq = GF(25) - sage: FqX. = Fq[] - sage: k = Frac(Fq) - sage: kT. = k[] - sage: K = k.extension(T^3 + T + 1) - sage: phi = DrinfeldModule(FqX, [K(k.gen()), 1]) - sage: phi.base().codomain() is K - True + In particular, note that the field `K` may not be the smallest field + of definition of the coefficients:: - :: + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: k = Frac(Fq) + sage: kT. = k[] + sage: K = k.extension(T^3 + T + 1) + sage: phi = DrinfeldModule(FqX, [K(k.gen()), 1]) + sage: phi.base().codomain() is K # todo: not tested + True - sage: Fq = GF(25) - sage: FqX. = Fq[] - sage: K = Fq.extension(2) - sage: phi = DrinfeldModule(FqX, [Fq.gen(), K(Fq.gen())]) - sage: phi.base().codomain() is K - True + :: + sage: Fq = GF(25) + sage: FqX. = Fq[] + sage: K = Fq.extension(2) + sage: phi = DrinfeldModule(FqX, [Fq.gen(), K(Fq.gen())]) + sage: phi.base().codomain() is K # todo: not tested + True """ @staticmethod @@ -582,8 +606,8 @@ def __classcall_private__(cls, function_ring, gen, name='t'): :: sage: K = Frac(FqX) - sage: phi = DrinfeldModule(FqX, [K(X), 1]) - sage: isinstance(psi, FiniteDrinfeldModule) + sage: phi = DrinfeldModule(FqX, [K(X), 1]) # todo: not tested + sage: isinstance(psi, FiniteDrinfeldModule) # todo: not tested False """ @@ -605,26 +629,33 @@ def __classcall_private__(cls, function_ring, gen, name='t'): # `gen` is an Ore polynomial: if isinstance(gen, OrePolynomial): ore_polring = gen.parent() - ore_polring_base = ore_polring.base_ring() + # Base ring without morphism structure: + base_ring_noext = ore_polring.base() name = ore_polring.variable_name() # `gen` is a list of coefficients (function_ring = Fq[X]): elif isinstance(gen, (list, tuple)): ore_polring = None - ore_polring_base = Sequence(gen).universe() + # Base ring without morphism structure: + base_ring_noext = Sequence(gen).universe() else: raise TypeError('generator must be list of coefficients or Ore ' 'polynomial') + # Constant coefficient must be nonzero: + if gen[0].is_zero(): + raise ValueError('constant coefficient must be nonzero') # The coefficients are in a base ring that has coercion from Fq: - if not (hasattr(ore_polring_base, 'has_coerce_map_from') - and ore_polring_base.has_coerce_map_from( - function_ring.base_ring())): - raise ValueError('function ring base must coerce into base codomain') + if not (hasattr(base_ring_noext, 'has_coerce_map_from') and + base_ring_noext.has_coerce_map_from(function_ring.base_ring())): + raise ValueError('function ring base must coerce into base ring') - # Build the morphism that defines the category - base = function_ring.hom([ore_polring_base(gen[0])]) + # Build the category + if isinstance(base_ring_noext, RingExtension_generic): + base_ring = base_ring_noext + else: + base_morphism = Hom(function_ring, base_ring_noext)(gen[0]) + base_ring = base_ring_noext.over(base_morphism) - # Other checks in the category definition - category = DrinfeldModules(base, name=name) + category = DrinfeldModules(base_ring, name=name) # Check gen as Ore polynomial ore_polring = category.ore_polring() # Sanity cast @@ -633,7 +664,7 @@ def __classcall_private__(cls, function_ring, gen, name='t'): raise ValueError('generator must have positive degree') # Instantiate the appropriate class - if ore_polring_base.is_finite(): + if base_ring.is_finite(): from sage.rings.function_field.drinfeld_modules.finite_drinfeld_module import FiniteDrinfeldModule return FiniteDrinfeldModule(gen, category) return cls.__classcall__(cls, gen, category) @@ -682,37 +713,6 @@ def __init__(self, gen, category): self._Fq = self._function_ring.base_ring() # Must be last super().__init__(base=self._base, category=category) - def base_ring(self): - r""" - Raise exception ``AttributeError``. - - The base of a Drinfeld module is a ring morphism, not a ring. - - This method is implemented in ``CategoryObject``, of which Parent - inherits. It returns the base of the category. I overloaded it - to avoid confusion. - - EXAMPLES:: - - sage: Fq = GF(25) - sage: FqX. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: phi.base_ring() - Traceback (most recent call last): - ... - AttributeError: the base of a Drinfeld module is a morphism - """ - # FIXME - # This method depends on the sole category of the Drinfeld - # module. It should therefore be implemented in the - # `ParentMethods` bloc of `DrinfeldModule`. This is not possible - # as the method `base_ring` from `CategoryObject` --- of which - # `Parent` and so `DrinfeldModule inherit --- is called instead. - # Any better way would be welcome. - raise AttributeError('the base of a Drinfeld module is a morphism') - def __call__(self, a): r""" Return the image of input ``a`` by the morphism that defines the @@ -828,12 +828,7 @@ def _latex_(self): sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) sage: latex(phi) - \text{Drinfeld{ }module{ }defined{ }by{ }} X \mapsto z_{12}^{5} t^{2} + z_{12}^{3} t + 2 z_{12}^{11} + 2 z_{12}^{10} + z_{12}^{9} + 3 z_{12}^{8} + z_{12}^{7} + 2 z_{12}^{5} + 2 z_{12}^{4} + 3 z_{12}^{3} + z_{12}^{2} + 2 z_{12}\text{{ }over{ }base{ }}\begin{array}{l} - \text{\texttt{Ring{ }morphism:}}\\ - \text{\texttt{{ }{ }From:{ }Univariate{ }Polynomial{ }Ring{ }in{ }X{ }over{ }Finite{ }Field{ }in{ }z2{ }of{ }size{ }5{\char`\^}2}}\\ - \text{\texttt{{ }{ }To:{ }{ }{ }Finite{ }Field{ }in{ }z12{ }of{ }size{ }5{\char`\^}12}}\\ - \text{\texttt{{ }{ }Defn:{ }X{ }|{-}{-}>{ }2*z12{\char`\^}11{ }+{ }2*z12{\char`\^}10{ }+{ }z12{\char`\^}9{ }+{ }3*z12{\char`\^}8{ }+{ }z12{\char`\^}7{ }+{ }2*z12{\char`\^}5{ }+{ }2*z12{\char`\^}4{ }+{ }3*z12{\char`\^}3{ }+{ }z12{\char`\^}2{ }+{ }2*z12}} - \end{array} + \text{Drinfeld{ }module{ }defined{ }by{ }} X \mapsto z_{12}^{5} t^{2} + z_{12}^{3} t + 2 z_{12}^{11} + 2 z_{12}^{10} + z_{12}^{9} + 3 z_{12}^{8} + z_{12}^{7} + 2 z_{12}^{5} + 2 z_{12}^{4} + 3 z_{12}^{3} + z_{12}^{2} + 2 z_{12}\text{{ }over{ }base{ }}\Bold{F}_{5^{12}} """ return f'\\text{{Drinfeld{{ }}module{{ }}defined{{ }}by{{ }}}} ' \ f'{latex(self._function_ring.gen())} '\ @@ -854,10 +849,7 @@ def _repr_(self): sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) sage: phi - Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 - To: Finite Field in z12 of size 5^12 - Defn: X |--> 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base """ return f'Drinfeld module defined by {self._function_ring.gen()} ' \ f'|--> {self._gen} over base {self._base}' @@ -880,10 +872,7 @@ def action(self): sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) sage: action = phi.action() sage: action - Action on Finite Field in z12 of size 5^12 induced by Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 - To: Finite Field in z12 of size 5^12 - Defn: X |--> 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + Action on Finite Field in z12 of size 5^12 over its base induced by Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base The action on elements is computed as follows:: @@ -1023,14 +1012,14 @@ def height(self): sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: phi.height() == 1 + sage: phi.height() == 1 # todo: not tested True - sage: phi.is_ordinary() + sage: phi.is_ordinary() # todo: not tested True sage: L = Frac(FqX) - sage: phi = DrinfeldModule(FqX, [L(2), L(1)]) - sage: phi.height() + sage: phi = DrinfeldModule(FqX, [L(2), L(1)]) # todo: not tested + sage: phi.height() # todo: not tested Traceback (most recent call last): ... ValueError: height is defined for prime function field characteristic @@ -1039,9 +1028,9 @@ def height(self): sage: FqX. = Fq[] sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(FqX, [1, 0, z6]) - sage: phi.height() + sage: phi.height() # todo: not tested 2 - sage: phi.is_supersingular() + sage: phi.is_supersingular() # todo: not tested True """ @@ -1076,22 +1065,22 @@ def invert(self, ore_pol): sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) sage: a = FqX.random_element() - sage: phi.invert(phi(a)) == a + sage: phi.invert(phi(a)) == a # todo: not tested True - sage: phi.invert(phi(X)) == X + sage: phi.invert(phi(X)) == X # todo: not tested True - sage: phi.invert(phi(Fq.gen())) == Fq.gen() + sage: phi.invert(phi(Fq.gen())) == Fq.gen() # todo: not tested True When the input is not in the image of the Drinfeld module, an exception is raised:: sage: t = phi.ore_polring().gen() - sage: phi.invert(t + 1) + sage: phi.invert(t + 1) # todo: not tested Traceback (most recent call last): ... ValueError: input must be in the image of the Drinfeld module - sage: phi.invert(t^3 + t^2 + 1) + sage: phi.invert(t^3 + t^2 + 1) # todo: not tested Traceback (most recent call last): ... ValueError: input must be in the image of the Drinfeld module @@ -1106,19 +1095,19 @@ def invert(self, ore_pol): sage: a = FqX.random_element() sage: cat = phi.category() sage: phi_r1 = cat.random_object(1) - sage: phi_r1.invert(phi_r1(a)) == a + sage: phi_r1.invert(phi_r1(a)) == a # todo: not tested True sage: phi_r2 = cat.random_object(2) - sage: phi_r2.invert(phi_r2(a)) == a + sage: phi_r2.invert(phi_r2(a)) == a # todo: not tested True sage: phi_r3 = cat.random_object(3) - sage: phi_r3.invert(phi_r3(a)) == a + sage: phi_r3.invert(phi_r3(a)) == a # todo: not tested True sage: phi_r4 = cat.random_object(4) - sage: phi_r4.invert(phi_r4(a)) == a + sage: phi_r4.invert(phi_r4(a)) == a # todo: not tested True sage: phi_r5 = cat.random_object(5) - sage: phi_r5.invert(phi_r5(a)) == a + sage: phi_r5.invert(phi_r5(a)) == a # todo: not tested True """ deg = ore_pol.degree() @@ -1145,7 +1134,8 @@ def invert(self, ore_pol): if self(pre_image) == ore_pol: return pre_image else: - return None + raise ValueError('input must be in the image of the Drinfeld ' + 'module') def is_finite(self): r""" @@ -1163,8 +1153,8 @@ def is_finite(self): sage: phi.is_finite() True sage: L = Frac(FqX) - sage: psi = DrinfeldModule(FqX, [L(2), L(1)]) - sage: psi.is_finite() + sage: psi = DrinfeldModule(FqX, [L(2), L(1)]) # todo: not tested + sage: psi.is_finite() # todo: not tested False """ from sage.rings.function_field.drinfeld_modules.finite_drinfeld_module import FiniteDrinfeldModule @@ -1229,7 +1219,7 @@ def morphism(self): sage: phi.morphism() Ring morphism: From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 - To: Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 twisted by z12 |--> z12^(5^2) + To: Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 over its base twisted by Frob^2 Defn: X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: from sage.rings.morphism import RingHomomorphism sage: isinstance(phi.morphism(), RingHomomorphism) @@ -1329,10 +1319,7 @@ def velu(self, isog): sage: isog = t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 sage: psi = phi.velu(isog) sage: psi - Drinfeld module defined by X |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 - To: Finite Field in z12 of size 5^12 - Defn: X |--> 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + Drinfeld module defined by X |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base sage: isog in Hom(phi, psi) True @@ -1340,7 +1327,7 @@ def velu(self, isog): sage: phi.velu(phi(X)) is phi True - sage: phi.velu(t^6) is phi + sage: phi.velu(t^6) is phi # todo: not tested True The following inputs do not define isogenies, and the method diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 0991a343b35..46f6be20bd3 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -47,6 +47,11 @@ class FiniteDrinfeldModule(DrinfeldModule): sage: FqX. = Fq[] sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(FqX, [z6, 0, 5]) + sage: phi + Drinfeld module defined by X |--> 5*t^2 + z6 over base Finite Field in z6 of size 7^6 over its base + + :: + sage: isinstance(phi, DrinfeldModule) True sage: from sage.rings.function_field.drinfeld_modules.finite_drinfeld_module import FiniteDrinfeldModule @@ -68,8 +73,8 @@ class FiniteDrinfeldModule(DrinfeldModule): First of all, it is easy to create the Frobenius endomorphism:: - sage: frobenius_endomorphism = phi.frobenius_endomorphism() - sage: frobenius_endomorphism + sage: frobenius_endomorphism = phi.frobenius_endomorphism() # todo: not tested + sage: frobenius_endomorphism # todo: not tested Drinfeld Module morphism: From (gen): 5*t^2 + z6 To (gen): 5*t^2 + z6 @@ -77,27 +82,27 @@ class FiniteDrinfeldModule(DrinfeldModule): Its characteristic polynomial can be computed:: - sage: chi = phi.frobenius_charpoly() - sage: chi + sage: chi = phi.frobenius_charpoly() # todo: not tested + sage: chi # todo: not tested T^2 + (X + 2*z3^2 + 2*z3 + 1)*T + 2*X^2 + (z3^2 + z3 + 4)*X + 2*z3 - sage: frob_pol = frobenius_endomorphism.ore_polynomial() - sage: chi(frob_pol, phi(X)) + sage: frob_pol = frobenius_endomorphism.ore_polynomial() # todo: not tested + sage: chi(frob_pol, phi(X)) # todo: not tested 0 This makes it possible to compute the Frobenius trace and norm:: - sage: phi.frobenius_trace() + sage: phi.frobenius_trace() # todo: not tested 6*X + 5*z3^2 + 5*z3 + 6 - sage: phi.frobenius_trace() == -chi[1] + sage: phi.frobenius_trace() == -chi[1] # todo: not tested True - sage: phi.frobenius_norm() + sage: phi.frobenius_norm() # todo: not tested 2*X^2 + (z3^2 + z3 + 4)*X + 2*z3 And to decide if a Drinfeld module is ordinary or supersingular:: - sage: phi.is_ordinary() + sage: phi.is_ordinary() # todo: not tested True - sage: phi.is_supersingular() + sage: phi.is_supersingular() # todo: not tested False """ @@ -155,19 +160,19 @@ def frobenius_endomorphism(self): sage: FqX. = Fq[] sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(FqX, [1, 0, z6]) - sage: phi.frobenius_endomorphism() + sage: phi.frobenius_endomorphism() # todo: not tested Drinfeld Module morphism: From (gen): z6*t^2 + 1 To (gen): z6*t^2 + 1 Defn: t^2 sage: from sage.rings.function_field.drinfeld_modules.morphism import DrinfeldModuleMorphism - sage: isinstance(phi.frobenius_endomorphism(), DrinfeldModuleMorphism) + sage: isinstance(phi.frobenius_endomorphism(), DrinfeldModuleMorphism) # todo: not tested True """ t = self.ore_polring().gen() - L = self._base.codomain() - Fq = self._function_ring.base_ring() - deg = L.over(Fq).degree(Fq) + Fq = self._function_ring.base() + #FIXME + deg = self._base.over(Fq).degree(Fq) return self._Hom_(self, category=self.category())(t**deg) def frobenius_charpoly(self, var='T'): @@ -206,31 +211,31 @@ def frobenius_charpoly(self, var='T'): sage: FqX. = Fq[] sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(FqX, [1, 0, z6]) - sage: chi = phi.frobenius_charpoly() - sage: chi + sage: chi = phi.frobenius_charpoly() # todo: not tested + sage: chi # todo: not tested T^2 + ((3*z3^2 + z3 + 4)*X + 4*z3^2 + 6*z3 + 3)*T + (5*z3^2 + 2*z3)*X^2 + (4*z3^2 + 3*z3)*X + 5*z3^2 + 2*z3 :: - sage: frob_pol = phi.frobenius_endomorphism().ore_polynomial() - sage: chi(frob_pol, phi(X)) + sage: frob_pol = phi.frobenius_endomorphism().ore_polynomial() # todo: not tested + sage: chi(frob_pol, phi(X)) # todo: not tested 0 :: - sage: A = phi.frobenius_trace() - sage: A + sage: A = phi.frobenius_trace() # todo: not tested + sage: A # todo: not tested (4*z3^2 + 6*z3 + 3)*X + 3*z3^2 + z3 + 4 - sage: B = phi.frobenius_norm() - sage: B + sage: B = phi.frobenius_norm() # todo: not tested + sage: B # todo: not tested (5*z3^2 + 2*z3)*X^2 + (4*z3^2 + 3*z3)*X + 5*z3^2 + 2*z3 :: sage: n = 2 # Degree over Fq of the base codomain - sage: A.degree() <= n/2 + sage: A.degree() <= n/2 # todo: not tested True - sage: B.degree() == n + sage: B.degree() == n # todo: not tested True ALGORITHM: @@ -272,19 +277,19 @@ def frobenius_norm(self): sage: FqX. = Fq[] sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(FqX, [1, 0, z6]) - sage: B = phi.frobenius_norm() - sage: B + sage: B = phi.frobenius_norm() # todo: not tested + sage: B # todo: not tested (5*z3^2 + 2*z3)*X^2 + (4*z3^2 + 3*z3)*X + 5*z3^2 + 2*z3 :: sage: n = 2 # Degree over Fq of the base codomain - sage: B.degree() == n + sage: B.degree() == n # todo: not tested True :: - sage: B == phi.frobenius_charpoly()[0] + sage: B == phi.frobenius_charpoly()[0] # todo: not tested True ALGORITHM: @@ -339,19 +344,19 @@ def frobenius_trace(self): sage: FqX. = Fq[] sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(FqX, [1, 0, z6]) - sage: A = phi.frobenius_trace() - sage: A + sage: A = phi.frobenius_trace() # todo: not tested + sage: A # todo: not tested (4*z3^2 + 6*z3 + 3)*X + 3*z3^2 + z3 + 4 :: sage: n = 2 # Degree over Fq of the base codomain - sage: A.degree() <= n/2 + sage: A.degree() <= n/2 # todo: not tested True :: - sage: A == -phi.frobenius_charpoly()[1] + sage: A == -phi.frobenius_charpoly()[1] # todo: not tested True """ self._check_rank_two() @@ -384,10 +389,10 @@ def is_ordinary(self): sage: FqX. = Fq[] sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(FqX, [1, 0, z6]) - sage: phi.is_ordinary() + sage: phi.is_ordinary() # todo: not tested False - sage: phi_p = phi(phi.characteristic()) - sage: phi_p # Purely inseparable + sage: phi_p = phi(phi.characteristic()) # todo: not tested + sage: phi_p # Purely inseparable # todo: not tested z6*t^2 ALGORITHM: @@ -420,9 +425,9 @@ def is_supersingular(self): sage: FqX. = Fq[] sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(FqX, [1, 0, z6]) - sage: phi.is_supersingular() + sage: phi.is_supersingular() # todo: not tested True - sage: phi(phi.characteristic()) # Purely inseparable + sage: phi(phi.characteristic()) # Purely inseparable # todo: not tested z6*t^2 ALGORITHM: diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index 690d35653b8..71604593ab2 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -64,8 +64,8 @@ class DrinfeldModuleHomset(Homset): The domain and codomain must have the same Drinfeld modules category:: - sage: rho = DrinfeldModule(FqX, [Frac(FqX)(X), 1]) - sage: Hom(phi, rho) + sage: rho = DrinfeldModule(FqX, [Frac(FqX)(X), 1]) # todo: not tested + sage: Hom(phi, rho) # todo: not tested Traceback (most recent call last): ... ValueError: Drinfeld modules must be in the same category @@ -262,8 +262,8 @@ def __contains__(self, x): sage: identity_morphism = end(1) sage: identity_morphism in hom False - sage: frobenius_endomorphism = phi.frobenius_endomorphism() - sage: frobenius_endomorphism in hom + sage: frobenius_endomorphism = phi.frobenius_endomorphism() # todo: not tested + sage: frobenius_endomorphism in hom # todo: not tested False """ try: diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 9f36cdeca13..a752b3ddb1c 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -64,20 +64,14 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, One can get basic data on the morphism:: sage: morphism.domain() - Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 - To: Finite Field in z12 of size 5^12 - Defn: X |--> 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base sage: morphism.domain() is phi True :: sage: morphism.codomain() - Drinfeld module defined by X |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 - To: Finite Field in z12 of size 5^12 - Defn: X |--> 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + Drinfeld module defined by X |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base sage: morphism.codomain() is psi True @@ -106,7 +100,7 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, sage: morphism.parent() == Hom(phi, psi) True - sage: phi.frobenius_endomorphism().parent() == End(phi) + sage: phi.frobenius_endomorphism().parent() == End(phi) # todo: not tested True sage: End(phi)(0).parent() == End(phi) True @@ -321,8 +315,8 @@ def is_isogeny(self): :: - sage: frobenius_endomorphism = phi.frobenius_endomorphism() - sage: frobenius_endomorphism.is_isogeny() + sage: frobenius_endomorphism = phi.frobenius_endomorphism() # todo: not tested + sage: frobenius_endomorphism.is_isogeny() # todo: not tested True """ return not self.is_zero() @@ -357,8 +351,8 @@ def is_isomorphism(self): :: - sage: frobenius_endomorphism = phi.frobenius_endomorphism() - sage: frobenius_endomorphism.is_isomorphism() + sage: frobenius_endomorphism = phi.frobenius_endomorphism() # todo: not tested + sage: frobenius_endomorphism.is_isomorphism() # todo: not tested False """ return self.is_isogeny() and self._ore_polynomial.degree() == 0 From f801dbd83f20e88b27f2c428488b40978733ccfd Mon Sep 17 00:00:00 2001 From: Bruno Edwards Date: Thu, 24 Nov 2022 14:45:37 +0000 Subject: [PATCH 214/751] generic_graph supports hash_labels + tests --- src/sage/graphs/bipartite_graph.py | 32 ++------- src/sage/graphs/digraph.py | 4 +- src/sage/graphs/generic_graph.py | 110 +++++++++++++++++++++++++---- src/sage/graphs/graph.py | 4 +- 4 files changed, 111 insertions(+), 39 deletions(-) diff --git a/src/sage/graphs/bipartite_graph.py b/src/sage/graphs/bipartite_graph.py index ef5696ee790..aa6eea5dc95 100644 --- a/src/sage/graphs/bipartite_graph.py +++ b/src/sage/graphs/bipartite_graph.py @@ -550,46 +550,28 @@ def __init__(self, data=None, partition=None, check=True, hash_labels=None, *arg return - # true if specified by user, or if graph is weighted - def _use_hash_labels(self): - if self.hash_labels is None: - import warnings - fallback=self.weighted() - warnings.warn(f"Warning - hash_labels parameter not passed to BipartiteGraph constructor.\nDefaulting to {fallback} [aka self.weighted()]") - self.hash_labels=fallback - return self.hash_labels - - def __hash__(self): """ Compute a hash for ``self``, if ``self`` is immutable. """ if self.is_immutable(): - - left=frozenset(self.left) - right=frozenset(self.right) - - data_to_hash=[left, right] # determine whether to hash labels # warn user if not manually specified use_labels=self._use_hash_labels() - tuple_depth = 3 if use_labels else 2 - for edge in self.edges(sort=True): - data_to_hash.append(edge[:tuple_depth]) - # edge_iter = self.edge_iterator(labels=use_labels) + edge_iter = self.edge_iterator(labels=use_labels) - # if self.allows_multiple_edges(): - # from collections import Counter - # edge_items = Counter(edge_iter).items() - # else: - # edge_items = edge_iter + if self.allows_multiple_edges(): + from collections import Counter + edge_items = Counter(edge_iter).items() + else: + edge_items = edge_iter - return hash(tuple(data_to_hash)) + return hash((frozenset(self.left), frozenset(self.right), frozenset(edge_items))) else: raise TypeError("This graph is mutable, and thus not hashable. Create an immutable copy by `g.copy(immutable=True)`") diff --git a/src/sage/graphs/digraph.py b/src/sage/graphs/digraph.py index 3cccf81c956..44152b8c79d 100644 --- a/src/sage/graphs/digraph.py +++ b/src/sage/graphs/digraph.py @@ -517,7 +517,7 @@ def __init__(self, data=None, pos=None, loops=None, format=None, weighted=None, data_structure="sparse", vertex_labels=True, name=None, multiedges=None, convert_empty_dict_labels_to_None=None, - sparse=True, immutable=False): + sparse=True, immutable=False, hash_labels=None): """ TESTS:: @@ -855,6 +855,8 @@ def __init__(self, data=None, pos=None, loops=None, format=None, self._backend = ib self._immutable = True + self.hash_labels=hash_labels + # Formats def dig6_string(self): r""" diff --git a/src/sage/graphs/generic_graph.py b/src/sage/graphs/generic_graph.py index 218612d145f..b04b5e4b195 100644 --- a/src/sage/graphs/generic_graph.py +++ b/src/sage/graphs/generic_graph.py @@ -614,6 +614,13 @@ def __eq__(self, other): return self._backend.is_subgraph(other._backend, self, ignore_labels=not self.weighted()) + # check if specified by the user, if not then fallback + def _use_labels_for_hash(self): + if not hasattr(self, "hash_labels") or self.hash_labels is None: + fallback=self.weighted() + self.hash_labels=fallback + return self.hash_labels + @cached_method def __hash__(self): """ @@ -684,9 +691,13 @@ def __hash__(self): sage: G1.__hash__() == G2.__hash__() True + Make sure hash_labels parameter behaves as expected: + + """ if self.is_immutable(): - edge_items = self.edge_iterator(labels=self._weighted) + use_labels=self._use_labels_for_hash() + edge_items = self.edge_iterator(labels=use_labels) if self.allows_multiple_edges(): from collections import Counter edge_items = Counter(edge_items).items() @@ -947,7 +958,7 @@ def is_immutable(self): ### Formats - def copy(self, weighted=None, data_structure=None, sparse=None, immutable=None): + def copy(self, weighted=None, data_structure=None, sparse=None, immutable=None, hash_labels=None): """ Change the graph implementation @@ -1133,7 +1144,86 @@ def copy(self, weighted=None, data_structure=None, sparse=None, immutable=None): sage: G._immutable = True sage: G.copy()._backend - """ + + Copying and changing hash_labels parameter:: + + sage: G1 = Graph({0: {1: 'edge label A'}}, immutable=True, hash_labels=False) + sage: G1c = G1.copy(hash_labels=True, immutable=True) + sage: hash(G1)==hash(G1c) + False + + sage: G1 = Graph({0: {1: 'edge label A'}}, immutable=True, hash_labels=False) + sage: G2 = Graph({0: {1: 'edge label B'}}, immutable=True, hash_labels=False) + sage: hash(G1)==hash(G2) + True + sage: G1c = G1.copy(hash_labels=True) + sage: G2c = G2.copy(hash_labels=True) + sage: hash(G1c)==hash(G2c) + False + + Making sure the .copy behaviour works correctly with hash_labels and immutable in all 54 cases:: + sage: for old_immutable in [True, False]: + ....: for new_immutable in [True, False, None]: + ....: for old_hash_labels in [True, False, None]: + ....: for new_hash_labels in [True, False, None]: + ....: + ....: # make a graph with old_immutable, old_hash_labels + ....: G = Graph({0: {1: 'edge label A'}}, immutable=old_immutable, hash_labels=old_hash_labels) + ....: old_immutable=G.is_immutable() + ....: old_hash_labels=G.hash_labels + ....: + ....: # copy the graph, passing the overrides + ....: G2 = G.copy(immutable=new_immutable, hash_labels=new_hash_labels) + ....: + ....: if new_immutable is None: + ....: # make sure immutability is preserved if we don't update it + ....: assert G2.is_immutable() == old_immutable, [old_immutable, new_immutable, old_hash_labels, new_hash_labels] + ....: else: + ....: # make sure that updating immutability works + ....: assert G2.is_immutable() == new_immutable, [old_immutable, new_immutable, old_hash_labels, new_hash_labels] + ....: + ....: if new_hash_labels is None: + ....: # make sure hash_labels is preserved if we don't update it + ....: assert G2.hash_labels == old_hash_labels, [old_immutable, new_immutable, old_hash_labels, new_hash_labels] + ....: else: + ....: # make sure updating hash labels works + ....: assert G2.hash_labels == new_hash_labels, [old_immutable, new_immutable, old_hash_labels, new_hash_labels] + + """ + + # This is an ugly hack but it works. + # This function contains some fairly complex logic + # There is a comment further down that says + + ### Immutable copy of an immutable graph ? return self ! + + # The issue being that if we want to change the hash_labels behaviour, then + # returning self is no longer a good option. I'd argue that a copy function + # returning self is always bad behaviour, but that's out of the scope for this ticket. + # Trying to weaken the if statement to include something like + + ### and (hash_labels is None or (hash_labels==self._use_labels_for_hash())) + + # doesn't work, since there is no fallback logic for making + # an immutable copy of an immutable graph, and my attempts at + # implementing one caused other tests to break in different + # bits of the code + + # the hack I've used creates a mutable copy of the graph + # and then makes an immutable copy of that one. I think this is a fairly + # inobtrusive implementation, since the function still runs as normally, + # assuming that they pass nothing into hash_labels, and seems to behave + # correctly otherwise. + + # However, this is obviously not optimal, and could definitely be improved upon + # by someone who understands the logic better. + if hash_labels is not None: + desired_immutable = self.is_immutable() if immutable is None else immutable + forced_mutable_copy = self.copy(weighted=weighted, data_structure=data_structure, sparse=sparse, immutable=False) + fresh_copy = forced_mutable_copy.copy(weighted=weighted, data_structure=data_structure, sparse=sparse, immutable=desired_immutable) + fresh_copy.hash_labels=hash_labels + return fresh_copy + # Which data structure should be used ? if data_structure is not None: # data_structure is already defined so there is nothing left to do @@ -1166,19 +1256,19 @@ def copy(self, weighted=None, data_structure=None, sparse=None, immutable=None): if (isinstance(self._backend, StaticSparseBackend) and (data_structure=='static_sparse' or data_structure is None)): return self - + if data_structure is None: from sage.graphs.base.dense_graph import DenseGraphBackend if isinstance(self._backend, DenseGraphBackend): data_structure = "dense" else: data_structure = "sparse" - + G = self.__class__(self, name=self.name(), pos=copy(self._pos), - weighted=weighted, - data_structure=data_structure) + weighted=weighted, + data_structure=data_structure) - attributes_to_copy = ('_assoc', '_embedding') + attributes_to_copy = ('_assoc', '_embedding', 'hash_labels') for attr in attributes_to_copy: if hasattr(self, attr): copy_attr = {} @@ -3989,7 +4079,6 @@ def is_bipartite(self, certificate=False): else: return True - def is_eulerian(self, path=False): r""" Check whether the graph is Eulerian. @@ -7228,7 +7317,6 @@ def vertex_cut(self, s, t, value_only=True, vertices=False, solver=None, verbose answer.append([l0, l1]) return tuple(answer) - def multiway_cut(self, vertices, value_only=False, use_edge_labels=False, solver=None, verbose=0, *, integrality_tolerance=1e-3): r""" @@ -7372,7 +7460,6 @@ def weight(l): return [e for e in self.edge_iterator() if cut[good_edge((e[0], e[1]))]] - def max_cut(self, value_only=True, use_edge_labels=False, vertices=False, solver=None, verbose=0, *, integrality_tolerance=1e-3): r""" @@ -8163,7 +8250,6 @@ def hamiltonian_path(self, s=None, t=None, use_edge_labels=False, weight = lambda l: 1 if l is None else l return (sum(map(weight,tsp.edge_labels())), tsp) if use_edge_labels else tsp - def traveling_salesman_problem(self, use_edge_labels=False, maximize=False, solver=None, constraint_generation=None, verbose=0, verbose_constraints=False, diff --git a/src/sage/graphs/graph.py b/src/sage/graphs/graph.py index 3bd3983579e..a81cc7339b3 100644 --- a/src/sage/graphs/graph.py +++ b/src/sage/graphs/graph.py @@ -910,7 +910,7 @@ def __init__(self, data=None, pos=None, loops=None, format=None, weighted=None, data_structure="sparse", vertex_labels=True, name=None, multiedges=None, convert_empty_dict_labels_to_None=None, - sparse=True, immutable=False): + sparse=True, immutable=False, hash_labels=None): """ TESTS:: @@ -1266,6 +1266,8 @@ def __init__(self, data=None, pos=None, loops=None, format=None, self._backend = ib self._immutable = True + self.hash_labels = hash_labels + # Formats @doc_index("Basic methods") From 321ba43b09501549f459a0ec0e70349ade428c92 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Mon, 5 Dec 2022 09:41:46 +0100 Subject: [PATCH 215/751] start to cache solutions --- src/sage/combinat/bijectionist.py | 186 +++++++++++++++++++++++++----- 1 file changed, 154 insertions(+), 32 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 4b4b52089d6..fd2c804ede1 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -1529,16 +1529,16 @@ def _forced_constant_blocks(self): if updated_preimages: break for i, j in itertools.combinations(copy(multiple_preimages[values]), r=2): # copy to be able to modify list - bmilp_veto = deepcopy(bmilp) # adding constraints to a simple copy adds them to the original instance, too + tmp_constraints = [] try: # veto the two blocks having the same value for z in self._possible_block_values[i]: if z in self._possible_block_values[j]: # intersection - bmilp_veto.milp.add_constraint(bmilp_veto._x[i, z] + bmilp_veto._x[j, z] <= 1) - bmilp_veto.milp.solve() + tmp_constraints.append(bmilp._x[i, z] + bmilp._x[j, z] <= 1) + bmilp.solve(tmp_constraints) # solution exists, update dictionary - solution = self._solution_by_blocks(bmilp_veto) + solution = self._solution_by_blocks(bmilp) updated_multiple_preimages = {} for values in multiple_preimages: for p in multiple_preimages[values]: @@ -1688,17 +1688,17 @@ def add_solution(solutions, solution): # iterate through blocks and generate all values for p in blocks: - veto_bmilp = deepcopy(bmilp) # adding constraints to a simple copy adds them to the original instance, too + tmp_constraints = [] for value in solutions[p]: - veto_bmilp.milp.add_constraint(veto_bmilp._x[p, value] == 0) + tmp_constraints.append(bmilp._x[p, value] == 0) while True: try: - veto_bmilp.milp.solve() # problem has a solution, so new value was found - solution = self._solution(veto_bmilp) + bmilp.solve(tmp_constraints) + solution = self._solution(bmilp) add_solution(solutions, solution) # veto new value and try again - veto_bmilp.milp.add_constraint(veto_bmilp._x[p, solution[p]] == 0) + tmp_constraints.append(bmilp._x[p, solution[p]] == 0) except MIPSolverException: # no solution, so all possible values have been found break @@ -1788,6 +1788,7 @@ def minimal_subdistributions_iterator(self, tA=None): except MIPSolverException: return s = self._solution(bmilp) + tmp_constraints = [] while True: for v in self._Z: minimal_subdistribution.add_constraint(sum(D[a] for a in self._A if s[a] == v) == V[v]) @@ -1833,10 +1834,9 @@ def _find_counter_example(self, bmilp, s0, d): if not v_in_d_count: continue - veto_bmilp = deepcopy(bmilp) # adding constraints to a simple copy adds them to the original instance, too # try to find a solution which has a different # subdistribution on d than s0 - v_in_d = sum(d[a] * veto_bmilp._x[self._P.find(a), v] + v_in_d = sum(d[a] * bmilp._x[self._P.find(a), v] for a in self._A if v in self._possible_block_values[self._P.find(a)]) @@ -1844,10 +1844,10 @@ def _find_counter_example(self, bmilp, s0, d): # a value among {a | d[a] == 1} than it does in # v_in_d_count, because, if the distributions are # different, one such v must exist - veto_bmilp.milp.add_constraint(v_in_d <= v_in_d_count - 1) + tmp_constraints = [v_in_d <= v_in_d_count - 1] try: - veto_bmilp.milp.solve() - return self._solution(veto_bmilp) + bmilp.solve(tmp_constraints) + return self._solution(bmilp) except MIPSolverException: pass return @@ -2055,10 +2055,9 @@ def _find_counter_example2(self, bmilp, P, s0, d): if not v_in_d_count: continue - veto_bmilp = deepcopy(bmilp) # adding constraints to a simple copy adds them to the original instance, too # try to find a solution which has a different # subdistribution on d than s0 - v_in_d = sum(d[p] * veto_bmilp._x[p, v] + v_in_d = sum(d[p] * bmilp._x[p, v] for p in P if v in self._possible_block_values[p]) @@ -2066,10 +2065,10 @@ def _find_counter_example2(self, bmilp, P, s0, d): # a value among {a | d[a] == 1} than it does in # v_in_d_count, because, if the distributions are # different, one such v must exist - veto_bmilp.milp.add_constraint(v_in_d <= v_in_d_count - 1) + tmp_constraints = [v_in_d <= v_in_d_count - 1] try: - veto_bmilp.milp.solve() - return self._solution_by_blocks(veto_bmilp) + bmilp.solve(tmp_constraints) + return self._solution_by_blocks(bmilp) except MIPSolverException: pass return @@ -2346,17 +2345,16 @@ def solutions_iterator(self): """ try: - bmilp = self._generate_and_solve_initial_bmilp() + self.bmilp = self._generate_and_solve_initial_bmilp() except MIPSolverException: return while True: - yield self._solution(bmilp) - bmilp.veto_current_solution() + yield self._solution(self.bmilp) if get_verbose() >= 2: print("after vetoing") - self._show_bmilp(bmilp, variables=False) + self._show_bmilp(self.bmilp, variables=False) try: - bmilp.milp.solve() + self.bmilp.solve([], force_new_solution=True) except MIPSolverException: return @@ -2369,7 +2367,7 @@ def _solution(self, bmilp): map = {} # A -> Z, a +-> s(a) for p, block in self._P.root_to_elements_dict().items(): for z in self._possible_block_values[p]: - if bmilp.milp.get_values(bmilp._x[p, z]) == 1: + if bmilp.get_value(p, z) == 1: for a in block: map[a] = z break @@ -2384,7 +2382,7 @@ def _solution_by_blocks(self, bmilp): map = {} # P -> Z, a +-> s(a) for p in _disjoint_set_roots(self._P): for z in self._possible_block_values[p]: - if bmilp.milp.get_values(bmilp._x[p, z]) == 1: + if bmilp.get_value(p, z) == 1: map[p] = z break return map @@ -2447,7 +2445,7 @@ def _generate_and_solve_initial_bmilp(self): if get_verbose() >= 2: self._show_bmilp(bmilp) assert n == bmilp.milp.number_of_variables(), "The number of variables increased." - bmilp.milp.solve() + bmilp.solve([]) return bmilp @@ -2464,6 +2462,11 @@ def __init__(self, bijectionist: Bijectionist): # _W, _Z, _A, _B, _P, _alpha, _beta, _tau, _pi_rho self.milp = MixedIntegerLinearProgram(solver=bijectionist._solver) self.milp.set_objective(None) + self._n_variables = -1 + self._solution_cache = [] + self._last_solution = {} + self._index_block_value_dict = None + self._block_value_index_dict = None# TODO: may not be needed? self._x = self.milp.new_variable(binary=True) # indexed by P x Z self._bijectionist = bijectionist @@ -2474,6 +2477,79 @@ def __init__(self, bijectionist: Bijectionist): for z in bijectionist._possible_block_values[p]) == 1, name=name[:50]) + def clear_solution_cache(self): + self._n_variables = -1 + self._solution_cache = [] + self._last_solution = {} + self._index_block_value_dict = None + self._block_value_index_dict = None # TODO: may not be needed? + + def solve(self, tmp_constraints, force_new_solution=False): + if self._n_variables < 0: + self._n_variables = self.milp.number_of_variables() + self._index_block_value_dict = {} + self._block_value_index_dict = {} + for (p, z), v in self._x.items(): + variable_index = next(iter(v.dict().keys())) + self._index_block_value_dict[variable_index] = (p,z) + self._block_value_index_dict[(p,z)] = variable_index + assert self._n_variables == self.milp.number_of_variables(), "The number of variables changed." # number of variables would change with creation of constraints with new variables + + # check if previous solution exists with constraints + previous_solution_exists = False + self.last_solution = {} + if not force_new_solution: + for solution in self._solution_cache: + fulfills_constraints = True + # loop through all constraints + for constraint in tmp_constraints: + # check equations + for linear_function, value in constraint.equations(): + solution_value = self._evaluate_linear_function(linear_function.dict(), self._index_block_value_dict, solution) + if solution_value != value.dict()[-1]: + fulfills_constraints = False + break + if not fulfills_constraints: + break + # check inequalities + for linear_function, value in constraint.inequalities(): + solution_value = self._evaluate_linear_function(linear_function.dict(), self._index_block_value_dict, solution) + if solution_value > value.dict()[-1]: + fulfills_constraints = False + break + if not fulfills_constraints: + break + if fulfills_constraints: + previous_solution_exists = True + self.last_solution = solution + break + + # if no previous solution satisfies the constraints, generate a new one + if not previous_solution_exists: + try: + n_constraints = self.milp.number_of_constraints() + for constraint in tmp_constraints: + self.milp.add_constraint(constraint) + self.milp.solve() + for _ in range(self.milp.number_of_constraints()-n_constraints): + self.milp.remove_constraint(n_constraints) + except MIPSolverException as error: + for _ in range(self.milp.number_of_constraints()-n_constraints): + self.milp.remove_constraint(n_constraints) + raise error + + self.last_solution = self.milp.get_values(self._x) + self._solution_cache.append(self.last_solution) + + self.veto_current_solution() + return self.last_solution + + def _evaluate_linear_function(self, linear_function_dict, block_index_dict, values): + return float(sum(linear_function_dict[index]*values[block_index_dict[index]] for index in linear_function_dict)) + + def get_value(self, p, v): + return self.last_solution[p,v] + def add_alpha_beta_constraints(self): r""" Add constraints enforcing that `(alpha, s)` is equidistributed @@ -2700,12 +2776,62 @@ def _non_copying_intersection(sets): """ TESTS:: + ##################### + # caching base test # + ##################### + sage: N = 2; A = B = [dyck_word for n in range(N+1) for dyck_word in DyckWords(n)] + sage: tau = lambda D: D.number_of_touch_points() + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_statistics((lambda d: d.semilength(), lambda d: d.semilength())) + sage: bmilp = bij._generate_and_solve_initial_bmilp() + +Print the generated solution:: + + sage: bmilp.milp.get_values(bmilp._x) + {([], 0): 1.0, + ([1, 0], 1): 1.0, + ([1, 0, 1, 0], 1): 0.0, + ([1, 0, 1, 0], 2): 1.0, + ([1, 1, 0, 0], 1): 1.0, + ([1, 1, 0, 0], 2): 0.0} + +Generating a new solution that also maps `1010` to `2` fails: + + sage: from sage.combinat.bijectionist import _disjoint_set_roots + sage: permutation1010root = list(_disjoint_set_roots(bij._P))[2] + sage: permutation1010root + [1, 0, 1, 0] + sage: bmilp.solve([bmilp._x[permutation1010root, 1] <= 0.5], force_new_solution=True) + Traceback (most recent call last): + ... + MIPSolverException: GLPK: Problem has no feasible solution + +However, searching for a cached solution succeeds, for inequalities and equalities:: + + sage: bmilp.solve([bmilp._x[permutation1010root, 1] <= 0.5]) + {([], 0): 1.0, + ([1, 0], 1): 1.0, + ([1, 0, 1, 0], 1): 0.0, + ([1, 0, 1, 0], 2): 1.0, + ([1, 1, 0, 0], 1): 1.0, + ([1, 1, 0, 0], 2): 0.0} + + sage: bmilp.solve([bmilp._x[permutation1010root, 1] == 0]) + {([], 0): 1.0, + ([1, 0], 1): 1.0, + ([1, 0, 1, 0], 1): 0.0, + ([1, 0, 1, 0], 2): 1.0, + ([1, 1, 0, 0], 1): 1.0, + ([1, 1, 0, 0], 2): 0.0} + + sage: As = Bs = [[], ....: [(1,i,j) for i in [-1,0,1] for j in [-1,1]], ....: [(2,i,j) for i in [-1,0,1] for j in [-1,1]], ....: [(3,i,j) for i in [-2,-1,0,1,2] for j in [-1,1]]] - # adding [(2,-2,-1), (2,2,-1), (2,-2,1), (2,2,1)] makes it take (seemingly) forever +Note that adding ``[(2,-2,-1), (2,2,-1), (2,-2,1), (2,2,1)]`` makes +it take (seemingly) forever.:: sage: c1 = lambda a, b: (a[0]+b[0], a[1]*b[1], a[2]*b[2]) sage: c2 = lambda a: (a[0], -a[1], a[2]) @@ -2745,10 +2871,6 @@ def _non_copying_intersection(sets): sage: sorted(l1, key=lambda s: tuple(s.items())) == l2 True -""" - - -""" Our benchmark example:: sage: from sage.combinat.cyclic_sieving_phenomenon import orbit_decomposition From cc58c2dd882b88cf0efe9f656e3d58aec0da4d5e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 17 Dec 2022 13:26:28 -0800 Subject: [PATCH 216/751] build/pkgs/sagelib/spkg-src: Use build --- build/pkgs/sagelib/spkg-src | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/pkgs/sagelib/spkg-src b/build/pkgs/sagelib/spkg-src index db4e2682ba1..f97a0322de9 100755 --- a/build/pkgs/sagelib/spkg-src +++ b/build/pkgs/sagelib/spkg-src @@ -4,7 +4,7 @@ # This script is not used during build. # # HOW TO MAKE THE TARBALL: -# ./sage --sh build/pkgs/sagelib/spkg-src +# make python_build && ./sage --sh build/pkgs/sagelib/spkg-src if [ -z "$SAGE_ROOT" ] ; then echo >&2 "Error - SAGE_ROOT undefined ... exiting" @@ -18,4 +18,4 @@ set -e cd "$SAGE_ROOT"/build/pkgs/sagelib cd src -python3 -u setup.py --no-user-cfg sdist --dist-dir "$SAGE_DISTFILES" +python3 -m build --sdist --outdir "$SAGE_DISTFILES" From eee3f1a5f2e4980276d261b38c9507e98b949ea2 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 17 Dec 2022 13:26:59 -0800 Subject: [PATCH 217/751] Makefile (pypi-sdists): Install python_build --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 414398ddf0d..393d0b62a78 100644 --- a/Makefile +++ b/Makefile @@ -80,7 +80,7 @@ download: dist: build/make/Makefile ./sage --sdist -pypi-sdists: sage_setup +pypi-sdists: sage_setup python_build ./sage --sh build/pkgs/sage_conf/spkg-src ./sage --sh build/pkgs/sage_sws2rst/spkg-src ./sage --sh build/pkgs/sage_docbuild/spkg-src From 53ede8c9bad73793c9431a51ac511eefa8c09eb2 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 5 Dec 2022 14:21:20 -0800 Subject: [PATCH 218/751] sage.rings.finite_rings: Deprecate is_FiniteField, is_PrimeFiniteField --- src/sage/crypto/boolean_function.pyx | 11 +++++++---- src/sage/crypto/lfsr.py | 4 ++-- .../dynamics/arithmetic_dynamics/affine_ds.py | 10 +++++----- .../dynamics/arithmetic_dynamics/generic_ds.py | 8 ++++---- .../arithmetic_dynamics/projective_ds.py | 14 +++++++------- src/sage/groups/cubic_braid.py | 4 ++-- src/sage/groups/matrix_gps/orthogonal.py | 8 ++++---- src/sage/groups/matrix_gps/symplectic.py | 4 ++-- src/sage/groups/matrix_gps/unitary.py | 8 ++++---- src/sage/matrix/matrix_space.py | 4 ++-- src/sage/modules/free_module.py | 2 +- src/sage/rings/algebraic_closure_finite_field.py | 6 +++--- src/sage/rings/finite_rings/element_base.pyx | 4 ++-- .../rings/finite_rings/finite_field_base.pyx | 11 ++++++++--- .../finite_rings/finite_field_constructor.py | 16 +++++++++++----- src/sage/rings/finite_rings/hom_finite_field.pyx | 8 ++++---- .../finite_rings/hom_prime_finite_field.pyx | 4 ++-- src/sage/rings/finite_rings/homset.py | 4 ++-- src/sage/rings/morphism.pyx | 6 +++--- src/sage/rings/polynomial/polynomial_element.pyx | 8 ++++---- .../polynomial/polynomial_ring_constructor.py | 4 ++-- .../polynomial/polynomial_singular_interface.py | 14 +++++++------- src/sage/schemes/affine/affine_homset.py | 4 ++-- src/sage/schemes/affine/affine_morphism.py | 8 ++++---- src/sage/schemes/affine/affine_space.py | 16 ++++++++-------- src/sage/schemes/curves/constructor.py | 10 +++++----- src/sage/schemes/cyclic_covers/constructor.py | 4 ++-- src/sage/schemes/elliptic_curves/constructor.py | 4 ++-- src/sage/schemes/generic/algebraic_scheme.py | 4 ++-- .../schemes/hyperelliptic_curves/constructor.py | 2 +- src/sage/schemes/plane_conics/constructor.py | 4 ++-- src/sage/schemes/product_projective/homset.py | 4 ++-- src/sage/schemes/product_projective/space.py | 8 ++++---- src/sage/schemes/projective/projective_homset.py | 4 ++-- .../schemes/projective/projective_morphism.py | 10 +++++----- src/sage/schemes/projective/projective_space.py | 6 +++--- .../schemes/projective/projective_subscheme.py | 4 ++-- src/sage/symbolic/ring.pyx | 4 ++-- 38 files changed, 136 insertions(+), 122 deletions(-) diff --git a/src/sage/crypto/boolean_function.pyx b/src/sage/crypto/boolean_function.pyx index a9ea665475c..10693a17992 100644 --- a/src/sage/crypto/boolean_function.pyx +++ b/src/sage/crypto/boolean_function.pyx @@ -38,8 +38,7 @@ from sage.rings.integer_ring import ZZ from sage.rings.integer cimport Integer from sage.rings.finite_rings.finite_field_constructor import GF from sage.rings.polynomial.pbori.pbori import BooleanPolynomial -from sage.rings.finite_rings.finite_field_constructor import is_FiniteField -from sage.rings.finite_rings.finite_field_givaro import FiniteField_givaro +from sage.rings.finite_rings.finite_field_base import FiniteField from sage.rings.polynomial.polynomial_element import is_Polynomial from sage.misc.superseded import deprecated_function_alias @@ -329,11 +328,15 @@ cdef class BooleanFunction(SageObject): elif is_Polynomial(x): K = x.base_ring() - if is_FiniteField(K) and K.characteristic() == 2: + if isinstance(K, FiniteField) and K.characteristic() == 2: self._nvariables = K.degree() bitset_init(self._truth_table, (1< 1: # Specialized code breaks for n == 1 specialized = polynomial_ring.PolynomialRing_dense_mod_n - elif is_FiniteField(base_ring): + elif isinstance(base_ring, FiniteField): specialized = polynomial_ring.PolynomialRing_dense_finite_field elif isinstance(base_ring, padic_base_leaves.pAdicFieldCappedRelative): specialized = polynomial_ring.PolynomialRing_dense_padic_field_capped_relative diff --git a/src/sage/rings/polynomial/polynomial_singular_interface.py b/src/sage/rings/polynomial/polynomial_singular_interface.py index 40b77534d19..5d309ceb85c 100644 --- a/src/sage/rings/polynomial/polynomial_singular_interface.py +++ b/src/sage/rings/polynomial/polynomial_singular_interface.py @@ -44,7 +44,7 @@ from sage.interfaces.singular import singular from sage.rings.rational_field import is_RationalField from sage.rings.function_field.function_field import RationalFunctionField -from sage.rings.finite_rings.finite_field_base import is_FiniteField +from sage.rings.finite_rings.finite_field_base import FiniteField from sage.rings.integer_ring import ZZ import sage.rings.finite_rings.finite_field_constructor @@ -103,13 +103,13 @@ def _do_singular_init_(singular, base_ring, char, _vars, order): elif isinstance(base_ring, sage.rings.abc.IntegerModRing): char = base_ring.characteristic() - if sage.rings.finite_rings.finite_field_constructor.is_FiniteField(base_ring) and char <= 2147483647: + if isinstance(base_ring, FiniteField) and char <= 2147483647: return make_ring(str(char)), None if char.is_power_of(2): return make_ring(f"(integer,2,{char.nbits()-1})"), None return make_ring(f"(integer,{char})"), None - elif sage.rings.finite_rings.finite_field_constructor.is_FiniteField(base_ring): + elif isinstance(base_ring, FiniteField): # not the prime field! gen = str(base_ring.gen()) R = make_ring(f"({char},{gen})") @@ -148,7 +148,7 @@ def _do_singular_init_(singular, base_ring, char, _vars, order): if B.is_prime_field() or B is ZZ: return make_ring(f"({base_char},{gens})"), None - if is_FiniteField(B) and B.characteristic() <= 2147483647: + if isinstance(B, FiniteField) and B.characteristic() <= 2147483647: ext_gen = str(B.gen()) _vars = '(' + ext_gen + ', ' + _vars[1:] @@ -333,7 +333,7 @@ def _singular_(self, singular=singular): R._check_valid() if self.base_ring() is ZZ or self.base_ring().is_prime_field(): return R - if sage.rings.finite_rings.finite_field_constructor.is_FiniteField(self.base_ring()) or \ + if isinstance(self.base_ring(), FiniteField) or \ (number_field.number_field_base.is_NumberField(self.base_ring()) and self.base_ring().is_absolute()): R.set_ring() # sorry for that, but needed for minpoly if singular.eval('minpoly') != f"({self.__minpoly})": @@ -427,14 +427,14 @@ def can_convert_to_singular(R): sage.rings.abc.RealField, sage.rings.abc.ComplexField, sage.rings.abc.RealDoubleField, sage.rings.abc.ComplexDoubleField))): return True - elif sage.rings.finite_rings.finite_field_constructor.is_FiniteField(base_ring): + elif isinstance(base_ring, FiniteField): return base_ring.characteristic() <= 2147483647 elif number_field.number_field_base.is_NumberField(base_ring): return base_ring.is_absolute() elif sage.rings.fraction_field.is_FractionField(base_ring): B = base_ring.base_ring() return (B.is_prime_field() or B is ZZ - or (is_FiniteField(B) and B.characteristic() <= 2147483647)) + or (isinstance(B, FiniteField) and B.characteristic() <= 2147483647)) elif isinstance(base_ring, RationalFunctionField): return base_ring.constant_field().is_prime_field() else: diff --git a/src/sage/schemes/affine/affine_homset.py b/src/sage/schemes/affine/affine_homset.py index 98b3b3a8994..914e54f7148 100644 --- a/src/sage/schemes/affine/affine_homset.py +++ b/src/sage/schemes/affine/affine_homset.py @@ -41,7 +41,7 @@ from sage.rings.rational_field import is_RationalField from sage.categories.fields import Fields from sage.categories.number_fields import NumberFields -from sage.rings.finite_rings.finite_field_constructor import is_FiniteField +from sage.rings.finite_rings.finite_field_base import FiniteField from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.schemes.generic.homset import SchemeHomset_points, SchemeHomset_generic @@ -354,7 +354,7 @@ def points(self, **kwds): raise TypeError("a positive bound B (= %s) must be specified"%B) from sage.schemes.affine.affine_rational_point import enum_affine_number_field return enum_affine_number_field(self, bound=B, tolerance=tol, precision=prec) - elif is_FiniteField(R): + elif isinstance(R, FiniteField): from sage.schemes.affine.affine_rational_point import enum_affine_finite_field return enum_affine_finite_field(self) else: diff --git a/src/sage/schemes/affine/affine_morphism.py b/src/sage/schemes/affine/affine_morphism.py index 1c4f2dff188..e6a8bad39bd 100644 --- a/src/sage/schemes/affine/affine_morphism.py +++ b/src/sage/schemes/affine/affine_morphism.py @@ -62,12 +62,11 @@ from sage.arith.all import gcd from sage.rings.integer import Integer -from sage.rings.finite_rings.finite_field_constructor import is_PrimeFiniteField from sage.rings.fraction_field import FractionField from sage.rings.fraction_field_element import FractionFieldElement from sage.rings.integer_ring import ZZ from sage.rings.rational_field import QQ -from sage.rings.finite_rings.finite_field_constructor import is_FiniteField +from sage.rings.finite_rings.finite_field_base import FiniteField from sage.schemes.generic.morphism import SchemeMorphism_polynomial @@ -229,7 +228,8 @@ def __init__(self, parent, polys, check=True): SchemeMorphism_polynomial.__init__(self, parent, polys, check) # used in _fast_eval and _fastpolys - self._is_prime_finite_field = is_PrimeFiniteField(polys[0].base_ring()) + R = polys[0].base_ring() + self._is_prime_finite_field = isinstance(R, FiniteField) and R.is_prime_field() def __call__(self, x, check=True): """ @@ -683,7 +683,7 @@ def as_dynamical_system(self): R = self.base_ring() if R not in _Fields: return DynamicalSystem_affine(list(self), self.domain()) - if is_FiniteField(R): + if isinstance(R, FiniteField): return DynamicalSystem_affine_finite_field(list(self), self.domain()) return DynamicalSystem_affine_field(list(self), self.domain()) diff --git a/src/sage/schemes/affine/affine_space.py b/src/sage/schemes/affine/affine_space.py index ba56ef9fc8d..52c13b29068 100644 --- a/src/sage/schemes/affine/affine_space.py +++ b/src/sage/schemes/affine/affine_space.py @@ -17,7 +17,7 @@ from sage.rings.rational_field import is_RationalField from sage.rings.polynomial.polynomial_ring import is_PolynomialRing from sage.rings.polynomial.multi_polynomial_ring import is_MPolynomialRing -from sage.rings.finite_rings.finite_field_constructor import is_FiniteField +from sage.rings.finite_rings.finite_field_base import FiniteField from sage.categories.map import Map from sage.categories.fields import Fields from sage.categories.homset import Hom @@ -132,7 +132,7 @@ def AffineSpace(n, R=None, names=None, ambient_projective_space=None, from sage.schemes.projective.projective_space import ProjectiveSpace ambient_projective_space = ProjectiveSpace(n, R) if R in _Fields: - if is_FiniteField(R): + if isinstance(R, FiniteField): return AffineSpace_finite_field(n, R, names, ambient_projective_space, default_embedding_index) else: @@ -270,12 +270,12 @@ def rational_points(self, F=None): TypeError: second argument (= Integer Ring) must be a finite field """ if F is None: - if not is_FiniteField(self.base_ring()): - raise TypeError("base ring (= %s) must be a finite field"%self.base_ring()) - return [ P for P in self ] - elif not is_FiniteField(F): - raise TypeError("second argument (= %s) must be a finite field"%F) - return [ P for P in self.base_extend(F) ] + if not isinstance(self.base_ring(), FiniteField): + raise TypeError("base ring (= %s) must be a finite field" % self.base_ring()) + return [P for P in self] + elif not isinstance(F, FiniteField): + raise TypeError("second argument (= %s) must be a finite field" % F) + return [P for P in self.base_extend(F)] def __eq__(self, right): """ diff --git a/src/sage/schemes/curves/constructor.py b/src/sage/schemes/curves/constructor.py index 8a85dd9737c..9da795ac958 100644 --- a/src/sage/schemes/curves/constructor.py +++ b/src/sage/schemes/curves/constructor.py @@ -38,7 +38,7 @@ from sage.rings.polynomial.multi_polynomial_element import is_MPolynomial from sage.rings.polynomial.multi_polynomial_ring import is_MPolynomialRing -from sage.rings.finite_rings.finite_field_constructor import is_FiniteField +from sage.rings.finite_rings.finite_field_base import FiniteField from sage.rings.rational_field import QQ @@ -294,7 +294,7 @@ def Curve(F, A=None): if is_AffineSpace(A): if n != 2: - if is_FiniteField(k): + if isinstance(k, FiniteField): if A.coordinate_ring().ideal(F).is_prime(): return IntegralAffineCurve_finite_field(A, F) if k in Fields(): @@ -307,7 +307,7 @@ def Curve(F, A=None): raise TypeError("need a single nonconstant polynomial to define a plane curve") F = F[0] - if is_FiniteField(k): + if isinstance(k, FiniteField): if _is_irreducible_and_reduced(F): return IntegralAffinePlaneCurve_finite_field(A, F) return AffinePlaneCurve_finite_field(A, F) @@ -321,7 +321,7 @@ def Curve(F, A=None): if n != 2: if not all(f.is_homogeneous() for f in F): raise TypeError("polynomials defining a curve in a projective space must be homogeneous") - if is_FiniteField(k): + if isinstance(k, FiniteField): if A.coordinate_ring().ideal(F).is_prime(): return IntegralProjectiveCurve_finite_field(A, F) if k in Fields(): @@ -339,7 +339,7 @@ def Curve(F, A=None): if not F.is_homogeneous(): raise TypeError("{} is not a homogeneous polynomial".format(F)) - if is_FiniteField(k): + if isinstance(k, FiniteField): if _is_irreducible_and_reduced(F): return IntegralProjectivePlaneCurve_finite_field(A, F) return ProjectivePlaneCurve_finite_field(A, F) diff --git a/src/sage/schemes/cyclic_covers/constructor.py b/src/sage/schemes/cyclic_covers/constructor.py index 0966b0793d5..aba10277b19 100644 --- a/src/sage/schemes/cyclic_covers/constructor.py +++ b/src/sage/schemes/cyclic_covers/constructor.py @@ -9,7 +9,7 @@ # ***************************************************************************** from sage.rings.polynomial.polynomial_element import is_Polynomial -from sage.rings.finite_rings.finite_field_constructor import is_FiniteField +from sage.rings.finite_rings.finite_field_base import FiniteField from sage.schemes.affine.affine_space import AffineSpace from .cycliccover_generic import CyclicCover_generic from .cycliccover_finite_field import CyclicCover_finite_field @@ -127,7 +127,7 @@ def CyclicCover(r, f, names=None, check_smooth=True): names = ["x", "y"] A2 = AffineSpace(2, R, names=names) - if is_FiniteField(R): + if isinstance(R, FiniteField): return CyclicCover_finite_field(A2, r, f, names=names) else: return CyclicCover_generic(A2, r, f, names=names) diff --git a/src/sage/schemes/elliptic_curves/constructor.py b/src/sage/schemes/elliptic_curves/constructor.py index 1ecdc082cd5..931779c8c7a 100644 --- a/src/sage/schemes/elliptic_curves/constructor.py +++ b/src/sage/schemes/elliptic_curves/constructor.py @@ -27,7 +27,7 @@ import sage.rings.abc from sage.rings.polynomial.multi_polynomial_ring import is_MPolynomialRing -from sage.rings.finite_rings.finite_field_constructor import is_FiniteField +from sage.rings.finite_rings.finite_field_base import FiniteField from sage.rings.number_field.number_field import is_NumberField from sage.rings.polynomial.multi_polynomial_element import is_MPolynomial from sage.rings.ring import is_Ring @@ -477,7 +477,7 @@ def create_object(self, version, key, **kwds): elif isinstance(R, sage.rings.abc.pAdicField): from .ell_padic_field import EllipticCurve_padic_field return EllipticCurve_padic_field(R, x) - elif is_FiniteField(R) or (isinstance(R, sage.rings.abc.IntegerModRing) and R.characteristic().is_prime()): + elif isinstance(R, FiniteField) or (isinstance(R, sage.rings.abc.IntegerModRing) and R.characteristic().is_prime()): from .ell_finite_field import EllipticCurve_finite_field return EllipticCurve_finite_field(R, x) elif R in _Fields: diff --git a/src/sage/schemes/generic/algebraic_scheme.py b/src/sage/schemes/generic/algebraic_scheme.py index 60d883905fe..aac33ed3042 100644 --- a/src/sage/schemes/generic/algebraic_scheme.py +++ b/src/sage/schemes/generic/algebraic_scheme.py @@ -132,7 +132,7 @@ from sage.rings.integer_ring import ZZ from sage.rings.qqbar import QQbar from sage.rings.rational_field import is_RationalField -from sage.rings.finite_rings.finite_field_constructor import is_FiniteField +from sage.rings.finite_rings.finite_field_base import FiniteField from sage.rings.number_field.order import is_NumberFieldOrder from sage.misc.latex import latex @@ -886,7 +886,7 @@ def rational_points(self, **kwds): if bound == 0: if is_RationalField(F): raise TypeError("A positive bound (= %s) must be specified."%bound) - if not is_FiniteField(F): + if not isinstance(F, FiniteField): raise TypeError("Argument F (= %s) must be a finite field."%F) pts = [] for P in self.ambient_space().rational_points(F): diff --git a/src/sage/schemes/hyperelliptic_curves/constructor.py b/src/sage/schemes/hyperelliptic_curves/constructor.py index 54556e08755..590677e21a9 100644 --- a/src/sage/schemes/hyperelliptic_curves/constructor.py +++ b/src/sage/schemes/hyperelliptic_curves/constructor.py @@ -24,7 +24,7 @@ import sage.rings.abc from sage.rings.rational_field import is_RationalField -from sage.rings.finite_rings.finite_field_constructor import is_FiniteField +from sage.rings.finite_rings.finite_field_base import FiniteField from sage.rings.polynomial.polynomial_element import is_Polynomial from sage.structure.dynamic_class import dynamic_class diff --git a/src/sage/schemes/plane_conics/constructor.py b/src/sage/schemes/plane_conics/constructor.py index a2a14190087..a962a392a63 100644 --- a/src/sage/schemes/plane_conics/constructor.py +++ b/src/sage/schemes/plane_conics/constructor.py @@ -31,7 +31,7 @@ from sage.rings.ring import IntegralDomain from sage.rings.rational_field import is_RationalField -from sage.rings.finite_rings.finite_field_constructor import is_FiniteField +from sage.rings.finite_rings.finite_field_base import FiniteField from sage.rings.polynomial.multi_polynomial_element import is_MPolynomial from sage.rings.polynomial.polynomial_ring import is_PolynomialRing from sage.rings.polynomial.multi_polynomial_ring import is_MPolynomialRing @@ -233,7 +233,7 @@ def Conic(base_field, F=None, names=None, unique=True): if F.parent().ngens() == 3: P2 = ProjectiveSpace(2, base_field, names) - if is_FiniteField(base_field): + if isinstance(base_field, FiniteField): return ProjectiveConic_finite_field(P2, F) if is_RationalField(base_field): return ProjectiveConic_rational_field(P2, F) diff --git a/src/sage/schemes/product_projective/homset.py b/src/sage/schemes/product_projective/homset.py index 7f4e1de0773..2b0119b1250 100644 --- a/src/sage/schemes/product_projective/homset.py +++ b/src/sage/schemes/product_projective/homset.py @@ -22,7 +22,7 @@ from sage.categories.number_fields import NumberFields from sage.misc.mrange import xmrange from sage.misc.misc_c import prod -from sage.rings.finite_rings.finite_field_constructor import is_FiniteField +from sage.rings.finite_rings.finite_field_base import FiniteField from sage.rings.rational_field import is_RationalField from sage.schemes.generic.algebraic_scheme import AlgebraicScheme_subscheme from sage.schemes.generic.homset import SchemeHomset_points @@ -228,7 +228,7 @@ def points(self, **kwds): raise TypeError("a positive bound B (= %s) must be specified"%B) from sage.schemes.product_projective.rational_point import enum_product_projective_number_field return enum_product_projective_number_field(self, bound=B) - elif is_FiniteField(R): + elif isinstance(R, FiniteField): from sage.schemes.product_projective.rational_point import enum_product_projective_finite_field return enum_product_projective_finite_field(self) else: diff --git a/src/sage/schemes/product_projective/space.py b/src/sage/schemes/product_projective/space.py index 79bd69f671e..ac94e72cd0c 100644 --- a/src/sage/schemes/product_projective/space.py +++ b/src/sage/schemes/product_projective/space.py @@ -45,7 +45,7 @@ from sage.rings.integer import Integer from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.rational_field import QQ -from sage.rings.finite_rings.finite_field_constructor import is_FiniteField +from sage.rings.finite_rings.finite_field_base import FiniteField from sage.categories.fields import Fields from sage.categories.commutative_rings import CommutativeRings from sage.rings.polynomial.polydict import ETuple @@ -137,7 +137,7 @@ def ProductProjectiveSpaces(n, R=None, names='x'): raise AttributeError("components must be over the same base ring") N.append(PS.dimension_relative()) names += PS.variable_names() - if is_FiniteField(R): + if isinstance(R, FiniteField): X = ProductProjectiveSpaces_finite_field(N, R, names) elif R in Fields(): X = ProductProjectiveSpaces_field(N, R, names) @@ -162,7 +162,7 @@ def ProductProjectiveSpaces(n, R=None, names='x'): else: n_vars = sum(1+d for d in n) names = normalize_names(n_vars, name_list) - if is_FiniteField(R): + if isinstance(R, FiniteField): X = ProductProjectiveSpaces_finite_field(n, R, names) elif R in Fields(): X = ProductProjectiveSpaces_field(n, R, names) @@ -1302,6 +1302,6 @@ def rational_points(self, F=None): """ if F is None: return list(self) - elif not is_FiniteField(F): + elif not isinstance(F, FiniteField): raise TypeError("second argument (= %s) must be a finite field"%F) return list(self.base_extend(F)) diff --git a/src/sage/schemes/projective/projective_homset.py b/src/sage/schemes/projective/projective_homset.py index 3ffd4a6b6e4..3ee0b78876e 100644 --- a/src/sage/schemes/projective/projective_homset.py +++ b/src/sage/schemes/projective/projective_homset.py @@ -47,7 +47,7 @@ from sage.rings.rational_field import is_RationalField from sage.categories.fields import Fields from sage.categories.number_fields import NumberFields -from sage.rings.finite_rings.finite_field_constructor import is_FiniteField +from sage.rings.finite_rings.finite_field_base import FiniteField from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.schemes.generic.algebraic_scheme import AlgebraicScheme_subscheme from copy import copy @@ -284,7 +284,7 @@ def points(self, **kwds): raise TypeError("a positive bound B (= %s) must be specified"%B) from sage.schemes.projective.projective_rational_point import enum_projective_number_field return enum_projective_number_field(self, bound=B, tolerance=tol, precision=prec) - elif is_FiniteField(R): + elif isinstance(R, FiniteField): from sage.schemes.projective.projective_rational_point import enum_projective_finite_field return enum_projective_finite_field(self.extended_codomain()) else: diff --git a/src/sage/schemes/projective/projective_morphism.py b/src/sage/schemes/projective/projective_morphism.py index 30afbb10ab1..45c1bb01b55 100644 --- a/src/sage/schemes/projective/projective_morphism.py +++ b/src/sage/schemes/projective/projective_morphism.py @@ -72,8 +72,7 @@ import sage.rings.abc from sage.rings.integer import Integer from sage.rings.algebraic_closure_finite_field import AlgebraicClosureFiniteField_generic -from sage.rings.finite_rings.finite_field_constructor import is_FiniteField -from sage.rings.finite_rings.finite_field_constructor import is_PrimeFiniteField +from sage.rings.finite_rings.finite_field_base import FiniteField from sage.rings.finite_rings.finite_field_constructor import GF from sage.rings.fraction_field import FractionField from sage.rings.integer_ring import ZZ @@ -274,7 +273,8 @@ def __init__(self, parent, polys, check=True): SchemeMorphism_polynomial.__init__(self, parent, polys, check) - self._is_prime_finite_field = is_PrimeFiniteField(polys[0].base_ring()) + R = polys[0].base_ring() + self._is_prime_finite_field = isinstance(R, FiniteField) and R.is_prime_field() def __call__(self, x, check=True): r""" @@ -727,7 +727,7 @@ def as_dynamical_system(self): R = self.base_ring() if R not in _Fields: return DynamicalSystem_projective(list(self), self.domain()) - if is_FiniteField(R): + if isinstance(R, FiniteField): return DynamicalSystem_projective_finite_field(list(self), self.domain()) return DynamicalSystem_projective_field(list(self), self.domain()) @@ -1006,7 +1006,7 @@ def normalize_coordinates(self, **kwds): # scales by 1/gcd of the coefficients. if R in _NumberFields: O = R.maximal_order() - elif is_FiniteField(R): + elif isinstance(R, FiniteField): O = R elif isinstance(R, QuotientRing_generic): O = R.ring() diff --git a/src/sage/schemes/projective/projective_space.py b/src/sage/schemes/projective/projective_space.py index 670304af237..e215da942e1 100644 --- a/src/sage/schemes/projective/projective_space.py +++ b/src/sage/schemes/projective/projective_space.py @@ -81,7 +81,7 @@ from sage.arith.misc import gcd, binomial -from sage.rings.finite_rings.finite_field_constructor import is_FiniteField +from sage.rings.finite_rings.finite_field_base import FiniteField from sage.rings.integer import Integer from sage.rings.integer_ring import ZZ from sage.rings.polynomial.multi_polynomial_ring import is_MPolynomialRing @@ -256,7 +256,7 @@ def ProjectiveSpace(n, R=None, names=None): if R is None: R = ZZ # default is the integers if R in _Fields: - if is_FiniteField(R): + if isinstance(R, FiniteField): return ProjectiveSpace_finite_field(n, R, names) if is_RationalField(R): return ProjectiveSpace_rational_field(n, R, names) @@ -2253,7 +2253,7 @@ def rational_points(self, F=None): """ if F is None: return [P for P in self] - elif not is_FiniteField(F): + elif not isinstance(F, FiniteField): raise TypeError("second argument (= %s) must be a finite field" % F) return [P for P in self.base_extend(F)] diff --git a/src/sage/schemes/projective/projective_subscheme.py b/src/sage/schemes/projective/projective_subscheme.py index 3c0faa498a6..2d7bdf2974a 100644 --- a/src/sage/schemes/projective/projective_subscheme.py +++ b/src/sage/schemes/projective/projective_subscheme.py @@ -29,7 +29,7 @@ from sage.matrix.constructor import matrix from sage.rings.integer_ring import ZZ -from sage.rings.finite_rings.finite_field_constructor import is_FiniteField +from sage.rings.finite_rings.finite_field_base import FiniteField from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.rational_field import is_RationalField @@ -982,7 +982,7 @@ def dual(self): from sage.libs.singular.function_factory import ff K = self.base_ring() - if not(is_RationalField(K) or is_FiniteField(K)): + if not(is_RationalField(K) or isinstance(K, FiniteField)): raise NotImplementedError("base ring must be QQ or a finite field") I = self.defining_ideal() m = I.ngens() diff --git a/src/sage/symbolic/ring.pyx b/src/sage/symbolic/ring.pyx index 2036a7331d4..9ecb93578d8 100644 --- a/src/sage/symbolic/ring.pyx +++ b/src/sage/symbolic/ring.pyx @@ -217,7 +217,7 @@ cdef class SymbolicRing(sage.rings.abc.SymbolicRing): from sage.rings.complex_mpfr import ComplexField from sage.rings.infinity import InfinityRing, UnsignedInfinityRing from sage.rings.real_lazy import RLF, CLF - from sage.rings.finite_rings.finite_field_base import is_FiniteField + from sage.rings.finite_rings.finite_field_base import FiniteField from sage.interfaces.maxima import Maxima @@ -235,7 +235,7 @@ cdef class SymbolicRing(sage.rings.abc.SymbolicRing): sage.rings.abc.RealBallField, sage.rings.abc.ComplexBallField, sage.rings.abc.IntegerModRing)) - or is_FiniteField(R)): + or isinstance(R, FiniteField)): return True elif isinstance(R, GenericSymbolicSubring): return True From 8d4d8e58683173fc9b452f9f3a8d764785ba1b36 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 5 Dec 2022 14:46:10 -0800 Subject: [PATCH 219/751] sage.rings.finite_rings: Make it a namespace package --- src/.relint.yml | 2 +- src/sage/rings/finite_rings/__init__.py | 0 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 src/sage/rings/finite_rings/__init__.py diff --git a/src/.relint.yml b/src/.relint.yml index abadae0de28..d1534abfdd2 100644 --- a/src/.relint.yml +++ b/src/.relint.yml @@ -47,6 +47,6 @@ hint: | Sage library code should not import from sage.PAC.KAGE.all when sage.PAC.KAGE is an implicit Hint: namespace package. Type import_statements("SOME_IDENTIFIER") to find a more specific import. - pattern: 'from\s+sage(|[.](arith|categories|combinat|ext|graphs(|[.]decompositions)|interfaces|libs|matrix|misc|numerical(|[.]backends)|rings|sets))[.]all\s+import' + pattern: 'from\s+sage(|[.](arith|categories|combinat|ext|graphs(|[.]decompositions)|interfaces|libs|matrix|misc|numerical(|[.]backends)|rings(|[.]finite_rings)|sets))[.]all\s+import' filePattern: '.*[.](py|pyx|pxi)$' error: false # Make this a warning instead of an error for now diff --git a/src/sage/rings/finite_rings/__init__.py b/src/sage/rings/finite_rings/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 From 6ce26bc9f01f71faeb4a144a67b8487671cc45f5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 5 Dec 2022 15:16:51 -0800 Subject: [PATCH 220/751] src/sage/rings/finite_rings/finite_field_constructor.py: Restore re-export of is_FiniteField --- src/sage/rings/finite_rings/finite_field_constructor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/finite_rings/finite_field_constructor.py b/src/sage/rings/finite_rings/finite_field_constructor.py index 544e8125880..a264e86ecd5 100644 --- a/src/sage/rings/finite_rings/finite_field_constructor.py +++ b/src/sage/rings/finite_rings/finite_field_constructor.py @@ -177,7 +177,7 @@ from sage.rings.integer import Integer # the import below is just a redirection -from sage.rings.finite_rings.finite_field_base import FiniteField +from sage.rings.finite_rings.finite_field_base import is_FiniteField assert is_FiniteField # just to silent pyflakes try: From 98a5484775ac1ec596baa9a3739499cf22cc61f0 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 5 Dec 2022 15:28:53 -0800 Subject: [PATCH 221/751] src/sage/rings/finite_rings/hom_finite_field.pyx: Import ABC as FiniteField_base --- src/sage/rings/finite_rings/hom_finite_field.pyx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sage/rings/finite_rings/hom_finite_field.pyx b/src/sage/rings/finite_rings/hom_finite_field.pyx index 55f2cac6a1d..44dc3450be8 100644 --- a/src/sage/rings/finite_rings/hom_finite_field.pyx +++ b/src/sage/rings/finite_rings/hom_finite_field.pyx @@ -106,7 +106,7 @@ from sage.rings.integer cimport Integer from sage.categories.homset import Hom from sage.structure.element cimport Element -from sage.rings.finite_rings.finite_field_base import FiniteField +from sage.rings.finite_rings.finite_field_base import FiniteField as FiniteField_base from sage.rings.morphism cimport RingHomomorphism, RingHomomorphism_im_gens, FrobeniusEndomorphism_generic from sage.rings.finite_rings.finite_field_constructor import FiniteField @@ -227,9 +227,9 @@ cdef class FiniteFieldHomomorphism_generic(RingHomomorphism_im_gens): """ domain = parent.domain() codomain = parent.codomain() - if not isinstance(domain, FiniteField): + if not isinstance(domain, FiniteField_base): raise TypeError("The domain is not a finite field or does not provide the required interface for finite fields") - if not isinstance(codomain, FiniteField): + if not isinstance(codomain, FiniteField_base): raise TypeError("The codomain is not a finite field or does not provide the required interface for finite fields") if domain.characteristic() != codomain.characteristic() or codomain.degree() % domain.degree() != 0: raise ValueError("No embedding of %s into %s" % (domain, codomain)) @@ -522,7 +522,7 @@ cdef class FrobeniusEndomorphism_finite_field(FrobeniusEndomorphism_generic): ... TypeError: The domain is not a finite field or does not provide the required interface for finite fields """ - if not isinstance(domain, FiniteField): + if not isinstance(domain, FiniteField_base): raise TypeError("The domain is not a finite field or does not provide the required interface for finite fields") try: n = Integer(n) From 2e6b5efe57a925b6bd5c2d9b8ad49f7718e05af7 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 5 Dec 2022 15:29:18 -0800 Subject: [PATCH 222/751] sage.rings.finite_rings: Deprecate is_FiniteFieldElent --- src/sage/crypto/mq/rijndael_gf.py | 12 +++--------- src/sage/crypto/sbox.pyx | 5 ++--- .../dynamics/arithmetic_dynamics/projective_ds.py | 1 + src/sage/rings/algebraic_closure_finite_field.py | 3 +-- src/sage/rings/finite_rings/element_base.pyx | 8 +++++++- src/sage/rings/padics/padic_template_element.pxi | 5 +++-- src/sage/schemes/elliptic_curves/ell_finite_field.py | 5 +++-- 7 files changed, 20 insertions(+), 19 deletions(-) diff --git a/src/sage/crypto/mq/rijndael_gf.py b/src/sage/crypto/mq/rijndael_gf.py index 154c84d146c..1e08fb8e998 100644 --- a/src/sage/crypto/mq/rijndael_gf.py +++ b/src/sage/crypto/mq/rijndael_gf.py @@ -424,7 +424,7 @@ from sage.matrix.constructor import matrix from sage.matrix.constructor import column_matrix -from sage.structure.element import Matrix +from sage.structure.element import FieldElement, Matrix from sage.rings.finite_rings.finite_field_constructor import FiniteField from sage.structure.sage_object import SageObject from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing @@ -757,10 +757,7 @@ def _GF_to_hex(self, GF): sage: rgf._GF_to_hex(output) 'e142cd5fcd9d6d94a3340793034391b5' """ - from sage.rings.finite_rings.element_base import is_FiniteFieldElement - if not isinstance(GF, Matrix) and \ - not isinstance(GF, list) and \ - not is_FiniteFieldElement(GF): + if not isinstance(GF, (Matrix, list, FieldElement)): msg = ("keyword 'GF' must be a matrix over {0}, a list of " "elements from {0}, or a single element from {0}") raise TypeError(msg.format(self._F)) @@ -883,10 +880,7 @@ def _GF_to_bin(self, GF): sage: rgf._GF_to_bin(output) '11011000000111111111100000011011110110000001111111111000000110111101100000011111111110000001101111011000000111111111100000011011' """ - from sage.rings.finite_rings.element_base import is_FiniteFieldElement - if not isinstance(GF, Matrix) and \ - not isinstance(GF, list) and \ - not is_FiniteFieldElement(GF): + if not isinstance(GF, (Matrix, list, FieldElement)): msg = ("keyword 'GF' must be a matrix over {0}, a list of " "elements from {0}, or a single element from {0}") raise TypeError(msg.format(self)) diff --git a/src/sage/crypto/sbox.pyx b/src/sage/crypto/sbox.pyx index 77b7a904cc2..fb9a6f39da3 100644 --- a/src/sage/crypto/sbox.pyx +++ b/src/sage/crypto/sbox.pyx @@ -5,7 +5,7 @@ cimport cython from cysignals.memory cimport check_allocarray, sig_free from sage.structure.sage_object cimport SageObject -from sage.structure.element cimport Element +from sage.structure.element cimport Element, FieldElement from sage.combinat.integer_vector import IntegerVectors from sage.crypto.boolean_function import BooleanFunction @@ -17,7 +17,6 @@ from sage.misc.functional import is_even from sage.misc.misc_c import prod as mul from sage.misc.superseded import deprecated_function_alias from sage.modules.free_module_element import vector -from sage.rings.finite_rings.element_base import is_FiniteFieldElement from sage.rings.finite_rings.finite_field_constructor import FiniteField as GF from sage.rings.ideal import FieldIdeal, Ideal from sage.rings.integer_ring import ZZ @@ -195,7 +194,7 @@ cdef class SBox(SageObject): _S_list = [] for e in S: - if is_FiniteFieldElement(e): + if isinstance(e, FieldElement) and e.parent().is_finite(): e = e.polynomial().change_ring(ZZ).subs(e.parent().characteristic()) _S_list.append(e) S = _S_list diff --git a/src/sage/dynamics/arithmetic_dynamics/projective_ds.py b/src/sage/dynamics/arithmetic_dynamics/projective_ds.py index 30b11ce4261..eb18d2fd0d3 100644 --- a/src/sage/dynamics/arithmetic_dynamics/projective_ds.py +++ b/src/sage/dynamics/arithmetic_dynamics/projective_ds.py @@ -73,6 +73,7 @@ class initialization directly. from sage.categories.finite_fields import FiniteFields from sage.rings.algebraic_closure_finite_field import AlgebraicClosureFiniteField_generic from sage.rings.complex_mpfr import ComplexField +from sage.rings.finite_rings.finite_field_base import FiniteField from sage.rings.finite_rings.finite_field_constructor import GF from sage.rings.finite_rings.integer_mod_ring import Zmod from sage.rings.fraction_field import (FractionField, is_FractionField, FractionField_1poly_field) diff --git a/src/sage/rings/algebraic_closure_finite_field.py b/src/sage/rings/algebraic_closure_finite_field.py index 8577f1c613e..5d05d77a9c7 100644 --- a/src/sage/rings/algebraic_closure_finite_field.py +++ b/src/sage/rings/algebraic_closure_finite_field.py @@ -57,7 +57,6 @@ from sage.misc.abstract_method import abstract_method from sage.misc.fast_methods import WithEqualityById -from sage.rings.finite_rings.element_base import is_FiniteFieldElement from sage.rings.finite_rings.finite_field_base import FiniteField from sage.rings.ring import Field from sage.structure.element import FieldElement @@ -91,7 +90,7 @@ def __init__(self, parent, value): and ``loads(dumps(x))``. """ - if is_FiniteFieldElement(value): + if isinstance(value, FieldElement) and value.parent().is_finite(): n = value.parent().degree() else: from sage.rings.integer import Integer diff --git a/src/sage/rings/finite_rings/element_base.pyx b/src/sage/rings/finite_rings/element_base.pyx index 02ca50d18d1..d92fbb792d2 100755 --- a/src/sage/rings/finite_rings/element_base.pyx +++ b/src/sage/rings/finite_rings/element_base.pyx @@ -25,18 +25,24 @@ from sage.misc.superseded import deprecated_function_alias def is_FiniteFieldElement(x): """ - Returns if x is a finite field element. + Return True if ``x`` is a finite field element. + + This function is deprecated. EXAMPLES:: sage: from sage.rings.finite_rings.element_base import is_FiniteFieldElement sage: is_FiniteFieldElement(1) + doctest:...: DeprecationWarning: the function is_FiniteFieldElement is deprecated; use isinstance(x, sage.structure.element.FieldElement) and x.parent().is_finite() instead False sage: is_FiniteFieldElement(IntegerRing()) False sage: is_FiniteFieldElement(GF(5)(2)) True """ + from sage.misc.superseded import deprecation + deprecation(32664, "the function is_FiniteFieldElement is deprecated; use isinstance(x, sage.structure.element.FieldElement) and x.parent().is_finite() instead") + from sage.rings.finite_rings.finite_field_base import FiniteField return isinstance(x, Element) and isinstance(x.parent(), FiniteField) diff --git a/src/sage/rings/padics/padic_template_element.pxi b/src/sage/rings/padics/padic_template_element.pxi index fed8ac89f81..2356fe9b2e6 100644 --- a/src/sage/rings/padics/padic_template_element.pxi +++ b/src/sage/rings/padics/padic_template_element.pxi @@ -30,13 +30,14 @@ import sage.rings.finite_rings.integer_mod from cypari2.types cimport * from cypari2.gen cimport Gen as pari_gen from sage.libs.pari.convert_gmp cimport INT_to_mpz +from sage.rings.finite_rings.finite_field_base import FiniteField from sage.rings.padics.common_conversion cimport get_ordp, get_preccap from sage.rings.integer cimport Integer from sage.rings.infinity import infinity from sage.rings.rational import Rational from sage.rings.padics.precision_error import PrecisionError from sage.rings.padics.misc import trim_zeros -from sage.structure.element import canonical_coercion +from sage.structure.element import canonical_coercion, FieldElement import itertools cdef long maxordp = (1L << (sizeof(long) * 8 - 2)) - 1 @@ -145,7 +146,7 @@ cdef class pAdicTemplateElement(pAdicGenericElement): elif sage.rings.finite_rings.integer_mod.is_IntegerMod(x): if not Integer(self.prime_pow.prime).divides(x.parent().order()): raise TypeError("p does not divide modulus %s"%x.parent().order()) - elif sage.rings.finite_rings.element_base.is_FiniteFieldElement(x): + elif isinstance(x, FieldElement) and isinstance(x.parent(), FiniteField): k = self.parent().residue_field() if not k.has_coerce_map_from(x.parent()): raise NotImplementedError("conversion from finite fields which do not embed into the residue field not implemented") diff --git a/src/sage/schemes/elliptic_curves/ell_finite_field.py b/src/sage/schemes/elliptic_curves/ell_finite_field.py index 6676a1964c2..bd7aaf44c09 100644 --- a/src/sage/schemes/elliptic_curves/ell_finite_field.py +++ b/src/sage/schemes/elliptic_curves/ell_finite_field.py @@ -29,7 +29,8 @@ from .constructor import EllipticCurve from sage.schemes.hyperelliptic_curves.hyperelliptic_finite_field import HyperellipticCurve_finite_field from sage.rings.all import Integer, ZZ, PolynomialRing, GF, polygen -from sage.rings.finite_rings.element_base import is_FiniteFieldElement +from sage.rings.finite_rings.finite_field_base import FiniteField +from sage.structure.element import FieldElement import sage.groups.generic as generic from . import ell_point from sage.arith.all import gcd, lcm, binomial @@ -1529,7 +1530,7 @@ def is_j_supersingular(j, proof=True): sage: [p for p in prime_range(100) if is_j_supersingular(GF(p)(123456))] [2, 3, 59, 89] """ - if not is_FiniteFieldElement(j): + if not (isinstance(j, FieldElement) and isinstance(j.parent(), FiniteField)): raise ValueError("%s must be an element of a finite field" % j) F = j.parent() From 3be7c975fb00896aef21d721eda69d6d22759385 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 5 Dec 2022 16:30:09 -0800 Subject: [PATCH 223/751] Fixups --- src/sage/modules/free_module.py | 4 ++-- src/sage/rings/finite_rings/element_base.pyx | 1 + src/sage/rings/finite_rings/finite_field_base.pyx | 1 + src/sage/rings/finite_rings/finite_field_constructor.py | 2 ++ src/sage/schemes/hyperelliptic_curves/constructor.py | 6 +++++- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/sage/modules/free_module.py b/src/sage/modules/free_module.py index ff916cc4ad2..6b2f5b87b27 100644 --- a/src/sage/modules/free_module.py +++ b/src/sage/modules/free_module.py @@ -183,7 +183,6 @@ import sage.misc.latex as latex from sage.modules.module import Module -import sage.rings.finite_rings.finite_field_constructor as finite_field import sage.rings.ring as ring import sage.rings.abc import sage.rings.integer_ring @@ -195,6 +194,7 @@ from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets from sage.misc.lazy_attribute import lazy_attribute from sage.misc.randstate import current_randstate +from sage.rings.finite_rings.finite_field_base import FiniteField from sage.structure.factory import UniqueFactory from sage.structure.sequence import Sequence from sage.structure.richcmp import (richcmp_method, rich_to_bool, richcmp, @@ -6348,7 +6348,7 @@ def _element_constructor_(self, e, *args, **kwds): """ try: k = e.parent() - if finite_field.isinstance(k, FiniteField) and k.base_ring() == self.base_ring() and k.degree() == self.degree(): + if isinstance(k, FiniteField) and k.base_ring() == self.base_ring() and k.degree() == self.degree(): return self(e._vector_()) except AttributeError: pass diff --git a/src/sage/rings/finite_rings/element_base.pyx b/src/sage/rings/finite_rings/element_base.pyx index d92fbb792d2..17ca80e9028 100755 --- a/src/sage/rings/finite_rings/element_base.pyx +++ b/src/sage/rings/finite_rings/element_base.pyx @@ -34,6 +34,7 @@ def is_FiniteFieldElement(x): sage: from sage.rings.finite_rings.element_base import is_FiniteFieldElement sage: is_FiniteFieldElement(1) doctest:...: DeprecationWarning: the function is_FiniteFieldElement is deprecated; use isinstance(x, sage.structure.element.FieldElement) and x.parent().is_finite() instead + See https://trac.sagemath.org/32664 for details. False sage: is_FiniteFieldElement(IntegerRing()) False diff --git a/src/sage/rings/finite_rings/finite_field_base.pyx b/src/sage/rings/finite_rings/finite_field_base.pyx index d13c93f23be..09959aeae49 100644 --- a/src/sage/rings/finite_rings/finite_field_base.pyx +++ b/src/sage/rings/finite_rings/finite_field_base.pyx @@ -2122,6 +2122,7 @@ def is_FiniteField(R): sage: from sage.rings.finite_rings.finite_field_base import FiniteField sage: is_FiniteField(GF(9,'a')) doctest:...: DeprecationWarning: the function is_FiniteField is deprecated; use isinstance(x, sage.rings.finite_rings.finite_field_base.FiniteField) instead + See https://trac.sagemath.org/32664 for details. True sage: is_FiniteField(GF(next_prime(10^10))) True diff --git a/src/sage/rings/finite_rings/finite_field_constructor.py b/src/sage/rings/finite_rings/finite_field_constructor.py index a264e86ecd5..23ed63d8b30 100644 --- a/src/sage/rings/finite_rings/finite_field_constructor.py +++ b/src/sage/rings/finite_rings/finite_field_constructor.py @@ -797,8 +797,10 @@ def is_PrimeFiniteField(x): EXAMPLES:: + sage: from sage.rings.finite_rings.finite_field_constructor import is_PrimeFiniteField sage: is_PrimeFiniteField(QQ) doctest:...: DeprecationWarning: the function is_PrimeFiniteField is deprecated; use isinstance(x, sage.rings.finite_rings.finite_field_base.FiniteField) and x.is_prime_field() instead + See https://trac.sagemath.org/32664 for details. False sage: is_PrimeFiniteField(GF(7)) True diff --git a/src/sage/schemes/hyperelliptic_curves/constructor.py b/src/sage/schemes/hyperelliptic_curves/constructor.py index 590677e21a9..21afb10ef3a 100644 --- a/src/sage/schemes/hyperelliptic_curves/constructor.py +++ b/src/sage/schemes/hyperelliptic_curves/constructor.py @@ -249,7 +249,11 @@ def HyperellipticCurve(f, h=0, names=None, PP=None, check_squarefree=True): genus_classes = {2: HyperellipticCurve_g2} - is_pAdicField = lambda x: isinstance(x, sage.rings.abc.pAdicField) + def is_FiniteField(x): + return isinstance(x, FiniteField) + + def is_pAdicField(x): + return isinstance(x, sage.rings.abc.pAdicField) fields = [ ("FiniteField", is_FiniteField, HyperellipticCurve_finite_field), From 97a363e8cc60fc67718fad16d16ce583f24a7e0d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 5 Dec 2022 17:58:06 -0800 Subject: [PATCH 224/751] Fixups --- src/sage/interfaces/gap.py | 2 +- src/sage/rings/finite_rings/finite_field_base.pyx | 2 +- src/sage/rings/finite_rings/finite_field_ntl_gf2e.py | 1 + src/sage/rings/finite_rings/hom_prime_finite_field.pyx | 2 +- src/sage/symbolic/ring.pyx | 4 ++-- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/sage/interfaces/gap.py b/src/sage/interfaces/gap.py index c80a847d7e9..e105d5845ca 100644 --- a/src/sage/interfaces/gap.py +++ b/src/sage/interfaces/gap.py @@ -1743,7 +1743,7 @@ def intmod_gap_to_sage(x): sage: b.parent() Ring of integers modulo 65537 """ - from sage.rings.finite_rings.all import FiniteField + from sage.rings.finite_rings.finite_field_constructor import FiniteField from sage.rings.finite_rings.integer_mod import Mod from sage.rings.integer import Integer s = str(x) diff --git a/src/sage/rings/finite_rings/finite_field_base.pyx b/src/sage/rings/finite_rings/finite_field_base.pyx index 09959aeae49..470bbdf0502 100644 --- a/src/sage/rings/finite_rings/finite_field_base.pyx +++ b/src/sage/rings/finite_rings/finite_field_base.pyx @@ -2119,7 +2119,7 @@ def is_FiniteField(R): EXAMPLES:: - sage: from sage.rings.finite_rings.finite_field_base import FiniteField + sage: from sage.rings.finite_rings.finite_field_base import is_FiniteField sage: is_FiniteField(GF(9,'a')) doctest:...: DeprecationWarning: the function is_FiniteField is deprecated; use isinstance(x, sage.rings.finite_rings.finite_field_base.FiniteField) instead See https://trac.sagemath.org/32664 for details. diff --git a/src/sage/rings/finite_rings/finite_field_ntl_gf2e.py b/src/sage/rings/finite_rings/finite_field_ntl_gf2e.py index 82004502674..47723af64bd 100644 --- a/src/sage/rings/finite_rings/finite_field_ntl_gf2e.py +++ b/src/sage/rings/finite_rings/finite_field_ntl_gf2e.py @@ -52,6 +52,7 @@ def late_import(): import sage.rings.polynomial.polynomial_element is_Polynomial = sage.rings.polynomial.polynomial_element.is_Polynomial + class FiniteField_ntl_gf2e(FiniteField): """ Finite Field of characteristic 2 and order `2^n`. diff --git a/src/sage/rings/finite_rings/hom_prime_finite_field.pyx b/src/sage/rings/finite_rings/hom_prime_finite_field.pyx index 8120f5a4cd6..617595ea383 100644 --- a/src/sage/rings/finite_rings/hom_prime_finite_field.pyx +++ b/src/sage/rings/finite_rings/hom_prime_finite_field.pyx @@ -33,7 +33,7 @@ from .hom_finite_field cimport SectionFiniteFieldHomomorphism_generic from .hom_finite_field cimport FiniteFieldHomomorphism_generic from .hom_finite_field cimport FrobeniusEndomorphism_finite_field -from sage.rings.finite_rings.finite_field_base import FiniteField, is_FiniteField +from sage.rings.finite_rings.finite_field_base import FiniteField from sage.rings.morphism cimport RingHomomorphism_im_gens diff --git a/src/sage/symbolic/ring.pyx b/src/sage/symbolic/ring.pyx index 9ecb93578d8..ce033910621 100644 --- a/src/sage/symbolic/ring.pyx +++ b/src/sage/symbolic/ring.pyx @@ -234,8 +234,8 @@ cdef class SymbolicRing(sage.rings.abc.SymbolicRing): sage.rings.abc.ComplexIntervalField, sage.rings.abc.RealBallField, sage.rings.abc.ComplexBallField, - sage.rings.abc.IntegerModRing)) - or isinstance(R, FiniteField)): + sage.rings.abc.IntegerModRing, + FiniteField))): return True elif isinstance(R, GenericSymbolicSubring): return True From 0c014033f33a907da6ba7c48224102e0ddd82af3 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 5 Dec 2022 18:53:12 -0800 Subject: [PATCH 225/751] Fixup: Elements of finite fields are not instances of FieldElement --- src/sage/crypto/mq/rijndael_gf.py | 10 +++++++--- src/sage/crypto/sbox.pyx | 5 +++-- src/sage/rings/algebraic_closure_finite_field.py | 4 ++-- src/sage/rings/padics/padic_template_element.pxi | 4 ++-- src/sage/schemes/elliptic_curves/ell_finite_field.py | 4 ++-- 5 files changed, 16 insertions(+), 11 deletions(-) diff --git a/src/sage/crypto/mq/rijndael_gf.py b/src/sage/crypto/mq/rijndael_gf.py index 1e08fb8e998..2dccf6b03b4 100644 --- a/src/sage/crypto/mq/rijndael_gf.py +++ b/src/sage/crypto/mq/rijndael_gf.py @@ -424,7 +424,7 @@ from sage.matrix.constructor import matrix from sage.matrix.constructor import column_matrix -from sage.structure.element import FieldElement, Matrix +from sage.structure.element import Element, Matrix from sage.rings.finite_rings.finite_field_constructor import FiniteField from sage.structure.sage_object import SageObject from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing @@ -757,7 +757,9 @@ def _GF_to_hex(self, GF): sage: rgf._GF_to_hex(output) 'e142cd5fcd9d6d94a3340793034391b5' """ - if not isinstance(GF, (Matrix, list, FieldElement)): + if not isinstance(GF, Matrix) and \ + not isinstance(GF, list) and \ + not (isinstance(GF, Element) and isinstance(GF.parent(), FiniteField)): msg = ("keyword 'GF' must be a matrix over {0}, a list of " "elements from {0}, or a single element from {0}") raise TypeError(msg.format(self._F)) @@ -880,7 +882,9 @@ def _GF_to_bin(self, GF): sage: rgf._GF_to_bin(output) '11011000000111111111100000011011110110000001111111111000000110111101100000011111111110000001101111011000000111111111100000011011' """ - if not isinstance(GF, (Matrix, list, FieldElement)): + if not isinstance(GF, Matrix) and \ + not isinstance(GF, list) and \ + not (isinstance(GF, Element) and isinstance(GF.parent(), FiniteField)): msg = ("keyword 'GF' must be a matrix over {0}, a list of " "elements from {0}, or a single element from {0}") raise TypeError(msg.format(self)) diff --git a/src/sage/crypto/sbox.pyx b/src/sage/crypto/sbox.pyx index fb9a6f39da3..87683d79517 100644 --- a/src/sage/crypto/sbox.pyx +++ b/src/sage/crypto/sbox.pyx @@ -5,7 +5,7 @@ cimport cython from cysignals.memory cimport check_allocarray, sig_free from sage.structure.sage_object cimport SageObject -from sage.structure.element cimport Element, FieldElement +from sage.structure.element cimport Element from sage.combinat.integer_vector import IntegerVectors from sage.crypto.boolean_function import BooleanFunction @@ -17,6 +17,7 @@ from sage.misc.functional import is_even from sage.misc.misc_c import prod as mul from sage.misc.superseded import deprecated_function_alias from sage.modules.free_module_element import vector +from sage.rings.finite_rings.finite_field_base import FiniteField from sage.rings.finite_rings.finite_field_constructor import FiniteField as GF from sage.rings.ideal import FieldIdeal, Ideal from sage.rings.integer_ring import ZZ @@ -194,7 +195,7 @@ cdef class SBox(SageObject): _S_list = [] for e in S: - if isinstance(e, FieldElement) and e.parent().is_finite(): + if isinstance(e, Element) and isinstance(e.parent(), FiniteField): e = e.polynomial().change_ring(ZZ).subs(e.parent().characteristic()) _S_list.append(e) S = _S_list diff --git a/src/sage/rings/algebraic_closure_finite_field.py b/src/sage/rings/algebraic_closure_finite_field.py index 5d05d77a9c7..c527bcb6dc4 100644 --- a/src/sage/rings/algebraic_closure_finite_field.py +++ b/src/sage/rings/algebraic_closure_finite_field.py @@ -59,7 +59,7 @@ from sage.rings.finite_rings.finite_field_base import FiniteField from sage.rings.ring import Field -from sage.structure.element import FieldElement +from sage.structure.element import Element, FieldElement from sage.structure.richcmp import richcmp @@ -90,7 +90,7 @@ def __init__(self, parent, value): and ``loads(dumps(x))``. """ - if isinstance(value, FieldElement) and value.parent().is_finite(): + if isinstance(value, Element) and isinstance(value.parent(), FiniteField): n = value.parent().degree() else: from sage.rings.integer import Integer diff --git a/src/sage/rings/padics/padic_template_element.pxi b/src/sage/rings/padics/padic_template_element.pxi index 2356fe9b2e6..72ff7784eb1 100644 --- a/src/sage/rings/padics/padic_template_element.pxi +++ b/src/sage/rings/padics/padic_template_element.pxi @@ -37,7 +37,7 @@ from sage.rings.infinity import infinity from sage.rings.rational import Rational from sage.rings.padics.precision_error import PrecisionError from sage.rings.padics.misc import trim_zeros -from sage.structure.element import canonical_coercion, FieldElement +from sage.structure.element import canonical_coercion, Element import itertools cdef long maxordp = (1L << (sizeof(long) * 8 - 2)) - 1 @@ -146,7 +146,7 @@ cdef class pAdicTemplateElement(pAdicGenericElement): elif sage.rings.finite_rings.integer_mod.is_IntegerMod(x): if not Integer(self.prime_pow.prime).divides(x.parent().order()): raise TypeError("p does not divide modulus %s"%x.parent().order()) - elif isinstance(x, FieldElement) and isinstance(x.parent(), FiniteField): + elif isinstance(x, Element) and isinstance(x.parent(), FiniteField): k = self.parent().residue_field() if not k.has_coerce_map_from(x.parent()): raise NotImplementedError("conversion from finite fields which do not embed into the residue field not implemented") diff --git a/src/sage/schemes/elliptic_curves/ell_finite_field.py b/src/sage/schemes/elliptic_curves/ell_finite_field.py index bd7aaf44c09..863c56b22ea 100644 --- a/src/sage/schemes/elliptic_curves/ell_finite_field.py +++ b/src/sage/schemes/elliptic_curves/ell_finite_field.py @@ -30,7 +30,7 @@ from sage.schemes.hyperelliptic_curves.hyperelliptic_finite_field import HyperellipticCurve_finite_field from sage.rings.all import Integer, ZZ, PolynomialRing, GF, polygen from sage.rings.finite_rings.finite_field_base import FiniteField -from sage.structure.element import FieldElement +from sage.structure.element import Element import sage.groups.generic as generic from . import ell_point from sage.arith.all import gcd, lcm, binomial @@ -1530,7 +1530,7 @@ def is_j_supersingular(j, proof=True): sage: [p for p in prime_range(100) if is_j_supersingular(GF(p)(123456))] [2, 3, 59, 89] """ - if not (isinstance(j, FieldElement) and isinstance(j.parent(), FiniteField)): + if not (isinstance(j, Element) and isinstance(j.parent(), FiniteField)): raise ValueError("%s must be an element of a finite field" % j) F = j.parent() From 9f4d1c4bd227c145d964bff1a4f40305f780be2d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 5 Dec 2022 19:26:05 -0800 Subject: [PATCH 226/751] src/sage/crypto/mq/rijndael_gf.py: Fix imports --- src/sage/crypto/mq/rijndael_gf.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sage/crypto/mq/rijndael_gf.py b/src/sage/crypto/mq/rijndael_gf.py index 2dccf6b03b4..6bcb86f4d21 100644 --- a/src/sage/crypto/mq/rijndael_gf.py +++ b/src/sage/crypto/mq/rijndael_gf.py @@ -425,6 +425,7 @@ from sage.matrix.constructor import matrix from sage.matrix.constructor import column_matrix from sage.structure.element import Element, Matrix +from sage.rings.finite_rings.finite_field_base import FiniteField as FiniteField_base from sage.rings.finite_rings.finite_field_constructor import FiniteField from sage.structure.sage_object import SageObject from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing @@ -759,7 +760,7 @@ def _GF_to_hex(self, GF): """ if not isinstance(GF, Matrix) and \ not isinstance(GF, list) and \ - not (isinstance(GF, Element) and isinstance(GF.parent(), FiniteField)): + not (isinstance(GF, Element) and isinstance(GF.parent(), FiniteField_base)): msg = ("keyword 'GF' must be a matrix over {0}, a list of " "elements from {0}, or a single element from {0}") raise TypeError(msg.format(self._F)) @@ -884,7 +885,7 @@ def _GF_to_bin(self, GF): """ if not isinstance(GF, Matrix) and \ not isinstance(GF, list) and \ - not (isinstance(GF, Element) and isinstance(GF.parent(), FiniteField)): + not (isinstance(GF, Element) and isinstance(GF.parent(), FiniteField_base)): msg = ("keyword 'GF' must be a matrix over {0}, a list of " "elements from {0}, or a single element from {0}") raise TypeError(msg.format(self)) From 915179438a7ce4a04b2050ce7714f3d1a98023e6 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 18 Dec 2022 14:36:01 -0800 Subject: [PATCH 227/751] build/pkgs/sagelib/spkg-src: Use --no-isolation, remove old egg-info --- build/pkgs/sagelib/spkg-src | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build/pkgs/sagelib/spkg-src b/build/pkgs/sagelib/spkg-src index f97a0322de9..bfc500b099b 100755 --- a/build/pkgs/sagelib/spkg-src +++ b/build/pkgs/sagelib/spkg-src @@ -18,4 +18,8 @@ set -e cd "$SAGE_ROOT"/build/pkgs/sagelib cd src -python3 -m build --sdist --outdir "$SAGE_DISTFILES" + +# Get rid of old sagemath_standard.egg-info/SOURCES.txt +rm -Rf *.egg-info + +python3 -m build --sdist --no-isolation --outdir "$SAGE_DISTFILES" From c59622a42624037d4eba61e353ea07ae00bd55f6 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 18 Dec 2022 17:12:03 -0800 Subject: [PATCH 228/751] build/pkgs/sagemath*/spkg-src: Use build --- build/pkgs/sage_conf/spkg-src | 5 ++++- build/pkgs/sage_docbuild/spkg-src | 5 ++++- build/pkgs/sage_setup/spkg-src | 5 ++++- build/pkgs/sage_sws2rst/spkg-src | 5 ++++- build/pkgs/sagelib/spkg-src | 2 +- build/pkgs/sagemath_categories/spkg-src | 5 ++++- build/pkgs/sagemath_environment/spkg-src | 5 ++++- build/pkgs/sagemath_objects/spkg-src | 6 +++++- build/pkgs/sagemath_repl/spkg-src | 5 ++++- 9 files changed, 34 insertions(+), 9 deletions(-) diff --git a/build/pkgs/sage_conf/spkg-src b/build/pkgs/sage_conf/spkg-src index af6e8b16342..5336cb0001a 100755 --- a/build/pkgs/sage_conf/spkg-src +++ b/build/pkgs/sage_conf/spkg-src @@ -16,4 +16,7 @@ fi set -e cd pkgs/sage-conf_pypi -python3 -u setup.py --no-user-cfg sdist --dist-dir "$SAGE_DISTFILES" +# Get rid of old *.egg-info/SOURCES.txt +rm -Rf *.egg-info + +python3 -m build --sdist --no-isolation --outdir "$SAGE_DISTFILES" diff --git a/build/pkgs/sage_docbuild/spkg-src b/build/pkgs/sage_docbuild/spkg-src index dc1ba829b3a..59a2ffce5b1 100755 --- a/build/pkgs/sage_docbuild/spkg-src +++ b/build/pkgs/sage_docbuild/spkg-src @@ -18,4 +18,7 @@ set -e cd build/pkgs/sage_docbuild cd src -python3 -u setup.py --no-user-cfg sdist --dist-dir "$SAGE_DISTFILES" +# Get rid of old *.egg-info/SOURCES.txt +rm -Rf *.egg-info + +python3 -m build --sdist --no-isolation --outdir "$SAGE_DISTFILES" diff --git a/build/pkgs/sage_setup/spkg-src b/build/pkgs/sage_setup/spkg-src index e1bcbdaabdb..b3f5059bc89 100755 --- a/build/pkgs/sage_setup/spkg-src +++ b/build/pkgs/sage_setup/spkg-src @@ -18,4 +18,7 @@ set -e cd build/pkgs/sage_setup cd src -python3 -u setup.py --no-user-cfg sdist --dist-dir "$SAGE_DISTFILES" +# Get rid of old *.egg-info/SOURCES.txt +rm -Rf *.egg-info + +python3 -m build --sdist --no-isolation --outdir "$SAGE_DISTFILES" diff --git a/build/pkgs/sage_sws2rst/spkg-src b/build/pkgs/sage_sws2rst/spkg-src index 0da7d0cd24c..da002cdb6f6 100755 --- a/build/pkgs/sage_sws2rst/spkg-src +++ b/build/pkgs/sage_sws2rst/spkg-src @@ -18,4 +18,7 @@ set -e cd build/pkgs/sage_sws2rst cd src -python3 -u setup.py --no-user-cfg sdist --dist-dir "$SAGE_DISTFILES" +# Get rid of old *.egg-info/SOURCES.txt +rm -Rf *.egg-info + +python3 -m build --sdist --no-isolation --outdir "$SAGE_DISTFILES" diff --git a/build/pkgs/sagelib/spkg-src b/build/pkgs/sagelib/spkg-src index bfc500b099b..9ee6a144e3c 100755 --- a/build/pkgs/sagelib/spkg-src +++ b/build/pkgs/sagelib/spkg-src @@ -19,7 +19,7 @@ cd "$SAGE_ROOT"/build/pkgs/sagelib cd src -# Get rid of old sagemath_standard.egg-info/SOURCES.txt +# Get rid of old *.egg-info/SOURCES.txt rm -Rf *.egg-info python3 -m build --sdist --no-isolation --outdir "$SAGE_DISTFILES" diff --git a/build/pkgs/sagemath_categories/spkg-src b/build/pkgs/sagemath_categories/spkg-src index 327d51651b9..7cf05bb5cfa 100755 --- a/build/pkgs/sagemath_categories/spkg-src +++ b/build/pkgs/sagemath_categories/spkg-src @@ -18,4 +18,7 @@ set -e cd build/pkgs/sagemath_categories cd src -python3 -u setup.py --no-user-cfg sdist --dist-dir "$SAGE_DISTFILES" +# Get rid of old *.egg-info/SOURCES.txt +rm -Rf *.egg-info + +python3 -m build --sdist --no-isolation --outdir "$SAGE_DISTFILES" diff --git a/build/pkgs/sagemath_environment/spkg-src b/build/pkgs/sagemath_environment/spkg-src index 4e2b7503da2..09baab68f68 100755 --- a/build/pkgs/sagemath_environment/spkg-src +++ b/build/pkgs/sagemath_environment/spkg-src @@ -18,4 +18,7 @@ set -e cd build/pkgs/sagemath_environment cd src -python3 -u setup.py --no-user-cfg sdist --dist-dir "$SAGE_DISTFILES" +# Get rid of old *.egg-info/SOURCES.txt +rm -Rf *.egg-info + +python3 -m build --sdist --no-isolation --outdir "$SAGE_DISTFILES" diff --git a/build/pkgs/sagemath_objects/spkg-src b/build/pkgs/sagemath_objects/spkg-src index 68719fae1b6..7cef019eb0f 100755 --- a/build/pkgs/sagemath_objects/spkg-src +++ b/build/pkgs/sagemath_objects/spkg-src @@ -18,4 +18,8 @@ set -e cd build/pkgs/sagemath_objects cd src -python3 -u setup.py --no-user-cfg sdist --dist-dir "$SAGE_DISTFILES" + +# Get rid of old *.egg-info/SOURCES.txt +rm -Rf *.egg-info + +python3 -m build --sdist --no-isolation --outdir "$SAGE_DISTFILES" diff --git a/build/pkgs/sagemath_repl/spkg-src b/build/pkgs/sagemath_repl/spkg-src index b20ea463784..16b41acc042 100755 --- a/build/pkgs/sagemath_repl/spkg-src +++ b/build/pkgs/sagemath_repl/spkg-src @@ -18,4 +18,7 @@ set -e cd build/pkgs/sagemath_repl cd src -python3 -u setup.py --no-user-cfg sdist --dist-dir "$SAGE_DISTFILES" +# Get rid of old *.egg-info/SOURCES.txt +rm -Rf *.egg-info + +python3 -m build --sdist --no-isolation --outdir "$SAGE_DISTFILES" From 7fc93d06de9f0e34d2ea2077f1a022750c722235 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 18 Dec 2022 17:42:59 -0800 Subject: [PATCH 229/751] build/pkgs/sagemath*/spkg-src: Use --skip-dependency-check --- build/pkgs/sage_conf/spkg-src | 2 +- build/pkgs/sage_docbuild/spkg-src | 2 +- build/pkgs/sage_setup/spkg-src | 2 +- build/pkgs/sage_sws2rst/spkg-src | 2 +- build/pkgs/sagelib/spkg-src | 2 +- build/pkgs/sagemath_categories/spkg-src | 2 +- build/pkgs/sagemath_environment/spkg-src | 2 +- build/pkgs/sagemath_objects/spkg-src | 2 +- build/pkgs/sagemath_repl/spkg-src | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/build/pkgs/sage_conf/spkg-src b/build/pkgs/sage_conf/spkg-src index 5336cb0001a..c2fa51df092 100755 --- a/build/pkgs/sage_conf/spkg-src +++ b/build/pkgs/sage_conf/spkg-src @@ -19,4 +19,4 @@ cd pkgs/sage-conf_pypi # Get rid of old *.egg-info/SOURCES.txt rm -Rf *.egg-info -python3 -m build --sdist --no-isolation --outdir "$SAGE_DISTFILES" +python3 -m build --sdist --no-isolation --skip-dependency-check --outdir "$SAGE_DISTFILES" diff --git a/build/pkgs/sage_docbuild/spkg-src b/build/pkgs/sage_docbuild/spkg-src index 59a2ffce5b1..b21f8f015c8 100755 --- a/build/pkgs/sage_docbuild/spkg-src +++ b/build/pkgs/sage_docbuild/spkg-src @@ -21,4 +21,4 @@ cd src # Get rid of old *.egg-info/SOURCES.txt rm -Rf *.egg-info -python3 -m build --sdist --no-isolation --outdir "$SAGE_DISTFILES" +python3 -m build --sdist --no-isolation --skip-dependency-check --outdir "$SAGE_DISTFILES" diff --git a/build/pkgs/sage_setup/spkg-src b/build/pkgs/sage_setup/spkg-src index b3f5059bc89..1b137206a5c 100755 --- a/build/pkgs/sage_setup/spkg-src +++ b/build/pkgs/sage_setup/spkg-src @@ -21,4 +21,4 @@ cd src # Get rid of old *.egg-info/SOURCES.txt rm -Rf *.egg-info -python3 -m build --sdist --no-isolation --outdir "$SAGE_DISTFILES" +python3 -m build --sdist --no-isolation --skip-dependency-check --outdir "$SAGE_DISTFILES" diff --git a/build/pkgs/sage_sws2rst/spkg-src b/build/pkgs/sage_sws2rst/spkg-src index da002cdb6f6..5a2a6d464dd 100755 --- a/build/pkgs/sage_sws2rst/spkg-src +++ b/build/pkgs/sage_sws2rst/spkg-src @@ -21,4 +21,4 @@ cd src # Get rid of old *.egg-info/SOURCES.txt rm -Rf *.egg-info -python3 -m build --sdist --no-isolation --outdir "$SAGE_DISTFILES" +python3 -m build --sdist --no-isolation --skip-dependency-check --outdir "$SAGE_DISTFILES" diff --git a/build/pkgs/sagelib/spkg-src b/build/pkgs/sagelib/spkg-src index 9ee6a144e3c..aa97a393b0b 100755 --- a/build/pkgs/sagelib/spkg-src +++ b/build/pkgs/sagelib/spkg-src @@ -22,4 +22,4 @@ cd src # Get rid of old *.egg-info/SOURCES.txt rm -Rf *.egg-info -python3 -m build --sdist --no-isolation --outdir "$SAGE_DISTFILES" +python3 -m build --sdist --no-isolation --skip-dependency-check --outdir "$SAGE_DISTFILES" diff --git a/build/pkgs/sagemath_categories/spkg-src b/build/pkgs/sagemath_categories/spkg-src index 7cf05bb5cfa..e7c48e54193 100755 --- a/build/pkgs/sagemath_categories/spkg-src +++ b/build/pkgs/sagemath_categories/spkg-src @@ -21,4 +21,4 @@ cd src # Get rid of old *.egg-info/SOURCES.txt rm -Rf *.egg-info -python3 -m build --sdist --no-isolation --outdir "$SAGE_DISTFILES" +python3 -m build --sdist --no-isolation --skip-dependency-check --outdir "$SAGE_DISTFILES" diff --git a/build/pkgs/sagemath_environment/spkg-src b/build/pkgs/sagemath_environment/spkg-src index 09baab68f68..2d5b3aafde7 100755 --- a/build/pkgs/sagemath_environment/spkg-src +++ b/build/pkgs/sagemath_environment/spkg-src @@ -21,4 +21,4 @@ cd src # Get rid of old *.egg-info/SOURCES.txt rm -Rf *.egg-info -python3 -m build --sdist --no-isolation --outdir "$SAGE_DISTFILES" +python3 -m build --sdist --no-isolation --skip-dependency-check --outdir "$SAGE_DISTFILES" diff --git a/build/pkgs/sagemath_objects/spkg-src b/build/pkgs/sagemath_objects/spkg-src index 7cef019eb0f..f46ddc2bd3b 100755 --- a/build/pkgs/sagemath_objects/spkg-src +++ b/build/pkgs/sagemath_objects/spkg-src @@ -22,4 +22,4 @@ cd src # Get rid of old *.egg-info/SOURCES.txt rm -Rf *.egg-info -python3 -m build --sdist --no-isolation --outdir "$SAGE_DISTFILES" +python3 -m build --sdist --no-isolation --skip-dependency-check --outdir "$SAGE_DISTFILES" diff --git a/build/pkgs/sagemath_repl/spkg-src b/build/pkgs/sagemath_repl/spkg-src index 16b41acc042..2ef7b673696 100755 --- a/build/pkgs/sagemath_repl/spkg-src +++ b/build/pkgs/sagemath_repl/spkg-src @@ -21,4 +21,4 @@ cd src # Get rid of old *.egg-info/SOURCES.txt rm -Rf *.egg-info -python3 -m build --sdist --no-isolation --outdir "$SAGE_DISTFILES" +python3 -m build --sdist --no-isolation --skip-dependency-check --outdir "$SAGE_DISTFILES" From 4940db4cf4d32617f23a87e04bddaa01061a7f5f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 18 Dec 2022 17:44:05 -0800 Subject: [PATCH 230/751] build/make/Makefile.in: Add targets SPKG-src for script packages --- build/make/Makefile.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build/make/Makefile.in b/build/make/Makefile.in index e971def2416..c2de6ab9892 100644 --- a/build/make/Makefile.in +++ b/build/make/Makefile.in @@ -711,6 +711,13 @@ $(1)-uninstall: $(1)-$(4)-uninstall $(1)-clean: $(1)-uninstall +$(1)-sdist: FORCE python_build sage_setup cython + $(AM_V_at) cd '$$(SAGE_ROOT)' && \ + . '$$(SAGE_ROOT)/src/bin/sage-src-env-config' && \ + . '$$(SAGE_ROOT)/src/bin/sage-env-config' && \ + . '$$(SAGE_ROOT)/src/bin/sage-env' && \ + '$$(SAGE_ROOT)/build/pkgs/$(1)/spkg-src' + # Recursive tox invocation (note - we do not set the environment here). # Setting SAGE_SPKG_WHEELS is for the benefit of sagelib's tox.ini $(1)-tox-%: FORCE From 573fcfdfba04041260f8e06e54e37eb8a9f85da4 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 18 Dec 2022 18:26:36 -0800 Subject: [PATCH 231/751] build/make/Makefile.in: Move targets pypi-sdists, wheel, pypi-wheels here; use SPKG-sdist targets --- Makefile | 37 ------------------------------------- build/make/Makefile.in | 39 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 38 insertions(+), 38 deletions(-) diff --git a/Makefile b/Makefile index 393d0b62a78..257e3517bb1 100644 --- a/Makefile +++ b/Makefile @@ -80,42 +80,6 @@ download: dist: build/make/Makefile ./sage --sdist -pypi-sdists: sage_setup python_build - ./sage --sh build/pkgs/sage_conf/spkg-src - ./sage --sh build/pkgs/sage_sws2rst/spkg-src - ./sage --sh build/pkgs/sage_docbuild/spkg-src - ./sage --sh build/pkgs/sage_setup/spkg-src - ./sage --sh build/pkgs/sagelib/spkg-src - ./sage --sh build/pkgs/sagemath_objects/spkg-src - ./sage --sh build/pkgs/sagemath_categories/spkg-src - ./sage --sh build/pkgs/sagemath_environment/spkg-src - ./sage --sh build/pkgs/sagemath_repl/spkg-src - @echo "Built sdists are in upstream/" - -# Ensuring wheels are present, even for packages that may have been installed -# as editable. Until we have better uninstallation of script packages, we -# just remove the timestamps, which will lead to rebuilds of the packages. -PYPI_WHEEL_PACKAGES = sage_sws2rst sage_setup sagemath_environment sagemath_objects sagemath_repl sagemath_categories -pypi-wheels: - for a in $(PYPI_WHEEL_PACKAGES); do \ - rm -f venv/var/lib/sage/installed/$$a-*; \ - done - for a in $(PYPI_WHEEL_PACKAGES); do \ - $(MAKE) SAGE_EDITABLE=no SAGE_WHEELS=yes $$a; \ - done - @echo "Built wheels are in venv/var/lib/sage/wheels/" - -# sage_docbuild is here, not in PYPI_WHEEL_PACKAGES, because it depends on sagelib -WHEEL_PACKAGES = $(PYPI_WHEEL_PACKAGES) sage_conf sagelib sage_docbuild -wheels: - for a in $(WHEEL_PACKAGES); do \ - rm -f venv/var/lib/sage/installed/$$a-*; \ - done - for a in $(WHEEL_PACKAGES); do \ - $(MAKE) SAGE_EDITABLE=no SAGE_WHEELS=yes $$a; \ - done - @echo "Built wheels are in venv/var/lib/sage/wheels/" - ############################################################################### # Cleaning up ############################################################################### @@ -380,7 +344,6 @@ list: @$(MAKE) --silent -f build/make/Makefile SAGE_PKGCONFIG=dummy $@ .PHONY: default build dist install micro_release \ - pypi-sdists pypi-wheels wheels \ misc-clean bdist-clean distclean bootstrap-clean maintainer-clean \ test check testoptional testall testlong testoptionallong testallong \ ptest ptestoptional ptestall ptestlong ptestoptionallong ptestallong \ diff --git a/build/make/Makefile.in b/build/make/Makefile.in index c2de6ab9892..e4957c4d481 100644 --- a/build/make/Makefile.in +++ b/build/make/Makefile.in @@ -128,7 +128,23 @@ PIP_PACKAGES = @SAGE_PIP_PACKAGES@ # Packages that use the 'script' package build rules SCRIPT_PACKAGES = @SAGE_SCRIPT_PACKAGES@ - +# Packages for which we build wheels for PyPI +PYPI_WHEEL_PACKAGES = \ + sage_sws2rst \ + sage_setup \ + sagemath_environment \ + sagemath_objects \ + sagemath_repl \ + sagemath_categories + +# sage_docbuild is here, not in PYPI_WHEEL_PACKAGES, because it depends on sagelib +WHEEL_PACKAGES = $(PYPI_WHEEL_PACKAGES) \ + sage_conf \ + sagelib \ + sage_docbuild + +# Packages for which build sdists for PyPI +PYPI_SDIST_PACKAGES = $(WHEEL_PACKAGES) # Generate the actual inst_ variables; for each package that is # actually built this generates a line like: @@ -198,6 +214,7 @@ SAGE_I_TARGETS = sagelib doc # Tell make not to look for files with these names: .PHONY: all all-sage all-toolchain all-build all-sageruntime \ all-start build-start base toolchain toolchain-deps base-toolchain \ + pypi-sdists pypi-wheels wheels \ sagelib \ doc doc-html doc-html-jsmath doc-html-mathjax doc-pdf \ doc-uninstall \ @@ -418,6 +435,26 @@ list-broken-packages: auditwheel_or_delocate echo >&2 "$$fix_broken_packages"; \ fi +pypi-sdists: $(PYPI_SDIST_PACKAGES:%=%-sdist) + @echo "Built sdists are in upstream/" + +# Ensuring wheels are present, even for packages that may have been installed +# as editable. Until we have better uninstallation of script packages, we +# just remove the timestamps, which will lead to rebuilds of the packages. +PYPI_WHEEL_PACKAGES = sage_sws2rst sage_setup sagemath_environment sagemath_objects sagemath_repl sagemath_categories +pypi-wheels: + for a in $(PYPI_WHEEL_PACKAGES); do \ + rm -f venv/var/lib/sage/installed/$$a-*; \ + done + $(MAKE_REC) SAGE_EDITABLE=no SAGE_WHEELS=yes $(PYPI_WHEEL_PACKAGES) + @echo "Built wheels are in venv/var/lib/sage/wheels/" + +wheels: + for a in $(WHEEL_PACKAGES); do \ + rm -f venv/var/lib/sage/installed/$$a-*; \ + done + $(MAKE_REC) SAGE_EDITABLE=no SAGE_WHEELS=yes $(WHEEL_PACKAGES) + @echo "Built wheels are in venv/var/lib/sage/wheels/" #============================================================================== # Setting SAGE_CHECK... variables From 0bd13ac7095789740ce098e23a7b0af4978c621c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 18 Dec 2022 19:40:54 -0800 Subject: [PATCH 232/751] build/make/Makefile.in: Remove duplicate setting of PYPI_WHEEL_PACKAGES --- build/make/Makefile.in | 1 - 1 file changed, 1 deletion(-) diff --git a/build/make/Makefile.in b/build/make/Makefile.in index e4957c4d481..7926872a789 100644 --- a/build/make/Makefile.in +++ b/build/make/Makefile.in @@ -441,7 +441,6 @@ pypi-sdists: $(PYPI_SDIST_PACKAGES:%=%-sdist) # Ensuring wheels are present, even for packages that may have been installed # as editable. Until we have better uninstallation of script packages, we # just remove the timestamps, which will lead to rebuilds of the packages. -PYPI_WHEEL_PACKAGES = sage_sws2rst sage_setup sagemath_environment sagemath_objects sagemath_repl sagemath_categories pypi-wheels: for a in $(PYPI_WHEEL_PACKAGES); do \ rm -f venv/var/lib/sage/installed/$$a-*; \ From 306395cf92435f6abc1656c7677cbb68ef7b02b2 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Wed, 21 Dec 2022 16:09:45 +0100 Subject: [PATCH 233/751] finish implementation of cache --- src/sage/combinat/bijectionist.py | 372 +++++++++++++++++++----------- 1 file changed, 239 insertions(+), 133 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index fd2c804ede1..75e904df59e 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -1,24 +1,4 @@ # -*- coding: utf-8 -*- -# pylint: disable=all - -# TODO: (high): -# -# check whether it makes sense to keep a list of solutions, and keep -# a global MILP up to date with this list - -# TODO: (medium): -# -# can we somehow tweak gurobi so that -# minimal_subdistributions_iterator considers the minimal -# subdistributions with "smallest" (e.g., in the sorting order -# defined above) elements first? - -# Priorities: - -# 1) for an all-knowing user, code should be as fast as possible -# 2) code should be easy to understand -# 3) anticipate that a user computes things in a bad order - r""" A bijectionist's toolkit @@ -499,7 +479,7 @@ def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], pi_rho=tuple(), ele Check that large input sets are handled well:: sage: A = B = list(range(20000)) - sage: bij = Bijectionist(A, B) + sage: bij = Bijectionist(A, B) # long time """ # glossary of standard letters: # A, B, Z, W ... finite sets @@ -515,6 +495,7 @@ def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], pi_rho=tuple(), ele assert len(A) == len(set(A)), "A must have distinct items" assert len(B) == len(set(B)), "B must have distinct items" + self.bmilp = None self._A = A self._B = B self._sorter = {} @@ -607,6 +588,7 @@ def set_constant_blocks(self, P): MIPSolverException: ... """ + self.bmilp = None self._P = DisjointSet(self._A) P = sorted(self._sorter["A"](p) for p in P) for p in P: @@ -738,6 +720,7 @@ def set_statistics(self, *alpha_beta): {[]: 2, [1]: 1, [1, 2]: 0, [2, 1]: 0} """ + self.bmilp = None self._n_statistics = len(alpha_beta) # TODO: (low) do we really want to recompute statistics every time? self._alpha = lambda p: tuple(arg[0](p) for arg in alpha_beta) @@ -1018,11 +1001,7 @@ def set_value_restrictions(self, *a_values): empty. In this example, the image of `\tau` under any legal bijection is disjoint to the specified values. - .. TODO:: - - we now have to call - :meth:`_compute_possible_block_values` for the error - message. Is this intended behaviour? + TESTS:: sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] sage: tau = Permutation.longest_increasing_subsequence_length @@ -1033,8 +1012,6 @@ def set_value_restrictions(self, *a_values): ... ValueError: No possible values found for singleton block [[1, 2]] - TESTS:: - sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] sage: tau = Permutation.longest_increasing_subsequence_length sage: bij = Bijectionist(A, B, tau) @@ -1058,6 +1035,7 @@ def set_value_restrictions(self, *a_values): # of _statistics_possible_values - however, we do not want to # insist that set_value_restrictions is called after # set_statistics + self.bmilp = None set_Z = set(self._Z) self._restrictions_possible_values = {a: set_Z for a in self._A} for a, values in a_values: @@ -1223,6 +1201,7 @@ def set_distributions(self, *elements_distributions): not in `A`. """ + self.bmilp = None for elements, values in elements_distributions: assert len(elements) == len(values), f"{elements} and {values} are not of the same size!" for a, z in zip(elements, values): @@ -1318,6 +1297,7 @@ def set_intertwining_relations(self, *pi_rho): [] """ + self.bmilp = None Pi_Rho = namedtuple("Pi_Rho", "numargs pi rho domain") self._pi_rho = [] @@ -1506,10 +1486,11 @@ def _forced_constant_blocks(self): {{'a', 'b'}, {'c', 'd'}} """ - bmilp = self._generate_and_solve_initial_bmilp() # may throw Exception + if self.bmilp is None: + self.bmilp = self._generate_and_solve_initial_bmilp() # may throw Exception # generate blockwise preimage to determine which blocks have the same image - solution = self._solution_by_blocks(bmilp) + solution = self._solution_by_blocks(self.bmilp) multiple_preimages = {(value,): preimages for value, preimages in _invert_dict(solution).items() if len(preimages) > 1} @@ -1534,11 +1515,11 @@ def _forced_constant_blocks(self): # veto the two blocks having the same value for z in self._possible_block_values[i]: if z in self._possible_block_values[j]: # intersection - tmp_constraints.append(bmilp._x[i, z] + bmilp._x[j, z] <= 1) - bmilp.solve(tmp_constraints) + tmp_constraints.append(self.bmilp._x[i, z] + self.bmilp._x[j, z] <= 1) + self.bmilp.solve(tmp_constraints) # solution exists, update dictionary - solution = self._solution_by_blocks(bmilp) + solution = self._solution_by_blocks(self.bmilp) updated_multiple_preimages = {} for values in multiple_preimages: for p in multiple_preimages[values]: @@ -1565,11 +1546,6 @@ def possible_values(self, p=None, optimal=False): Return for each block the values of `s` compatible with the imposed restrictions. - .. TODO:: - - should this method update and return - ``self._possible_block_values``? - INPUT: - ``p`` (optional, default: ``None``) -- a block of `P`, or @@ -1654,11 +1630,6 @@ def possible_values(self, p=None, optimal=False): sage: bij.possible_values(p=[DyckWord([]), DyckWord([1, 0]), DyckWord([1, 0, 1, 0]), DyckWord([1, 1, 0, 0])], optimal=True) {[]: {0}, [1, 0]: {1}, [1, 0, 1, 0]: {1, 2}, [1, 1, 0, 0]: {1, 2}} - .. TODO:: - - test to show that the solution for all blocks is not more - expensive than using :meth:`solutions_iterator` - """ # convert input to set of block representatives blocks = set() @@ -1681,8 +1652,9 @@ def add_solution(solutions, solution): solutions[p].add(value) # generate initial solution, solution dict and add solution - bmilp = self._generate_and_solve_initial_bmilp() - solution = self._solution(bmilp) + if self.bmilp is None: + self.bmilp = self._generate_and_solve_initial_bmilp() + solution = self._solution(self.bmilp) solutions = {} add_solution(solutions, solution) @@ -1690,25 +1662,23 @@ def add_solution(solutions, solution): for p in blocks: tmp_constraints = [] for value in solutions[p]: - tmp_constraints.append(bmilp._x[p, value] == 0) + tmp_constraints.append(self.bmilp._x[p, value] == 0) while True: try: # problem has a solution, so new value was found - bmilp.solve(tmp_constraints) - solution = self._solution(bmilp) + self.bmilp.solve(tmp_constraints) + solution = self._solution(self.bmilp) add_solution(solutions, solution) # veto new value and try again - tmp_constraints.append(bmilp._x[p, solution[p]] == 0) + tmp_constraints.append(self.bmilp._x[p, solution[p]] == 0) except MIPSolverException: # no solution, so all possible values have been found break - # TODO: update possible block values if wanted - # create dictionary to return possible_values = {} for p in blocks: - for a in self._P.root_to_elements_dict()[p]: # TODO: is this the format we want to return in or possible_values[block]? + for a in self._P.root_to_elements_dict()[p]: if optimal: possible_values[a] = solutions[p] else: @@ -1716,24 +1686,13 @@ def add_solution(solutions, solution): return possible_values - def minimal_subdistributions_iterator(self, tA=None): + def minimal_subdistributions_iterator(self): r""" - Return all minimal subsets `\tilde A` of `A` containing `tA` + Return all minimal subsets `\tilde A` of `A` together with submultisets `\tilde Z` with `s(\tilde A) = \tilde Z` as multisets. - .. TODO:: - - should this method interact with ``self._elements_distributions``? - - INPUT: - - - ``tA`` (optional, default: ``None``) -- a subset of `A` TODO: add this - - If ``tA`` is not ``None``, return an iterator of the - subdistributions containing ``tA``. - - TESTS:: + EXAMPLES:: sage: A = B = [permutation for n in range(3) for permutation in Permutations(n)] sage: bij = Bijectionist(A, B, len) @@ -1784,11 +1743,11 @@ def minimal_subdistributions_iterator(self, tA=None): minimal_subdistribution.add_constraint(sum(D[a] for a in self._A) >= 1) try: - bmilp = self._generate_and_solve_initial_bmilp() + if self.bmilp is None: + self.bmilp = self._generate_and_solve_initial_bmilp() except MIPSolverException: return - s = self._solution(bmilp) - tmp_constraints = [] + s = self._solution(self.bmilp) while True: for v in self._Z: minimal_subdistribution.add_constraint(sum(D[a] for a in self._A if s[a] == v) == V[v]) @@ -1797,7 +1756,7 @@ def minimal_subdistributions_iterator(self, tA=None): except MIPSolverException: return d = minimal_subdistribution.get_values(D) # a dict from A to {0, 1} - new_s = self._find_counter_example(bmilp, s, d) + new_s = self._find_counter_example(self.bmilp, s, d) if new_s is None: values = self._sorter["Z"](s[a] for a in self._A if d[a]) yield ([a for a in self._A if d[a]], values) @@ -1852,10 +1811,10 @@ def _find_counter_example(self, bmilp, s0, d): pass return - def minimal_subdistributions_blocks_iterator(self, p=None): + def minimal_subdistributions_blocks_iterator(self): r""" Return all representatives of minimal subsets `\tilde P` - of `P` containing `p` together with submultisets `\tilde Z` + of `P` together with submultisets `\tilde Z` with `s(\tilde P) = \tilde Z` as multisets. .. WARNING:: @@ -1868,21 +1827,6 @@ def minimal_subdistributions_blocks_iterator(self, p=None): :meth:`minimal_subdistributions_iterator`, which is, however, computationally more expensive. - .. TODO:: - - should this method interact with ``self._elements_distributions``? - - INPUT: - - - ``p`` (optional, default: ``None``) -- a subset of `P` - - If ``p`` is not ``None``, return an iterator of the - subdistributions containing ``p``. - - .. TODO:: - - the optional argument is not yet supported - EXAMPLES:: sage: A = B = [permutation for n in range(3) for permutation in Permutations(n)] @@ -2003,10 +1947,11 @@ def add_counter_example_constraint(s): if s[p] == v) == V[v]) try: - bmilp = self._generate_and_solve_initial_bmilp() + if self.bmilp is None: + self.bmilp = self._generate_and_solve_initial_bmilp() except MIPSolverException: return - s = self._solution_by_blocks(bmilp) + s = self._solution_by_blocks(self.bmilp) add_counter_example_constraint(s) while True: try: @@ -2014,7 +1959,7 @@ def add_counter_example_constraint(s): except MIPSolverException: return d = minimal_subdistribution.get_values(D) # a dict from P to multiplicities - new_s = self._find_counter_example2(bmilp, P, s, d) + new_s = self._find_counter_example2(self.bmilp, P, s, d) if new_s is None: yield ([p for p in P for _ in range(ZZ(d[p]))], self._sorter["Z"](s[p] @@ -2264,6 +2209,48 @@ def solutions_iterator(self): sage: set_verbose(2) sage: _ = list(bij.solutions_iterator()) + after vetoing + Constraints are: + block []: 1 <= x_0 <= 1 + block [1]: 1 <= x_1 <= 1 + block [1, 2]: 1 <= x_2 + x_3 <= 1 + block [2, 1]: 1 <= x_4 + x_5 <= 1 + block [1, 2, 3]: 1 <= x_6 + x_7 + x_8 <= 1 + block [1, 3, 2]: 1 <= x_9 + x_10 + x_11 <= 1 + block [2, 3, 1]: 1 <= x_12 + x_13 + x_14 <= 1 + statistics: 1 <= x_0 <= 1 + statistics: 1 <= x_1 <= 1 + statistics: 1 <= x_2 + x_4 <= 1 + statistics: 1 <= x_3 + x_5 <= 1 + statistics: 1 <= x_6 + 3 x_9 + 2 x_12 <= 1 + statistics: 3 <= x_7 + 3 x_10 + 2 x_13 <= 3 + statistics: 2 <= x_8 + 3 x_11 + 2 x_14 <= 2 + veto: x_0 + x_1 + x_3 + x_4 + x_6 + x_10 + x_14 <= 6 + veto: x_0 + x_1 + x_2 + x_5 + x_6 + x_10 + x_14 <= 6 + after vetoing + Constraints are: + block []: 1 <= x_0 <= 1 + block [1]: 1 <= x_1 <= 1 + block [1, 2]: 1 <= x_2 + x_3 <= 1 + block [2, 1]: 1 <= x_4 + x_5 <= 1 + block [1, 2, 3]: 1 <= x_6 + x_7 + x_8 <= 1 + block [1, 3, 2]: 1 <= x_9 + x_10 + x_11 <= 1 + block [2, 3, 1]: 1 <= x_12 + x_13 + x_14 <= 1 + statistics: 1 <= x_0 <= 1 + statistics: 1 <= x_1 <= 1 + statistics: 1 <= x_2 + x_4 <= 1 + statistics: 1 <= x_3 + x_5 <= 1 + statistics: 1 <= x_6 + 3 x_9 + 2 x_12 <= 1 + statistics: 3 <= x_7 + 3 x_10 + 2 x_13 <= 3 + statistics: 2 <= x_8 + 3 x_11 + 2 x_14 <= 2 + veto: x_0 + x_1 + x_3 + x_4 + x_6 + x_10 + x_14 <= 6 + veto: x_0 + x_1 + x_2 + x_5 + x_6 + x_10 + x_14 <= 6 + + Changing or re-setting problem parameters clears the internal cache and + prints even more information:: + + sage: bij.set_constant_blocks(P) + sage: _ = list(bij.solutions_iterator()) Constraints are: block []: 1 <= x_0 <= 1 block [1]: 1 <= x_1 <= 1 @@ -2343,18 +2330,147 @@ def solutions_iterator(self): sage: list(bij.solutions_iterator()) [] + Testing interactions between multiple instances using Fedor Petrov's example from https://mathoverflow.net/q/424187:: + + sage: A = B = ["a"+str(i) for i in range(1, 9)] + ["b"+str(i) for i in range(3, 9)] + ["d"] + sage: tau = {b: 0 if i < 10 else 1 for i, b in enumerate(B)}.get + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_constant_blocks([["a"+str(i), "b"+str(i)] for i in range(1, 9) if "b"+str(i) in A]) + sage: d = [0]*8+[1]*4 + sage: bij.set_distributions((A[:8] + A[8+2:-1], d), (A[:8] + A[8:-3], d)) + sage: iterator1 = bij.solutions_iterator() + sage: iterator2 = bij.solutions_iterator() + + Generate a solution in iterator1, iterator2 should generate the same solution and vice versa:: + sage: next(iterator1) + {'a1': 1, + 'a2': 1, + 'a3': 0, + 'a4': 0, + 'a5': 0, + 'a6': 1, + 'a7': 0, + 'a8': 0, + 'b3': 0, + 'b4': 0, + 'b5': 0, + 'b6': 1, + 'b7': 0, + 'b8': 0, + 'd': 1} + + sage: next(iterator2) + {'a1': 1, + 'a2': 1, + 'a3': 0, + 'a4': 0, + 'a5': 0, + 'a6': 1, + 'a7': 0, + 'a8': 0, + 'b3': 0, + 'b4': 0, + 'b5': 0, + 'b6': 1, + 'b7': 0, + 'b8': 0, + 'd': 1} + + sage: next(iterator2) + {'a1': 1, + 'a2': 1, + 'a3': 0, + 'a4': 0, + 'a5': 1, + 'a6': 0, + 'a7': 0, + 'a8': 0, + 'b3': 0, + 'b4': 0, + 'b5': 1, + 'b6': 0, + 'b7': 0, + 'b8': 0, + 'd': 1} + + sage: next(iterator1) + {'a1': 1, + 'a2': 1, + 'a3': 0, + 'a4': 0, + 'a5': 1, + 'a6': 0, + 'a7': 0, + 'a8': 0, + 'b3': 0, + 'b4': 0, + 'b5': 1, + 'b6': 0, + 'b7': 0, + 'b8': 0, + 'd': 1} + + Re-setting the distribution resets the cache, so a new iterator will generate the first solutions again, + but the old iterator continues:: + + sage: bij.set_distributions((A[:8] + A[8+2:-1], d), (A[:8] + A[8:-3], d)) + sage: iterator3 = bij.solutions_iterator() + + sage: next(iterator3) + {'a1': 1, + 'a2': 1, + 'a3': 0, + 'a4': 0, + 'a5': 0, + 'a6': 1, + 'a7': 0, + 'a8': 0, + 'b3': 0, + 'b4': 0, + 'b5': 0, + 'b6': 1, + 'b7': 0, + 'b8': 0, + 'd': 1} + + sage: next(iterator1) + {'a1': 0, + 'a2': 1, + 'a3': 0, + 'a4': 1, + 'a5': 0, + 'a6': 0, + 'a7': 0, + 'a8': 1, + 'b3': 0, + 'b4': 1, + 'b5': 0, + 'b6': 0, + 'b7': 0, + 'b8': 1, + 'd': 0} """ + bmilp = None + next_solution = None try: - self.bmilp = self._generate_and_solve_initial_bmilp() + if self.bmilp is None: + self.bmilp = self._generate_and_solve_initial_bmilp() + bmilp = self.bmilp + bmilp.solve([], 0) + next_solution = self._solution(bmilp) except MIPSolverException: return + + solution_index = 1 while True: - yield self._solution(self.bmilp) + yield next_solution if get_verbose() >= 2: print("after vetoing") - self._show_bmilp(self.bmilp, variables=False) + self._show_bmilp(bmilp, variables=False) try: - self.bmilp.solve([], force_new_solution=True) + bmilp.solve([], solution_index) + next_solution = self._solution(bmilp) + solution_index += 1 except MIPSolverException: return @@ -2466,7 +2582,6 @@ def __init__(self, bijectionist: Bijectionist): self._solution_cache = [] self._last_solution = {} self._index_block_value_dict = None - self._block_value_index_dict = None# TODO: may not be needed? self._x = self.milp.new_variable(binary=True) # indexed by P x Z self._bijectionist = bijectionist @@ -2477,52 +2592,42 @@ def __init__(self, bijectionist: Bijectionist): for z in bijectionist._possible_block_values[p]) == 1, name=name[:50]) - def clear_solution_cache(self): - self._n_variables = -1 - self._solution_cache = [] - self._last_solution = {} - self._index_block_value_dict = None - self._block_value_index_dict = None # TODO: may not be needed? - - def solve(self, tmp_constraints, force_new_solution=False): + def solve(self, tmp_constraints, solution_index=0): if self._n_variables < 0: self._n_variables = self.milp.number_of_variables() self._index_block_value_dict = {} - self._block_value_index_dict = {} for (p, z), v in self._x.items(): variable_index = next(iter(v.dict().keys())) - self._index_block_value_dict[variable_index] = (p,z) - self._block_value_index_dict[(p,z)] = variable_index - assert self._n_variables == self.milp.number_of_variables(), "The number of variables changed." # number of variables would change with creation of constraints with new variables + self._index_block_value_dict[variable_index] = (p, z) + # number of variables would change with creation of constraints with new variables + assert self._n_variables == self.milp.number_of_variables(), "The number of variables changed." # check if previous solution exists with constraints previous_solution_exists = False - self.last_solution = {} - if not force_new_solution: - for solution in self._solution_cache: - fulfills_constraints = True - # loop through all constraints - for constraint in tmp_constraints: - # check equations - for linear_function, value in constraint.equations(): - solution_value = self._evaluate_linear_function(linear_function.dict(), self._index_block_value_dict, solution) - if solution_value != value.dict()[-1]: - fulfills_constraints = False - break - if not fulfills_constraints: + for solution in self._solution_cache[solution_index:]: + fulfills_constraints = True + # loop through all constraints + for constraint in tmp_constraints: + # check equations + for linear_function, value in constraint.equations(): + solution_value = self._evaluate_linear_function(linear_function.dict(), self._index_block_value_dict, solution) + if solution_value != value.dict()[-1]: + fulfills_constraints = False break - # check inequalities - for linear_function, value in constraint.inequalities(): - solution_value = self._evaluate_linear_function(linear_function.dict(), self._index_block_value_dict, solution) - if solution_value > value.dict()[-1]: - fulfills_constraints = False - break - if not fulfills_constraints: + if not fulfills_constraints: + break + # check inequalities + for linear_function, value in constraint.inequalities(): + solution_value = self._evaluate_linear_function(linear_function.dict(), self._index_block_value_dict, solution) + if solution_value > value.dict()[-1]: + fulfills_constraints = False break - if fulfills_constraints: - previous_solution_exists = True - self.last_solution = solution + if not fulfills_constraints: break + if fulfills_constraints: + previous_solution_exists = True + self.last_solution = solution + break # if no previous solution satisfies the constraints, generate a new one if not previous_solution_exists: @@ -2540,15 +2645,15 @@ def solve(self, tmp_constraints, force_new_solution=False): self.last_solution = self.milp.get_values(self._x) self._solution_cache.append(self.last_solution) - self.veto_current_solution() + return self.last_solution def _evaluate_linear_function(self, linear_function_dict, block_index_dict, values): return float(sum(linear_function_dict[index]*values[block_index_dict[index]] for index in linear_function_dict)) def get_value(self, p, v): - return self.last_solution[p,v] + return self.last_solution[p, v] def add_alpha_beta_constraints(self): r""" @@ -2702,6 +2807,7 @@ def veto_current_solution(self): :meth:`MixedIntegerLinearProgram.solve()` must return a solution different from the current one. + We require that the MILP currently has a solution. .. WARNING:: @@ -2801,7 +2907,7 @@ def _non_copying_intersection(sets): sage: permutation1010root = list(_disjoint_set_roots(bij._P))[2] sage: permutation1010root [1, 0, 1, 0] - sage: bmilp.solve([bmilp._x[permutation1010root, 1] <= 0.5], force_new_solution=True) + sage: bmilp.solve([bmilp._x[permutation1010root, 1] <= 0.5], solution_index=1) Traceback (most recent call last): ... MIPSolverException: GLPK: Problem has no feasible solution From 1ac09787fd03c114725a775cdf22b6e14f108446 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Thu, 22 Dec 2022 00:38:46 +0100 Subject: [PATCH 234/751] add some documentation and doctests, slightly simplify code --- src/sage/combinat/bijectionist.py | 268 +++++++++++++++++++----------- 1 file changed, 175 insertions(+), 93 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 75e904df59e..cb96c2ee157 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -184,9 +184,14 @@ ( [ /\/\ / \ ] [ \ / ] ) ( [ / \, / \ ], [ o o ] ) - TESTS: + The output is in a form suitable for FindStat:: - The following failed before commit c6d4d2e8804aa42afa08c72c887d50c725cc1a91:: + sage: findmap(list(bij.minimal_subdistributions_iterator())) # optional -- internet + 0: Mp00034 (quality [100]) + 1: Mp00061oMp00023 (quality [100]) + 2: Mp00018oMp00140 (quality [100]) + + TESTS:: sage: N=4; A = B = [permutation for n in range(N) for permutation in Permutations(n)] sage: theta = lambda pi: Permutation([x+1 if x != len(pi) else 1 for x in pi[-1:]+pi[:-1]]) @@ -373,11 +378,6 @@ # Z. In LaTeX, we mostly call them \tilde A, \tilde Z, etc. now. It # would be good to have a standard name in code, too. -# TODO: (medium) whenever possible, doctests of a method should only -# test this method. Currently we have very many system tests, which -# is inconvenient when modifying the design substantially. - - class Bijectionist(SageObject): r""" A toolbox to list all possible bijections between two finite sets @@ -722,7 +722,7 @@ def set_statistics(self, *alpha_beta): """ self.bmilp = None self._n_statistics = len(alpha_beta) - # TODO: (low) do we really want to recompute statistics every time? + # TODO: do we really want to recompute statistics every time? self._alpha = lambda p: tuple(arg[0](p) for arg in alpha_beta) self._beta = lambda p: tuple(arg[1](p) for arg in alpha_beta) @@ -1047,6 +1047,21 @@ def _compute_possible_block_values(self): Update the dictionary of possible values of each block. This has to be called whenever ``self._P`` was modified. + + It raises a :class:`ValueError`, if the restrictions on a + block are contradictory. + + TESTS:: + + sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] + sage: tau = Permutation.longest_increasing_subsequence_length + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_value_restrictions((Permutation([1, 2]), [4, 5])) + sage: bij._compute_possible_block_values() + Traceback (most recent call last): + ... + ValueError: No possible values found for singleton block [[1, 2]] + """ self._possible_block_values = {} # P -> Power(Z) for p, block in self._P.root_to_elements_dict().items(): @@ -1769,7 +1784,6 @@ def minimal_subdistributions_iterator(self): # the current solution minimal_subdistribution.add_constraint(sum(active_vars) <= len(active_vars) - 1, name="veto") - # TODO: can we ignore that in the next step the same constraint is added again? else: s = new_s @@ -2020,14 +2034,16 @@ def _find_counter_example2(self, bmilp, P, s0, d): def _preprocess_intertwining_relations(self): r""" - - .. TODO:: - - (medium) untangle side effect and return value if possible - Make `self._P` be the finest set partition coarser than `self._P` such that composing elements preserves blocks. + OUTPUT: + + A list of triples `((\pi/\rho, p, (p_1,\dots,p_k))`, where + `p` is the block of `\rho(s(a_1),\dots, s(a_k))`, for any + `a_i\in p_i`, suitable for + :meth:`_BijectionistMILP.add_intertwining_relation_constraints`. + Suppose that `p_1`, `p_2` are blocks of `P`, and `a_1, a'_1 \in p_1` and `a_2, a'_2\in p_2`. Then, @@ -2049,6 +2065,10 @@ def _preprocess_intertwining_relations(self): create one test with one and one test with two intertwining_relations + .. TODO:: + + untangle side effect and return value if possible + """ images = {} # A^k -> A, a_1,...,a_k to pi(a_1,...,a_k), for all pi origins_by_elements = [] # (pi/rho, pi(a_1,...,a_k), a_1,...,a_k) @@ -2060,9 +2080,9 @@ def _preprocess_intertwining_relations(self): if a in self._A: if a in images: # this happens if there are several pi's of the same arity - images[a_tuple].add(a) # TODO: (low) wouldn't self._P.find(a) be more efficient here? + images[a_tuple].add(a) # TODO: wouldn't self._P.find(a) be more efficient here? else: - images[a_tuple] = set((a,)) # TODO: (low) wouldn't self._P.find(a) be more efficient here? + images[a_tuple] = set((a,)) # TODO: wouldn't self._P.find(a) be more efficient here? origins_by_elements.append((composition_index, a, a_tuple)) # merge blocks @@ -2483,7 +2503,7 @@ def _solution(self, bmilp): map = {} # A -> Z, a +-> s(a) for p, block in self._P.root_to_elements_dict().items(): for z in self._possible_block_values[p]: - if bmilp.get_value(p, z) == 1: + if bmilp.has_value(p, z): for a in block: map[a] = z break @@ -2498,7 +2518,7 @@ def _solution_by_blocks(self, bmilp): map = {} # P -> Z, a +-> s(a) for p in _disjoint_set_roots(self._P): for z in self._possible_block_values[p]: - if bmilp.get_value(p, z) == 1: + if bmilp.has_value(p, z): map[p] = z break return map @@ -2547,8 +2567,8 @@ def _show_bmilp(self, bmilp, variables=True): def _generate_and_solve_initial_bmilp(self): r""" - Generate a ``_BijectionistMILP``, add all relevant constraints - and call ``MILP.solve()``. + Generate a :class:`_BijectionistMILP`, add all relevant constraints + and call :meth:`_BijectionistMILP.solve`. """ preimage_blocks = self._preprocess_intertwining_relations() self._compute_possible_block_values() @@ -2557,7 +2577,7 @@ def _generate_and_solve_initial_bmilp(self): n = bmilp.milp.number_of_variables() bmilp.add_alpha_beta_constraints() bmilp.add_distribution_constraints() - bmilp.add_interwining_relation_constraints(preimage_blocks) + bmilp.add_intertwining_relation_constraints(preimage_blocks) if get_verbose() >= 2: self._show_bmilp(bmilp) assert n == bmilp.milp.number_of_variables(), "The number of variables increased." @@ -2565,14 +2585,28 @@ def _generate_and_solve_initial_bmilp(self): return bmilp -class _BijectionistMILP(SageObject): +class _BijectionistMILP(): r""" - Wrapper class for the MixedIntegerLinearProgram (MILP). This class is used to manage the MILP, - add constraints, solve the problem and check for uniqueness of solution values. + Wrapper class for the MixedIntegerLinearProgram (MILP). This + class is used to manage the MILP, add constraints, solve the + problem and check for uniqueness of solution values. + """ def __init__(self, bijectionist: Bijectionist): - # TODO: it would be cleaner not to pass the full bijectionist - # instance, but only those attributes we actually use: + r""" + Initialize the mixed integer linear program. + + INPUT: + + - ``bijectionist`` -- an instance of :class:`Bijectionist`. + + .. TODO:: + + it might be cleaner not to pass the full bijectionist + instance, but only those attributes we actually use + + """ + # the attributes of the bijectionist class we actually use: # _possible_block_values # _elements_distributions # _W, _Z, _A, _B, _P, _alpha, _beta, _tau, _pi_rho @@ -2592,68 +2626,91 @@ def __init__(self, bijectionist: Bijectionist): for z in bijectionist._possible_block_values[p]) == 1, name=name[:50]) - def solve(self, tmp_constraints, solution_index=0): + def solve(self, additional_constraints, solution_index=0): + r""" + Return a solution satisfying the given additional constraints. + + INPUT: + + - ``additional_constraints`` -- a list of constraints for the + underlying MILP + + - ``solution_index`` (optional, default: ``0``) -- an index + specifying how many of the solutions in the cache should be + ignored. + + """ if self._n_variables < 0: + # initialize at first call self._n_variables = self.milp.number_of_variables() self._index_block_value_dict = {} for (p, z), v in self._x.items(): variable_index = next(iter(v.dict().keys())) self._index_block_value_dict[variable_index] = (p, z) - # number of variables would change with creation of constraints with new variables + # number of variables would change with creation of + # constraints with new variables assert self._n_variables == self.milp.number_of_variables(), "The number of variables changed." - # check if previous solution exists with constraints - previous_solution_exists = False + # check if there is a solution satisfying the constraints in + # the cache for solution in self._solution_cache[solution_index:]: - fulfills_constraints = True - # loop through all constraints - for constraint in tmp_constraints: - # check equations - for linear_function, value in constraint.equations(): - solution_value = self._evaluate_linear_function(linear_function.dict(), self._index_block_value_dict, solution) - if solution_value != value.dict()[-1]: - fulfills_constraints = False - break - if not fulfills_constraints: - break - # check inequalities - for linear_function, value in constraint.inequalities(): - solution_value = self._evaluate_linear_function(linear_function.dict(), self._index_block_value_dict, solution) - if solution_value > value.dict()[-1]: - fulfills_constraints = False - break - if not fulfills_constraints: - break - if fulfills_constraints: - previous_solution_exists = True + if all(all(self._evaluate_linear_function(linear_function, + solution) == value.dict()[-1] + for linear_function, value in constraint.equations()) + and all(self._evaluate_linear_function(linear_function, + solution) <= value.dict()[-1] + for linear_function, value in constraint.inequalities()) + for constraint in additional_constraints): self.last_solution = solution - break - - # if no previous solution satisfies the constraints, generate a new one - if not previous_solution_exists: - try: - n_constraints = self.milp.number_of_constraints() - for constraint in tmp_constraints: - self.milp.add_constraint(constraint) - self.milp.solve() - for _ in range(self.milp.number_of_constraints()-n_constraints): - self.milp.remove_constraint(n_constraints) - except MIPSolverException as error: - for _ in range(self.milp.number_of_constraints()-n_constraints): - self.milp.remove_constraint(n_constraints) - raise error - - self.last_solution = self.milp.get_values(self._x) - self._solution_cache.append(self.last_solution) - self.veto_current_solution() + return self.last_solution + # otherwise generate a new one + try: + # TODO: wouldn't it be safer to copy the milp? + n_constraints = self.milp.number_of_constraints() + for constraint in additional_constraints: + self.milp.add_constraint(constraint) + self.milp.solve() + for _ in range(self.milp.number_of_constraints()-n_constraints): + self.milp.remove_constraint(n_constraints) + except MIPSolverException as error: + for _ in range(self.milp.number_of_constraints()-n_constraints): + self.milp.remove_constraint(n_constraints) + raise error + + self.last_solution = self.milp.get_values(self._x) + self._solution_cache.append(self.last_solution) + self._veto_current_solution() return self.last_solution - def _evaluate_linear_function(self, linear_function_dict, block_index_dict, values): - return float(sum(linear_function_dict[index]*values[block_index_dict[index]] for index in linear_function_dict)) + def _evaluate_linear_function(self, linear_function, values): + r""" + Evaluate the given function at the given values. + + INPUT: + + - ``linear_function``, a + :class:`sage.numerical.linear_functions.LinearFunction`. - def get_value(self, p, v): - return self.last_solution[p, v] + - ``values``, a candidate for a solution of the MILP as a + dictionary from pairs `(a, z)\in A\times Z` to `0` or `1`, + specifying whether `a` is mapped to `z`. + + """ + return float(sum(value * values[self._index_block_value_dict[index]] + for index, value in linear_function.dict().items())) + + def has_value(self, p, v): + r""" + Return whether a block is mapped to a value in the last solution + computed. + + INPUT: + + - ``p``, the representative of a block + - ``v``, a value in `Z` + """ + return self.last_solution[p, v] == 1 def add_alpha_beta_constraints(self): r""" @@ -2690,8 +2747,8 @@ def add_alpha_beta_constraints(self): z_index = Z_dict[self._bijectionist._tau[b]] B_matrix[z_index][w_index] += 1 - # TODO: (low) I am not sure that this is the best way to - # filter out empty conditions + # TODO: not sure that this is the best way to filter out + # empty conditions for w in range(len(W)): for z in range(len(Z)): c = AZ_matrix[z][w] - B_matrix[z][w] @@ -2704,7 +2761,7 @@ def add_alpha_beta_constraints(self): def add_distribution_constraints(self): r""" Add constraints so the distributions given by - :meth:`~Bijectionist.set_distributions` are fulfilled. + :meth:`set_distributions` are fulfilled. To accomplish this we add @@ -2728,8 +2785,8 @@ def add_distribution_constraints(self): for z in values: values_sum[Z_dict[z]] += 1 - # TODO: (low) I am not sure that this is the best way to - # filter out empty conditions + # TODO: not sure that this is the best way to filter out + # empty conditions for element, value in zip(elements_sum, values_sum): c = element - value if c.is_zero(): @@ -2738,13 +2795,19 @@ def add_distribution_constraints(self): raise MIPSolverException self.milp.add_constraint(c == 0, name=f"d: {element} == {value}") - def add_interwining_relation_constraints(self, origins): + def add_intertwining_relation_constraints(self, origins): r""" Add constraints corresponding to the given intertwining relations. + INPUT: + + - origins, a list of triples `((\pi/\rho, p, + (p_1,\dots,p_k))`, where `p` is the block of + `\rho(s(a_1),\dots, s(a_k))`, for any `a_i\in p_i`. + This adds the constraints imposed by - :meth:`~Bijectionist.set_intertwining_relations`. + :meth:`set_intertwining_relations`, .. MATH:: @@ -2771,15 +2834,8 @@ def add_interwining_relation_constraints(self, origins): x_{p, z}\geq 1 - k + \sum_{i=1}^k x_{p_i, z_i}. - Not that `z` must be a possible value of `p` and each `z_i` + Note that `z` must be a possible value of `p` and each `z_i` must be a possible value of `p_i`. - - INPUT: - - - origins, a list of triples `((\pi/\rho, p, - (p_1,\dots,p_k))`, where `p` is the block of - `\rho(s(a_1),\dots, s(a_k))`, for any `a_i\in p_i`. - """ for composition_index, image_block, preimage_blocks in origins: pi_rho = self._bijectionist._pi_rho[composition_index] @@ -2799,14 +2855,13 @@ def add_interwining_relation_constraints(self, origins): self.milp.add_constraint(rhs <= 0, name=f"pi/rho({composition_index})") - def veto_current_solution(self): + def _veto_current_solution(self): r""" Add a constraint vetoing the current solution. This adds a constraint such that the next call to - :meth:`MixedIntegerLinearProgram.solve()` must return a - solution different from the current one. - + :meth:`solve` must return a solution different from the + current one. We require that the MILP currently has a solution. @@ -2837,6 +2892,19 @@ def _invert_dict(d): """ Return the dictionary whose keys are the values of the input and whose values are the lists of preimages. + + INPUT: + + - ``d``, a ``dict``. + + EXAMPLES:: + + sage: from sage.combinat.bijectionist import _invert_dict + sage: _invert_dict({1: "a", 2: "a", 3:"b"}) + {'a': [1, 2], 'b': [3]} + + sage: _invert_dict({}) + {} """ preimages = {} for k, v in d.items(): @@ -2847,6 +2915,20 @@ def _invert_dict(d): def _disjoint_set_roots(d): """ Return the representatives of the blocks of the disjoint set. + + INPUT: + + - ``d``, a ``sage.sets.disjoint_set.DisjointSet_of_hashables`` + + EXAMPLES:: + + sage: from sage.combinat.bijectionist import _disjoint_set_roots + sage: d = DisjointSet('abcde') + sage: d.union("a", "b") + sage: d.union("a", "c") + sage: d.union("e", "d") + sage: _disjoint_set_roots(d) + dict_keys(['a', 'e']) """ return d.root_to_elements_dict().keys() From 47945ac2bbdbd927a6aaef8c72ead62d2922c94c Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Thu, 22 Dec 2022 01:05:46 +0100 Subject: [PATCH 235/751] add missing documentation in table of contents --- src/sage/combinat/bijectionist.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index cb96c2ee157..d8a9e548442 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -15,20 +15,20 @@ :widths: 30, 70 :delim: | - :meth:`~Bijectionist.set_intertwining_relations` | Set - :meth:`~Bijectionist.set_constant_blocks` | Set - :meth:`~Bijectionist.set_statistics` | Set - :meth:`~Bijectionist.set_value_restrictions` | Set - :meth:`~Bijectionist.set_distributions` | Set - - :meth:`~Bijectionist.statistics_table` | Return - :meth:`~Bijectionist.statistics_fibers` | Return - - :meth:`~Bijectionist.constant_blocks` | Return - :meth:`~Bijectionist.solutions_iterator` | Return - :meth:`~Bijectionist.possible_values` | Return - :meth:`~Bijectionist.minimal_subdistributions_iterator` | Return - :meth:`~Bijectionist.minimal_subdistributions_blocks_iterator` | Return + :meth:`~Bijectionist.set_intertwining_relations` | Declare that the statistic intertwines with other maps. + :meth:`~Bijectionist.set_constant_blocks` | Declare that the statistic is constant on some sets. + :meth:`~Bijectionist.set_statistics` | Declare statistics that are preserved by the bijection. + :meth:`~Bijectionist.set_value_restrictions` | Restrict the values of the statistic on an element. + :meth:`~Bijectionist.set_distributions` | Restrict the distribution of values of the statistic on some elements. + + :meth:`~Bijectionist.statistics_table` | Print a table collecting information on the given statistics. + :meth:`~Bijectionist.statistics_fibers` | Collect elements with the same statistics. + + :meth:`~Bijectionist.constant_blocks` | Return the blocks on which the statistic is constant. + :meth:`~Bijectionist.solutions_iterator` | Iterate over all possible solutions. + :meth:`~Bijectionist.possible_values` | Return all possible values for a given element. + :meth:`~Bijectionist.minimal_subdistributions_iterator` | Iterate over the minimal subdistributions. + :meth:`~Bijectionist.minimal_subdistributions_blocks_iterator` | Iterate over the minimal subdistributions. A guided tour ============= From 19c3d8fdc82471993ab800923eaeb2494c7551c7 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Thu, 22 Dec 2022 11:04:09 +0100 Subject: [PATCH 236/751] mark doctests as long, slightly simplify logic --- src/sage/combinat/bijectionist.py | 200 ++++++++++++++++-------------- 1 file changed, 110 insertions(+), 90 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index d8a9e548442..7f3bda41982 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -121,7 +121,7 @@ There is no rotation invariant statistic on non crossing set partitions which is equidistributed with the Strahler number on ordered trees:: - sage: N=8; As = [[SetPartition(d.to_noncrossing_partition()) for d in DyckWords(n)] for n in range(N)] + sage: N = 8; As = [[SetPartition(d.to_noncrossing_partition()) for d in DyckWords(n)] for n in range(N)] sage: A = sum(As, []) sage: B = sum([list(OrderedTrees(n)) for n in range(1, N+1)], []) sage: theta = lambda m: SetPartition([[i % m.size() + 1 for i in b] for b in m]) @@ -186,14 +186,14 @@ The output is in a form suitable for FindStat:: - sage: findmap(list(bij.minimal_subdistributions_iterator())) # optional -- internet + sage: findmap(list(bij.minimal_subdistributions_iterator())) # optional -- internet 0: Mp00034 (quality [100]) 1: Mp00061oMp00023 (quality [100]) 2: Mp00018oMp00140 (quality [100]) TESTS:: - sage: N=4; A = B = [permutation for n in range(N) for permutation in Permutations(n)] + sage: N = 4; A = B = [permutation for n in range(N) for permutation in Permutations(n)] sage: theta = lambda pi: Permutation([x+1 if x != len(pi) else 1 for x in pi[-1:]+pi[:-1]]) sage: def tau(pi): ....: n = len(pi) @@ -479,7 +479,7 @@ def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], pi_rho=tuple(), ele Check that large input sets are handled well:: sage: A = B = list(range(20000)) - sage: bij = Bijectionist(A, B) # long time + sage: bij = Bijectionist(A, B) # long time """ # glossary of standard letters: # A, B, Z, W ... finite sets @@ -1471,8 +1471,6 @@ def _forced_constant_blocks(self): sage: all(s[Permutation([2, 1])] == s[Permutation([1, 4, 2, 3])] for s in bij.solutions_iterator()) False - - sage: A = B = ["a", "b", "c", "d", "e", "f"] sage: tau = {"a": 1, "b": 1, "c": 3, "d": 4, "e": 5, "f": 6}.get sage: bij = Bijectionist(A, B, tau) @@ -1502,7 +1500,8 @@ def _forced_constant_blocks(self): """ if self.bmilp is None: - self.bmilp = self._generate_and_solve_initial_bmilp() # may throw Exception + self.bmilp = self._initialize_new_bmilp() + self.bmilp.solve([]) # generate blockwise preimage to determine which blocks have the same image solution = self._solution_by_blocks(self.bmilp) @@ -1668,7 +1667,9 @@ def add_solution(solutions, solution): # generate initial solution, solution dict and add solution if self.bmilp is None: - self.bmilp = self._generate_and_solve_initial_bmilp() + self.bmilp = self._initialize_new_bmilp() + self.bmilp.solve([]) + solution = self._solution(self.bmilp) solutions = {} add_solution(solutions, solution) @@ -1759,7 +1760,8 @@ def minimal_subdistributions_iterator(self): try: if self.bmilp is None: - self.bmilp = self._generate_and_solve_initial_bmilp() + self.bmilp = self._initialize_new_bmilp() + self.bmilp.solve([]) except MIPSolverException: return s = self._solution(self.bmilp) @@ -1960,11 +1962,12 @@ def add_counter_example_constraint(s): minimal_subdistribution.add_constraint(sum(D[p] for p in P if s[p] == v) == V[v]) - try: - if self.bmilp is None: - self.bmilp = self._generate_and_solve_initial_bmilp() - except MIPSolverException: - return + if self.bmilp is None: + try: + self.bmilp = self._initialize_new_bmilp() + self.bmilp.solve([]) + except MIPSolverException: + return s = self._solution_by_blocks(self.bmilp) add_counter_example_constraint(s) while True: @@ -2362,6 +2365,7 @@ def solutions_iterator(self): sage: iterator2 = bij.solutions_iterator() Generate a solution in iterator1, iterator2 should generate the same solution and vice versa:: + sage: next(iterator1) {'a1': 1, 'a2': 1, @@ -2470,29 +2474,24 @@ def solutions_iterator(self): 'b8': 1, 'd': 0} """ - bmilp = None next_solution = None - try: - if self.bmilp is None: - self.bmilp = self._generate_and_solve_initial_bmilp() - bmilp = self.bmilp - bmilp.solve([], 0) - next_solution = self._solution(bmilp) - except MIPSolverException: - return - - solution_index = 1 + if self.bmilp is None: + try: + self.bmilp = self._initialize_new_bmilp() + except MIPSolverException: + return + bmilp = self.bmilp + solution_index = 0 while True: - yield next_solution - if get_verbose() >= 2: - print("after vetoing") - self._show_bmilp(bmilp, variables=False) try: bmilp.solve([], solution_index) - next_solution = self._solution(bmilp) - solution_index += 1 except MIPSolverException: return + yield self._solution(bmilp) + solution_index += 1 + if get_verbose() >= 2: + print("after vetoing") + self._show_bmilp(bmilp, variables=False) def _solution(self, bmilp): """ @@ -2565,10 +2564,9 @@ def _show_bmilp(self, bmilp, variables=True): print(f" {v}: " + "".join([f"s({a}) = " for a in self._P.root_to_elements_dict()[p]]) + f"{z}") - def _generate_and_solve_initial_bmilp(self): + def _initialize_new_bmilp(self): r""" - Generate a :class:`_BijectionistMILP`, add all relevant constraints - and call :meth:`_BijectionistMILP.solve`. + Initialize a :class:`_BijectionistMILP` and add the current constraints. """ preimage_blocks = self._preprocess_intertwining_relations() self._compute_possible_block_values() @@ -2581,7 +2579,6 @@ def _generate_and_solve_initial_bmilp(self): if get_verbose() >= 2: self._show_bmilp(bmilp) assert n == bmilp.milp.number_of_variables(), "The number of variables increased." - bmilp.solve([]) return bmilp @@ -2605,6 +2602,13 @@ def __init__(self, bijectionist: Bijectionist): it might be cleaner not to pass the full bijectionist instance, but only those attributes we actually use + TESTS:: + + sage: A = B = ["a", "b", "c", "d"] + sage: bij = Bijectionist(A, B) + sage: from sage.combinat.bijectionist import _BijectionistMILP + sage: _BijectionistMILP(bij) + """ # the attributes of the bijectionist class we actually use: # _possible_block_values @@ -2639,7 +2643,72 @@ def solve(self, additional_constraints, solution_index=0): specifying how many of the solutions in the cache should be ignored. + TESTS:: + + sage: A = B = ["a", "b"] + sage: bij = Bijectionist(A, B) + sage: from sage.combinat.bijectionist import _BijectionistMILP + sage: bmilp = _BijectionistMILP(bij) + sage: len(bmilp._solution_cache) + 0 + + Without any constraints, we do not require that the solution is a bijection:: + + sage: bmilp.solve([bmilp._x["a", "a"] == 1, bmilp._x["b", "a"] == 1]) + {('a', 'a'): 1.0, ('a', 'b'): 0.0, ('b', 'a'): 1.0, ('b', 'b'): 0.0} + sage: len(bmilp._solution_cache) + 1 + sage: bmilp.solve([bmilp._x["a", "b"] == 1, bmilp._x["b", "b"] == 1]) + {('a', 'a'): 0.0, ('a', 'b'): 1.0, ('b', 'a'): 0.0, ('b', 'b'): 1.0} + sage: len(bmilp._solution_cache) + 2 + + A more elaborate test:: + + sage: N = 2; A = B = [dyck_word for n in range(N+1) for dyck_word in DyckWords(n)] + sage: tau = lambda D: D.number_of_touch_points() + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_statistics((lambda d: d.semilength(), lambda d: d.semilength())) + sage: bmilp = bij._initialize_new_bmilp() + + Generate a solution:: + + sage: bmilp.solve([]) + {([], 0): 1.0, + ([1, 0], 1): 1.0, + ([1, 0, 1, 0], 1): 0.0, + ([1, 0, 1, 0], 2): 1.0, + ([1, 1, 0, 0], 1): 1.0, + ([1, 1, 0, 0], 2): 0.0} + + Generating a new solution that also maps `1010` to `2` fails: + + sage: bmilp.solve([bmilp._x[DyckWord([1,0,1,0]), 1] <= 0.5], solution_index=1) + Traceback (most recent call last): + ... + MIPSolverException: GLPK: Problem has no feasible solution + + However, searching for a cached solution succeeds, for inequalities and equalities:: + + sage: bmilp.solve([bmilp._x[DyckWord([1,0,1,0]), 1] <= 0.5]) + {([], 0): 1.0, + ([1, 0], 1): 1.0, + ([1, 0, 1, 0], 1): 0.0, + ([1, 0, 1, 0], 2): 1.0, + ([1, 1, 0, 0], 1): 1.0, + ([1, 1, 0, 0], 2): 0.0} + + sage: bmilp.solve([bmilp._x[DyckWord([1,0,1,0]), 1] == 0]) + {([], 0): 1.0, + ([1, 0], 1): 1.0, + ([1, 0, 1, 0], 1): 0.0, + ([1, 0, 1, 0], 2): 1.0, + ([1, 1, 0, 0], 1): 1.0, + ([1, 1, 0, 0], 2): 0.0} + """ + assert 0 <= solution_index <= len(self._solution_cache), "the index of the desired solution must not be larger than the number of known solutions" + if self._n_variables < 0: # initialize at first call self._n_variables = self.milp.number_of_variables() @@ -2964,55 +3033,6 @@ def _non_copying_intersection(sets): """ TESTS:: - ##################### - # caching base test # - ##################### - sage: N = 2; A = B = [dyck_word for n in range(N+1) for dyck_word in DyckWords(n)] - sage: tau = lambda D: D.number_of_touch_points() - sage: bij = Bijectionist(A, B, tau) - sage: bij.set_statistics((lambda d: d.semilength(), lambda d: d.semilength())) - sage: bmilp = bij._generate_and_solve_initial_bmilp() - -Print the generated solution:: - - sage: bmilp.milp.get_values(bmilp._x) - {([], 0): 1.0, - ([1, 0], 1): 1.0, - ([1, 0, 1, 0], 1): 0.0, - ([1, 0, 1, 0], 2): 1.0, - ([1, 1, 0, 0], 1): 1.0, - ([1, 1, 0, 0], 2): 0.0} - -Generating a new solution that also maps `1010` to `2` fails: - - sage: from sage.combinat.bijectionist import _disjoint_set_roots - sage: permutation1010root = list(_disjoint_set_roots(bij._P))[2] - sage: permutation1010root - [1, 0, 1, 0] - sage: bmilp.solve([bmilp._x[permutation1010root, 1] <= 0.5], solution_index=1) - Traceback (most recent call last): - ... - MIPSolverException: GLPK: Problem has no feasible solution - -However, searching for a cached solution succeeds, for inequalities and equalities:: - - sage: bmilp.solve([bmilp._x[permutation1010root, 1] <= 0.5]) - {([], 0): 1.0, - ([1, 0], 1): 1.0, - ([1, 0, 1, 0], 1): 0.0, - ([1, 0, 1, 0], 2): 1.0, - ([1, 1, 0, 0], 1): 1.0, - ([1, 1, 0, 0], 2): 0.0} - - sage: bmilp.solve([bmilp._x[permutation1010root, 1] == 0]) - {([], 0): 1.0, - ([1, 0], 1): 1.0, - ([1, 0, 1, 0], 1): 0.0, - ([1, 0, 1, 0], 2): 1.0, - ([1, 1, 0, 0], 1): 1.0, - ([1, 1, 0, 0], 2): 0.0} - - sage: As = Bs = [[], ....: [(1,i,j) for i in [-1,0,1] for j in [-1,1]], ....: [(2,i,j) for i in [-1,0,1] for j in [-1,1]], @@ -3027,7 +3047,7 @@ def _non_copying_intersection(sets): sage: bij = Bijectionist(sum(As, []), sum(Bs, [])) sage: bij.set_statistics((lambda x: x[0], lambda x: x[0])) sage: bij.set_intertwining_relations((2, c1, c1), (1, c2, c2)) - sage: l = list(bij.solutions_iterator()); len(l) + sage: l = list(bij.solutions_iterator()); len(l) # long time 64 A brute force check would be difficult:: @@ -3055,8 +3075,8 @@ def _non_copying_intersection(sets): sage: A = sum(As, []) sage: respects_c1 = lambda s: all(c1(a1, a2) not in A or s[c1(a1, a2)] == c1(s[a1], s[a2]) for a1 in A for a2 in A) sage: respects_c2 = lambda s: all(c2(a1) not in A or s[c2(a1)] == c2(s[a1]) for a1 in A) - sage: l2 = [s for s in it if respects_c1(s) and respects_c2(s)] - sage: sorted(l1, key=lambda s: tuple(s.items())) == l2 + sage: l2 = [s for s in it if respects_c1(s) and respects_c2(s)] # long time + sage: sorted(l1, key=lambda s: tuple(s.items())) == l2 # long time True Our benchmark example:: @@ -3071,7 +3091,7 @@ def _non_copying_intersection(sets): ....: cycle = Permutation(tuple(range(1, len(p)+1))) ....: return Permutation([cycle.inverse()(p(cycle(i))) for i in range(1, len(p)+1)]) - sage: N=5 + sage: N = 5 sage: As = [list(Permutations(n)) for n in range(N+1)] sage: A = B = sum(As, []) sage: bij = Bijectionist(A, B, gamma) @@ -3103,9 +3123,9 @@ def _non_copying_intersection(sets): ([[2, 1, 5, 3, 4], [2, 5, 1, 3, 4], [3, 1, 5, 2, 4], [3, 5, 1, 2, 4]], [3, 3, 4, 4]) ([[1, 3, 2, 5, 4], [1, 3, 5, 2, 4], [1, 4, 2, 5, 3], [1, 4, 5, 2, 3], [1, 4, 5, 3, 2], [1, 5, 4, 2, 3], [1, 5, 4, 3, 2]], [2, 2, 3, 3, 3, 3, 3]) - sage: l = list(bij.solutions_iterator()); len(l) # long time + sage: l = list(bij.solutions_iterator()); len(l) # long time 504 - sage: for a, d in bij.minimal_subdistributions_iterator(): # long time + sage: for a, d in bij.minimal_subdistributions_iterator(): # long time ....: print(sorted(a), sorted(d)) """ From eca857ebb1c8f29abd4e7afb7f386f98b18584d5 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Thu, 22 Dec 2022 23:25:34 +0100 Subject: [PATCH 237/751] slightly simplify, more doctests --- src/sage/combinat/bijectionist.py | 232 ++++++++++++++---------------- 1 file changed, 108 insertions(+), 124 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 7f3bda41982..26a93072685 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -5,7 +5,7 @@ AUTHORS: - Alexander Grosz, Tobias Kietreiber, Stephan Pfannerer and Martin - Rubey (2020): Initial version + Rubey (2020-2022): Initial version Quick reference =============== @@ -1504,26 +1504,29 @@ def _forced_constant_blocks(self): self.bmilp.solve([]) # generate blockwise preimage to determine which blocks have the same image - solution = self._solution_by_blocks(self.bmilp) + solution = self._solution(self.bmilp, True) multiple_preimages = {(value,): preimages for value, preimages in _invert_dict(solution).items() if len(preimages) > 1} - # check for each pair of blocks if a solution with different values on these block exists - # if yes, use the new solution to update the multiple_preimages dictionary, restart the check + # check for each pair of blocks if a solution with different + # values on these block exists + + # if yes, use the new solution to update the + # multiple_preimages dictionary, restart the check # if no, the two blocks can be joined # _P has to be copied to not mess with the solution-process - # since we do not want to regenerate the bmilp in each step, so blocks - # have to stay consistent during the whole process + # since we do not want to regenerate the bmilp in each step, + # so blocks have to stay consistent during the whole process tmp_P = deepcopy(self._P) updated_preimages = True while updated_preimages: updated_preimages = False - for values in copy(multiple_preimages): # copy to be able to modify dict + for values in copy(multiple_preimages): if updated_preimages: break - for i, j in itertools.combinations(copy(multiple_preimages[values]), r=2): # copy to be able to modify list + for i, j in itertools.combinations(copy(multiple_preimages[values]), r=2): tmp_constraints = [] try: # veto the two blocks having the same value @@ -1533,11 +1536,11 @@ def _forced_constant_blocks(self): self.bmilp.solve(tmp_constraints) # solution exists, update dictionary - solution = self._solution_by_blocks(self.bmilp) + solution = self._solution(self.bmilp, True) updated_multiple_preimages = {} for values in multiple_preimages: for p in multiple_preimages[values]: - solution_tuple = (*values, solution[p]) # tuple so actual solutions were equal in lookup + solution_tuple = (*values, solution[p]) if solution_tuple not in updated_multiple_preimages: updated_multiple_preimages[solution_tuple] = [] updated_multiple_preimages[solution_tuple].append(p) @@ -1547,7 +1550,8 @@ def _forced_constant_blocks(self): except MIPSolverException: # no solution exists, join blocks tmp_P.union(i, j) - if i in multiple_preimages[values] and j in multiple_preimages[values]: # only one of the joined blocks should remain in the list + if i in multiple_preimages[values] and j in multiple_preimages[values]: + # only one of the joined blocks should remain in the list multiple_preimages[values].remove(j) if len(multiple_preimages[values]) == 1: del multiple_preimages[values] @@ -1773,7 +1777,7 @@ def minimal_subdistributions_iterator(self): except MIPSolverException: return d = minimal_subdistribution.get_values(D) # a dict from A to {0, 1} - new_s = self._find_counter_example(self.bmilp, s, d) + new_s = self._find_counter_example(self._A, s, d, False) if new_s is None: values = self._sorter["Z"](s[a] for a in self._A if d[a]) yield ([a for a in self._A if d[a]], values) @@ -1789,31 +1793,35 @@ def minimal_subdistributions_iterator(self): else: s = new_s - def _find_counter_example(self, bmilp, s0, d): + def _find_counter_example(self, P, s0, d, on_blocks): r""" Return a solution `s` such that ``d`` is not a subdistribution of `s0`. - TODO: better name - INPUT: - - ``bmilp``, the mixed linear integer program + - ``P``, the representatives of the blocks, or `A` if + ``on_blocks`` is ``False``. + + - ``s0``, a solution. - - ``s0``, a solution + - ``d``, a subset of `A`, in the form of a dict from `A` to `\{0, 1\}`. + + - ``on_blocks``, whether to return the counter example on + blocks or on elements. - - ``d``, a subset of `A`, in the form of a dict from `A` to `\{0, 1\}` """ + bmilp = self.bmilp for v in self._Z: - v_in_d_count = sum(d[a] for a in self._A if s0[a] == v) + v_in_d_count = sum(d[p] for p in P if s0[p] == v) if not v_in_d_count: continue # try to find a solution which has a different # subdistribution on d than s0 - v_in_d = sum(d[a] * bmilp._x[self._P.find(a), v] - for a in self._A - if v in self._possible_block_values[self._P.find(a)]) + v_in_d = sum(d[p] * bmilp._x[self._P.find(p), v] + for p in P + if v in self._possible_block_values[self._P.find(p)]) # it is sufficient to require that v occurs less often as # a value among {a | d[a] == 1} than it does in @@ -1822,11 +1830,12 @@ def _find_counter_example(self, bmilp, s0, d): tmp_constraints = [v_in_d <= v_in_d_count - 1] try: bmilp.solve(tmp_constraints) - return self._solution(bmilp) + return self._solution(bmilp, on_blocks) except MIPSolverException: pass return + def minimal_subdistributions_blocks_iterator(self): r""" Return all representatives of minimal subsets `\tilde P` @@ -1968,7 +1977,7 @@ def add_counter_example_constraint(s): self.bmilp.solve([]) except MIPSolverException: return - s = self._solution_by_blocks(self.bmilp) + s = self._solution(self.bmilp, True) add_counter_example_constraint(s) while True: try: @@ -1976,7 +1985,7 @@ def add_counter_example_constraint(s): except MIPSolverException: return d = minimal_subdistribution.get_values(D) # a dict from P to multiplicities - new_s = self._find_counter_example2(self.bmilp, P, s, d) + new_s = self._find_counter_example(P, s, d, True) if new_s is None: yield ([p for p in P for _ in range(ZZ(d[p]))], self._sorter["Z"](s[p] @@ -1991,50 +2000,6 @@ def add_counter_example_constraint(s): s = new_s add_counter_example_constraint(s) - def _find_counter_example2(self, bmilp, P, s0, d): - r""" - Return a solution `s` such that ``d`` is not a subdistribution of - `s0`. - - .. TODO:: - - find a better name - possibly not relevant if we - implement the cache of solutions - - INPUT: - - - ``bmilp``, the mixed linear integer program - - - ``P``, the representatives of the blocks - - - ``s0``, a solution - - - ``d``, a subset of `A`, in the form of a dict from `A` to `\{0, 1\}` - - """ - for v in self._Z: - v_in_d_count = sum(d[p] for p in P if s0[p] == v) - if not v_in_d_count: - continue - - # try to find a solution which has a different - # subdistribution on d than s0 - v_in_d = sum(d[p] * bmilp._x[p, v] - for p in P - if v in self._possible_block_values[p]) - - # it is sufficient to require that v occurs less often as - # a value among {a | d[a] == 1} than it does in - # v_in_d_count, because, if the distributions are - # different, one such v must exist - tmp_constraints = [v_in_d <= v_in_d_count - 1] - try: - bmilp.solve(tmp_constraints) - return self._solution_by_blocks(bmilp) - except MIPSolverException: - pass - return - def _preprocess_intertwining_relations(self): r""" Make `self._P` be the finest set partition coarser than `self._P` @@ -2493,34 +2458,30 @@ def solutions_iterator(self): print("after vetoing") self._show_bmilp(bmilp, variables=False) - def _solution(self, bmilp): - """ - Return the bmilp solution as a dictionary from `A` to - `Z`. + def _solution(self, bmilp, on_blocks=False): + r""" + Return the current solution as a dictionary from `A` (or + `P`) to `Z`. - """ - map = {} # A -> Z, a +-> s(a) - for p, block in self._P.root_to_elements_dict().items(): - for z in self._possible_block_values[p]: - if bmilp.has_value(p, z): - for a in block: - map[a] = z - break - return map + INPUT: - def _solution_by_blocks(self, bmilp): - """ - Return the bmilp solution as a dictionary from block - representatives of `P` to `Z`. + - ``bmilp``, a :class:`_BijectionistMILP`. + + - ``on_blocks``, whether to return the solution on blocks or + on all elements """ - map = {} # P -> Z, a +-> s(a) - for p in _disjoint_set_roots(self._P): + mapping = {} # A -> Z or P -> Z, a +-> s(a) + for p, block in self._P.root_to_elements_dict().items(): for z in self._possible_block_values[p]: if bmilp.has_value(p, z): - map[p] = z + if on_blocks: + mapping[p] = z + else: + for a in block: + mapping[a] = z break - return map + return mapping def _show_bmilp(self, bmilp, variables=True): """ @@ -2740,10 +2701,10 @@ def solve(self, additional_constraints, solution_index=0): for constraint in additional_constraints: self.milp.add_constraint(constraint) self.milp.solve() - for _ in range(self.milp.number_of_constraints()-n_constraints): + for _ in range(self.milp.number_of_constraints() - n_constraints): self.milp.remove_constraint(n_constraints) except MIPSolverException as error: - for _ in range(self.milp.number_of_constraints()-n_constraints): + for _ in range(self.milp.number_of_constraints() - n_constraints): self.milp.remove_constraint(n_constraints) raise error @@ -2765,10 +2726,55 @@ def _evaluate_linear_function(self, linear_function, values): dictionary from pairs `(a, z)\in A\times Z` to `0` or `1`, specifying whether `a` is mapped to `z`. + EXAMPLES:: + + sage: A = B = ["a", "b"] + sage: bij = Bijectionist(A, B) + sage: from sage.combinat.bijectionist import _BijectionistMILP + sage: bmilp = _BijectionistMILP(bij) + sage: _ = bmilp.solve([]) + sage: bmilp._index_block_value_dict # random + {0: ('a', 'a'), 1: ('a', 'b'), 2: ('b', 'a'), 3: ('b', 'b')} + sage: f = bmilp._x["a", "a"] + bmilp._x["b", "a"] + sage: v = {('a', 'a'): 1.0, ('a', 'b'): 0.0, ('b', 'a'): 1.0, ('b', 'b'): 0.0} + sage: bmilp._evaluate_linear_function(f, v) + 2.0 """ return float(sum(value * values[self._index_block_value_dict[index]] for index, value in linear_function.dict().items())) + def _veto_current_solution(self): + r""" + Add a constraint vetoing the current solution. + + This adds a constraint such that the next call to + :meth:`solve` must return a solution different from the + current one. + + We require that the MILP currently has a solution. + + .. WARNING:: + + The underlying MILP will be modified! + + ALGORITHM: + + We add the constraint `\sum_{x\in V} x < |V|`` where `V` is + the set of variables `x_{p, z}` with value 1, that is, the + set of variables indicating the current solution. + + """ + # get all variables with value 1 + active_vars = [self._x[p, z] + for p in _disjoint_set_roots(self._bijectionist._P) + for z in self._bijectionist._possible_block_values[p] + if self.milp.get_values(self._x[p, z])] + + # add constraint that not all of these can be 1, thus vetoing + # the current solution + self.milp.add_constraint(sum(active_vars) <= len(active_vars) - 1, + name="veto") + def has_value(self, p, v): r""" Return whether a block is mapped to a value in the last solution @@ -2778,6 +2784,16 @@ def has_value(self, p, v): - ``p``, the representative of a block - ``v``, a value in `Z` + + EXAMPLES:: + + sage: A = B = ["a", "b"] + sage: bij = Bijectionist(A, B) + sage: from sage.combinat.bijectionist import _BijectionistMILP + sage: bmilp = _BijectionistMILP(bij) + sage: _ = bmilp.solve([bmilp._x["a", "b"] == 1]) + sage: bmilp.has_value("a", "b") + True """ return self.last_solution[p, v] == 1 @@ -2924,38 +2940,6 @@ def add_intertwining_relation_constraints(self, origins): self.milp.add_constraint(rhs <= 0, name=f"pi/rho({composition_index})") - def _veto_current_solution(self): - r""" - Add a constraint vetoing the current solution. - - This adds a constraint such that the next call to - :meth:`solve` must return a solution different from the - current one. - - We require that the MILP currently has a solution. - - .. WARNING:: - - The underlying MILP will be modified! - - ALGORITHM: - - We add the constraint `\sum_{x\in V} x < |V|`` where `V` is - the set of variables `x_{p, z}` with value 1, that is, the - set of variables indicating the current solution. - - """ - # get all variables with value 1 - active_vars = [self._x[p, z] - for p in _disjoint_set_roots(self._bijectionist._P) - for z in self._bijectionist._possible_block_values[p] - if self.milp.get_values(self._x[p, z])] - - # add constraint that not all of these can be 1, thus vetoing - # the current solution - self.milp.add_constraint(sum(active_vars) <= len(active_vars) - 1, - name="veto") - def _invert_dict(d): """ From a04d1460832a87550ef18bb1f6767f4240d6230f Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Thu, 22 Dec 2022 23:44:38 +0100 Subject: [PATCH 238/751] doctest _find_counter_example --- src/sage/combinat/bijectionist.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 26a93072685..d8788ce68a9 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -1810,6 +1810,20 @@ def _find_counter_example(self, P, s0, d, on_blocks): - ``on_blocks``, whether to return the counter example on blocks or on elements. + EXAMPLES:: + + sage: A = B = ["a", "b", "c", "d", "e"] + sage: tau = {"a": 1, "b": 1, "c": 2, "d": 2, "e": 3}.get + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_constant_blocks([["a", "b"]]) + sage: bij.set_value_restrictions(("a", [1, 2])) + sage: next(bij.solutions_iterator()) + {'a': 1, 'b': 1, 'c': 2, 'd': 3, 'e': 2} + + sage: s0 = {'a': 1, 'b': 1, 'c': 2, 'd': 3, 'e': 2} + sage: d = {'a': 1, 'b': 0, 'c': 0, 'd': 0, 'e': 0} + sage: bij._find_counter_example(bij._A, s0, d, False) + {'a': 2, 'b': 2, 'c': 1, 'd': 3, 'e': 1} """ bmilp = self.bmilp for v in self._Z: @@ -3107,9 +3121,9 @@ def _non_copying_intersection(sets): ([[2, 1, 5, 3, 4], [2, 5, 1, 3, 4], [3, 1, 5, 2, 4], [3, 5, 1, 2, 4]], [3, 3, 4, 4]) ([[1, 3, 2, 5, 4], [1, 3, 5, 2, 4], [1, 4, 2, 5, 3], [1, 4, 5, 2, 3], [1, 4, 5, 3, 2], [1, 5, 4, 2, 3], [1, 5, 4, 3, 2]], [2, 2, 3, 3, 3, 3, 3]) - sage: l = list(bij.solutions_iterator()); len(l) # long time + sage: l = list(bij.solutions_iterator()); len(l) # not tested 504 - sage: for a, d in bij.minimal_subdistributions_iterator(): # long time + sage: for a, d in bij.minimal_subdistributions_iterator(): # not tested ....: print(sorted(a), sorted(d)) """ From 3508426a9d10c3c904f998cdfe55447c4753cf5c Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Fri, 23 Dec 2022 00:07:50 +0100 Subject: [PATCH 239/751] doctest add_distribution_constraints and add_intertwing_relation_constraints --- src/sage/combinat/bijectionist.py | 46 +++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index d8788ce68a9..568ceca83cd 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -2825,6 +2825,17 @@ def add_alpha_beta_constraints(self): as a matrix equation. + EXAMPLES:: + + sage: A = B = [permutation for n in range(3) for permutation in Permutations(n)] + sage: bij = Bijectionist(A, B, len) + sage: bij.set_statistics((len, len)) + sage: bij._compute_possible_block_values() + sage: from sage.combinat.bijectionist import _BijectionistMILP + sage: bmilp = _BijectionistMILP(bij) + sage: bmilp.add_alpha_beta_constraints() + sage: bmilp.solve([]) + {([], 0): 1.0, ([1], 1): 1.0, ([1, 2], 2): 1.0, ([2, 1], 2): 1.0} """ W = self._bijectionist._W Z = self._bijectionist._Z @@ -2871,6 +2882,25 @@ def add_distribution_constraints(self): where `p(a)` is the block containing `a`, for each given distribution as a vector equation. + EXAMPLES:: + + sage: A = B = Permutations(3) + sage: tau = Permutation.longest_increasing_subsequence_length + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_distributions(([Permutation([1, 2, 3]), Permutation([1, 3, 2])], [1, 3])) + sage: bij._compute_possible_block_values() + sage: from sage.combinat.bijectionist import _BijectionistMILP + sage: bmilp = _BijectionistMILP(bij) + sage: bmilp.add_distribution_constraints() + sage: _ = bmilp.solve([]) + sage: bij._solution(bmilp) + {[1, 2, 3]: 3, + [1, 3, 2]: 1, + [2, 1, 3]: 3, + [2, 3, 1]: 3, + [3, 1, 2]: 3, + [3, 2, 1]: 3} + """ Z = self._bijectionist._Z Z_dict = {z: i for i, z in enumerate(Z)} @@ -2935,6 +2965,22 @@ def add_intertwining_relation_constraints(self, origins): Note that `z` must be a possible value of `p` and each `z_i` must be a possible value of `p_i`. + + EXAMPLES:: + + sage: A = B = list('abcd') + sage: bij = Bijectionist(A, B, lambda x: B.index(x) % 2) + sage: pi = lambda p1, p2: 'abcdefgh'[A.index(p1) + A.index(p2)] + sage: rho = lambda s1, s2: (s1 + s2) % 2 + sage: bij.set_intertwining_relations((2, pi, rho)) + sage: preimage_blocks = bij._preprocess_intertwining_relations() + sage: bij._compute_possible_block_values() + sage: from sage.combinat.bijectionist import _BijectionistMILP + sage: bmilp = _BijectionistMILP(bij) + sage: bmilp.add_intertwining_relation_constraints(preimage_blocks) + sage: _ = bmilp.solve([]) + sage: bij._solution(bmilp) + {'a': 0, 'b': 1, 'c': 0, 'd': 1} """ for composition_index, image_block, preimage_blocks in origins: pi_rho = self._bijectionist._pi_rho[composition_index] From 0ac618c968e976d19fd2c61c2462611ce8f0cc3d Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Fri, 23 Dec 2022 00:37:46 +0100 Subject: [PATCH 240/751] doctest _preprocess_intertwining_relations, _solution, _show_bmilp, _initialize_new_bmilp, _veto_current_solution --- src/sage/combinat/bijectionist.py | 146 +++++++++++++++++++++++------- 1 file changed, 112 insertions(+), 34 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 568ceca83cd..e1aaf010ea2 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -495,7 +495,7 @@ def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], pi_rho=tuple(), ele assert len(A) == len(set(A)), "A must have distinct items" assert len(B) == len(set(B)), "B must have distinct items" - self.bmilp = None + self._bmilp = None self._A = A self._B = B self._sorter = {} @@ -588,7 +588,7 @@ def set_constant_blocks(self, P): MIPSolverException: ... """ - self.bmilp = None + self._bmilp = None self._P = DisjointSet(self._A) P = sorted(self._sorter["A"](p) for p in P) for p in P: @@ -720,7 +720,7 @@ def set_statistics(self, *alpha_beta): {[]: 2, [1]: 1, [1, 2]: 0, [2, 1]: 0} """ - self.bmilp = None + self._bmilp = None self._n_statistics = len(alpha_beta) # TODO: do we really want to recompute statistics every time? self._alpha = lambda p: tuple(arg[0](p) for arg in alpha_beta) @@ -1035,7 +1035,7 @@ def set_value_restrictions(self, *a_values): # of _statistics_possible_values - however, we do not want to # insist that set_value_restrictions is called after # set_statistics - self.bmilp = None + self._bmilp = None set_Z = set(self._Z) self._restrictions_possible_values = {a: set_Z for a in self._A} for a, values in a_values: @@ -1216,7 +1216,7 @@ def set_distributions(self, *elements_distributions): not in `A`. """ - self.bmilp = None + self._bmilp = None for elements, values in elements_distributions: assert len(elements) == len(values), f"{elements} and {values} are not of the same size!" for a, z in zip(elements, values): @@ -1312,7 +1312,7 @@ def set_intertwining_relations(self, *pi_rho): [] """ - self.bmilp = None + self._bmilp = None Pi_Rho = namedtuple("Pi_Rho", "numargs pi rho domain") self._pi_rho = [] @@ -1354,7 +1354,7 @@ def _forced_constant_blocks(self): sage: bij = Bijectionist(A, B, lambda x: 0) sage: bij.constant_blocks() {} - sage: bij.constant_blocks(optimal=True) + sage: bij.constant_blocks(optimal=True) # indirect doctest {{[], [1], [1, 2], [2, 1]}} In this other example we look at permutations with length 2 and 3:: @@ -1499,12 +1499,12 @@ def _forced_constant_blocks(self): {{'a', 'b'}, {'c', 'd'}} """ - if self.bmilp is None: - self.bmilp = self._initialize_new_bmilp() - self.bmilp.solve([]) + if self._bmilp is None: + self._bmilp = self._initialize_new_bmilp() + self._bmilp.solve([]) # generate blockwise preimage to determine which blocks have the same image - solution = self._solution(self.bmilp, True) + solution = self._solution(self._bmilp, True) multiple_preimages = {(value,): preimages for value, preimages in _invert_dict(solution).items() if len(preimages) > 1} @@ -1532,11 +1532,11 @@ def _forced_constant_blocks(self): # veto the two blocks having the same value for z in self._possible_block_values[i]: if z in self._possible_block_values[j]: # intersection - tmp_constraints.append(self.bmilp._x[i, z] + self.bmilp._x[j, z] <= 1) - self.bmilp.solve(tmp_constraints) + tmp_constraints.append(self._bmilp._x[i, z] + self._bmilp._x[j, z] <= 1) + self._bmilp.solve(tmp_constraints) # solution exists, update dictionary - solution = self._solution(self.bmilp, True) + solution = self._solution(self._bmilp, True) updated_multiple_preimages = {} for values in multiple_preimages: for p in multiple_preimages[values]: @@ -1670,11 +1670,11 @@ def add_solution(solutions, solution): solutions[p].add(value) # generate initial solution, solution dict and add solution - if self.bmilp is None: - self.bmilp = self._initialize_new_bmilp() - self.bmilp.solve([]) + if self._bmilp is None: + self._bmilp = self._initialize_new_bmilp() + self._bmilp.solve([]) - solution = self._solution(self.bmilp) + solution = self._solution(self._bmilp) solutions = {} add_solution(solutions, solution) @@ -1682,15 +1682,15 @@ def add_solution(solutions, solution): for p in blocks: tmp_constraints = [] for value in solutions[p]: - tmp_constraints.append(self.bmilp._x[p, value] == 0) + tmp_constraints.append(self._bmilp._x[p, value] == 0) while True: try: # problem has a solution, so new value was found - self.bmilp.solve(tmp_constraints) - solution = self._solution(self.bmilp) + self._bmilp.solve(tmp_constraints) + solution = self._solution(self._bmilp) add_solution(solutions, solution) # veto new value and try again - tmp_constraints.append(self.bmilp._x[p, solution[p]] == 0) + tmp_constraints.append(self._bmilp._x[p, solution[p]] == 0) except MIPSolverException: # no solution, so all possible values have been found break @@ -1763,12 +1763,12 @@ def minimal_subdistributions_iterator(self): minimal_subdistribution.add_constraint(sum(D[a] for a in self._A) >= 1) try: - if self.bmilp is None: - self.bmilp = self._initialize_new_bmilp() - self.bmilp.solve([]) + if self._bmilp is None: + self._bmilp = self._initialize_new_bmilp() + self._bmilp.solve([]) except MIPSolverException: return - s = self._solution(self.bmilp) + s = self._solution(self._bmilp) while True: for v in self._Z: minimal_subdistribution.add_constraint(sum(D[a] for a in self._A if s[a] == v) == V[v]) @@ -1825,7 +1825,7 @@ def _find_counter_example(self, P, s0, d, on_blocks): sage: bij._find_counter_example(bij._A, s0, d, False) {'a': 2, 'b': 2, 'c': 1, 'd': 3, 'e': 1} """ - bmilp = self.bmilp + bmilp = self._bmilp for v in self._Z: v_in_d_count = sum(d[p] for p in P if s0[p] == v) if not v_in_d_count: @@ -1985,13 +1985,13 @@ def add_counter_example_constraint(s): minimal_subdistribution.add_constraint(sum(D[p] for p in P if s[p] == v) == V[v]) - if self.bmilp is None: + if self._bmilp is None: try: - self.bmilp = self._initialize_new_bmilp() - self.bmilp.solve([]) + self._bmilp = self._initialize_new_bmilp() + self._bmilp.solve([]) except MIPSolverException: return - s = self._solution(self.bmilp, True) + s = self._solution(self._bmilp, True) add_counter_example_constraint(s) while True: try: @@ -2051,6 +2051,24 @@ def _preprocess_intertwining_relations(self): untangle side effect and return value if possible + EXAMPLES:: + + sage: A = B = list('abcd') + sage: bij = Bijectionist(A, B, lambda x: B.index(x) % 2) + sage: pi = lambda p1, p2: 'abcdefgh'[A.index(p1) + A.index(p2)] + sage: rho = lambda s1, s2: (s1 + s2) % 2 + sage: bij.set_intertwining_relations((2, pi, rho)) + sage: bij._preprocess_intertwining_relations() + {(0, 'a', ('a', 'a')), + (0, 'b', ('a', 'b')), + (0, 'b', ('b', 'a')), + (0, 'c', ('a', 'c')), + (0, 'c', ('b', 'b')), + (0, 'c', ('c', 'a')), + (0, 'd', ('a', 'd')), + (0, 'd', ('b', 'c')), + (0, 'd', ('c', 'b')), + (0, 'd', ('d', 'a'))} """ images = {} # A^k -> A, a_1,...,a_k to pi(a_1,...,a_k), for all pi origins_by_elements = [] # (pi/rho, pi(a_1,...,a_k), a_1,...,a_k) @@ -2454,12 +2472,12 @@ def solutions_iterator(self): 'd': 0} """ next_solution = None - if self.bmilp is None: + if self._bmilp is None: try: - self.bmilp = self._initialize_new_bmilp() + self._bmilp = self._initialize_new_bmilp() except MIPSolverException: return - bmilp = self.bmilp + bmilp = self._bmilp solution_index = 0 while True: try: @@ -2484,6 +2502,16 @@ def _solution(self, bmilp, on_blocks=False): - ``on_blocks``, whether to return the solution on blocks or on all elements + EXAMPLES:: + + sage: A = B = ["a", "b", "c"] + sage: bij = Bijectionist(A, B, lambda x: 0) + sage: bij.set_constant_blocks([["a", "b"]]) + sage: next(bij.solutions_iterator()) + {'a': 0, 'b': 0, 'c': 0} + sage: bij._solution(bij._bmilp, True) + {'a': 0, 'c': 0} + """ mapping = {} # A -> Z or P -> Z, a +-> s(a) for p, block in self._P.root_to_elements_dict().items(): @@ -2502,6 +2530,26 @@ def _show_bmilp(self, bmilp, variables=True): Print the constraints and variables of the current MILP together with some explanations. + + EXAMPLES:: + + sage: A = B = ["a", "b", "c"] + sage: bij = Bijectionist(A, B, lambda x: A.index(x) % 2) + sage: bij.set_constant_blocks([["a", "b"]]) + sage: next(bij.solutions_iterator()) + {'a': 0, 'b': 0, 'c': 1} + sage: bij._show_bmilp(bij._bmilp) + Constraints are: + block a: 1 <= x_0 + x_1 <= 1 + block c: 1 <= x_2 + x_3 <= 1 + statistics: 2 <= 2 x_0 + x_2 <= 2 + statistics: 1 <= 2 x_1 + x_3 <= 1 + veto: x_0 + x_3 <= 1 + Variables are: + x_0: s(a) = s(b) = 0 + x_1: s(a) = s(b) = 1 + x_2: s(c) = 0 + x_3: s(c) = 1 """ print("Constraints are:") b = bmilp.milp.get_backend() @@ -2542,6 +2590,16 @@ def _show_bmilp(self, bmilp, variables=True): def _initialize_new_bmilp(self): r""" Initialize a :class:`_BijectionistMILP` and add the current constraints. + + EXAMPLES:: + + sage: A = B = list('abcd') + sage: bij = Bijectionist(A, B, lambda x: B.index(x) % 2) + sage: pi = lambda p1, p2: 'abcdefgh'[A.index(p1) + A.index(p2)] + sage: rho = lambda s1, s2: (s1 + s2) % 2 + sage: bij.set_intertwining_relations((2, pi, rho)) + sage: bij._initialize_new_bmilp() + """ preimage_blocks = self._preprocess_intertwining_relations() self._compute_possible_block_values() @@ -2777,6 +2835,26 @@ def _veto_current_solution(self): the set of variables `x_{p, z}` with value 1, that is, the set of variables indicating the current solution. + EXAMPLES:: + + sage: A = B = ["a", "b", "c"] + sage: bij = Bijectionist(A, B, lambda x: A.index(x) % 2) + sage: bij.set_constant_blocks([["a", "b"]]) + sage: iter = bij.solutions_iterator() + sage: next(iter) # indirect doctest + {'a': 0, 'b': 0, 'c': 1} + sage: bij._show_bmilp(bij._bmilp) + Constraints are: + block a: 1 <= x_0 + x_1 <= 1 + block c: 1 <= x_2 + x_3 <= 1 + statistics: 2 <= 2 x_0 + x_2 <= 2 + statistics: 1 <= 2 x_1 + x_3 <= 1 + veto: x_0 + x_3 <= 1 + Variables are: + x_0: s(a) = s(b) = 0 + x_1: s(a) = s(b) = 1 + x_2: s(c) = 0 + x_3: s(c) = 1 """ # get all variables with value 1 active_vars = [self._x[p, z] From d50b62c2008a96849f99004a4c2ad883fab7d0f2 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Fri, 23 Dec 2022 09:59:31 +0100 Subject: [PATCH 241/751] expand docstring of main class --- src/sage/combinat/bijectionist.py | 41 ++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index e1aaf010ea2..c1e55b42852 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -329,10 +329,12 @@ {[]: 0, [1]: 1, [1, 2]: 0, [2, 1]: 2, [1, 2, 3]: 1, [1, 3, 2]: 1, [2, 1, 3]: 1, [2, 3, 1]: 0, [3, 1, 2]: 3, [3, 2, 1]: 0} Value restrictions:: + sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] sage: tau = Permutation.longest_increasing_subsequence_length - sage: bij = Bijectionist(A, B, tau, alpha_beta=((len, len),), a_values=((Permutation([1, 2]), [1]), - ....: (Permutation([3, 2, 1]), [2, 3, 4]),)) + sage: alpha_beta = [(len, len)] + sage: value_restrictions = [(Permutation([1, 2]), [1]), (Permutation([3, 2, 1]), [2, 3, 4])] + sage: bij = Bijectionist(A, B, tau, alpha_beta=alpha_beta, value_restrictions=value_restrictions) sage: for sol in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): ....: print(sol) {[]: 0, [1]: 1, [1, 2]: 1, [2, 1]: 2, [1, 2, 3]: 1, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 3} @@ -341,7 +343,7 @@ sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] sage: tau = Permutation.longest_increasing_subsequence_length - sage: bij = Bijectionist(A, B, tau, a_values=((Permutation([1, 2]), [4, 5]),)) + sage: bij = Bijectionist(A, B, tau, value_restrictions=((Permutation([1, 2]), [4, 5]),)) Traceback (most recent call last): ... ValueError: No possible values found for singleton block [[1, 2]] @@ -380,8 +382,8 @@ class Bijectionist(SageObject): r""" - A toolbox to list all possible bijections between two finite sets - under various constraints. + A toolbox to list all possible bijections between two finite + sets under various constraints. INPUT: @@ -391,13 +393,13 @@ class Bijectionist(SageObject): to ``Z``, in case of ``None``, the identity map ``lambda x: x`` is used - - ``alpha`` (optional) -- a statistic from ``A`` to ``W`` - - - ``beta`` (optional) -- a statistic from ``B`` to ``W`` + - ``alpha_beta`` (optional) -- a list of pairs of statistics + ``alpha`` from ``A`` to ``W`` and ``beta`` from ``B`` to ``W`` - ``P`` (optional) -- a partition of ``A`` - - ``pi_rho`` (optional) -- a triple ``(k, pi, rho)`` where + - ``pi_rho`` (optional) -- a list of triples ``(k, pi, rho)`` + where - ``pi`` is a ``k``-ary operation composing objects in ``A`` and @@ -405,6 +407,15 @@ class Bijectionist(SageObject): - ``rho`` is a ``k``-ary function composing statistic values in `Z` + - ``elements_distributions`` (optional) -- a list of pairs ``(tA, + tZ)``, specifying the distributions of ``tA`` + + - ``value_restrictions`` (optional) -- a list of pairs ``(a, + tZ)``, restricting the possible values of ``a`` + + - ``solver`` (optional) -- the backend used to solve the mixed + integer linear programs + ``W`` and ``Z`` can be arbitrary sets. As a natural example we may think of the natural numbers or tuples of integers. @@ -470,7 +481,9 @@ class Bijectionist(SageObject): specification. """ - def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], pi_rho=tuple(), elements_distributions=tuple(), a_values=tuple(), solver=None, key=None): + def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], + pi_rho=tuple(), elements_distributions=tuple(), + value_restrictions=tuple(), solver=None, key=None): """ Initialize the bijectionist. @@ -521,7 +534,7 @@ def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], pi_rho=tuple(), ele # set optional inputs self.set_statistics(*alpha_beta) - self.set_value_restrictions(*a_values) + self.set_value_restrictions(*value_restrictions) self.set_distributions(*elements_distributions) self.set_intertwining_relations(*pi_rho) self.set_constant_blocks(P) @@ -940,7 +953,7 @@ def statistics_table(self, header=True): return output_alphas, output_tau_betas - def set_value_restrictions(self, *a_values): + def set_value_restrictions(self, *value_restrictions): r""" Restrict the set of possible values `s(a)` for a given element `a`. @@ -952,7 +965,7 @@ def set_value_restrictions(self, *a_values): INPUT: - - ``a_values`` -- one or more pairs `(a\in A, \tilde + - ``value_restrictions`` -- one or more pairs `(a\in A, \tilde Z\subseteq Z)` EXAMPLES: @@ -1038,7 +1051,7 @@ def set_value_restrictions(self, *a_values): self._bmilp = None set_Z = set(self._Z) self._restrictions_possible_values = {a: set_Z for a in self._A} - for a, values in a_values: + for a, values in value_restrictions: assert a in self._A, f"Element {a} was not found in A" self._restrictions_possible_values[a] = self._restrictions_possible_values[a].intersection(values) From 288e3917aaa8a2d56ec45c2137c5f4889842488e Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Fri, 23 Dec 2022 16:27:43 +0100 Subject: [PATCH 242/751] copy milp instead of adding and removing constraints --- src/sage/combinat/bijectionist.py | 42 +++++++++++-------------------- 1 file changed, 14 insertions(+), 28 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index c1e55b42852..2d9b74eda86 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -156,7 +156,7 @@ sage: bij = Bijectionist(A, B) sage: bij.set_intertwining_relations((2, concat_path, concat_tree)) sage: bij.set_statistics((lambda d: d.semilength(), lambda t: t.node_number())) - sage: for D in bij.minimal_subdistributions_iterator(): + sage: for D in sorted(bij.minimal_subdistributions_iterator(), key=lambda x: (len(x[0][0]), x)): ....: ascii_art(D) ( [ /\ ], [ o ] ) ( [ o ] ) @@ -376,9 +376,6 @@ from copy import copy, deepcopy from sage.misc.verbose import get_verbose -# TODO: (low) we frequently need variable names for subsets of A, B, -# Z. In LaTeX, we mostly call them \tilde A, \tilde Z, etc. now. It -# would be good to have a standard name in code, too. class Bijectionist(SageObject): r""" @@ -496,8 +493,8 @@ def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], """ # glossary of standard letters: # A, B, Z, W ... finite sets - # ???? tilde_A, tilde_Z, ..., subsets? # P ... set partition of A + # tA, tB, tZ, tP ... subsets # a in A, b in B, p in P # S: A -> B # alpha: A -> W, beta: B -> W @@ -505,7 +502,6 @@ def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], # k arity of pi and rho # pi: A^k -> A, rho: Z^k -> Z # a_tuple in A^k - assert len(A) == len(set(A)), "A must have distinct items" assert len(B) == len(set(B)), "B must have distinct items" self._bmilp = None @@ -1230,14 +1226,14 @@ def set_distributions(self, *elements_distributions): """ self._bmilp = None - for elements, values in elements_distributions: - assert len(elements) == len(values), f"{elements} and {values} are not of the same size!" - for a, z in zip(elements, values): + for tA, tZ in elements_distributions: + assert len(tA) == len(tZ), f"{elements} and {values} are not of the same size!" + for a, z in zip(tA, tZ): if a not in self._A: raise ValueError(f"Element {a} was not found in A!") if z not in self._Z: raise ValueError(f"Value {z} was not found in tau(A)!") - self._elements_distributions = elements_distributions + self._elements_distributions = tuple(elements_distributions) def set_intertwining_relations(self, *pi_rho): r""" @@ -1862,7 +1858,6 @@ def _find_counter_example(self, P, s0, d, on_blocks): pass return - def minimal_subdistributions_blocks_iterator(self): r""" Return all representatives of minimal subsets `\tilde P` @@ -2547,7 +2542,7 @@ def _show_bmilp(self, bmilp, variables=True): EXAMPLES:: sage: A = B = ["a", "b", "c"] - sage: bij = Bijectionist(A, B, lambda x: A.index(x) % 2) + sage: bij = Bijectionist(A, B, lambda x: A.index(x) % 2, solver="GLPK") sage: bij.set_constant_blocks([["a", "b"]]) sage: next(bij.solutions_iterator()) {'a': 0, 'b': 0, 'c': 1} @@ -2732,7 +2727,7 @@ def solve(self, additional_constraints, solution_index=0): sage: bmilp.solve([bmilp._x[DyckWord([1,0,1,0]), 1] <= 0.5], solution_index=1) Traceback (most recent call last): ... - MIPSolverException: GLPK: Problem has no feasible solution + MIPSolverException: ... no feasible solution However, searching for a cached solution succeeds, for inequalities and equalities:: @@ -2780,20 +2775,11 @@ def solve(self, additional_constraints, solution_index=0): return self.last_solution # otherwise generate a new one - try: - # TODO: wouldn't it be safer to copy the milp? - n_constraints = self.milp.number_of_constraints() - for constraint in additional_constraints: - self.milp.add_constraint(constraint) - self.milp.solve() - for _ in range(self.milp.number_of_constraints() - n_constraints): - self.milp.remove_constraint(n_constraints) - except MIPSolverException as error: - for _ in range(self.milp.number_of_constraints() - n_constraints): - self.milp.remove_constraint(n_constraints) - raise error - - self.last_solution = self.milp.get_values(self._x) + tmp_milp = deepcopy(self.milp) + for constraint in additional_constraints: + tmp_milp.add_constraint(constraint) + tmp_milp.solve() + self.last_solution = tmp_milp.get_values(self._x.copy_for_mip(tmp_milp)) self._solution_cache.append(self.last_solution) self._veto_current_solution() return self.last_solution @@ -2873,7 +2859,7 @@ def _veto_current_solution(self): active_vars = [self._x[p, z] for p in _disjoint_set_roots(self._bijectionist._P) for z in self._bijectionist._possible_block_values[p] - if self.milp.get_values(self._x[p, z])] + if self.last_solution[(p, z)]] # add constraint that not all of these can be 1, thus vetoing # the current solution From d57c8e5295144152214c870f3a206ab0dc5a7716 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Fri, 23 Dec 2022 17:21:48 +0100 Subject: [PATCH 243/751] derandomize a test, mark example as random --- src/sage/combinat/bijectionist.py | 125 +++++------------------------- 1 file changed, 21 insertions(+), 104 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 2d9b74eda86..cd6fa9b3c94 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -1950,7 +1950,7 @@ def minimal_subdistributions_blocks_iterator(self): [1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1], [1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1]] - sage: sorted(bij.minimal_subdistributions_blocks_iterator()) + sage: sorted(bij.minimal_subdistributions_blocks_iterator()) # random [(['a1', 'a2', 'a3', 'a4', 'a5', 'a5', 'a6', 'a6', 'a7', 'a7', 'a8', 'a8'], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1]), (['a3', 'a4', 'd'], [0, 0, 1]), @@ -2371,113 +2371,30 @@ def solutions_iterator(self): Generate a solution in iterator1, iterator2 should generate the same solution and vice versa:: - sage: next(iterator1) - {'a1': 1, - 'a2': 1, - 'a3': 0, - 'a4': 0, - 'a5': 0, - 'a6': 1, - 'a7': 0, - 'a8': 0, - 'b3': 0, - 'b4': 0, - 'b5': 0, - 'b6': 1, - 'b7': 0, - 'b8': 0, - 'd': 1} - - sage: next(iterator2) - {'a1': 1, - 'a2': 1, - 'a3': 0, - 'a4': 0, - 'a5': 0, - 'a6': 1, - 'a7': 0, - 'a8': 0, - 'b3': 0, - 'b4': 0, - 'b5': 0, - 'b6': 1, - 'b7': 0, - 'b8': 0, - 'd': 1} - - sage: next(iterator2) - {'a1': 1, - 'a2': 1, - 'a3': 0, - 'a4': 0, - 'a5': 1, - 'a6': 0, - 'a7': 0, - 'a8': 0, - 'b3': 0, - 'b4': 0, - 'b5': 1, - 'b6': 0, - 'b7': 0, - 'b8': 0, - 'd': 1} - - sage: next(iterator1) - {'a1': 1, - 'a2': 1, - 'a3': 0, - 'a4': 0, - 'a5': 1, - 'a6': 0, - 'a7': 0, - 'a8': 0, - 'b3': 0, - 'b4': 0, - 'b5': 1, - 'b6': 0, - 'b7': 0, - 'b8': 0, - 'd': 1} - - Re-setting the distribution resets the cache, so a new iterator will generate the first solutions again, - but the old iterator continues:: + sage: s1_1 = next(iterator1) + sage: s2_1 = next(iterator2) + sage: s1_1 == s2_1 + True + sage: s2_2 = next(iterator2) + sage: s1_2 = next(iterator1) + sage: s1_2 == s2_2 + True + + Re-setting the distribution resets the cache, so a new + iterator will generate the first solutions again, but the old + iterator continues:: sage: bij.set_distributions((A[:8] + A[8+2:-1], d), (A[:8] + A[8:-3], d)) sage: iterator3 = bij.solutions_iterator() - sage: next(iterator3) - {'a1': 1, - 'a2': 1, - 'a3': 0, - 'a4': 0, - 'a5': 0, - 'a6': 1, - 'a7': 0, - 'a8': 0, - 'b3': 0, - 'b4': 0, - 'b5': 0, - 'b6': 1, - 'b7': 0, - 'b8': 0, - 'd': 1} - - sage: next(iterator1) - {'a1': 0, - 'a2': 1, - 'a3': 0, - 'a4': 1, - 'a5': 0, - 'a6': 0, - 'a7': 0, - 'a8': 1, - 'b3': 0, - 'b4': 1, - 'b5': 0, - 'b6': 0, - 'b7': 0, - 'b8': 1, - 'd': 0} + sage: s3_1 = next(iterator3) + sage: s1_1 == s3_1 + True + + sage: s1_3 = next(iterator1) + sage: len(set([tuple(sorted(s.items())) for s in [s1_1, s1_2, s1_3]])) + 3 + """ next_solution = None if self._bmilp is None: From 7353fb523075c798dd3afe2cd57108b88909c94a Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Fri, 23 Dec 2022 22:40:49 +0100 Subject: [PATCH 244/751] correct typo, remove useless assignment --- src/sage/combinat/bijectionist.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index cd6fa9b3c94..b9b1bf7e98f 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -1227,7 +1227,7 @@ def set_distributions(self, *elements_distributions): """ self._bmilp = None for tA, tZ in elements_distributions: - assert len(tA) == len(tZ), f"{elements} and {values} are not of the same size!" + assert len(tA) == len(tZ), f"{tA} and {tZ} are not of the same size!" for a, z in zip(tA, tZ): if a not in self._A: raise ValueError(f"Element {a} was not found in A!") @@ -2396,7 +2396,6 @@ def solutions_iterator(self): 3 """ - next_solution = None if self._bmilp is None: try: self._bmilp = self._initialize_new_bmilp() From db850f00bdcea2011ed9194de177fbcbcc8b93d1 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Fri, 23 Dec 2022 23:35:42 +0100 Subject: [PATCH 245/751] add and remove constraints instead of copying the whole program --- src/sage/combinat/bijectionist.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index b9b1bf7e98f..26418062876 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -2691,10 +2691,26 @@ def solve(self, additional_constraints, solution_index=0): return self.last_solution # otherwise generate a new one - tmp_milp = deepcopy(self.milp) + # set copy = True if the solver requires us to copy the program and throw it away again + copy = False + if copy: + tmp_milp = deepcopy(self.milp) + else: + tmp_milp = self.milp + for constraint in additional_constraints: tmp_milp.add_constraint(constraint) - tmp_milp.solve() + + if copy: + tmp_milp.solve() + else: + n = tmp_milp.number_of_constraints() - 1 + try: + tmp_milp.solve() + finally: + for i in range(len(additional_constraints)): + tmp_milp.remove_constraint(n - i) + self.last_solution = tmp_milp.get_values(self._x.copy_for_mip(tmp_milp)) self._solution_cache.append(self.last_solution) self._veto_current_solution() From ec3271c0e0d79727e2f5f80867bcb253eb6a639e Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Sat, 24 Dec 2022 00:00:37 +0100 Subject: [PATCH 246/751] fix problem with SCIP, add timings --- src/sage/combinat/bijectionist.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 26418062876..4bcd34fda8d 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -2707,11 +2707,11 @@ def solve(self, additional_constraints, solution_index=0): n = tmp_milp.number_of_constraints() - 1 try: tmp_milp.solve() + self.last_solution = tmp_milp.get_values(self._x.copy_for_mip(tmp_milp)) finally: for i in range(len(additional_constraints)): tmp_milp.remove_constraint(n - i) - self.last_solution = tmp_milp.get_values(self._x.copy_for_mip(tmp_milp)) self._solution_cache.append(self.last_solution) self._veto_current_solution() return self.last_solution @@ -3100,7 +3100,7 @@ def _non_copying_intersection(sets): sage: bij = Bijectionist(sum(As, []), sum(Bs, [])) sage: bij.set_statistics((lambda x: x[0], lambda x: x[0])) sage: bij.set_intertwining_relations((2, c1, c1), (1, c2, c2)) - sage: l = list(bij.solutions_iterator()); len(l) # long time + sage: l = list(bij.solutions_iterator()); len(l) # long time -- (2.7 seconds with SCIP on AMD Ryzen 5 PRO 3500U w/ Radeon Vega Mobile Gfx) 64 A brute force check would be difficult:: @@ -3128,7 +3128,7 @@ def _non_copying_intersection(sets): sage: A = sum(As, []) sage: respects_c1 = lambda s: all(c1(a1, a2) not in A or s[c1(a1, a2)] == c1(s[a1], s[a2]) for a1 in A for a2 in A) sage: respects_c2 = lambda s: all(c2(a1) not in A or s[c2(a1)] == c2(s[a1]) for a1 in A) - sage: l2 = [s for s in it if respects_c1(s) and respects_c2(s)] # long time + sage: l2 = [s for s in it if respects_c1(s) and respects_c2(s)] # long time -- (17 seconds with SCIP on AMD Ryzen 5 PRO 3500U w/ Radeon Vega Mobile Gfx) sage: sorted(l1, key=lambda s: tuple(s.items())) == l2 # long time True @@ -3176,7 +3176,7 @@ def _non_copying_intersection(sets): ([[2, 1, 5, 3, 4], [2, 5, 1, 3, 4], [3, 1, 5, 2, 4], [3, 5, 1, 2, 4]], [3, 3, 4, 4]) ([[1, 3, 2, 5, 4], [1, 3, 5, 2, 4], [1, 4, 2, 5, 3], [1, 4, 5, 2, 3], [1, 4, 5, 3, 2], [1, 5, 4, 2, 3], [1, 5, 4, 3, 2]], [2, 2, 3, 3, 3, 3, 3]) - sage: l = list(bij.solutions_iterator()); len(l) # not tested + sage: l = list(bij.solutions_iterator()); len(l) # not tested -- (17 seconds with SCIP on AMD Ryzen 5 PRO 3500U w/ Radeon Vega Mobile Gfx) 504 sage: for a, d in bij.minimal_subdistributions_iterator(): # not tested From dfdc6bacdcdbc2198fd62b96167aedc3bf94e1de Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Sat, 24 Dec 2022 14:58:35 +0100 Subject: [PATCH 247/751] use convert for MixedIntegerLinearProgram.get_values --- src/sage/combinat/bijectionist.py | 51 ++++++++++++++++--------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 4bcd34fda8d..e33c6602f06 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -1785,7 +1785,7 @@ def minimal_subdistributions_iterator(self): minimal_subdistribution.solve() except MIPSolverException: return - d = minimal_subdistribution.get_values(D) # a dict from A to {0, 1} + d = minimal_subdistribution.get_values(D, convert=bool, tolerance=0.1) # a dict from A to {0, 1} new_s = self._find_counter_example(self._A, s, d, False) if new_s is None: values = self._sorter["Z"](s[a] for a in self._A if d[a]) @@ -1793,7 +1793,7 @@ def minimal_subdistributions_iterator(self): # get all variables with value 1 active_vars = [D[a] for a in self._A - if minimal_subdistribution.get_values(D[a])] + if minimal_subdistribution.get_values(D[a], convert=bool, tolerance=0.1)] # add constraint that not all of these can be 1, thus vetoing # the current solution @@ -2006,7 +2006,7 @@ def add_counter_example_constraint(s): minimal_subdistribution.solve() except MIPSolverException: return - d = minimal_subdistribution.get_values(D) # a dict from P to multiplicities + d = minimal_subdistribution.get_values(D, convert=ZZ, tolerance=0.1) # a dict from P to multiplicities new_s = self._find_counter_example(P, s, d, True) if new_s is None: yield ([p for p in P for _ in range(ZZ(d[p]))], @@ -2612,11 +2612,11 @@ def solve(self, additional_constraints, solution_index=0): Without any constraints, we do not require that the solution is a bijection:: sage: bmilp.solve([bmilp._x["a", "a"] == 1, bmilp._x["b", "a"] == 1]) - {('a', 'a'): 1.0, ('a', 'b'): 0.0, ('b', 'a'): 1.0, ('b', 'b'): 0.0} + {('a', 'a'): True, ('a', 'b'): False, ('b', 'a'): True, ('b', 'b'): False} sage: len(bmilp._solution_cache) 1 sage: bmilp.solve([bmilp._x["a", "b"] == 1, bmilp._x["b", "b"] == 1]) - {('a', 'a'): 0.0, ('a', 'b'): 1.0, ('b', 'a'): 0.0, ('b', 'b'): 1.0} + {('a', 'a'): False, ('a', 'b'): True, ('b', 'a'): False, ('b', 'b'): True} sage: len(bmilp._solution_cache) 2 @@ -2631,12 +2631,12 @@ def solve(self, additional_constraints, solution_index=0): Generate a solution:: sage: bmilp.solve([]) - {([], 0): 1.0, - ([1, 0], 1): 1.0, - ([1, 0, 1, 0], 1): 0.0, - ([1, 0, 1, 0], 2): 1.0, - ([1, 1, 0, 0], 1): 1.0, - ([1, 1, 0, 0], 2): 0.0} + {([], 0): True, + ([1, 0], 1): True, + ([1, 0, 1, 0], 1): False, + ([1, 0, 1, 0], 2): True, + ([1, 1, 0, 0], 1): True, + ([1, 1, 0, 0], 2): False} Generating a new solution that also maps `1010` to `2` fails: @@ -2648,20 +2648,20 @@ def solve(self, additional_constraints, solution_index=0): However, searching for a cached solution succeeds, for inequalities and equalities:: sage: bmilp.solve([bmilp._x[DyckWord([1,0,1,0]), 1] <= 0.5]) - {([], 0): 1.0, - ([1, 0], 1): 1.0, - ([1, 0, 1, 0], 1): 0.0, - ([1, 0, 1, 0], 2): 1.0, - ([1, 1, 0, 0], 1): 1.0, - ([1, 1, 0, 0], 2): 0.0} + {([], 0): True, + ([1, 0], 1): True, + ([1, 0, 1, 0], 1): False, + ([1, 0, 1, 0], 2): True, + ([1, 1, 0, 0], 1): True, + ([1, 1, 0, 0], 2): False} sage: bmilp.solve([bmilp._x[DyckWord([1,0,1,0]), 1] == 0]) - {([], 0): 1.0, - ([1, 0], 1): 1.0, - ([1, 0, 1, 0], 1): 0.0, - ([1, 0, 1, 0], 2): 1.0, - ([1, 1, 0, 0], 1): 1.0, - ([1, 1, 0, 0], 2): 0.0} + {([], 0): True, + ([1, 0], 1): True, + ([1, 0, 1, 0], 1): False, + ([1, 0, 1, 0], 2): True, + ([1, 1, 0, 0], 1): True, + ([1, 1, 0, 0], 2): False} """ assert 0 <= solution_index <= len(self._solution_cache), "the index of the desired solution must not be larger than the number of known solutions" @@ -2707,7 +2707,8 @@ def solve(self, additional_constraints, solution_index=0): n = tmp_milp.number_of_constraints() - 1 try: tmp_milp.solve() - self.last_solution = tmp_milp.get_values(self._x.copy_for_mip(tmp_milp)) + self.last_solution = tmp_milp.get_values(self._x.copy_for_mip(tmp_milp), + convert=bool, tolerance=0.1) finally: for i in range(len(additional_constraints)): tmp_milp.remove_constraint(n - i) @@ -2844,7 +2845,7 @@ def add_alpha_beta_constraints(self): sage: bmilp = _BijectionistMILP(bij) sage: bmilp.add_alpha_beta_constraints() sage: bmilp.solve([]) - {([], 0): 1.0, ([1], 1): 1.0, ([1, 2], 2): 1.0, ([2, 1], 2): 1.0} + {([], 0): True, ([1], 1): True, ([1, 2], 2): True, ([2, 1], 2): True} """ W = self._bijectionist._W Z = self._bijectionist._Z From d0836cb93095985a933c549ea8a8893ba4d94a04 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Sun, 25 Dec 2022 22:26:12 +0100 Subject: [PATCH 248/751] include information on MILP also in public documentation --- src/sage/combinat/bijectionist.py | 81 ++++++++++++++++++++++++++----- 1 file changed, 68 insertions(+), 13 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index e33c6602f06..7c4cb15b274 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -660,6 +660,17 @@ def set_statistics(self, *alpha_beta): If the statistics `\alpha` and `\beta` are not equidistributed, an error is raised. + ALGORITHM: + + We add + + .. MATH:: + + \sum_{a\in A, z\in Z} x_{p(a), z} s^z t^{\alpha(a)} + = \sum_{b\in B} s^{\tau(b)} t(\beta(b)) + + as a matrix equation to the MILP. + EXAMPLES: We look for bijections `S` on permutations such that the @@ -1094,16 +1105,28 @@ def set_distributions(self, *elements_distributions): INPUT: - - one or more pairs of `(\tilde A\subseteq A, \tilde Z)`, - where `\tilde Z` is a list of values in `Z` of the same - size as `\tilde A` + - one or more pairs of `(\tilde A, \tilde Z)`, where `\tilde + A\subseteq A` and `\tilde Z` is a list of values in `Z` of + the same size as `\tilde A` This method specifies that `\{s(a) | a\in\tilde A\}` equals - ``\tilde Z`` as a multiset for each of the pairs. + `\tilde Z` as a multiset for each of the pairs. When specifying several distributions, the subsets of `A` do not have to be disjoint. + ALGORITHM: + + We add + + .. MATH:: + + \sum_{a\in\tilde A} x_{p(a), z}t^z = \sum_{z\in\tilde Z} t^z, + + where `p(a)` is the block containing `a`, for each given + distribution as a vector equation to the MILP. + + EXAMPLES:: sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] @@ -1248,13 +1271,45 @@ def set_intertwining_relations(self, *pi_rho): INPUT: - ``pi_rho`` -- one or more tuples `(k, \pi: A^k\to A, \rho: - Z^k\to Z, \tilde A)` where `\tilde A` (optional) is an - `k`-ary function that returns true if and only if an + Z^k\to Z, \tilde A)` where `\tilde A` (optional) is a + `k`-ary function that returns true if and only if a `k`-tuple of objects in `A` is in the domain of `\pi` + ALGORITHM: + + The relation + + .. MATH:: + + s(\pi(a_1,\dots, a_k)) = \rho(s(a_1),\dots, s(a_k)) + + for each pair `(\pi, \rho)` implies immediately that + `s(\pi(a_1,\dots, a_k))` only depends on the blocks of + `a_1,\dots, a_k`. + + The MILP formulation is as follows. Let `a_1,\dots,a_k \in + A` and let `a = \pi(a_1,\dots,a_k)`. Let `z_1,\dots,z_k \in + Z` and let `z = \rho(z_1,\dots,z_k)`. Suppose that `a_i\in + p_i` for all `i` and that `a\in p`. + + We then want to model the implication + + .. MATH:: + + x_{p_1, z_1} = 1,\dots, x_{p_k, z_k} = 1 \Rightarrow x_{p, z} = 1. + + We achieve this by requiring + + .. MATH:: + + x_{p, z}\geq 1 - k + \sum_{i=1}^k x_{p_i, z_i}. + + Note that `z` must be a possible value of `p` and each `z_i` + must be a possible value of `p_i`. + EXAMPLES: - We can concatenate two permutations, by increasing the values + We can concatenate two permutations by increasing the values of the second permutation by the length of the first permutation:: @@ -2184,10 +2239,10 @@ def solutions_iterator(self): x_{p, z} \geq 1-k + \sum_{i=1}^k x_{p_i, z_i}. * for each distribution restriction, i.e. a set of elements - `e` and a distribution of values given by integers `d_z` - representing the multiplicity of each `z \in Z`, and `r_p = - |p \cap e|` indicating the relative size of block `p` in - the set of elements of the distribution, + `\tilde A` and a distribution of values given by integers + `d_z` representing the multiplicity of each `z \in Z`, and + `r_p = |p \cap\tilde A|` indicating the relative size of + block `p` in the set of elements of the distribution, .. MATH:: @@ -2887,7 +2942,7 @@ def add_distribution_constraints(self): .. MATH:: - \sum_{a\in elements} x_{p(a), z}t^z = \sum_{z\in values} t^z, + \sum_{a\in\tilde A} x_{p(a), z}t^z = \sum_{z\in\tilde Z} t^z, where `p(a)` is the block containing `a`, for each given distribution as a vector equation. @@ -2950,7 +3005,7 @@ def add_intertwining_relation_constraints(self, origins): .. MATH:: - s(\pi(a_1,\dots, a_k)) = \rho(s(a_1),\dots, s(a_k))` + s(\pi(a_1,\dots, a_k)) = \rho(s(a_1),\dots, s(a_k)) for each pair `(\pi, \rho)`. The relation implies immediately that `s(\pi(a_1,\dots, a_k))` only depends on the From 563af988ae4e282cc2778599c73b728e8eb71f0c Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Sun, 25 Dec 2022 23:25:51 +0100 Subject: [PATCH 249/751] remove unnecessary copy --- src/sage/combinat/bijectionist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 7c4cb15b274..623b81d4753 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -2762,7 +2762,7 @@ def solve(self, additional_constraints, solution_index=0): n = tmp_milp.number_of_constraints() - 1 try: tmp_milp.solve() - self.last_solution = tmp_milp.get_values(self._x.copy_for_mip(tmp_milp), + self.last_solution = tmp_milp.get_values(self._x, convert=bool, tolerance=0.1) finally: for i in range(len(additional_constraints)): From 590bae24937ea07a1d5f22216b0900cce949ce55 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Mon, 26 Dec 2022 19:36:19 +0100 Subject: [PATCH 250/751] add possibility to constrain to involutions --- src/sage/combinat/bijectionist.py | 158 +++++++++++++++++++++++++----- 1 file changed, 136 insertions(+), 22 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 623b81d4753..726185d9907 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -479,7 +479,8 @@ class Bijectionist(SageObject): """ def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], - pi_rho=tuple(), elements_distributions=tuple(), + pi_rho=tuple(), phi_psi=tuple(), + elements_distributions=tuple(), value_restrictions=tuple(), solver=None, key=None): """ Initialize the bijectionist. @@ -532,6 +533,7 @@ def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], self.set_statistics(*alpha_beta) self.set_value_restrictions(*value_restrictions) self.set_distributions(*elements_distributions) + self.set_pseudo_inverse_relation(*phi_psi) self.set_intertwining_relations(*pi_rho) self.set_constant_blocks(P) @@ -1126,7 +1128,6 @@ def set_distributions(self, *elements_distributions): where `p(a)` is the block containing `a`, for each given distribution as a vector equation to the MILP. - EXAMPLES:: sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] @@ -1389,6 +1390,61 @@ def set_intertwining_relations(self, *pi_rho): self._pi_rho.append(Pi_Rho(numargs=k, pi=pi, rho=rho, domain=domain)) + set_semi_conjugacy = set_intertwining_relations + + def set_pseudo_inverse_relation(self, *phi_psi): + r""" + Add restrictions of the form `s\circ\psi\circ s = \phi`. + + INPUT: + + - ``phi_psi`` (optional) -- a list of pairs `(\phi, \rho)` + where `\phi: A\to Z` and `\psi: Z\to A` + + ALGORITHM: + + We add + + .. MATH:: + + x_{p(a), z} = x_{p(\psi(z)), \phi(a)} + + for `a\in A` and `z\in Z` to the MILP, where `\phi:A\to Z` + and `\psi:Z\to A`. Note that, in particular, `\phi` must be + constant on blocks. + + + EXAMPLES:: + + sage: A = B = DyckWords(3) + sage: bij = Bijectionist(A, B) + sage: bij.set_statistics((lambda D: D.number_of_touch_points(), lambda D: D.number_of_initial_rises())) + sage: ascii_art(list(bij.minimal_subdistributions_iterator())) + [ ( [ /\ ] ) + [ ( [ / \ ] ) ( [ /\ /\ ] [ /\ /\/\ ] ) + [ ( [ /\/\/\ ], [ / \ ] ), ( [ /\/ \, / \/\ ], [ / \/\, / \ ] ), + + ( [ /\ ] ) ] + ( [ /\/\ / \ ] [ /\ ] ) ] + ( [ / \, / \ ], [ /\/\/\, /\/ \ ] ) ] + sage: bij.set_pseudo_inverse_relation((lambda D: D, lambda D: D)) + sage: ascii_art(list(bij.minimal_subdistributions_iterator())) + [ ( [ /\ ] ) + [ ( [ / \ ] ) ( [ /\ ] [ /\/\ ] ) + [ ( [ /\/\/\ ], [ / \ ] ), ( [ /\/ \ ], [ / \ ] ), + + + ( [ /\ ] [ /\ ] ) ( [ /\/\ ] [ /\ ] ) + ( [ / \/\ ], [ / \/\ ] ), ( [ / \ ], [ /\/ \ ] ), + + ( [ /\ ] ) ] + ( [ / \ ] ) ] + ( [ / \ ], [ /\/\/\ ] ) ] + + """ + self._bmilp = None + self._phi_psi = phi_psi + def _forced_constant_blocks(self): r""" Modify current partition into blocks to the coarsest possible @@ -1717,7 +1773,7 @@ def possible_values(self, p=None, optimal=False): blocks = set() if p in self._A: blocks.add(self._P.find(p)) - elif type(p) is list: + elif type(p) is list: # TODO: this looks very brittle for p1 in p: if p1 in self._A: blocks.add(self._P.find(p1)) @@ -1890,22 +1946,22 @@ def _find_counter_example(self, P, s0, d, on_blocks): {'a': 2, 'b': 2, 'c': 1, 'd': 3, 'e': 1} """ bmilp = self._bmilp - for v in self._Z: - v_in_d_count = sum(d[p] for p in P if s0[p] == v) - if not v_in_d_count: + for z in self._Z: + z_in_d_count = sum(d[p] for p in P if s0[p] == z) + if not z_in_d_count: continue # try to find a solution which has a different # subdistribution on d than s0 - v_in_d = sum(d[p] * bmilp._x[self._P.find(p), v] + z_in_d = sum(d[p] * bmilp._x[self._P.find(p), z] for p in P - if v in self._possible_block_values[self._P.find(p)]) + if z in self._possible_block_values[self._P.find(p)]) - # it is sufficient to require that v occurs less often as + # it is sufficient to require that z occurs less often as # a value among {a | d[a] == 1} than it does in - # v_in_d_count, because, if the distributions are - # different, one such v must exist - tmp_constraints = [v_in_d <= v_in_d_count - 1] + # z_in_d_count, because, if the distributions are + # different, one such z must exist + tmp_constraints = [z_in_d <= z_in_d_count - 1] try: bmilp.solve(tmp_constraints) return self._solution(bmilp, on_blocks) @@ -2587,6 +2643,7 @@ def _initialize_new_bmilp(self): n = bmilp.milp.number_of_variables() bmilp.add_alpha_beta_constraints() bmilp.add_distribution_constraints() + bmilp.add_pseudo_inverse_relation_constraints() bmilp.add_intertwining_relation_constraints(preimage_blocks) if get_verbose() >= 2: self._show_bmilp(bmilp) @@ -2969,25 +3026,25 @@ def add_distribution_constraints(self): """ Z = self._bijectionist._Z Z_dict = {z: i for i, z in enumerate(Z)} - for elements, values in self._bijectionist._elements_distributions: - elements_sum = [ZZ(0)]*len(Z_dict) - values_sum = [ZZ(0)]*len(Z_dict) - for a in elements: + for tA, tZ in self._bijectionist._elements_distributions: + tA_sum = [ZZ(0)]*len(Z_dict) + tZ_sum = [ZZ(0)]*len(Z_dict) + for a in tA: p = self._bijectionist._P.find(a) for z in self._bijectionist._possible_block_values[p]: - elements_sum[Z_dict[z]] += self._x[p, z] - for z in values: - values_sum[Z_dict[z]] += 1 + tA_sum[Z_dict[z]] += self._x[p, z] + for z in tZ: + tZ_sum[Z_dict[z]] += 1 # TODO: not sure that this is the best way to filter out # empty conditions - for element, value in zip(elements_sum, values_sum): - c = element - value + for a, z in zip(tA_sum, tZ_sum): + c = a - z if c.is_zero(): continue if c in ZZ: raise MIPSolverException - self.milp.add_constraint(c == 0, name=f"d: {element} == {value}") + self.milp.add_constraint(c == 0, name=f"d: {a} == {z}") def add_intertwining_relation_constraints(self, origins): r""" @@ -3065,6 +3122,63 @@ def add_intertwining_relation_constraints(self, origins): self.milp.add_constraint(rhs <= 0, name=f"pi/rho({composition_index})") + def add_pseudo_inverse_relation_constraints(self): + r""" + Add constraints enforcing that `s\circ\phi\circ s = + \psi`. + + We do this by adding + + .. MATH:: + + x_{p(a), z} = x_{p(\psi(z)), \phi(a)} + + for `a\in A` and `z\in Z`, where `\phi:A\to Z` and `\psi:Z\to + A`. Note that, in particular, `\phi` must be constant on + blocks. + + EXAMPLES:: + + sage: A = B = DyckWords(3) + sage: bij = Bijectionist(A, B) + sage: bij.set_statistics((lambda D: D.number_of_touch_points(), lambda D: D.number_of_initial_rises())) + sage: ascii_art(list(bij.minimal_subdistributions_iterator())) + [ ( [ /\ ] ) + [ ( [ / \ ] ) ( [ /\ /\ ] [ /\ /\/\ ] ) + [ ( [ /\/\/\ ], [ / \ ] ), ( [ /\/ \, / \/\ ], [ / \/\, / \ ] ), + + ( [ /\ ] ) ] + ( [ /\/\ / \ ] [ /\ ] ) ] + ( [ / \, / \ ], [ /\/\/\, /\/ \ ] ) ] + sage: bij.set_pseudo_inverse_relation((lambda D: D, lambda D: D)) + sage: ascii_art(list(bij.minimal_subdistributions_iterator())) + [ ( [ /\ ] ) + [ ( [ / \ ] ) ( [ /\ ] [ /\/\ ] ) + [ ( [ /\/\/\ ], [ / \ ] ), ( [ /\/ \ ], [ / \ ] ), + + + ( [ /\ ] [ /\ ] ) ( [ /\/\ ] [ /\ ] ) + ( [ / \/\ ], [ / \/\ ] ), ( [ / \ ], [ /\/ \ ] ), + + ( [ /\ ] ) ] + ( [ / \ ] ) ] + ( [ / \ ], [ /\/\/\ ] ) ] + + """ + P = self._bijectionist._P + for phi, psi in self._bijectionist._phi_psi: + for p, block in P.root_to_elements_dict().items(): + z0 = phi(p) + assert all(phi(a) == z0 for a in block), "phi must be constant on the block %s" % block + for z in self._bijectionist._possible_block_values[p]: + p0 = P.find(psi(z)) + if z0 in self._bijectionist._possible_block_values[p0]: + c = self._x[p, z] - self._x[p0, z0] + if c.is_zero(): + continue + self.milp.add_constraint(c == 0, name=f"i: s({p})={z}<->s(psi({z})=phi({p})") + else: + self.milp.add_constraint(self._x[p, z] == 0, name=f"i: s({p})!={z}") def _invert_dict(d): """ From da0655b5e1dcd4b1b1a35943fbbedf2698900786 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Mon, 26 Dec 2022 23:27:45 +0100 Subject: [PATCH 251/751] correct indentation --- src/sage/combinat/bijectionist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 726185d9907..97319f78d5e 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -1399,7 +1399,7 @@ def set_pseudo_inverse_relation(self, *phi_psi): INPUT: - ``phi_psi`` (optional) -- a list of pairs `(\phi, \rho)` - where `\phi: A\to Z` and `\psi: Z\to A` + where `\phi: A\to Z` and `\psi: Z\to A` ALGORITHM: @@ -3150,7 +3150,7 @@ def add_pseudo_inverse_relation_constraints(self): ( [ /\ ] ) ] ( [ /\/\ / \ ] [ /\ ] ) ] ( [ / \, / \ ], [ /\/\/\, /\/ \ ] ) ] - sage: bij.set_pseudo_inverse_relation((lambda D: D, lambda D: D)) + sage: bij.set_pseudo_inverse_relation((lambda D: D, lambda D: D)) # indirect doctest sage: ascii_art(list(bij.minimal_subdistributions_iterator())) [ ( [ /\ ] ) [ ( [ / \ ] ) ( [ /\ ] [ /\/\ ] ) From 03b1fb836611da4674cb8c34ea3faad709418670 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Thu, 29 Dec 2022 13:28:14 +0100 Subject: [PATCH 252/751] better handling of empty constraints --- src/sage/combinat/bijectionist.py | 119 +++++++++++++++--------------- 1 file changed, 59 insertions(+), 60 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 97319f78d5e..980668f7c7b 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -2358,9 +2358,14 @@ def solutions_iterator(self): block [1, 3, 2]: 1 <= x_9 + x_10 + x_11 <= 1 block [2, 3, 1]: 1 <= x_12 + x_13 + x_14 <= 1 statistics: 1 <= x_0 <= 1 + statistics: 0 <= <= 0 + statistics: 0 <= <= 0 statistics: 1 <= x_1 <= 1 + statistics: 0 <= <= 0 + statistics: 0 <= <= 0 statistics: 1 <= x_2 + x_4 <= 1 statistics: 1 <= x_3 + x_5 <= 1 + statistics: 0 <= <= 0 statistics: 1 <= x_6 + 3 x_9 + 2 x_12 <= 1 statistics: 3 <= x_7 + 3 x_10 + 2 x_13 <= 3 statistics: 2 <= x_8 + 3 x_11 + 2 x_14 <= 2 @@ -2376,9 +2381,14 @@ def solutions_iterator(self): block [1, 3, 2]: 1 <= x_9 + x_10 + x_11 <= 1 block [2, 3, 1]: 1 <= x_12 + x_13 + x_14 <= 1 statistics: 1 <= x_0 <= 1 + statistics: 0 <= <= 0 + statistics: 0 <= <= 0 statistics: 1 <= x_1 <= 1 + statistics: 0 <= <= 0 + statistics: 0 <= <= 0 statistics: 1 <= x_2 + x_4 <= 1 statistics: 1 <= x_3 + x_5 <= 1 + statistics: 0 <= <= 0 statistics: 1 <= x_6 + 3 x_9 + 2 x_12 <= 1 statistics: 3 <= x_7 + 3 x_10 + 2 x_13 <= 3 statistics: 2 <= x_8 + 3 x_11 + 2 x_14 <= 2 @@ -2399,9 +2409,14 @@ def solutions_iterator(self): block [1, 3, 2]: 1 <= x_9 + x_10 + x_11 <= 1 block [2, 3, 1]: 1 <= x_12 + x_13 + x_14 <= 1 statistics: 1 <= x_0 <= 1 + statistics: 0 <= <= 0 + statistics: 0 <= <= 0 statistics: 1 <= x_1 <= 1 + statistics: 0 <= <= 0 + statistics: 0 <= <= 0 statistics: 1 <= x_2 + x_4 <= 1 statistics: 1 <= x_3 + x_5 <= 1 + statistics: 0 <= <= 0 statistics: 1 <= x_6 + 3 x_9 + 2 x_12 <= 1 statistics: 3 <= x_7 + 3 x_10 + 2 x_13 <= 3 statistics: 2 <= x_8 + 3 x_11 + 2 x_14 <= 2 @@ -2431,9 +2446,14 @@ def solutions_iterator(self): block [1, 3, 2]: 1 <= x_9 + x_10 + x_11 <= 1 block [2, 3, 1]: 1 <= x_12 + x_13 + x_14 <= 1 statistics: 1 <= x_0 <= 1 + statistics: 0 <= <= 0 + statistics: 0 <= <= 0 statistics: 1 <= x_1 <= 1 + statistics: 0 <= <= 0 + statistics: 0 <= <= 0 statistics: 1 <= x_2 + x_4 <= 1 statistics: 1 <= x_3 + x_5 <= 1 + statistics: 0 <= <= 0 statistics: 1 <= x_6 + 3 x_9 + 2 x_12 <= 1 statistics: 3 <= x_7 + 3 x_10 + 2 x_13 <= 3 statistics: 2 <= x_8 + 3 x_11 + 2 x_14 <= 2 @@ -2448,9 +2468,14 @@ def solutions_iterator(self): block [1, 3, 2]: 1 <= x_9 + x_10 + x_11 <= 1 block [2, 3, 1]: 1 <= x_12 + x_13 + x_14 <= 1 statistics: 1 <= x_0 <= 1 + statistics: 0 <= <= 0 + statistics: 0 <= <= 0 statistics: 1 <= x_1 <= 1 + statistics: 0 <= <= 0 + statistics: 0 <= <= 0 statistics: 1 <= x_2 + x_4 <= 1 statistics: 1 <= x_3 + x_5 <= 1 + statistics: 0 <= <= 0 statistics: 1 <= x_6 + 3 x_9 + 2 x_12 <= 1 statistics: 3 <= x_7 + 3 x_10 + 2 x_13 <= 3 statistics: 2 <= x_8 + 3 x_11 + 2 x_14 <= 2 @@ -2640,14 +2665,12 @@ def _initialize_new_bmilp(self): self._compute_possible_block_values() bmilp = _BijectionistMILP(self) - n = bmilp.milp.number_of_variables() bmilp.add_alpha_beta_constraints() bmilp.add_distribution_constraints() bmilp.add_pseudo_inverse_relation_constraints() bmilp.add_intertwining_relation_constraints(preimage_blocks) if get_verbose() >= 2: self._show_bmilp(bmilp) - assert n == bmilp.milp.number_of_variables(), "The number of variables increased." return bmilp @@ -2682,22 +2705,21 @@ def __init__(self, bijectionist: Bijectionist): # the attributes of the bijectionist class we actually use: # _possible_block_values # _elements_distributions - # _W, _Z, _A, _B, _P, _alpha, _beta, _tau, _pi_rho + # _W, _Z, _A, _B, _P, _alpha, _beta, _tau, _pi_rho, _phi_psi + self._bijectionist = bijectionist self.milp = MixedIntegerLinearProgram(solver=bijectionist._solver) self.milp.set_objective(None) - self._n_variables = -1 + indices = [(p, z) + for p, tZ in bijectionist._possible_block_values.items() + for z in tZ] + self._x = self.milp.new_variable(binary=True, indices=indices) self._solution_cache = [] self._last_solution = {} - self._index_block_value_dict = None - self._x = self.milp.new_variable(binary=True) # indexed by P x Z - - self._bijectionist = bijectionist for p in _disjoint_set_roots(bijectionist._P): - name = f"block {p}" self.milp.add_constraint(sum(self._x[p, z] for z in bijectionist._possible_block_values[p]) == 1, - name=name[:50]) + name=f"block {p}"[:50]) def solve(self, additional_constraints, solution_index=0): r""" @@ -2777,20 +2799,8 @@ def solve(self, additional_constraints, solution_index=0): """ assert 0 <= solution_index <= len(self._solution_cache), "the index of the desired solution must not be larger than the number of known solutions" - - if self._n_variables < 0: - # initialize at first call - self._n_variables = self.milp.number_of_variables() - self._index_block_value_dict = {} - for (p, z), v in self._x.items(): - variable_index = next(iter(v.dict().keys())) - self._index_block_value_dict[variable_index] = (p, z) - # number of variables would change with creation of - # constraints with new variables - assert self._n_variables == self.milp.number_of_variables(), "The number of variables changed." - - # check if there is a solution satisfying the constraints in - # the cache + # check whether there is a solution in the cache satisfying + # the additional constraints for solution in self._solution_cache[solution_index:]: if all(all(self._evaluate_linear_function(linear_function, solution) == value.dict()[-1] @@ -2807,23 +2817,19 @@ def solve(self, additional_constraints, solution_index=0): copy = False if copy: tmp_milp = deepcopy(self.milp) - else: - tmp_milp = self.milp - - for constraint in additional_constraints: - tmp_milp.add_constraint(constraint) - - if copy: + for constraint in additional_constraints: + tmp_milp.add_constraint(constraint, return_indices=True) tmp_milp.solve() else: - n = tmp_milp.number_of_constraints() - 1 + new_indices = [] + for constraint in additional_constraints: + new_indices.extend(self.milp.add_constraint(constraint, return_indices=True)) try: - tmp_milp.solve() - self.last_solution = tmp_milp.get_values(self._x, - convert=bool, tolerance=0.1) + self.milp.solve() + self.last_solution = self.milp.get_values(self._x, + convert=bool, tolerance=0.1) finally: - for i in range(len(additional_constraints)): - tmp_milp.remove_constraint(n - i) + self.milp.remove_constraints(new_indices) self._solution_cache.append(self.last_solution) self._veto_current_solution() @@ -2849,13 +2855,16 @@ def _evaluate_linear_function(self, linear_function, values): sage: from sage.combinat.bijectionist import _BijectionistMILP sage: bmilp = _BijectionistMILP(bij) sage: _ = bmilp.solve([]) - sage: bmilp._index_block_value_dict # random - {0: ('a', 'a'), 1: ('a', 'b'), 2: ('b', 'a'), 3: ('b', 'b')} sage: f = bmilp._x["a", "a"] + bmilp._x["b", "a"] sage: v = {('a', 'a'): 1.0, ('a', 'b'): 0.0, ('b', 'a'): 1.0, ('b', 'b'): 0.0} sage: bmilp._evaluate_linear_function(f, v) 2.0 """ + self._index_block_value_dict = {} + for (p, z), v in self._x.items(): + variable_index = next(iter(v.dict().keys())) + self._index_block_value_dict[variable_index] = (p, z) + return float(sum(value * values[self._index_block_value_dict[index]] for index, value in linear_function.dict().items())) @@ -2961,8 +2970,9 @@ def add_alpha_beta_constraints(self): """ W = self._bijectionist._W Z = self._bijectionist._Z - AZ_matrix = [[ZZ(0)]*len(W) for _ in range(len(Z))] - B_matrix = [[ZZ(0)]*len(W) for _ in range(len(Z))] + zero = self.milp.linear_functions_parent().zero() + AZ_matrix = [[zero]*len(W) for _ in range(len(Z))] + B_matrix = [[zero]*len(W) for _ in range(len(Z))] W_dict = {w: i for i, w in enumerate(W)} Z_dict = {z: i for i, z in enumerate(Z)} @@ -2979,16 +2989,10 @@ def add_alpha_beta_constraints(self): z_index = Z_dict[self._bijectionist._tau[b]] B_matrix[z_index][w_index] += 1 - # TODO: not sure that this is the best way to filter out - # empty conditions for w in range(len(W)): for z in range(len(Z)): - c = AZ_matrix[z][w] - B_matrix[z][w] - if c.is_zero(): - continue - if c in ZZ: - raise MIPSolverException - self.milp.add_constraint(c == 0, name="statistics") + self.milp.add_constraint(AZ_matrix[z][w] == B_matrix[z][w], + name="statistics") def add_distribution_constraints(self): r""" @@ -3026,9 +3030,10 @@ def add_distribution_constraints(self): """ Z = self._bijectionist._Z Z_dict = {z: i for i, z in enumerate(Z)} + zero = self.milp.linear_functions_parent().zero() for tA, tZ in self._bijectionist._elements_distributions: - tA_sum = [ZZ(0)]*len(Z_dict) - tZ_sum = [ZZ(0)]*len(Z_dict) + tA_sum = [zero]*len(Z_dict) + tZ_sum = [zero]*len(Z_dict) for a in tA: p = self._bijectionist._P.find(a) for z in self._bijectionist._possible_block_values[p]: @@ -3036,15 +3041,8 @@ def add_distribution_constraints(self): for z in tZ: tZ_sum[Z_dict[z]] += 1 - # TODO: not sure that this is the best way to filter out - # empty conditions for a, z in zip(tA_sum, tZ_sum): - c = a - z - if c.is_zero(): - continue - if c in ZZ: - raise MIPSolverException - self.milp.add_constraint(c == 0, name=f"d: {a} == {z}") + self.milp.add_constraint(a == z, name=f"d: {a} == {z}") def add_intertwining_relation_constraints(self, origins): r""" @@ -3180,6 +3178,7 @@ def add_pseudo_inverse_relation_constraints(self): else: self.milp.add_constraint(self._x[p, z] == 0, name=f"i: s({p})!={z}") + def _invert_dict(d): """ Return the dictionary whose keys are the values of the input and @@ -3298,7 +3297,7 @@ def _non_copying_intersection(sets): sage: A = sum(As, []) sage: respects_c1 = lambda s: all(c1(a1, a2) not in A or s[c1(a1, a2)] == c1(s[a1], s[a2]) for a1 in A for a2 in A) sage: respects_c2 = lambda s: all(c2(a1) not in A or s[c2(a1)] == c2(s[a1]) for a1 in A) - sage: l2 = [s for s in it if respects_c1(s) and respects_c2(s)] # long time -- (17 seconds with SCIP on AMD Ryzen 5 PRO 3500U w/ Radeon Vega Mobile Gfx) + sage: l2 = [s for s in it if respects_c1(s) and respects_c2(s)] # long time -- (17 seconds on AMD Ryzen 5 PRO 3500U w/ Radeon Vega Mobile Gfx) sage: sorted(l1, key=lambda s: tuple(s.items())) == l2 # long time True From a3364dec31f6eee2ca1c2f2777a39df5a57a716a Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Thu, 29 Dec 2022 22:47:50 +0100 Subject: [PATCH 253/751] move _show to the _BijectionistMILP class --- src/sage/combinat/bijectionist.py | 131 +++++++++++++++--------------- 1 file changed, 66 insertions(+), 65 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 980668f7c7b..93c4867ed0b 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -2548,7 +2548,7 @@ def solutions_iterator(self): solution_index += 1 if get_verbose() >= 2: print("after vetoing") - self._show_bmilp(bmilp, variables=False) + bmilp.show(variables=False) def _solution(self, bmilp, on_blocks=False): r""" @@ -2585,68 +2585,6 @@ def _solution(self, bmilp, on_blocks=False): break return mapping - def _show_bmilp(self, bmilp, variables=True): - """ - Print the constraints and variables of the current MILP - together with some explanations. - - - EXAMPLES:: - - sage: A = B = ["a", "b", "c"] - sage: bij = Bijectionist(A, B, lambda x: A.index(x) % 2, solver="GLPK") - sage: bij.set_constant_blocks([["a", "b"]]) - sage: next(bij.solutions_iterator()) - {'a': 0, 'b': 0, 'c': 1} - sage: bij._show_bmilp(bij._bmilp) - Constraints are: - block a: 1 <= x_0 + x_1 <= 1 - block c: 1 <= x_2 + x_3 <= 1 - statistics: 2 <= 2 x_0 + x_2 <= 2 - statistics: 1 <= 2 x_1 + x_3 <= 1 - veto: x_0 + x_3 <= 1 - Variables are: - x_0: s(a) = s(b) = 0 - x_1: s(a) = s(b) = 1 - x_2: s(c) = 0 - x_3: s(c) = 1 - """ - print("Constraints are:") - b = bmilp.milp.get_backend() - varid_name = {} - for i in range(b.ncols()): - s = b.col_name(i) - default_name = str(bmilp.milp.linear_functions_parent()({i: 1})) - if s and s != default_name: - varid_name[i] = s - else: - varid_name[i] = default_name - for i, (lb, (indices, values), ub) in enumerate(bmilp.milp.constraints()): - if b.row_name(i): - print(" "+b.row_name(i)+":", end=" ") - if lb is not None: - print(str(ZZ(lb))+" <=", end=" ") - first = True - for j, c in sorted(zip(indices, values)): - c = ZZ(c) - if c == 0: - continue - print((("+ " if (not first and c > 0) else "") + - ("" if c == 1 else - ("- " if c == -1 else - (str(c) + " " if first and c < 0 else - ("- " + str(abs(c)) + " " if c < 0 else str(c) + " ")))) - + varid_name[j]), end=" ") - first = False - # Upper bound - print("<= "+str(ZZ(ub)) if ub is not None else "") - - if variables: - print("Variables are:") - for (p, z), v in bmilp._x.items(): - print(f" {v}: " + "".join([f"s({a}) = " - for a in self._P.root_to_elements_dict()[p]]) + f"{z}") - def _initialize_new_bmilp(self): r""" Initialize a :class:`_BijectionistMILP` and add the current constraints. @@ -2670,7 +2608,7 @@ def _initialize_new_bmilp(self): bmilp.add_pseudo_inverse_relation_constraints() bmilp.add_intertwining_relation_constraints(preimage_blocks) if get_verbose() >= 2: - self._show_bmilp(bmilp) + bmilp.show() return bmilp @@ -2721,6 +2659,69 @@ def __init__(self, bijectionist: Bijectionist): for z in bijectionist._possible_block_values[p]) == 1, name=f"block {p}"[:50]) + def show(self, variables=True): + r""" + Print the constraints and variables of the MILP together + with some explanations. + + EXAMPLES:: + + sage: A = B = ["a", "b", "c"] + sage: bij = Bijectionist(A, B, lambda x: A.index(x) % 2, solver="GLPK") + sage: bij.set_constant_blocks([["a", "b"]]) + sage: next(bij.solutions_iterator()) + {'a': 0, 'b': 0, 'c': 1} + sage: bij._bmilp.show() + Constraints are: + block a: 1 <= x_0 + x_1 <= 1 + block c: 1 <= x_2 + x_3 <= 1 + statistics: 2 <= 2 x_0 + x_2 <= 2 + statistics: 1 <= 2 x_1 + x_3 <= 1 + veto: x_0 + x_3 <= 1 + Variables are: + x_0: s(a) = s(b) = 0 + x_1: s(a) = s(b) = 1 + x_2: s(c) = 0 + x_3: s(c) = 1 + + """ + print("Constraints are:") + b = self.milp.get_backend() + varid_name = {} + for i in range(b.ncols()): + s = b.col_name(i) + default_name = str(self.milp.linear_functions_parent()({i: 1})) + if s and s != default_name: + varid_name[i] = s + else: + varid_name[i] = default_name + for i, (lb, (indices, values), ub) in enumerate(self.milp.constraints()): + if b.row_name(i): + print(" "+b.row_name(i)+":", end=" ") + if lb is not None: + print(str(ZZ(lb))+" <=", end=" ") + first = True + for j, c in sorted(zip(indices, values)): + c = ZZ(c) + if c == 0: + continue + print((("+ " if (not first and c > 0) else "") + + ("" if c == 1 else + ("- " if c == -1 else + (str(c) + " " if first and c < 0 else + ("- " + str(abs(c)) + " " if c < 0 else str(c) + " ")))) + + varid_name[j]), end=" ") + first = False + # Upper bound + print("<= "+str(ZZ(ub)) if ub is not None else "") + + if variables: + print("Variables are:") + P = self._bijectionist._P.root_to_elements_dict() + for (p, z), v in self._x.items(): + print(f" {v}: " + "".join([f"s({a}) = " + for a in P[p]]) + f"{z}") + def solve(self, additional_constraints, solution_index=0): r""" Return a solution satisfying the given additional constraints. @@ -2896,7 +2897,7 @@ def _veto_current_solution(self): sage: iter = bij.solutions_iterator() sage: next(iter) # indirect doctest {'a': 0, 'b': 0, 'c': 1} - sage: bij._show_bmilp(bij._bmilp) + sage: bij._bmilp.show() Constraints are: block a: 1 <= x_0 + x_1 <= 1 block c: 1 <= x_2 + x_3 <= 1 From 9d83a6c50c0da26065e7fda350b7a7980e98f52e Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Fri, 30 Dec 2022 14:43:30 +0100 Subject: [PATCH 254/751] remove unused code for backends that do not support removing constraints --- src/sage/combinat/bijectionist.py | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 93c4867ed0b..64ec91f1d17 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -2814,23 +2814,15 @@ def solve(self, additional_constraints, solution_index=0): return self.last_solution # otherwise generate a new one - # set copy = True if the solver requires us to copy the program and throw it away again - copy = False - if copy: - tmp_milp = deepcopy(self.milp) - for constraint in additional_constraints: - tmp_milp.add_constraint(constraint, return_indices=True) - tmp_milp.solve() - else: - new_indices = [] - for constraint in additional_constraints: - new_indices.extend(self.milp.add_constraint(constraint, return_indices=True)) - try: - self.milp.solve() - self.last_solution = self.milp.get_values(self._x, - convert=bool, tolerance=0.1) - finally: - self.milp.remove_constraints(new_indices) + new_indices = [] + for constraint in additional_constraints: + new_indices.extend(self.milp.add_constraint(constraint, return_indices=True)) + try: + self.milp.solve() + self.last_solution = self.milp.get_values(self._x, + convert=bool, tolerance=0.1) + finally: + self.milp.remove_constraints(new_indices) self._solution_cache.append(self.last_solution) self._veto_current_solution() From 864029dc1800ac3af007a58f50f9f19c2ccb98ac Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Fri, 30 Dec 2022 14:46:46 +0100 Subject: [PATCH 255/751] make _solution a public method of _BijectionistMILP, simplify solve --- src/sage/combinat/bijectionist.py | 232 +++++++++++------------------- 1 file changed, 86 insertions(+), 146 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 64ec91f1d17..01c57830a16 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -1624,10 +1624,10 @@ def _forced_constant_blocks(self): self._bmilp.solve([]) # generate blockwise preimage to determine which blocks have the same image - solution = self._solution(self._bmilp, True) - multiple_preimages = {(value,): preimages - for value, preimages in _invert_dict(solution).items() - if len(preimages) > 1} + solution = self._bmilp.solution(True) + multiple_preimages = {(z,): tP + for z, tP in _invert_dict(solution).items() + if len(tP) > 1} # check for each pair of blocks if a solution with different # values on these block exists @@ -1636,27 +1636,36 @@ def _forced_constant_blocks(self): # multiple_preimages dictionary, restart the check # if no, the two blocks can be joined - # _P has to be copied to not mess with the solution-process + # _P has to be copied to not mess with the solution process # since we do not want to regenerate the bmilp in each step, # so blocks have to stay consistent during the whole process tmp_P = deepcopy(self._P) updated_preimages = True while updated_preimages: updated_preimages = False - for values in copy(multiple_preimages): + for tZ in copy(multiple_preimages): if updated_preimages: break - for i, j in itertools.combinations(copy(multiple_preimages[values]), r=2): + for i, j in itertools.combinations(copy(multiple_preimages[tZ]), r=2): + # veto two blocks having the same value tmp_constraints = [] + for z in self._possible_block_values[i]: + if z in self._possible_block_values[j]: # intersection + tmp_constraints.append(self._bmilp._x[i, z] + self._bmilp._x[j, z] <= 1) try: - # veto the two blocks having the same value - for z in self._possible_block_values[i]: - if z in self._possible_block_values[j]: # intersection - tmp_constraints.append(self._bmilp._x[i, z] + self._bmilp._x[j, z] <= 1) self._bmilp.solve(tmp_constraints) - + except MIPSolverException: + # no solution exists, join blocks + tmp_P.union(i, j) + if i in multiple_preimages[tZ] and j in multiple_preimages[tZ]: + # only one of the joined blocks should remain in the list + multiple_preimages[tZ].remove(j) + if len(multiple_preimages[tZ]) == 1: + del multiple_preimages[tZ] + break + else: # solution exists, update dictionary - solution = self._solution(self._bmilp, True) + solution = self._bmilp.solution(True) updated_multiple_preimages = {} for values in multiple_preimages: for p in multiple_preimages[values]: @@ -1667,15 +1676,6 @@ def _forced_constant_blocks(self): updated_preimages = True multiple_preimages = updated_multiple_preimages break - except MIPSolverException: - # no solution exists, join blocks - tmp_P.union(i, j) - if i in multiple_preimages[values] and j in multiple_preimages[values]: - # only one of the joined blocks should remain in the list - multiple_preimages[values].remove(j) - if len(multiple_preimages[values]) == 1: - del multiple_preimages[values] - break self.set_constant_blocks(tmp_P) @@ -1794,7 +1794,7 @@ def add_solution(solutions, solution): self._bmilp = self._initialize_new_bmilp() self._bmilp.solve([]) - solution = self._solution(self._bmilp) + solution = self._bmilp.solution(False) solutions = {} add_solution(solutions, solution) @@ -1807,7 +1807,7 @@ def add_solution(solutions, solution): try: # problem has a solution, so new value was found self._bmilp.solve(tmp_constraints) - solution = self._solution(self._bmilp) + solution = self._bmilp.solution(False) add_solution(solutions, solution) # veto new value and try again tmp_constraints.append(self._bmilp._x[p, solution[p]] == 0) @@ -1888,7 +1888,7 @@ def minimal_subdistributions_iterator(self): self._bmilp.solve([]) except MIPSolverException: return - s = self._solution(self._bmilp) + s = self._bmilp.solution(False) while True: for v in self._Z: minimal_subdistribution.add_constraint(sum(D[a] for a in self._A if s[a] == v) == V[v]) @@ -1964,7 +1964,7 @@ def _find_counter_example(self, P, s0, d, on_blocks): tmp_constraints = [z_in_d <= z_in_d_count - 1] try: bmilp.solve(tmp_constraints) - return self._solution(bmilp, on_blocks) + return bmilp.solution(on_blocks) except MIPSolverException: pass return @@ -2110,7 +2110,7 @@ def add_counter_example_constraint(s): self._bmilp.solve([]) except MIPSolverException: return - s = self._solution(self._bmilp, True) + s = self._bmilp.solution(True) add_counter_example_constraint(s) while True: try: @@ -2544,47 +2544,12 @@ def solutions_iterator(self): bmilp.solve([], solution_index) except MIPSolverException: return - yield self._solution(bmilp) + yield bmilp.solution(False) solution_index += 1 if get_verbose() >= 2: print("after vetoing") bmilp.show(variables=False) - def _solution(self, bmilp, on_blocks=False): - r""" - Return the current solution as a dictionary from `A` (or - `P`) to `Z`. - - INPUT: - - - ``bmilp``, a :class:`_BijectionistMILP`. - - - ``on_blocks``, whether to return the solution on blocks or - on all elements - - EXAMPLES:: - - sage: A = B = ["a", "b", "c"] - sage: bij = Bijectionist(A, B, lambda x: 0) - sage: bij.set_constant_blocks([["a", "b"]]) - sage: next(bij.solutions_iterator()) - {'a': 0, 'b': 0, 'c': 0} - sage: bij._solution(bij._bmilp, True) - {'a': 0, 'c': 0} - - """ - mapping = {} # A -> Z or P -> Z, a +-> s(a) - for p, block in self._P.root_to_elements_dict().items(): - for z in self._possible_block_values[p]: - if bmilp.has_value(p, z): - if on_blocks: - mapping[p] = z - else: - for a in block: - mapping[a] = z - break - return mapping - def _initialize_new_bmilp(self): r""" Initialize a :class:`_BijectionistMILP` and add the current constraints. @@ -2652,7 +2617,6 @@ def __init__(self, bijectionist: Bijectionist): for z in tZ] self._x = self.milp.new_variable(binary=True, indices=indices) self._solution_cache = [] - self._last_solution = {} for p in _disjoint_set_roots(bijectionist._P): self.milp.add_constraint(sum(self._x[p, z] @@ -2803,12 +2767,7 @@ def solve(self, additional_constraints, solution_index=0): # check whether there is a solution in the cache satisfying # the additional constraints for solution in self._solution_cache[solution_index:]: - if all(all(self._evaluate_linear_function(linear_function, - solution) == value.dict()[-1] - for linear_function, value in constraint.equations()) - and all(self._evaluate_linear_function(linear_function, - solution) <= value.dict()[-1] - for linear_function, value in constraint.inequalities()) + if all(self._is_solution(constraint, solution) for constraint in additional_constraints): self.last_solution = solution return self.last_solution @@ -2824,18 +2783,26 @@ def solve(self, additional_constraints, solution_index=0): finally: self.milp.remove_constraints(new_indices) + # veto the solution, by requiring that not all variables with + # value 1 have value 1 in the new MILP + active_vars = [self._x[p, z] + for p in _disjoint_set_roots(self._bijectionist._P) + for z in self._bijectionist._possible_block_values[p] + if self.last_solution[(p, z)]] + self.milp.add_constraint(sum(active_vars) <= len(active_vars) - 1, + name="veto") + self._solution_cache.append(self.last_solution) - self._veto_current_solution() return self.last_solution - def _evaluate_linear_function(self, linear_function, values): + def _is_solution(self, constraint, values): r""" Evaluate the given function at the given values. INPUT: - - ``linear_function``, a - :class:`sage.numerical.linear_functions.LinearFunction`. + - ``constraint``, a + :class:`sage.numerical.linear_functions.LinearConstraint`. - ``values``, a candidate for a solution of the MILP as a dictionary from pairs `(a, z)\in A\times Z` to `0` or `1`, @@ -2848,92 +2815,65 @@ def _evaluate_linear_function(self, linear_function, values): sage: from sage.combinat.bijectionist import _BijectionistMILP sage: bmilp = _BijectionistMILP(bij) sage: _ = bmilp.solve([]) - sage: f = bmilp._x["a", "a"] + bmilp._x["b", "a"] - sage: v = {('a', 'a'): 1.0, ('a', 'b'): 0.0, ('b', 'a'): 1.0, ('b', 'b'): 0.0} - sage: bmilp._evaluate_linear_function(f, v) - 2.0 + sage: f = bmilp._x["a", "a"] + bmilp._x["b", "a"] >= bmilp._x["b", "b"] + 1 + sage: v = {('a', 'a'): 1, ('a', 'b'): 0, ('b', 'a'): 1, ('b', 'b'): 1} + sage: bmilp._is_solution(f, v) + True + sage: v = {('a', 'a'): 0, ('a', 'b'): 0, ('b', 'a'): 1, ('b', 'b'): 1} + sage: bmilp._is_solution(f, v) + False """ - self._index_block_value_dict = {} + index_block_value_dict = {} for (p, z), v in self._x.items(): variable_index = next(iter(v.dict().keys())) - self._index_block_value_dict[variable_index] = (p, z) - - return float(sum(value * values[self._index_block_value_dict[index]] - for index, value in linear_function.dict().items())) + index_block_value_dict[variable_index] = (p, z) - def _veto_current_solution(self): - r""" - Add a constraint vetoing the current solution. - - This adds a constraint such that the next call to - :meth:`solve` must return a solution different from the - current one. + evaluate = lambda f: sum(coeff if index == -1 else + coeff * values[index_block_value_dict[index]] + for index, coeff in f.dict().items()) - We require that the MILP currently has a solution. + for lhs, rhs in constraint.equations(): + if evaluate(lhs - rhs): + return False + for lhs, rhs in constraint.inequalities(): + if evaluate(lhs - rhs) > 0: + return False + return True - .. WARNING:: + def solution(self, on_blocks): + r""" + Return the current solution as a dictionary from `A` (or + `P`) to `Z`. - The underlying MILP will be modified! + INPUT: - ALGORITHM: + - ``bmilp``, a :class:`_BijectionistMILP`. - We add the constraint `\sum_{x\in V} x < |V|`` where `V` is - the set of variables `x_{p, z}` with value 1, that is, the - set of variables indicating the current solution. + - ``on_blocks``, whether to return the solution on blocks or + on all elements EXAMPLES:: sage: A = B = ["a", "b", "c"] - sage: bij = Bijectionist(A, B, lambda x: A.index(x) % 2) + sage: bij = Bijectionist(A, B, lambda x: 0) sage: bij.set_constant_blocks([["a", "b"]]) - sage: iter = bij.solutions_iterator() - sage: next(iter) # indirect doctest - {'a': 0, 'b': 0, 'c': 1} - sage: bij._bmilp.show() - Constraints are: - block a: 1 <= x_0 + x_1 <= 1 - block c: 1 <= x_2 + x_3 <= 1 - statistics: 2 <= 2 x_0 + x_2 <= 2 - statistics: 1 <= 2 x_1 + x_3 <= 1 - veto: x_0 + x_3 <= 1 - Variables are: - x_0: s(a) = s(b) = 0 - x_1: s(a) = s(b) = 1 - x_2: s(c) = 0 - x_3: s(c) = 1 - """ - # get all variables with value 1 - active_vars = [self._x[p, z] - for p in _disjoint_set_roots(self._bijectionist._P) - for z in self._bijectionist._possible_block_values[p] - if self.last_solution[(p, z)]] - - # add constraint that not all of these can be 1, thus vetoing - # the current solution - self.milp.add_constraint(sum(active_vars) <= len(active_vars) - 1, - name="veto") - - def has_value(self, p, v): - r""" - Return whether a block is mapped to a value in the last solution - computed. - - INPUT: - - - ``p``, the representative of a block - - ``v``, a value in `Z` - - EXAMPLES:: + sage: next(bij.solutions_iterator()) + {'a': 0, 'b': 0, 'c': 0} + sage: bij._bmilp.solution(True) + {'a': 0, 'c': 0} - sage: A = B = ["a", "b"] - sage: bij = Bijectionist(A, B) - sage: from sage.combinat.bijectionist import _BijectionistMILP - sage: bmilp = _BijectionistMILP(bij) - sage: _ = bmilp.solve([bmilp._x["a", "b"] == 1]) - sage: bmilp.has_value("a", "b") - True """ - return self.last_solution[p, v] == 1 + mapping = {} # A -> Z or P -> Z, a +-> s(a) + for p, block in self._bijectionist._P.root_to_elements_dict().items(): + for z in self._bijectionist._possible_block_values[p]: + if self.last_solution[p, z] == 1: + if on_blocks: + mapping[p] = z + else: + for a in block: + mapping[a] = z + break + return mapping def add_alpha_beta_constraints(self): r""" @@ -3012,7 +2952,7 @@ def add_distribution_constraints(self): sage: bmilp = _BijectionistMILP(bij) sage: bmilp.add_distribution_constraints() sage: _ = bmilp.solve([]) - sage: bij._solution(bmilp) + sage: bmilp.solution(False) {[1, 2, 3]: 3, [1, 3, 2]: 1, [2, 1, 3]: 3, @@ -3092,7 +3032,7 @@ def add_intertwining_relation_constraints(self, origins): sage: bmilp = _BijectionistMILP(bij) sage: bmilp.add_intertwining_relation_constraints(preimage_blocks) sage: _ = bmilp.solve([]) - sage: bij._solution(bmilp) + sage: bmilp.solution(False) {'a': 0, 'b': 1, 'c': 0, 'd': 1} """ for composition_index, image_block, preimage_blocks in origins: From 64101a8ffe9fabffa5a33faca001b4292ba6e28d Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Fri, 30 Dec 2022 15:11:40 +0100 Subject: [PATCH 256/751] eliminate _initialize_new_bmilp --- src/sage/combinat/bijectionist.py | 95 +++++++++---------------------- 1 file changed, 27 insertions(+), 68 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 01c57830a16..4da0be9fd9f 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -1620,7 +1620,7 @@ def _forced_constant_blocks(self): """ if self._bmilp is None: - self._bmilp = self._initialize_new_bmilp() + self._bmilp = _BijectionistMILP(self) self._bmilp.solve([]) # generate blockwise preimage to determine which blocks have the same image @@ -1791,7 +1791,7 @@ def add_solution(solutions, solution): # generate initial solution, solution dict and add solution if self._bmilp is None: - self._bmilp = self._initialize_new_bmilp() + self._bmilp = _BijectionistMILP(self) self._bmilp.solve([]) solution = self._bmilp.solution(False) @@ -1884,7 +1884,7 @@ def minimal_subdistributions_iterator(self): try: if self._bmilp is None: - self._bmilp = self._initialize_new_bmilp() + self._bmilp = _BijectionistMILP(self) self._bmilp.solve([]) except MIPSolverException: return @@ -2106,7 +2106,7 @@ def add_counter_example_constraint(s): if self._bmilp is None: try: - self._bmilp = self._initialize_new_bmilp() + self._bmilp = _BijectionistMILP(self) self._bmilp.solve([]) except MIPSolverException: return @@ -2534,7 +2534,7 @@ def solutions_iterator(self): """ if self._bmilp is None: try: - self._bmilp = self._initialize_new_bmilp() + self._bmilp = _BijectionistMILP(self) except MIPSolverException: return bmilp = self._bmilp @@ -2550,32 +2550,6 @@ def solutions_iterator(self): print("after vetoing") bmilp.show(variables=False) - def _initialize_new_bmilp(self): - r""" - Initialize a :class:`_BijectionistMILP` and add the current constraints. - - EXAMPLES:: - - sage: A = B = list('abcd') - sage: bij = Bijectionist(A, B, lambda x: B.index(x) % 2) - sage: pi = lambda p1, p2: 'abcdefgh'[A.index(p1) + A.index(p2)] - sage: rho = lambda s1, s2: (s1 + s2) % 2 - sage: bij.set_intertwining_relations((2, pi, rho)) - sage: bij._initialize_new_bmilp() - - """ - preimage_blocks = self._preprocess_intertwining_relations() - self._compute_possible_block_values() - - bmilp = _BijectionistMILP(self) - bmilp.add_alpha_beta_constraints() - bmilp.add_distribution_constraints() - bmilp.add_pseudo_inverse_relation_constraints() - bmilp.add_intertwining_relation_constraints(preimage_blocks) - if get_verbose() >= 2: - bmilp.show() - return bmilp - class _BijectionistMILP(): r""" @@ -2610,18 +2584,26 @@ def __init__(self, bijectionist: Bijectionist): # _elements_distributions # _W, _Z, _A, _B, _P, _alpha, _beta, _tau, _pi_rho, _phi_psi self._bijectionist = bijectionist + preimage_blocks = bijectionist._preprocess_intertwining_relations() + bijectionist._compute_possible_block_values() self.milp = MixedIntegerLinearProgram(solver=bijectionist._solver) self.milp.set_objective(None) + self._solution_cache = [] indices = [(p, z) for p, tZ in bijectionist._possible_block_values.items() for z in tZ] self._x = self.milp.new_variable(binary=True, indices=indices) - self._solution_cache = [] for p in _disjoint_set_roots(bijectionist._P): self.milp.add_constraint(sum(self._x[p, z] for z in bijectionist._possible_block_values[p]) == 1, name=f"block {p}"[:50]) + self.add_alpha_beta_constraints() + self.add_distribution_constraints() + self.add_pseudo_inverse_relation_constraints() + self.add_intertwining_relation_constraints(preimage_blocks) + if get_verbose() >= 2: + self.show() def show(self, variables=True): r""" @@ -2701,31 +2683,12 @@ def solve(self, additional_constraints, solution_index=0): TESTS:: - sage: A = B = ["a", "b"] - sage: bij = Bijectionist(A, B) sage: from sage.combinat.bijectionist import _BijectionistMILP - sage: bmilp = _BijectionistMILP(bij) - sage: len(bmilp._solution_cache) - 0 - - Without any constraints, we do not require that the solution is a bijection:: - - sage: bmilp.solve([bmilp._x["a", "a"] == 1, bmilp._x["b", "a"] == 1]) - {('a', 'a'): True, ('a', 'b'): False, ('b', 'a'): True, ('b', 'b'): False} - sage: len(bmilp._solution_cache) - 1 - sage: bmilp.solve([bmilp._x["a", "b"] == 1, bmilp._x["b", "b"] == 1]) - {('a', 'a'): False, ('a', 'b'): True, ('b', 'a'): False, ('b', 'b'): True} - sage: len(bmilp._solution_cache) - 2 - - A more elaborate test:: - sage: N = 2; A = B = [dyck_word for n in range(N+1) for dyck_word in DyckWords(n)] sage: tau = lambda D: D.number_of_touch_points() sage: bij = Bijectionist(A, B, tau) sage: bij.set_statistics((lambda d: d.semilength(), lambda d: d.semilength())) - sage: bmilp = bij._initialize_new_bmilp() + sage: bmilp = _BijectionistMILP(bij) Generate a solution:: @@ -2739,14 +2702,14 @@ def solve(self, additional_constraints, solution_index=0): Generating a new solution that also maps `1010` to `2` fails: - sage: bmilp.solve([bmilp._x[DyckWord([1,0,1,0]), 1] <= 0.5], solution_index=1) + sage: bmilp.solve([bmilp._x[DyckWord([1,0,1,0]), 2] == 1], solution_index=1) Traceback (most recent call last): ... MIPSolverException: ... no feasible solution However, searching for a cached solution succeeds, for inequalities and equalities:: - sage: bmilp.solve([bmilp._x[DyckWord([1,0,1,0]), 1] <= 0.5]) + sage: bmilp.solve([bmilp._x[DyckWord([1,0,1,0]), 2] >= 1]) {([], 0): True, ([1, 0], 1): True, ([1, 0, 1, 0], 1): False, @@ -2762,6 +2725,9 @@ def solve(self, additional_constraints, solution_index=0): ([1, 1, 0, 0], 1): True, ([1, 1, 0, 0], 2): False} + sage: len(bmilp._solution_cache) + 1 + """ assert 0 <= solution_index <= len(self._solution_cache), "the index of the desired solution must not be larger than the number of known solutions" # check whether there is a solution in the cache satisfying @@ -2894,10 +2860,8 @@ def add_alpha_beta_constraints(self): sage: A = B = [permutation for n in range(3) for permutation in Permutations(n)] sage: bij = Bijectionist(A, B, len) sage: bij.set_statistics((len, len)) - sage: bij._compute_possible_block_values() sage: from sage.combinat.bijectionist import _BijectionistMILP - sage: bmilp = _BijectionistMILP(bij) - sage: bmilp.add_alpha_beta_constraints() + sage: bmilp = _BijectionistMILP(bij) # indirect doctest sage: bmilp.solve([]) {([], 0): True, ([1], 1): True, ([1, 2], 2): True, ([2, 1], 2): True} """ @@ -2947,18 +2911,16 @@ def add_distribution_constraints(self): sage: tau = Permutation.longest_increasing_subsequence_length sage: bij = Bijectionist(A, B, tau) sage: bij.set_distributions(([Permutation([1, 2, 3]), Permutation([1, 3, 2])], [1, 3])) - sage: bij._compute_possible_block_values() sage: from sage.combinat.bijectionist import _BijectionistMILP - sage: bmilp = _BijectionistMILP(bij) - sage: bmilp.add_distribution_constraints() + sage: bmilp = _BijectionistMILP(bij) # indirect doctest sage: _ = bmilp.solve([]) sage: bmilp.solution(False) {[1, 2, 3]: 3, [1, 3, 2]: 1, - [2, 1, 3]: 3, - [2, 3, 1]: 3, - [3, 1, 2]: 3, - [3, 2, 1]: 3} + [2, 1, 3]: 2, + [2, 3, 1]: 2, + [3, 1, 2]: 2, + [3, 2, 1]: 2} """ Z = self._bijectionist._Z @@ -3026,11 +2988,8 @@ def add_intertwining_relation_constraints(self, origins): sage: pi = lambda p1, p2: 'abcdefgh'[A.index(p1) + A.index(p2)] sage: rho = lambda s1, s2: (s1 + s2) % 2 sage: bij.set_intertwining_relations((2, pi, rho)) - sage: preimage_blocks = bij._preprocess_intertwining_relations() - sage: bij._compute_possible_block_values() sage: from sage.combinat.bijectionist import _BijectionistMILP - sage: bmilp = _BijectionistMILP(bij) - sage: bmilp.add_intertwining_relation_constraints(preimage_blocks) + sage: bmilp = _BijectionistMILP(bij) # indirect doctest sage: _ = bmilp.solve([]) sage: bmilp.solution(False) {'a': 0, 'b': 1, 'c': 0, 'd': 1} From 2d349114a367d5c7196ad50f1e847dfe466857c7 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Sat, 31 Dec 2022 00:11:50 +0100 Subject: [PATCH 257/751] slightly simplify logic of _forced_constant_blocks, use defaultdict --- src/sage/combinat/bijectionist.py | 175 ++++++++++++++---------------- 1 file changed, 81 insertions(+), 94 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 4da0be9fd9f..b6a80db5acb 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -367,13 +367,13 @@ # https://www.gnu.org/licenses/ # *************************************************************************** import itertools -from collections import namedtuple +from collections import namedtuple, defaultdict from sage.numerical.mip import MixedIntegerLinearProgram, MIPSolverException from sage.rings.integer_ring import ZZ from sage.combinat.set_partition import SetPartition from sage.sets.disjoint_set import DisjointSet from sage.structure.sage_object import SageObject -from copy import copy, deepcopy +from copy import deepcopy from sage.misc.verbose import get_verbose @@ -1419,7 +1419,7 @@ def set_pseudo_inverse_relation(self, *phi_psi): sage: A = B = DyckWords(3) sage: bij = Bijectionist(A, B) sage: bij.set_statistics((lambda D: D.number_of_touch_points(), lambda D: D.number_of_initial_rises())) - sage: ascii_art(list(bij.minimal_subdistributions_iterator())) + sage: ascii_art(sorted(bij.minimal_subdistributions_iterator())) [ ( [ /\ ] ) [ ( [ / \ ] ) ( [ /\ /\ ] [ /\ /\/\ ] ) [ ( [ /\/\/\ ], [ / \ ] ), ( [ /\/ \, / \/\ ], [ / \/\, / \ ] ), @@ -1428,7 +1428,7 @@ def set_pseudo_inverse_relation(self, *phi_psi): ( [ /\/\ / \ ] [ /\ ] ) ] ( [ / \, / \ ], [ /\/\/\, /\/ \ ] ) ] sage: bij.set_pseudo_inverse_relation((lambda D: D, lambda D: D)) - sage: ascii_art(list(bij.minimal_subdistributions_iterator())) + sage: ascii_art(sorted(bij.minimal_subdistributions_iterator())) [ ( [ /\ ] ) [ ( [ / \ ] ) ( [ /\ ] [ /\/\ ] ) [ ( [ /\/\/\ ], [ / \ ] ), ( [ /\/ \ ], [ / \ ] ), @@ -1623,61 +1623,59 @@ def _forced_constant_blocks(self): self._bmilp = _BijectionistMILP(self) self._bmilp.solve([]) - # generate blockwise preimage to determine which blocks have the same image solution = self._bmilp.solution(True) + # multiple_preimages[tZ] are the blocks p which have the same + # value tZ[i] in the i-th known solution multiple_preimages = {(z,): tP for z, tP in _invert_dict(solution).items() if len(tP) > 1} - # check for each pair of blocks if a solution with different - # values on these block exists - - # if yes, use the new solution to update the - # multiple_preimages dictionary, restart the check - # if no, the two blocks can be joined - # _P has to be copied to not mess with the solution process # since we do not want to regenerate the bmilp in each step, # so blocks have to stay consistent during the whole process tmp_P = deepcopy(self._P) - updated_preimages = True - while updated_preimages: - updated_preimages = False - for tZ in copy(multiple_preimages): - if updated_preimages: - break - for i, j in itertools.combinations(copy(multiple_preimages[tZ]), r=2): - # veto two blocks having the same value - tmp_constraints = [] - for z in self._possible_block_values[i]: - if z in self._possible_block_values[j]: # intersection - tmp_constraints.append(self._bmilp._x[i, z] + self._bmilp._x[j, z] <= 1) - try: - self._bmilp.solve(tmp_constraints) - except MIPSolverException: - # no solution exists, join blocks - tmp_P.union(i, j) - if i in multiple_preimages[tZ] and j in multiple_preimages[tZ]: - # only one of the joined blocks should remain in the list - multiple_preimages[tZ].remove(j) - if len(multiple_preimages[tZ]) == 1: - del multiple_preimages[tZ] - break - else: - # solution exists, update dictionary - solution = self._bmilp.solution(True) - updated_multiple_preimages = {} - for values in multiple_preimages: - for p in multiple_preimages[values]: - solution_tuple = (*values, solution[p]) - if solution_tuple not in updated_multiple_preimages: - updated_multiple_preimages[solution_tuple] = [] - updated_multiple_preimages[solution_tuple].append(p) - updated_preimages = True - multiple_preimages = updated_multiple_preimages - break - self.set_constant_blocks(tmp_P) + # check whether blocks p1 and p2 can have different values, + # if so return such a solution + def different_values(p1, p2): + tmp_constraints = [self._bmilp._x[p1, z] + self._bmilp._x[p2, z] <= 1 + for z in self._possible_block_values[p1] + if z in self._possible_block_values[p2]] + try: + self._bmilp.solve(tmp_constraints) + return self._bmilp.solution(True) + except MIPSolverException: + pass + + # try to find a pair of blocks having the same value on all + # known solutions, and a solution such that the values are + # different on this solution + def merge_until_split(): + for tZ in list(multiple_preimages): + tP = multiple_preimages[tZ] + for i2 in range(len(tP)-1, -1, -1): + for i1 in range(i2): + solution = different_values(tP[i1], tP[i2]) + if solution is None: + tmp_P.union(tP[i1], tP[i2]) + if len(multiple_preimages[tZ]) == 2: + del multiple_preimages[tZ] + else: + tP.remove(tP[i2]) + break # skip all pairs (i, j) containing i2 + return solution + + while True: + solution = merge_until_split() + if solution is None: + self.set_constant_blocks(tmp_P) + return + + updated_multiple_preimages = defaultdict(list) + for tZ, tP in multiple_preimages.items(): + for p in tP: + updated_multiple_preimages[tZ + (solution[p],)].append(p) + multiple_preimages = updated_multiple_preimages def possible_values(self, p=None, optimal=False): r""" @@ -1782,38 +1780,34 @@ def possible_values(self, p=None, optimal=False): blocks.add(self._P.find(p2)) if optimal: - # function adding a solution to dict of solutions - def add_solution(solutions, solution): - for p, value in solution.items(): - if p not in solutions: - solutions[p] = set() - solutions[p].add(value) - # generate initial solution, solution dict and add solution if self._bmilp is None: self._bmilp = _BijectionistMILP(self) self._bmilp.solve([]) + solutions = defaultdict(set) solution = self._bmilp.solution(False) - solutions = {} - add_solution(solutions, solution) + for p, z in solution.items(): + solutions[p].add(z) # iterate through blocks and generate all values for p in blocks: tmp_constraints = [] - for value in solutions[p]: - tmp_constraints.append(self._bmilp._x[p, value] == 0) + for z in solutions[p]: + tmp_constraints.append(self._bmilp._x[p, z] == 0) while True: try: # problem has a solution, so new value was found self._bmilp.solve(tmp_constraints) - solution = self._bmilp.solution(False) - add_solution(solutions, solution) - # veto new value and try again - tmp_constraints.append(self._bmilp._x[p, solution[p]] == 0) except MIPSolverException: # no solution, so all possible values have been found break + solution = self._bmilp.solution(False) + for p, z in solution.items(): + solutions[p].add(z) + # veto new value and try again + tmp_constraints.append(self._bmilp._x[p, solution[p]] == 0) + # create dictionary to return possible_values = {} @@ -2210,13 +2204,10 @@ def _preprocess_intertwining_relations(self): something_changed = False # collect (preimage, image) pairs by (representatives) of # the blocks of the elements of the preimage - updated_images = {} # (p_1,...,p_k) to {a_1,....} + updated_images = defaultdict(set) # (p_1,...,p_k) to {a_1,....} for a_tuple, image_set in images.items(): representatives = tuple(self._P.find(a) for a in a_tuple) - if representatives in updated_images: - updated_images[representatives].update(image_set) - else: - updated_images[representatives] = image_set + updated_images[representatives].update(image_set) # merge blocks for a_tuple, image_set in updated_images.items(): @@ -2670,7 +2661,9 @@ def show(self, variables=True): def solve(self, additional_constraints, solution_index=0): r""" - Return a solution satisfying the given additional constraints. + Find a solution satisfying the given additional constraints. + + The solution can then be retrieved using :meth:`solution`. INPUT: @@ -2693,12 +2686,8 @@ def solve(self, additional_constraints, solution_index=0): Generate a solution:: sage: bmilp.solve([]) - {([], 0): True, - ([1, 0], 1): True, - ([1, 0, 1, 0], 1): False, - ([1, 0, 1, 0], 2): True, - ([1, 1, 0, 0], 1): True, - ([1, 1, 0, 0], 2): False} + sage: bmilp.solution(False) + {[]: 0, [1, 0]: 1, [1, 0, 1, 0]: 2, [1, 1, 0, 0]: 1} Generating a new solution that also maps `1010` to `2` fails: @@ -2710,20 +2699,12 @@ def solve(self, additional_constraints, solution_index=0): However, searching for a cached solution succeeds, for inequalities and equalities:: sage: bmilp.solve([bmilp._x[DyckWord([1,0,1,0]), 2] >= 1]) - {([], 0): True, - ([1, 0], 1): True, - ([1, 0, 1, 0], 1): False, - ([1, 0, 1, 0], 2): True, - ([1, 1, 0, 0], 1): True, - ([1, 1, 0, 0], 2): False} + sage: bmilp.solution(False) + {[]: 0, [1, 0]: 1, [1, 0, 1, 0]: 2, [1, 1, 0, 0]: 1} sage: bmilp.solve([bmilp._x[DyckWord([1,0,1,0]), 1] == 0]) - {([], 0): True, - ([1, 0], 1): True, - ([1, 0, 1, 0], 1): False, - ([1, 0, 1, 0], 2): True, - ([1, 1, 0, 0], 1): True, - ([1, 1, 0, 0], 2): False} + sage: bmilp.solution(False) + {[]: 0, [1, 0]: 1, [1, 0, 1, 0]: 2, [1, 1, 0, 0]: 1} sage: len(bmilp._solution_cache) 1 @@ -2736,17 +2717,23 @@ def solve(self, additional_constraints, solution_index=0): if all(self._is_solution(constraint, solution) for constraint in additional_constraints): self.last_solution = solution - return self.last_solution + return # otherwise generate a new one new_indices = [] for constraint in additional_constraints: - new_indices.extend(self.milp.add_constraint(constraint, return_indices=True)) + new_indices.extend(self.milp.add_constraint(constraint, + return_indices=True)) try: self.milp.solve() self.last_solution = self.milp.get_values(self._x, convert=bool, tolerance=0.1) finally: + b = self.milp.get_backend() + if hasattr(b, "_get_model"): + m = b._get_model() + if m.getStatus() != 'unknown': + m.freeTransform() self.milp.remove_constraints(new_indices) # veto the solution, by requiring that not all variables with @@ -2759,7 +2746,6 @@ def solve(self, additional_constraints, solution_index=0): name="veto") self._solution_cache.append(self.last_solution) - return self.last_solution def _is_solution(self, constraint, values): r""" @@ -2863,7 +2849,8 @@ def add_alpha_beta_constraints(self): sage: from sage.combinat.bijectionist import _BijectionistMILP sage: bmilp = _BijectionistMILP(bij) # indirect doctest sage: bmilp.solve([]) - {([], 0): True, ([1], 1): True, ([1, 2], 2): True, ([2, 1], 2): True} + sage: bmilp.solution(False) + {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 2} """ W = self._bijectionist._W Z = self._bijectionist._Z @@ -3032,7 +3019,7 @@ def add_pseudo_inverse_relation_constraints(self): sage: A = B = DyckWords(3) sage: bij = Bijectionist(A, B) sage: bij.set_statistics((lambda D: D.number_of_touch_points(), lambda D: D.number_of_initial_rises())) - sage: ascii_art(list(bij.minimal_subdistributions_iterator())) + sage: ascii_art(sorted(bij.minimal_subdistributions_iterator())) [ ( [ /\ ] ) [ ( [ / \ ] ) ( [ /\ /\ ] [ /\ /\/\ ] ) [ ( [ /\/\/\ ], [ / \ ] ), ( [ /\/ \, / \/\ ], [ / \/\, / \ ] ), @@ -3041,7 +3028,7 @@ def add_pseudo_inverse_relation_constraints(self): ( [ /\/\ / \ ] [ /\ ] ) ] ( [ / \, / \ ], [ /\/\/\, /\/ \ ] ) ] sage: bij.set_pseudo_inverse_relation((lambda D: D, lambda D: D)) # indirect doctest - sage: ascii_art(list(bij.minimal_subdistributions_iterator())) + sage: ascii_art(sorted(bij.minimal_subdistributions_iterator())) [ ( [ /\ ] ) [ ( [ / \ ] ) ( [ /\ ] [ /\/\ ] ) [ ( [ /\/\/\ ], [ / \ ] ), ( [ /\/ \ ], [ / \ ] ), From c2f0062e977fe6ff595862ce72e061d87aaf2d32 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Sat, 31 Dec 2022 00:23:49 +0100 Subject: [PATCH 258/751] slight simplification --- src/sage/combinat/bijectionist.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index b6a80db5acb..b69c620f669 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -1643,9 +1643,9 @@ def different_values(p1, p2): if z in self._possible_block_values[p2]] try: self._bmilp.solve(tmp_constraints) - return self._bmilp.solution(True) except MIPSolverException: - pass + return + return self._bmilp.solution(True) # try to find a pair of blocks having the same value on all # known solutions, and a solution such that the values are @@ -1792,9 +1792,8 @@ def possible_values(self, p=None, optimal=False): # iterate through blocks and generate all values for p in blocks: - tmp_constraints = [] - for z in solutions[p]: - tmp_constraints.append(self._bmilp._x[p, z] == 0) + tmp_constraints = [self._bmilp._x[p, z] == 0 + for z in solutions[p]] while True: try: # problem has a solution, so new value was found @@ -1803,12 +1802,11 @@ def possible_values(self, p=None, optimal=False): # no solution, so all possible values have been found break solution = self._bmilp.solution(False) - for p, z in solution.items(): - solutions[p].add(z) + for p0, z in solution.items(): + solutions[p0].add(z) # veto new value and try again tmp_constraints.append(self._bmilp._x[p, solution[p]] == 0) - # create dictionary to return possible_values = {} for p in blocks: From 78968aebf38b7ca80295a67c296ef0e8df213b7a Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Sat, 31 Dec 2022 14:13:04 +0100 Subject: [PATCH 259/751] copy (instead of deepcopy) should be correct --- src/sage/combinat/bijectionist.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index b69c620f669..0e03f3ab6e3 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -373,7 +373,7 @@ from sage.combinat.set_partition import SetPartition from sage.sets.disjoint_set import DisjointSet from sage.structure.sage_object import SageObject -from copy import deepcopy +from copy import copy from sage.misc.verbose import get_verbose @@ -1633,7 +1633,7 @@ def _forced_constant_blocks(self): # _P has to be copied to not mess with the solution process # since we do not want to regenerate the bmilp in each step, # so blocks have to stay consistent during the whole process - tmp_P = deepcopy(self._P) + tmp_P = copy(self._P) # check whether blocks p1 and p2 can have different values, # if so return such a solution From 6ddaeae19c78bb860744fba4bf2b00dc3ef7cd74 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Sat, 31 Dec 2022 20:44:46 +0100 Subject: [PATCH 260/751] slightly simplify _preprocess_intertwining_relations --- src/sage/combinat/bijectionist.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 0e03f3ab6e3..45c73487f09 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -2181,7 +2181,7 @@ def _preprocess_intertwining_relations(self): (0, 'd', ('c', 'b')), (0, 'd', ('d', 'a'))} """ - images = {} # A^k -> A, a_1,...,a_k to pi(a_1,...,a_k), for all pi + images = defaultdict(set) # A^k -> A, a_1,...,a_k +-> {pi(a_1,...,a_k) for all pi} origins_by_elements = [] # (pi/rho, pi(a_1,...,a_k), a_1,...,a_k) for composition_index, pi_rho in enumerate(self._pi_rho): for a_tuple in itertools.product(*([self._A]*pi_rho.numargs)): @@ -2189,11 +2189,7 @@ def _preprocess_intertwining_relations(self): continue a = pi_rho.pi(*a_tuple) if a in self._A: - if a in images: - # this happens if there are several pi's of the same arity - images[a_tuple].add(a) # TODO: wouldn't self._P.find(a) be more efficient here? - else: - images[a_tuple] = set((a,)) # TODO: wouldn't self._P.find(a) be more efficient here? + images[a_tuple].add(a) origins_by_elements.append((composition_index, a, a_tuple)) # merge blocks From 60286e60eafe0206430176074e0b158a6d6f9d0a Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Sat, 31 Dec 2022 20:46:21 +0100 Subject: [PATCH 261/751] slightly improve non_copying_intersection --- src/sage/combinat/bijectionist.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 45c73487f09..ddfe65e454e 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -3111,20 +3111,21 @@ def _non_copying_intersection(sets): sage: _non_copying_intersection([A, B]) is A True + sage: A = set([1,2]); B = set([2,3]) + sage: _non_copying_intersection([A, B]) + {2} + """ sets = sorted(sets, key=len) result = set.intersection(*sets) n = len(result) - if n < len(sets[0]): - return result for s in sets: N = len(s) - if N > n: + if n < N: return result if s == result: return s - """ TESTS:: From c38f5b94d92171a2d18e884f9bdb095ff34ffc65 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Sat, 31 Dec 2022 21:15:50 +0100 Subject: [PATCH 262/751] add some internal documentation --- src/sage/combinat/bijectionist.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index ddfe65e454e..5fe36548a6f 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -2569,8 +2569,13 @@ def __init__(self, bijectionist: Bijectionist): # _elements_distributions # _W, _Z, _A, _B, _P, _alpha, _beta, _tau, _pi_rho, _phi_psi self._bijectionist = bijectionist + # the variables of the MILP are indexed by pairs (p, z), for + # p in _P and z an element of _posible_block_values[p]. + # Thus, _P and _posible_block_values have to be fixed before + # creating the MILP. preimage_blocks = bijectionist._preprocess_intertwining_relations() bijectionist._compute_possible_block_values() + self.milp = MixedIntegerLinearProgram(solver=bijectionist._solver) self.milp.set_objective(None) self._solution_cache = [] From 59b4f542c7bd831115939fca320b6410901f74c3 Mon Sep 17 00:00:00 2001 From: Miguel Marco Date: Sun, 1 Jan 2023 23:51:48 +0100 Subject: [PATCH 263/751] Implementation of simplicial set covers and simplicial stes of group presentations --- src/sage/categories/simplicial_sets.py | 213 +++++++++++++++++++ src/sage/topology/simplicial_set.py | 26 +-- src/sage/topology/simplicial_set_catalog.py | 4 +- src/sage/topology/simplicial_set_examples.py | 62 ++++++ 4 files changed, 284 insertions(+), 21 deletions(-) diff --git a/src/sage/categories/simplicial_sets.py b/src/sage/categories/simplicial_sets.py index 8587e78aebf..438eea4523c 100644 --- a/src/sage/categories/simplicial_sets.py +++ b/src/sage/categories/simplicial_sets.py @@ -366,6 +366,219 @@ def fundamental_group(self, simplify=True): else: return FG.quotient(rels) + def universal_cover_map(self): + r""" + Return the universal covering map of the simplicial set. + + It requires the fundamental group to be finite. + + EXAMPLES:: + + sage: RP2 = simplicial_sets.RealProjectiveSpace(2) + sage: phi = RP2.universal_cover_map() + sage: phi + Simplicial set morphism: + From: Simplicial set with 6 non-degenerate simplices + To: RP^2 + Defn: [(1, 1), (1, e), (f, 1), (f, e), (f * f, 1), (f * f, e)] --> [1, 1, f, f, f * f, f * f] + sage: phi.domain().face_data() + {(f, 1): ((1, e), (1, 1)), + (f, e): ((1, 1), (1, e)), + (f * f, 1): ((f, e), s_0 (1, 1), (f, 1)), + (f * f, e): ((f, 1), s_0 (1, e), (f, e)), + (1, e): None, + (1, 1): None} + + """ + from sage.groups.free_group import FreeGroup + skel = self.n_skeleton(2) + graph = skel.graph() + if not skel.is_connected(): + graph = graph.subgraph(skel.base_point()) + edges = [e[2] for e in graph.edges(sort=False)] + spanning_tree = [e[2] for e in graph.min_spanning_tree()] + gens = [e for e in edges if e not in spanning_tree] + + if not gens: + return self + + gens_dict = dict(zip(gens, range(len(gens)))) + FG = FreeGroup(len(gens), 'e') + rels = [] + + for f in skel.n_cells(2): + z = dict() + for i, sigma in enumerate(skel.faces(f)): + if sigma in spanning_tree: + z[i] = FG.one() + elif sigma.is_degenerate(): + z[i] = FG.one() + elif sigma in edges: + z[i] = FG.gen(gens_dict[sigma]) + else: + # sigma is not in the correct connected component. + z[i] = FG.one() + rels.append(z[0]*z[1].inverse()*z[2]) + G = FG.quotient(rels) + char = {g : G.gen(i) for i,g in enumerate(gens)} + for e in edges: + if not e in gens: + char[e] = G.one() + return self.covering_map(char) + + def covering_map(self, character): + r""" + Return the covering map associated to a character. + + The character is represented by a dictionary, that assigns an + element of a finite group to each nondegenerate 1-dimensional + cell. It should correspond to an epimorphism from the fundamental + group. + + INPUT: + + - ``character`` -- a dictionary + + + EXAMPLES:: + + sage: S1 = simplicial_sets.Sphere(1) + sage: W = S1.wedge(S1) + sage: G = CyclicPermutationGroup(3) + sage: C = W.covering_map({a : G.gen(0), b : G.one()}) + sage: C + Simplicial set morphism: + From: Simplicial set with 9 non-degenerate simplices + To: Wedge: (S^1 v S^1) + Defn: [(*, ()), (*, (1,2,3)), (*, (1,3,2)), (sigma_1, ()), (sigma_1, ()), (sigma_1, (1,2,3)), (sigma_1, (1,2,3)), (sigma_1, (1,3,2)), (sigma_1, (1,3,2))] --> [*, *, *, sigma_1, sigma_1, sigma_1, sigma_1, sigma_1, sigma_1] + sage: C.domain() + Simplicial set with 9 non-degenerate simplices + sage: C.domain().face_data() + {(sigma_1, ()): ((*, ()), (*, ())), + (sigma_1, (1,2,3)): ((*, (1,2,3)), (*, (1,2,3))), + (sigma_1, (1,3,2)): ((*, (1,3,2)), (*, (1,3,2))), + (sigma_1, ()): ((*, ()), (*, ())), + (sigma_1, (1,2,3)): ((*, (1,2,3)), (*, (1,2,3))), + (sigma_1, (1,3,2)): ((*, (1,3,2)), (*, (1,3,2))), + (*, ()): None, + (*, (1,3,2)): None, + (*, (1,2,3)): None} + + """ + from sage.topology.simplicial_set import AbstractSimplex, SimplicialSet + from sage.topology.simplicial_set_morphism import SimplicialSetMorphism + char = {a : b for (a,b) in character.items()} + G = list(char.values())[0].parent() + if not G.is_finite(): + raise NotImplementedError("can only compute universal covers of spaces with finite fundamental group") + cells_dict = {} + faces_dict = {} + + for s in self.n_cells(0): + for g in G: + cell = AbstractSimplex(0,name="({}, {})".format(s, g)) + cells_dict[(s,g)] = cell + char[s] = G.one() + + for d in range(1, self.dimension() + 1): + for s in self.n_cells(d): + if not s in char.keys(): + if d==1 and s.is_degenerate(): + char[s] = G.one() + elif s.is_degenerate(): + if 0 in s.degeneracies(): + char[s] = G.one() + else: + char[s] = char[s.nondegenerate()] + else: + char[s] = char[self.face(s, d)] + if s.is_nondegenerate(): + for g in G: + cell = AbstractSimplex(d,name="({}, {})".format(s, g)) + cells_dict[(s,g)] = cell + fd = [] + faces = self.faces(s) + f0 = faces[0] + for h in G: + if h == g*char[s]: + lifted = h + break + grelems = [cells_dict[(f0.nondegenerate(), lifted)].apply_degeneracies(*f0.degeneracies())] + for f in faces[1:]: + grelems.append(cells_dict[(f.nondegenerate(), g)].apply_degeneracies(*f.degeneracies())) + faces_dict[cell] = grelems + cover = SimplicialSet(faces_dict, base_point=cells_dict[(self.base_point(), G.one())]) + cover_map_data = {c : s[0] for (s,c) in cells_dict.items()} + return SimplicialSetMorphism(data = cover_map_data, domain = cover, codomain = self) + + def cover(self, character): + r""" + Return the cover of the simplicial set associated to a character + of the fundamental group. + + The character is represented by a dictionary, that assigns an + element of a finite group to each nondegenerate 1-dimensional + cell. It should correspond to an epimorphism from the fundamental + group. + + INPUT: + + - ``character`` -- a dictionary + + EXAMPLES:: + + sage: S1 = simplicial_sets.Sphere(1) + sage: W = S1.wedge(S1) + sage: G = CyclicPermutationGroup(3) + sage: (a, b) = W.n_cells(1) + sage: C = W.cover({a : G.gen(0), b : G.gen(0)^2}).domain() + sage: C.face_data() + {(sigma_1, ()): ((*, (1,2,3)), (*, ())), + (sigma_1, (1,2,3)): ((*, (1,3,2)), (*, (1,2,3))), + (sigma_1, (1,3,2)): ((*, ()), (*, (1,3,2))), + (sigma_1, ()): ((*, (1,3,2)), (*, ())), + (sigma_1, (1,2,3)): ((*, ()), (*, (1,2,3))), + (sigma_1, (1,3,2)): ((*, (1,2,3)), (*, (1,3,2))), + (*, (1,2,3)): None, + (*, ()): None, + (*, (1,3,2)): None} + sage: C.homology(1) + Z x Z x Z x Z + sage: C.fundamental_group() + Finitely presented group < e0, e1, e2, e3 | > + + """ + return self.covering_map(character).domain() + + def universal_cover(self): + r""" + Return the universal cover of the simplicial set. + The fundamental group must be finite in order to ensure that the + universal cover is a simplicial set of finite type. + + EXAMPLES:: + + sage: RP3 = simplicial_sets.RealProjectiveSpace(3) + sage: C = RP3.universal_cover() + sage: C + Simplicial set with 8 non-degenerate simplices + sage: C.face_data() + {(f, 1): ((1, e), (1, 1)), + (f, e): ((1, 1), (1, e)), + (f * f, 1): ((f, e), s_0 (1, 1), (f, 1)), + (f * f, e): ((f, 1), s_0 (1, e), (f, e)), + (f * f * f, 1): ((f * f, e), s_0 (f, 1), s_1 (f, 1), (f * f, 1)), + (f * f * f, e): ((f * f, 1), s_0 (f, e), s_1 (f, e), (f * f, e)), + (1, e): None, + (1, 1): None} + sage: C.fundamental_group() + Finitely presented group < | > + + + """ + return self.universal_cover_map().domain() + + def is_simply_connected(self): """ Return ``True`` if this pointed simplicial set is simply connected. diff --git a/src/sage/topology/simplicial_set.py b/src/sage/topology/simplicial_set.py index 0ca2ff5bcb2..3312e0411e4 100644 --- a/src/sage/topology/simplicial_set.py +++ b/src/sage/topology/simplicial_set.py @@ -1686,26 +1686,12 @@ def graph(self): sage: Sigma3.nerve().is_connected() True """ - skel = self.n_skeleton(1) - edges = skel.n_cells(1) - vertices = skel.n_cells(0) - used_vertices = set() # vertices which are in an edge - d = {} - for e in edges: - v = skel.face(e, 0) - w = skel.face(e, 1) - if v in d: - if w in d[v]: - d[v][w] = d[v][w] + [e] - else: - d[v][w] = [e] - else: - d[v] = {w: [e]} - used_vertices.update([v, w]) - for v in vertices: - if v not in used_vertices: - d[v] = {} - return Graph(d, format='dict_of_dicts') + G = Graph(loops=True, multiedges=True) + for e in self.n_cells(1): + G.add_edge(self.face(e,0), self.face(e,1), e) + for v in self.n_cells(0): + G.add_vertex(v) + return G def is_connected(self): """ diff --git a/src/sage/topology/simplicial_set_catalog.py b/src/sage/topology/simplicial_set_catalog.py index 70607a1ab41..d20df19e4a1 100644 --- a/src/sage/topology/simplicial_set_catalog.py +++ b/src/sage/topology/simplicial_set_catalog.py @@ -26,6 +26,8 @@ - the Hopf map: this is a pre-built morphism, from which one can extract its domain, codomain, mapping cone, etc. +- the complex of a group presentation. + All of these examples are accessible by typing ``simplicial_sets.NAME``, where ``NAME`` is the name of the example. Type ``simplicial_sets.[TAB]`` for a complete list. @@ -48,4 +50,4 @@ KleinBottle, Torus, Simplex, Horn, Point, ComplexProjectiveSpace, - HopfMap) + HopfMap, PresentationComplex) diff --git a/src/sage/topology/simplicial_set_examples.py b/src/sage/topology/simplicial_set_examples.py index 279cf8b7c7d..8cd657574df 100644 --- a/src/sage/topology/simplicial_set_examples.py +++ b/src/sage/topology/simplicial_set_examples.py @@ -9,6 +9,8 @@ AUTHORS: - John H. Palmieri (2016-07) + +- Miguel Marco (2022-12) """ # **************************************************************************** # Copyright (C) 2016 John H. Palmieri @@ -48,6 +50,8 @@ from sage.misc.lazy_import import lazy_import lazy_import('sage.categories.simplicial_sets', 'SimplicialSets') + + ######################################################################## # The nerve of a finite monoid, used in sage.categories.finite_monoid. @@ -790,3 +794,61 @@ def HopfMap(): return S3.Hom(S2)({alpha_1:s0_sigma, alpha_2:s1_sigma, alpha_3:s2_sigma, alpha_4:s0_sigma, alpha_5:s2_sigma, alpha_6:s1_sigma}) + + +def PresentationComplex(G): + r""" + Return a simplicial set constructed from a group presentation. + The result is a subdivision of the presentation complex. + + INPUT: + + - "G" -- a finitely presented group + + EXAMPLES:: + + sage: G = SymmetricGroup(2).as_finitely_presented_group() + sage: G + Finitely presented group < a | a^2 > + sage: S = simplicial_sets.PresentationComplex(G) + sage: S + Simplicial set with 5 non-degenerate simplices + sage: S.face_data() + {Delta^0: None, + a: (Delta^0, Delta^0), + a^-1: (Delta^0, Delta^0), + Ta: (a, s_0 Delta^0, a^-1), + a^2: (a, s_0 Delta^0, a)} + sage: S.fundamental_group() + Finitely presented group < e0 | e0^2 > + """ + O = AbstractSimplex(0) + SO = O.apply_degeneracies(0) + edges = {g: AbstractSimplex(1, name=str(g)) for g in G.gens()} + inverseedges = {g.inverse(): AbstractSimplex(1, name=str(g.inverse())) for g in G.gens()} + all_edges = {} + all_edges.update(edges) + all_edges.update(inverseedges) + triangles = {g: AbstractSimplex(2, name='T' + str(g)) for g in G.gens()} + face_maps = {g: [O, O] for g in all_edges.values()} + face_maps.update({triangles[t]: [all_edges[t], SO, all_edges[t.inverse()]] for t in triangles}) + for r in G.relations(): + if len(r.Tietze()) == 1: + pass + elif len(r.Tietze()) == 2: + a = all_edges[G([r.Tietze()[0]])] + b = all_edges[G([r.Tietze()[1]])] + T = AbstractSimplex(2, name=str(r)) + face_maps[T] = [a, SO, b] + else: + words = [all_edges[G([a])] for a in r.Tietze()] + words[-1] = all_edges[G([-r.Tietze()[-1]])] + while len(words) > 3: + auxedge = AbstractSimplex(1) + face_maps[auxedge] = [O, O] + auxtring = AbstractSimplex(2) + face_maps[auxtring] = [words[1], auxedge, words[0]] + words = [auxedge] + words[2:] + auxtring = AbstractSimplex(2) + face_maps[auxtring] = [words[1], words[2], words[0]] + return SimplicialSet_finite(face_maps, base_point=O) From 6fb06f0b17b08528f53e7299d610b67ecf216b11 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Mon, 2 Jan 2023 12:50:50 +0100 Subject: [PATCH 264/751] untangle _preprocess_intertwining_relations --- src/sage/combinat/bijectionist.py | 121 +++++++++++++++--------------- 1 file changed, 62 insertions(+), 59 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 5fe36548a6f..564b2b3d287 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -479,7 +479,7 @@ class Bijectionist(SageObject): """ def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], - pi_rho=tuple(), phi_psi=tuple(), + pi_rho=tuple(), phi_psi=tuple(), Q=None, elements_distributions=tuple(), value_restrictions=tuple(), solver=None, key=None): """ @@ -503,11 +503,11 @@ def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], # k arity of pi and rho # pi: A^k -> A, rho: Z^k -> Z # a_tuple in A^k - assert len(A) == len(set(A)), "A must have distinct items" - assert len(B) == len(set(B)), "B must have distinct items" + self._A = list(A) + self._B = list(B) + assert len(self._A) == len(set(self._A)), "A must have distinct items" + assert len(self._B) == len(set(self._B)), "B must have distinct items" self._bmilp = None - self._A = A - self._B = B self._sorter = {} self._sorter["A"] = lambda x: sorted(x, key=self._A.index) self._sorter["B"] = lambda x: sorted(x, key=self._B.index) @@ -2127,15 +2127,9 @@ def add_counter_example_constraint(s): def _preprocess_intertwining_relations(self): r""" - Make `self._P` be the finest set partition coarser than `self._P` - such that composing elements preserves blocks. - - OUTPUT: - - A list of triples `((\pi/\rho, p, (p_1,\dots,p_k))`, where - `p` is the block of `\rho(s(a_1),\dots, s(a_k))`, for any - `a_i\in p_i`, suitable for - :meth:`_BijectionistMILP.add_intertwining_relation_constraints`. + Make ``self._P`` be the finest set partition coarser + than ``self._P`` such that composing elements preserves + blocks. Suppose that `p_1`, `p_2` are blocks of `P`, and `a_1, a'_1 \in p_1` and `a_2, a'_2\in p_2`. Then, @@ -2153,14 +2147,17 @@ def _preprocess_intertwining_relations(self): In other words, `s(\pi(a_1,\dots,a_k))` only depends on the blocks of `a_1,\dots,a_k`. + In particular, if `P` consists only if singletons, this + method has no effect. + .. TODO:: create one test with one and one test with two - intertwining_relations + intertwining relations .. TODO:: - untangle side effect and return value if possible + it is not clear, whether this method makes sense EXAMPLES:: @@ -2170,27 +2167,29 @@ def _preprocess_intertwining_relations(self): sage: rho = lambda s1, s2: (s1 + s2) % 2 sage: bij.set_intertwining_relations((2, pi, rho)) sage: bij._preprocess_intertwining_relations() - {(0, 'a', ('a', 'a')), - (0, 'b', ('a', 'b')), - (0, 'b', ('b', 'a')), - (0, 'c', ('a', 'c')), - (0, 'c', ('b', 'b')), - (0, 'c', ('c', 'a')), - (0, 'd', ('a', 'd')), - (0, 'd', ('b', 'c')), - (0, 'd', ('c', 'b')), - (0, 'd', ('d', 'a'))} + sage: bij._P + {{'a'}, {'b'}, {'c'}, {'d'}} + + Let a group act on permutations:: + + sage: A = B = Permutations(3) + sage: bij = Bijectionist(A, B, lambda x: x[0]) + sage: bij.set_intertwining_relations((1, lambda pi: pi.reverse(), lambda z: z)) + sage: bij._preprocess_intertwining_relations() + sage: bij._P + {{[1, 2, 3]}, {[1, 3, 2]}, {[2, 1, 3]}, {[2, 3, 1]}, {[3, 1, 2]}, {[3, 2, 1]}} + """ + A = self._A + P = self._P images = defaultdict(set) # A^k -> A, a_1,...,a_k +-> {pi(a_1,...,a_k) for all pi} - origins_by_elements = [] # (pi/rho, pi(a_1,...,a_k), a_1,...,a_k) for composition_index, pi_rho in enumerate(self._pi_rho): - for a_tuple in itertools.product(*([self._A]*pi_rho.numargs)): + for a_tuple in itertools.product(*([A]*pi_rho.numargs)): if pi_rho.domain is not None and not pi_rho.domain(*a_tuple): continue a = pi_rho.pi(*a_tuple) - if a in self._A: + if a in A: images[a_tuple].add(a) - origins_by_elements.append((composition_index, a, a_tuple)) # merge blocks something_changed = True @@ -2200,27 +2199,20 @@ def _preprocess_intertwining_relations(self): # the blocks of the elements of the preimage updated_images = defaultdict(set) # (p_1,...,p_k) to {a_1,....} for a_tuple, image_set in images.items(): - representatives = tuple(self._P.find(a) for a in a_tuple) + representatives = tuple(P.find(a) for a in a_tuple) updated_images[representatives].update(image_set) # merge blocks for a_tuple, image_set in updated_images.items(): image = image_set.pop() while image_set: - self._P.union(image, image_set.pop()) + P.union(image, image_set.pop()) something_changed = True # we keep a representative image_set.add(image) images = updated_images - origins = set() - for composition_index, image, preimage in origins_by_elements: - origins.add((composition_index, - self._P.find(image), - tuple(self._P.find(a) for a in preimage))) - return origins - def solutions_iterator(self): r""" An iterator over all solutions of the problem. @@ -2573,7 +2565,7 @@ def __init__(self, bijectionist: Bijectionist): # p in _P and z an element of _posible_block_values[p]. # Thus, _P and _posible_block_values have to be fixed before # creating the MILP. - preimage_blocks = bijectionist._preprocess_intertwining_relations() + bijectionist._preprocess_intertwining_relations() bijectionist._compute_possible_block_values() self.milp = MixedIntegerLinearProgram(solver=bijectionist._solver) @@ -2591,7 +2583,7 @@ def __init__(self, bijectionist: Bijectionist): self.add_alpha_beta_constraints() self.add_distribution_constraints() self.add_pseudo_inverse_relation_constraints() - self.add_intertwining_relation_constraints(preimage_blocks) + self.add_intertwining_relation_constraints() if get_verbose() >= 2: self.show() @@ -2925,7 +2917,7 @@ def add_distribution_constraints(self): for a, z in zip(tA_sum, tZ_sum): self.milp.add_constraint(a == z, name=f"d: {a} == {z}") - def add_intertwining_relation_constraints(self, origins): + def add_intertwining_relation_constraints(self): r""" Add constraints corresponding to the given intertwining relations. @@ -2980,23 +2972,34 @@ def add_intertwining_relation_constraints(self, origins): sage: bmilp.solution(False) {'a': 0, 'b': 1, 'c': 0, 'd': 1} """ - for composition_index, image_block, preimage_blocks in origins: - pi_rho = self._bijectionist._pi_rho[composition_index] - # iterate over all possible value combinations of the origin blocks - for z_tuple in itertools.product(*[self._bijectionist._possible_block_values[p] - for p in preimage_blocks]): - rhs = 1 - pi_rho.numargs + sum(self._x[p_i, z_i] - for p_i, z_i in zip(preimage_blocks, z_tuple)) - z = pi_rho.rho(*z_tuple) - if z in self._bijectionist._possible_block_values[image_block]: - c = self._x[image_block, z] - rhs - if c.is_zero(): - continue - self.milp.add_constraint(c >= 0, - name=f"pi/rho({composition_index})") - else: - self.milp.add_constraint(rhs <= 0, - name=f"pi/rho({composition_index})") + A = self._bijectionist._A + tZ = self._bijectionist._possible_block_values + P = self._bijectionist._P + for composition_index, pi_rho in enumerate(self._bijectionist._pi_rho): + pi_blocks = set() + for a_tuple in itertools.product(*([A]*pi_rho.numargs)): + if pi_rho.domain is not None and not pi_rho.domain(*a_tuple): + continue + a = pi_rho.pi(*a_tuple) + if a in A: + p_tuple = tuple(P.find(a) for a in a_tuple) + p = P.find(a) + if (p_tuple, p) not in pi_blocks: + pi_blocks.add((p_tuple, p)) + for z_tuple in itertools.product(*[tZ[p] for p in p_tuple]): + rhs = (1 - pi_rho.numargs + + sum(self._x[p_i, z_i] + for p_i, z_i in zip(p_tuple, z_tuple))) + z = pi_rho.rho(*z_tuple) + if z in tZ[p]: + c = self._x[p, z] - rhs + if c.is_zero(): + continue + self.milp.add_constraint(c >= 0, + name=f"pi/rho({composition_index})") + else: + self.milp.add_constraint(rhs <= 0, + name=f"pi/rho({composition_index})") def add_pseudo_inverse_relation_constraints(self): r""" From 706056e5dbdaf049f56963d2cf67300267899142 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Mon, 2 Jan 2023 13:25:27 +0100 Subject: [PATCH 265/751] add possibility to require a homomesy --- src/sage/combinat/bijectionist.py | 64 ++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 564b2b3d287..106d81c4a49 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -370,7 +370,7 @@ from collections import namedtuple, defaultdict from sage.numerical.mip import MixedIntegerLinearProgram, MIPSolverException from sage.rings.integer_ring import ZZ -from sage.combinat.set_partition import SetPartition +from sage.combinat.set_partition import SetPartition, SetPartitions from sage.sets.disjoint_set import DisjointSet from sage.structure.sage_object import SageObject from copy import copy @@ -534,6 +534,7 @@ def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], self.set_value_restrictions(*value_restrictions) self.set_distributions(*elements_distributions) self.set_pseudo_inverse_relation(*phi_psi) + self.set_homomesic(Q) self.set_intertwining_relations(*pi_rho) self.set_constant_blocks(P) @@ -1445,6 +1446,31 @@ def set_pseudo_inverse_relation(self, *phi_psi): self._bmilp = None self._phi_psi = phi_psi + def set_homomesic(self, Q): + """ + Assert that the average of `s` on each block of `Q` is + constant. + + INPUT: + + - ``Q``, a set partition of ``A``. + + EXAMPLES:: + + sage: A = B = [1,2,3] + sage: bij = Bijectionist(A, B, lambda b: b % 3) + sage: bij.set_homomesic([[1,2], [3]]) + sage: list(bij.solutions_iterator()) + [{1: 2, 2: 0, 3: 1}, {1: 0, 2: 2, 3: 1}] + + """ + self._bmilp = None + if Q is None: + self._Q = None + else: + self._Q = SetPartition(Q) + assert self._Q in SetPartitions(self._A), f"{Q} must be a set partition of A" + def _forced_constant_blocks(self): r""" Modify current partition into blocks to the coarsest possible @@ -2583,6 +2609,7 @@ def __init__(self, bijectionist: Bijectionist): self.add_alpha_beta_constraints() self.add_distribution_constraints() self.add_pseudo_inverse_relation_constraints() + self.add_homomesic_constraints() self.add_intertwining_relation_constraints() if get_verbose() >= 2: self.show() @@ -3059,6 +3086,41 @@ def add_pseudo_inverse_relation_constraints(self): else: self.milp.add_constraint(self._x[p, z] == 0, name=f"i: s({p})!={z}") + def add_homomesic_constraints(self): + r""" + Add constraints enforcing that `s` has constant average + on the blocks of `Q`. + + We do this by adding + + .. MATH:: + + \frac{1}{|q|}\sum_{a\in q} \sum_z z x_{p(a), z} = + \frac{1}{|q_0|}\sum_{a\in q_0} \sum_z z x_{p(a), z}, + + for `q\in Q`, where `q_0` is some fixed block of `Q`. + + EXAMPLES:: + + sage: A = B = [1,2,3] + sage: bij = Bijectionist(A, B, lambda b: b % 3) + sage: bij.set_homomesic([[1,2], [3]]) # indirect doctest + sage: list(bij.solutions_iterator()) + [{1: 2, 2: 0, 3: 1}, {1: 0, 2: 2, 3: 1}] + """ + Q = self._bijectionist._Q + if Q is None: + return + P = self._bijectionist._P + tZ = self._bijectionist._possible_block_values + + def sum_q(q): + return sum(sum(z*self._x[P.find(a), z] for z in tZ[P.find(a)]) + for a in q) + q0 = Q[0] + v0 = sum_q(q0) + for q in Q[1:]: + self.milp.add_constraint(len(q0)*sum_q(q) == len(q)*v0, name=f"h: ({q})~({q0})") def _invert_dict(d): """ From 65b0c4adfff850b54c98695d8c027dc20a510ff6 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Tue, 3 Jan 2023 00:58:42 +0100 Subject: [PATCH 266/751] preserve the cache of solutions after computing the optimal constant blocks --- src/sage/combinat/bijectionist.py | 70 +++++++++++++++++++++---------- 1 file changed, 49 insertions(+), 21 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 106d81c4a49..1b5adffbf06 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -15,11 +15,14 @@ :widths: 30, 70 :delim: | - :meth:`~Bijectionist.set_intertwining_relations` | Declare that the statistic intertwines with other maps. - :meth:`~Bijectionist.set_constant_blocks` | Declare that the statistic is constant on some sets. :meth:`~Bijectionist.set_statistics` | Declare statistics that are preserved by the bijection. :meth:`~Bijectionist.set_value_restrictions` | Restrict the values of the statistic on an element. + :meth:`~Bijectionist.set_constant_blocks` | Declare that the statistic is constant on some sets. :meth:`~Bijectionist.set_distributions` | Restrict the distribution of values of the statistic on some elements. + :meth:`~Bijectionist.set_intertwining_relations` | Declare that the statistic intertwines with other maps. + :meth:`~Bijectionist.set_pseudo_inverse_relation` | Declare that the statistic satisfies a certain relation. + :meth:`~Bijectionist.set_homomesic` | Declare that the statistic is homomesic with respect to a given set partition. + :meth:`~Bijectionist.statistics_table` | Print a table collecting information on the given statistics. :meth:`~Bijectionist.statistics_fibers` | Collect elements with the same statistics. @@ -1168,7 +1171,7 @@ def set_distributions(self, *elements_distributions): [([[]], [0]), ([[1]], [1]), ([[1, 2, 3]], [3]), - ([[2, 1, 3]], [2]), + ([[2, 3, 1]], [2]), ([[1, 2], [2, 1]], [1, 2])] TESTS: @@ -1694,7 +1697,10 @@ def merge_until_split(): while True: solution = merge_until_split() if solution is None: - self.set_constant_blocks(tmp_P) + self._P = tmp_P + # recreate the MILP + self._bmilp = _BijectionistMILP(self, + self._bmilp._solution_cache) return updated_multiple_preimages = defaultdict(list) @@ -2040,7 +2046,7 @@ def minimal_subdistributions_blocks_iterator(self): sage: bij.constant_blocks(optimal=True) {{'a', 'b'}} sage: list(bij.minimal_subdistributions_blocks_iterator()) - [(['a', 'a', 'c', 'd', 'e'], [1, 1, 2, 2, 3])] + [(['b', 'b', 'c', 'd', 'e'], [1, 1, 2, 2, 3])] An example with overlapping minimal subdistributions:: @@ -2561,7 +2567,7 @@ class is used to manage the MILP, add constraints, solve the problem and check for uniqueness of solution values. """ - def __init__(self, bijectionist: Bijectionist): + def __init__(self, bijectionist: Bijectionist, solutions=None): r""" Initialize the mixed integer linear program. @@ -2569,6 +2575,11 @@ def __init__(self, bijectionist: Bijectionist): - ``bijectionist`` -- an instance of :class:`Bijectionist`. + - ``solutions`` (optional, default: ``None``) -- a list of + solutions of the problem, each provided as a dictionary + mapping `(a, z)` to a Boolean, such that at least one + element from each block of `P` appears as `a`. + .. TODO:: it might be cleaner not to pass the full bijectionist @@ -2581,6 +2592,7 @@ def __init__(self, bijectionist: Bijectionist): sage: from sage.combinat.bijectionist import _BijectionistMILP sage: _BijectionistMILP(bij) + """ # the attributes of the bijectionist class we actually use: # _possible_block_values @@ -2596,15 +2608,15 @@ def __init__(self, bijectionist: Bijectionist): self.milp = MixedIntegerLinearProgram(solver=bijectionist._solver) self.milp.set_objective(None) - self._solution_cache = [] indices = [(p, z) for p, tZ in bijectionist._possible_block_values.items() for z in tZ] self._x = self.milp.new_variable(binary=True, indices=indices) - for p in _disjoint_set_roots(bijectionist._P): - self.milp.add_constraint(sum(self._x[p, z] - for z in bijectionist._possible_block_values[p]) == 1, + tZ = bijectionist._possible_block_values + P = bijectionist._P + for p in _disjoint_set_roots(P): + self.milp.add_constraint(sum(self._x[p, z] for z in tZ[p]) == 1, name=f"block {p}"[:50]) self.add_alpha_beta_constraints() self.add_distribution_constraints() @@ -2614,6 +2626,12 @@ def __init__(self, bijectionist: Bijectionist): if get_verbose() >= 2: self.show() + self._solution_cache = [] + if solutions is not None: + for solution in solutions: + self._add_solution({(P.find(a), z): value + for (a, z), value in solution.items()}) + def show(self, variables=True): r""" Print the constraints and variables of the MILP together @@ -2744,8 +2762,9 @@ def solve(self, additional_constraints, solution_index=0): return_indices=True)) try: self.milp.solve() - self.last_solution = self.milp.get_values(self._x, - convert=bool, tolerance=0.1) + # moving this out of the try...finally block breaks SCIP + solution = self.milp.get_values(self._x, + convert=bool, tolerance=0.1) finally: b = self.milp.get_backend() if hasattr(b, "_get_model"): @@ -2754,16 +2773,23 @@ def solve(self, additional_constraints, solution_index=0): m.freeTransform() self.milp.remove_constraints(new_indices) - # veto the solution, by requiring that not all variables with - # value 1 have value 1 in the new MILP + self._add_solution(solution) + + def _add_solution(self, solution): + r""" + Add the ``last_solution`` to the cache and an + appropriate constraint to the MILP. + + """ active_vars = [self._x[p, z] for p in _disjoint_set_roots(self._bijectionist._P) for z in self._bijectionist._possible_block_values[p] - if self.last_solution[(p, z)]] + if solution[(p, z)]] self.milp.add_constraint(sum(active_vars) <= len(active_vars) - 1, name="veto") + self._solution_cache.append(solution) + self.last_solution = solution - self._solution_cache.append(self.last_solution) def _is_solution(self, constraint, values): r""" @@ -2833,9 +2859,11 @@ def solution(self, on_blocks): {'a': 0, 'c': 0} """ + P = self._bijectionist._P + tZ = self._bijectionist._possible_block_values mapping = {} # A -> Z or P -> Z, a +-> s(a) - for p, block in self._bijectionist._P.root_to_elements_dict().items(): - for z in self._bijectionist._possible_block_values[p]: + for p, block in P.root_to_elements_dict().items(): + for z in tZ[p]: if self.last_solution[p, z] == 1: if on_blocks: mapping[p] = z @@ -3285,9 +3313,9 @@ def _non_copying_intersection(sets): ([[3, 1, 2]], [3]) ([[4, 1, 2, 3]], [4]) ([[5, 1, 2, 3, 4]], [5]) - ([[2, 1, 4, 5, 3], [2, 3, 5, 1, 4], [2, 4, 1, 5, 3], [2, 4, 5, 1, 3]], [2, 3, 3, 3]) - ([[2, 1, 5, 3, 4], [2, 5, 1, 3, 4], [3, 1, 5, 2, 4], [3, 5, 1, 2, 4]], [3, 3, 4, 4]) - ([[1, 3, 2, 5, 4], [1, 3, 5, 2, 4], [1, 4, 2, 5, 3], [1, 4, 5, 2, 3], [1, 4, 5, 3, 2], [1, 5, 4, 2, 3], [1, 5, 4, 3, 2]], [2, 2, 3, 3, 3, 3, 3]) + ([[2, 3, 1, 5, 4], [2, 4, 5, 3, 1], [2, 5, 4, 1, 3], [3, 4, 1, 5, 2]], [2, 3, 3, 3]) + ([[3, 1, 2, 5, 4], [4, 1, 2, 5, 3], [3, 5, 2, 1, 4], [4, 1, 5, 2, 3]], [3, 3, 4, 4]) + ([[2, 1, 3, 5, 4], [2, 4, 1, 3, 5], [2, 5, 3, 1, 4], [3, 4, 1, 2, 5], [3, 1, 5, 4, 2], [2, 5, 1, 4, 3], [2, 1, 5, 4, 3]], [2, 2, 3, 3, 3, 3, 3]) sage: l = list(bij.solutions_iterator()); len(l) # not tested -- (17 seconds with SCIP on AMD Ryzen 5 PRO 3500U w/ Radeon Vega Mobile Gfx) 504 From 21cb54f6e116d3b89db4a4d3789c904cc1ce5177 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Tue, 3 Jan 2023 13:44:06 +0100 Subject: [PATCH 267/751] make _BijectionistMILP.solution the only entrypoint --- src/sage/combinat/bijectionist.py | 236 +++++++++++++----------------- 1 file changed, 103 insertions(+), 133 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 1b5adffbf06..1544adf786a 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -600,7 +600,7 @@ def set_constant_blocks(self, P): sage: bij.constant_blocks(optimal=True) Traceback (most recent call last): ... - MIPSolverException: ... + sage.numerical.mip.MIPSolverException... """ self._bmilp = None @@ -1650,9 +1650,10 @@ def _forced_constant_blocks(self): """ if self._bmilp is None: self._bmilp = _BijectionistMILP(self) - self._bmilp.solve([]) - solution = self._bmilp.solution(True) + solution = self._bmilp.solution(True, []) + if solution is None: + raise MIPSolverException # multiple_preimages[tZ] are the blocks p which have the same # value tZ[i] in the i-th known solution multiple_preimages = {(z,): tP @@ -1670,11 +1671,7 @@ def different_values(p1, p2): tmp_constraints = [self._bmilp._x[p1, z] + self._bmilp._x[p2, z] <= 1 for z in self._possible_block_values[p1] if z in self._possible_block_values[p2]] - try: - self._bmilp.solve(tmp_constraints) - except MIPSolverException: - return - return self._bmilp.solution(True) + return self._bmilp.solution(True, tmp_constraints) # try to find a pair of blocks having the same value on all # known solutions, and a solution such that the values are @@ -1720,14 +1717,35 @@ def possible_values(self, p=None, optimal=False): an element of a block of `P`, or a list of these - ``optimal`` (optional, default: ``False``) -- whether or - not to compute the minimal possible set of statistic values, - throws a MIPSolverException if no solution is found. + not to compute the minimal possible set of statistic values. .. NOTE:: computing the minimal possible set of statistic values may be computationally expensive. + .. TODO:: + + currently, calling this method with ``optimal=True`` does + not update the internal dictionary, because this would + interfere with the variables of the MILP. + + EXAMPLES:: + + sage: A = B = ["a", "b", "c", "d"] + sage: tau = {"a": 1, "b": 1, "c": 1, "d": 2}.get + sage: bij = Bijectionist(A, B, tau) + sage: bij.set_constant_blocks([["a", "b"]]) + sage: bij.possible_values(A) + {'a': {1, 2}, 'b': {1, 2}, 'c': {1, 2}, 'd': {1, 2}} + sage: bij.possible_values(A, optimal=True) + {'a': {1}, 'b': {1}, 'c': {1, 2}, 'd': {1, 2}} + + The internal dictionary is not updated:: + + sage: bij.possible_values(A) + {'a': {1, 2}, 'b': {1, 2}, 'c': {1, 2}, 'd': {1, 2}} + TESTS:: sage: A = B = ["a", "b", "c", "d"] @@ -1746,17 +1764,7 @@ def possible_values(self, p=None, optimal=False): sage: bij.possible_values(p=[["a", "b"], ["c"]]) {'a': {1, 2}, 'b': {1, 2}, 'c': {1, 2}} - Test optimal:: - - sage: bij.possible_values(p=["a", "c"], optimal=True) - {'a': {1, 2}, 'b': {1, 2}, 'c': {1, 2}} - - Verify by listing all solutions:: - - sage: sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))) - [{'a': 1, 'b': 1, 'c': 2, 'd': 2}, {'a': 2, 'b': 2, 'c': 1, 'd': 1}] - - Test if MIPSolverException is thrown:: + Test an unfeasible problem:: sage: A = B = list('ab') sage: bij = Bijectionist(A, B, lambda x: B.index(x) % 2) @@ -1764,40 +1772,7 @@ def possible_values(self, p=None, optimal=False): sage: bij.possible_values(p="a") {'a': {0, 1}, 'b': {0, 1}} sage: bij.possible_values(p="a", optimal=True) - Traceback (most recent call last): - ... - sage.numerical.mip.MIPSolverException: ... - - Another example:: - - sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] - sage: tau = Permutation.longest_increasing_subsequence_length - sage: bij = Bijectionist(A, B, tau) - sage: alpha = lambda p: p(1) if len(p) > 0 else 0 - sage: beta = lambda p: p(1) if len(p) > 0 else 0 - sage: bij.set_statistics((alpha, beta), (len, len)) - sage: for sol in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): - ....: print(sol) - {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 2, [1, 3, 2]: 3, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 1, [3, 2, 1]: 2} - {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 2, [1, 3, 2]: 3, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 1} - {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 3, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 1, [3, 2, 1]: 2} - {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 1, [1, 2, 3]: 3, [1, 3, 2]: 2, [2, 1, 3]: 2, [2, 3, 1]: 2, [3, 1, 2]: 2, [3, 2, 1]: 1} - sage: bij.possible_values(p=[Permutation([1]), Permutation([1, 2, 3]), Permutation([3, 1, 2])], optimal=True) - {[1]: {1}, [1, 2, 3]: {2, 3}, [3, 1, 2]: {1, 2}} - - Another example:: - - sage: N = 2; A = B = [dyck_word for n in range(N+1) for dyck_word in DyckWords(n)] - sage: tau = lambda D: D.number_of_touch_points() - sage: bij = Bijectionist(A, B, tau) - sage: bij.set_statistics((lambda d: d.semilength(), lambda d: d.semilength())) - sage: for solution in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): - ....: print(solution) - {[]: 0, [1, 0]: 1, [1, 0, 1, 0]: 1, [1, 1, 0, 0]: 2} - {[]: 0, [1, 0]: 1, [1, 0, 1, 0]: 2, [1, 1, 0, 0]: 1} - sage: bij.possible_values(p=[DyckWord([]), DyckWord([1, 0]), DyckWord([1, 0, 1, 0]), DyckWord([1, 1, 0, 0])], optimal=True) - {[]: {0}, [1, 0]: {1}, [1, 0, 1, 0]: {1, 2}, [1, 1, 0, 0]: {1, 2}} - + {'a': set(), 'b': set()} """ # convert input to set of block representatives blocks = set() @@ -1812,32 +1787,25 @@ def possible_values(self, p=None, optimal=False): blocks.add(self._P.find(p2)) if optimal: - # generate initial solution, solution dict and add solution if self._bmilp is None: self._bmilp = _BijectionistMILP(self) - self._bmilp.solve([]) solutions = defaultdict(set) - solution = self._bmilp.solution(False) - for p, z in solution.items(): - solutions[p].add(z) - - # iterate through blocks and generate all values - for p in blocks: - tmp_constraints = [self._bmilp._x[p, z] == 0 - for z in solutions[p]] - while True: - try: - # problem has a solution, so new value was found - self._bmilp.solve(tmp_constraints) - except MIPSolverException: - # no solution, so all possible values have been found - break - solution = self._bmilp.solution(False) - for p0, z in solution.items(): - solutions[p0].add(z) - # veto new value and try again - tmp_constraints.append(self._bmilp._x[p, solution[p]] == 0) + solution = self._bmilp.solution(True, []) + if solution is not None: + for p, z in solution.items(): + solutions[p].add(z) + for p in blocks: + tmp_constraints = [self._bmilp._x[p, z] == 0 + for z in solutions[p]] + while True: + solution = self._bmilp.solution(True, tmp_constraints) + if solution is None: + break + for p0, z in solution.items(): + solutions[p0].add(z) + # veto new value and try again + tmp_constraints.append(self._bmilp._x[p, solution[p]] == 0) # create dictionary to return possible_values = {} @@ -1906,13 +1874,9 @@ def minimal_subdistributions_iterator(self): minimal_subdistribution.set_objective(sum(D[a] for a in self._A)) minimal_subdistribution.add_constraint(sum(D[a] for a in self._A) >= 1) - try: - if self._bmilp is None: - self._bmilp = _BijectionistMILP(self) - self._bmilp.solve([]) - except MIPSolverException: - return - s = self._bmilp.solution(False) + if self._bmilp is None: + self._bmilp = _BijectionistMILP(self) + s = self._bmilp.solution(False, []) while True: for v in self._Z: minimal_subdistribution.add_constraint(sum(D[a] for a in self._A if s[a] == v) == V[v]) @@ -1986,12 +1950,9 @@ def _find_counter_example(self, P, s0, d, on_blocks): # z_in_d_count, because, if the distributions are # different, one such z must exist tmp_constraints = [z_in_d <= z_in_d_count - 1] - try: - bmilp.solve(tmp_constraints) - return bmilp.solution(on_blocks) - except MIPSolverException: - pass - return + solution = bmilp.solution(on_blocks, tmp_constraints) + if solution is not None: + return solution def minimal_subdistributions_blocks_iterator(self): r""" @@ -2129,12 +2090,9 @@ def add_counter_example_constraint(s): if s[p] == v) == V[v]) if self._bmilp is None: - try: - self._bmilp = _BijectionistMILP(self) - self._bmilp.solve([]) - except MIPSolverException: - return - s = self._bmilp.solution(True) + self._bmilp = _BijectionistMILP(self) + + s = self._bmilp.solution(True, []) add_counter_example_constraint(s) while True: try: @@ -2542,19 +2500,15 @@ def solutions_iterator(self): """ if self._bmilp is None: - try: - self._bmilp = _BijectionistMILP(self) - except MIPSolverException: - return + self._bmilp = _BijectionistMILP(self) bmilp = self._bmilp - solution_index = 0 + index = 0 while True: - try: - bmilp.solve([], solution_index) - except MIPSolverException: + solution = bmilp.solution(False, [], index) + if solution is None: return - yield bmilp.solution(False) - solution_index += 1 + index += 1 + yield solution if get_verbose() >= 2: print("after vetoing") bmilp.show(variables=False) @@ -2695,7 +2649,7 @@ def show(self, variables=True): print(f" {v}: " + "".join([f"s({a}) = " for a in P[p]]) + f"{z}") - def solve(self, additional_constraints, solution_index=0): + def _solve(self, additional_constraints, solution_index=0): r""" Find a solution satisfying the given additional constraints. @@ -2721,25 +2675,19 @@ def solve(self, additional_constraints, solution_index=0): Generate a solution:: - sage: bmilp.solve([]) - sage: bmilp.solution(False) + sage: bmilp.solution(False, []) # indirect doctest {[]: 0, [1, 0]: 1, [1, 0, 1, 0]: 2, [1, 1, 0, 0]: 1} Generating a new solution that also maps `1010` to `2` fails: - sage: bmilp.solve([bmilp._x[DyckWord([1,0,1,0]), 2] == 1], solution_index=1) - Traceback (most recent call last): - ... - MIPSolverException: ... no feasible solution + sage: bmilp.solution(False, [bmilp._x[DyckWord([1,0,1,0]), 2] == 1], index=1) However, searching for a cached solution succeeds, for inequalities and equalities:: - sage: bmilp.solve([bmilp._x[DyckWord([1,0,1,0]), 2] >= 1]) - sage: bmilp.solution(False) + sage: bmilp.solution(False, [bmilp._x[DyckWord([1,0,1,0]), 2] >= 1]) {[]: 0, [1, 0]: 1, [1, 0, 1, 0]: 2, [1, 1, 0, 0]: 1} - sage: bmilp.solve([bmilp._x[DyckWord([1,0,1,0]), 1] == 0]) - sage: bmilp.solution(False) + sage: bmilp.solution(False, [bmilp._x[DyckWord([1,0,1,0]), 1] == 0]) {[]: 0, [1, 0]: 1, [1, 0, 1, 0]: 2, [1, 1, 0, 0]: 1} sage: len(bmilp._solution_cache) @@ -2778,8 +2726,32 @@ def solve(self, additional_constraints, solution_index=0): def _add_solution(self, solution): r""" Add the ``last_solution`` to the cache and an - appropriate constraint to the MILP. + appropriate veto constraint to the MILP. + + INPUT: + - ``solution``, a dictionary from the indices of the MILP to + Boolean. + + EXAMPLES:: + + sage: A = B = ["a", "b"] + sage: bij = Bijectionist(A, B) + sage: from sage.combinat.bijectionist import _BijectionistMILP + sage: bmilp = _BijectionistMILP(bij) + sage: bmilp._add_solution({(a, b): a == b for a in A for b in B}) + sage: bmilp.show() # random + Constraints are: + block a: 1 <= x_0 + x_1 <= 1 + block b: 1 <= x_2 + x_3 <= 1 + statistics: 1 <= x_1 + x_3 <= 1 + statistics: 1 <= x_0 + x_2 <= 1 + veto: x_1 + x_2 <= 1 + Variables are: + x_0: s(a) = b + x_1: s(a) = a + x_2: s(b) = b + x_3: s(b) = a """ active_vars = [self._x[p, z] for p in _disjoint_set_roots(self._bijectionist._P) @@ -2790,7 +2762,6 @@ def _add_solution(self, solution): self._solution_cache.append(solution) self.last_solution = solution - def _is_solution(self, constraint, values): r""" Evaluate the given function at the given values. @@ -2810,7 +2781,7 @@ def _is_solution(self, constraint, values): sage: bij = Bijectionist(A, B) sage: from sage.combinat.bijectionist import _BijectionistMILP sage: bmilp = _BijectionistMILP(bij) - sage: _ = bmilp.solve([]) + sage: _ = bmilp._solve([]) sage: f = bmilp._x["a", "a"] + bmilp._x["b", "a"] >= bmilp._x["b", "b"] + 1 sage: v = {('a', 'a'): 1, ('a', 'b'): 0, ('b', 'a'): 1, ('b', 'b'): 1} sage: bmilp._is_solution(f, v) @@ -2836,15 +2807,13 @@ def _is_solution(self, constraint, values): return False return True - def solution(self, on_blocks): + def solution(self, on_blocks, constraints, index=0): r""" - Return the current solution as a dictionary from `A` (or - `P`) to `Z`. + Return a solution as a dictionary from `A` (or `P`) to + `Z`, or ``None`` INPUT: - - ``bmilp``, a :class:`_BijectionistMILP`. - - ``on_blocks``, whether to return the solution on blocks or on all elements @@ -2855,10 +2824,14 @@ def solution(self, on_blocks): sage: bij.set_constant_blocks([["a", "b"]]) sage: next(bij.solutions_iterator()) {'a': 0, 'b': 0, 'c': 0} - sage: bij._bmilp.solution(True) + sage: bij._bmilp.solution(True, []) {'a': 0, 'c': 0} - """ + try: + self._solve(constraints, index) + except MIPSolverException: + return + P = self._bijectionist._P tZ = self._bijectionist._possible_block_values mapping = {} # A -> Z or P -> Z, a +-> s(a) @@ -2894,8 +2867,7 @@ def add_alpha_beta_constraints(self): sage: bij.set_statistics((len, len)) sage: from sage.combinat.bijectionist import _BijectionistMILP sage: bmilp = _BijectionistMILP(bij) # indirect doctest - sage: bmilp.solve([]) - sage: bmilp.solution(False) + sage: bmilp.solution(False, []) {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 2} """ W = self._bijectionist._W @@ -2946,8 +2918,7 @@ def add_distribution_constraints(self): sage: bij.set_distributions(([Permutation([1, 2, 3]), Permutation([1, 3, 2])], [1, 3])) sage: from sage.combinat.bijectionist import _BijectionistMILP sage: bmilp = _BijectionistMILP(bij) # indirect doctest - sage: _ = bmilp.solve([]) - sage: bmilp.solution(False) + sage: bmilp.solution(False, []) {[1, 2, 3]: 3, [1, 3, 2]: 1, [2, 1, 3]: 2, @@ -3023,8 +2994,7 @@ def add_intertwining_relation_constraints(self): sage: bij.set_intertwining_relations((2, pi, rho)) sage: from sage.combinat.bijectionist import _BijectionistMILP sage: bmilp = _BijectionistMILP(bij) # indirect doctest - sage: _ = bmilp.solve([]) - sage: bmilp.solution(False) + sage: bmilp.solution(False, []) {'a': 0, 'b': 1, 'c': 0, 'd': 1} """ A = self._bijectionist._A From a573bb4cdb914a689e20eaaa51c43860f1e48a7d Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Tue, 3 Jan 2023 20:50:18 +0100 Subject: [PATCH 268/751] remove unnecessary calls to list in doctests --- src/sage/combinat/bijectionist.py | 33 ++++++++++++++----------------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 1544adf786a..1ebb54ab0dd 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -42,8 +42,7 @@ `(s, wex, fix) \sim (llis, des, adj)`:: sage: N = 3 - sage: As = [list(Permutations(n)) for n in range(N+1)] - sage: A = B = sum(As, []) + sage: A = B = [pi for n in range(N+1) for pi in Permutations(n)] sage: alpha1 = lambda p: len(p.weak_excedences()) sage: alpha2 = lambda p: len(p.fixed_points()) sage: beta1 = lambda p: len(p.descents(final_descent=True)) if p else 0 @@ -106,7 +105,7 @@ +-----------+---+--------+--------+--------+ sage: from sage.combinat.cyclic_sieving_phenomenon import orbit_decomposition - sage: bij.set_constant_blocks(sum([orbit_decomposition(A, rotate_permutation) for A in As], [])) + sage: bij.set_constant_blocks(orbit_decomposition(A, rotate_permutation)) sage: bij.constant_blocks() {{[1, 3, 2], [2, 1, 3], [3, 2, 1]}} sage: next(bij.solutions_iterator()) @@ -124,9 +123,9 @@ There is no rotation invariant statistic on non crossing set partitions which is equidistributed with the Strahler number on ordered trees:: - sage: N = 8; As = [[SetPartition(d.to_noncrossing_partition()) for d in DyckWords(n)] for n in range(N)] - sage: A = sum(As, []) - sage: B = sum([list(OrderedTrees(n)) for n in range(1, N+1)], []) + sage: N = 8; + sage: A = [SetPartition(d.to_noncrossing_partition()) for n in range(N) for d in DyckWords(n)] + sage: B = [t for n in range(1, N+1) for t in OrderedTrees(n)] sage: theta = lambda m: SetPartition([[i % m.size() + 1 for i in b] for b in m]) The following code is equivalent to ``tau = findstat(397)``:: @@ -144,7 +143,7 @@ sage: bij = Bijectionist(A, B, tau) sage: bij.set_statistics((lambda a: a.size(), lambda b: b.node_number()-1)) sage: from sage.combinat.cyclic_sieving_phenomenon import orbit_decomposition - sage: bij.set_constant_blocks(sum([orbit_decomposition(A_n, theta) for A_n in As], [])) + sage: bij.set_constant_blocks(orbit_decomposition(A, theta)) sage: list(bij.solutions_iterator()) [] @@ -279,7 +278,7 @@ Constant blocks:: - sage: A = B = list('abcd') + sage: A = B = 'abcd' sage: pi = lambda p1, p2: 'abcdefgh'[A.index(p1) + A.index(p2)] sage: rho = lambda s1, s2: (s1 + s2) % 2 sage: bij = Bijectionist(A, B, lambda x: B.index(x) % 2, P=[['a', 'c']], pi_rho=((2, pi, rho),)) @@ -492,7 +491,7 @@ def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], Check that large input sets are handled well:: - sage: A = B = list(range(20000)) + sage: A = B = range(20000) sage: bij = Bijectionist(A, B) # long time """ # glossary of standard letters: @@ -569,7 +568,7 @@ def set_constant_blocks(self, P): current partition can be reviewed using :meth:`constant_blocks`:: - sage: A = B = list('abcd') + sage: A = B = 'abcd' sage: bij = Bijectionist(A, B, lambda x: B.index(x) % 2) sage: bij.constant_blocks() {} @@ -1766,7 +1765,7 @@ def possible_values(self, p=None, optimal=False): Test an unfeasible problem:: - sage: A = B = list('ab') + sage: A = B = 'ab' sage: bij = Bijectionist(A, B, lambda x: B.index(x) % 2) sage: bij.set_constant_blocks([['a', 'b']]) sage: bij.possible_values(p="a") @@ -2147,11 +2146,11 @@ def _preprocess_intertwining_relations(self): .. TODO:: - it is not clear, whether this method makes sense + it is not clear whether this method makes sense EXAMPLES:: - sage: A = B = list('abcd') + sage: A = B = 'abcd' sage: bij = Bijectionist(A, B, lambda x: B.index(x) % 2) sage: pi = lambda p1, p2: 'abcdefgh'[A.index(p1) + A.index(p2)] sage: rho = lambda s1, s2: (s1 + s2) % 2 @@ -2273,7 +2272,7 @@ def solutions_iterator(self): EXAMPLES:: - sage: A = B = list('abc') + sage: A = B = 'abc' sage: bij = Bijectionist(A, B, lambda x: B.index(x) % 2, solver="GLPK") sage: next(bij.solutions_iterator()) {'a': 0, 'b': 1, 'c': 0} @@ -2362,8 +2361,7 @@ def solutions_iterator(self): veto: x_0 + x_1 + x_3 + x_4 + x_6 + x_10 + x_14 <= 6 veto: x_0 + x_1 + x_2 + x_5 + x_6 + x_10 + x_14 <= 6 - Changing or re-setting problem parameters clears the internal cache and - prints even more information:: + Changing or re-setting problem parameters clears the internal cache:: sage: bij.set_constant_blocks(P) sage: _ = list(bij.solutions_iterator()) @@ -2519,7 +2517,6 @@ class _BijectionistMILP(): Wrapper class for the MixedIntegerLinearProgram (MILP). This class is used to manage the MILP, add constraints, solve the problem and check for uniqueness of solution values. - """ def __init__(self, bijectionist: Bijectionist, solutions=None): r""" @@ -2987,7 +2984,7 @@ def add_intertwining_relation_constraints(self): EXAMPLES:: - sage: A = B = list('abcd') + sage: A = B = 'abcd' sage: bij = Bijectionist(A, B, lambda x: B.index(x) % 2) sage: pi = lambda p1, p2: 'abcdefgh'[A.index(p1) + A.index(p2)] sage: rho = lambda s1, s2: (s1 + s2) % 2 From 686826127927622f10e97b8f0189ed46d3e55f89 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Tue, 3 Jan 2023 20:50:49 +0100 Subject: [PATCH 269/751] move iterator over all solutions to _BijectionistMILP --- src/sage/combinat/bijectionist.py | 38 ++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 1ebb54ab0dd..6f4833014af 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -2499,17 +2499,7 @@ def solutions_iterator(self): """ if self._bmilp is None: self._bmilp = _BijectionistMILP(self) - bmilp = self._bmilp - index = 0 - while True: - solution = bmilp.solution(False, [], index) - if solution is None: - return - index += 1 - yield solution - if get_verbose() >= 2: - print("after vetoing") - bmilp.show(variables=False) + yield from self._bmilp class _BijectionistMILP(): @@ -2843,6 +2833,32 @@ def solution(self, on_blocks, constraints, index=0): break return mapping + def __iter__(self): + r""" + Iterate over all solutions of the MILP. + + EXAMPLES:: + + sage: A = B = 'abc' + sage: bij = Bijectionist(A, B, lambda x: B.index(x) % 2, solver="GLPK") + sage: from sage.combinat.bijectionist import _BijectionistMILP + sage: list(_BijectionistMILP(bij)) + [{'a': 0, 'b': 1, 'c': 0}, + {'a': 1, 'b': 0, 'c': 0}, + {'a': 0, 'b': 0, 'c': 1}] + + """ + index = 0 + while True: + solution = self.solution(False, [], index) + if solution is None: + return + index += 1 + yield solution + if get_verbose() >= 2: + print("after vetoing") + self.show(variables=False) + def add_alpha_beta_constraints(self): r""" Add constraints enforcing that `(alpha, s)` is equidistributed From 61e97bc64d9742026ad8486784b25ea4c730b4f0 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Wed, 4 Jan 2023 01:17:43 +0100 Subject: [PATCH 270/751] merge _solve, solution and __iter__ --- src/sage/combinat/bijectionist.py | 321 +++++++++++------------------- 1 file changed, 120 insertions(+), 201 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 6f4833014af..279ce091c3a 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -599,7 +599,7 @@ def set_constant_blocks(self, P): sage: bij.constant_blocks(optimal=True) Traceback (most recent call last): ... - sage.numerical.mip.MIPSolverException... + StopIteration """ self._bmilp = None @@ -1650,9 +1650,7 @@ def _forced_constant_blocks(self): if self._bmilp is None: self._bmilp = _BijectionistMILP(self) - solution = self._bmilp.solution(True, []) - if solution is None: - raise MIPSolverException + solution = next(self._bmilp.solutions_iterator(True, [])) # multiple_preimages[tZ] are the blocks p which have the same # value tZ[i] in the i-th known solution multiple_preimages = {(z,): tP @@ -1670,7 +1668,7 @@ def different_values(p1, p2): tmp_constraints = [self._bmilp._x[p1, z] + self._bmilp._x[p2, z] <= 1 for z in self._possible_block_values[p1] if z in self._possible_block_values[p2]] - return self._bmilp.solution(True, tmp_constraints) + return next(self._bmilp.solutions_iterator(True, tmp_constraints)) # try to find a pair of blocks having the same value on all # known solutions, and a solution such that the values are @@ -1680,8 +1678,9 @@ def merge_until_split(): tP = multiple_preimages[tZ] for i2 in range(len(tP)-1, -1, -1): for i1 in range(i2): - solution = different_values(tP[i1], tP[i2]) - if solution is None: + try: + solution = different_values(tP[i1], tP[i2]) + except StopIteration: tmp_P.union(tP[i1], tP[i2]) if len(multiple_preimages[tZ]) == 2: del multiple_preimages[tZ] @@ -1788,23 +1787,26 @@ def possible_values(self, p=None, optimal=False): if optimal: if self._bmilp is None: self._bmilp = _BijectionistMILP(self) - + bmilp = self._bmilp solutions = defaultdict(set) - solution = self._bmilp.solution(True, []) - if solution is not None: + try: + solution = next(bmilp.solutions_iterator(True, [])) + except StopIteration: + pass + else: for p, z in solution.items(): solutions[p].add(z) for p in blocks: - tmp_constraints = [self._bmilp._x[p, z] == 0 - for z in solutions[p]] + tmp_constraints = [bmilp._x[p, z] == 0 for z in solutions[p]] while True: - solution = self._bmilp.solution(True, tmp_constraints) - if solution is None: + try: + solution = next(bmilp.solutions_iterator(True, tmp_constraints)) + except StopIteration: break for p0, z in solution.items(): solutions[p0].add(z) # veto new value and try again - tmp_constraints.append(self._bmilp._x[p, solution[p]] == 0) + tmp_constraints.append(bmilp._x[p, solution[p]] == 0) # create dictionary to return possible_values = {} @@ -1875,7 +1877,7 @@ def minimal_subdistributions_iterator(self): if self._bmilp is None: self._bmilp = _BijectionistMILP(self) - s = self._bmilp.solution(False, []) + s = next(self._bmilp.solutions_iterator(False, [])) while True: for v in self._Z: minimal_subdistribution.add_constraint(sum(D[a] for a in self._A if s[a] == v) == V[v]) @@ -1949,9 +1951,11 @@ def _find_counter_example(self, P, s0, d, on_blocks): # z_in_d_count, because, if the distributions are # different, one such z must exist tmp_constraints = [z_in_d <= z_in_d_count - 1] - solution = bmilp.solution(on_blocks, tmp_constraints) - if solution is not None: + try: + solution = next(bmilp.solutions_iterator(on_blocks, tmp_constraints)) return solution + except StopIteration: + pass def minimal_subdistributions_blocks_iterator(self): r""" @@ -2091,7 +2095,7 @@ def add_counter_example_constraint(s): if self._bmilp is None: self._bmilp = _BijectionistMILP(self) - s = self._bmilp.solution(True, []) + s = next(self._bmilp.solutions_iterator(True, [])) add_counter_example_constraint(s) while True: try: @@ -2310,59 +2314,10 @@ def solutions_iterator(self): {[]: 0, [1]: 0, [1, 2]: 1, [2, 1]: 0, [1, 2, 3]: 0, [1, 3, 2]: 1, [2, 1, 3]: 1, [3, 2, 1]: 1, [2, 3, 1]: 2, [3, 1, 2]: 2} {[]: 0, [1]: 0, [1, 2]: 0, [2, 1]: 1, [1, 2, 3]: 0, [1, 3, 2]: 1, [2, 1, 3]: 1, [3, 2, 1]: 1, [2, 3, 1]: 2, [3, 1, 2]: 2} - Setting the verbosity prints the MILP which is solved:: + Changing or re-setting problem parameters clears the internal + cache. Setting the verbosity prints the MILP which is solved.:: sage: set_verbose(2) - sage: _ = list(bij.solutions_iterator()) - after vetoing - Constraints are: - block []: 1 <= x_0 <= 1 - block [1]: 1 <= x_1 <= 1 - block [1, 2]: 1 <= x_2 + x_3 <= 1 - block [2, 1]: 1 <= x_4 + x_5 <= 1 - block [1, 2, 3]: 1 <= x_6 + x_7 + x_8 <= 1 - block [1, 3, 2]: 1 <= x_9 + x_10 + x_11 <= 1 - block [2, 3, 1]: 1 <= x_12 + x_13 + x_14 <= 1 - statistics: 1 <= x_0 <= 1 - statistics: 0 <= <= 0 - statistics: 0 <= <= 0 - statistics: 1 <= x_1 <= 1 - statistics: 0 <= <= 0 - statistics: 0 <= <= 0 - statistics: 1 <= x_2 + x_4 <= 1 - statistics: 1 <= x_3 + x_5 <= 1 - statistics: 0 <= <= 0 - statistics: 1 <= x_6 + 3 x_9 + 2 x_12 <= 1 - statistics: 3 <= x_7 + 3 x_10 + 2 x_13 <= 3 - statistics: 2 <= x_8 + 3 x_11 + 2 x_14 <= 2 - veto: x_0 + x_1 + x_3 + x_4 + x_6 + x_10 + x_14 <= 6 - veto: x_0 + x_1 + x_2 + x_5 + x_6 + x_10 + x_14 <= 6 - after vetoing - Constraints are: - block []: 1 <= x_0 <= 1 - block [1]: 1 <= x_1 <= 1 - block [1, 2]: 1 <= x_2 + x_3 <= 1 - block [2, 1]: 1 <= x_4 + x_5 <= 1 - block [1, 2, 3]: 1 <= x_6 + x_7 + x_8 <= 1 - block [1, 3, 2]: 1 <= x_9 + x_10 + x_11 <= 1 - block [2, 3, 1]: 1 <= x_12 + x_13 + x_14 <= 1 - statistics: 1 <= x_0 <= 1 - statistics: 0 <= <= 0 - statistics: 0 <= <= 0 - statistics: 1 <= x_1 <= 1 - statistics: 0 <= <= 0 - statistics: 0 <= <= 0 - statistics: 1 <= x_2 + x_4 <= 1 - statistics: 1 <= x_3 + x_5 <= 1 - statistics: 0 <= <= 0 - statistics: 1 <= x_6 + 3 x_9 + 2 x_12 <= 1 - statistics: 3 <= x_7 + 3 x_10 + 2 x_13 <= 3 - statistics: 2 <= x_8 + 3 x_11 + 2 x_14 <= 2 - veto: x_0 + x_1 + x_3 + x_4 + x_6 + x_10 + x_14 <= 6 - veto: x_0 + x_1 + x_2 + x_5 + x_6 + x_10 + x_14 <= 6 - - Changing or re-setting problem parameters clears the internal cache:: - sage: bij.set_constant_blocks(P) sage: _ = list(bij.solutions_iterator()) Constraints are: @@ -2499,8 +2454,7 @@ def solutions_iterator(self): """ if self._bmilp is None: self._bmilp = _BijectionistMILP(self) - yield from self._bmilp - + yield from self._bmilp.solutions_iterator(False, []) class _BijectionistMILP(): r""" @@ -2636,84 +2590,115 @@ def show(self, variables=True): print(f" {v}: " + "".join([f"s({a}) = " for a in P[p]]) + f"{z}") - def _solve(self, additional_constraints, solution_index=0): - r""" - Find a solution satisfying the given additional constraints. - The solution can then be retrieved using :meth:`solution`. + def _prepare_solution(self, on_blocks, solution): + r""" + Return the solution as a dictionary from `A` (or `P`) to + `Z`. INPUT: - - ``additional_constraints`` -- a list of constraints for the - underlying MILP - - - ``solution_index`` (optional, default: ``0``) -- an index - specifying how many of the solutions in the cache should be - ignored. + - ``on_blocks``, whether to return the solution on blocks or + on all elements TESTS:: - sage: from sage.combinat.bijectionist import _BijectionistMILP - sage: N = 2; A = B = [dyck_word for n in range(N+1) for dyck_word in DyckWords(n)] - sage: tau = lambda D: D.number_of_touch_points() - sage: bij = Bijectionist(A, B, tau) - sage: bij.set_statistics((lambda d: d.semilength(), lambda d: d.semilength())) - sage: bmilp = _BijectionistMILP(bij) - - Generate a solution:: + sage: A = B = ["a", "b", "c"] + sage: bij = Bijectionist(A, B, lambda x: 0) + sage: bij.set_constant_blocks([["a", "b"]]) + sage: next(bij.solutions_iterator()) + {'a': 0, 'b': 0, 'c': 0} + sage: bmilp = bij._bmilp + sage: bmilp._prepare_solution(True, bmilp._solution_cache[0]) + {'a': 0, 'c': 0} - sage: bmilp.solution(False, []) # indirect doctest - {[]: 0, [1, 0]: 1, [1, 0, 1, 0]: 2, [1, 1, 0, 0]: 1} + """ + P = self._bijectionist._P + tZ = self._bijectionist._possible_block_values + mapping = {} # A -> Z or P -> Z, a +-> s(a) + for p, block in P.root_to_elements_dict().items(): + for z in tZ[p]: + if solution[p, z] == 1: + if on_blocks: + mapping[p] = z + else: + for a in block: + mapping[a] = z + break + return mapping - Generating a new solution that also maps `1010` to `2` fails: + def solutions_iterator(self, on_blocks, additional_constraints): + r""" + Iterate over all solutions satisfying the additional constraints. - sage: bmilp.solution(False, [bmilp._x[DyckWord([1,0,1,0]), 2] == 1], index=1) + INPUT: - However, searching for a cached solution succeeds, for inequalities and equalities:: + - ``additional_constraints`` -- a list of constraints for the + underlying MILP. - sage: bmilp.solution(False, [bmilp._x[DyckWord([1,0,1,0]), 2] >= 1]) - {[]: 0, [1, 0]: 1, [1, 0, 1, 0]: 2, [1, 1, 0, 0]: 1} + - ``on_blocks``, whether to return the solution on blocks or + on all elements. - sage: bmilp.solution(False, [bmilp._x[DyckWord([1,0,1,0]), 1] == 0]) - {[]: 0, [1, 0]: 1, [1, 0, 1, 0]: 2, [1, 1, 0, 0]: 1} + TESTS:: - sage: len(bmilp._solution_cache) - 1 + sage: A = B = 'abc' + sage: bij = Bijectionist(A, B, lambda x: B.index(x) % 2, solver="GLPK") + sage: from sage.combinat.bijectionist import _BijectionistMILP + sage: bmilp = _BijectionistMILP(bij) + sage: it = bmilp.solutions_iterator(False, []) + sage: it2 = bmilp.solutions_iterator(False, [bmilp._x[('c', 1)] == 1]) + sage: next(it) + {'a': 0, 'b': 1, 'c': 0} + sage: next(it2) + {'a': 0, 'b': 0, 'c': 1} + sage: next(it) + {'a': 0, 'b': 0, 'c': 1} + sage: next(it) + {'a': 1, 'b': 0, 'c': 0} """ - assert 0 <= solution_index <= len(self._solution_cache), "the index of the desired solution must not be larger than the number of known solutions" - # check whether there is a solution in the cache satisfying - # the additional constraints - for solution in self._solution_cache[solution_index:]: - if all(self._is_solution(constraint, solution) - for constraint in additional_constraints): - self.last_solution = solution - return - - # otherwise generate a new one - new_indices = [] - for constraint in additional_constraints: - new_indices.extend(self.milp.add_constraint(constraint, - return_indices=True)) - try: - self.milp.solve() - # moving this out of the try...finally block breaks SCIP - solution = self.milp.get_values(self._x, - convert=bool, tolerance=0.1) - finally: - b = self.milp.get_backend() - if hasattr(b, "_get_model"): - m = b._get_model() - if m.getStatus() != 'unknown': - m.freeTransform() - self.milp.remove_constraints(new_indices) - - self._add_solution(solution) + i = 0 # the first unconsidered element of _solution_cache + while True: + # skip solutions which do not satisfy additional_constraints + while i < len(self._solution_cache): + solution = self._solution_cache[i] + i += 1 + if all(self._is_solution(constraint, solution) + for constraint in additional_constraints): + yield self._prepare_solution(on_blocks, solution) + break + else: + new_indices = [] + for constraint in additional_constraints: + new_indices.extend(self.milp.add_constraint(constraint, + return_indices=True)) + try: + self.milp.solve() + # moving this out of the try...finally block breaks SCIP + solution = self.milp.get_values(self._x, + convert=bool, tolerance=0.1) + except MIPSolverException: + return + finally: + b = self.milp.get_backend() + if hasattr(b, "_get_model"): + m = b._get_model() + if m.getStatus() != 'unknown': + m.freeTransform() + self.milp.remove_constraints(new_indices) + + self._add_solution(solution) + i += 1 + assert i == len(self._solution_cache) + yield self._prepare_solution(on_blocks, solution) + if get_verbose() >= 2: + print("after vetoing") + self.show(variables=False) def _add_solution(self, solution): r""" - Add the ``last_solution`` to the cache and an - appropriate veto constraint to the MILP. + Add the ``solution`` to the cache and an appropriate + veto constraint to the MILP. INPUT: @@ -2739,6 +2724,7 @@ def _add_solution(self, solution): x_1: s(a) = a x_2: s(b) = b x_3: s(b) = a + """ active_vars = [self._x[p, z] for p in _disjoint_set_roots(self._bijectionist._P) @@ -2747,7 +2733,6 @@ def _add_solution(self, solution): self.milp.add_constraint(sum(active_vars) <= len(active_vars) - 1, name="veto") self._solution_cache.append(solution) - self.last_solution = solution def _is_solution(self, constraint, values): r""" @@ -2768,7 +2753,6 @@ def _is_solution(self, constraint, values): sage: bij = Bijectionist(A, B) sage: from sage.combinat.bijectionist import _BijectionistMILP sage: bmilp = _BijectionistMILP(bij) - sage: _ = bmilp._solve([]) sage: f = bmilp._x["a", "a"] + bmilp._x["b", "a"] >= bmilp._x["b", "b"] + 1 sage: v = {('a', 'a'): 1, ('a', 'b'): 0, ('b', 'a'): 1, ('b', 'b'): 1} sage: bmilp._is_solution(f, v) @@ -2794,71 +2778,6 @@ def _is_solution(self, constraint, values): return False return True - def solution(self, on_blocks, constraints, index=0): - r""" - Return a solution as a dictionary from `A` (or `P`) to - `Z`, or ``None`` - - INPUT: - - - ``on_blocks``, whether to return the solution on blocks or - on all elements - - EXAMPLES:: - - sage: A = B = ["a", "b", "c"] - sage: bij = Bijectionist(A, B, lambda x: 0) - sage: bij.set_constant_blocks([["a", "b"]]) - sage: next(bij.solutions_iterator()) - {'a': 0, 'b': 0, 'c': 0} - sage: bij._bmilp.solution(True, []) - {'a': 0, 'c': 0} - """ - try: - self._solve(constraints, index) - except MIPSolverException: - return - - P = self._bijectionist._P - tZ = self._bijectionist._possible_block_values - mapping = {} # A -> Z or P -> Z, a +-> s(a) - for p, block in P.root_to_elements_dict().items(): - for z in tZ[p]: - if self.last_solution[p, z] == 1: - if on_blocks: - mapping[p] = z - else: - for a in block: - mapping[a] = z - break - return mapping - - def __iter__(self): - r""" - Iterate over all solutions of the MILP. - - EXAMPLES:: - - sage: A = B = 'abc' - sage: bij = Bijectionist(A, B, lambda x: B.index(x) % 2, solver="GLPK") - sage: from sage.combinat.bijectionist import _BijectionistMILP - sage: list(_BijectionistMILP(bij)) - [{'a': 0, 'b': 1, 'c': 0}, - {'a': 1, 'b': 0, 'c': 0}, - {'a': 0, 'b': 0, 'c': 1}] - - """ - index = 0 - while True: - solution = self.solution(False, [], index) - if solution is None: - return - index += 1 - yield solution - if get_verbose() >= 2: - print("after vetoing") - self.show(variables=False) - def add_alpha_beta_constraints(self): r""" Add constraints enforcing that `(alpha, s)` is equidistributed @@ -2880,7 +2799,7 @@ def add_alpha_beta_constraints(self): sage: bij.set_statistics((len, len)) sage: from sage.combinat.bijectionist import _BijectionistMILP sage: bmilp = _BijectionistMILP(bij) # indirect doctest - sage: bmilp.solution(False, []) + sage: next(bmilp.solutions_iterator(False, [])) {[]: 0, [1]: 1, [1, 2]: 2, [2, 1]: 2} """ W = self._bijectionist._W @@ -2931,7 +2850,7 @@ def add_distribution_constraints(self): sage: bij.set_distributions(([Permutation([1, 2, 3]), Permutation([1, 3, 2])], [1, 3])) sage: from sage.combinat.bijectionist import _BijectionistMILP sage: bmilp = _BijectionistMILP(bij) # indirect doctest - sage: bmilp.solution(False, []) + sage: next(bmilp.solutions_iterator(False, [])) {[1, 2, 3]: 3, [1, 3, 2]: 1, [2, 1, 3]: 2, @@ -3007,7 +2926,7 @@ def add_intertwining_relation_constraints(self): sage: bij.set_intertwining_relations((2, pi, rho)) sage: from sage.combinat.bijectionist import _BijectionistMILP sage: bmilp = _BijectionistMILP(bij) # indirect doctest - sage: bmilp.solution(False, []) + sage: next(bmilp.solutions_iterator(False, [])) {'a': 0, 'b': 1, 'c': 0, 'd': 1} """ A = self._bijectionist._A From 9be1db026217b02db82f84ee454a353160699aba Mon Sep 17 00:00:00 2001 From: Miguel Marco Date: Wed, 4 Jan 2023 19:01:22 +0100 Subject: [PATCH 271/751] Deduplicate code in fundamental group and universal cover --- src/sage/categories/simplicial_sets.py | 124 +++++++++++-------------- src/sage/topology/simplicial_set.py | 2 +- 2 files changed, 54 insertions(+), 72 deletions(-) diff --git a/src/sage/categories/simplicial_sets.py b/src/sage/categories/simplicial_sets.py index 438eea4523c..6223c5b9d26 100644 --- a/src/sage/categories/simplicial_sets.py +++ b/src/sage/categories/simplicial_sets.py @@ -317,7 +317,7 @@ def fundamental_group(self, simplify=True): sage: Sigma3 = groups.permutation.Symmetric(3) sage: BSigma3 = Sigma3.nerve() sage: pi = BSigma3.fundamental_group(); pi - Finitely presented group < e0, e1 | e0^2, e1^3, (e0*e1^-1)^2 > + Finitely presented group < e1, e2 | e2^2, e1^3, (e2*e1)^2 > sage: pi.order() 6 sage: pi.is_abelian() @@ -331,19 +331,27 @@ def fundamental_group(self, simplify=True): """ # Import this here to prevent importing libgap upon startup. from sage.groups.free_group import FreeGroup - skel = self.n_skeleton(2) + if not self.n_cells(1): + return FreeGroup([]).quotient([]) + FG = self._universal_cover_dict()[0] + if simplify: + return FG.simplified() + else: + return FG + def _universal_cover_dict(self): + r""" + Return the fundamental group and dictionary sending each edge to + the corresponding group element + """ + from sage.groups.free_group import FreeGroup + skel = self.n_skeleton(2) graph = skel.graph() if not skel.is_connected(): graph = graph.subgraph(skel.base_point()) - - edges = [e[2] for e in graph.edges(sort=True)] + edges = [e[2] for e in graph.edges(sort=False)] spanning_tree = [e[2] for e in graph.min_spanning_tree()] gens = [e for e in edges if e not in spanning_tree] - - if not gens: - return FreeGroup([]).quotient([]) - gens_dict = dict(zip(gens, range(len(gens)))) FG = FreeGroup(len(gens), 'e') rels = [] @@ -361,10 +369,13 @@ def fundamental_group(self, simplify=True): # sigma is not in the correct connected component. z[i] = FG.one() rels.append(z[0]*z[1].inverse()*z[2]) - if simplify: - return FG.quotient(rels).simplified() - else: - return FG.quotient(rels) + G = FG.quotient(rels) + char = {g : G.gen(i) for i,g in enumerate(gens)} + for e in edges: + if not e in gens: + char[e] = G.one() + return (G, char) + def universal_cover_map(self): r""" @@ -382,48 +393,18 @@ def universal_cover_map(self): To: RP^2 Defn: [(1, 1), (1, e), (f, 1), (f, e), (f * f, 1), (f * f, e)] --> [1, 1, f, f, f * f, f * f] sage: phi.domain().face_data() - {(f, 1): ((1, e), (1, 1)), - (f, e): ((1, 1), (1, e)), - (f * f, 1): ((f, e), s_0 (1, 1), (f, 1)), - (f * f, e): ((f, 1), s_0 (1, e), (f, e)), - (1, e): None, - (1, 1): None} + {(1, 1): None, + (1, e): None, + (f, 1): ((1, e), (1, 1)), + (f, e): ((1, 1), (1, e)), + (f * f, 1): ((f, e), s_0 (1, 1), (f, 1)), + (f * f, e): ((f, 1), s_0 (1, e), (f, e))} """ - from sage.groups.free_group import FreeGroup - skel = self.n_skeleton(2) - graph = skel.graph() - if not skel.is_connected(): - graph = graph.subgraph(skel.base_point()) - edges = [e[2] for e in graph.edges(sort=False)] - spanning_tree = [e[2] for e in graph.min_spanning_tree()] - gens = [e for e in edges if e not in spanning_tree] - - if not gens: - return self - - gens_dict = dict(zip(gens, range(len(gens)))) - FG = FreeGroup(len(gens), 'e') - rels = [] - - for f in skel.n_cells(2): - z = dict() - for i, sigma in enumerate(skel.faces(f)): - if sigma in spanning_tree: - z[i] = FG.one() - elif sigma.is_degenerate(): - z[i] = FG.one() - elif sigma in edges: - z[i] = FG.gen(gens_dict[sigma]) - else: - # sigma is not in the correct connected component. - z[i] = FG.one() - rels.append(z[0]*z[1].inverse()*z[2]) - G = FG.quotient(rels) - char = {g : G.gen(i) for i,g in enumerate(gens)} - for e in edges: - if not e in gens: - char[e] = G.one() + edges = self.n_cells(1) + if not edges: + return self.identity() + G, char = self._universal_cover_dict() return self.covering_map(char) def covering_map(self, character): @@ -445,6 +426,7 @@ def covering_map(self, character): sage: S1 = simplicial_sets.Sphere(1) sage: W = S1.wedge(S1) sage: G = CyclicPermutationGroup(3) + sage: a, b = W.n_cells(1) sage: C = W.covering_map({a : G.gen(0), b : G.one()}) sage: C Simplicial set morphism: @@ -454,15 +436,15 @@ def covering_map(self, character): sage: C.domain() Simplicial set with 9 non-degenerate simplices sage: C.domain().face_data() - {(sigma_1, ()): ((*, ()), (*, ())), - (sigma_1, (1,2,3)): ((*, (1,2,3)), (*, (1,2,3))), - (sigma_1, (1,3,2)): ((*, (1,3,2)), (*, (1,3,2))), + {(*, ()): None, + (*, (1,2,3)): None, + (*, (1,3,2)): None, + (sigma_1, ()): ((*, (1,2,3)), (*, ())), (sigma_1, ()): ((*, ()), (*, ())), + (sigma_1, (1,2,3)): ((*, (1,3,2)), (*, (1,2,3))), (sigma_1, (1,2,3)): ((*, (1,2,3)), (*, (1,2,3))), - (sigma_1, (1,3,2)): ((*, (1,3,2)), (*, (1,3,2))), - (*, ()): None, - (*, (1,3,2)): None, - (*, (1,2,3)): None} + (sigma_1, (1,3,2)): ((*, ()), (*, (1,3,2))), + (sigma_1, (1,3,2)): ((*, (1,3,2)), (*, (1,3,2)))} """ from sage.topology.simplicial_set import AbstractSimplex, SimplicialSet @@ -531,17 +513,17 @@ def cover(self, character): sage: W = S1.wedge(S1) sage: G = CyclicPermutationGroup(3) sage: (a, b) = W.n_cells(1) - sage: C = W.cover({a : G.gen(0), b : G.gen(0)^2}).domain() + sage: C = W.cover({a : G.gen(0), b : G.gen(0)^2}) sage: C.face_data() - {(sigma_1, ()): ((*, (1,2,3)), (*, ())), - (sigma_1, (1,2,3)): ((*, (1,3,2)), (*, (1,2,3))), - (sigma_1, (1,3,2)): ((*, ()), (*, (1,3,2))), + {(*, ()): None, + (*, (1,2,3)): None, + (*, (1,3,2)): None, + (sigma_1, ()): ((*, (1,2,3)), (*, ())), (sigma_1, ()): ((*, (1,3,2)), (*, ())), + (sigma_1, (1,2,3)): ((*, (1,3,2)), (*, (1,2,3))), (sigma_1, (1,2,3)): ((*, ()), (*, (1,2,3))), - (sigma_1, (1,3,2)): ((*, (1,2,3)), (*, (1,3,2))), - (*, (1,2,3)): None, - (*, ()): None, - (*, (1,3,2)): None} + (sigma_1, (1,3,2)): ((*, ()), (*, (1,3,2))), + (sigma_1, (1,3,2)): ((*, (1,2,3)), (*, (1,3,2)))} sage: C.homology(1) Z x Z x Z x Z sage: C.fundamental_group() @@ -563,14 +545,14 @@ def universal_cover(self): sage: C Simplicial set with 8 non-degenerate simplices sage: C.face_data() - {(f, 1): ((1, e), (1, 1)), + {(1, 1): None, + (1, e): None, + (f, 1): ((1, e), (1, 1)), (f, e): ((1, 1), (1, e)), (f * f, 1): ((f, e), s_0 (1, 1), (f, 1)), (f * f, e): ((f, 1), s_0 (1, e), (f, e)), (f * f * f, 1): ((f * f, e), s_0 (f, 1), s_1 (f, 1), (f * f, 1)), - (f * f * f, e): ((f * f, 1), s_0 (f, e), s_1 (f, e), (f * f, e)), - (1, e): None, - (1, 1): None} + (f * f * f, e): ((f * f, 1), s_0 (f, e), s_1 (f, e), (f * f, e))} sage: C.fundamental_group() Finitely presented group < | > diff --git a/src/sage/topology/simplicial_set.py b/src/sage/topology/simplicial_set.py index 3312e0411e4..5612c1b352d 100644 --- a/src/sage/topology/simplicial_set.py +++ b/src/sage/topology/simplicial_set.py @@ -173,7 +173,7 @@ sage: Sigma3 = groups.permutation.Symmetric(3) sage: BSigma3 = Sigma3.nerve() sage: pi = BSigma3.fundamental_group(); pi - Finitely presented group < e0, e1 | e0^2, e1^3, (e0*e1^-1)^2 > + Finitely presented group < e1, e2 | e2^2, e1^3, (e2*e1)^2 > sage: pi.order() 6 sage: pi.is_abelian() From 1e5cf86d1620ab2dd3430329d6b96cc5d5dbd43a Mon Sep 17 00:00:00 2001 From: Miguel Marco Date: Wed, 4 Jan 2023 19:55:26 +0100 Subject: [PATCH 272/751] Add explanation about presentation complex. --- src/sage/topology/simplicial_set_examples.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sage/topology/simplicial_set_examples.py b/src/sage/topology/simplicial_set_examples.py index 8cd657574df..d350bd579d8 100644 --- a/src/sage/topology/simplicial_set_examples.py +++ b/src/sage/topology/simplicial_set_examples.py @@ -801,6 +801,10 @@ def PresentationComplex(G): Return a simplicial set constructed from a group presentation. The result is a subdivision of the presentation complex. + The presentation complex has one vertex and one edge for + each generator. Then triangles (and eventually new edges + to glue them) are added to realize the relations. + INPUT: - "G" -- a finitely presented group From db8947bfe5f116492b6fc864b36e6d9054bc34cb Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Wed, 4 Jan 2023 21:17:30 +0100 Subject: [PATCH 273/751] pycodestyle stuff --- src/sage/combinat/bijectionist.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 279ce091c3a..b80deb74e0c 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -2456,6 +2456,7 @@ def solutions_iterator(self): self._bmilp = _BijectionistMILP(self) yield from self._bmilp.solutions_iterator(False, []) + class _BijectionistMILP(): r""" Wrapper class for the MixedIntegerLinearProgram (MILP). This @@ -2590,7 +2591,6 @@ def show(self, variables=True): print(f" {v}: " + "".join([f"s({a}) = " for a in P[p]]) + f"{z}") - def _prepare_solution(self, on_blocks, solution): r""" Return the solution as a dictionary from `A` (or `P`) to @@ -2766,9 +2766,10 @@ def _is_solution(self, constraint, values): variable_index = next(iter(v.dict().keys())) index_block_value_dict[variable_index] = (p, z) - evaluate = lambda f: sum(coeff if index == -1 else - coeff * values[index_block_value_dict[index]] - for index, coeff in f.dict().items()) + def evaluate(f): + return sum(coeff if index == -1 else + coeff * values[index_block_value_dict[index]] + for index, coeff in f.dict().items()) for lhs, rhs in constraint.equations(): if evaluate(lhs - rhs): @@ -3052,6 +3053,7 @@ def sum_q(q): for q in Q[1:]: self.milp.add_constraint(len(q0)*sum_q(q) == len(q)*v0, name=f"h: ({q})~({q0})") + def _invert_dict(d): """ Return the dictionary whose keys are the values of the input and @@ -3126,6 +3128,7 @@ def _non_copying_intersection(sets): if s == result: return s + """ TESTS:: From 837a8c7ef856c0c080c894de0789e5d66f956b3c Mon Sep 17 00:00:00 2001 From: dcoudert Date: Sun, 8 Jan 2023 13:25:25 +0100 Subject: [PATCH 274/751] trac #33255: review commit --- src/sage/graphs/bipartite_graph.py | 55 ++++++++++++++--------- src/sage/graphs/digraph.py | 7 ++- src/sage/graphs/generic_graph.py | 71 +++++++++++++++++++++++++----- src/sage/graphs/graph.py | 6 ++- 4 files changed, 105 insertions(+), 34 deletions(-) diff --git a/src/sage/graphs/bipartite_graph.py b/src/sage/graphs/bipartite_graph.py index aa6eea5dc95..a333096cde8 100644 --- a/src/sage/graphs/bipartite_graph.py +++ b/src/sage/graphs/bipartite_graph.py @@ -94,9 +94,9 @@ class BipartiteGraph(Graph): - ``weighted`` -- boolean (default: ``None``); whether graph thinks of itself as weighted or not. See ``self.weighted()`` - - ``hash_labels`` - boolean (default: ``False``); whether to include labels - / weights during hashing. Will raise a warning when __hash__ is invoked - and default to true. + - ``hash_labels`` -- boolean (default: ``None``); whether to include edge + labels during hashing. This parameter defaults to ``True`` if the graph is + weighted. This parameter is ignored if the graph is mutable. .. NOTE:: @@ -411,7 +411,7 @@ def __init__(self, data=None, partition=None, check=True, hash_labels=None, *arg self.add_edges = MethodType(Graph.add_edges, self) alist_file = True - self.hash_labels=hash_labels + self._hash_labels = hash_labels from sage.structure.element import is_Matrix if isinstance(data, BipartiteGraph): @@ -550,30 +550,45 @@ def __init__(self, data=None, partition=None, check=True, hash_labels=None, *arg return + @cached_method def __hash__(self): - """ Compute a hash for ``self``, if ``self`` is immutable. - """ - if self.is_immutable(): - # determine whether to hash labels - # warn user if not manually specified - use_labels=self._use_hash_labels() + EXAMPLES:: + sage: A = BipartiteGraph([(0, 1, 1), (1, 2, 1)], immutable=True) + sage: B = BipartiteGraph([(0, 1, 1), (1, 2, 33)], immutable=True) + sage: A.__hash__() == B.__hash__() + True + sage: A = BipartiteGraph([(0, 1, 1), (1, 2, 1)], immutable=True, hash_labels=True) + sage: B = BipartiteGraph([(0, 1, 1), (1, 2, 33)], immutable=True, hash_labels=True) + sage: A.__hash__() == B.__hash__() + False + sage: A = BipartiteGraph([(0, 1, 1), (1, 2, 1)], immutable=True, weighted=True) + sage: B = BipartiteGraph([(0, 1, 1), (1, 2, 33)], immutable=True, weighted=True) + sage: A.__hash__() == B.__hash__() + False - - edge_iter = self.edge_iterator(labels=use_labels) - + TESTS:: + + sage: A = BipartiteGraph([(0, 1, 1), (1, 2, 1)], immutable=False) + sage: A.__hash__() + Traceback (most recent call last): + ... + TypeError: This graph is mutable, and thus not hashable. Create an immutable copy by `g.copy(immutable=True)` + """ + if self.is_immutable(): + # Determine whether to hash edge labels + use_labels = self._use_hash_labels() + edge_items = self.edge_iterator(labels=use_labels) if self.allows_multiple_edges(): - from collections import Counter - edge_items = Counter(edge_iter).items() - else: - edge_items = edge_iter + from collections import Counter + edge_items = Counter(edge_items).items() + return hash((frozenset(self.left), frozenset(self.right), frozenset(edge_items))) - return hash((frozenset(self.left), frozenset(self.right), frozenset(edge_items))) - else: - raise TypeError("This graph is mutable, and thus not hashable. Create an immutable copy by `g.copy(immutable=True)`") + raise TypeError("This graph is mutable, and thus not hashable. " + "Create an immutable copy by `g.copy(immutable=True)`") def _upgrade_from_graph(self): """ diff --git a/src/sage/graphs/digraph.py b/src/sage/graphs/digraph.py index 44152b8c79d..341ba49a654 100644 --- a/src/sage/graphs/digraph.py +++ b/src/sage/graphs/digraph.py @@ -315,6 +315,10 @@ class DiGraph(GenericGraph): immutable digraph. Note that ``immutable=True`` is actually a shortcut for ``data_structure='static_sparse'``. + - ``hash_labels`` -- boolean (default: ``None``); whether to include edge + labels during hashing. This parameter defaults to ``True`` if the digraph + is weighted. This parameter is ignored if the digraph is mutable. + - ``vertex_labels`` -- boolean (default: ``True``); whether to allow any object as a vertex (slower), or only the integers `0,...,n-1`, where `n` is the number of vertices. @@ -855,9 +859,10 @@ def __init__(self, data=None, pos=None, loops=None, format=None, self._backend = ib self._immutable = True - self.hash_labels=hash_labels + self._hash_labels = hash_labels # Formats + def dig6_string(self): r""" Return the ``dig6`` representation of the digraph as an ASCII string. diff --git a/src/sage/graphs/generic_graph.py b/src/sage/graphs/generic_graph.py index 8a31802b3bf..49272c06bfd 100644 --- a/src/sage/graphs/generic_graph.py +++ b/src/sage/graphs/generic_graph.py @@ -615,12 +615,39 @@ def __eq__(self, other): return self._backend.is_subgraph(other._backend, self, ignore_labels=not self.weighted()) - # check if specified by the user, if not then fallback + def _use_labels_for_hash(self): - if not hasattr(self, "hash_labels") or self.hash_labels is None: - fallback=self.weighted() - self.hash_labels=fallback - return self.hash_labels + r""" + Helper method for method ``__hash__``. + + This method checks whether parameter ``hash_labels`` has been specified + by the user. Otherwise, defaults to the value of parameter ``weigthed``. + + TESTS:: + + sage: G = Graph() + sage: G._use_labels_for_hash() + False + sage: G = Graph(hash_labels=True) + sage: G._use_labels_for_hash() + True + sage: G = Graph(hash_labels=False) + sage: G._use_labels_for_hash() + False + sage: G = Graph(weighted=True) + sage: G._use_labels_for_hash() + True + sage: G = Graph(weighted=False) + sage: G._use_labels_for_hash() + False + sage: G = Graph(hash_labels=False, weighted=True) + sage: G._use_labels_for_hash() + False + """ + if not hasattr(self, "_hash_labels") or self._hash_labels is None: + self._hash_labels = self.weighted() + return self._hash_labels + @cached_method def __hash__(self): @@ -692,12 +719,28 @@ def __hash__(self): sage: G1.__hash__() == G2.__hash__() True - Make sure hash_labels parameter behaves as expected: - + Make sure ``hash_labels`` parameter behaves as expected + (:trac:`33255`):: + sage: A = Graph([(1, 2, 1)], immutable=True) + sage: B = Graph([(1, 2, 33)], immutable=True) + sage: A.__hash__() == B.__hash__() + True + sage: A = Graph([(1, 2, 1)], immutable=True, hash_labels=True) + sage: B = Graph([(1, 2, 33)], immutable=True, hash_labels=True) + sage: A.__hash__() == B.__hash__() + False + sage: A = Graph([(1, 2, 1)], immutable=True, weighted=True) + sage: B = Graph([(1, 2, 33)], immutable=True, weighted=True) + sage: A.__hash__() == B.__hash__() + False + sage: A = Graph([(1, 2, 1)], immutable=True, hash_labels=False, weighted=True) + sage: B = Graph([(1, 2, 33)], immutable=True, hash_labels=False, weighted=True) + sage: A.__hash__() == B.__hash__() + True """ if self.is_immutable(): - use_labels=self._use_labels_for_hash() + use_labels = self._use_labels_for_hash() edge_items = self.edge_iterator(labels=use_labels) if self.allows_multiple_edges(): from collections import Counter @@ -996,6 +1039,10 @@ def copy(self, weighted=None, data_structure=None, sparse=None, immutable=None, used to copy an immutable graph, the data structure used is ``"sparse"`` unless anything else is specified. + - ``hash_labels`` -- boolean (default: ``None``); whether to include + edge labels during hashing. This parameter defaults to ``True`` if the + graph is weighted. This parameter is ignored if the graph is mutable. + .. NOTE:: If the graph uses @@ -1229,7 +1276,7 @@ def copy(self, weighted=None, data_structure=None, sparse=None, immutable=None, desired_immutable = self.is_immutable() if immutable is None else immutable forced_mutable_copy = self.copy(weighted=weighted, data_structure=data_structure, sparse=sparse, immutable=False) fresh_copy = forced_mutable_copy.copy(weighted=weighted, data_structure=data_structure, sparse=sparse, immutable=desired_immutable) - fresh_copy.hash_labels=hash_labels + fresh_copy._hash_labels = hash_labels return fresh_copy # Which data structure should be used ? @@ -1273,10 +1320,10 @@ def copy(self, weighted=None, data_structure=None, sparse=None, immutable=None, data_structure = "sparse" G = self.__class__(self, name=self.name(), pos=copy(self._pos), - weighted=weighted, - data_structure=data_structure) + weighted=weighted, + data_structure=data_structure) - attributes_to_copy = ('_assoc', '_embedding', 'hash_labels') + attributes_to_copy = ('_assoc', '_embedding', '_hash_labels') for attr in attributes_to_copy: if hasattr(self, attr): copy_attr = {} diff --git a/src/sage/graphs/graph.py b/src/sage/graphs/graph.py index a81cc7339b3..9e3ea6b9731 100644 --- a/src/sage/graphs/graph.py +++ b/src/sage/graphs/graph.py @@ -570,6 +570,10 @@ class Graph(GenericGraph): immutable graph. Note that ``immutable=True`` is actually a shortcut for ``data_structure='static_sparse'``. Set to ``False`` by default. + - ``hash_labels`` -- boolean (default: ``None``); whether to include edge + labels during hashing. This parameter defaults to ``True`` if the graph is + weighted. This parameter is ignored if the graph is mutable. + - ``vertex_labels`` -- boolean (default: ``True``); whether to allow any object as a vertex (slower), or only the integers `0,...,n-1`, where `n` is the number of vertices. @@ -1266,7 +1270,7 @@ def __init__(self, data=None, pos=None, loops=None, format=None, self._backend = ib self._immutable = True - self.hash_labels = hash_labels + self._hash_labels = hash_labels # Formats From 634ca632611af10278d5943fc6c6b275a4621d51 Mon Sep 17 00:00:00 2001 From: dcoudert Date: Sun, 8 Jan 2023 14:31:00 +0100 Subject: [PATCH 275/751] trac #33255: corrections --- src/sage/graphs/bipartite_graph.py | 22 ++++++++++++---------- src/sage/graphs/generic_graph.py | 6 +++--- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/sage/graphs/bipartite_graph.py b/src/sage/graphs/bipartite_graph.py index a333096cde8..644e4b22b6e 100644 --- a/src/sage/graphs/bipartite_graph.py +++ b/src/sage/graphs/bipartite_graph.py @@ -45,6 +45,7 @@ from .graph import Graph from sage.rings.integer import Integer from sage.misc.decorators import rename_keyword +from sage.misc.cachefunc import cached_method class BipartiteGraph(Graph): @@ -399,6 +400,7 @@ def __init__(self, data=None, partition=None, check=True, hash_labels=None, *arg Graph.__init__(self, **kwds) self.left = set() self.right = set() + self._hash_labels = hash_labels return # need to turn off partition checking for Graph.__init__() adding @@ -411,8 +413,6 @@ def __init__(self, data=None, partition=None, check=True, hash_labels=None, *arg self.add_edges = MethodType(Graph.add_edges, self) alist_file = True - self._hash_labels = hash_labels - from sage.structure.element import is_Matrix if isinstance(data, BipartiteGraph): Graph.__init__(self, data, *args, **kwds) @@ -548,6 +548,8 @@ def __init__(self, data=None, partition=None, check=True, hash_labels=None, *arg if alist_file: self.load_afile(data) + self._hash_labels = hash_labels + return @cached_method @@ -557,22 +559,22 @@ def __hash__(self): EXAMPLES:: - sage: A = BipartiteGraph([(0, 1, 1), (1, 2, 1)], immutable=True) - sage: B = BipartiteGraph([(0, 1, 1), (1, 2, 33)], immutable=True) + sage: A = BipartiteGraph([(1, 2, 1)], immutable=True) + sage: B = BipartiteGraph([(1, 2, 33)], immutable=True) sage: A.__hash__() == B.__hash__() True - sage: A = BipartiteGraph([(0, 1, 1), (1, 2, 1)], immutable=True, hash_labels=True) - sage: B = BipartiteGraph([(0, 1, 1), (1, 2, 33)], immutable=True, hash_labels=True) + sage: A = BipartiteGraph([(1, 2, 1)], immutable=True, hash_labels=True) + sage: B = BipartiteGraph([(1, 2, 33)], immutable=True, hash_labels=True) sage: A.__hash__() == B.__hash__() False - sage: A = BipartiteGraph([(0, 1, 1), (1, 2, 1)], immutable=True, weighted=True) - sage: B = BipartiteGraph([(0, 1, 1), (1, 2, 33)], immutable=True, weighted=True) + sage: A = BipartiteGraph([(1, 2, 1)], immutable=True, weighted=True) + sage: B = BipartiteGraph([(1, 2, 33)], immutable=True, weighted=True) sage: A.__hash__() == B.__hash__() False TESTS:: - sage: A = BipartiteGraph([(0, 1, 1), (1, 2, 1)], immutable=False) + sage: A = BipartiteGraph([(1, 2, 1)], immutable=False) sage: A.__hash__() Traceback (most recent call last): ... @@ -580,7 +582,7 @@ def __hash__(self): """ if self.is_immutable(): # Determine whether to hash edge labels - use_labels = self._use_hash_labels() + use_labels = self._use_labels_for_hash() edge_items = self.edge_iterator(labels=use_labels) if self.allows_multiple_edges(): from collections import Counter diff --git a/src/sage/graphs/generic_graph.py b/src/sage/graphs/generic_graph.py index 49272c06bfd..86c52933a33 100644 --- a/src/sage/graphs/generic_graph.py +++ b/src/sage/graphs/generic_graph.py @@ -1225,7 +1225,7 @@ def copy(self, weighted=None, data_structure=None, sparse=None, immutable=None, ....: # make a graph with old_immutable, old_hash_labels ....: G = Graph({0: {1: 'edge label A'}}, immutable=old_immutable, hash_labels=old_hash_labels) ....: old_immutable=G.is_immutable() - ....: old_hash_labels=G.hash_labels + ....: old_hash_labels=G._hash_labels ....: ....: # copy the graph, passing the overrides ....: G2 = G.copy(immutable=new_immutable, hash_labels=new_hash_labels) @@ -1239,10 +1239,10 @@ def copy(self, weighted=None, data_structure=None, sparse=None, immutable=None, ....: ....: if new_hash_labels is None: ....: # make sure hash_labels is preserved if we don't update it - ....: assert G2.hash_labels == old_hash_labels, [old_immutable, new_immutable, old_hash_labels, new_hash_labels] + ....: assert G2._hash_labels == old_hash_labels, [old_immutable, new_immutable, old_hash_labels, new_hash_labels] ....: else: ....: # make sure updating hash labels works - ....: assert G2.hash_labels == new_hash_labels, [old_immutable, new_immutable, old_hash_labels, new_hash_labels] + ....: assert G2._hash_labels == new_hash_labels, [old_immutable, new_immutable, old_hash_labels, new_hash_labels] """ From e993d2f9aab597abc43fd5cf1da381dd0a8e8e9f Mon Sep 17 00:00:00 2001 From: dcoudert Date: Sat, 14 Jan 2023 12:44:42 +0100 Subject: [PATCH 276/751] trac #33255: better copy --- src/sage/graphs/bipartite_graph.py | 8 ++ src/sage/graphs/digraph.py | 7 +- src/sage/graphs/generic_graph.py | 117 ++++++++++------------------- src/sage/graphs/graph.py | 7 +- 4 files changed, 57 insertions(+), 82 deletions(-) diff --git a/src/sage/graphs/bipartite_graph.py b/src/sage/graphs/bipartite_graph.py index 644e4b22b6e..7149726b86a 100644 --- a/src/sage/graphs/bipartite_graph.py +++ b/src/sage/graphs/bipartite_graph.py @@ -98,6 +98,7 @@ class BipartiteGraph(Graph): - ``hash_labels`` -- boolean (default: ``None``); whether to include edge labels during hashing. This parameter defaults to ``True`` if the graph is weighted. This parameter is ignored if the graph is mutable. + Beware that trying to hash unhashable labels will raise an error. .. NOTE:: @@ -548,6 +549,8 @@ def __init__(self, data=None, partition=None, check=True, hash_labels=None, *arg if alist_file: self.load_afile(data) + if hash_labels is None and hasattr(data, '_hash_labels'): + hash_labels = data._hash_labels self._hash_labels = hash_labels return @@ -579,6 +582,11 @@ def __hash__(self): Traceback (most recent call last): ... TypeError: This graph is mutable, and thus not hashable. Create an immutable copy by `g.copy(immutable=True)` + sage: B = BipartiteGraph([(1, 2, {'length': 3})], immutable=True, hash_labels=True) + sage: B.__hash__() + Traceback (most recent call last): + ... + TypeError: unhashable type: 'dict' """ if self.is_immutable(): # Determine whether to hash edge labels diff --git a/src/sage/graphs/digraph.py b/src/sage/graphs/digraph.py index 341ba49a654..84272a85d2c 100644 --- a/src/sage/graphs/digraph.py +++ b/src/sage/graphs/digraph.py @@ -318,6 +318,7 @@ class DiGraph(GenericGraph): - ``hash_labels`` -- boolean (default: ``None``); whether to include edge labels during hashing. This parameter defaults to ``True`` if the digraph is weighted. This parameter is ignored if the digraph is mutable. + Beware that trying to hash unhashable labels will raise an error. - ``vertex_labels`` -- boolean (default: ``True``); whether to allow any object as a vertex (slower), or only the integers `0,...,n-1`, where `n` @@ -846,6 +847,10 @@ def __init__(self, data=None, pos=None, loops=None, format=None, # weighted, multiedges, loops, verts and num_verts should now be set self._weighted = weighted + if hash_labels is None and hasattr(data, '_hash_labels'): + hash_labels = data._hash_labels + self._hash_labels = hash_labels + self._pos = copy(pos) if format != 'DiGraph' or name is not None: @@ -859,8 +864,6 @@ def __init__(self, data=None, pos=None, loops=None, format=None, self._backend = ib self._immutable = True - self._hash_labels = hash_labels - # Formats def dig6_string(self): diff --git a/src/sage/graphs/generic_graph.py b/src/sage/graphs/generic_graph.py index 86c52933a33..3c497ab00d8 100644 --- a/src/sage/graphs/generic_graph.py +++ b/src/sage/graphs/generic_graph.py @@ -1040,8 +1040,10 @@ def copy(self, weighted=None, data_structure=None, sparse=None, immutable=None, ``"sparse"`` unless anything else is specified. - ``hash_labels`` -- boolean (default: ``None``); whether to include - edge labels during hashing. This parameter defaults to ``True`` if the - graph is weighted. This parameter is ignored if the graph is mutable. + edge labels during hashing of the copy. This parameter defaults to + ``True`` if the graph is weighted. This parameter is ignored when + parameter ``immutable`` is not ``True``. + Beware that trying to hash unhashable labels will raise an error. .. NOTE:: @@ -1200,85 +1202,43 @@ def copy(self, weighted=None, data_structure=None, sparse=None, immutable=None, sage: G.copy()._backend - Copying and changing hash_labels parameter:: + Copying and changing ``hash_labels`` parameter:: - sage: G1 = Graph({0: {1: 'edge label A'}}, immutable=True, hash_labels=False) - sage: G1c = G1.copy(hash_labels=True, immutable=True) - sage: hash(G1)==hash(G1c) + sage: G = Graph({0: {1: 'edge label A'}}, immutable=True, hash_labels=False) + sage: hash(G.copy(hash_labels=True, immutable=True)) == hash(G) False - + sage: hash(G.copy(hash_labels=False, immutable=True)) == hash(G) + True + sage: hash(G.copy(hash_labels=None, immutable=True)) == hash(G) + True + sage: G = Graph({0: {1: 'edge label A'}}, immutable=True, hash_labels=True) + sage: hash(G.copy(hash_labels=True, immutable=True)) == hash(G) + True + sage: hash(G.copy(hash_labels=False, immutable=True)) == hash(G) + False + sage: hash(G.copy(hash_labels=None, immutable=True)) == hash(G) + True sage: G1 = Graph({0: {1: 'edge label A'}}, immutable=True, hash_labels=False) sage: G2 = Graph({0: {1: 'edge label B'}}, immutable=True, hash_labels=False) - sage: hash(G1)==hash(G2) + sage: hash(G1) == hash(G2) True - sage: G1c = G1.copy(hash_labels=True) - sage: G2c = G2.copy(hash_labels=True) - sage: hash(G1c)==hash(G2c) + sage: G1c = G1.copy(hash_labels=True, immutable=True) + sage: G2c = G2.copy(hash_labels=True, immutable=True) + sage: hash(G1c) == hash(G2c) False - - Making sure the .copy behaviour works correctly with hash_labels and immutable in all 54 cases:: - sage: for old_immutable in [True, False]: - ....: for new_immutable in [True, False, None]: - ....: for old_hash_labels in [True, False, None]: - ....: for new_hash_labels in [True, False, None]: - ....: - ....: # make a graph with old_immutable, old_hash_labels - ....: G = Graph({0: {1: 'edge label A'}}, immutable=old_immutable, hash_labels=old_hash_labels) - ....: old_immutable=G.is_immutable() - ....: old_hash_labels=G._hash_labels - ....: - ....: # copy the graph, passing the overrides - ....: G2 = G.copy(immutable=new_immutable, hash_labels=new_hash_labels) - ....: - ....: if new_immutable is None: - ....: # make sure immutability is preserved if we don't update it - ....: assert G2.is_immutable() == old_immutable, [old_immutable, new_immutable, old_hash_labels, new_hash_labels] - ....: else: - ....: # make sure that updating immutability works - ....: assert G2.is_immutable() == new_immutable, [old_immutable, new_immutable, old_hash_labels, new_hash_labels] - ....: - ....: if new_hash_labels is None: - ....: # make sure hash_labels is preserved if we don't update it - ....: assert G2._hash_labels == old_hash_labels, [old_immutable, new_immutable, old_hash_labels, new_hash_labels] - ....: else: - ....: # make sure updating hash labels works - ....: assert G2._hash_labels == new_hash_labels, [old_immutable, new_immutable, old_hash_labels, new_hash_labels] - - """ - - # This is an ugly hack but it works. - # This function contains some fairly complex logic - # There is a comment further down that says - - ### Immutable copy of an immutable graph ? return self ! - - # The issue being that if we want to change the hash_labels behaviour, then - # returning self is no longer a good option. I'd argue that a copy function - # returning self is always bad behaviour, but that's out of the scope for this ticket. - # Trying to weaken the if statement to include something like - - ### and (hash_labels is None or (hash_labels==self._use_labels_for_hash())) - - # doesn't work, since there is no fallback logic for making - # an immutable copy of an immutable graph, and my attempts at - # implementing one caused other tests to break in different - # bits of the code - - # the hack I've used creates a mutable copy of the graph - # and then makes an immutable copy of that one. I think this is a fairly - # inobtrusive implementation, since the function still runs as normally, - # assuming that they pass nothing into hash_labels, and seems to behave - # correctly otherwise. - - # However, this is obviously not optimal, and could definitely be improved upon - # by someone who understands the logic better. - if hash_labels is not None: - desired_immutable = self.is_immutable() if immutable is None else immutable - forced_mutable_copy = self.copy(weighted=weighted, data_structure=data_structure, sparse=sparse, immutable=False) - fresh_copy = forced_mutable_copy.copy(weighted=weighted, data_structure=data_structure, sparse=sparse, immutable=desired_immutable) - fresh_copy._hash_labels = hash_labels - return fresh_copy - + sage: G = Graph({0: {1: 'edge label A'}}, immutable=True, hash_labels=False) + sage: H = G.copy(hash_labels=True) + sage: H.is_immutable() + False + sage: H._hash_labels + True + sage: I = H.copy(immutable=True) + sage: hash(G) == hash(I) + False + sage: G = Graph({0: {1: 'edge label A'}}, immutable=True, hash_labels=True) + sage: hash(G) == hash(I) + True + """ # Which data structure should be used ? if data_structure is not None: # data_structure is already defined so there is nothing left to do @@ -1306,7 +1266,8 @@ def copy(self, weighted=None, data_structure=None, sparse=None, immutable=None, # Immutable copy of an immutable graph ? return self ! # (if okay for weightedness) if (self.is_immutable() and - (weighted is None or self._weighted == weighted)): + (weighted is None or self._weighted == weighted) and + (hash_labels is None or self._hash_labels == hash_labels)): from sage.graphs.base.static_sparse_backend import StaticSparseBackend if (isinstance(self._backend, StaticSparseBackend) and (data_structure == 'static_sparse' or data_structure is None)): @@ -1320,10 +1281,10 @@ def copy(self, weighted=None, data_structure=None, sparse=None, immutable=None, data_structure = "sparse" G = self.__class__(self, name=self.name(), pos=copy(self._pos), - weighted=weighted, + weighted=weighted, hash_labels=hash_labels, data_structure=data_structure) - attributes_to_copy = ('_assoc', '_embedding', '_hash_labels') + attributes_to_copy = ('_assoc', '_embedding') for attr in attributes_to_copy: if hasattr(self, attr): copy_attr = {} diff --git a/src/sage/graphs/graph.py b/src/sage/graphs/graph.py index 9e3ea6b9731..866f0cdc033 100644 --- a/src/sage/graphs/graph.py +++ b/src/sage/graphs/graph.py @@ -573,6 +573,7 @@ class Graph(GenericGraph): - ``hash_labels`` -- boolean (default: ``None``); whether to include edge labels during hashing. This parameter defaults to ``True`` if the graph is weighted. This parameter is ignored if the graph is mutable. + Beware that trying to hash unhashable labels will raise an error. - ``vertex_labels`` -- boolean (default: ``True``); whether to allow any object as a vertex (slower), or only the integers `0,...,n-1`, where `n` @@ -1257,6 +1258,10 @@ def __init__(self, data=None, pos=None, loops=None, format=None, weighted = False self._weighted = getattr(self, '_weighted', weighted) + if hash_labels is None and hasattr(data, '_hash_labels'): + hash_labels = data._hash_labels + self._hash_labels = hash_labels + self._pos = copy(pos) if format != 'Graph' or name is not None: @@ -1270,8 +1275,6 @@ def __init__(self, data=None, pos=None, loops=None, format=None, self._backend = ib self._immutable = True - self._hash_labels = hash_labels - # Formats @doc_index("Basic methods") From 86fc48deddc00b508b5c75582b876315771eae49 Mon Sep 17 00:00:00 2001 From: Sandstorm831 Date: Mon, 16 Jan 2023 23:43:40 +0530 Subject: [PATCH 277/751] added is_supergreedy() function --- src/sage/combinat/posets/linear_extensions.py | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/src/sage/combinat/posets/linear_extensions.py b/src/sage/combinat/posets/linear_extensions.py index 5d9aae755d8..754c4d4fae8 100644 --- a/src/sage/combinat/posets/linear_extensions.py +++ b/src/sage/combinat/posets/linear_extensions.py @@ -40,7 +40,7 @@ class LinearExtensionOfPoset(ClonableArray, - metaclass=InheritComparisonClasscallMetaclass): + metaclass=InheritComparisonClasscallMetaclass): r""" A linear extension of a finite poset `P` of size `n` is a total ordering `\pi := \pi_0 \pi_1 \ldots \pi_{n-1}` of its elements @@ -252,6 +252,45 @@ def is_greedy(self): return False return True + def is_supergreedy(self): + r"""" + Return ``True`` if the linear extension is supergreedy. + + A linear extension `[e_1, e_2, \ldots, e_n]` is *supergreedy* if + for every i, either `e_i+1` cover `e_i` otherwise on backtracking + from `e_i` to `e_1`, either `e_i+1` should be in the upper cover of + the first element having a non-empty upper cover or should include + only the next element. + + EXAMPLES:: + + sage: Q = posets.PentagonPoset() + sage: for l in Q.linear_extensions(): + ....: if not l.is_supergreedy(): + ....: print(l) + [0, 1, 2, 3, 4] + [0, 2, 3, 1, 4] + [0, 2, 1, 3, 4] + + TESTS:: + + sage: T = Poset() + sage: T.linear_extensions()[0].is_supergreedy() + True + """ + P = self.poset() + for i in range(len(self) - 1): + if not P.covers(self[i], self[i + 1]): + for u in range(i, -1, -1): + if len(P.upper_covers(self[u])) != 0: + if (self[i+1] in P.upper_covers(self[u])): + break + elif (self[u+1] in P.upper_covers(self[u])): + continue + else: + return False + return True + def tau(self, i): r""" Return the operator `\tau_i` on linear extensions ``self`` of a poset. @@ -855,6 +894,7 @@ class LinearExtensionsOfPosetWithHooks(LinearExtensionsOfPoset): Linear extensions such that the poset has well-defined hook lengths (i.e., d-complete). """ + def cardinality(self): r""" Count the number of linear extensions using a hook-length formula. @@ -879,6 +919,7 @@ class LinearExtensionsOfForest(LinearExtensionsOfPoset): r""" Linear extensions such that the poset is a forest. """ + def cardinality(self): r""" Use Atkinson's algorithm to compute the number of linear extensions. @@ -902,6 +943,7 @@ class LinearExtensionsOfMobile(LinearExtensionsOfPoset): r""" Linear extensions for a mobile poset. """ + def cardinality(self): r""" Return the number of linear extensions by using the determinant From cef5e45ab22d95b6e313cf3e40dcd7cf3dab44b9 Mon Sep 17 00:00:00 2001 From: Sandstorm831 Date: Wed, 18 Jan 2023 23:03:06 +0530 Subject: [PATCH 278/751] implemented diff algo, for borderline cases --- src/sage/combinat/posets/linear_extensions.py | 42 ++++++++++++++----- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/src/sage/combinat/posets/linear_extensions.py b/src/sage/combinat/posets/linear_extensions.py index 754c4d4fae8..e4807c44ce1 100644 --- a/src/sage/combinat/posets/linear_extensions.py +++ b/src/sage/combinat/posets/linear_extensions.py @@ -258,9 +258,9 @@ def is_supergreedy(self): A linear extension `[e_1, e_2, \ldots, e_n]` is *supergreedy* if for every i, either `e_i+1` cover `e_i` otherwise on backtracking - from `e_i` to `e_1`, either `e_i+1` should be in the upper cover of - the first element having a non-empty upper cover or should include - only the next element. + through the list of elements previosly choosen, either `e_i+1` + should be in the upper cover of the first element having a non-empty + upper cover or should include only the prviosly choosen elements. EXAMPLES:: @@ -279,16 +279,38 @@ def is_supergreedy(self): True """ P = self.poset() + Q = set() for i in range(len(self) - 1): + Q.add(self[i]) if not P.covers(self[i], self[i + 1]): - for u in range(i, -1, -1): - if len(P.upper_covers(self[u])) != 0: - if (self[i+1] in P.upper_covers(self[u])): - break - elif (self[u+1] in P.upper_covers(self[u])): - continue + if len(P.upper_covers(self[i])) != 0: + return False + R = True + S = [self[i]] + while(R): + for t in S: + for u in P.lower_covers(t): + if len(P.upper_covers(u)) == 0: + S = P.lower_covers(t) + break + else : + for v in P.upper_covers(u): + if v != self[i+1] and v not in Q: + return False + elif v == self[i+1] : + R=False + break + else : + continue + else : + if P.lower_covers(t) == 0 : + return False + S = P.lower_covers(t) + continue + break else: - return False + continue + break return True def tau(self, i): From ba9fcbc817193edb7e443519ba8293111d3b0866 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 18 Jan 2023 22:46:42 -0800 Subject: [PATCH 279/751] build/pkgs/cvxpy: Update to 1.3.0 --- build/pkgs/cvxpy/checksums.ini | 6 +++--- build/pkgs/cvxpy/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/cvxpy/checksums.ini b/build/pkgs/cvxpy/checksums.ini index 0e9043f458c..128dcda1602 100644 --- a/build/pkgs/cvxpy/checksums.ini +++ b/build/pkgs/cvxpy/checksums.ini @@ -1,5 +1,5 @@ tarball=cvxpy-VERSION.tar.gz -sha1=4cb95d1844ecd10b82f944e101ceb95829ee68d9 -md5=c5115e246e45dfcb0bde69c257b90a56 -cksum=3292234281 +sha1=8c87f8f8c2177f917ec2fad7d2b510787ffdf72d +md5=408b0a3140750299207f61de95b4ed6e +cksum=3643150234 upstream_url=https://pypi.io/packages/source/c/cvxpy/cvxpy-VERSION.tar.gz diff --git a/build/pkgs/cvxpy/package-version.txt b/build/pkgs/cvxpy/package-version.txt index 23aa8390630..f0bb29e7638 100644 --- a/build/pkgs/cvxpy/package-version.txt +++ b/build/pkgs/cvxpy/package-version.txt @@ -1 +1 @@ -1.2.2 +1.3.0 From 75155645dd1d1514bc57be9a7174923c9a1ec803 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 18 Jan 2023 22:47:50 -0800 Subject: [PATCH 280/751] build/pkgs/osqp_python: Update to 0.6.2.post8 --- build/pkgs/osqp_python/checksums.ini | 6 +++--- build/pkgs/osqp_python/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/osqp_python/checksums.ini b/build/pkgs/osqp_python/checksums.ini index 1fbb958ee11..750d1d8450a 100644 --- a/build/pkgs/osqp_python/checksums.ini +++ b/build/pkgs/osqp_python/checksums.ini @@ -1,5 +1,5 @@ tarball=osqp-VERSION.tar.gz -sha1=2f6493ecb34dd129531ac955abdd7ed03af8f78f -md5=2e7491f53e4825515db6db4e97d2ef45 -cksum=1539597175 +sha1=d69d05b87c03aaaf80ac0bb11e1a68746cf8c486 +md5=ae46dc55aa4ff7a2009db756f2b61d98 +cksum=2780901429 upstream_url=https://pypi.io/packages/source/o/osqp/osqp-VERSION.tar.gz diff --git a/build/pkgs/osqp_python/package-version.txt b/build/pkgs/osqp_python/package-version.txt index 8c6bbf4a781..72b079f4d76 100644 --- a/build/pkgs/osqp_python/package-version.txt +++ b/build/pkgs/osqp_python/package-version.txt @@ -1 +1 @@ -0.6.2.post5 +0.6.2.post8 From 91cbc216435076022488da4d20a26a9d160b56c2 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 18 Jan 2023 22:48:01 -0800 Subject: [PATCH 281/751] build/pkgs/ecos_python: Update to 2.0.12 --- build/pkgs/ecos_python/checksums.ini | 6 +++--- build/pkgs/ecos_python/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/ecos_python/checksums.ini b/build/pkgs/ecos_python/checksums.ini index 1d660c0b9a5..dc6d7b9a6f1 100644 --- a/build/pkgs/ecos_python/checksums.ini +++ b/build/pkgs/ecos_python/checksums.ini @@ -1,5 +1,5 @@ tarball=ecos-VERSION.tar.gz -sha1=6d980399f0b7fe0aab243a0cc8e4578b3a7bbd2c -md5=2d8cd61259dfd47fedb0bf23ab31520a -cksum=4227060546 +sha1=7afce63aec44522052e05fa2e1c82e12fe20fd45 +md5=a76939695aa07f8ab2f01a532732f348 +cksum=2810151369 upstream_url=https://pypi.io/packages/source/e/ecos/ecos-VERSION.tar.gz diff --git a/build/pkgs/ecos_python/package-version.txt b/build/pkgs/ecos_python/package-version.txt index 0a692060f9b..280a1e3368b 100644 --- a/build/pkgs/ecos_python/package-version.txt +++ b/build/pkgs/ecos_python/package-version.txt @@ -1 +1 @@ -2.0.10 +2.0.12 From 7ff5766056af2607d9f42fc8d04cafe215379ba5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 18 Jan 2023 22:48:14 -0800 Subject: [PATCH 282/751] build/pkgs/qdldl_python: Update to 0.1.5.post3 --- build/pkgs/qdldl_python/checksums.ini | 6 +++--- build/pkgs/qdldl_python/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/qdldl_python/checksums.ini b/build/pkgs/qdldl_python/checksums.ini index 6a9e416028c..defd264f787 100644 --- a/build/pkgs/qdldl_python/checksums.ini +++ b/build/pkgs/qdldl_python/checksums.ini @@ -1,5 +1,5 @@ tarball=qdldl-VERSION.tar.gz -sha1=ccecff38b06eef36a38e91635464b9f357a6f198 -md5=a7ca53ba719a12e4303a1274506c55a8 -cksum=3447836333 +sha1=af76c57ca1787f5e44e42f6c9f916b84ae599f1f +md5=63d719bd8073c1661a1baa6b510b8aad +cksum=105675620 upstream_url=https://pypi.io/packages/source/q/qdldl/qdldl-VERSION.tar.gz diff --git a/build/pkgs/qdldl_python/package-version.txt b/build/pkgs/qdldl_python/package-version.txt index d5b60a259f6..a2b2442e697 100644 --- a/build/pkgs/qdldl_python/package-version.txt +++ b/build/pkgs/qdldl_python/package-version.txt @@ -1 +1 @@ -0.1.5.post2 +0.1.5.post3 From 53506aac25706957bfc01aa3fdc1b58a3ddcdf06 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Fri, 20 Jan 2023 11:53:48 +0100 Subject: [PATCH 283/751] rename pseudo_inverse to quadratic --- src/sage/combinat/bijectionist.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index b80deb74e0c..8a9989176d6 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -20,7 +20,7 @@ :meth:`~Bijectionist.set_constant_blocks` | Declare that the statistic is constant on some sets. :meth:`~Bijectionist.set_distributions` | Restrict the distribution of values of the statistic on some elements. :meth:`~Bijectionist.set_intertwining_relations` | Declare that the statistic intertwines with other maps. - :meth:`~Bijectionist.set_pseudo_inverse_relation` | Declare that the statistic satisfies a certain relation. + :meth:`~Bijectionist.set_quadratic_relation` | Declare that the statistic satisfies a certain relation. :meth:`~Bijectionist.set_homomesic` | Declare that the statistic is homomesic with respect to a given set partition. @@ -535,7 +535,7 @@ def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], self.set_statistics(*alpha_beta) self.set_value_restrictions(*value_restrictions) self.set_distributions(*elements_distributions) - self.set_pseudo_inverse_relation(*phi_psi) + self.set_quadratic_relation(*phi_psi) self.set_homomesic(Q) self.set_intertwining_relations(*pi_rho) self.set_constant_blocks(P) @@ -1395,7 +1395,7 @@ def set_intertwining_relations(self, *pi_rho): set_semi_conjugacy = set_intertwining_relations - def set_pseudo_inverse_relation(self, *phi_psi): + def set_quadratic_relation(self, *phi_psi): r""" Add restrictions of the form `s\circ\psi\circ s = \phi`. @@ -1430,7 +1430,7 @@ def set_pseudo_inverse_relation(self, *phi_psi): ( [ /\ ] ) ] ( [ /\/\ / \ ] [ /\ ] ) ] ( [ / \, / \ ], [ /\/\/\, /\/ \ ] ) ] - sage: bij.set_pseudo_inverse_relation((lambda D: D, lambda D: D)) + sage: bij.set_quadratic_relation((lambda D: D, lambda D: D)) sage: ascii_art(sorted(bij.minimal_subdistributions_iterator())) [ ( [ /\ ] ) [ ( [ / \ ] ) ( [ /\ ] [ /\/\ ] ) @@ -2516,7 +2516,7 @@ def __init__(self, bijectionist: Bijectionist, solutions=None): name=f"block {p}"[:50]) self.add_alpha_beta_constraints() self.add_distribution_constraints() - self.add_pseudo_inverse_relation_constraints() + self.add_quadratic_relation_constraints() self.add_homomesic_constraints() self.add_intertwining_relation_constraints() if get_verbose() >= 2: @@ -2959,7 +2959,7 @@ def add_intertwining_relation_constraints(self): self.milp.add_constraint(rhs <= 0, name=f"pi/rho({composition_index})") - def add_pseudo_inverse_relation_constraints(self): + def add_quadratic_relation_constraints(self): r""" Add constraints enforcing that `s\circ\phi\circ s = \psi`. @@ -2987,7 +2987,7 @@ def add_pseudo_inverse_relation_constraints(self): ( [ /\ ] ) ] ( [ /\/\ / \ ] [ /\ ] ) ] ( [ / \, / \ ], [ /\/\/\, /\/ \ ] ) ] - sage: bij.set_pseudo_inverse_relation((lambda D: D, lambda D: D)) # indirect doctest + sage: bij.set_quadratic_relation((lambda D: D, lambda D: D)) # indirect doctest sage: ascii_art(sorted(bij.minimal_subdistributions_iterator())) [ ( [ /\ ] ) [ ( [ / \ ] ) ( [ /\ ] [ /\/\ ] ) From 81bec94c3616153279d2fc926d8d80c8080b8b6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Sun, 22 Jan 2023 09:57:25 +0100 Subject: [PATCH 284/751] fix and activate W391 in cython files --- src/sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx | 1 - src/sage/algebras/fusion_rings/poly_tup_engine.pyx | 1 - src/sage/algebras/fusion_rings/shm_managers.pyx | 1 - src/sage/numerical/backends/generic_backend.pyx | 1 - src/tox.ini | 2 +- 5 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx b/src/sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx index a482c0c4fc1..02dcd786458 100644 --- a/src/sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx +++ b/src/sage/algebras/fusion_rings/fast_parallel_fmats_methods.pyx @@ -531,4 +531,3 @@ cdef pent_verify(factory, tuple mp_params): feq_verif(factory, worker_results, fvars, Nk_ij, id_anyon, nonuple) if i % 50000000 == 0 and i and verbose: print("{:5d}m equations checked... {} potential misses so far...".format(i // 1000000, len(worker_results))) - diff --git a/src/sage/algebras/fusion_rings/poly_tup_engine.pyx b/src/sage/algebras/fusion_rings/poly_tup_engine.pyx index ac465e14a77..ebf3ea8aa8c 100644 --- a/src/sage/algebras/fusion_rings/poly_tup_engine.pyx +++ b/src/sage/algebras/fusion_rings/poly_tup_engine.pyx @@ -576,4 +576,3 @@ cpdef tuple poly_tup_sortkey(tuple eq_tup): key.append(-exp._data[2*i]) key.append(exp._data[2*i+1]) return tuple(key) - diff --git a/src/sage/algebras/fusion_rings/shm_managers.pyx b/src/sage/algebras/fusion_rings/shm_managers.pyx index 91aba7ba59f..633dd464845 100644 --- a/src/sage/algebras/fusion_rings/shm_managers.pyx +++ b/src/sage/algebras/fusion_rings/shm_managers.pyx @@ -773,4 +773,3 @@ def make_FvarsHandler(n, field, idx_map, init_data): sage: f.shutdown_worker_pool() """ return FvarsHandler(n, field, idx_map, init_data=init_data) - diff --git a/src/sage/numerical/backends/generic_backend.pyx b/src/sage/numerical/backends/generic_backend.pyx index 64d47f7bc2b..40689cacad6 100644 --- a/src/sage/numerical/backends/generic_backend.pyx +++ b/src/sage/numerical/backends/generic_backend.pyx @@ -1819,4 +1819,3 @@ cpdef GenericBackend get_solver(constraint_generation = False, solver = None, ba else: raise ValueError("'solver' should be set to 'GLPK', 'GLPK/exact', 'Coin', 'CPLEX', 'CVXOPT', 'Gurobi', 'PPL', 'SCIP', 'InteractiveLP', None (in which case the default one is used), or a callable.") - diff --git a/src/tox.ini b/src/tox.ini index 06777c93ac2..14f51843c9f 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -116,7 +116,7 @@ description = # See https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes deps = pycodestyle commands = pycodestyle --select E111,E306,E401,E701,E702,E703,W291,W391,W605,E711,E712,E713,E721,E722 {posargs:{toxinidir}/sage/} - pycodestyle --select E111,E306,E401,E703,W605,E712,E713,E721,E722 --filename *.pyx {posargs:{toxinidir}/sage/} + pycodestyle --select E111,E306,E401,E703,W391,W605,E712,E713,E721,E722 --filename *.pyx {posargs:{toxinidir}/sage/} [pycodestyle] max-line-length = 160 From 200441dae09c8693f851178d6c28df6d80b3cc68 Mon Sep 17 00:00:00 2001 From: Sandstorm831 Date: Sun, 22 Jan 2023 23:33:48 +0530 Subject: [PATCH 285/751] correcting function for disjoint set of points --- src/sage/combinat/posets/linear_extensions.py | 53 ++++++++++++++++--- 1 file changed, 45 insertions(+), 8 deletions(-) diff --git a/src/sage/combinat/posets/linear_extensions.py b/src/sage/combinat/posets/linear_extensions.py index e4807c44ce1..4c953c55ef5 100644 --- a/src/sage/combinat/posets/linear_extensions.py +++ b/src/sage/combinat/posets/linear_extensions.py @@ -279,14 +279,51 @@ def is_supergreedy(self): True """ P = self.poset() + Q = [] + N = [] + S = [] + T = [] + if not self: + return True + N.append(self[0]) + for i in range(len(self)-1): + if P.compare_elements(self[0],self[i+1]) is not None : + N.append(self[i+1]) + else: + S.append(self[i+1]) + Q.append(N.copy()) + N.clear() + while(S): + N.append(S[0]) + for i in range(len(S)-1): + if P.compare_elements(S[0],S[i+1]) is not None : + N.append(S[i+1]) + else: + T.append(S[i+1]) + Q.append(N.copy()) + S.clear() + S = T.copy() + T.clear() + N.clear() + for l in Q: + if not self.complete_supergreedy(P, l): + return False + else: + return True + + def complete_supergreedy(self, P, L): + r""" + Return ``True`` if the linear extension is supergreedy and any one + element is comparable to all the elements + """ Q = set() - for i in range(len(self) - 1): - Q.add(self[i]) - if not P.covers(self[i], self[i + 1]): - if len(P.upper_covers(self[i])) != 0: + for i in range(len(L) - 1): + Q.add(L[i]) + if not P.covers(L[i], L[i + 1]): + if len(P.upper_covers(L[i])) != 0: return False R = True - S = [self[i]] + S = [L[i]] while(R): for t in S: for u in P.lower_covers(t): @@ -295,9 +332,9 @@ def is_supergreedy(self): break else : for v in P.upper_covers(u): - if v != self[i+1] and v not in Q: + if v != L[i+1] and v not in Q: return False - elif v == self[i+1] : + elif v == L[i+1] : R=False break else : @@ -312,7 +349,7 @@ def is_supergreedy(self): continue break return True - + def tau(self, i): r""" Return the operator `\tau_i` on linear extensions ``self`` of a poset. From eb3a270968597fcec607a9f1c5d8d2ca42725e88 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 5 Dec 2022 22:14:24 -0800 Subject: [PATCH 286/751] sage.structure.element: Add ABCs Polynomial, MPolynomial, use for isinstance testing --- src/sage/combinat/kazhdan_lusztig.py | 4 ++-- src/sage/combinat/sf/sfa.py | 4 ++-- src/sage/crypto/boolean_function.pyx | 4 ++-- src/sage/crypto/sbox.pyx | 4 ++-- src/sage/crypto/stream.py | 4 ++-- src/sage/groups/affine_gps/group_element.py | 4 ++-- .../groups/perm_gps/permgroup_element.pyx | 4 ++-- .../characteristic_cohomology_class.py | 6 +++--- src/sage/quadratic_forms/constructions.py | 4 ++-- .../rings/finite_rings/element_ntl_gf2e.pyx | 2 +- .../rings/finite_rings/finite_field_base.pyx | 4 ++-- .../finite_rings/finite_field_constructor.py | 4 ++-- .../rings/finite_rings/finite_field_givaro.py | 4 ++-- .../finite_rings/finite_field_ntl_gf2e.py | 4 ++-- src/sage/rings/finite_rings/residue_field.pyx | 4 ++-- .../rings/function_field/function_field.py | 4 ++-- src/sage/rings/laurent_series_ring.py | 2 +- src/sage/rings/number_field/number_field.py | 6 +++--- src/sage/rings/padics/factory.py | 8 ++++---- .../rings/padics/padic_template_element.pxi | 4 ++-- .../rings/polynomial/multi_polynomial.pxd | 4 ++-- .../rings/polynomial/multi_polynomial.pyx | 2 +- .../polynomial_padic_capped_relative_dense.py | 2 +- .../rings/polynomial/polynomial_element.pxd | 5 +++-- .../rings/polynomial/polynomial_element.pyx | 12 +++++------ .../polynomial_integer_dense_ntl.pyx | 4 +--- src/sage/rings/qqbar.py | 4 ++-- .../schemes/berkovich/berkovich_cp_element.py | 6 +++--- src/sage/schemes/cyclic_covers/constructor.py | 4 ++-- .../elliptic_curves/ell_curve_isogeny.py | 4 ++-- .../hyperelliptic_curves/constructor.py | 4 ++-- .../hyperelliptic_curves/jacobian_homset.py | 8 ++++---- .../hyperelliptic_curves/monsky_washnitzer.py | 6 +++--- src/sage/structure/element.pxd | 6 ++++++ src/sage/structure/element.pyx | 20 +++++++++++++++++++ 35 files changed, 100 insertions(+), 75 deletions(-) diff --git a/src/sage/combinat/kazhdan_lusztig.py b/src/sage/combinat/kazhdan_lusztig.py index a8561253b28..75995aa34e4 100644 --- a/src/sage/combinat/kazhdan_lusztig.py +++ b/src/sage/combinat/kazhdan_lusztig.py @@ -20,7 +20,7 @@ #***************************************************************************** -from sage.rings.polynomial.polynomial_element import is_Polynomial +from sage.structure.element import Polynomial from sage.misc.cachefunc import cached_method from sage.rings.polynomial.laurent_polynomial import LaurentPolynomial from sage.structure.sage_object import SageObject @@ -75,7 +75,7 @@ def __init__(self, W, q, trace=False): self._trace = trace self._one = W.one() self._base_ring = q.parent() - if is_Polynomial(q): + if isinstance(q, Polynomial): self._base_ring_type = "polynomial" elif isinstance(q, LaurentPolynomial): self._base_ring_type = "laurent" diff --git a/src/sage/combinat/sf/sfa.py b/src/sage/combinat/sf/sfa.py index 040dd78f4d3..8144233329e 100644 --- a/src/sage/combinat/sf/sfa.py +++ b/src/sage/combinat/sf/sfa.py @@ -217,7 +217,7 @@ from sage.rings.integer import Integer from sage.rings.infinity import infinity from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing -from sage.rings.polynomial.polynomial_element import is_Polynomial +from sage.structure.element import Polynomial from sage.rings.polynomial.multi_polynomial import is_MPolynomial from sage.combinat.partition import _Partitions, Partitions, Partitions_n, Partition from sage.categories.hopf_algebras import HopfAlgebras @@ -6404,7 +6404,7 @@ def _nonnegative_coefficients(x): sage: _nonnegative_coefficients(x^2-4) False """ - if is_Polynomial(x) or is_MPolynomial(x): + if isinstance(x, Polynomial) or is_MPolynomial(x): return all(c >= 0 for c in x.coefficients(sparse=False)) else: return x >= 0 diff --git a/src/sage/crypto/boolean_function.pyx b/src/sage/crypto/boolean_function.pyx index a9ea665475c..1358ae1b958 100644 --- a/src/sage/crypto/boolean_function.pyx +++ b/src/sage/crypto/boolean_function.pyx @@ -40,7 +40,7 @@ from sage.rings.finite_rings.finite_field_constructor import GF from sage.rings.polynomial.pbori.pbori import BooleanPolynomial from sage.rings.finite_rings.finite_field_constructor import is_FiniteField from sage.rings.finite_rings.finite_field_givaro import FiniteField_givaro -from sage.rings.polynomial.polynomial_element import is_Polynomial +from sage.structure.element import Polynomial from sage.misc.superseded import deprecated_function_alias @@ -327,7 +327,7 @@ cdef class BooleanFunction(SageObject): bitset_init(self._truth_table, (1<1 or not is_Polynomial(polynomial): + from sage.structure.element import Polynomial + if polynomial.parent().ngens()>1 or not isinstance(polynomial, Polynomial): raise TypeError("polynomial must be univariate a polynomial") if names is None: names = (polynomial.variable_name(), ) diff --git a/src/sage/rings/laurent_series_ring.py b/src/sage/rings/laurent_series_ring.py index 9cad038840c..d3660288b4c 100644 --- a/src/sage/rings/laurent_series_ring.py +++ b/src/sage/rings/laurent_series_ring.py @@ -466,7 +466,7 @@ def _element_constructor_(self, x, n=0, prec=infinity): x^-3 """ from sage.rings.fraction_field_element import is_FractionFieldElement - from sage.rings.polynomial.polynomial_element import is_Polynomial + from sage.structure.element import Polynomial from sage.rings.polynomial.multi_polynomial_element import is_MPolynomial from sage.structure.element import parent from sage.libs.pari.all import pari_gen diff --git a/src/sage/rings/number_field/number_field.py b/src/sage/rings/number_field/number_field.py index fbdd43dfabb..31572ab1c2e 100644 --- a/src/sage/rings/number_field/number_field.py +++ b/src/sage/rings/number_field/number_field.py @@ -114,7 +114,7 @@ import sage.interfaces.gap import sage.rings.complex_mpfr -from sage.rings.polynomial.polynomial_element import is_Polynomial +from sage.structure.element import Polynomial import sage.rings.real_mpfr import sage.rings.real_mpfi import sage.rings.complex_double @@ -647,7 +647,7 @@ def create_key_and_extra_args(self, polynomial, name, check, embedding, latex_na raise TypeError("You must specify the name of the generator.") name = normalize_names(1, name) - if not is_Polynomial(polynomial): + if not isinstance(polynomial, Polynomial): try: polynomial = polynomial.polynomial(QQ) except (AttributeError, TypeError): @@ -868,7 +868,7 @@ def NumberFieldTower(polynomials, names, check=True, embeddings=None, latex_name f = polynomials[0] name = names[0] w = NumberFieldTower(polynomials[1:], names=names[1:], check=check, embeddings=embeddings[1:], latex_names=latex_names[1:], assume_disc_small=assume_disc_small, maximize_at_primes=maximize_at_primes, structures=structures[1:]) - var = f.variable_name() if is_Polynomial(f) else 'x' + var = f.variable_name() if isinstance(f, Polynomial) else 'x' R = w[var] # polynomial ring return w.extension(R(f), name, check=check, embedding=embeddings[0], structure=structures[0], latex_name=latex_names[0]) # currently, extension does not accept assume_disc_small, or maximize_at_primes diff --git a/src/sage/rings/padics/factory.py b/src/sage/rings/padics/factory.py index 044dcae0bed..72ee42a0e5b 100644 --- a/src/sage/rings/padics/factory.py +++ b/src/sage/rings/padics/factory.py @@ -35,7 +35,7 @@ from sage.rings.infinity import Infinity from sage.structure.factorization import Factorization from sage.rings.integer_ring import ZZ -from sage.rings.polynomial.polynomial_element import is_Polynomial +from sage.structure.element import Polynomial from sage.structure.element import is_Element from .padic_base_leaves import (pAdicRingCappedRelative, pAdicRingCappedAbsolute, @@ -2535,7 +2535,7 @@ def Zq(q, prec = None, type = 'capped-rel', modulus = None, names=None, if isinstance(names, (list, tuple)): names = names[0] from sage.structure.element import Expression - if not (modulus is None or is_Polynomial(modulus) or isinstance(modulus, Expression)): + if not (modulus is None or isinstance(modulus, Polynomial) or isinstance(modulus, Expression)): raise TypeError("modulus must be a polynomial") if names is not None and not isinstance(names, str): names = str(names) @@ -3278,7 +3278,7 @@ def create_key_and_extra_args(self, base, modulus, prec = None, print_mode = Non raise ValueError("symbolic expression must be in only one variable") exact_modulus = modulus.polynomial(base.exact_field()) approx_modulus = modulus.polynomial(base) - elif is_Polynomial(modulus): + elif isinstance(modulus, Polynomial): if modulus.parent().ngens() != 1: raise ValueError("must use univariate polynomial") exact_modulus = modulus.change_ring(base.exact_field()) @@ -3381,7 +3381,7 @@ def create_object(self, version, key, approx_modulus=None, shift_seed=None): from sage.structure.element import Expression if isinstance(premodulus, Expression): exact_modulus = premodulus.polynomial(base.exact_field()) - elif is_Polynomial(premodulus): + elif isinstance(premodulus, Polynomial): exact_modulus = premodulus.change_ring(base.exact_field()) show_prec = None else: diff --git a/src/sage/rings/padics/padic_template_element.pxi b/src/sage/rings/padics/padic_template_element.pxi index fed8ac89f81..f3aa97e879b 100644 --- a/src/sage/rings/padics/padic_template_element.pxi +++ b/src/sage/rings/padics/padic_template_element.pxi @@ -36,7 +36,7 @@ from sage.rings.infinity import infinity from sage.rings.rational import Rational from sage.rings.padics.precision_error import PrecisionError from sage.rings.padics.misc import trim_zeros -from sage.structure.element import canonical_coercion +from sage.structure.element import canonical_coercion, Polynomial import itertools cdef long maxordp = (1L << (sizeof(long) * 8 - 2)) - 1 @@ -156,7 +156,7 @@ cdef class pAdicTemplateElement(pAdicGenericElement): x = x + [k.prime_subfield().zero()] * (k.degree() - len(x)) elif isinstance(x, (Integer, Rational, list, tuple)): pass - elif sage.rings.polynomial.polynomial_element.is_Polynomial(x) and x.variable_name() == self.parent().variable_name(): + elif isinstance(x, Polynomial) and x.variable_name() == self.parent().variable_name(): x = x.list() else: x = Rational(x) diff --git a/src/sage/rings/polynomial/multi_polynomial.pxd b/src/sage/rings/polynomial/multi_polynomial.pxd index 44fdf3edfc4..fd947a33bb2 100644 --- a/src/sage/rings/polynomial/multi_polynomial.pxd +++ b/src/sage/rings/polynomial/multi_polynomial.pxd @@ -1,6 +1,6 @@ -from sage.structure.element cimport CommutativeRingElement +from sage.structure.element cimport MPolynomial as MPolynomial_base -cdef class MPolynomial(CommutativeRingElement): +cdef class MPolynomial(MPolynomial_base): cdef long _hash_c(self) except -1 cpdef _mod_(self, right) cpdef dict _mpoly_dict_recursive(self, tuple vars=*, base_ring=*) diff --git a/src/sage/rings/polynomial/multi_polynomial.pyx b/src/sage/rings/polynomial/multi_polynomial.pyx index 49e4c52d365..57d95361ddd 100644 --- a/src/sage/rings/polynomial/multi_polynomial.pyx +++ b/src/sage/rings/polynomial/multi_polynomial.pyx @@ -30,7 +30,7 @@ from sage.rings.real_mpfr import RealField_class,RealField from sage.rings.polynomial.polydict cimport ETuple from sage.rings.polynomial.polynomial_element cimport Polynomial -cdef class MPolynomial(CommutativeRingElement): +cdef class MPolynomial(MPolynomial_base): #################### # Some standard conversions diff --git a/src/sage/rings/polynomial/padics/polynomial_padic_capped_relative_dense.py b/src/sage/rings/polynomial/padics/polynomial_padic_capped_relative_dense.py index 64e1f6368b6..35fe90dd8f8 100644 --- a/src/sage/rings/polynomial/padics/polynomial_padic_capped_relative_dense.py +++ b/src/sage/rings/polynomial/padics/polynomial_padic_capped_relative_dense.py @@ -661,7 +661,7 @@ def rshift_coeffs(self, shift, no_list=False): return Polynomial_padic_capped_relative_dense(self.parent(), (self._poly // fdiv, 0, [0 if a <= shift else a - shift for a in self._relprecs], False, None, None), construct=True) # def __floordiv__(self, right): - # if is_Polynomial(right) and right.is_constant() and right[0] in self.base_ring(): + # if isinstance(right, Polynomial) and right.is_constant() and right[0] in self.base_ring(): # d = self.base_ring()(right[0]) # elif (right in self.base_ring()): # d = self.base_ring()(right) diff --git a/src/sage/rings/polynomial/polynomial_element.pxd b/src/sage/rings/polynomial/polynomial_element.pxd index 1ba103329c3..cafc17eab3f 100644 --- a/src/sage/rings/polynomial/polynomial_element.pxd +++ b/src/sage/rings/polynomial/polynomial_element.pxd @@ -1,11 +1,12 @@ -from sage.structure.element import Element, CommutativeAlgebraElement +from sage.structure.element import Element from sage.structure.element cimport Element, CommutativeAlgebraElement, ModuleElement +from sage.structure.element cimport Polynomial as Polynomial_base from sage.structure.parent cimport Parent from sage.rings.integer cimport Integer from .polynomial_compiled cimport CompiledPolynomialFunction -cdef class Polynomial(CommutativeAlgebraElement): +cdef class Polynomial(Polynomial_base): cdef Polynomial _new_generic(self, list coeffs) cdef char _is_gen cdef CompiledPolynomialFunction _compiled diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index d2649163d48..a0c5fd2e84f 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -149,14 +149,14 @@ cpdef is_Polynomial(f): EXAMPLES:: - sage: from sage.rings.polynomial.polynomial_element import is_Polynomial + sage: from sage.structure.element import Polynomial sage: R. = ZZ[] - sage: is_Polynomial(x^3 + x + 1) + sage: isinstance(x^3 + x + 1, Polynomial) True sage: S. = R[] sage: f = y^3 + x*y -3*x; f y^3 + x*y - 3*x - sage: is_Polynomial(f) + sage: isinstance(f, Polynomial) True However this function does not return True for genuine multivariate @@ -166,13 +166,13 @@ cpdef is_Polynomial(f): sage: R. = QQ[] sage: f = y^3 + x*y -3*x; f y^3 + x*y - 3*x - sage: is_Polynomial(f) + sage: isinstance(f, Polynomial) False sage: var('x,y') (x, y) sage: f = y^3 + x*y -3*x; f y^3 + x*y - 3*x - sage: is_Polynomial(f) + sage: isinstance(f, Polynomial) False """ return isinstance(f, Polynomial) @@ -182,7 +182,7 @@ from .polynomial_compiled cimport CompiledPolynomialFunction from sage.rings.polynomial.polydict cimport ETuple -cdef class Polynomial(CommutativeAlgebraElement): +cdef class Polynomial(Polynomial_base): """ A polynomial. diff --git a/src/sage/rings/polynomial/polynomial_integer_dense_ntl.pyx b/src/sage/rings/polynomial/polynomial_integer_dense_ntl.pyx index 41ddaa92e51..7a84cb86f05 100644 --- a/src/sage/rings/polynomial/polynomial_integer_dense_ntl.pyx +++ b/src/sage/rings/polynomial/polynomial_integer_dense_ntl.pyx @@ -51,8 +51,6 @@ from sage.rings.integer_ring import IntegerRing from sage.rings.integer_ring cimport IntegerRing_class ZZ_sage = IntegerRing() -from sage.rings.polynomial.polynomial_element import is_Polynomial - from sage.libs.ntl.ntl_ZZX cimport ntl_ZZX from sage.rings.integer_ring import ZZ @@ -757,7 +755,7 @@ cdef class Polynomial_integer_dense_ntl(Polynomial): sage: g // f x - 6 """ - if is_Polynomial(right) and right.is_constant() and right[0] in ZZ: + if isinstance(right, Polynomial) and right.is_constant() and right[0] in ZZ: d = ZZ(right[0]) return self.parent()([c // d for c in self.list()], construct=True) elif (right in self.parent().base_ring()): diff --git a/src/sage/rings/qqbar.py b/src/sage/rings/qqbar.py index e0aeed19815..90b8645ab82 100644 --- a/src/sage/rings/qqbar.py +++ b/src/sage/rings/qqbar.py @@ -573,7 +573,7 @@ from sage.rings.complex_interval_field import ComplexIntervalField from sage.rings.complex_interval import is_ComplexIntervalFieldElement from sage.rings.polynomial.all import PolynomialRing -from sage.rings.polynomial.polynomial_element import is_Polynomial +from sage.structure.element import Polynomial from sage.rings.integer_ring import ZZ from sage.rings.rational_field import QQ from sage.rings.number_field.number_field import NumberField, GaussianField, CyclotomicField @@ -6676,7 +6676,7 @@ def __init__(self, poly): sage: type(P) # indirect doctest """ - if not is_Polynomial(poly): + if not isinstance(poly, Polynomial): raise ValueError("Trying to create AlgebraicPolynomialTracker on non-Polynomial") B = poly.base_ring() diff --git a/src/sage/schemes/berkovich/berkovich_cp_element.py b/src/sage/schemes/berkovich/berkovich_cp_element.py index b8cc1887957..57968823ec9 100644 --- a/src/sage/schemes/berkovich/berkovich_cp_element.py +++ b/src/sage/schemes/berkovich/berkovich_cp_element.py @@ -83,7 +83,7 @@ def __init__(self, parent, center, radius=None, power=None, prec=20, space_type= Type I point centered at 4 + O(5^20) """ from sage.rings.function_field.element import is_FunctionFieldElement - from sage.rings.polynomial.polynomial_element import is_Polynomial + from sage.structure.element import Polynomial from sage.rings.fraction_field_element import FractionFieldElement_1poly_field self._type = None @@ -117,9 +117,9 @@ def __init__(self, parent, center, radius=None, power=None, prec=20, space_type= raise TypeError('center was %s, a multivariable polynomial' % center) # check if the radius and the center are functions - center_func_check = is_FunctionFieldElement(center) or is_Polynomial(center) or\ + center_func_check = is_FunctionFieldElement(center) or isinstance(center, Polynomial) or\ isinstance(center, FractionFieldElement_1poly_field) or isinstance(center, Expression) - radius_func_check = is_FunctionFieldElement(radius) or is_Polynomial(radius) or\ + radius_func_check = is_FunctionFieldElement(radius) or isinstance(radius, Polynomial) or\ isinstance(radius, FractionFieldElement_1poly_field) or isinstance(radius, Expression) if center_func_check: diff --git a/src/sage/schemes/cyclic_covers/constructor.py b/src/sage/schemes/cyclic_covers/constructor.py index 0966b0793d5..a67a17a2f17 100644 --- a/src/sage/schemes/cyclic_covers/constructor.py +++ b/src/sage/schemes/cyclic_covers/constructor.py @@ -8,7 +8,7 @@ # https://www.gnu.org/licenses/ # ***************************************************************************** -from sage.rings.polynomial.polynomial_element import is_Polynomial +from sage.structure.element import Polynomial from sage.rings.finite_rings.finite_field_constructor import is_FiniteField from sage.schemes.affine.affine_space import AffineSpace from .cycliccover_generic import CyclicCover_generic @@ -100,7 +100,7 @@ def CyclicCover(r, f, names=None, check_smooth=True): """ - if not is_Polynomial(f): + if not isinstance(f, Polynomial): raise TypeError("Arguments f (= %s) must be a polynomial" % (f,)) P = f.parent() f = P(f) diff --git a/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py b/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py index fe80879bc15..4bc0825a35a 100644 --- a/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py +++ b/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py @@ -86,7 +86,7 @@ from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.integer import Integer from sage.rings.laurent_series_ring import LaurentSeriesRing -from sage.rings.polynomial.polynomial_element import is_Polynomial +from sage.structure.element import Polynomial from sage.rings.fraction_field import FractionField from sage.schemes.elliptic_curves.all import EllipticCurve @@ -159,7 +159,7 @@ def _isogeny_determine_algorithm(E, kernel): kernel = [kernel] kernel_is_list = True - if is_Polynomial(kernel) or (kernel_is_list and kernel[0] in E.base_ring()): + if isinstance(kernel, Polynomial) or (kernel_is_list and kernel[0] in E.base_ring()): return "kohel" if kernel_is_list and kernel[0] in E: diff --git a/src/sage/schemes/hyperelliptic_curves/constructor.py b/src/sage/schemes/hyperelliptic_curves/constructor.py index 54556e08755..49ff0254cd1 100644 --- a/src/sage/schemes/hyperelliptic_curves/constructor.py +++ b/src/sage/schemes/hyperelliptic_curves/constructor.py @@ -25,7 +25,7 @@ import sage.rings.abc from sage.rings.rational_field import is_RationalField from sage.rings.finite_rings.finite_field_constructor import is_FiniteField -from sage.rings.polynomial.polynomial_element import is_Polynomial +from sage.structure.element import Polynomial from sage.structure.dynamic_class import dynamic_class @@ -197,7 +197,7 @@ def HyperellipticCurve(f, h=0, names=None, PP=None, check_squarefree=True): # F is the discriminant; use this for the type check # rather than f and h, one of which might be constant. F = h**2 + 4*f - if not is_Polynomial(F): + if not isinstance(F, Polynomial): raise TypeError("Arguments f (= %s) and h (= %s) must be polynomials" % (f, h)) P = F.parent() f = P(f) diff --git a/src/sage/schemes/hyperelliptic_curves/jacobian_homset.py b/src/sage/schemes/hyperelliptic_curves/jacobian_homset.py index f7b0a1f67f0..9fc24367211 100644 --- a/src/sage/schemes/hyperelliptic_curves/jacobian_homset.py +++ b/src/sage/schemes/hyperelliptic_curves/jacobian_homset.py @@ -49,7 +49,7 @@ from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.integer_ring import ZZ from sage.rings.integer import is_Integer, Integer -from sage.rings.polynomial.polynomial_element import is_Polynomial +from sage.structure.element import Polynomial from sage.schemes.generic.homset import SchemeHomset_points from sage.schemes.generic.morphism import is_SchemeMorphism @@ -138,15 +138,15 @@ def __call__(self, P): P1 = R(P1) P2 = R(P2) return JacobianMorphism_divisor_class_field(self, (P1, P2)) - if is_Integer(P1) and is_Polynomial(P2): + if is_Integer(P1) and isinstance(P2, Polynomial): R = PolynomialRing(self.value_ring(), 'x') P1 = R(P1) return JacobianMorphism_divisor_class_field(self, (P1, P2)) - if is_Integer(P2) and is_Polynomial(P1): + if is_Integer(P2) and isinstance(P1, Polynomial): R = PolynomialRing(self.value_ring(), 'x') P2 = R(P2) return JacobianMorphism_divisor_class_field(self, (P1, P2)) - if is_Polynomial(P1) and is_Polynomial(P2): + if isinstance(P1, Polynomial) and isinstance(P2, Polynomial): return JacobianMorphism_divisor_class_field(self, tuple(P)) if is_SchemeMorphism(P1) and is_SchemeMorphism(P2): return self(P1) - self(P2) diff --git a/src/sage/schemes/hyperelliptic_curves/monsky_washnitzer.py b/src/sage/schemes/hyperelliptic_curves/monsky_washnitzer.py index b1f10eb1344..40bb62aae0d 100644 --- a/src/sage/schemes/hyperelliptic_curves/monsky_washnitzer.py +++ b/src/sage/schemes/hyperelliptic_curves/monsky_washnitzer.py @@ -64,7 +64,7 @@ from sage.rings.infinity import Infinity from sage.rings.laurent_series_ring import is_LaurentSeriesRing from sage.rings.padics.all import pAdicField -from sage.rings.polynomial.polynomial_element import is_Polynomial +from sage.structure.element import Polynomial from sage.rings.ring import CommutativeAlgebra from sage.schemes.elliptic_curves.constructor import EllipticCurve from sage.schemes.elliptic_curves.ell_generic import is_EllipticCurve @@ -489,7 +489,7 @@ def __init__(self, Q, laurent_series=False): ... ArithmeticError: 2 and 3 must be invertible in the coefficient ring (=Ring of integers modulo 10) of Q """ - if not is_Polynomial(Q): + if not isinstance(Q, Polynomial): raise TypeError("Q (=%s) must be a polynomial" % Q) if Q.degree() != 3 or not Q[2].is_zero(): @@ -2389,7 +2389,7 @@ def __init__(self, Q, R=None, invert_y=True): Q = C.hyperelliptic_polynomials()[0].change_ring(R) self._curve = C - if is_Polynomial(Q): + if isinstance(Q, Polynomial): self._Q = Q.change_ring(R) self._coeffs = self._Q.coefficients(sparse=False) if self._coeffs.pop() != 1: diff --git a/src/sage/structure/element.pxd b/src/sage/structure/element.pxd index 5c6e295a4b8..d6de9b9d2d3 100644 --- a/src/sage/structure/element.pxd +++ b/src/sage/structure/element.pxd @@ -239,6 +239,12 @@ cdef class CommutativeAlgebraElement(CommutativeRingElement): cdef class Expression(CommutativeRingElement): pass +cdef class Polynomial(CommutativeAlgebraElement): + pass + +cdef class MPolynomial(CommutativeAlgebraElement): + pass + cdef class InfinityElement(RingElement): pass diff --git a/src/sage/structure/element.pyx b/src/sage/structure/element.pyx index e9430f0b086..eb694681249 100644 --- a/src/sage/structure/element.pyx +++ b/src/sage/structure/element.pyx @@ -4291,6 +4291,26 @@ def is_CommutativeAlgebraElement(x): cdef class CommutativeAlgebraElement(CommutativeRingElement): pass + ############################################## + +cdef class Polynomial(CommutativeAlgebraElement): + r""" + Abstract base class for :class:`~sage.rings.polynomial.polynomial_element.Polynomial` + """ + + pass + + ############################################## + +cdef class MPolynomial(CommutativeAlgebraElement): + r""" + Abstract base class for :class:`~sage.rings.polynomial.multi_polynomial.MPolynomial` + """ + + pass + + ############################################## + def is_InfinityElement(x): """ Return ``True`` if x is of type InfinityElement. From 6696f5c470b690f528a3b869bd9ae482e91b1e37 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 5 Dec 2022 23:27:41 -0800 Subject: [PATCH 287/751] Use ABC MPolynomial for isinstance testing --- src/sage/combinat/schubert_polynomial.py | 6 +++--- src/sage/combinat/sf/sfa.py | 4 ++-- src/sage/crypto/mq/rijndael_gf.py | 4 ++-- src/sage/groups/affine_gps/group_element.py | 4 ++-- src/sage/groups/perm_gps/permgroup_element.pyx | 4 ++-- src/sage/libs/symmetrica/sb.pxi | 2 +- src/sage/modular/modsym/ambient.py | 4 ++-- src/sage/quadratic_forms/binary_qf.py | 4 ++-- src/sage/rings/finite_rings/element_ntl_gf2e.pyx | 2 +- src/sage/rings/laurent_series_ring.py | 5 ++--- src/sage/rings/polynomial/infinite_polynomial_element.py | 4 ++-- src/sage/rings/polynomial/multi_polynomial_element.py | 5 +---- src/sage/schemes/berkovich/berkovich_cp_element.py | 4 ++-- src/sage/schemes/curves/constructor.py | 4 ++-- src/sage/schemes/elliptic_curves/constructor.py | 4 ++-- src/sage/schemes/elliptic_curves/jacobian.py | 4 ++-- src/sage/schemes/generic/hypersurface.py | 6 +++--- src/sage/schemes/plane_conics/constructor.py | 4 ++-- src/sage/schemes/plane_quartics/quartic_constructor.py | 4 ++-- 19 files changed, 37 insertions(+), 41 deletions(-) diff --git a/src/sage/combinat/schubert_polynomial.py b/src/sage/combinat/schubert_polynomial.py index 07d679ac65d..070e1b1e5bf 100644 --- a/src/sage/combinat/schubert_polynomial.py +++ b/src/sage/combinat/schubert_polynomial.py @@ -78,7 +78,7 @@ from sage.rings.integer import Integer from sage.rings.integer_ring import ZZ from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing -from sage.rings.polynomial.multi_polynomial import is_MPolynomial +from sage.structure.element import MPolynomial from sage.combinat.permutation import Permutations, Permutation import sage.libs.symmetrica.all as symmetrica from sage.misc.cachefunc import cached_method @@ -147,7 +147,7 @@ def expand(self): x0 """ p = symmetrica.t_SCHUBERT_POLYNOM(self) - if not is_MPolynomial(p): + if not isinstance(p, MPolynomial): R = PolynomialRing(self.parent().base_ring(), 1, 'x0') p = R(p) return p @@ -439,7 +439,7 @@ def _element_constructor_(self, x): elif isinstance(x, Permutation): perm = x.remove_extra_fixed_points() return self._from_dict({perm: self.base_ring().one()}) - elif is_MPolynomial(x): + elif isinstance(x, MPolynomial): return symmetrica.t_POLYNOM_SCHUBERT(x) else: raise TypeError diff --git a/src/sage/combinat/sf/sfa.py b/src/sage/combinat/sf/sfa.py index 8144233329e..cefc2d7f473 100644 --- a/src/sage/combinat/sf/sfa.py +++ b/src/sage/combinat/sf/sfa.py @@ -218,7 +218,7 @@ from sage.rings.infinity import infinity from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.structure.element import Polynomial -from sage.rings.polynomial.multi_polynomial import is_MPolynomial +from sage.structure.element import MPolynomial from sage.combinat.partition import _Partitions, Partitions, Partitions_n, Partition from sage.categories.hopf_algebras import HopfAlgebras from sage.categories.hopf_algebras_with_basis import HopfAlgebrasWithBasis @@ -6404,7 +6404,7 @@ def _nonnegative_coefficients(x): sage: _nonnegative_coefficients(x^2-4) False """ - if isinstance(x, Polynomial) or is_MPolynomial(x): + if isinstance(x, Polynomial) or isinstance(x, MPolynomial): return all(c >= 0 for c in x.coefficients(sparse=False)) else: return x >= 0 diff --git a/src/sage/crypto/mq/rijndael_gf.py b/src/sage/crypto/mq/rijndael_gf.py index 154c84d146c..30160378077 100644 --- a/src/sage/crypto/mq/rijndael_gf.py +++ b/src/sage/crypto/mq/rijndael_gf.py @@ -1549,9 +1549,9 @@ def compose(self, f, g, algorithm='encrypt', f_attr=None, g_attr=None): if not isinstance(f, RijndaelGF.Round_Component_Poly_Constr): msg = "keyword 'f' must be a Round_Component_Poly_Constr" raise TypeError(msg) - from sage.rings.polynomial.multi_polynomial import is_MPolynomial + from sage.structure.element import MPolynomial if not isinstance(g, RijndaelGF.Round_Component_Poly_Constr) and \ - not is_MPolynomial(g): + not isinstance(g, MPolynomial): msg = ("keyword 'g' must be a Round_Component_Poly_Constr or a " "polynomial over {0}") raise TypeError(msg.format(self._F)) diff --git a/src/sage/groups/affine_gps/group_element.py b/src/sage/groups/affine_gps/group_element.py index fe691151cf3..3ad22c1d96b 100644 --- a/src/sage/groups/affine_gps/group_element.py +++ b/src/sage/groups/affine_gps/group_element.py @@ -419,8 +419,8 @@ def __call__(self, v): ring = v.parent() return ring([self._A[0,0], self._b[0]]) - from sage.rings.polynomial.multi_polynomial import is_MPolynomial - if is_MPolynomial(v) and parent.degree() == v.parent().ngens(): + from sage.structure.element import MPolynomial + if isinstance(v, MPolynomial) and parent.degree() == v.parent().ngens(): ring = v.parent() from sage.modules.free_module_element import vector image_coords = self._A * vector(ring, ring.gens()) + self._b diff --git a/src/sage/groups/perm_gps/permgroup_element.pyx b/src/sage/groups/perm_gps/permgroup_element.pyx index 90ed0e7d6b3..b06873b7f3d 100644 --- a/src/sage/groups/perm_gps/permgroup_element.pyx +++ b/src/sage/groups/perm_gps/permgroup_element.pyx @@ -115,7 +115,7 @@ from cypari2.gen cimport Gen from sage.ext.stdsage cimport HAS_DICTIONARY from sage.rings.all import ZZ, Integer from sage.structure.element import Polynomial -from sage.rings.polynomial.multi_polynomial import is_MPolynomial +from sage.structure.element import MPolynomial from sage.structure.element import is_Matrix from sage.matrix.all import MatrixSpace from sage.sets.finite_enumerated_set import FiniteEnumeratedSet @@ -1230,7 +1230,7 @@ cdef class PermutationGroupElement(MultiplicativeGroupElement): raise ValueError("%s does not act on %s" % (self, left.parent())) return left - elif is_MPolynomial(left): + elif isinstance(left, MPolynomial): R = left.parent() vars = R.gens() try: diff --git a/src/sage/libs/symmetrica/sb.pxi b/src/sage/libs/symmetrica/sb.pxi index e61fc08fb98..54ba66ecb06 100644 --- a/src/sage/libs/symmetrica/sb.pxi +++ b/src/sage/libs/symmetrica/sb.pxi @@ -111,7 +111,7 @@ def t_POLYNOM_SCHUBERT_symmetrica(a): cdef OP ca = callocobject(), cres = callocobject() - if not is_MPolynomial(a): + if not isinstance(a, MPolynomial): freeall(ca) freeall(cres) raise TypeError("a (= %s) must be a multivariate polynomial") diff --git a/src/sage/modular/modsym/ambient.py b/src/sage/modular/modsym/ambient.py index 627f1c567e7..53393317183 100644 --- a/src/sage/modular/modsym/ambient.py +++ b/src/sage/modular/modsym/ambient.py @@ -95,7 +95,7 @@ class ``ModularSymbolsAmbient``, derived from from sage.modules.free_module_element import FreeModuleElement from sage.rings.integer import Integer from sage.rings.integer_ring import ZZ -from sage.rings.polynomial.multi_polynomial import is_MPolynomial +from sage.structure.element import MPolynomial from sage.rings.rational_field import QQ from sage.rings.ring import Ring from sage.structure.factorization import Factorization @@ -474,7 +474,7 @@ def _element_constructor_(self, x, computed_with_hecke=False): return sum([c*self(y) for c, y in x], self(0)) elif isinstance(x, list): - if len(x) == 3 and is_MPolynomial(x[0]): + if len(x) == 3 and isinstance(x[0], MPolynomial): return self.modular_symbol_sum(x) else: return self.modular_symbol(x) diff --git a/src/sage/quadratic_forms/binary_qf.py b/src/sage/quadratic_forms/binary_qf.py index cfa3ada73ef..727077a7197 100755 --- a/src/sage/quadratic_forms/binary_qf.py +++ b/src/sage/quadratic_forms/binary_qf.py @@ -130,14 +130,14 @@ def __init__(self, a, b=None, c=None): sage: BinaryQF(0) 0 """ - from sage.rings.polynomial.multi_polynomial_element import is_MPolynomial + from sage.structure.element import MPolynomial if b is None and c is None: if (isinstance(a, (list, tuple)) and len(a) == 3): a, b, c = a elif a == 0: a = b = c = 0 - elif (is_MPolynomial(a) and a.is_homogeneous() and a.base_ring() == ZZ + elif (isinstance(a, MPolynomial) and a.is_homogeneous() and a.base_ring() == ZZ and a.degree() == 2 and a.parent().ngens() == 2): x, y = a.parent().gens() a, b, c = [a.monomial_coefficient(mon) for mon in [x**2, x*y, y**2]] diff --git a/src/sage/rings/finite_rings/element_ntl_gf2e.pyx b/src/sage/rings/finite_rings/element_ntl_gf2e.pyx index fee9990e573..38b1aaf2ce7 100644 --- a/src/sage/rings/finite_rings/element_ntl_gf2e.pyx +++ b/src/sage/rings/finite_rings/element_ntl_gf2e.pyx @@ -1005,7 +1005,7 @@ cdef class FiniteField_ntl_gf2eElement(FinitePolyExtElement): a^15 + a^13 + a^11 + a^10 + a^9 + a^8 + a^7 + a^6 + a^4 + a + 1 sage: from sage.structure.element import Polynomial - sage: is_Polynomial(e.polynomial()) + sage: isinstance(e.polynomial(), Polynomial) True sage: e.polynomial('x') diff --git a/src/sage/rings/laurent_series_ring.py b/src/sage/rings/laurent_series_ring.py index d3660288b4c..37b0455928d 100644 --- a/src/sage/rings/laurent_series_ring.py +++ b/src/sage/rings/laurent_series_ring.py @@ -466,8 +466,7 @@ def _element_constructor_(self, x, n=0, prec=infinity): x^-3 """ from sage.rings.fraction_field_element import is_FractionFieldElement - from sage.structure.element import Polynomial - from sage.rings.polynomial.multi_polynomial_element import is_MPolynomial + from sage.structure.element import Polynomial, MPolynomial from sage.structure.element import parent from sage.libs.pari.all import pari_gen @@ -500,7 +499,7 @@ def _element_constructor_(self, x, n=0, prec=infinity): return (self(self.polynomial_ring()(x)) << n).add_bigoh(prec) elif (is_FractionFieldElement(x) and (x.base_ring() is self.base_ring() or x.base_ring() == self.base_ring()) - and (is_Polynomial(x.numerator()) or is_MPolynomial(x.numerator()))): + and isinstance(x.numerator(), (Polynomial, MPolynomial))): x = self(x.numerator()) / self(x.denominator()) return (x << n).add_bigoh(prec) return self.element_class(self, x, n).add_bigoh(prec) diff --git a/src/sage/rings/polynomial/infinite_polynomial_element.py b/src/sage/rings/polynomial/infinite_polynomial_element.py index ac21b71553f..aacddf7a040 100644 --- a/src/sage/rings/polynomial/infinite_polynomial_element.py +++ b/src/sage/rings/polynomial/infinite_polynomial_element.py @@ -94,7 +94,7 @@ from sage.structure.element import RingElement from sage.structure.richcmp import richcmp from sage.misc.cachefunc import cached_method -from sage.rings.polynomial.multi_polynomial_element import is_MPolynomial +from sage.structure.element import MPolynomial import copy @@ -249,7 +249,7 @@ def __init__(self, A, p): # the wrong ring and we get here without going through # _element_constructor_. See trac 22514 for examples. # So a little extra checking is done here. - if not is_MPolynomial(p) or p.base_ring() is not A.base_ring(): + if not isinstance(p, MPolynomial) or p.base_ring() is not A.base_ring(): # coerce to a convenient multivariate polynomial ring p = A._minP(p) diff --git a/src/sage/rings/polynomial/multi_polynomial_element.py b/src/sage/rings/polynomial/multi_polynomial_element.py index 702bf9af7eb..d96e9bfb9cc 100644 --- a/src/sage/rings/polynomial/multi_polynomial_element.py +++ b/src/sage/rings/polynomial/multi_polynomial_element.py @@ -61,7 +61,7 @@ from sage.structure.factorization import Factorization from sage.rings.polynomial.polynomial_singular_interface import Polynomial_singular_repr from sage.structure.sequence import Sequence -from .multi_polynomial import MPolynomial +from .multi_polynomial import MPolynomial, is_MPolynomial from sage.categories.morphism import Morphism from sage.misc.lazy_attribute import lazy_attribute @@ -71,9 +71,6 @@ from sage.categories.number_fields import NumberFields from sage.rings.real_mpfr import RealField -def is_MPolynomial(x): - return isinstance(x, MPolynomial) - class MPolynomial_element(MPolynomial): def __init__(self, parent, x): diff --git a/src/sage/schemes/berkovich/berkovich_cp_element.py b/src/sage/schemes/berkovich/berkovich_cp_element.py index 57968823ec9..d496d0543b6 100644 --- a/src/sage/schemes/berkovich/berkovich_cp_element.py +++ b/src/sage/schemes/berkovich/berkovich_cp_element.py @@ -109,8 +109,8 @@ def __init__(self, parent, center, radius=None, power=None, prec=20, space_type= # is_FunctionFieldElement calls .parent elif hasattr(center, "parent") and hasattr(radius, 'parent'): - from sage.rings.polynomial.multi_polynomial_element import is_MPolynomial - if is_MPolynomial(center): + from sage.structure.element import MPolynomial + if isinstance(center, MPolynomial): try: center = center.univariate_polynomial() except AttributeError: diff --git a/src/sage/schemes/curves/constructor.py b/src/sage/schemes/curves/constructor.py index fc3d174de59..a388e660fef 100644 --- a/src/sage/schemes/curves/constructor.py +++ b/src/sage/schemes/curves/constructor.py @@ -36,7 +36,7 @@ from sage.categories.fields import Fields -from sage.rings.polynomial.multi_polynomial_element import is_MPolynomial +from sage.structure.element import MPolynomial from sage.rings.polynomial.multi_polynomial_ring import is_MPolynomialRing from sage.rings.finite_rings.finite_field_constructor import is_FiniteField @@ -239,7 +239,7 @@ def Curve(F, A=None): else: A = ProjectiveSpace(P.ngens()-1, P.base_ring(), names=P.variable_names()) A._coordinate_ring = P - elif is_MPolynomial(F): # define a plane curve + elif isinstance(F, MPolynomial): # define a plane curve P = F.parent() k = F.base_ring() diff --git a/src/sage/schemes/elliptic_curves/constructor.py b/src/sage/schemes/elliptic_curves/constructor.py index 1ecdc082cd5..ff59b42bfe9 100644 --- a/src/sage/schemes/elliptic_curves/constructor.py +++ b/src/sage/schemes/elliptic_curves/constructor.py @@ -29,7 +29,7 @@ from sage.rings.polynomial.multi_polynomial_ring import is_MPolynomialRing from sage.rings.finite_rings.finite_field_constructor import is_FiniteField from sage.rings.number_field.number_field import is_NumberField -from sage.rings.polynomial.multi_polynomial_element import is_MPolynomial +from sage.structure.element import MPolynomial from sage.rings.ring import is_Ring from sage.categories.fields import Fields @@ -420,7 +420,7 @@ def create_key_and_extra_args(self, x=None, y=None, j=None, minimal_twist=True, if isinstance(parent(x), sage.rings.abc.SymbolicRing): x = x._polynomial_(rings.QQ['x', 'y']) - if is_MPolynomial(x): + if isinstance(x, MPolynomial): if y is None: x = coefficients_from_Weierstrass_polynomial(x) else: diff --git a/src/sage/schemes/elliptic_curves/jacobian.py b/src/sage/schemes/elliptic_curves/jacobian.py index b6983ab75f7..dc09a18096e 100644 --- a/src/sage/schemes/elliptic_curves/jacobian.py +++ b/src/sage/schemes/elliptic_curves/jacobian.py @@ -104,8 +104,8 @@ def Jacobian(X, **kwds): pass morphism = kwds.pop('morphism', False) - from sage.rings.polynomial.multi_polynomial_element import is_MPolynomial - if is_MPolynomial(X): + from sage.structure.element import MPolynomial + if isinstance(X, MPolynomial): if morphism: from sage.schemes.curves.constructor import Curve return Jacobian_of_equation(X, curve=Curve(X), **kwds) diff --git a/src/sage/schemes/generic/hypersurface.py b/src/sage/schemes/generic/hypersurface.py index 12138d596af..58f8ed517fd 100644 --- a/src/sage/schemes/generic/hypersurface.py +++ b/src/sage/schemes/generic/hypersurface.py @@ -18,7 +18,7 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from sage.rings.polynomial.multi_polynomial_element import is_MPolynomial +from sage.structure.element import MPolynomial from sage.schemes.affine.affine_subscheme import AlgebraicScheme_subscheme_affine from sage.schemes.projective.projective_subscheme import AlgebraicScheme_subscheme_projective @@ -92,7 +92,7 @@ def __init__(self, poly, ambient=None): sage: H == loads(dumps(H)) True """ - if not is_MPolynomial(poly): + if not isinstance(poly, MPolynomial): raise TypeError("Defining polynomial (=%s) must be a multivariate polynomial."%poly) if not poly.is_homogeneous(): raise TypeError("Defining polynomial (=%s) must be homogeneous."%poly) @@ -177,7 +177,7 @@ def __init__(self, poly, ambient=None): sage: H == loads(dumps(H)) True """ - if not is_MPolynomial(poly): + if not isinstance(poly, MPolynomial): raise TypeError("Defining polynomial (= %s) must be a multivariate polynomial"%poly) if ambient is None: R = poly.parent() diff --git a/src/sage/schemes/plane_conics/constructor.py b/src/sage/schemes/plane_conics/constructor.py index a2a14190087..c1c24049dfe 100644 --- a/src/sage/schemes/plane_conics/constructor.py +++ b/src/sage/schemes/plane_conics/constructor.py @@ -32,7 +32,7 @@ from sage.rings.ring import IntegralDomain from sage.rings.rational_field import is_RationalField from sage.rings.finite_rings.finite_field_constructor import is_FiniteField -from sage.rings.polynomial.multi_polynomial_element import is_MPolynomial +from sage.structure.element import MPolynomial from sage.rings.polynomial.polynomial_ring import is_PolynomialRing from sage.rings.polynomial.multi_polynomial_ring import is_MPolynomialRing from sage.rings.fraction_field import is_FractionField @@ -204,7 +204,7 @@ def Conic(base_field, F=None, names=None, unique=True): temp_ring = PolynomialRing(F.base_ring(), 3, names) F = vector(temp_ring.gens()) * F * vector(temp_ring.gens()) - if not is_MPolynomial(F): + if not isinstance(F, MPolynomial): raise TypeError("F (=%s) must be a three-variable polynomial or " "a sequence of points or coefficients" % F) diff --git a/src/sage/schemes/plane_quartics/quartic_constructor.py b/src/sage/schemes/plane_quartics/quartic_constructor.py index a0b5ce3c93a..53f1494abf0 100644 --- a/src/sage/schemes/plane_quartics/quartic_constructor.py +++ b/src/sage/schemes/plane_quartics/quartic_constructor.py @@ -9,7 +9,7 @@ #***************************************************************************** from sage.schemes.projective.projective_space import is_ProjectiveSpace, ProjectiveSpace -from sage.rings.polynomial.multi_polynomial_element import is_MPolynomial +from sage.structure.element import MPolynomial from .quartic_generic import QuarticCurve_generic @@ -50,7 +50,7 @@ def QuarticCurve(F, PP=None, check=False): ValueError: Argument F (=x^4 + y^4) must be a polynomial in 3 variables """ - if not is_MPolynomial(F): + if not isinstance(F, MPolynomial): raise ValueError(f"Argument F (={F}) must be a multivariate polynomial") P = F.parent() if not P.ngens() == 3: From 79f7e62da9a4d9170c383da70a727302a4340e83 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 6 Dec 2022 00:13:37 -0800 Subject: [PATCH 288/751] Fixups --- src/sage/libs/symmetrica/symmetrica.pxi | 4 ++-- src/sage/rings/polynomial/multi_polynomial.pyx | 3 +++ .../rings/polynomial/polynomial_element.pyx | 17 ++++++++++++----- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/sage/libs/symmetrica/symmetrica.pxi b/src/sage/libs/symmetrica/symmetrica.pxi index 7244b7e9655..06330bffbd4 100644 --- a/src/sage/libs/symmetrica/symmetrica.pxi +++ b/src/sage/libs/symmetrica/symmetrica.pxi @@ -401,7 +401,7 @@ cdef void late_import(): SymmetricFunctions, \ sqrt, \ builtinlist, \ - MPolynomialRing_base, is_MPolynomial,\ + MPolynomialRing_base, MPolynomial,\ SchubertPolynomialRing, SchubertPolynomial_class,\ two, fifteen, thirty, zero, sage_maxint @@ -454,7 +454,7 @@ cdef void late_import(): import sage.rings.polynomial.multi_polynomial_ring MPolynomialRing_base = sage.rings.polynomial.multi_polynomial_ring.MPolynomialRing_base import sage.rings.polynomial.multi_polynomial_element - is_MPolynomial = sage.rings.polynomial.multi_polynomial_element.is_MPolynomial + MPolynomial = sage.structure.element.MPolynomial import sage.combinat.schubert_polynomial SchubertPolynomialRing = sage.combinat.schubert_polynomial.SchubertPolynomialRing diff --git a/src/sage/rings/polynomial/multi_polynomial.pyx b/src/sage/rings/polynomial/multi_polynomial.pyx index 57d95361ddd..f798a67aa41 100644 --- a/src/sage/rings/polynomial/multi_polynomial.pyx +++ b/src/sage/rings/polynomial/multi_polynomial.pyx @@ -18,6 +18,9 @@ from sage.misc.derivative import multi_derivative from sage.misc.misc_c import prod def is_MPolynomial(x): + from sage.misc.superseded import deprecation + deprecation(32709, "the function is_MPolynomial is deprecated; use isinstance(x, sage.structure.element.MPolynomial) instead") + return isinstance(x, MPolynomial) from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index a0c5fd2e84f..5cff2e446a4 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -143,20 +143,24 @@ cpdef is_Polynomial(f): """ Return True if f is of type univariate polynomial. + This function is deprecated. + INPUT: - ``f`` -- an object EXAMPLES:: - sage: from sage.structure.element import Polynomial + sage: from sage.rings.polynomial.polynomial_element import is_Polynomial sage: R. = ZZ[] - sage: isinstance(x^3 + x + 1, Polynomial) + sage: is_Polynomial(x^3 + x + 1) + doctest:...: DeprecationWarning: the function is_Polynomial is deprecated; use isinstance(x, sage.structure.element.Polynomial) instead + See https://trac.sagemath.org/32709 for details. True sage: S. = R[] sage: f = y^3 + x*y -3*x; f y^3 + x*y - 3*x - sage: isinstance(f, Polynomial) + sage: is_Polynomial(f) True However this function does not return True for genuine multivariate @@ -166,15 +170,18 @@ cpdef is_Polynomial(f): sage: R. = QQ[] sage: f = y^3 + x*y -3*x; f y^3 + x*y - 3*x - sage: isinstance(f, Polynomial) + sage: is_Polynomial(f) False sage: var('x,y') (x, y) sage: f = y^3 + x*y -3*x; f y^3 + x*y - 3*x - sage: isinstance(f, Polynomial) + sage: is_Polynomial(f) False """ + from sage.misc.superseded import deprecation + deprecation(32709, "the function is_Polynomial is deprecated; use isinstance(x, sage.structure.element.Polynomial) instead") + return isinstance(f, Polynomial) from .polynomial_compiled cimport CompiledPolynomialFunction From ed050bbe039dc694cab318b9b3e6e4cf0c7e0e0f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 6 Dec 2022 00:28:48 -0800 Subject: [PATCH 289/751] sage.rings.polynomial: Make it a namespace package --- src/sage/rings/polynomial/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/sage/rings/polynomial/__init__.py diff --git a/src/sage/rings/polynomial/__init__.py b/src/sage/rings/polynomial/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 From 0613280e8b65291b76fd7d440ba16db3f055b5c4 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 6 Jan 2023 16:47:29 -0800 Subject: [PATCH 290/751] sage.structure.element: Introduce common base class CommutativePolynomial for ABCs Polynomial, MPolynomial --- src/sage/structure/element.pxd | 7 +++++-- src/sage/structure/element.pyx | 13 +++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/sage/structure/element.pxd b/src/sage/structure/element.pxd index d6de9b9d2d3..d0a574a95a1 100644 --- a/src/sage/structure/element.pxd +++ b/src/sage/structure/element.pxd @@ -239,10 +239,13 @@ cdef class CommutativeAlgebraElement(CommutativeRingElement): cdef class Expression(CommutativeRingElement): pass -cdef class Polynomial(CommutativeAlgebraElement): +cdef class CommutativePolynomial(CommutativeAlgebraElement): pass -cdef class MPolynomial(CommutativeAlgebraElement): +cdef class Polynomial(CommutativePolynomial): + pass + +cdef class MPolynomial(CommutativePolynomial): pass cdef class InfinityElement(RingElement): diff --git a/src/sage/structure/element.pyx b/src/sage/structure/element.pyx index eb694681249..3c80f65040d 100644 --- a/src/sage/structure/element.pyx +++ b/src/sage/structure/element.pyx @@ -4293,7 +4293,16 @@ cdef class CommutativeAlgebraElement(CommutativeRingElement): ############################################## -cdef class Polynomial(CommutativeAlgebraElement): +cdef class CommutativePolynomial(CommutativeAlgebraElement): + r""" + Abstract base class, common base for :class:`Polynomial` and :class:`MPolynomial` + """ + + pass + + ############################################## + +cdef class Polynomial(CommutativePolynomial): r""" Abstract base class for :class:`~sage.rings.polynomial.polynomial_element.Polynomial` """ @@ -4302,7 +4311,7 @@ cdef class Polynomial(CommutativeAlgebraElement): ############################################## -cdef class MPolynomial(CommutativeAlgebraElement): +cdef class MPolynomial(CommutativePolynomial): r""" Abstract base class for :class:`~sage.rings.polynomial.multi_polynomial.MPolynomial` """ From 27e888972fb6df6db5fd28ea8a1a5c276417796c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 6 Jan 2023 17:02:09 -0800 Subject: [PATCH 291/751] sage.structure.element: Introduce ABC InfinitePolynomial --- .../polynomial/infinite_polynomial_element.py | 5 ++--- src/sage/structure/element.pyx | 14 +++++++++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/sage/rings/polynomial/infinite_polynomial_element.py b/src/sage/rings/polynomial/infinite_polynomial_element.py index aacddf7a040..38c97fd3cf3 100644 --- a/src/sage/rings/polynomial/infinite_polynomial_element.py +++ b/src/sage/rings/polynomial/infinite_polynomial_element.py @@ -91,10 +91,9 @@ from sage.rings.integer_ring import ZZ from sage.rings.integer import Integer -from sage.structure.element import RingElement from sage.structure.richcmp import richcmp from sage.misc.cachefunc import cached_method -from sage.structure.element import MPolynomial +from sage.structure.element import RingElement, MPolynomial, InfinitePolynomial as InfinitePolynomial_base import copy @@ -206,7 +205,7 @@ def InfinitePolynomial(A, p): return InfinitePolynomial_sparse(A, p) -class InfinitePolynomial_sparse(RingElement): +class InfinitePolynomial_sparse(InfinitePolynomial_base): """ Element of a sparse Polynomial Ring with a Countably Infinite Number of Variables. diff --git a/src/sage/structure/element.pyx b/src/sage/structure/element.pyx index 3c80f65040d..f0e9a802bf5 100644 --- a/src/sage/structure/element.pyx +++ b/src/sage/structure/element.pyx @@ -4295,7 +4295,10 @@ cdef class CommutativeAlgebraElement(CommutativeRingElement): cdef class CommutativePolynomial(CommutativeAlgebraElement): r""" - Abstract base class, common base for :class:`Polynomial` and :class:`MPolynomial` + Abstract base class for commutative polynomials in any number of variables + + It is a common base for :class:`Polynomial`, :class:`MPolynomial`, and + :class:`InfinitePolynomial`. """ pass @@ -4320,6 +4323,15 @@ cdef class MPolynomial(CommutativePolynomial): ############################################## +cdef class InfinitePolynomial(CommutativePolynomial): + r""" + Abstract base class for :class:`~sage.rings.polynomial.infinite_polynomial_element.InfinitePolynomial_sparse` + """ + + pass + + ############################################## + def is_InfinityElement(x): """ Return ``True`` if x is of type InfinityElement. From 57228f59679e4b9d90d3b3071618cd6bdadc744d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 6 Jan 2023 18:05:38 -0800 Subject: [PATCH 292/751] src/sage/structure/element.pyx: Update hierarchy in documentation --- src/sage/structure/element.pyx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sage/structure/element.pyx b/src/sage/structure/element.pyx index f0e9a802bf5..bcecea4f589 100644 --- a/src/sage/structure/element.pyx +++ b/src/sage/structure/element.pyx @@ -47,6 +47,10 @@ abstract base classes. EuclideanDomainElement FieldElement CommutativeAlgebraElement + CommutativePolynomial + Polynomial + MPolynomial + InfinitePolynomial Expression AlgebraElement Matrix From 95e0adc1e4fae31a9e0fc2243bc599ea26f9f024 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 6 Jan 2023 19:18:46 -0800 Subject: [PATCH 293/751] src/sage/structure/element.pyx: Add unique-direct-subclass tests --- src/sage/structure/element.pyx | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/src/sage/structure/element.pyx b/src/sage/structure/element.pyx index bcecea4f589..9099451b0d6 100644 --- a/src/sage/structure/element.pyx +++ b/src/sage/structure/element.pyx @@ -4312,6 +4312,23 @@ cdef class CommutativePolynomial(CommutativeAlgebraElement): cdef class Polynomial(CommutativePolynomial): r""" Abstract base class for :class:`~sage.rings.polynomial.polynomial_element.Polynomial` + + This class is defined for the purpose of :func:`isinstance` tests. It should not be + instantiated. + + EXAMPLES:: + + sage: R1. = QQ[] + sage: isinstance(x, sage.structure.element.Polynomial) + True + sage: R2. = QQ[] + sage: isinstance(y, sage.structure.element.Polynomial) + False + + By design, there is a unique direct subclass:: + + sage: len(sage.structure.element.Polynomial.__subclasses__()) <= 1 + True """ pass @@ -4321,6 +4338,23 @@ cdef class Polynomial(CommutativePolynomial): cdef class MPolynomial(CommutativePolynomial): r""" Abstract base class for :class:`~sage.rings.polynomial.multi_polynomial.MPolynomial` + + This class is defined for the purpose of :func:`isinstance` tests. It should not be + instantiated. + + EXAMPLES:: + + sage: R1. = QQ[] + sage: isinstance(x, sage.structure.element.MPolynomial) + False + sage: R2. = QQ[] + sage: isinstance(y, sage.structure.element.MPolynomial) + True + + By design, there is a unique direct subclass:: + + sage: len(sage.structure.element.MPolynomial.__subclasses__()) <= 1 + True """ pass From 1fd625cddc8bb0e5cdafd8f08612ce886aaa5b7e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 6 Jan 2023 19:47:04 -0800 Subject: [PATCH 294/751] src/sage/structure/element.pyx: Add unique-direct-subclass test for Expression --- src/sage/structure/element.pyx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/sage/structure/element.pyx b/src/sage/structure/element.pyx index 9099451b0d6..bad783a11b4 100644 --- a/src/sage/structure/element.pyx +++ b/src/sage/structure/element.pyx @@ -3357,6 +3357,19 @@ cdef class Expression(CommutativeRingElement): r""" Abstract base class for :class:`~sage.symbolic.expression.Expression`. + + This class is defined for the purpose of :func:`isinstance` tests. It should not be + instantiated. + + EXAMPLES:: + + sage: isinstance(SR.var('y'), sage.structure.element.Expression) # optional - sage.symbolic + True + + By design, there is a unique direct subclass:: + + sage: len(sage.structure.element.Expression.__subclasses__()) <= 1 + True """ pass From 960506b6bf0939bbefa17702d794f91ccafb4282 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 17 Jan 2023 18:58:14 -0800 Subject: [PATCH 295/751] InfinitePolynomial: Change from constructor function to base class with __classcall__ --- .../polynomial/infinite_polynomial_element.py | 819 +++++++++--------- src/sage/structure/element.pyx | 16 +- 2 files changed, 426 insertions(+), 409 deletions(-) diff --git a/src/sage/rings/polynomial/infinite_polynomial_element.py b/src/sage/rings/polynomial/infinite_polynomial_element.py index 38c97fd3cf3..dd87d6e9c05 100644 --- a/src/sage/rings/polynomial/infinite_polynomial_element.py +++ b/src/sage/rings/polynomial/infinite_polynomial_element.py @@ -93,11 +93,12 @@ from sage.rings.integer import Integer from sage.structure.richcmp import richcmp from sage.misc.cachefunc import cached_method +from sage.misc.inherit_comparison import InheritComparisonClasscallMetaclass from sage.structure.element import RingElement, MPolynomial, InfinitePolynomial as InfinitePolynomial_base import copy -def InfinitePolynomial(A, p): +class InfinitePolynomial(InfinitePolynomial_base, metaclass=InheritComparisonClasscallMetaclass): """ Create an element of a Polynomial Ring with a Countably Infinite Number of Variables. @@ -163,73 +164,50 @@ def InfinitePolynomial(A, p): alpha_2^2 + alpha_1^2 """ - from sage.structure.element import parent - if hasattr(A, '_P'): - if parent(p) is A._P or (A._P.base_ring().has_coerce_map_from(parent(p))): - return InfinitePolynomial_dense(A, p) - # MPolynomialRing_polydict is crab. So, in that case, use sage_eval - from sage.rings.polynomial.multi_polynomial_ring import MPolynomialRing_polydict - if isinstance(A._P, MPolynomialRing_polydict): - from sage.rings.polynomial.infinite_polynomial_ring import GenDictWithBasering - from sage.misc.sage_eval import sage_eval - p = sage_eval(repr(p), GenDictWithBasering(A._P, A._P.gens_dict())) - return InfinitePolynomial_dense(A, p) - else: - # Now there remains to fight the oddities and bugs of libsingular. - PP = p.parent() - if A._P.has_coerce_map_from(PP): - if A._P.ngens() == PP.ngens(): # coercion is sometimes by position! - f = PP.hom(PP.variable_names(), A._P) - try: - return InfinitePolynomial_dense(A, f(p)) - except (ValueError, TypeError): - # last desperate attempt: String conversion - from sage.misc.sage_eval import sage_eval - from sage.rings.polynomial.infinite_polynomial_ring import GenDictWithBasering - # the base ring may be a function field, therefore - # we need GenDictWithBasering - return InfinitePolynomial_dense(A, sage_eval(repr(p), GenDictWithBasering(A._P, A._P.gens_dict()))) - return InfinitePolynomial_dense(A, A._P(p)) - # there is no coercion, so, we set up a name-preserving map. - SV = set(repr(x) for x in p.variables()) - f = PP.hom([x if x in SV else 0 for x in PP.variable_names()], A._P) - try: - return InfinitePolynomial_dense(A, f(p)) - except (ValueError, TypeError): - # last desperate attempt: String conversion - from sage.misc.sage_eval import sage_eval - from sage.rings.polynomial.infinite_polynomial_ring import GenDictWithBasering - # the base ring may be a function field, therefore - # we need GenDictWithBasering - return InfinitePolynomial_dense(A, sage_eval(repr(p), GenDictWithBasering(A._P, A._P.gens_dict()))) - return InfinitePolynomial_sparse(A, p) - - -class InfinitePolynomial_sparse(InfinitePolynomial_base): - """ - Element of a sparse Polynomial Ring with a Countably Infinite Number of Variables. - - INPUT: - - - ``A`` -- an Infinite Polynomial Ring in sparse implementation - - ``p`` -- a *classical* polynomial that can be interpreted in ``A``. - - Of course, one should not directly invoke this class, but rather - construct elements of ``A`` in the usual way. - EXAMPLES:: - - sage: A. = QQ[] - sage: B. = InfinitePolynomialRing(A,implementation='sparse') - sage: p = a*b[100] + 1/2*c[4] - sage: p - a*b_100 + 1/2*c_4 - sage: p.parent() - Infinite polynomial ring in b, c over Univariate Polynomial Ring in a over Rational Field - sage: p.polynomial().parent() - Multivariate Polynomial Ring in b_100, b_0, c_4, c_0 over Univariate Polynomial Ring in a over Rational Field + @staticmethod + def __classcall_private__(cls, A, p): + from sage.structure.element import parent + if hasattr(A, '_P'): + if parent(p) is A._P or (A._P.base_ring().has_coerce_map_from(parent(p))): + return InfinitePolynomial_dense(A, p) + # MPolynomialRing_polydict is crab. So, in that case, use sage_eval + from sage.rings.polynomial.multi_polynomial_ring import MPolynomialRing_polydict + if isinstance(A._P, MPolynomialRing_polydict): + from sage.rings.polynomial.infinite_polynomial_ring import GenDictWithBasering + from sage.misc.sage_eval import sage_eval + p = sage_eval(repr(p), GenDictWithBasering(A._P, A._P.gens_dict())) + return InfinitePolynomial_dense(A, p) + else: + # Now there remains to fight the oddities and bugs of libsingular. + PP = p.parent() + if A._P.has_coerce_map_from(PP): + if A._P.ngens() == PP.ngens(): # coercion is sometimes by position! + f = PP.hom(PP.variable_names(), A._P) + try: + return InfinitePolynomial_dense(A, f(p)) + except (ValueError, TypeError): + # last desperate attempt: String conversion + from sage.misc.sage_eval import sage_eval + from sage.rings.polynomial.infinite_polynomial_ring import GenDictWithBasering + # the base ring may be a function field, therefore + # we need GenDictWithBasering + return InfinitePolynomial_dense(A, sage_eval(repr(p), GenDictWithBasering(A._P, A._P.gens_dict()))) + return InfinitePolynomial_dense(A, A._P(p)) + # there is no coercion, so, we set up a name-preserving map. + SV = set(repr(x) for x in p.variables()) + f = PP.hom([x if x in SV else 0 for x in PP.variable_names()], A._P) + try: + return InfinitePolynomial_dense(A, f(p)) + except (ValueError, TypeError): + # last desperate attempt: String conversion + from sage.misc.sage_eval import sage_eval + from sage.rings.polynomial.infinite_polynomial_ring import GenDictWithBasering + # the base ring may be a function field, therefore + # we need GenDictWithBasering + return InfinitePolynomial_dense(A, sage_eval(repr(p), GenDictWithBasering(A._P, A._P.gens_dict()))) + return InfinitePolynomial_sparse(A, p) - """ # Construction and other basic methods # We assume that p is good input. Type checking etc. is now done # in the _element_constructor_ of the parent. @@ -299,56 +277,6 @@ def polynomial(self): """ return self._p - def __call__(self, *args, **kwargs): - """ - EXAMPLES:: - - sage: X. = InfinitePolynomialRing(QQ,implementation='sparse') - sage: a = x[0] + x[1] - sage: a(x_0=2,x_1=x[1]) - x_1 + 2 - sage: _.parent() - Infinite polynomial ring in x over Rational Field - sage: a(x_1=3) - x_0 + 3 - sage: _.parent() - Infinite polynomial ring in x over Rational Field - sage: a(x_1=x[100]) - x_100 + x_0 - - """ - # Replace any InfinitePolynomials by their underlying polynomials - if hasattr(self._p, 'variables'): - V = [str(x) for x in self._p.variables()] - else: - V = [] - for kw in kwargs: - value = kwargs[kw] - if isinstance(value, InfinitePolynomial_sparse): - kwargs[kw] = value._p - V.append(kw) - if hasattr(value._p, 'variables'): - V.extend([str(x) for x in value._p.variables()]) - args = list(args) - for i, arg in enumerate(args): - if isinstance(arg, InfinitePolynomial_sparse): - args[i] = arg._p - if hasattr(arg._p, 'variables'): - V.extend([str(x) for x in arg._p.variables()]) - V = list(set(V)) - V.sort(key=self.parent().varname_key, reverse=True) - if V: - from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing - R = PolynomialRing(self._p.base_ring(), V, order=self.parent()._order) - else: - return self - res = R(self._p)(*args, **kwargs) - try: - from sage.misc.sage_eval import sage_eval - return sage_eval(repr(res), self.parent().gens_dict()) - except Exception: - return res - def _getAttributeNames(self): """ This method implements tab completion, see :trac:`6854`. @@ -550,101 +478,6 @@ def max_index(self): """ return max([Integer(str(X).split('_')[1]) for X in self.variables()]+[-1]) - # Basic arithmetics - def _add_(self, x): - """ - EXAMPLES:: - - sage: X. = InfinitePolynomialRing(QQ) - sage: x[1] + x[2] # indirect doctest - x_2 + x_1 - - Check adding from a different parent:: - - sage: Y. = PolynomialRing(QQ) - sage: x[0] - x_0 - 0 - """ - # One may need a new parent for self._p and x._p - try: - return InfinitePolynomial_sparse(self.parent(), self._p + x._p) - except Exception: - pass - # We can now assume that self._p and x._p actually are polynomials, - # hence, their parent is not simply the underlying ring. - VarList = list(set(self._p.parent().variable_names()).union(set(x._p.parent().variable_names()))) - VarList.sort(key=self.parent().varname_key, reverse=True) - if VarList: - from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing - R = PolynomialRing(self._p.base_ring(), VarList, order=self.parent()._order) - else: - R = self._p.base_ring() - return InfinitePolynomial_sparse(self.parent(), R(self._p) + R(x._p)) - - def _mul_(self, x): - """ - EXAMPLES:: - - sage: X. = InfinitePolynomialRing(ZZ) - sage: x[2]*x[1] # indirect doctest - x_2*x_1 - - """ - try: - return InfinitePolynomial_sparse(self.parent(), self._p * x._p) - except Exception: - pass - # We can now assume that self._p and x._p actually are polynomials, - # hence, their parent is not just the underlying ring. - VarList = list(set(self._p.parent().variable_names()).union(set(x._p.parent().variable_names()))) - VarList.sort(key=self.parent().varname_key, reverse=True) - if VarList: - from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing - R = PolynomialRing(self._p.base_ring(), VarList, order=self.parent()._order) - else: - R = self._p.base_ring() - return InfinitePolynomial_sparse(self.parent(), R(self._p) * R(x._p)) - - def gcd(self, x): - """ - computes the greatest common divisor - - EXAMPLES:: - - sage: R.=InfinitePolynomialRing(QQ) - sage: p1=x[0]+x[1]**2 - sage: gcd(p1,p1+3) - 1 - sage: gcd(p1,p1)==p1 - True - """ - P = self.parent() - self._p = P._P(self._p) - x._p = P._P(x._p) - return InfinitePolynomial_sparse(self.parent(), self._p.gcd(x._p)) - - def _rmul_(self, left): - """ - TESTS:: - - sage: R. = InfinitePolynomialRing(QQ, implementation='sparse') - sage: R.from_base_ring(4) # indirect doctest - 4 - - """ - return InfinitePolynomial_sparse(self.parent(), left * self._p) - - def _lmul_(self, right): - """ - TESTS:: - - sage: R. = InfinitePolynomialRing(QQ, implementation='sparse') - sage: alpha[3]*4 # indirect doctest - 4*alpha_3 - - """ - return InfinitePolynomial_sparse(self.parent(), self._p * right) - def _div_(self, x): r""" Division of Infinite Polynomials. @@ -719,213 +552,52 @@ def _floordiv_(self, x): R = self._p.base_ring() return InfinitePolynomial_sparse(self.parent(), R(self._p) // R(x._p)) - def _sub_(self, x): + @cached_method + def lm(self): """ + The leading monomial of ``self``. + EXAMPLES:: - sage: X. = InfinitePolynomialRing(QQ) - sage: x[2] - x[1] # indirect doctest - x_2 - x_1 + sage: X. = InfinitePolynomialRing(QQ) + sage: p = 2*x[10]*y[30]+x[10]*y[1]^3*x[1]^2 + sage: p.lm() + x_10*x_1^2*y_1^3 """ - try: - return InfinitePolynomial_sparse(self.parent(), self._p - x._p) - except Exception: - pass - # We can now assume that self._p and x._p actually are polynomials, - # hence, their parent is not just the underlying ring. - VarList = list(set(self._p.parent().variable_names()).union(x._p.parent().variable_names())) - VarList.sort(key=self.parent().varname_key, reverse=True) - if VarList: - from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing - R = PolynomialRing(self._p.base_ring(), VarList, order=self.parent()._order) - else: - R = self._p.base_ring() - return InfinitePolynomial_sparse(self.parent(), R(self._p) - R(x._p)) + if hasattr(self._p, 'lm'): + return InfinitePolynomial(self.parent(), self._p.lm()) + if self._p == 0: + return self + if hasattr(self._p, 'variable_name'): # if it is univariate + return InfinitePolynomial(self.parent(), + self._p.parent().gen() ** max(self._p.exponents())) + return self # if it is scalar - def __pow__(self, n): + @cached_method + def lc(self): """ - Exponentiation by an integer, or action by a callable object - - NOTE: - - The callable object must accept non-negative integers as input - and return non-negative integers. Typical use case is a - permutation, that will result in the corresponding permutation - of variables. + The coefficient of the leading term of ``self``. EXAMPLES:: - sage: X. = InfinitePolynomialRing(QQ,implementation='sparse') - sage: p = x[10]*y[2]+2*x[1]*y[3] - sage: P = Permutation(((1,2),(3,4,5))) - sage: p^P # indirect doctest - x_10*y_1 + 2*x_2*y_4 + sage: X. = InfinitePolynomialRing(QQ) + sage: p = 2*x[10]*y[30]+3*x[10]*y[1]^3*x[1]^2 + sage: p.lc() + 3 """ - P = self.parent() - if callable(n): - if (self._p.parent() == self._p.base_ring()): - return self - if not (hasattr(self._p, 'variables') and self._p.variables()): - return self - if hasattr(n, 'to_cycles') and hasattr(n, '__len__'): # duck typing Permutation - # auxiliary function, necessary since n(m) raises an error if m>len(n) - l = len(n) + if hasattr(self._p, 'lc'): + return self._p.lc() + if hasattr(self._p, 'variable_name'): # univariate case + return self._p.leading_coefficient() + # scalar case + return self._p - def p(m): - return n(m) if 0 < m <= l else m - else: # Permutation group element - p = n - - def q(s): return s[0]+'_'+str(p(ZZ(s[1]))) - newVars = [q(X.split('_')) for X in self._p.parent().variable_names()] - if not newVars: - return self - copyVars = copy.copy(newVars) - newVars = list(set(list(self._p.parent().variable_names())+newVars)) - newVars.sort(key=self.parent().varname_key, reverse=True) - if newVars == list(self._p.parent().variable_names()): - newR = self._p.parent() - else: - from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing - newR = PolynomialRing(self._p.base_ring(), newVars, order=P._order) - mapR = self._p.parent().hom(copyVars, newR) - return InfinitePolynomial_sparse(self.parent(), mapR(self._p)) - return InfinitePolynomial_sparse(self.parent(), self._p**n) - - # Basic tools for Buchberger algorithm: - # order, leading term/monomial, symmetric cancellation order - - def _richcmp_(self, x, op): - r""" - Comparison of Infinite Polynomials. - - NOTE: - - Let x and y be generators of the parent of self. We only consider - monomial orderings in which x[m] > y[n] iff x appears earlier in the - list of generators than y, or x==y and m>n - - Under this restriction, the monomial ordering can be 'lex' (default), - 'degrevlex' or 'deglex'. - - EXAMPLES:: - - sage: X. = InfinitePolynomialRing(QQ, implementation='sparse') - sage: a = x[10]^3 - sage: b = x[1] + x[2] - sage: c = x[1] + x[2] - sage: d = y[1] + x[2] - sage: a == a # indirect doctest - True - sage: b == c # indirect doctest - True - sage: a == b # indirect doctest - False - sage: c > d # indirect doctest - True - - TESTS: - - A classical and an infinite sparse polynomial ring. Note that - the Sage coercion system allows comparison only if a common - parent for the two rings can be constructed. This is why we - have to have the order 'degrevlex':: - - sage: X. = InfinitePolynomialRing(ZZ,order='degrevlex', implementation='sparse') - sage: Y. = QQ[] - sage: x[3] == x_3 # indirect doctest - True - - Two infinite polynomial rings in different implementation and - order:: - - sage: Y = InfinitePolynomialRing(QQ,['x','y'],order='deglex',implementation='dense') - sage: x[2] == Y(x[2]) # indirect doctest - True - - An example in which a previous version had failed:: - - sage: X. = InfinitePolynomialRing(GF(3), order='degrevlex', implementation='sparse') - sage: p = Y('x_3*x_0^2 + x_0*y_3*y_0') - sage: q = Y('x_1*x_0^2 + x_0*y_1*y_0') - sage: p < q # indirect doctest - False - - """ - # We can assume that self.parent() is x.parent(), - # but of course the underlying polynomial rings - # may be widely different, and the sage coercion - # system can't guess what order we want. - from sage.structure.element import parent - R1 = parent(self._p) - R2 = parent(x._p) - if (hasattr(R1, 'has_coerce_map_from') and R1.has_coerce_map_from(R2)) or (hasattr(R2, 'has_coerce_map_from') and R2.has_coerce_map_from(R1)): - return richcmp(self._p, x._p, op) - VarList = list(set(self._p.parent().variable_names()).union(x._p.parent().variable_names())) - VarList.sort(key=self.parent().varname_key, reverse=True) - if VarList: - from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing - R = PolynomialRing(self._p.base_ring(), VarList, order=self.parent()._order) - else: - R = self._p.base_ring() - if (self._p.parent() is self._p.base_ring()) or not self._p.parent().gens(): - fself = self._p.base_ring() - else: - fself = self._p.parent().hom(self._p.parent().variable_names(), R) - if (x._p.parent() is x._p.base_ring()) or not x._p.parent().gens(): - fx = x._p.base_ring() - else: - fx = x._p.parent().hom(x._p.parent().variable_names(), R) - return richcmp(fself(self._p), fx(x._p), op) - - @cached_method - def lm(self): - """ - The leading monomial of ``self``. - - EXAMPLES:: - - sage: X. = InfinitePolynomialRing(QQ) - sage: p = 2*x[10]*y[30]+x[10]*y[1]^3*x[1]^2 - sage: p.lm() - x_10*x_1^2*y_1^3 - - """ - if hasattr(self._p, 'lm'): - return InfinitePolynomial(self.parent(), self._p.lm()) - if self._p == 0: - return self - if hasattr(self._p, 'variable_name'): # if it is univariate - return InfinitePolynomial(self.parent(), - self._p.parent().gen() ** max(self._p.exponents())) - return self # if it is scalar - - @cached_method - def lc(self): - """ - The coefficient of the leading term of ``self``. - - EXAMPLES:: - - sage: X. = InfinitePolynomialRing(QQ) - sage: p = 2*x[10]*y[30]+3*x[10]*y[1]^3*x[1]^2 - sage: p.lc() - 3 - - """ - if hasattr(self._p, 'lc'): - return self._p.lc() - if hasattr(self._p, 'variable_name'): # univariate case - return self._p.leading_coefficient() - # scalar case - return self._p - - @cached_method - def lt(self): - """ - The leading term (= product of coefficient and monomial) of ``self``. + @cached_method + def lt(self): + """ + The leading term (= product of coefficient and monomial) of ``self``. EXAMPLES:: @@ -1377,8 +1049,341 @@ def __iter__(self): self.__class__(self.parent(), monomial)) for coefficient, monomial in self._p) + def gcd(self, x): + """ + computes the greatest common divisor + + EXAMPLES:: + + sage: R.=InfinitePolynomialRing(QQ) + sage: p1=x[0]+x[1]**2 + sage: gcd(p1,p1+3) + 1 + sage: gcd(p1,p1)==p1 + True + """ + P = self.parent() + self._p = P._P(self._p) + x._p = P._P(x._p) + return self.__class__.__base__(self.parent(), self._p.gcd(x._p)) + + +class InfinitePolynomial_sparse(InfinitePolynomial): + """ + Element of a sparse Polynomial Ring with a Countably Infinite Number of Variables. + + INPUT: + + - ``A`` -- an Infinite Polynomial Ring in sparse implementation + - ``p`` -- a *classical* polynomial that can be interpreted in ``A``. + + Of course, one should not directly invoke this class, but rather + construct elements of ``A`` in the usual way. + + EXAMPLES:: + + sage: A. = QQ[] + sage: B. = InfinitePolynomialRing(A,implementation='sparse') + sage: p = a*b[100] + 1/2*c[4] + sage: p + a*b_100 + 1/2*c_4 + sage: p.parent() + Infinite polynomial ring in b, c over Univariate Polynomial Ring in a over Rational Field + sage: p.polynomial().parent() + Multivariate Polynomial Ring in b_100, b_0, c_4, c_0 over Univariate Polynomial Ring in a over Rational Field -class InfinitePolynomial_dense(InfinitePolynomial_sparse): + """ + + def __call__(self, *args, **kwargs): + """ + EXAMPLES:: + + sage: X. = InfinitePolynomialRing(QQ,implementation='sparse') + sage: a = x[0] + x[1] + sage: a(x_0=2,x_1=x[1]) + x_1 + 2 + sage: _.parent() + Infinite polynomial ring in x over Rational Field + sage: a(x_1=3) + x_0 + 3 + sage: _.parent() + Infinite polynomial ring in x over Rational Field + sage: a(x_1=x[100]) + x_100 + x_0 + + """ + # Replace any InfinitePolynomials by their underlying polynomials + if hasattr(self._p, 'variables'): + V = [str(x) for x in self._p.variables()] + else: + V = [] + for kw in kwargs: + value = kwargs[kw] + if isinstance(value, InfinitePolynomial_sparse): + kwargs[kw] = value._p + V.append(kw) + if hasattr(value._p, 'variables'): + V.extend([str(x) for x in value._p.variables()]) + args = list(args) + for i, arg in enumerate(args): + if isinstance(arg, InfinitePolynomial_sparse): + args[i] = arg._p + if hasattr(arg._p, 'variables'): + V.extend([str(x) for x in arg._p.variables()]) + V = list(set(V)) + V.sort(key=self.parent().varname_key, reverse=True) + if V: + from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing + R = PolynomialRing(self._p.base_ring(), V, order=self.parent()._order) + else: + return self + res = R(self._p)(*args, **kwargs) + try: + from sage.misc.sage_eval import sage_eval + return sage_eval(repr(res), self.parent().gens_dict()) + except Exception: + return res + + # Basic arithmetics + def _add_(self, x): + """ + EXAMPLES:: + + sage: X. = InfinitePolynomialRing(QQ) + sage: x[1] + x[2] # indirect doctest + x_2 + x_1 + + Check adding from a different parent:: + + sage: Y. = PolynomialRing(QQ) + sage: x[0] - x_0 + 0 + """ + # One may need a new parent for self._p and x._p + try: + return InfinitePolynomial_sparse(self.parent(), self._p + x._p) + except Exception: + pass + # We can now assume that self._p and x._p actually are polynomials, + # hence, their parent is not simply the underlying ring. + VarList = list(set(self._p.parent().variable_names()).union(set(x._p.parent().variable_names()))) + VarList.sort(key=self.parent().varname_key, reverse=True) + if VarList: + from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing + R = PolynomialRing(self._p.base_ring(), VarList, order=self.parent()._order) + else: + R = self._p.base_ring() + return InfinitePolynomial_sparse(self.parent(), R(self._p) + R(x._p)) + + def _mul_(self, x): + """ + EXAMPLES:: + + sage: X. = InfinitePolynomialRing(ZZ) + sage: x[2]*x[1] # indirect doctest + x_2*x_1 + + """ + try: + return InfinitePolynomial_sparse(self.parent(), self._p * x._p) + except Exception: + pass + # We can now assume that self._p and x._p actually are polynomials, + # hence, their parent is not just the underlying ring. + VarList = list(set(self._p.parent().variable_names()).union(set(x._p.parent().variable_names()))) + VarList.sort(key=self.parent().varname_key, reverse=True) + if VarList: + from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing + R = PolynomialRing(self._p.base_ring(), VarList, order=self.parent()._order) + else: + R = self._p.base_ring() + return InfinitePolynomial_sparse(self.parent(), R(self._p) * R(x._p)) + + def _rmul_(self, left): + """ + TESTS:: + + sage: R. = InfinitePolynomialRing(QQ, implementation='sparse') + sage: R.from_base_ring(4) # indirect doctest + 4 + + """ + return InfinitePolynomial_sparse(self.parent(), left * self._p) + + def _lmul_(self, right): + """ + TESTS:: + + sage: R. = InfinitePolynomialRing(QQ, implementation='sparse') + sage: alpha[3]*4 # indirect doctest + 4*alpha_3 + + """ + return InfinitePolynomial_sparse(self.parent(), self._p * right) + + def _sub_(self, x): + """ + EXAMPLES:: + + sage: X. = InfinitePolynomialRing(QQ) + sage: x[2] - x[1] # indirect doctest + x_2 - x_1 + + """ + try: + return InfinitePolynomial_sparse(self.parent(), self._p - x._p) + except Exception: + pass + # We can now assume that self._p and x._p actually are polynomials, + # hence, their parent is not just the underlying ring. + VarList = list(set(self._p.parent().variable_names()).union(x._p.parent().variable_names())) + VarList.sort(key=self.parent().varname_key, reverse=True) + if VarList: + from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing + R = PolynomialRing(self._p.base_ring(), VarList, order=self.parent()._order) + else: + R = self._p.base_ring() + return InfinitePolynomial_sparse(self.parent(), R(self._p) - R(x._p)) + + def __pow__(self, n): + """ + Exponentiation by an integer, or action by a callable object + + NOTE: + + The callable object must accept non-negative integers as input + and return non-negative integers. Typical use case is a + permutation, that will result in the corresponding permutation + of variables. + + EXAMPLES:: + + sage: X. = InfinitePolynomialRing(QQ,implementation='sparse') + sage: p = x[10]*y[2]+2*x[1]*y[3] + sage: P = Permutation(((1,2),(3,4,5))) + sage: p^P # indirect doctest + x_10*y_1 + 2*x_2*y_4 + + """ + P = self.parent() + if callable(n): + if (self._p.parent() == self._p.base_ring()): + return self + if not (hasattr(self._p, 'variables') and self._p.variables()): + return self + if hasattr(n, 'to_cycles') and hasattr(n, '__len__'): # duck typing Permutation + # auxiliary function, necessary since n(m) raises an error if m>len(n) + l = len(n) + + def p(m): + return n(m) if 0 < m <= l else m + else: # Permutation group element + p = n + + def q(s): return s[0]+'_'+str(p(ZZ(s[1]))) + newVars = [q(X.split('_')) for X in self._p.parent().variable_names()] + if not newVars: + return self + copyVars = copy.copy(newVars) + newVars = list(set(list(self._p.parent().variable_names())+newVars)) + newVars.sort(key=self.parent().varname_key, reverse=True) + if newVars == list(self._p.parent().variable_names()): + newR = self._p.parent() + else: + from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing + newR = PolynomialRing(self._p.base_ring(), newVars, order=P._order) + mapR = self._p.parent().hom(copyVars, newR) + return InfinitePolynomial_sparse(self.parent(), mapR(self._p)) + return InfinitePolynomial_sparse(self.parent(), self._p**n) + + # Basic tools for Buchberger algorithm: + # order, leading term/monomial, symmetric cancellation order + + def _richcmp_(self, x, op): + r""" + Comparison of Infinite Polynomials. + + NOTE: + + Let x and y be generators of the parent of self. We only consider + monomial orderings in which x[m] > y[n] iff x appears earlier in the + list of generators than y, or x==y and m>n + + Under this restriction, the monomial ordering can be 'lex' (default), + 'degrevlex' or 'deglex'. + + EXAMPLES:: + + sage: X. = InfinitePolynomialRing(QQ, implementation='sparse') + sage: a = x[10]^3 + sage: b = x[1] + x[2] + sage: c = x[1] + x[2] + sage: d = y[1] + x[2] + sage: a == a # indirect doctest + True + sage: b == c # indirect doctest + True + sage: a == b # indirect doctest + False + sage: c > d # indirect doctest + True + + TESTS: + + A classical and an infinite sparse polynomial ring. Note that + the Sage coercion system allows comparison only if a common + parent for the two rings can be constructed. This is why we + have to have the order 'degrevlex':: + + sage: X. = InfinitePolynomialRing(ZZ,order='degrevlex', implementation='sparse') + sage: Y. = QQ[] + sage: x[3] == x_3 # indirect doctest + True + + Two infinite polynomial rings in different implementation and + order:: + + sage: Y = InfinitePolynomialRing(QQ,['x','y'],order='deglex',implementation='dense') + sage: x[2] == Y(x[2]) # indirect doctest + True + + An example in which a previous version had failed:: + + sage: X. = InfinitePolynomialRing(GF(3), order='degrevlex', implementation='sparse') + sage: p = Y('x_3*x_0^2 + x_0*y_3*y_0') + sage: q = Y('x_1*x_0^2 + x_0*y_1*y_0') + sage: p < q # indirect doctest + False + + """ + # We can assume that self.parent() is x.parent(), + # but of course the underlying polynomial rings + # may be widely different, and the sage coercion + # system can't guess what order we want. + from sage.structure.element import parent + R1 = parent(self._p) + R2 = parent(x._p) + if (hasattr(R1, 'has_coerce_map_from') and R1.has_coerce_map_from(R2)) or (hasattr(R2, 'has_coerce_map_from') and R2.has_coerce_map_from(R1)): + return richcmp(self._p, x._p, op) + VarList = list(set(self._p.parent().variable_names()).union(x._p.parent().variable_names())) + VarList.sort(key=self.parent().varname_key, reverse=True) + if VarList: + from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing + R = PolynomialRing(self._p.base_ring(), VarList, order=self.parent()._order) + else: + R = self._p.base_ring() + if (self._p.parent() is self._p.base_ring()) or not self._p.parent().gens(): + fself = self._p.base_ring() + else: + fself = self._p.parent().hom(self._p.parent().variable_names(), R) + if (x._p.parent() is x._p.base_ring()) or not x._p.parent().gens(): + fx = x._p.base_ring() + else: + fx = x._p.parent().hom(x._p.parent().variable_names(), R) + return richcmp(fself(self._p), fx(x._p), op) + + +class InfinitePolynomial_dense(InfinitePolynomial): """ Element of a dense Polynomial Ring with a Countably Infinite Number of Variables. @@ -1394,8 +1399,6 @@ class InfinitePolynomial_dense(InfinitePolynomial_sparse): :class:`~sage.rings.polynomial.infinite_polynomial_element.InfinitePolynomial_sparse`. See there for a description of the methods. """ - # Construction and other basic methods -## def __init__(self, A, p): # is inherited from the dense implementation def __call__(self, *args, **kwargs): """ diff --git a/src/sage/structure/element.pyx b/src/sage/structure/element.pyx index bad783a11b4..6c4bff702e4 100644 --- a/src/sage/structure/element.pyx +++ b/src/sage/structure/element.pyx @@ -4376,7 +4376,21 @@ cdef class MPolynomial(CommutativePolynomial): cdef class InfinitePolynomial(CommutativePolynomial): r""" - Abstract base class for :class:`~sage.rings.polynomial.infinite_polynomial_element.InfinitePolynomial_sparse` + Abstract base class for :class:`~sage.rings.polynomial.infinite_polynomial_element.InfinitePolynomial` + + This class is defined for the purpose of :func:`isinstance` tests. It should not be + instantiated. + + EXAMPLES:: + + sage: X. = InfinitePolynomialRing(QQ) + sage: isinstance(x[0], sage.structure.element.InfinitePolynomial) + True + + By design, there is a unique direct subclass:: + + sage: len(sage.structure.element.InfinitePolynomial.__subclasses__()) <= 1 + True """ pass From fd54c82b627c8d2f2bdd2cf0f73583bc7bdf8156 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 17 Jan 2023 23:40:11 -0800 Subject: [PATCH 296/751] Remove ABCs sage.structure.element.*Polynomial; introduce ABCs in sage.rings.polynomial --- src/sage/combinat/kazhdan_lusztig.py | 2 +- src/sage/combinat/schubert_polynomial.py | 2 +- src/sage/combinat/sf/sfa.py | 4 +- src/sage/crypto/boolean_function.pyx | 2 +- src/sage/crypto/mq/rijndael_gf.py | 2 +- src/sage/crypto/sbox.pyx | 2 +- src/sage/crypto/stream.py | 2 +- src/sage/groups/affine_gps/group_element.py | 4 +- .../groups/perm_gps/permgroup_element.pyx | 4 +- src/sage/libs/symmetrica/symmetrica.pxi | 4 +- .../characteristic_cohomology_class.py | 2 +- src/sage/modular/modsym/ambient.py | 2 +- src/sage/quadratic_forms/binary_qf.py | 2 +- src/sage/quadratic_forms/constructions.py | 2 +- .../rings/finite_rings/element_ntl_gf2e.pyx | 2 +- .../rings/finite_rings/finite_field_base.pyx | 2 +- .../finite_rings/finite_field_constructor.py | 2 +- .../rings/finite_rings/finite_field_givaro.py | 2 +- .../finite_rings/finite_field_ntl_gf2e.py | 2 +- src/sage/rings/finite_rings/residue_field.pyx | 2 +- .../rings/function_field/function_field.py | 2 +- src/sage/rings/laurent_series_ring.py | 3 +- src/sage/rings/number_field/number_field.py | 2 +- src/sage/rings/padics/factory.py | 2 +- .../rings/padics/padic_template_element.pxi | 3 +- .../polynomial/commutative_polynomial.pxd | 5 + .../polynomial/commutative_polynomial.pyx | 10 ++ .../polynomial/infinite_polynomial_element.py | 6 +- .../rings/polynomial/multi_polynomial.pxd | 8 +- .../rings/polynomial/multi_polynomial.pyx | 25 ++++- .../multi_polynomial_libsingular.pxd | 4 +- .../multi_polynomial_libsingular.pyx | 2 +- .../rings/polynomial/polynomial_element.pxd | 4 +- .../rings/polynomial/polynomial_element.pyx | 2 +- src/sage/rings/qqbar.py | 2 +- .../schemes/berkovich/berkovich_cp_element.py | 4 +- src/sage/schemes/curves/constructor.py | 2 +- src/sage/schemes/cyclic_covers/constructor.py | 2 +- .../schemes/elliptic_curves/constructor.py | 2 +- .../elliptic_curves/ell_curve_isogeny.py | 2 +- src/sage/schemes/elliptic_curves/jacobian.py | 2 +- src/sage/schemes/generic/hypersurface.py | 2 +- .../hyperelliptic_curves/constructor.py | 2 +- .../hyperelliptic_curves/jacobian_homset.py | 2 +- .../hyperelliptic_curves/monsky_washnitzer.py | 2 +- src/sage/schemes/plane_conics/constructor.py | 2 +- .../plane_quartics/quartic_constructor.py | 2 +- src/sage/structure/element.pxd | 9 -- src/sage/structure/element.pyx | 91 ------------------- 49 files changed, 100 insertions(+), 154 deletions(-) create mode 100644 src/sage/rings/polynomial/commutative_polynomial.pxd create mode 100644 src/sage/rings/polynomial/commutative_polynomial.pyx diff --git a/src/sage/combinat/kazhdan_lusztig.py b/src/sage/combinat/kazhdan_lusztig.py index 75995aa34e4..c630e185c43 100644 --- a/src/sage/combinat/kazhdan_lusztig.py +++ b/src/sage/combinat/kazhdan_lusztig.py @@ -20,7 +20,7 @@ #***************************************************************************** -from sage.structure.element import Polynomial +from sage.rings.polynomial.polynomial_element import Polynomial from sage.misc.cachefunc import cached_method from sage.rings.polynomial.laurent_polynomial import LaurentPolynomial from sage.structure.sage_object import SageObject diff --git a/src/sage/combinat/schubert_polynomial.py b/src/sage/combinat/schubert_polynomial.py index 070e1b1e5bf..fdc81d19abc 100644 --- a/src/sage/combinat/schubert_polynomial.py +++ b/src/sage/combinat/schubert_polynomial.py @@ -78,7 +78,7 @@ from sage.rings.integer import Integer from sage.rings.integer_ring import ZZ from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing -from sage.structure.element import MPolynomial +from sage.rings.polynomial.multi_polynomial import MPolynomial from sage.combinat.permutation import Permutations, Permutation import sage.libs.symmetrica.all as symmetrica from sage.misc.cachefunc import cached_method diff --git a/src/sage/combinat/sf/sfa.py b/src/sage/combinat/sf/sfa.py index cefc2d7f473..91091a48c1f 100644 --- a/src/sage/combinat/sf/sfa.py +++ b/src/sage/combinat/sf/sfa.py @@ -217,8 +217,8 @@ from sage.rings.integer import Integer from sage.rings.infinity import infinity from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing -from sage.structure.element import Polynomial -from sage.structure.element import MPolynomial +from sage.rings.polynomial.polynomial_element import Polynomial +from sage.rings.polynomial.multi_polynomial import MPolynomial from sage.combinat.partition import _Partitions, Partitions, Partitions_n, Partition from sage.categories.hopf_algebras import HopfAlgebras from sage.categories.hopf_algebras_with_basis import HopfAlgebrasWithBasis diff --git a/src/sage/crypto/boolean_function.pyx b/src/sage/crypto/boolean_function.pyx index 1358ae1b958..cb251a4f03f 100644 --- a/src/sage/crypto/boolean_function.pyx +++ b/src/sage/crypto/boolean_function.pyx @@ -40,7 +40,7 @@ from sage.rings.finite_rings.finite_field_constructor import GF from sage.rings.polynomial.pbori.pbori import BooleanPolynomial from sage.rings.finite_rings.finite_field_constructor import is_FiniteField from sage.rings.finite_rings.finite_field_givaro import FiniteField_givaro -from sage.structure.element import Polynomial +from sage.rings.polynomial.polynomial_element import Polynomial from sage.misc.superseded import deprecated_function_alias diff --git a/src/sage/crypto/mq/rijndael_gf.py b/src/sage/crypto/mq/rijndael_gf.py index 30160378077..fc3473d1b06 100644 --- a/src/sage/crypto/mq/rijndael_gf.py +++ b/src/sage/crypto/mq/rijndael_gf.py @@ -1549,7 +1549,7 @@ def compose(self, f, g, algorithm='encrypt', f_attr=None, g_attr=None): if not isinstance(f, RijndaelGF.Round_Component_Poly_Constr): msg = "keyword 'f' must be a Round_Component_Poly_Constr" raise TypeError(msg) - from sage.structure.element import MPolynomial + from sage.rings.polynomial.multi_polynomial import MPolynomial if not isinstance(g, RijndaelGF.Round_Component_Poly_Constr) and \ not isinstance(g, MPolynomial): msg = ("keyword 'g' must be a Round_Component_Poly_Constr or a " diff --git a/src/sage/crypto/sbox.pyx b/src/sage/crypto/sbox.pyx index 47d2f6c5e69..5c63e79bbac 100644 --- a/src/sage/crypto/sbox.pyx +++ b/src/sage/crypto/sbox.pyx @@ -173,7 +173,7 @@ cdef class SBox(SageObject): sage: S.output_size() 3 """ - from sage.structure.element import Polynomial + from sage.rings.polynomial.polynomial_element import Polynomial if "S" in kwargs: args = kwargs["S"] diff --git a/src/sage/crypto/stream.py b/src/sage/crypto/stream.py index ab7c86b16a3..90e4a6f5133 100644 --- a/src/sage/crypto/stream.py +++ b/src/sage/crypto/stream.py @@ -20,7 +20,7 @@ from sage.arith.all import gcd, power_mod from sage.rings.finite_rings.finite_field_constructor import FiniteField from sage.rings.finite_rings.integer_mod_ring import IntegerModFactory -from sage.structure.element import Polynomial +from sage.rings.polynomial.polynomial_element import Polynomial IntegerModRing = IntegerModFactory("IntegerModRing") diff --git a/src/sage/groups/affine_gps/group_element.py b/src/sage/groups/affine_gps/group_element.py index 3ad22c1d96b..127c1d33cb5 100644 --- a/src/sage/groups/affine_gps/group_element.py +++ b/src/sage/groups/affine_gps/group_element.py @@ -414,12 +414,12 @@ def __call__(self, v): if v in parent.vector_space(): return self._A*v + self._b - from sage.structure.element import Polynomial + from sage.rings.polynomial.polynomial_element import Polynomial if isinstance(v, Polynomial) and parent.degree() == 1: ring = v.parent() return ring([self._A[0,0], self._b[0]]) - from sage.structure.element import MPolynomial + from sage.rings.polynomial.multi_polynomial import MPolynomial if isinstance(v, MPolynomial) and parent.degree() == v.parent().ngens(): ring = v.parent() from sage.modules.free_module_element import vector diff --git a/src/sage/groups/perm_gps/permgroup_element.pyx b/src/sage/groups/perm_gps/permgroup_element.pyx index b06873b7f3d..84907ab0c61 100644 --- a/src/sage/groups/perm_gps/permgroup_element.pyx +++ b/src/sage/groups/perm_gps/permgroup_element.pyx @@ -114,8 +114,8 @@ from cypari2.gen cimport Gen from sage.ext.stdsage cimport HAS_DICTIONARY from sage.rings.all import ZZ, Integer -from sage.structure.element import Polynomial -from sage.structure.element import MPolynomial +from sage.rings.polynomial.polynomial_element import Polynomial +from sage.rings.polynomial.multi_polynomial import MPolynomial from sage.structure.element import is_Matrix from sage.matrix.all import MatrixSpace from sage.sets.finite_enumerated_set import FiniteEnumeratedSet diff --git a/src/sage/libs/symmetrica/symmetrica.pxi b/src/sage/libs/symmetrica/symmetrica.pxi index 06330bffbd4..95f9e52fbda 100644 --- a/src/sage/libs/symmetrica/symmetrica.pxi +++ b/src/sage/libs/symmetrica/symmetrica.pxi @@ -453,8 +453,8 @@ cdef void late_import(): import sage.rings.polynomial.multi_polynomial_ring MPolynomialRing_base = sage.rings.polynomial.multi_polynomial_ring.MPolynomialRing_base - import sage.rings.polynomial.multi_polynomial_element - MPolynomial = sage.structure.element.MPolynomial + import sage.rings.polynomial.multi_polynomial + MPolynomial = sage.rings.polynomial.multi_polynomial.MPolynomial import sage.combinat.schubert_polynomial SchubertPolynomialRing = sage.combinat.schubert_polynomial.SchubertPolynomialRing diff --git a/src/sage/manifolds/differentiable/characteristic_cohomology_class.py b/src/sage/manifolds/differentiable/characteristic_cohomology_class.py index 144edfcd8f3..1af1c0c6d74 100644 --- a/src/sage/manifolds/differentiable/characteristic_cohomology_class.py +++ b/src/sage/manifolds/differentiable/characteristic_cohomology_class.py @@ -290,7 +290,7 @@ from .bundle_connection import BundleConnection from .levi_civita_connection import LeviCivitaConnection from sage.symbolic.expression import Expression -from sage.structure.element import Polynomial +from sage.rings.polynomial.polynomial_element import Polynomial from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing diff --git a/src/sage/modular/modsym/ambient.py b/src/sage/modular/modsym/ambient.py index 53393317183..e7ca7c669e2 100644 --- a/src/sage/modular/modsym/ambient.py +++ b/src/sage/modular/modsym/ambient.py @@ -95,7 +95,7 @@ class ``ModularSymbolsAmbient``, derived from from sage.modules.free_module_element import FreeModuleElement from sage.rings.integer import Integer from sage.rings.integer_ring import ZZ -from sage.structure.element import MPolynomial +from sage.rings.polynomial.multi_polynomial import MPolynomial from sage.rings.rational_field import QQ from sage.rings.ring import Ring from sage.structure.factorization import Factorization diff --git a/src/sage/quadratic_forms/binary_qf.py b/src/sage/quadratic_forms/binary_qf.py index 727077a7197..cf0ac737f14 100755 --- a/src/sage/quadratic_forms/binary_qf.py +++ b/src/sage/quadratic_forms/binary_qf.py @@ -130,7 +130,7 @@ def __init__(self, a, b=None, c=None): sage: BinaryQF(0) 0 """ - from sage.structure.element import MPolynomial + from sage.rings.polynomial.multi_polynomial import MPolynomial if b is None and c is None: if (isinstance(a, (list, tuple)) and len(a) == 3): diff --git a/src/sage/quadratic_forms/constructions.py b/src/sage/quadratic_forms/constructions.py index 7d03d5e003d..43d3876f435 100644 --- a/src/sage/quadratic_forms/constructions.py +++ b/src/sage/quadratic_forms/constructions.py @@ -6,7 +6,7 @@ ## from sage.rings.integer_ring import ZZ -from sage.structure.element import Polynomial +from sage.rings.polynomial.polynomial_element import Polynomial from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.quadratic_forms.quadratic_form import QuadraticForm diff --git a/src/sage/rings/finite_rings/element_ntl_gf2e.pyx b/src/sage/rings/finite_rings/element_ntl_gf2e.pyx index 38b1aaf2ce7..16065f47966 100644 --- a/src/sage/rings/finite_rings/element_ntl_gf2e.pyx +++ b/src/sage/rings/finite_rings/element_ntl_gf2e.pyx @@ -1004,7 +1004,7 @@ cdef class FiniteField_ntl_gf2eElement(FinitePolyExtElement): sage: e.polynomial() a^15 + a^13 + a^11 + a^10 + a^9 + a^8 + a^7 + a^6 + a^4 + a + 1 - sage: from sage.structure.element import Polynomial + sage: from sage.rings.polynomial.polynomial_element import Polynomial sage: isinstance(e.polynomial(), Polynomial) True diff --git a/src/sage/rings/finite_rings/finite_field_base.pyx b/src/sage/rings/finite_rings/finite_field_base.pyx index 125fbf6770c..9927c9e534d 100644 --- a/src/sage/rings/finite_rings/finite_field_base.pyx +++ b/src/sage/rings/finite_rings/finite_field_base.pyx @@ -1521,7 +1521,7 @@ cdef class FiniteField(Field): True """ from .finite_field_constructor import GF - from sage.structure.element import Polynomial + from sage.rings.polynomial.polynomial_element import Polynomial from sage.rings.integer import Integer if name is None and names is not None: name = names diff --git a/src/sage/rings/finite_rings/finite_field_constructor.py b/src/sage/rings/finite_rings/finite_field_constructor.py index 2f6a75b5abb..8b51fd37b2e 100644 --- a/src/sage/rings/finite_rings/finite_field_constructor.py +++ b/src/sage/rings/finite_rings/finite_field_constructor.py @@ -173,7 +173,7 @@ from collections import defaultdict from sage.structure.category_object import normalize_names -from sage.structure.element import Polynomial +from sage.rings.polynomial.polynomial_element import Polynomial from sage.rings.integer import Integer # the import below is just a redirection diff --git a/src/sage/rings/finite_rings/finite_field_givaro.py b/src/sage/rings/finite_rings/finite_field_givaro.py index acf64553f50..087db824de6 100644 --- a/src/sage/rings/finite_rings/finite_field_givaro.py +++ b/src/sage/rings/finite_rings/finite_field_givaro.py @@ -137,7 +137,7 @@ def __init__(self, q, name="a", modulus=None, repr="poly", cache=False): from .finite_field_constructor import GF FiniteField.__init__(self, GF(p), name, normalize=False) - from sage.structure.element import Polynomial + from sage.rings.polynomial.polynomial_element import Polynomial if not isinstance(modulus, Polynomial): raise TypeError("modulus must be a polynomial") diff --git a/src/sage/rings/finite_rings/finite_field_ntl_gf2e.py b/src/sage/rings/finite_rings/finite_field_ntl_gf2e.py index 1227d71ce67..e750f2fef5e 100644 --- a/src/sage/rings/finite_rings/finite_field_ntl_gf2e.py +++ b/src/sage/rings/finite_rings/finite_field_ntl_gf2e.py @@ -138,7 +138,7 @@ def __init__(self, q, names="a", modulus=None, repr="poly"): raise ValueError("q must be a 2-power") FiniteField.__init__(self, GF2, names, normalize=True) - from sage.structure.element import Polynomial + from sage.rings.polynomial.polynomial_element import Polynomial if not isinstance(modulus, Polynomial): raise TypeError("modulus must be a polynomial") diff --git a/src/sage/rings/finite_rings/residue_field.pyx b/src/sage/rings/finite_rings/residue_field.pyx index 83db0a58dca..225fafef0d3 100644 --- a/src/sage/rings/finite_rings/residue_field.pyx +++ b/src/sage/rings/finite_rings/residue_field.pyx @@ -170,7 +170,7 @@ from sage.rings.fraction_field import is_FractionField from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.polynomial.polynomial_ring import is_PolynomialRing -from sage.structure.element import Polynomial +from sage.rings.polynomial.polynomial_element import Polynomial from sage.structure.factory import UniqueFactory from sage.structure.element cimport parent diff --git a/src/sage/rings/function_field/function_field.py b/src/sage/rings/function_field/function_field.py index e2f5aea7b83..06eb19905d8 100644 --- a/src/sage/rings/function_field/function_field.py +++ b/src/sage/rings/function_field/function_field.py @@ -1307,7 +1307,7 @@ def __init__(self, polynomial, names, category=None): TypeError: unable to evaluate 'x' in Fraction Field of Univariate Polynomial Ring in t over Rational Field """ - from sage.structure.element import Polynomial + from sage.rings.polynomial.polynomial_element import Polynomial if polynomial.parent().ngens()>1 or not isinstance(polynomial, Polynomial): raise TypeError("polynomial must be univariate a polynomial") if names is None: diff --git a/src/sage/rings/laurent_series_ring.py b/src/sage/rings/laurent_series_ring.py index 37b0455928d..be921f22154 100644 --- a/src/sage/rings/laurent_series_ring.py +++ b/src/sage/rings/laurent_series_ring.py @@ -466,7 +466,8 @@ def _element_constructor_(self, x, n=0, prec=infinity): x^-3 """ from sage.rings.fraction_field_element import is_FractionFieldElement - from sage.structure.element import Polynomial, MPolynomial + from sage.rings.polynomial.polynomial_element import Polynomial + from sage.rings.polynomial.multi_polynomial import MPolynomial from sage.structure.element import parent from sage.libs.pari.all import pari_gen diff --git a/src/sage/rings/number_field/number_field.py b/src/sage/rings/number_field/number_field.py index 31572ab1c2e..1d3584ba3d1 100644 --- a/src/sage/rings/number_field/number_field.py +++ b/src/sage/rings/number_field/number_field.py @@ -114,7 +114,7 @@ import sage.interfaces.gap import sage.rings.complex_mpfr -from sage.structure.element import Polynomial +from sage.rings.polynomial.polynomial_element import Polynomial import sage.rings.real_mpfr import sage.rings.real_mpfi import sage.rings.complex_double diff --git a/src/sage/rings/padics/factory.py b/src/sage/rings/padics/factory.py index 72ee42a0e5b..feb778b6a74 100644 --- a/src/sage/rings/padics/factory.py +++ b/src/sage/rings/padics/factory.py @@ -35,7 +35,7 @@ from sage.rings.infinity import Infinity from sage.structure.factorization import Factorization from sage.rings.integer_ring import ZZ -from sage.structure.element import Polynomial +from sage.rings.polynomial.polynomial_element import Polynomial from sage.structure.element import is_Element from .padic_base_leaves import (pAdicRingCappedRelative, pAdicRingCappedAbsolute, diff --git a/src/sage/rings/padics/padic_template_element.pxi b/src/sage/rings/padics/padic_template_element.pxi index f3aa97e879b..44b3e5ebf9e 100644 --- a/src/sage/rings/padics/padic_template_element.pxi +++ b/src/sage/rings/padics/padic_template_element.pxi @@ -36,7 +36,8 @@ from sage.rings.infinity import infinity from sage.rings.rational import Rational from sage.rings.padics.precision_error import PrecisionError from sage.rings.padics.misc import trim_zeros -from sage.structure.element import canonical_coercion, Polynomial +from sage.rings.polynomial.polynomial_element import Polynomial +from sage.structure.element import canonical_coercion import itertools cdef long maxordp = (1L << (sizeof(long) * 8 - 2)) - 1 diff --git a/src/sage/rings/polynomial/commutative_polynomial.pxd b/src/sage/rings/polynomial/commutative_polynomial.pxd new file mode 100644 index 00000000000..c4a8956daa5 --- /dev/null +++ b/src/sage/rings/polynomial/commutative_polynomial.pxd @@ -0,0 +1,5 @@ +from sage.structure.element cimport CommutativeAlgebraElement + + +cdef class CommutativePolynomial(CommutativeAlgebraElement): + pass diff --git a/src/sage/rings/polynomial/commutative_polynomial.pyx b/src/sage/rings/polynomial/commutative_polynomial.pyx new file mode 100644 index 00000000000..9784f1586c9 --- /dev/null +++ b/src/sage/rings/polynomial/commutative_polynomial.pyx @@ -0,0 +1,10 @@ +cdef class CommutativePolynomial(CommutativeAlgebraElement): + r""" + Abstract base class for commutative polynomials in any number of variables + + It is a common base for :class:`~sage.rings.polynomial.polynomial_element.Polynomial`, + :class:`~sage.rings.polynomial.multi_polynomial.MPolynomial`, and + :class:`~sage.rings.polynomial.infinite_polynomial_element.InfinitePolynomial`. + """ + + pass diff --git a/src/sage/rings/polynomial/infinite_polynomial_element.py b/src/sage/rings/polynomial/infinite_polynomial_element.py index dd87d6e9c05..aa0d9da9884 100644 --- a/src/sage/rings/polynomial/infinite_polynomial_element.py +++ b/src/sage/rings/polynomial/infinite_polynomial_element.py @@ -94,11 +94,13 @@ from sage.structure.richcmp import richcmp from sage.misc.cachefunc import cached_method from sage.misc.inherit_comparison import InheritComparisonClasscallMetaclass -from sage.structure.element import RingElement, MPolynomial, InfinitePolynomial as InfinitePolynomial_base +from sage.structure.element import RingElement +from .commutative_polynomial import CommutativePolynomial +from .multi_polynomial import MPolynomial import copy -class InfinitePolynomial(InfinitePolynomial_base, metaclass=InheritComparisonClasscallMetaclass): +class InfinitePolynomial(CommutativePolynomial, metaclass=InheritComparisonClasscallMetaclass): """ Create an element of a Polynomial Ring with a Countably Infinite Number of Variables. diff --git a/src/sage/rings/polynomial/multi_polynomial.pxd b/src/sage/rings/polynomial/multi_polynomial.pxd index fd947a33bb2..5dc75e6bd3f 100644 --- a/src/sage/rings/polynomial/multi_polynomial.pxd +++ b/src/sage/rings/polynomial/multi_polynomial.pxd @@ -1,7 +1,11 @@ -from sage.structure.element cimport MPolynomial as MPolynomial_base +from .commutative_polynomial cimport CommutativePolynomial -cdef class MPolynomial(MPolynomial_base): + +cdef class MPolynomial(CommutativePolynomial): cdef long _hash_c(self) except -1 cpdef _mod_(self, right) cpdef dict _mpoly_dict_recursive(self, tuple vars=*, base_ring=*) + +cdef class MPolynomial_libsingular(MPolynomial): + pass diff --git a/src/sage/rings/polynomial/multi_polynomial.pyx b/src/sage/rings/polynomial/multi_polynomial.pyx index f798a67aa41..65af5f4a1d6 100644 --- a/src/sage/rings/polynomial/multi_polynomial.pyx +++ b/src/sage/rings/polynomial/multi_polynomial.pyx @@ -33,7 +33,7 @@ from sage.rings.real_mpfr import RealField_class,RealField from sage.rings.polynomial.polydict cimport ETuple from sage.rings.polynomial.polynomial_element cimport Polynomial -cdef class MPolynomial(MPolynomial_base): +cdef class MPolynomial(CommutativePolynomial): #################### # Some standard conversions @@ -2623,3 +2623,26 @@ cdef remove_from_tuple(e, int ind): return w[0] else: return tuple(w) + + +cdef class MPolynomial_libsingular(MPolynomial): + r""" + Abstract base class for :class:`~sage.rings.polynomial.multi_polynomial_libsingular.MPolynomial_libsingular` + + This class is defined for the purpose of :func:`isinstance` tests. It should not be + instantiated. + + EXAMPLES:: + + sage: R1. = QQ[] + sage: isinstance(x, sage.rings.polynomial.multi_polynomial.MPolynomial_libsingular) + False + sage: R2. = QQ[] + sage: isinstance(y, sage.rings.polynomial.multi_polynomial.MPolynomial_libsingular) + True + + By design, there is a unique direct subclass:: + + sage: len(sage.rings.polynomial.multi_polynomial.MPolynomial_libsingular.__subclasses__()) <= 1 + True + """ diff --git a/src/sage/rings/polynomial/multi_polynomial_libsingular.pxd b/src/sage/rings/polynomial/multi_polynomial_libsingular.pxd index f0518c93f9c..c9cec10e2bc 100644 --- a/src/sage/rings/polynomial/multi_polynomial_libsingular.pxd +++ b/src/sage/rings/polynomial/multi_polynomial_libsingular.pxd @@ -1,11 +1,11 @@ from sage.libs.singular.decl cimport poly, ring -from sage.rings.polynomial.multi_polynomial cimport MPolynomial +from sage.rings.polynomial.multi_polynomial cimport MPolynomial_libsingular as MPolynomial_libsingular_base from sage.rings.polynomial.multi_polynomial_ring_base cimport MPolynomialRing_base cdef class MPolynomialRing_libsingular -cdef class MPolynomial_libsingular(MPolynomial): +cdef class MPolynomial_libsingular(MPolynomial_libsingular_base): cdef poly *_poly cdef ring *_parent_ring cpdef _add_(self, other) diff --git a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx index 6249cac4199..ca02ffbd791 100644 --- a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx +++ b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx @@ -1896,7 +1896,7 @@ def unpickle_MPolynomialRing_libsingular(base_ring, names, term_order): return _multi_variate(base_ring, tuple(names), None, term_order, None) -cdef class MPolynomial_libsingular(MPolynomial): +cdef class MPolynomial_libsingular(MPolynomial_libsingular_base): """ A multivariate polynomial implemented using libSINGULAR. """ diff --git a/src/sage/rings/polynomial/polynomial_element.pxd b/src/sage/rings/polynomial/polynomial_element.pxd index cafc17eab3f..083f506b222 100644 --- a/src/sage/rings/polynomial/polynomial_element.pxd +++ b/src/sage/rings/polynomial/polynomial_element.pxd @@ -1,12 +1,12 @@ from sage.structure.element import Element from sage.structure.element cimport Element, CommutativeAlgebraElement, ModuleElement -from sage.structure.element cimport Polynomial as Polynomial_base from sage.structure.parent cimport Parent from sage.rings.integer cimport Integer +from .commutative_polynomial cimport CommutativePolynomial from .polynomial_compiled cimport CompiledPolynomialFunction -cdef class Polynomial(Polynomial_base): +cdef class Polynomial(CommutativePolynomial): cdef Polynomial _new_generic(self, list coeffs) cdef char _is_gen cdef CompiledPolynomialFunction _compiled diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index 5cff2e446a4..cba9c0ee009 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -189,7 +189,7 @@ from .polynomial_compiled cimport CompiledPolynomialFunction from sage.rings.polynomial.polydict cimport ETuple -cdef class Polynomial(Polynomial_base): +cdef class Polynomial(CommutativePolynomial): """ A polynomial. diff --git a/src/sage/rings/qqbar.py b/src/sage/rings/qqbar.py index 90b8645ab82..d9c72b0b05d 100644 --- a/src/sage/rings/qqbar.py +++ b/src/sage/rings/qqbar.py @@ -573,7 +573,7 @@ from sage.rings.complex_interval_field import ComplexIntervalField from sage.rings.complex_interval import is_ComplexIntervalFieldElement from sage.rings.polynomial.all import PolynomialRing -from sage.structure.element import Polynomial +from sage.rings.polynomial.polynomial_element import Polynomial from sage.rings.integer_ring import ZZ from sage.rings.rational_field import QQ from sage.rings.number_field.number_field import NumberField, GaussianField, CyclotomicField diff --git a/src/sage/schemes/berkovich/berkovich_cp_element.py b/src/sage/schemes/berkovich/berkovich_cp_element.py index d496d0543b6..7c922fefb90 100644 --- a/src/sage/schemes/berkovich/berkovich_cp_element.py +++ b/src/sage/schemes/berkovich/berkovich_cp_element.py @@ -83,7 +83,7 @@ def __init__(self, parent, center, radius=None, power=None, prec=20, space_type= Type I point centered at 4 + O(5^20) """ from sage.rings.function_field.element import is_FunctionFieldElement - from sage.structure.element import Polynomial + from sage.rings.polynomial.polynomial_element import Polynomial from sage.rings.fraction_field_element import FractionFieldElement_1poly_field self._type = None @@ -109,7 +109,7 @@ def __init__(self, parent, center, radius=None, power=None, prec=20, space_type= # is_FunctionFieldElement calls .parent elif hasattr(center, "parent") and hasattr(radius, 'parent'): - from sage.structure.element import MPolynomial + from sage.rings.polynomial.multi_polynomial import MPolynomial if isinstance(center, MPolynomial): try: center = center.univariate_polynomial() diff --git a/src/sage/schemes/curves/constructor.py b/src/sage/schemes/curves/constructor.py index a388e660fef..c3ff0fa9a42 100644 --- a/src/sage/schemes/curves/constructor.py +++ b/src/sage/schemes/curves/constructor.py @@ -36,7 +36,7 @@ from sage.categories.fields import Fields -from sage.structure.element import MPolynomial +from sage.rings.polynomial.multi_polynomial import MPolynomial from sage.rings.polynomial.multi_polynomial_ring import is_MPolynomialRing from sage.rings.finite_rings.finite_field_constructor import is_FiniteField diff --git a/src/sage/schemes/cyclic_covers/constructor.py b/src/sage/schemes/cyclic_covers/constructor.py index a67a17a2f17..32bdf239b99 100644 --- a/src/sage/schemes/cyclic_covers/constructor.py +++ b/src/sage/schemes/cyclic_covers/constructor.py @@ -8,7 +8,7 @@ # https://www.gnu.org/licenses/ # ***************************************************************************** -from sage.structure.element import Polynomial +from sage.rings.polynomial.polynomial_element import Polynomial from sage.rings.finite_rings.finite_field_constructor import is_FiniteField from sage.schemes.affine.affine_space import AffineSpace from .cycliccover_generic import CyclicCover_generic diff --git a/src/sage/schemes/elliptic_curves/constructor.py b/src/sage/schemes/elliptic_curves/constructor.py index ff59b42bfe9..d924bd8f45c 100644 --- a/src/sage/schemes/elliptic_curves/constructor.py +++ b/src/sage/schemes/elliptic_curves/constructor.py @@ -29,7 +29,7 @@ from sage.rings.polynomial.multi_polynomial_ring import is_MPolynomialRing from sage.rings.finite_rings.finite_field_constructor import is_FiniteField from sage.rings.number_field.number_field import is_NumberField -from sage.structure.element import MPolynomial +from sage.rings.polynomial.multi_polynomial import MPolynomial from sage.rings.ring import is_Ring from sage.categories.fields import Fields diff --git a/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py b/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py index 4bc0825a35a..dd6d59f55b2 100644 --- a/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py +++ b/src/sage/schemes/elliptic_curves/ell_curve_isogeny.py @@ -86,7 +86,7 @@ from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.integer import Integer from sage.rings.laurent_series_ring import LaurentSeriesRing -from sage.structure.element import Polynomial +from sage.rings.polynomial.polynomial_element import Polynomial from sage.rings.fraction_field import FractionField from sage.schemes.elliptic_curves.all import EllipticCurve diff --git a/src/sage/schemes/elliptic_curves/jacobian.py b/src/sage/schemes/elliptic_curves/jacobian.py index dc09a18096e..6cf48d0760a 100644 --- a/src/sage/schemes/elliptic_curves/jacobian.py +++ b/src/sage/schemes/elliptic_curves/jacobian.py @@ -104,7 +104,7 @@ def Jacobian(X, **kwds): pass morphism = kwds.pop('morphism', False) - from sage.structure.element import MPolynomial + from sage.rings.polynomial.multi_polynomial import MPolynomial if isinstance(X, MPolynomial): if morphism: from sage.schemes.curves.constructor import Curve diff --git a/src/sage/schemes/generic/hypersurface.py b/src/sage/schemes/generic/hypersurface.py index 58f8ed517fd..090ffacf59a 100644 --- a/src/sage/schemes/generic/hypersurface.py +++ b/src/sage/schemes/generic/hypersurface.py @@ -18,7 +18,7 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from sage.structure.element import MPolynomial +from sage.rings.polynomial.multi_polynomial import MPolynomial from sage.schemes.affine.affine_subscheme import AlgebraicScheme_subscheme_affine from sage.schemes.projective.projective_subscheme import AlgebraicScheme_subscheme_projective diff --git a/src/sage/schemes/hyperelliptic_curves/constructor.py b/src/sage/schemes/hyperelliptic_curves/constructor.py index 49ff0254cd1..e73efa85558 100644 --- a/src/sage/schemes/hyperelliptic_curves/constructor.py +++ b/src/sage/schemes/hyperelliptic_curves/constructor.py @@ -25,7 +25,7 @@ import sage.rings.abc from sage.rings.rational_field import is_RationalField from sage.rings.finite_rings.finite_field_constructor import is_FiniteField -from sage.structure.element import Polynomial +from sage.rings.polynomial.polynomial_element import Polynomial from sage.structure.dynamic_class import dynamic_class diff --git a/src/sage/schemes/hyperelliptic_curves/jacobian_homset.py b/src/sage/schemes/hyperelliptic_curves/jacobian_homset.py index 9fc24367211..74cdccbaa49 100644 --- a/src/sage/schemes/hyperelliptic_curves/jacobian_homset.py +++ b/src/sage/schemes/hyperelliptic_curves/jacobian_homset.py @@ -49,7 +49,7 @@ from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.integer_ring import ZZ from sage.rings.integer import is_Integer, Integer -from sage.structure.element import Polynomial +from sage.rings.polynomial.polynomial_element import Polynomial from sage.schemes.generic.homset import SchemeHomset_points from sage.schemes.generic.morphism import is_SchemeMorphism diff --git a/src/sage/schemes/hyperelliptic_curves/monsky_washnitzer.py b/src/sage/schemes/hyperelliptic_curves/monsky_washnitzer.py index 40bb62aae0d..3a60c34bf7d 100644 --- a/src/sage/schemes/hyperelliptic_curves/monsky_washnitzer.py +++ b/src/sage/schemes/hyperelliptic_curves/monsky_washnitzer.py @@ -64,7 +64,7 @@ from sage.rings.infinity import Infinity from sage.rings.laurent_series_ring import is_LaurentSeriesRing from sage.rings.padics.all import pAdicField -from sage.structure.element import Polynomial +from sage.rings.polynomial.polynomial_element import Polynomial from sage.rings.ring import CommutativeAlgebra from sage.schemes.elliptic_curves.constructor import EllipticCurve from sage.schemes.elliptic_curves.ell_generic import is_EllipticCurve diff --git a/src/sage/schemes/plane_conics/constructor.py b/src/sage/schemes/plane_conics/constructor.py index c1c24049dfe..abff2935854 100644 --- a/src/sage/schemes/plane_conics/constructor.py +++ b/src/sage/schemes/plane_conics/constructor.py @@ -32,7 +32,7 @@ from sage.rings.ring import IntegralDomain from sage.rings.rational_field import is_RationalField from sage.rings.finite_rings.finite_field_constructor import is_FiniteField -from sage.structure.element import MPolynomial +from sage.rings.polynomial.multi_polynomial import MPolynomial from sage.rings.polynomial.polynomial_ring import is_PolynomialRing from sage.rings.polynomial.multi_polynomial_ring import is_MPolynomialRing from sage.rings.fraction_field import is_FractionField diff --git a/src/sage/schemes/plane_quartics/quartic_constructor.py b/src/sage/schemes/plane_quartics/quartic_constructor.py index 53f1494abf0..274eaf049b6 100644 --- a/src/sage/schemes/plane_quartics/quartic_constructor.py +++ b/src/sage/schemes/plane_quartics/quartic_constructor.py @@ -9,7 +9,7 @@ #***************************************************************************** from sage.schemes.projective.projective_space import is_ProjectiveSpace, ProjectiveSpace -from sage.structure.element import MPolynomial +from sage.rings.polynomial.multi_polynomial import MPolynomial from .quartic_generic import QuarticCurve_generic diff --git a/src/sage/structure/element.pxd b/src/sage/structure/element.pxd index d0a574a95a1..5c6e295a4b8 100644 --- a/src/sage/structure/element.pxd +++ b/src/sage/structure/element.pxd @@ -239,15 +239,6 @@ cdef class CommutativeAlgebraElement(CommutativeRingElement): cdef class Expression(CommutativeRingElement): pass -cdef class CommutativePolynomial(CommutativeAlgebraElement): - pass - -cdef class Polynomial(CommutativePolynomial): - pass - -cdef class MPolynomial(CommutativePolynomial): - pass - cdef class InfinityElement(RingElement): pass diff --git a/src/sage/structure/element.pyx b/src/sage/structure/element.pyx index 6c4bff702e4..de3783053dd 100644 --- a/src/sage/structure/element.pyx +++ b/src/sage/structure/element.pyx @@ -47,10 +47,6 @@ abstract base classes. EuclideanDomainElement FieldElement CommutativeAlgebraElement - CommutativePolynomial - Polynomial - MPolynomial - InfinitePolynomial Expression AlgebraElement Matrix @@ -4310,93 +4306,6 @@ cdef class CommutativeAlgebraElement(CommutativeRingElement): ############################################## -cdef class CommutativePolynomial(CommutativeAlgebraElement): - r""" - Abstract base class for commutative polynomials in any number of variables - - It is a common base for :class:`Polynomial`, :class:`MPolynomial`, and - :class:`InfinitePolynomial`. - """ - - pass - - ############################################## - -cdef class Polynomial(CommutativePolynomial): - r""" - Abstract base class for :class:`~sage.rings.polynomial.polynomial_element.Polynomial` - - This class is defined for the purpose of :func:`isinstance` tests. It should not be - instantiated. - - EXAMPLES:: - - sage: R1. = QQ[] - sage: isinstance(x, sage.structure.element.Polynomial) - True - sage: R2. = QQ[] - sage: isinstance(y, sage.structure.element.Polynomial) - False - - By design, there is a unique direct subclass:: - - sage: len(sage.structure.element.Polynomial.__subclasses__()) <= 1 - True - """ - - pass - - ############################################## - -cdef class MPolynomial(CommutativePolynomial): - r""" - Abstract base class for :class:`~sage.rings.polynomial.multi_polynomial.MPolynomial` - - This class is defined for the purpose of :func:`isinstance` tests. It should not be - instantiated. - - EXAMPLES:: - - sage: R1. = QQ[] - sage: isinstance(x, sage.structure.element.MPolynomial) - False - sage: R2. = QQ[] - sage: isinstance(y, sage.structure.element.MPolynomial) - True - - By design, there is a unique direct subclass:: - - sage: len(sage.structure.element.MPolynomial.__subclasses__()) <= 1 - True - """ - - pass - - ############################################## - -cdef class InfinitePolynomial(CommutativePolynomial): - r""" - Abstract base class for :class:`~sage.rings.polynomial.infinite_polynomial_element.InfinitePolynomial` - - This class is defined for the purpose of :func:`isinstance` tests. It should not be - instantiated. - - EXAMPLES:: - - sage: X. = InfinitePolynomialRing(QQ) - sage: isinstance(x[0], sage.structure.element.InfinitePolynomial) - True - - By design, there is a unique direct subclass:: - - sage: len(sage.structure.element.InfinitePolynomial.__subclasses__()) <= 1 - True - """ - - pass - - ############################################## - def is_InfinityElement(x): """ Return ``True`` if x is of type InfinityElement. From 538c2a7a6de1f5063993612926dc63268d38adc5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 22 Jan 2023 17:15:56 -0800 Subject: [PATCH 297/751] Replace use of implementation class from multi_polynomial_libsingular in isinstance tests --- .../algebras/fusion_rings/shm_managers.pyx | 2 +- .../polynomial/infinite_polynomial_element.py | 2 +- .../polynomial/infinite_polynomial_ring.py | 99 ++++++++++--------- .../rings/polynomial/multi_polynomial_ring.py | 2 +- 4 files changed, 54 insertions(+), 51 deletions(-) diff --git a/src/sage/algebras/fusion_rings/shm_managers.pyx b/src/sage/algebras/fusion_rings/shm_managers.pyx index 91aba7ba59f..84c3bb22be4 100644 --- a/src/sage/algebras/fusion_rings/shm_managers.pyx +++ b/src/sage/algebras/fusion_rings/shm_managers.pyx @@ -22,7 +22,7 @@ from multiprocessing import shared_memory from sage.algebras.fusion_rings.poly_tup_engine cimport poly_to_tup, tup_fixes_sq, _flatten_coeffs from sage.rings.integer cimport Integer from sage.rings.rational cimport Rational -from sage.rings.polynomial.multi_polynomial_libsingular cimport MPolynomial_libsingular +from sage.rings.polynomial.multi_polynomial cimport MPolynomial_libsingular from sage.rings.polynomial.polydict cimport ETuple import numpy as np diff --git a/src/sage/rings/polynomial/infinite_polynomial_element.py b/src/sage/rings/polynomial/infinite_polynomial_element.py index aa0d9da9884..6437a28bb2f 100644 --- a/src/sage/rings/polynomial/infinite_polynomial_element.py +++ b/src/sage/rings/polynomial/infinite_polynomial_element.py @@ -695,7 +695,7 @@ def footprint(self): l = len(self.parent()._names) # get the pairs (shift,exponent) of the leading monomial, indexed by the variable names Vars = self._p.parent().variable_names() - from sage.rings.polynomial.multi_polynomial_libsingular import MPolynomial_libsingular + from sage.rings.polynomial.multi_polynomial import MPolynomial_libsingular if isinstance(self._p, MPolynomial_libsingular): L = [(Vars[i].split('_'), e) for i, e in enumerate(self._p.lm().exponents(as_ETuples=False)[0]) if e] elif hasattr(self._p, 'lm'): diff --git a/src/sage/rings/polynomial/infinite_polynomial_ring.py b/src/sage/rings/polynomial/infinite_polynomial_ring.py index 1bc126c1e00..5dc44ec2c10 100644 --- a/src/sage/rings/polynomial/infinite_polynomial_ring.py +++ b/src/sage/rings/polynomial/infinite_polynomial_ring.py @@ -936,7 +936,7 @@ def _element_constructor_(self, x): raise ValueError("cannot convert %s into an element of %s" % (x, self)) # direct conversion will only be used if the underlying polynomials are libsingular. - from sage.rings.polynomial.multi_polynomial_libsingular import MPolynomial_libsingular, MPolynomialRing_libsingular + from sage.rings.polynomial.multi_polynomial import MPolynomial_libsingular # try interpretation in self._P, if we have a dense implementation if hasattr(self, '_P'): if x.parent() is self._P: @@ -945,36 +945,38 @@ def _element_constructor_(self, x): # that MPolynomialRing_polydict does not work in complicated settings. # So, if self._P is libsingular (and this will be the case in many # applications!), we do it "nicely". Otherwise, we have to use sage_eval. - if isinstance(x, MPolynomial_libsingular) and isinstance(self._P, MPolynomialRing_libsingular): - if xmaxind == -1: # Otherwise, x has been an InfinitePolynomial - # We infer the correct variable shift. - # Note: Since we are in the "libsingular" case, there are - # no further "variables" hidden in the base ring of x.parent() + if isinstance(x, MPolynomial_libsingular): + from sage.rings.polynomial.multi_polynomial_libsingular import MPolynomialRing_libsingular + if isinstance(self._P, MPolynomialRing_libsingular): + if xmaxind == -1: # Otherwise, x has been an InfinitePolynomial + # We infer the correct variable shift. + # Note: Since we are in the "libsingular" case, there are + # no further "variables" hidden in the base ring of x.parent() + try: + VarList = [repr(v) for v in x.variables()] + # since interpretation in base ring + # was impossible, it *must* have + # variables + # This tests admissibility on the fly: + VarList.sort(key=self.varname_key, reverse=True) + except ValueError: + raise ValueError("cannot convert %s into an element of %s - variables are not admissible" % (x, self)) + xmaxind = max([int(v.split('_')[1]) for v in VarList]) try: - VarList = [repr(v) for v in x.variables()] - # since interpretation in base ring - # was impossible, it *must* have - # variables - # This tests admissibility on the fly: - VarList.sort(key=self.varname_key, reverse=True) - except ValueError: - raise ValueError("cannot convert %s into an element of %s - variables are not admissible" % (x, self)) - xmaxind = max([int(v.split('_')[1]) for v in VarList]) - try: - # Apparently, in libsingular, the polynomial conversion is not done by - # name but by position, if the number of variables in the parents coincide. - # So, we shift self._P to achieve xmaxind, and if the number of variables is - # the same then we shift further. We then *must* be - # able to convert x into self._P, or conversion to self is - # impossible (and will be done in InfinitePolynomial(...) - if self._max < xmaxind: - self.gen()[xmaxind] - if self._P.ngens() == x.parent().ngens(): - self.gen()[self._max + 1] - # conversion to self._P will be done in InfinitePolynomial.__init__ - return InfinitePolynomial(self, x) - except (ValueError, TypeError, NameError): - raise ValueError("cannot convert %s (from %s, but variables %s) into an element of %s - no conversion into underlying polynomial ring %s" % (x, x.parent(), x.variables(), self, self._P)) + # Apparently, in libsingular, the polynomial conversion is not done by + # name but by position, if the number of variables in the parents coincide. + # So, we shift self._P to achieve xmaxind, and if the number of variables is + # the same then we shift further. We then *must* be + # able to convert x into self._P, or conversion to self is + # impossible (and will be done in InfinitePolynomial(...) + if self._max < xmaxind: + self.gen()[xmaxind] + if self._P.ngens() == x.parent().ngens(): + self.gen()[self._max + 1] + # conversion to self._P will be done in InfinitePolynomial.__init__ + return InfinitePolynomial(self, x) + except (ValueError, TypeError, NameError): + raise ValueError("cannot convert %s (from %s, but variables %s) into an element of %s - no conversion into underlying polynomial ring %s" % (x, x.parent(), x.variables(), self, self._P)) # By now, x or self._P are not libsingular. Since MPolynomialRing_polydict # is too buggy, we use string evaluation try: @@ -1014,25 +1016,26 @@ def _element_constructor_(self, x): from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing R = PolynomialRing(self._base, VarList, order=self._order) - if isinstance(R, MPolynomialRing_libsingular) and isinstance(x, MPolynomial_libsingular): # everything else is so buggy that it's even not worth to try. - try: - # Problem: If there is only a partial overlap in the variables - # of x.parent() and R, then R(x) raises an error (which, I think, - # is a bug, since we talk here about conversion, not coercion). - # Hence, for being on the safe side, we coerce into a pushout ring: - x = R(1) * x - return InfinitePolynomial(self, x) - except Exception: - # OK, last resort, to be on the safe side + if isinstance(x, MPolynomial_libsingular): # everything else is so buggy that it's even not worth to try. + from sage.rings.polynomial.multi_polynomial_libsingular import MPolynomialRing_libsingular + if isinstance(R, MPolynomialRing_libsingular): try: - return sage_eval(repr(x), self.gens_dict()) - except (ValueError, TypeError, NameError): - raise ValueError("cannot convert %s into an element of %s; conversion of the underlying polynomial failed" % (x, self)) - else: - try: - return sage_eval(repr(x), self.gens_dict()) - except (ValueError, TypeError, NameError): - raise ValueError("cannot convert %s into an element of %s" % (x, self)) + # Problem: If there is only a partial overlap in the variables + # of x.parent() and R, then R(x) raises an error (which, I think, + # is a bug, since we talk here about conversion, not coercion). + # Hence, for being on the safe side, we coerce into a pushout ring: + x = R(1) * x + return InfinitePolynomial(self, x) + except Exception: + # OK, last resort, to be on the safe side + try: + return sage_eval(repr(x), self.gens_dict()) + except (ValueError, TypeError, NameError): + raise ValueError("cannot convert %s into an element of %s; conversion of the underlying polynomial failed" % (x, self)) + try: + return sage_eval(repr(x), self.gens_dict()) + except (ValueError, TypeError, NameError): + raise ValueError("cannot convert %s into an element of %s" % (x, self)) def tensor_with_ring(self, R): """ diff --git a/src/sage/rings/polynomial/multi_polynomial_ring.py b/src/sage/rings/polynomial/multi_polynomial_ring.py index f0381318b30..64a49e97ca0 100644 --- a/src/sage/rings/polynomial/multi_polynomial_ring.py +++ b/src/sage/rings/polynomial/multi_polynomial_ring.py @@ -420,7 +420,7 @@ def __call__(self, x=0, check=True): except TypeError: pass - from .multi_polynomial_libsingular import MPolynomial_libsingular + from .multi_polynomial import MPolynomial_libsingular if isinstance(x, MPolynomial_polydict): P = x.parent() From 0fcb6fbbe723ba9c591f10766843c53918f3430c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 22 Jan 2023 17:22:25 -0800 Subject: [PATCH 298/751] src/sage/rings/polynomial/commutative_polynomial.pyx: Add doctests --- .../rings/polynomial/commutative_polynomial.pyx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/sage/rings/polynomial/commutative_polynomial.pyx b/src/sage/rings/polynomial/commutative_polynomial.pyx index 9784f1586c9..dc9f2cab8b7 100644 --- a/src/sage/rings/polynomial/commutative_polynomial.pyx +++ b/src/sage/rings/polynomial/commutative_polynomial.pyx @@ -5,6 +5,19 @@ cdef class CommutativePolynomial(CommutativeAlgebraElement): It is a common base for :class:`~sage.rings.polynomial.polynomial_element.Polynomial`, :class:`~sage.rings.polynomial.multi_polynomial.MPolynomial`, and :class:`~sage.rings.polynomial.infinite_polynomial_element.InfinitePolynomial`. + + EXAMPLES:: + + sage: from sage.rings.polynomial.commutative_polynomial import CommutativePolynomial + sage: K. = PolynomialRing(QQ) + sage: isinstance(x, CommutativePolynomial) + True + sage: K. = PolynomialRing(QQ) + sage: isinstance(x, CommutativePolynomial) + True + sage: X. = InfinitePolynomialRing(ZZ, implementation='sparse') + sage: isinstance(x[2], CommutativePolynomial) + True """ pass From 7b02fb249669c48ff7ae76da44e79a0693948749 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 23 Jan 2023 21:04:07 -0800 Subject: [PATCH 299/751] sage.structure.element.NumberFieldElement: New ABC --- .../number_field/number_field_element.pxd | 4 +++- .../number_field/number_field_element.pyx | 2 +- src/sage/structure/element.pxd | 3 +++ src/sage/structure/element.pyx | 24 +++++++++++++++++++ 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/src/sage/rings/number_field/number_field_element.pxd b/src/sage/rings/number_field/number_field_element.pxd index d7e62edf18c..62b3b0bd0f2 100644 --- a/src/sage/rings/number_field/number_field_element.pxd +++ b/src/sage/rings/number_field/number_field_element.pxd @@ -3,13 +3,15 @@ from sage.libs.gmp.types cimport mpz_t from sage.rings.integer cimport Integer from sage.rings.polynomial.polynomial_element cimport Polynomial from sage.structure.element cimport FieldElement, RingElement, ModuleElement +from sage.structure.element cimport NumberFieldElement as NumberFieldElement_base from sage.structure.parent cimport Parent from sage.structure.parent_base cimport ParentWithBase from sage.libs.ntl.types cimport ZZ_c, ZZX_c from sage.libs.ntl.ntl_ZZX cimport ntl_ZZX from sage.libs.ntl.ntl_ZZ cimport ntl_ZZ -cdef class NumberFieldElement(FieldElement): + +cdef class NumberFieldElement(NumberFieldElement_base): cdef ZZX_c __numerator cdef ZZ_c __denominator # Pointers to the defining polynomial (with numerator) for the field. diff --git a/src/sage/rings/number_field/number_field_element.pyx b/src/sage/rings/number_field/number_field_element.pyx index 30f9c8ba57f..36be1dcef9f 100644 --- a/src/sage/rings/number_field/number_field_element.pyx +++ b/src/sage/rings/number_field/number_field_element.pyx @@ -190,7 +190,7 @@ def _inverse_mod_generic(elt, I): return I.small_residue(y) -cdef class NumberFieldElement(FieldElement): +cdef class NumberFieldElement(NumberFieldElement_base): """ An element of a number field. diff --git a/src/sage/structure/element.pxd b/src/sage/structure/element.pxd index 5c6e295a4b8..4694dfcc72b 100644 --- a/src/sage/structure/element.pxd +++ b/src/sage/structure/element.pxd @@ -230,6 +230,9 @@ cdef class EuclideanDomainElement(PrincipalIdealDomainElement): cdef class FieldElement(CommutativeRingElement): cpdef _floordiv_(self, other) +cdef class NumberFieldElement(FieldElement): + pass + cdef class AlgebraElement(RingElement): pass diff --git a/src/sage/structure/element.pyx b/src/sage/structure/element.pyx index e9430f0b086..5912f443ae6 100644 --- a/src/sage/structure/element.pyx +++ b/src/sage/structure/element.pyx @@ -46,6 +46,7 @@ abstract base classes. PrincipalIdealDomainElement EuclideanDomainElement FieldElement + NumberFieldElement CommutativeAlgebraElement Expression AlgebraElement @@ -4263,6 +4264,29 @@ cdef class FieldElement(CommutativeRingElement): other = self.parent()(other) return bool(self) or other.is_zero() + +cdef class NumberFieldElement(FieldElement): + r""" + Abstract base class for :class:`~sage.rings.number_field.number_field_element.NumberFieldElement` + + This class is defined for the purpose of :func:`isinstance` tests. It should not be + instantiated. + + EXAMPLES:: + + sage: sage: k. = NumberField(x^3 + x + 1) + sage: isinstance(a, sage.structure.element.NumberFieldElement) + True + + By design, there is a unique direct subclass:: + + sage: len(sage.structure.element.NumberFieldElement.__subclasses__()) <= 1 + True + """ + + pass + + def is_AlgebraElement(x): """ Return ``True`` if x is of type AlgebraElement. From a9dacbe0f717ac312be98609228a936afaf8a4e3 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 23 Jan 2023 21:26:20 -0800 Subject: [PATCH 300/751] is_NumberFieldElement: Deprecate, replace uses by isinstance --- src/sage/rings/finite_rings/residue_field.pyx | 5 ++--- src/sage/rings/number_field/number_field_element.pyx | 6 +++++- src/sage/schemes/elliptic_curves/heegner.py | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/sage/rings/finite_rings/residue_field.pyx b/src/sage/rings/finite_rings/residue_field.pyx index 270f92a66e7..6270e665dcc 100644 --- a/src/sage/rings/finite_rings/residue_field.pyx +++ b/src/sage/rings/finite_rings/residue_field.pyx @@ -160,9 +160,8 @@ from sage.rings.finite_rings.finite_field_ntl_gf2e import FiniteField_ntl_gf2e from sage.rings.finite_rings.finite_field_prime_modn import FiniteField_prime_modn from sage.rings.finite_rings.finite_field_pari_ffelt import FiniteField_pari_ffelt from sage.rings.ideal import is_Ideal -from sage.structure.element cimport Element +from sage.structure.element cimport Element, NumberFieldElement -from sage.rings.number_field.number_field_element import is_NumberFieldElement from sage.rings.number_field.number_field_ideal import is_NumberFieldIdeal from sage.modules.free_module_element import FreeModuleElement @@ -295,7 +294,7 @@ class ResidueFieldFactory(UniqueFactory): if not is_Ideal(p): if isinstance(p, (int, Integer, Rational)): p = ZZ.ideal(p) - elif is_NumberFieldElement(p): + elif isinstance(p, NumberFieldElement): if p.parent().is_field(): p = p.parent().ring_of_integers().ideal(p) else: diff --git a/src/sage/rings/number_field/number_field_element.pyx b/src/sage/rings/number_field/number_field_element.pyx index 36be1dcef9f..6e5f7c8023c 100644 --- a/src/sage/rings/number_field/number_field_element.pyx +++ b/src/sage/rings/number_field/number_field_element.pyx @@ -113,6 +113,10 @@ def is_NumberFieldElement(x): sage: is_NumberFieldElement(a+1) True """ + from sage.misc.superseded import deprecation + deprecation(34931, + 'is_NumberFieldElement is deprecated; ' + 'use isinstance(..., sage.structure.element.NumberFieldElement) instead') return isinstance(x, NumberFieldElement) @@ -3855,7 +3859,7 @@ cdef class NumberFieldElement(NumberFieldElement_base): """ from .number_field_ideal import is_NumberFieldIdeal if not is_NumberFieldIdeal(P): - if is_NumberFieldElement(P): + if isinstance(P, NumberFieldElement): P = self.number_field().fractional_ideal(P) else: raise TypeError("P must be an ideal") diff --git a/src/sage/schemes/elliptic_curves/heegner.py b/src/sage/schemes/elliptic_curves/heegner.py index 298f44fedc6..8d267417a53 100644 --- a/src/sage/schemes/elliptic_curves/heegner.py +++ b/src/sage/schemes/elliptic_curves/heegner.py @@ -97,6 +97,7 @@ from sage.misc.verbose import verbose from sage.misc.cachefunc import cached_method +from sage.structure.element import NumberFieldElement from sage.structure.sage_object import SageObject from sage.structure.richcmp import (richcmp_method, richcmp, richcmp_not_equal, rich_to_bool) @@ -2679,7 +2680,7 @@ def __init__(self, N, D, c=ZZ(1), f=None, check=True): elif isinstance(f, BinaryQF): # convert from BinaryQF f = tuple(f) - elif sage.rings.number_field.number_field_element.is_NumberFieldElement(f): + elif isinstance(f, NumberFieldElement): # tau = number field element g = f.minpoly() if g.degree() != 2: From 1cc09cccbde3b3eafb4f123d4f06ae8cb8cace28 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 23 Jan 2023 22:14:05 -0800 Subject: [PATCH 301/751] Replace some imports of NumberFieldElement classes by ABC --- src/sage/interfaces/maxima_lib.py | 10 +++++++--- src/sage/rings/integer_ring.pyx | 2 +- src/sage/rings/universal_cyclotomic_field.py | 4 ++-- src/sage/schemes/elliptic_curves/cm.py | 5 ++++- src/sage/symbolic/expression_conversions.py | 17 ++++++++++------- 5 files changed, 24 insertions(+), 14 deletions(-) diff --git a/src/sage/interfaces/maxima_lib.py b/src/sage/interfaces/maxima_lib.py index c54de09c544..ac6610e7552 100644 --- a/src/sage/interfaces/maxima_lib.py +++ b/src/sage/interfaces/maxima_lib.py @@ -1164,6 +1164,8 @@ def reduce_load_MaximaLib(): import sage.rings.real_double import sage.symbolic.expression import sage.symbolic.integration.integral + +from sage.structure.element import NumberFieldElement from sage.symbolic.operators import FDerivativeOperator, add_vararg, mul_vararg car=EclObject("car") @@ -1523,9 +1525,11 @@ def pyobject_to_max(obj): """ if isinstance(obj,sage.rings.rational.Rational): return EclObject(obj) if (obj.denom().is_one()) else EclObject([[rat], obj.numer(),obj.denom()]) - elif isinstance(obj,sage.rings.number_field.number_field_element_quadratic.NumberFieldElement_quadratic) and obj.parent().defining_polynomial().list() == [1,0,1]: - re, im = obj.list() - return EclObject([[mplus], pyobject_to_max(re), [[mtimes], pyobject_to_max(im), max_i]]) + elif isinstance(obj, NumberFieldElement): + from sage.rings.number_field.number_field_element_quadratic import NumberFieldElement_quadratic + if isinstance(obj, NumberFieldElement_quadratic) and obj.parent().defining_polynomial().list() == [1,0,1]: + re, im = obj.list() + return EclObject([[mplus], pyobject_to_max(re), [[mtimes], pyobject_to_max(im), max_i]]) return EclObject(obj) # This goes from SR to EclObject diff --git a/src/sage/rings/integer_ring.pyx b/src/sage/rings/integer_ring.pyx index 7ba77ca2aa2..39661e76d62 100644 --- a/src/sage/rings/integer_ring.pyx +++ b/src/sage/rings/integer_ring.pyx @@ -60,6 +60,7 @@ from sage.categories.basic import EuclideanDomains from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets from sage.structure.coerce cimport is_numpy_type from sage.structure.element cimport parent +from sage.structure.element import NumberFieldElement from sage.structure.parent_gens import ParentWithGens from sage.structure.parent cimport Parent from sage.structure.richcmp cimport rich_to_bool @@ -414,7 +415,6 @@ cdef class IntegerRing_class(PrincipalIdealDomain): if x in self: return self - from sage.rings.number_field.number_field_element import NumberFieldElement if isinstance(x, NumberFieldElement): K, from_K = parent(x).subfield(x) return K.order(K.gen()) diff --git a/src/sage/rings/universal_cyclotomic_field.py b/src/sage/rings/universal_cyclotomic_field.py index d238bce3450..f5d17093d21 100644 --- a/src/sage/rings/universal_cyclotomic_field.py +++ b/src/sage/rings/universal_cyclotomic_field.py @@ -167,7 +167,8 @@ from sage.structure.richcmp import rich_to_bool from sage.structure.unique_representation import UniqueRepresentation -from sage.structure.element import FieldElement, parent +from sage.structure.element import FieldElement, parent, NumberFieldElement + from sage.structure.coerce import py_scalar_to_element from sage.categories.morphism import Morphism from sage.rings.ring import Field @@ -1537,7 +1538,6 @@ def _element_constructor_(self, elt): import sage.rings.abc P = parent(elt) if isinstance(P, sage.rings.abc.NumberField_cyclotomic): - from sage.rings.number_field.number_field_element import NumberFieldElement if isinstance(elt, NumberFieldElement): from sage.rings.number_field.number_field import CyclotomicField n = P.gen().multiplicative_order() diff --git a/src/sage/schemes/elliptic_curves/cm.py b/src/sage/schemes/elliptic_curves/cm.py index 6d56371ce93..f44e3e8947c 100644 --- a/src/sage/schemes/elliptic_curves/cm.py +++ b/src/sage/schemes/elliptic_curves/cm.py @@ -42,6 +42,8 @@ PolynomialRing) from sage.misc.cachefunc import cached_function +from sage.structure.element import NumberFieldElement + @cached_function def hilbert_class_polynomial(D, algorithm=None): @@ -623,7 +625,6 @@ def is_cm_j_invariant(j, method='new'): True """ # First we check that j is an algebraic number: - from sage.rings.all import NumberFieldElement, NumberField if not isinstance(j, NumberFieldElement) and j not in QQ: raise NotImplementedError("is_cm_j_invariant() is only implemented for number field elements") @@ -670,6 +671,8 @@ def is_cm_j_invariant(j, method='new'): K = j.parent() if h < K.absolute_degree(): + from sage.rings.number_field.number_field import NumberField + K = NumberField(jpol, 'j') j = K.gen() diff --git a/src/sage/symbolic/expression_conversions.py b/src/sage/symbolic/expression_conversions.py index 3b11fb8651e..37ca97168bf 100644 --- a/src/sage/symbolic/expression_conversions.py +++ b/src/sage/symbolic/expression_conversions.py @@ -20,10 +20,9 @@ from sage.rings.rational_field import QQ from sage.symbolic.ring import SR -from sage.structure.element import Expression +from sage.structure.element import Expression, NumberFieldElement from sage.functions.all import exp from sage.symbolic.operators import arithmetic_operators, relation_operators, FDerivativeOperator, add_vararg, mul_vararg -from sage.rings.number_field.number_field_element_quadratic import NumberFieldElement_gaussian from sage.rings.universal_cyclotomic_field import UniversalCyclotomicField @@ -441,9 +440,10 @@ def pyobject(self, ex, obj): sage: ii.pyobject(pi, pi.pyobject()) 'Pi' """ - if (self.interface.name() in ['pari', 'gp'] and - isinstance(obj, NumberFieldElement_gaussian)): - return repr(obj) + if (self.interface.name() in ['pari', 'gp'] and isinstance(obj, NumberFieldElement)): + from sage.rings.number_field.number_field_element_quadratic import NumberFieldElement_gaussian + if isinstance(obj, NumberFieldElement_gaussian): + return repr(obj) try: return getattr(obj, self.name_init)() except AttributeError: @@ -1020,10 +1020,13 @@ def pyobject(self, ex, obj): """ try: result = getattr(obj, self.name_init)() - if isinstance(obj, NumberFieldElement_gaussian): - return "((%s)::EXPR COMPLEX INT)" % result except AttributeError: result = repr(obj) + else: + if isinstance(obj, NumberFieldElement): + from sage.rings.number_field.number_field_element_quadratic import NumberFieldElement_gaussian + if isinstance(obj, NumberFieldElement_gaussian): + return "((%s)::EXPR COMPLEX INT)" % result return "((%s)::EXPR INT)" % result def symbol(self, ex): From 4dfefbf9e0cfc6f4aa4a402b6a053ffe6e838792 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 23 Jan 2023 22:28:35 -0800 Subject: [PATCH 302/751] src/sage/rings/number_field/number_field_element.pyx: Update doctest with deprecation warning --- src/sage/rings/number_field/number_field_element.pyx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sage/rings/number_field/number_field_element.pyx b/src/sage/rings/number_field/number_field_element.pyx index 6e5f7c8023c..3d212f23a49 100644 --- a/src/sage/rings/number_field/number_field_element.pyx +++ b/src/sage/rings/number_field/number_field_element.pyx @@ -108,6 +108,10 @@ def is_NumberFieldElement(x): sage: from sage.rings.number_field.number_field_element import is_NumberFieldElement sage: is_NumberFieldElement(2) + doctest:warning... + DeprecationWarning: is_NumberFieldElement is deprecated; + use isinstance(..., sage.structure.element.NumberFieldElement) instead + See https://trac.sagemath.org/34931 for details. False sage: k. = NumberField(x^7 + 17*x + 1) sage: is_NumberFieldElement(a+1) From 5cd17f1a3c787cf4739667343b025dce369332d3 Mon Sep 17 00:00:00 2001 From: Sandstorm831 Date: Tue, 24 Jan 2023 12:26:14 +0530 Subject: [PATCH 303/751] correcting function --- src/sage/combinat/posets/linear_extensions.py | 102 ++++++------------ 1 file changed, 33 insertions(+), 69 deletions(-) diff --git a/src/sage/combinat/posets/linear_extensions.py b/src/sage/combinat/posets/linear_extensions.py index 4c953c55ef5..37b277138da 100644 --- a/src/sage/combinat/posets/linear_extensions.py +++ b/src/sage/combinat/posets/linear_extensions.py @@ -257,12 +257,21 @@ def is_supergreedy(self): Return ``True`` if the linear extension is supergreedy. A linear extension `[e_1, e_2, \ldots, e_n]` is *supergreedy* if - for every i, either `e_i+1` cover `e_i` otherwise on backtracking - through the list of elements previosly choosen, either `e_i+1` - should be in the upper cover of the first element having a non-empty - upper cover or should include only the prviosly choosen elements. + for every i, either if there is a minimal element `e_i+1` in + `[e_i+1, \ldots, e_n]` which is in the upper cover of `e_j` in + `[e_1, \ldots, e_i]` for which j is maximum or if no such element + exist `e_i+1` is the any of the minimal element in `[e_i+1,\dots, e_n]`. EXAMPLES:: + sage: X = [0,1,2,3,4,5,6] + sage: Y = [[0,5],[1,4],[1,5],[3,6],[4,3],[5,6],[6,2]] + sage: P = Poset((X,Y), cover_relations = True, facade=False) + sage: for l in P.linear_extensions(): + ....: if l.is_supergreedy(): + ....: print(l) + [1, 4, 3, 0, 5, 6, 2] + [0, 1, 4, 3, 5, 6, 2] + [0, 1, 5, 4, 3, 6, 2] sage: Q = posets.PentagonPoset() sage: for l in Q.linear_extensions(): @@ -279,77 +288,32 @@ def is_supergreedy(self): True """ P = self.poset() - Q = [] - N = [] - S = [] - T = [] + H = P.hasse_diagram() + + def next_elements(H, linext): + k = len(linext) + S = [] + while not S: + if not k: + S = [x for x in H.sources() if x not in linext] + else: + S = [x for x in H.neighbor_out_iterator(linext[k-1]) if x not in linext and all(low in linext for low in H.neighbor_in_iterator(x))] + k -= 1 + return S + if not self: return True - N.append(self[0]) - for i in range(len(self)-1): - if P.compare_elements(self[0],self[i+1]) is not None : - N.append(self[i+1]) + if self[0] not in H.sources(): + return False + for i in range(len(self)-2): + X = next_elements(H,self[:i+1]) + if self[i+1] in X: + continue else: - S.append(self[i+1]) - Q.append(N.copy()) - N.clear() - while(S): - N.append(S[0]) - for i in range(len(S)-1): - if P.compare_elements(S[0],S[i+1]) is not None : - N.append(S[i+1]) - else: - T.append(S[i+1]) - Q.append(N.copy()) - S.clear() - S = T.copy() - T.clear() - N.clear() - for l in Q: - if not self.complete_supergreedy(P, l): return False - else: - return True - - def complete_supergreedy(self, P, L): - r""" - Return ``True`` if the linear extension is supergreedy and any one - element is comparable to all the elements - """ - Q = set() - for i in range(len(L) - 1): - Q.add(L[i]) - if not P.covers(L[i], L[i + 1]): - if len(P.upper_covers(L[i])) != 0: - return False - R = True - S = [L[i]] - while(R): - for t in S: - for u in P.lower_covers(t): - if len(P.upper_covers(u)) == 0: - S = P.lower_covers(t) - break - else : - for v in P.upper_covers(u): - if v != L[i+1] and v not in Q: - return False - elif v == L[i+1] : - R=False - break - else : - continue - else : - if P.lower_covers(t) == 0 : - return False - S = P.lower_covers(t) - continue - break - else: - continue - break return True + def tau(self, i): r""" Return the operator `\tau_i` on linear extensions ``self`` of a poset. From 1406cdc3a3691819a3081bf737275845c7c6cc4b Mon Sep 17 00:00:00 2001 From: Sandstorm831 Date: Tue, 24 Jan 2023 18:02:18 +0530 Subject: [PATCH 304/751] documentation changes --- src/sage/combinat/posets/linear_extensions.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/sage/combinat/posets/linear_extensions.py b/src/sage/combinat/posets/linear_extensions.py index 37b277138da..4fb2f4e5a44 100644 --- a/src/sage/combinat/posets/linear_extensions.py +++ b/src/sage/combinat/posets/linear_extensions.py @@ -257,12 +257,18 @@ def is_supergreedy(self): Return ``True`` if the linear extension is supergreedy. A linear extension `[e_1, e_2, \ldots, e_n]` is *supergreedy* if - for every i, either if there is a minimal element `e_i+1` in - `[e_i+1, \ldots, e_n]` which is in the upper cover of `e_j` in + for every `i`, either if there is a minimal element `e_{i+1}` in + `[e_{i+1}, \ldots, e_n]` which is in the upper cover of `e_j` in `[e_1, \ldots, e_i]` for which j is maximum or if no such element - exist `e_i+1` is the any of the minimal element in `[e_i+1,\dots, e_n]`. + exist `e_{i+1}` is the any of the minimal element in + `[e_i+1,\dots, e_n]`. + + Informally said a linear extension is supergreedy if it "always + goes up and receedes the least" loosely speaking, supergreedy + linear extensions are depth-first linear extensions. EXAMPLES:: + sage: X = [0,1,2,3,4,5,6] sage: Y = [[0,5],[1,4],[1,5],[3,6],[4,3],[5,6],[6,2]] sage: P = Poset((X,Y), cover_relations = True, facade=False) From 6e2adaf291edc2c0d34ef390e08aa99cee32e6d0 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 24 Jan 2023 18:49:59 -0800 Subject: [PATCH 305/751] InfinitePolynomial: Move _lmul_, _rmul_ here from subclasses --- .../polynomial/infinite_polynomial_element.py | 66 +++++++------------ 1 file changed, 22 insertions(+), 44 deletions(-) diff --git a/src/sage/rings/polynomial/infinite_polynomial_element.py b/src/sage/rings/polynomial/infinite_polynomial_element.py index 6437a28bb2f..ab35e5f31d2 100644 --- a/src/sage/rings/polynomial/infinite_polynomial_element.py +++ b/src/sage/rings/polynomial/infinite_polynomial_element.py @@ -480,6 +480,28 @@ def max_index(self): """ return max([Integer(str(X).split('_')[1]) for X in self.variables()]+[-1]) + def _rmul_(self, left): + """ + TESTS:: + + sage: R. = InfinitePolynomialRing(QQ, implementation='sparse') + sage: R.from_base_ring(4) # indirect doctest + 4 + + """ + return type(self)(self.parent(), left * self._p) + + def _lmul_(self, right): + """ + TESTS:: + + sage: R. = InfinitePolynomialRing(QQ, implementation='sparse') + sage: alpha[3]*4 # indirect doctest + 4*alpha_3 + + """ + return type(self)(self.parent(), self._p * right) + def _div_(self, x): r""" Division of Infinite Polynomials. @@ -1201,28 +1223,6 @@ def _mul_(self, x): R = self._p.base_ring() return InfinitePolynomial_sparse(self.parent(), R(self._p) * R(x._p)) - def _rmul_(self, left): - """ - TESTS:: - - sage: R. = InfinitePolynomialRing(QQ, implementation='sparse') - sage: R.from_base_ring(4) # indirect doctest - 4 - - """ - return InfinitePolynomial_sparse(self.parent(), left * self._p) - - def _lmul_(self, right): - """ - TESTS:: - - sage: R. = InfinitePolynomialRing(QQ, implementation='sparse') - sage: alpha[3]*4 # indirect doctest - 4*alpha_3 - - """ - return InfinitePolynomial_sparse(self.parent(), self._p * right) - def _sub_(self, x): """ EXAMPLES:: @@ -1508,28 +1508,6 @@ def _mul_(self, x): x._p = P._P(x._p) return InfinitePolynomial_dense(self.parent(), self._p * x._p) - def _rmul_(self, left): - """ - TESTS:: - - sage: R. = InfinitePolynomialRing(QQ) - sage: R.from_base_ring(4) # indirect doctest - 4 - - """ - return InfinitePolynomial_dense(self.parent(), left*self._p) - - def _lmul_(self, right): - """ - TESTS:: - - sage: R. = InfinitePolynomialRing(QQ) - sage: alpha[3]*4 # indirect doctest - 4*alpha_3 - - """ - return InfinitePolynomial_dense(self.parent(), self._p*right) - def _sub_(self, x): """ EXAMPLES:: From cdab0dfc716d77a0a0b2bef7f1779bc29a715385 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 24 Jan 2023 19:08:35 -0800 Subject: [PATCH 306/751] InfinitePolynomial.__classcall_private__: Add doctest --- .../polynomial/infinite_polynomial_element.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/sage/rings/polynomial/infinite_polynomial_element.py b/src/sage/rings/polynomial/infinite_polynomial_element.py index ab35e5f31d2..859f9c407d5 100644 --- a/src/sage/rings/polynomial/infinite_polynomial_element.py +++ b/src/sage/rings/polynomial/infinite_polynomial_element.py @@ -169,6 +169,28 @@ class InfinitePolynomial(CommutativePolynomial, metaclass=InheritComparisonClass @staticmethod def __classcall_private__(cls, A, p): + r""" + TESTS:: + + sage: from sage.rings.polynomial.infinite_polynomial_element import InfinitePolynomial + sage: X. = InfinitePolynomialRing(ZZ, implementation='sparse') + sage: xy = (x[0] + y[0]).polynomial() + sage: xy.parent() + Multivariate Polynomial Ring in x_1, x_0, y_1, y_0 over Integer Ring + sage: sparse_xy = InfinitePolynomial(X, xy); sparse_xy + x_0 + y_0 + sage: isinstance(sparse_xy, InfinitePolynomial) + True + sage: type(sparse_xy) + + sage: X. = InfinitePolynomialRing(ZZ, implementation='dense') + sage: dense_xy = InfinitePolynomial(X, xy); dense_xy + x_0 + y_0 + sage: isinstance(dense_xy, InfinitePolynomial) + True + sage: type(dense_xy) + + """ from sage.structure.element import parent if hasattr(A, '_P'): if parent(p) is A._P or (A._P.base_ring().has_coerce_map_from(parent(p))): From bacff9613fa0dd6b2a39b424371315f318d099c7 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 24 Jan 2023 19:26:50 -0800 Subject: [PATCH 307/751] src/sage/rings/number_field/__init__.py: Remove --- src/sage/rings/number_field/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/sage/rings/number_field/__init__.py diff --git a/src/sage/rings/number_field/__init__.py b/src/sage/rings/number_field/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 From 3e95ebf75d9ccf231381840770077d118c0010d0 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 25 Jan 2023 18:38:15 -0800 Subject: [PATCH 308/751] src/sage/structure/element.pyx: Fix up doctest --- src/sage/structure/element.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/structure/element.pyx b/src/sage/structure/element.pyx index 5912f443ae6..42b7bce9d49 100644 --- a/src/sage/structure/element.pyx +++ b/src/sage/structure/element.pyx @@ -4274,7 +4274,7 @@ cdef class NumberFieldElement(FieldElement): EXAMPLES:: - sage: sage: k. = NumberField(x^3 + x + 1) + sage: k. = NumberField(x^3 + x + 1) sage: isinstance(a, sage.structure.element.NumberFieldElement) True From 25f84e30e43cc5536504738a0e42e257237ebb22 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 26 Jan 2023 22:23:12 -0800 Subject: [PATCH 309/751] src/sage/numerical/backends/scip_backend.pyx: Remove unused imports --- src/sage/numerical/backends/scip_backend.pyx | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/sage/numerical/backends/scip_backend.pyx b/src/sage/numerical/backends/scip_backend.pyx index b2ecf0f923b..0813891947f 100644 --- a/src/sage/numerical/backends/scip_backend.pyx +++ b/src/sage/numerical/backends/scip_backend.pyx @@ -24,10 +24,7 @@ AUTHORS: from os import sys from os.path import splitext -from sage.ext.memory_allocator cimport MemoryAllocator from sage.numerical.mip import MIPSolverException -from libc.float cimport DBL_MAX -from libc.limits cimport INT_MAX from pyscipopt import Model From bdf2f331e31f0583a247409ef4b47beeb2b4cef7 Mon Sep 17 00:00:00 2001 From: Alex Chandler Date: Sun, 29 Jan 2023 10:46:39 -0800 Subject: [PATCH 310/751] sage -fiximports src/sage/algebras src/sage/combinat src/sage/matroids --- .../algebras/affine_nil_temperley_lieb.py | 2 +- src/sage/algebras/cluster_algebra.py | 2 +- src/sage/algebras/free_algebra.py | 4 +- src/sage/algebras/free_algebra_quotient.py | 2 +- src/sage/algebras/group_algebra.py | 4 +- .../hecke_algebras/ariki_koike_algebra.py | 2 +- src/sage/algebras/iwahori_hecke_algebra.py | 6 +- src/sage/algebras/lie_algebras/bch.py | 2 +- .../algebras/lie_algebras/free_lie_algebra.py | 2 +- .../lie_conformal_algebra_element.py | 2 +- ..._conformal_algebra_with_structure_coefs.py | 2 +- .../algebras/quatalg/quaternion_algebra.py | 11 +- src/sage/algebras/schur_algebra.py | 2 +- src/sage/algebras/shuffle_algebra.py | 2 +- .../algebras/steenrod/steenrod_algebra.py | 6 +- .../steenrod/steenrod_algebra_mult.py | 5 +- src/sage/combinat/affine_permutation.py | 2 +- src/sage/combinat/alternating_sign_matrix.py | 2 +- src/sage/combinat/baxter_permutations.py | 2 +- .../combinat/binary_recurrence_sequences.py | 6 +- src/sage/combinat/blob_algebra.py | 2 +- .../cluster_algebra_quiver/cluster_seed.py | 8 +- .../combinat/cluster_algebra_quiver/quiver.py | 4 +- .../quiver_mutation_type.py | 3 +- src/sage/combinat/combinat.py | 3 +- src/sage/combinat/combination.py | 2 +- src/sage/combinat/composition_signed.py | 2 +- src/sage/combinat/crystals/alcove_path.py | 2 +- .../combinat/cyclic_sieving_phenomenon.py | 2 +- src/sage/combinat/decorated_permutation.py | 2 +- src/sage/combinat/descent_algebra.py | 2 +- src/sage/combinat/designs/bibd.py | 3 +- src/sage/combinat/designs/block_design.py | 4 +- src/sage/combinat/designs/covering_design.py | 2 +- .../combinat/designs/difference_family.py | 152 +++++++++--------- .../combinat/designs/difference_matrices.py | 3 +- .../designs/group_divisible_designs.py | 2 +- .../combinat/designs/incidence_structures.py | 2 +- .../orthogonal_arrays_build_recursive.py | 8 +- .../orthogonal_arrays_find_recursive.pyx | 2 +- src/sage/combinat/designs/resolvable_bibd.py | 2 +- src/sage/combinat/dyck_word.py | 6 +- src/sage/combinat/free_module.py | 5 +- src/sage/combinat/fully_packed_loop.py | 2 +- src/sage/combinat/integer_vector.py | 2 +- src/sage/combinat/integer_vector_weighted.py | 3 +- src/sage/combinat/interval_posets.py | 4 +- src/sage/combinat/matrices/hadamard_matrix.py | 26 +-- src/sage/combinat/matrices/latin.py | 2 +- .../multiset_partition_into_sets_ordered.py | 2 +- .../combinat/ncsf_qsym/generic_basis_code.py | 2 +- src/sage/combinat/ncsf_qsym/ncsf.py | 4 +- src/sage/combinat/ncsf_qsym/qsym.py | 2 +- src/sage/combinat/ncsym/bases.py | 4 +- src/sage/combinat/necklace.py | 5 +- src/sage/combinat/partition.py | 5 +- src/sage/combinat/partition_algebra.py | 3 +- src/sage/combinat/path_tableaux/frieze.py | 2 +- src/sage/combinat/permutation.py | 3 +- src/sage/combinat/posets/hasse_diagram.py | 2 +- src/sage/combinat/posets/posets.py | 2 +- .../rigged_configurations/kleber_tree.py | 2 +- .../combinat/root_system/cartan_matrix.py | 2 +- src/sage/combinat/root_system/coxeter_type.py | 2 +- .../root_system/reflection_group_complex.py | 5 +- .../root_system/reflection_group_element.pyx | 3 +- .../combinat/root_system/weyl_characters.py | 3 +- src/sage/combinat/root_system/weyl_group.py | 4 +- src/sage/combinat/schubert_polynomial.py | 2 +- src/sage/combinat/set_partition_ordered.py | 3 +- src/sage/combinat/sf/character.py | 4 +- src/sage/combinat/sf/elementary.py | 3 +- src/sage/combinat/sf/homogeneous.py | 3 +- src/sage/combinat/sf/jack.py | 3 +- src/sage/combinat/sf/k_dual.py | 2 +- src/sage/combinat/sf/macdonald.py | 2 +- src/sage/combinat/sf/powersum.py | 2 +- src/sage/combinat/sf/sfa.py | 8 +- src/sage/combinat/sf/witt.py | 4 +- src/sage/combinat/similarity_class_type.py | 3 +- src/sage/combinat/skew_tableau.py | 4 +- src/sage/combinat/species/cycle_species.py | 3 +- .../combinat/species/generating_series.py | 2 +- src/sage/combinat/subset.py | 4 +- src/sage/combinat/symmetric_group_algebra.py | 2 +- src/sage/combinat/t_sequences.py | 116 ++++++------- src/sage/combinat/tableau.py | 3 +- src/sage/combinat/tableau_tuple.py | 2 +- src/sage/combinat/tamari_lattices.py | 2 +- src/sage/combinat/words/lyndon_word.py | 5 +- src/sage/combinat/words/morphism.py | 2 +- src/sage/combinat/words/paths.py | 2 +- src/sage/combinat/words/shuffle_product.py | 2 +- src/sage/combinat/words/word_generators.py | 2 +- src/sage/matroids/basis_matroid.pyx | 2 +- src/sage/matroids/constructor.py | 3 +- src/sage/matroids/extension.pyx | 2 +- src/sage/matroids/lean_matrix.pyx | 5 +- src/sage/matroids/linear_matroid.pyx | 5 +- 99 files changed, 328 insertions(+), 266 deletions(-) diff --git a/src/sage/algebras/affine_nil_temperley_lieb.py b/src/sage/algebras/affine_nil_temperley_lieb.py index 8aff4321abb..f7901ae314d 100644 --- a/src/sage/algebras/affine_nil_temperley_lieb.py +++ b/src/sage/algebras/affine_nil_temperley_lieb.py @@ -7,7 +7,7 @@ # Distributed under the terms of the GNU General Public License (GPL) # https://www.gnu.org/licenses/ # **************************************************************************** -from sage.categories.all import AlgebrasWithBasis +from sage.categories.algebras_with_basis import AlgebrasWithBasis from sage.combinat.root_system.cartan_type import CartanType from sage.combinat.root_system.weyl_group import WeylGroup from sage.rings.ring import Ring diff --git a/src/sage/algebras/cluster_algebra.py b/src/sage/algebras/cluster_algebra.py index 81615828b56..f3e88d96298 100644 --- a/src/sage/algebras/cluster_algebra.py +++ b/src/sage/algebras/cluster_algebra.py @@ -354,7 +354,7 @@ from copy import copy -from sage.arith.all import binomial +from sage.arith.misc import binomial from sage.categories.homset import Hom from sage.categories.morphism import SetMorphism from sage.categories.rings import Rings diff --git a/src/sage/algebras/free_algebra.py b/src/sage/algebras/free_algebra.py index 7286f62ce27..3004878a378 100644 --- a/src/sage/algebras/free_algebra.py +++ b/src/sage/algebras/free_algebra.py @@ -149,7 +149,7 @@ from sage.structure.factory import UniqueFactory from sage.misc.cachefunc import cached_method -from sage.all import PolynomialRing +from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.ring import Algebra from sage.categories.algebras_with_basis import AlgebrasWithBasis from sage.combinat.free_module import CombinatorialFreeModule @@ -282,7 +282,7 @@ def create_key(self, base_ring, arg1=None, arg2=None, PolRing = PolynomialRing(base_ring, *args, **kwds) if degrees is None: return (PolRing,) - from sage.all import TermOrder + from sage.rings.polynomial.term_order import TermOrder T = TermOrder(PolRing.term_order(), PolRing.ngens() + 1) varnames = list(PolRing.variable_names()) newname = 'x' diff --git a/src/sage/algebras/free_algebra_quotient.py b/src/sage/algebras/free_algebra_quotient.py index 583eb5f9ae8..b3090baa029 100644 --- a/src/sage/algebras/free_algebra_quotient.py +++ b/src/sage/algebras/free_algebra_quotient.py @@ -357,7 +357,7 @@ def hamilton_quatalg(R): """ n = 3 from sage.algebras.free_algebra import FreeAlgebra - from sage.matrix.all import MatrixSpace + from sage.matrix.matrix_space import MatrixSpace A = FreeAlgebra(R, n, 'i') F = A.monoid() i, j, k = F.gens() diff --git a/src/sage/algebras/group_algebra.py b/src/sage/algebras/group_algebra.py index 6821a64f68f..c639106b239 100644 --- a/src/sage/algebras/group_algebra.py +++ b/src/sage/algebras/group_algebra.py @@ -35,8 +35,8 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from sage.rings.all import IntegerRing -from sage.categories.all import Rings +from sage.rings.integer_ring import IntegerRing +from sage.categories.rings import Rings from sage.categories.magmas import Magmas from sage.categories.additive_magmas import AdditiveMagmas from sage.categories.sets_cat import Sets diff --git a/src/sage/algebras/hecke_algebras/ariki_koike_algebra.py b/src/sage/algebras/hecke_algebras/ariki_koike_algebra.py index c1596761c99..5f21e1049b0 100644 --- a/src/sage/algebras/hecke_algebras/ariki_koike_algebra.py +++ b/src/sage/algebras/hecke_algebras/ariki_koike_algebra.py @@ -540,7 +540,7 @@ def dimension(self): sage: LT.dimension() 29160 """ - from sage.arith.all import factorial + from sage.arith.misc import factorial return self._r**self._n * factorial(self._n) def some_elements(self): diff --git a/src/sage/algebras/iwahori_hecke_algebra.py b/src/sage/algebras/iwahori_hecke_algebra.py index 900039c7909..a9935dd36e2 100644 --- a/src/sage/algebras/iwahori_hecke_algebra.py +++ b/src/sage/algebras/iwahori_hecke_algebra.py @@ -30,10 +30,12 @@ from sage.structure.parent import Parent from sage.structure.unique_representation import UniqueRepresentation from sage.categories.realizations import Realizations, Category_realization_of_parent -from sage.categories.all import AlgebrasWithBasis, FiniteDimensionalAlgebrasWithBasis, CoxeterGroups +from sage.categories.algebras_with_basis import AlgebrasWithBasis +from sage.categories.finite_dimensional_algebras_with_basis import FiniteDimensionalAlgebrasWithBasis +from sage.categories.coxeter_groups import CoxeterGroups from sage.rings.integer_ring import ZZ from sage.rings.polynomial.laurent_polynomial_ring import LaurentPolynomialRing -from sage.arith.all import is_square +from sage.arith.misc import is_square from sage.combinat.root_system.coxeter_group import CoxeterGroup from sage.sets.family import Family from sage.combinat.free_module import CombinatorialFreeModule diff --git a/src/sage/algebras/lie_algebras/bch.py b/src/sage/algebras/lie_algebras/bch.py index 1cb3f0442cb..657b8c194a1 100644 --- a/src/sage/algebras/lie_algebras/bch.py +++ b/src/sage/algebras/lie_algebras/bch.py @@ -20,7 +20,7 @@ from sage.arith.misc import bernoulli from sage.categories.lie_algebras import LieAlgebras from sage.combinat.integer_vector import IntegerListsLex -from sage.arith.all import factorial +from sage.arith.misc import factorial from sage.rings.rational_field import QQ from sage.structure.element import canonical_coercion diff --git a/src/sage/algebras/lie_algebras/free_lie_algebra.py b/src/sage/algebras/lie_algebras/free_lie_algebra.py index 8a02e5265c6..79df5a5d90b 100644 --- a/src/sage/algebras/lie_algebras/free_lie_algebra.py +++ b/src/sage/algebras/lie_algebras/free_lie_algebra.py @@ -265,7 +265,7 @@ def graded_dimension(self, k): """ if k == 0: return 0 - from sage.arith.all import moebius + from sage.arith.misc import moebius s = len(self.lie_algebra_generators()) k = ZZ(k) # Make sure we have something that is in ZZ return sum(moebius(d) * s**(k // d) for d in k.divisors()) // k diff --git a/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_element.py b/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_element.py index c40e654e157..d10426501f2 100644 --- a/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_element.py +++ b/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_element.py @@ -14,7 +14,7 @@ # (at your option) any later version. # https://www.gnu.org/licenses/ # **************************************************************************** -from sage.arith.all import factorial +from sage.arith.misc import factorial from sage.misc.misc_c import prod from sage.misc.repr import repr_lincomb from sage.misc.latex import latex diff --git a/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_structure_coefs.py b/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_structure_coefs.py index b2cf3582793..46119ad45f1 100644 --- a/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_structure_coefs.py +++ b/src/sage/algebras/lie_conformal_algebras/lie_conformal_algebra_with_structure_coefs.py @@ -17,7 +17,7 @@ # https://www.gnu.org/licenses/ # **************************************************************************** -from sage.arith.all import binomial +from sage.arith.misc import binomial from sage.sets.family import Family from .lie_conformal_algebra_element import LCAStructureCoefficientsElement from sage.categories.lie_conformal_algebras import LieConformalAlgebras diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py index 45a4d512c0a..0e4b1e979a8 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra.py +++ b/src/sage/algebras/quatalg/quaternion_algebra.py @@ -35,9 +35,14 @@ # https://www.gnu.org/licenses/ # **************************************************************************** -from sage.arith.all import (hilbert_conductor_inverse, hilbert_conductor, - factor, gcd, kronecker_symbol, valuation) -from sage.rings.all import RR, Integer +from sage.arith.misc import hilbert_conductor_inverse +from sage.arith.misc import hilbert_conductor +from sage.arith.misc import factor +from sage.arith.misc import GCD as gcd +from sage.arith.misc import kronecker as kronecker_symbol +from sage.arith.misc import valuation +from sage.rings.real_mpfr import RR +from sage.rings.integer import Integer from sage.rings.integer_ring import ZZ from sage.rings.rational import Rational from sage.rings.finite_rings.finite_field_constructor import GF diff --git a/src/sage/algebras/schur_algebra.py b/src/sage/algebras/schur_algebra.py index b716db0ce94..ff960e56dd9 100644 --- a/src/sage/algebras/schur_algebra.py +++ b/src/sage/algebras/schur_algebra.py @@ -41,7 +41,7 @@ from sage.combinat.sf.sf import SymmetricFunctions from sage.combinat.symmetric_group_algebra import SymmetricGroupAlgebra from sage.combinat.tableau import SemistandardTableaux -from sage.arith.all import binomial +from sage.arith.misc import binomial from sage.matrix.constructor import Matrix from sage.misc.cachefunc import cached_method from sage.misc.flatten import flatten diff --git a/src/sage/algebras/shuffle_algebra.py b/src/sage/algebras/shuffle_algebra.py index 26c8a40f485..5d383f8dfab 100644 --- a/src/sage/algebras/shuffle_algebra.py +++ b/src/sage/algebras/shuffle_algebra.py @@ -972,7 +972,7 @@ def expansion_on_basis(self, w): sage: S.expansion_on_basis(Word('abab')) 2*B[aabb] + B[abab] """ - from sage.arith.all import factorial + from sage.arith.misc import factorial if not w: return self._alg.one() if len(w) == 1: diff --git a/src/sage/algebras/steenrod/steenrod_algebra.py b/src/sage/algebras/steenrod/steenrod_algebra.py index 49b281d9a49..978a3557a9d 100644 --- a/src/sage/algebras/steenrod/steenrod_algebra.py +++ b/src/sage/algebras/steenrod/steenrod_algebra.py @@ -455,7 +455,9 @@ from sage.combinat.free_module import CombinatorialFreeModule from sage.misc.lazy_attribute import lazy_attribute from sage.misc.cachefunc import cached_method -from sage.categories.all import ModulesWithBasis, tensor, Hom +from sage.categories.modules_with_basis import ModulesWithBasis +from sage.categories.tensor import tensor +from sage.categories.homset import Hom ###################################################### # the main class @@ -584,7 +586,7 @@ def __init__(self, p=2, basis='milnor', **kwds): sage: A1 == SteenrodAlgebra(2, profile=[2,1], basis='pst') False """ - from sage.arith.all import is_prime + from sage.arith.misc import is_prime from sage.categories.super_hopf_algebras_with_basis import SuperHopfAlgebrasWithBasis from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets diff --git a/src/sage/algebras/steenrod/steenrod_algebra_mult.py b/src/sage/algebras/steenrod/steenrod_algebra_mult.py index ec92c86fcc5..1fb52aba028 100644 --- a/src/sage/algebras/steenrod/steenrod_algebra_mult.py +++ b/src/sage/algebras/steenrod/steenrod_algebra_mult.py @@ -611,8 +611,9 @@ def multinomial_odd(list,p): sage: multinomial_odd([1,2,4], 107) 105 """ - from sage.rings.all import GF, Integer - from sage.arith.all import binomial + from sage.rings.finite_rings.finite_field_constructor import FiniteField as GF + from sage.rings.integer import Integer + from sage.arith.misc import binomial n = sum(list) answer = 1 F = GF(p) diff --git a/src/sage/combinat/affine_permutation.py b/src/sage/combinat/affine_permutation.py index 9ee4e166abe..22bb6a4e421 100644 --- a/src/sage/combinat/affine_permutation.py +++ b/src/sage/combinat/affine_permutation.py @@ -23,7 +23,7 @@ from sage.rings.integer_ring import ZZ from sage.groups.perm_gps.permgroup_named import SymmetricGroup -from sage.arith.all import binomial +from sage.arith.misc import binomial from sage.combinat.root_system.cartan_type import CartanType from sage.combinat.root_system.weyl_group import WeylGroup from sage.combinat.composition import Composition diff --git a/src/sage/combinat/alternating_sign_matrix.py b/src/sage/combinat/alternating_sign_matrix.py index c7c7317811c..e9eb810cd6d 100644 --- a/src/sage/combinat/alternating_sign_matrix.py +++ b/src/sage/combinat/alternating_sign_matrix.py @@ -46,7 +46,7 @@ from sage.modules.free_module_element import zero_vector from sage.misc.cachefunc import cached_method from sage.rings.integer_ring import ZZ -from sage.arith.all import factorial +from sage.arith.misc import factorial from sage.rings.integer import Integer from sage.combinat.posets.lattices import LatticePoset from sage.combinat.gelfand_tsetlin_patterns import GelfandTsetlinPatternsTopRow diff --git a/src/sage/combinat/baxter_permutations.py b/src/sage/combinat/baxter_permutations.py index 382e4abcdab..ddf46c37457 100644 --- a/src/sage/combinat/baxter_permutations.py +++ b/src/sage/combinat/baxter_permutations.py @@ -231,7 +231,7 @@ def cardinality(self): """ if self._n == 0: return 1 - from sage.arith.all import binomial + from sage.arith.misc import binomial return sum((binomial(self._n + 1, k) * binomial(self._n + 1, k + 1) * binomial(self._n + 1, k + 2)) // diff --git a/src/sage/combinat/binary_recurrence_sequences.py b/src/sage/combinat/binary_recurrence_sequences.py index 4dd28d897fe..ecfcc2ccd4e 100644 --- a/src/sage/combinat/binary_recurrence_sequences.py +++ b/src/sage/combinat/binary_recurrence_sequences.py @@ -65,7 +65,11 @@ from sage.rings.finite_rings.integer_mod_ring import Integers from sage.rings.finite_rings.finite_field_constructor import GF from sage.rings.integer import Integer -from sage.arith.all import lcm, next_prime, is_prime, next_prime_power, legendre_symbol +from sage.arith.functions import lcm +from sage.arith.misc import next_prime +from sage.arith.misc import is_prime +from sage.arith.misc import next_prime_power +from sage.arith.misc import legendre_symbol from sage.functions.log import log from sage.misc.functional import sqrt diff --git a/src/sage/combinat/blob_algebra.py b/src/sage/combinat/blob_algebra.py index 5da88de497f..992cb461b63 100644 --- a/src/sage/combinat/blob_algebra.py +++ b/src/sage/combinat/blob_algebra.py @@ -24,7 +24,7 @@ #from sage.misc.inherit_comparison import InheritComparisonClasscallMetaclass from sage.misc.cachefunc import cached_method from sage.misc.misc import powerset -from sage.arith.all import binomial +from sage.arith.misc import binomial from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets from sage.categories.algebras import Algebras from sage.combinat.diagram_algebras import (TemperleyLiebDiagrams, diagram_latex, diff --git a/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py b/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py index d7c4d849e0c..246768ef1d7 100644 --- a/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py +++ b/src/sage/combinat/cluster_algebra_quiver/cluster_seed.py @@ -43,13 +43,13 @@ from sage.rings.fraction_field import FractionField from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.fraction_field_element import FractionFieldElement -from sage.sets.all import Set +from sage.sets.set import Set from sage.graphs.digraph import DiGraph from sage.combinat.cluster_algebra_quiver.quiver_mutation_type import QuiverMutationType_Irreducible, QuiverMutationType_Reducible from sage.combinat.cluster_algebra_quiver.mutation_type import is_mutation_finite from random import randint from sage.misc.misc_c import prod -from sage.matrix.all import identity_matrix +from sage.matrix.special import identity_matrix from sage.matrix.constructor import matrix from sage.combinat.cluster_algebra_quiver.quiver import ClusterQuiver from sage.rings.integer import Integer @@ -3110,7 +3110,7 @@ def principal_extension(self): sage: T2 == T True """ - from sage.matrix.all import identity_matrix + from sage.matrix.special import identity_matrix if self._m != 0: raise ValueError("the b-matrix is not square") M = self._M.stack(identity_matrix(self._n)) @@ -4600,7 +4600,7 @@ def _bino(n, k): 0 """ if n >= 0: - from sage.arith.all import binomial + from sage.arith.misc import binomial return binomial(n, k) else: return 0 diff --git a/src/sage/combinat/cluster_algebra_quiver/quiver.py b/src/sage/combinat/cluster_algebra_quiver/quiver.py index 8808c9f2053..52156babeb2 100644 --- a/src/sage/combinat/cluster_algebra_quiver/quiver.py +++ b/src/sage/combinat/cluster_algebra_quiver/quiver.py @@ -558,7 +558,9 @@ def plot(self, circular=True, center=(0, 0), directed=True, mark=None, """ from sage.plot.colors import rainbow from sage.graphs.graph_generators import GraphGenerators - from sage.all import e, pi, I + from sage.symbolic.constants import e + from sage.symbolic.constants import pi + from sage.rings.imaginary_unit import I graphs = GraphGenerators() # returns positions for graph vertices on two concentric cycles with radius 1 and 2 diff --git a/src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py b/src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py index 80e66662a2e..59ebbfc9c07 100644 --- a/src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py +++ b/src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py @@ -27,7 +27,8 @@ from sage.rings.infinity import infinity from sage.graphs.digraph import DiGraph from sage.graphs.graph import Graph -from sage.arith.all import binomial, euler_phi +from sage.arith.misc import binomial +from sage.arith.misc import euler_phi from sage.misc.misc_c import prod from sage.matrix.constructor import matrix diff --git a/src/sage/combinat/combinat.py b/src/sage/combinat/combinat.py index e5ad98ea4ab..fb125cf49aa 100644 --- a/src/sage/combinat/combinat.py +++ b/src/sage/combinat/combinat.py @@ -171,7 +171,8 @@ from sage.rings.rational_field import QQ from sage.rings.integer import Integer from sage.rings.infinity import infinity -from sage.arith.all import bernoulli, factorial +from sage.arith.misc import bernoulli +from sage.arith.misc import factorial from sage.rings.polynomial.polynomial_element import Polynomial from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.libs.pari.all import pari diff --git a/src/sage/combinat/combination.py b/src/sage/combinat/combination.py index 810e55308ec..42e727c6877 100644 --- a/src/sage/combinat/combination.py +++ b/src/sage/combinat/combination.py @@ -28,7 +28,7 @@ from sage.rings.integer import Integer from sage.rings.integer_ring import ZZ -from sage.arith.all import binomial +from sage.arith.misc import binomial from .integer_vector import IntegerVectors from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets from sage.structure.parent import Parent diff --git a/src/sage/combinat/composition_signed.py b/src/sage/combinat/composition_signed.py index 8d8b78bcd59..17e26066e95 100644 --- a/src/sage/combinat/composition_signed.py +++ b/src/sage/combinat/composition_signed.py @@ -20,7 +20,7 @@ from sage.rings.integer_ring import ZZ from .composition import Compositions_n, Composition from sage.rings.integer import Integer -from sage.arith.all import binomial +from sage.arith.misc import binomial class SignedCompositions(Compositions_n): diff --git a/src/sage/combinat/crystals/alcove_path.py b/src/sage/combinat/crystals/alcove_path.py index fdc06a06d25..2bbe8592cd4 100644 --- a/src/sage/combinat/crystals/alcove_path.py +++ b/src/sage/combinat/crystals/alcove_path.py @@ -31,7 +31,7 @@ from sage.graphs.digraph import DiGraph from sage.combinat.root_system.cartan_type import CartanType from sage.combinat.root_system.root_system import RootSystem -from sage.all import vector +from sage.modules.free_module_element import free_module_element as vector from sage.rings.integer import Integer from sage.combinat.root_system.weyl_group import WeylGroup from sage.misc.misc_c import prod diff --git a/src/sage/combinat/cyclic_sieving_phenomenon.py b/src/sage/combinat/cyclic_sieving_phenomenon.py index e654a8fc94a..d09168791cb 100644 --- a/src/sage/combinat/cyclic_sieving_phenomenon.py +++ b/src/sage/combinat/cyclic_sieving_phenomenon.py @@ -26,7 +26,7 @@ # **************************************************************************** from __future__ import annotations from sage.rings.integer_ring import ZZ -from sage.arith.all import lcm +from sage.arith.functions import lcm from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing diff --git a/src/sage/combinat/decorated_permutation.py b/src/sage/combinat/decorated_permutation.py index 44ebba094b4..7845749177c 100644 --- a/src/sage/combinat/decorated_permutation.py +++ b/src/sage/combinat/decorated_permutation.py @@ -24,7 +24,7 @@ from sage.structure.unique_representation import UniqueRepresentation from sage.structure.parent import Parent from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets -from sage.arith.all import factorial +from sage.arith.misc import factorial from sage.rings.integer import Integer from sage.combinat.permutation import Permutations from sage.combinat.subset import Subsets diff --git a/src/sage/combinat/descent_algebra.py b/src/sage/combinat/descent_algebra.py index 3707a258e47..d40fb7ea25e 100644 --- a/src/sage/combinat/descent_algebra.py +++ b/src/sage/combinat/descent_algebra.py @@ -19,7 +19,7 @@ from sage.structure.unique_representation import UniqueRepresentation from sage.categories.algebras import Algebras from sage.categories.realizations import Realizations, Category_realization_of_parent -from sage.categories.all import FiniteDimensionalAlgebrasWithBasis +from sage.categories.finite_dimensional_algebras_with_basis import FiniteDimensionalAlgebrasWithBasis from sage.rings.integer_ring import ZZ from sage.rings.rational_field import QQ from sage.arith.misc import factorial diff --git a/src/sage/combinat/designs/bibd.py b/src/sage/combinat/designs/bibd.py index 72be454ec63..996ab02a584 100644 --- a/src/sage/combinat/designs/bibd.py +++ b/src/sage/combinat/designs/bibd.py @@ -53,7 +53,8 @@ from sage.categories.sets_cat import EmptySetError from sage.misc.unknown import Unknown from .design_catalog import transversal_design # type:ignore -from sage.arith.all import binomial, is_prime_power +from sage.arith.misc import binomial +from sage.arith.misc import is_prime_power from .group_divisible_designs import GroupDivisibleDesign from .designs_pyx import is_pairwise_balanced_design diff --git a/src/sage/combinat/designs/block_design.py b/src/sage/combinat/designs/block_design.py index abdaca1e17b..884cafd003e 100644 --- a/src/sage/combinat/designs/block_design.py +++ b/src/sage/combinat/designs/block_design.py @@ -55,7 +55,9 @@ from sage.modules.free_module import VectorSpace from sage.rings.integer import Integer from sage.rings.integer_ring import ZZ -from sage.arith.all import binomial, integer_floor, is_prime_power +from sage.arith.misc import binomial +from sage.arith.misc import integer_floor +from sage.arith.misc import is_prime_power from .incidence_structures import IncidenceStructure from sage.rings.finite_rings.finite_field_constructor import FiniteField from sage.categories.sets_cat import EmptySetError diff --git a/src/sage/combinat/designs/covering_design.py b/src/sage/combinat/designs/covering_design.py index 1c0dfa47628..d87ddc6dfbd 100644 --- a/src/sage/combinat/designs/covering_design.py +++ b/src/sage/combinat/designs/covering_design.py @@ -51,7 +51,7 @@ from sage.misc.sage_eval import sage_eval from sage.structure.sage_object import SageObject from sage.rings.rational import Rational -from sage.arith.all import binomial +from sage.arith.misc import binomial from sage.combinat.combination import Combinations from sage.combinat.designs.incidence_structures import IncidenceStructure from sage.cpython.string import bytes_to_str diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index 8846dcd06bc..ed9bb493616 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -1268,8 +1268,8 @@ def turyn_1965_3x3xK(k=4): def _is_periodic_sequence(seq, period): r"""Check if the sequence is periodic with correct period. - - The sequence should have length at least twice the period, so that + + The sequence should have length at least twice the period, so that periodicity can be checked. INPUT: @@ -1280,7 +1280,7 @@ def _is_periodic_sequence(seq, period): EXAMPLES:: - sage: from sage.combinat.designs.difference_family import _is_periodic_sequence + sage: from sage.combinat.designs.difference_family import _is_periodic_sequence sage: _is_periodic_sequence([0, 1, 2, 3, 0, 1, 2, 3], 4) True sage: _is_periodic_sequence([0, 1, 0, 1, 0, 1, 0, 1], 4) @@ -1304,18 +1304,18 @@ def _is_periodic_sequence(seq, period): return True def _create_m_sequence(q, n, check=True): - r"""Create an m-sequence over GF(q) with period `q^n-1`. - + r"""Create an m-sequence over GF(q) with period `q^n-1`. + Given a prime power `q`, the m-sequence is created as described by [Zie1959]_ from a primitive function over the finite field `GF(q)`. - Given a primitive function `f=c_0+c_1x+...+c_nx^n` over `K=GF(q)` of degree `n`, + Given a primitive function `f=c_0+c_1x+...+c_nx^n` over `K=GF(q)` of degree `n`, the recurrence is given by: `a_i = -c_0^{-1}(c_1a_{i-1}+...+c_na{i-n})`. The first `n` elements will be `0,0,...,0,1` and these will give a maximal length recurrence sequence as shown in [Mit2008]_. INPUT: - + - ``q`` -- a prime power. - ``n`` -- a nonnegative number. @@ -1344,18 +1344,18 @@ def _create_m_sequence(q, n, check=True): raise ValueError('n cannot be negative') K = GF(q, 'a') - + T = PolynomialRing(K, 'x') primitive = T.irreducible_element(n, algorithm='random') while not primitive.is_primitive(): primitive = T.irreducible_element(n, algorithm='random') coeffs = primitive.coefficients() exps = primitive.exponents() - + period = q**n - 1 seq_len = period*2 if check else period seq = [1]+[0]*(n-1) - + while len(seq) < seq_len: nxt = 0 for i, coeff in zip(exps[1:], coeffs[1:]): @@ -1368,14 +1368,14 @@ def _create_m_sequence(q, n, check=True): def _get_submodule_of_order(G, order): r"""Construct a submodule of the given order from group `G`. - + This method tries to construct submodules from various elements of `G` until - a submodule of the correct order is found. - + a submodule of the correct order is found. + INPUT: - + - ``G`` -- an additive abelian group. - + - ``order`` -- integer, the order of the desired syubmodule. TESTS: @@ -1396,9 +1396,9 @@ def _get_submodule_of_order(G, order): def relative_difference_set_from_m_sequence(q, N, check=True): r"""Construct `R((q^N-1)/(q-1), q-1, q^{N-1}, q^{N-2})` where `q` is a prime power and `N\ge 2`. - + The relative difference set is constructed over the set of additive integers modulo `q^N-1`, - as described in Theorem 5.1 of [EB1966]_. Given an m-sequence `(a_i)` of period `q^N-1`, the + as described in Theorem 5.1 of [EB1966]_. Given an m-sequence `(a_i)` of period `q^N-1`, the set is: `R=\{i | 0 \le i \le q^{N-1}, a_i=1\}`. INPUT: @@ -1412,7 +1412,7 @@ def relative_difference_set_from_m_sequence(q, N, check=True): EXAMPLES:: - sage: from sage.combinat.designs.difference_family import relative_difference_set_from_m_sequence + sage: from sage.combinat.designs.difference_family import relative_difference_set_from_m_sequence sage: relative_difference_set_from_m_sequence(2, 4) #random [(0), (4), (5), (6), (7), (9), (11), (12)] sage: relative_difference_set_from_m_sequence(8, 2, check=False) #random @@ -1446,7 +1446,7 @@ def relative_difference_set_from_m_sequence(q, N, check=True): m_seq = _create_m_sequence(q, N, check=False) period = q**N-1 G = AdditiveAbelianGroup([period]) - + set1 = [i for i in G if m_seq[i[0]] == 1] if check: @@ -1524,9 +1524,9 @@ def relative_difference_set_from_homomorphism(q, N, d, check=True): def is_relative_difference_set(R, G, H, params, verbose =False): r"""Check if `R` is a difference set of `G` relative to `H`, with the given parameters. - This function checks that `G`, `H` and `R` have the orders specified in the parameters, and + This function checks that `G`, `H` and `R` have the orders specified in the parameters, and that `R` satisfies the definition of relative difference set (from [EB1966]_): the collection of - differences `r-s`, `r,s \in R`, `r \neq s` contains only elements of `G` which are not in `H`, and contains + differences `r-s`, `r,s \in R`, `r \neq s` contains only elements of `G` which are not in `H`, and contains every such element exactly `d` times. INPUT: @@ -1562,33 +1562,33 @@ def is_relative_difference_set(R, G, H, params, verbose =False): """ m, n, k, d = params if G.order() != m*n: - if verbose: + if verbose: print('Incorrect order of G:', G.order()) return False if H.order() != n: - if verbose: + if verbose: print('Incorect order of H:', H.order()) if len(R) != k: - if verbose: + if verbose: print('Length of R not correct:', len(R)) return False - + diff_set = {} for el1 in R: for el2 in R: if el1 != el2: idx = el1-el2 - if idx not in diff_set: + if idx not in diff_set: diff_set[idx] = 0 diff_set[idx] += 1 values = [diff_set[x] for x in diff_set] if max(values) != d or min(values) != d: - if verbose: + if verbose: print('There is a value in the difference set which is not repeated d times') return False - + for el in G: if el in H and el in diff_set: if verbose: @@ -1603,8 +1603,8 @@ def is_relative_difference_set(R, G, H, params, verbose =False): def is_supplementary_difference_set(Ks, v, lmbda): r"""Check that the sets in ``Ks`` are `n-\{v; k_1,...,k_n; \lambda \}` supplementary difference sets. - - From the definition in [Spe1975]_: let `S_1, S_2, ..., S_n` be `n` subsets of an additive abelian group `G` of order `v` + + From the definition in [Spe1975]_: let `S_1, S_2, ..., S_n` be `n` subsets of an additive abelian group `G` of order `v` such that `|S_i|= k_i`. If, for each `g\in G`, `g \neq 0`, the total number of solutions of `a_i-a'_i = g`, with `a_i,a'_i \in S_i` is `\lambda`, then `S_1, S_2, ..., S_n` are `n-\{v; k_1,...,k_n;\lambda\}` supplementary difference sets. @@ -1617,7 +1617,7 @@ def is_supplementary_difference_set(Ks, v, lmbda): - ``lmbda`` -- integer, the parameter `\lambda` of the supplementary difference sets. EXAMPLES:: - + sage: from sage.combinat.designs.difference_family import supplementary_difference_set, is_supplementary_difference_set sage: S1, S2, S3, S4 = supplementary_difference_set(17) sage: is_supplementary_difference_set([S1, S2, S3, S4], 16, 16) @@ -1639,7 +1639,7 @@ def is_supplementary_difference_set(Ks, v, lmbda): for el1 in K: for el2 in K: diff = G[el1]-G[el2] - + if diff not in differences_counter: differences_counter[diff] = 0 differences_counter[diff] += 1 @@ -1655,12 +1655,12 @@ def is_supplementary_difference_set(Ks, v, lmbda): def supplementary_difference_set(q, existence=False, check=True): r"""Construct `4-\{2v; v, v+1, v, v; 2v\}` supplementary difference sets where `q=2v+1`. - The sets are created from relative difference sets as detailed in Theorem 3.3 of [Spe1975]_. this construction + The sets are created from relative difference sets as detailed in Theorem 3.3 of [Spe1975]_. this construction requires that `q` is an odd prime power and that there exists `s \ge 0` such that `(q-(2^{s+1}+1))/2^{s+1}` is an odd prime power. - Note that the construction from [Spe1975]_ states that the resulting sets are `4-\{2v; v+1, v, v, v; 2v\}` - supplementary difference sets. However, the implementation of that construction returns + Note that the construction from [Spe1975]_ states that the resulting sets are `4-\{2v; v+1, v, v, v; 2v\}` + supplementary difference sets. However, the implementation of that construction returns `4-\{2v; v, v+1, v, v; 2v\}` supplementary difference sets. This is not important, since the supplementary difference sets are not ordered. @@ -1671,14 +1671,14 @@ def supplementary_difference_set(q, existence=False, check=True): - ``existence`` -- boolean (dafault False). If true, only check whether the supplementary difference sets can be constructed. - - ``check`` -- boolean (default True). If true, check that the sets are supplementary difference sets + - ``check`` -- boolean (default True). If true, check that the sets are supplementary difference sets before returning them. OUTPUT: - If ``existence`` is false, the function returns the 4 sets (containing integers), or raises an + If ``existence`` is false, the function returns the 4 sets (containing integers), or raises an error if ``q`` does not satify the constraints. - If ``existence`` is true, the function returns a boolean representing whether supplementary difference + If ``existence`` is true, the function returns a boolean representing whether supplementary difference sets can be constructed. EXAMPLES:: @@ -1691,7 +1691,7 @@ def supplementary_difference_set(q, existence=False, check=True): [0, 2, 6, 9, 11, 12, 13, 15]) If existence is ``True``, the function returns a boolean:: - + sage: supplementary_difference_set(7, existence=True) False sage: supplementary_difference_set(17, existence=True) @@ -1732,8 +1732,8 @@ def supplementary_difference_set(q, existence=False, check=True): if is_prime_power(prime_pow) and prime_pow % 2 == 1: m = (q - (2**(s+1) + 1)) // 2**(s+1) + 1 break - s += 1 - + s += 1 + if existence: return is_prime_power(q) and q % 2 == 1 and m != -1 @@ -1741,12 +1741,12 @@ def supplementary_difference_set(q, existence=False, check=True): raise ValueError('q must be an odd prime power') if m == -1: raise ValueError('There is no s for which m-1 is an odd prime power') - + set1 = relative_difference_set_from_homomorphism(m-1, 2, (m-2)//2, check=False) - + from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing P = PolynomialRing(ZZ, 'x') - + #Compute psi3, psi4 hall = 0 for d in set1: @@ -1755,7 +1755,7 @@ def supplementary_difference_set(q, existence=False, check=True): T_2m = 0 for i in range(2*m): T_2m += P.monomial(i) - + modulo = P.monomial(2*m)-1 diff = T_2m - (1+P.monomial(m))*hall @@ -1771,7 +1771,7 @@ def supplementary_difference_set(q, existence=False, check=True): for i in range(s): psi3 = (alfa3(P.monomial(2))+P.monomial(1)*alfa4(P.monomial(2))).mod(P.monomial(4*m)-1) psi4 = (alfa3(P.monomial(2)) + P.monomial(1)*(T_2m(P.monomial(2)) - alfa4(P.monomial(2)))).mod(P.monomial(4*m)-1) - + # Construction of psi1, psi2 set2 = relative_difference_set_from_m_sequence(q, 2, check=False) s3 = _get_fixed_relative_difference_set(set2) @@ -1782,7 +1782,7 @@ def supplementary_difference_set(q, existence=False, check=True): diff = (s3[i]-s3[j]) if diff%(q-1) == 0 and diff%(q**2-1) != 0: phi_exps.append(s3[i]) - + exps1 = [(x+1)//2 for x in phi_exps if x%2 == 1] exps2 = [x//2 for x in phi_exps if x%2 == 0] @@ -1824,14 +1824,14 @@ def _get_fixed_relative_difference_set(rel_diff_set, as_elements=False): of this set fixed by `q` (see Section 3 of [Spe1975]_). We say that a set is fixed by `t` if `\{td | d\in R\}= R`. - In addition, the set returned by this function will contain the element `0`. This is needed in the + In addition, the set returned by this function will contain the element `0`. This is needed in the construction of supplementary difference sets (see :func:`supplementary_difference_set`). INPUT: - + - ``rel_diff_set`` -- the relative difference set. - - ``as_elements`` -- boolean (default False). If true, the list returned will contain elements of the + - ``as_elements`` -- boolean (default False). If true, the list returned will contain elements of the abelian group (this may slow down the computation considerably). OUTPUT: @@ -1842,11 +1842,11 @@ def _get_fixed_relative_difference_set(rel_diff_set, as_elements=False): EXAMPLES:: - sage: from sage.combinat.designs.difference_family import relative_difference_set_from_m_sequence, _get_fixed_relative_difference_set + sage: from sage.combinat.designs.difference_family import relative_difference_set_from_m_sequence, _get_fixed_relative_difference_set sage: s1 = relative_difference_set_from_m_sequence(5, 2) sage: _get_fixed_relative_difference_set(s1) #random - [2, 10, 19, 23, 0] - + [2, 10, 19, 23, 0] + If ``as_elements`` is true, the reuslt will contain elements of the group:: sage: _get_fixed_relative_difference_set(s1, as_elements=True) #random @@ -1871,7 +1871,7 @@ def _get_fixed_relative_difference_set(rel_diff_set, as_elements=False): """ G = rel_diff_set[0].parent() q = len(rel_diff_set) - + s2 = None for el in G: fixed_set = [el+x for x in rel_diff_set] @@ -1894,20 +1894,20 @@ def _get_fixed_relative_difference_set(rel_diff_set, as_elements=False): def _is_fixed_relative_difference_set(R, q): r"""Check if the relative difference set `R` is fixed by `q`. - + A relative difference set `R` is fixed by `q` if `\{qd | d\in R\}= R` (see Section 3 of [Spe1975]_). INPUT: - ``R`` -- the relative difference sets, as a list containing elements of the abelian group. - - ``q`` -- an integer. + - ``q`` -- an integer. EXAMPLES:: sage: from sage.combinat.designs.difference_family import relative_difference_set_from_m_sequence, _get_fixed_relative_difference_set, _is_fixed_relative_difference_set sage: s1 = relative_difference_set_from_m_sequence(7, 2) - sage: s2 = _get_fixed_relative_difference_set(s1, as_elements=True) + sage: s2 = _get_fixed_relative_difference_set(s1, as_elements=True) sage: _is_fixed_relative_difference_set(s2, len(s2)) True sage: G = AdditiveAbelianGroup([15]) @@ -1918,7 +1918,7 @@ def _is_fixed_relative_difference_set(R, q): If the relative difference set does not contain elements of the group, the method returns false:: sage: s1 = relative_difference_set_from_m_sequence(7, 2) - sage: s2 = _get_fixed_relative_difference_set(s1, as_elements=False) + sage: s2 = _get_fixed_relative_difference_set(s1, as_elements=False) sage: _is_fixed_relative_difference_set(s2, len(s2)) False @@ -1927,18 +1927,18 @@ def _is_fixed_relative_difference_set(R, q): for el in R: if q*el not in R: return False - return True + return True def skew_supplementary_difference_set(n, existence=False, check=True): r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where `S_1` is skew and `n_1+n_2+n_3+n_4= n+\lambda`. - These sets are constructed from available data, as described in [Djo1994]_. The set `S_1 \subset G` is + These sets are constructed from available data, as described in [Djo1994]_. The set `S_1 \subset G` is always skew, i.e. `S_1 \cap (-S_1) = \emptyset` and `S_1 \cup (-S_1) = G\setminus\{0\}`. The data for `n = 103, 151` is taken from [Djo1994]_ and the data for `n = 67, 113, 127, 157, 163, 181, 241` is taken from [Djo1992]_. - + INPUT: - ``n`` -- integer, the parameter of the supplementary difference set. @@ -1946,14 +1946,14 @@ def skew_supplementary_difference_set(n, existence=False, check=True): - ``existence`` -- boolean (dafault False). If true, only check whether the supplementary difference sets can be constructed. - - ``check`` -- boolean (default True). If true, check that the sets are supplementary difference sets + - ``check`` -- boolean (default True). If true, check that the sets are supplementary difference sets with `S_1` skew before returning them. Setting this parameter to False may speed up the computation considerably. - + OUTPUT: - If ``existence`` is false, the function returns the 4 sets (containing integers modulo `n`), or raises an + If ``existence`` is false, the function returns the 4 sets (containing integers modulo `n`), or raises an error if data for the given ``n`` is not available. - If ``existence`` is true, the function returns a boolean representing whether skew supplementary difference + If ``existence`` is true, the function returns a boolean representing whether skew supplementary difference sets can be constructed. EXAMPLES:: @@ -1962,7 +1962,7 @@ def skew_supplementary_difference_set(n, existence=False, check=True): sage: S1, S2, S3, S4 = skew_supplementary_difference_set(103) If existence is ``True``, the function returns a boolean :: - + sage: skew_supplementary_difference_set(103, existence=True) True sage: skew_supplementary_difference_set(17, existence=True) @@ -1991,14 +1991,14 @@ def skew_supplementary_difference_set(n, existence=False, check=True): True """ - + indices = { 67: [[0,3,5,6,9,10,13,14,17,18,20], [0,2,4,9,11,12,13,16,19,21], [1,3,6,10,11,13,14,16,20,21], [2,4,6,8,9,11,14,17,19]], - 103: [[1,3,4,6,8,11,12,14,17,18,20,22,25,27,28,30,32], - [2,9,10,12,13,14,15,16,20,21,22,23,24,26,28,29,30], + 103: [[1,3,4,6,8,11,12,14,17,18,20,22,25,27,28,30,32], + [2,9,10,12,13,14,15,16,20,21,22,23,24,26,28,29,30], [0,1,2,3,4,11,12,13,16,17,19,20,21,24,25,26,28,30,31], [0,1,2,3,4,5,6,13,15,18,19,20,23,24,25,26,27,28,29,31]], 113: [[0,3,4,6,8,10,13,14], @@ -2064,13 +2064,13 @@ def generate_set(index_set, cosets): if existence: return n in indices - + if n not in indices: raise ValueError(f'Skew SDS of order {n} not yet implemented.') - + Z = Zmod(n) H = list(map(Z, H_db[n])) - + cosets = [] for el in cosets_gens[n]: even_coset = [] @@ -2080,7 +2080,7 @@ def generate_set(index_set, cosets): odd_coset.append(-x*el) cosets.append(even_coset) cosets.append(odd_coset) - + S1 = generate_set(indices[n][0], cosets) S2 = generate_set(indices[n][1], cosets) S3 = generate_set(indices[n][2], cosets) @@ -2090,16 +2090,16 @@ def generate_set(index_set, cosets): lmbda = len(S1)+len(S2)+len(S3)+len(S4) - n assert is_supplementary_difference_set([S1, S2, S3, S4], n, lmbda) assert _is_skew_set(S1, n) - + return S1, S2, S3, S4 def _is_skew_set(S, n): r"""Check if `S` is a skew set over the set of integers modulo `n`. - From [Djo1994]_, a set `S \subset G` (where `G` is a finite abelian group of order `n`) is of skew + From [Djo1994]_, a set `S \subset G` (where `G` is a finite abelian group of order `n`) is of skew type if `S_1 \cap (-S_1) = \emptyset` and `S_1 \cup (-S_1) = G\setminus \{0\}`. - INPUT: + INPUT: - ``S`` -- the set to be checked, containing integers modulo `n`. diff --git a/src/sage/combinat/designs/difference_matrices.py b/src/sage/combinat/designs/difference_matrices.py index 03aeb966af5..72b935e0f94 100644 --- a/src/sage/combinat/designs/difference_matrices.py +++ b/src/sage/combinat/designs/difference_matrices.py @@ -14,7 +14,8 @@ from sage.misc.cachefunc import cached_function from sage.categories.sets_cat import EmptySetError from sage.rings.finite_rings.finite_field_constructor import FiniteField -from sage.arith.all import is_prime_power, divisors +from sage.arith.misc import is_prime_power +from sage.arith.misc import divisors from .designs_pyx import is_difference_matrix from .database import DM as DM_constructions diff --git a/src/sage/combinat/designs/group_divisible_designs.py b/src/sage/combinat/designs/group_divisible_designs.py index 6bb032a793d..b6898358c45 100644 --- a/src/sage/combinat/designs/group_divisible_designs.py +++ b/src/sage/combinat/designs/group_divisible_designs.py @@ -31,7 +31,7 @@ # http://www.gnu.org/licenses/ #***************************************************************************** -from sage.arith.all import is_prime_power +from sage.arith.misc import is_prime_power from sage.misc.unknown import Unknown from .incidence_structures import IncidenceStructure diff --git a/src/sage/combinat/designs/incidence_structures.py b/src/sage/combinat/designs/incidence_structures.py index dfb6c90f652..774885a0363 100644 --- a/src/sage/combinat/designs/incidence_structures.py +++ b/src/sage/combinat/designs/incidence_structures.py @@ -1577,7 +1577,7 @@ def is_t_design(self, t=None, v=None, k=None, l=None, return_parameters=False): sage: I.is_t_design(return_parameters=True) (False, (0, 0, 0, 0)) """ - from sage.arith.all import binomial + from sage.arith.misc import binomial # Missing parameters ? if v is None: diff --git a/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py b/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py index 526487adb97..9716849b744 100644 --- a/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py +++ b/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py @@ -365,7 +365,7 @@ def OA_and_oval(q, *, solver=None, integrality_tolerance=1e-3): sage: _ = OA_and_oval """ - from sage.arith.all import is_prime_power + from sage.arith.misc import is_prime_power from sage.combinat.designs.block_design import projective_plane from .orthogonal_arrays import OA_relabel @@ -683,7 +683,7 @@ def thwart_lemma_3_5(k,n,m,a,b,c,d=0,complement=False,explain_construction=False Charles J.Colbourn, Jeffrey H. Dinitz, Mieczyslaw Wojtas. Designs, Codes and Cryptography 5, no. 3 (1995): 189-197. """ - from sage.arith.all import is_prime_power + from sage.arith.misc import is_prime_power from sage.rings.finite_rings.finite_field_constructor import FiniteField as GF if complement: @@ -797,7 +797,7 @@ def thwart_lemma_4_1(k,n,m,explain_construction=False): Canad. Math. Bull vol7 num.4 (1964) """ from sage.rings.finite_rings.finite_field_constructor import FiniteField - from sage.arith.all import is_prime_power + from sage.arith.misc import is_prime_power from .block_design import DesarguesianProjectivePlaneDesign from itertools import chain @@ -1387,7 +1387,7 @@ def brouwer_separable_design(k,t,q,x,check=False,verbose=False,explain_construct from sage.combinat.designs.orthogonal_arrays import OA_from_PBD from .difference_family import difference_family from .orthogonal_arrays import incomplete_orthogonal_array - from sage.arith.all import is_prime_power + from sage.arith.misc import is_prime_power if explain_construction: return ("Brouwer's separable design construction with t={},q={},x={} from:\n"+ diff --git a/src/sage/combinat/designs/orthogonal_arrays_find_recursive.pyx b/src/sage/combinat/designs/orthogonal_arrays_find_recursive.pyx index d1d4eb10828..3fee26e2a22 100644 --- a/src/sage/combinat/designs/orthogonal_arrays_find_recursive.pyx +++ b/src/sage/combinat/designs/orthogonal_arrays_find_recursive.pyx @@ -48,7 +48,7 @@ Functions from sage.misc.cachefunc import cached_function from .orthogonal_arrays import orthogonal_array from sage.rings.integer cimport Integer, smallInteger -from sage.arith.all import prime_powers +from sage.arith.misc import prime_powers @cached_function def find_recursive_construction(k, n): diff --git a/src/sage/combinat/designs/resolvable_bibd.py b/src/sage/combinat/designs/resolvable_bibd.py index 7085e2d9ab1..944a1b6d4a7 100644 --- a/src/sage/combinat/designs/resolvable_bibd.py +++ b/src/sage/combinat/designs/resolvable_bibd.py @@ -48,7 +48,7 @@ --------- """ from itertools import repeat -from sage.arith.all import is_prime_power +from sage.arith.misc import is_prime_power from sage.combinat.designs.bibd import BalancedIncompleteBlockDesign from sage.categories.sets_cat import EmptySetError from .bibd import balanced_incomplete_block_design diff --git a/src/sage/combinat/dyck_word.py b/src/sage/combinat/dyck_word.py index 78fc75dda53..db6ef33b337 100644 --- a/src/sage/combinat/dyck_word.py +++ b/src/sage/combinat/dyck_word.py @@ -89,7 +89,7 @@ from sage.structure.unique_representation import UniqueRepresentation from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets -from sage.categories.all import Posets +from sage.categories.posets import Posets from sage.rings.integer_ring import ZZ from sage.rings.rational_field import QQ @@ -1978,7 +1978,7 @@ def number_of_parking_functions(self) -> int: sage: DyckWord(area_sequence=[0,0,0]).number_of_parking_functions() 6 """ - from sage.arith.all import multinomial + from sage.arith.misc import multinomial return multinomial(self.rise_composition()) def list_parking_functions(self): @@ -3774,7 +3774,7 @@ def cardinality(self) -> int: ....: for p in range(7)) True """ - from sage.arith.all import binomial + from sage.arith.misc import binomial return (self.k1 - self.k2 + 1) * binomial(self.k1 + self.k2, self.k2) // (self.k1 + 1) ################################################################ diff --git a/src/sage/combinat/free_module.py b/src/sage/combinat/free_module.py index d6042d6facc..9d4be0317c7 100644 --- a/src/sage/combinat/free_module.py +++ b/src/sage/combinat/free_module.py @@ -24,7 +24,10 @@ from sage.misc.cachefunc import cached_method from sage.misc.lazy_attribute import lazy_attribute from sage.categories.morphism import SetMorphism -from sage.categories.all import Category, Sets, ModulesWithBasis, GradedAlgebrasWithBasis +from sage.categories.category import Category +from sage.categories.sets_cat import Sets +from sage.categories.modules_with_basis import ModulesWithBasis +from sage.categories.graded_algebras_with_basis import GradedAlgebrasWithBasis from sage.categories.tensor import tensor import sage.data_structures.blas_dict as blas from sage.typeset.ascii_art import AsciiArt, ascii_art diff --git a/src/sage/combinat/fully_packed_loop.py b/src/sage/combinat/fully_packed_loop.py index 81eb5131349..4156e10c350 100644 --- a/src/sage/combinat/fully_packed_loop.py +++ b/src/sage/combinat/fully_packed_loop.py @@ -38,7 +38,7 @@ from sage.misc.decorators import options from sage.matrix.constructor import matrix -from sage.arith.all import factorial +from sage.arith.misc import factorial from sage.rings.integer import Integer from sage.misc.misc_c import prod diff --git a/src/sage/combinat/integer_vector.py b/src/sage/combinat/integer_vector.py index 2b88a6e3e1e..1a4f015adc4 100644 --- a/src/sage/combinat/integer_vector.py +++ b/src/sage/combinat/integer_vector.py @@ -42,7 +42,7 @@ from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets from sage.rings.infinity import PlusInfinity -from sage.arith.all import binomial +from sage.arith.misc import binomial from sage.rings.integer_ring import ZZ from sage.rings.semirings.non_negative_integer_semiring import NN from sage.rings.integer import Integer diff --git a/src/sage/combinat/integer_vector_weighted.py b/src/sage/combinat/integer_vector_weighted.py index 1c2c109217c..6cde208ea19 100644 --- a/src/sage/combinat/integer_vector_weighted.py +++ b/src/sage/combinat/integer_vector_weighted.py @@ -281,7 +281,8 @@ def __init__(self, weight): sage: TestSuite(C).run() """ self._weights = weight - from sage.sets.all import Family, NonNegativeIntegers + from sage.sets.family import Family + from sage.sets.non_negative_integers import NonNegativeIntegers # Use "partial" to make the basis function (with the weights # argument specified) pickleable. Otherwise, it seems to # cause problems... diff --git a/src/sage/combinat/interval_posets.py b/src/sage/combinat/interval_posets.py index 7ccede75e8b..6e56d2248fa 100644 --- a/src/sage/combinat/interval_posets.py +++ b/src/sage/combinat/interval_posets.py @@ -36,7 +36,7 @@ from sage.categories.enumerated_sets import EnumeratedSets from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets from sage.categories.posets import Posets -from sage.categories.all import Monoids +from sage.categories.monoids import Monoids from sage.combinat.posets.posets import Poset, FinitePoset from sage.categories.finite_posets import FinitePosets from sage.combinat.binary_tree import BinaryTrees @@ -3707,7 +3707,7 @@ def cardinality(self) -> Integer: sage: [TamariIntervalPosets(i).cardinality() for i in range(6)] [1, 1, 3, 13, 68, 399] """ - from sage.arith.all import binomial + from sage.arith.misc import binomial n = self._size if n == 0: return Integer(1) diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 74cd1a3bb32..4b6ddf75321 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -59,7 +59,9 @@ from sage.rings.integer_ring import ZZ from sage.matrix.constructor import matrix, block_matrix, block_diagonal_matrix, diagonal_matrix -from sage.arith.all import is_square, is_prime_power, divisors +from sage.arith.misc import is_square +from sage.arith.misc import is_prime_power +from sage.arith.misc import divisors from math import sqrt from sage.matrix.constructor import identity_matrix as I from sage.matrix.constructor import ones_matrix as J @@ -1100,8 +1102,8 @@ def turyn_type_hadamard_matrix_smallcases(n, existence=False, check=True): def hadamard_matrix_spence_construction(n, existence=False, check=True): r"""Create an Hadamard matrix of order `n` using Spence construction. - This construction (detailed in [Spe1975]_), uses supplementary difference sets implemented in - :func:`sage.combinat.designs.difference_family.supplementary_difference_set` to create the + This construction (detailed in [Spe1975]_), uses supplementary difference sets implemented in + :func:`sage.combinat.designs.difference_family.supplementary_difference_set` to create the desired matrix. INPUT: @@ -1153,10 +1155,10 @@ def hadamard_matrix_spence_construction(n, existence=False, check=True): assert n%4 == 0 and n > 0 q = n//4 - - if existence: + + if existence: return supplementary_difference_set(q, existence=True) - + if not supplementary_difference_set(q, existence=True): raise ValueError(f'The order {n} is not covered by Spence construction.') @@ -1166,7 +1168,7 @@ def hadamard_matrix_spence_construction(n, existence=False, check=True): A2 = matrix.circulant([1 if j in S4 else -1 for j in range(q-1)]) A3 = matrix.circulant([1 if j in S3 else -1 for j in range(q-1)]) A4 = matrix.circulant([1 if j in S2 else -1 for j in range(q-1)]) - + P = matrix(ZZ, [[1 if (i + j)%(q-1) == 0 else 0 for i in range(1, q)] for j in range(1, q)]) e = matrix([1]*(q-1)) @@ -1928,9 +1930,9 @@ def GS_skew_hadamard_smallcases(n, existence=False, check=True): :func:`sage.combinat.matrices.hadamard_matrix.williamson_goethals_seidel_skew_hadamard_matrix` Matrices for `n=36` and `52` are given in [GS70s]_. Matrices for `n=92` are given in [Wall71]_. - - Additional data is obtained from skew supplementary difference sets contained in - :func:`sage.combinat.designs.difference_family.skew_supplementary_difference_set`, using the + + Additional data is obtained from skew supplementary difference sets contained in + :func:`sage.combinat.designs.difference_family.skew_supplementary_difference_set`, using the construction described in [Djo1992]_. INPUT: @@ -1979,7 +1981,7 @@ def pmtoZ(s): c = [1, 1,-1,-1,-1, 1,-1, 1,-1, 1,-1, 1, 1,-1, 1,-1, 1,-1, 1,-1,-1,-1, 1] d = [1,-1,-1,-1,-1, 1,-1,-1, 1,-1,-1, 1, 1,-1,-1, 1,-1,-1, 1,-1,-1,-1,-1] return WGS(a, b, c, d, check=check) - + if skew_supplementary_difference_set(n//4, existence=True): t = n//4 S1, S2, S3, S4 = skew_supplementary_difference_set(t, check=False) @@ -1988,7 +1990,7 @@ def pmtoZ(s): c = [-1 if i in S3 else 1 for i in range(t)] d = [-1 if i in S4 else 1 for i in range(t)] return WGS(a, b, c, d, check=check) - + return None _skew_had_cache={} diff --git a/src/sage/combinat/matrices/latin.py b/src/sage/combinat/matrices/latin.py index 82e6ff65311..e36edf0fc82 100644 --- a/src/sage/combinat/matrices/latin.py +++ b/src/sage/combinat/matrices/latin.py @@ -139,7 +139,7 @@ from sage.combinat.permutation import Permutation from sage.interfaces.gap import gap from sage.groups.perm_gps.permgroup import PermutationGroup -from sage.arith.all import is_prime +from sage.arith.misc import is_prime from sage.rings.finite_rings.finite_field_constructor import FiniteField from sage.misc.flatten import flatten diff --git a/src/sage/combinat/multiset_partition_into_sets_ordered.py b/src/sage/combinat/multiset_partition_into_sets_ordered.py index 8963ab00f0d..26e4bcb691c 100755 --- a/src/sage/combinat/multiset_partition_into_sets_ordered.py +++ b/src/sage/combinat/multiset_partition_into_sets_ordered.py @@ -81,7 +81,7 @@ from sage.rings.infinity import infinity from sage.rings.integer_ring import ZZ from sage.rings.power_series_ring import PowerSeriesRing -from sage.arith.all import binomial +from sage.arith.misc import binomial from sage.combinat.subset import Subsets_sk from sage.combinat.composition import Composition, Compositions, composition_iterator_fast diff --git a/src/sage/combinat/ncsf_qsym/generic_basis_code.py b/src/sage/combinat/ncsf_qsym/generic_basis_code.py index 87364ac04c6..1c0247ad9c9 100644 --- a/src/sage/combinat/ncsf_qsym/generic_basis_code.py +++ b/src/sage/combinat/ncsf_qsym/generic_basis_code.py @@ -34,7 +34,7 @@ from sage.combinat.partition import Partition from sage.combinat.permutation import Permutations from sage.rings.integer import Integer -from sage.categories.all import AlgebrasWithBasis +from sage.categories.algebras_with_basis import AlgebrasWithBasis from sage.misc.lazy_attribute import lazy_attribute from sage.misc.abstract_method import abstract_method from sage.categories.category_types import Category_over_base_ring diff --git a/src/sage/combinat/ncsf_qsym/ncsf.py b/src/sage/combinat/ncsf_qsym/ncsf.py index 7a53a902b94..40cd8b8e44a 100644 --- a/src/sage/combinat/ncsf_qsym/ncsf.py +++ b/src/sage/combinat/ncsf_qsym/ncsf.py @@ -2251,7 +2251,7 @@ def coproduct(self): From: Non-Commutative Symmetric Functions over the Rational Field in the Complete basis To: Non-Commutative Symmetric Functions over the Rational Field in the Complete basis # Non-Commutative Symmetric Functions over the Rational Field in the Complete basis """ - from sage.categories.all import tensor + from sage.categories.tensor import tensor if hasattr(self, "coproduct_on_generators"): return self.algebra_morphism(self.coproduct_on_generators, codomain = tensor([self, self])) else: @@ -2496,7 +2496,7 @@ def coproduct_on_generators(self, i): if i < 1: raise ValueError("Not a positive integer: {}".format(i)) x = self.algebra_generators()[i] - from sage.categories.all import tensor + from sage.categories.tensor import tensor return tensor([self.one(), x]) + tensor([x, self.one()]) class Ribbon(CombinatorialFreeModule, BindableClass): diff --git a/src/sage/combinat/ncsf_qsym/qsym.py b/src/sage/combinat/ncsf_qsym/qsym.py index 086b68c6175..9964996c453 100644 --- a/src/sage/combinat/ncsf_qsym/qsym.py +++ b/src/sage/combinat/ncsf_qsym/qsym.py @@ -3683,7 +3683,7 @@ def _precompute_M(self, n): M = self.realization_of().M() if l <= n: from sage.misc.cachefunc import cached_function - from sage.arith.all import gcd + from sage.arith.misc import GCD as gcd @cached_function def monolambda(I): diff --git a/src/sage/combinat/ncsym/bases.py b/src/sage/combinat/ncsym/bases.py index 6d8b1b86185..c1bd340a05c 100644 --- a/src/sage/combinat/ncsym/bases.py +++ b/src/sage/combinat/ncsym/bases.py @@ -18,7 +18,9 @@ from sage.misc.bindable_class import BindableClass from sage.categories.graded_hopf_algebras import GradedHopfAlgebras from sage.categories.realizations import Category_realization_of_parent -from sage.categories.all import ModulesWithBasis, tensor, Hom +from sage.categories.modules_with_basis import ModulesWithBasis +from sage.categories.tensor import tensor +from sage.categories.homset import Hom from sage.combinat.set_partition import SetPartition, SetPartitions from sage.combinat.free_module import CombinatorialFreeModule diff --git a/src/sage/combinat/necklace.py b/src/sage/combinat/necklace.py index a065cabdd2c..ef38833b29e 100644 --- a/src/sage/combinat/necklace.py +++ b/src/sage/combinat/necklace.py @@ -26,7 +26,10 @@ from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets from sage.structure.parent import Parent from sage.structure.unique_representation import UniqueRepresentation -from sage.arith.all import euler_phi, factorial, divisors, gcd +from sage.arith.misc import euler_phi +from sage.arith.misc import factorial +from sage.arith.misc import divisors +from sage.arith.misc import GCD as gcd from sage.rings.integer_ring import ZZ from sage.rings.integer import Integer from sage.misc.misc_c import prod diff --git a/src/sage/combinat/partition.py b/src/sage/combinat/partition.py index 423ea6a3730..367299a4e60 100644 --- a/src/sage/combinat/partition.py +++ b/src/sage/combinat/partition.py @@ -308,7 +308,8 @@ from sage.rings.integer_ring import ZZ from sage.rings.rational_field import QQ from sage.rings.semirings.non_negative_integer_semiring import NN -from sage.arith.all import factorial, gcd +from sage.arith.misc import factorial +from sage.arith.misc import GCD as gcd from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.integer import Integer from sage.rings.infinity import infinity @@ -326,7 +327,7 @@ from sage.combinat.combinatorial_map import combinatorial_map from sage.groups.perm_gps.permgroup import PermutationGroup from sage.graphs.dot2tex_utils import have_dot2tex -from sage.arith.all import binomial +from sage.arith.misc import binomial class Partition(CombinatorialElement): diff --git a/src/sage/combinat/partition_algebra.py b/src/sage/combinat/partition_algebra.py index 740482395b4..789a214f365 100644 --- a/src/sage/combinat/partition_algebra.py +++ b/src/sage/combinat/partition_algebra.py @@ -21,7 +21,8 @@ from sage.combinat.set_partition import SetPartition, SetPartitions, SetPartitions_set from sage.sets.set import Set, Set_generic from sage.graphs.graph import Graph -from sage.arith.all import factorial, binomial +from sage.arith.misc import factorial +from sage.arith.misc import binomial from .permutation import Permutations from sage.rings.integer_ring import ZZ from sage.rings.rational_field import QQ diff --git a/src/sage/combinat/path_tableaux/frieze.py b/src/sage/combinat/path_tableaux/frieze.py index da1d4205b00..ff034a12ea7 100644 --- a/src/sage/combinat/path_tableaux/frieze.py +++ b/src/sage/combinat/path_tableaux/frieze.py @@ -327,7 +327,7 @@ def triangulation(self): from sage.plot.line import line from sage.plot.text import text from sage.functions.trig import sin, cos - from sage.all import pi + from sage.symbolic.constants import pi G = Graphics() G.set_aspect_ratio(1.0) diff --git a/src/sage/combinat/permutation.py b/src/sage/combinat/permutation.py index 424ea7dd68b..38a8270d1ca 100644 --- a/src/sage/combinat/permutation.py +++ b/src/sage/combinat/permutation.py @@ -253,7 +253,8 @@ from sage.rings.integer import Integer from sage.rings.integer_ring import ZZ from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing -from sage.arith.all import factorial, multinomial +from sage.arith.misc import factorial +from sage.arith.misc import multinomial from sage.matrix.matrix_space import MatrixSpace from sage.combinat.tools import transitive_ideal from sage.combinat.composition import Composition diff --git a/src/sage/combinat/posets/hasse_diagram.py b/src/sage/combinat/posets/hasse_diagram.py index d857092f9c7..da265a33271 100644 --- a/src/sage/combinat/posets/hasse_diagram.py +++ b/src/sage/combinat/posets/hasse_diagram.py @@ -23,7 +23,7 @@ from sage.rings.finite_rings.finite_field_constructor import GF from sage.misc.lazy_attribute import lazy_attribute from sage.misc.cachefunc import cached_method -from sage.arith.all import binomial +from sage.arith.misc import binomial from sage.misc.rest_index_of_methods import gen_rest_table_index from sage.combinat.posets.hasse_cython import (moebius_matrix_fast, coxeter_matrix_fast, diff --git a/src/sage/combinat/posets/posets.py b/src/sage/combinat/posets/posets.py index 2836d59d960..fc0aa8b2b56 100644 --- a/src/sage/combinat/posets/posets.py +++ b/src/sage/combinat/posets/posets.py @@ -292,7 +292,7 @@ from sage.misc.cachefunc import cached_method from sage.misc.lazy_attribute import lazy_attribute from sage.misc.misc_c import prod -from sage.arith.all import binomial +from sage.arith.misc import binomial from sage.categories.category import Category from sage.categories.sets_cat import Sets from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets diff --git a/src/sage/combinat/rigged_configurations/kleber_tree.py b/src/sage/combinat/rigged_configurations/kleber_tree.py index df5db0f5fe8..983b8826b95 100644 --- a/src/sage/combinat/rigged_configurations/kleber_tree.py +++ b/src/sage/combinat/rigged_configurations/kleber_tree.py @@ -71,7 +71,7 @@ from sage.misc.cachefunc import cached_method from sage.misc.latex import latex from sage.misc.misc_c import prod -from sage.arith.all import binomial +from sage.arith.misc import binomial from sage.features import FeatureNotPresentError from sage.rings.integer import Integer diff --git a/src/sage/combinat/root_system/cartan_matrix.py b/src/sage/combinat/root_system/cartan_matrix.py index a4d66256bf5..c747f95b8a8 100644 --- a/src/sage/combinat/root_system/cartan_matrix.py +++ b/src/sage/combinat/root_system/cartan_matrix.py @@ -489,7 +489,7 @@ def symmetrizer(self): iset = self.index_set() # The result from is_symmetrizable needs to be scaled # to integer coefficients - from sage.arith.all import LCM + from sage.arith.functions import lcm as LCM from sage.rings.rational_field import QQ scalar = LCM([QQ(x).denominator() for x in sym]) return Family( {iset[i]: ZZ(val*scalar) for i, val in enumerate(sym)} ) diff --git a/src/sage/combinat/root_system/coxeter_type.py b/src/sage/combinat/root_system/coxeter_type.py index 9c10c3c04db..39fa6ca0d01 100644 --- a/src/sage/combinat/root_system/coxeter_type.py +++ b/src/sage/combinat/root_system/coxeter_type.py @@ -23,7 +23,7 @@ from sage.combinat.root_system.cartan_type import CartanType import sage.rings.abc from sage.matrix.args import SparseEntry -from sage.matrix.all import Matrix +from sage.matrix.constructor import Matrix from sage.symbolic.ring import SR from sage.structure.unique_representation import UniqueRepresentation from sage.structure.sage_object import SageObject diff --git a/src/sage/combinat/root_system/reflection_group_complex.py b/src/sage/combinat/root_system/reflection_group_complex.py index bebb3dc9f04..9687152e09a 100644 --- a/src/sage/combinat/root_system/reflection_group_complex.py +++ b/src/sage/combinat/root_system/reflection_group_complex.py @@ -207,7 +207,8 @@ from sage.groups.perm_gps.permgroup import PermutationGroup_generic from sage.rings.integer_ring import ZZ from sage.rings.rational_field import QQ -from sage.matrix.all import Matrix, identity_matrix +from sage.matrix.constructor import Matrix +from sage.matrix.special import identity_matrix from sage.structure.element import is_Matrix from sage.interfaces.gap3 import gap3 from sage.rings.universal_cyclotomic_field import E @@ -1548,7 +1549,7 @@ def cartan_matrix(self): if self.is_crystallographic(): from sage.combinat.root_system.cartan_matrix import CartanMatrix as CartanMat else: - from sage.matrix.all import Matrix as CartanMat + from sage.matrix.constructor import Matrix as CartanMat return CartanMat(self._gap_group.CartanMat().sage()) def invariant_form(self, brute_force=False): diff --git a/src/sage/combinat/root_system/reflection_group_element.pyx b/src/sage/combinat/root_system/reflection_group_element.pyx index b724132637b..4a537aa9d68 100644 --- a/src/sage/combinat/root_system/reflection_group_element.pyx +++ b/src/sage/combinat/root_system/reflection_group_element.pyx @@ -33,7 +33,8 @@ from sage.interfaces.gap3 import gap3 from sage.combinat.root_system.cartan_matrix import CartanMatrix from sage.misc.sage_eval import sage_eval from sage.combinat.root_system.reflection_group_c import reduced_word_c, reduce_in_coset -from sage.matrix.all import Matrix, identity_matrix +from sage.matrix.constructor import Matrix +from sage.matrix.special import identity_matrix cdef class ComplexReflectionGroupElement(PermutationGroupElement): diff --git a/src/sage/combinat/root_system/weyl_characters.py b/src/sage/combinat/root_system/weyl_characters.py index 17c84dfb8ce..32356dd6d24 100644 --- a/src/sage/combinat/root_system/weyl_characters.py +++ b/src/sage/combinat/root_system/weyl_characters.py @@ -10,7 +10,8 @@ # **************************************************************************** import sage.combinat.root_system.branching_rules -from sage.categories.all import Algebras, AlgebrasWithBasis +from sage.categories.algebras import Algebras +from sage.categories.algebras_with_basis import AlgebrasWithBasis from sage.combinat.free_module import CombinatorialFreeModule from sage.combinat.root_system.cartan_type import CartanType from sage.combinat.root_system.root_system import RootSystem diff --git a/src/sage/combinat/root_system/weyl_group.py b/src/sage/combinat/root_system/weyl_group.py index a8c13419c4b..3cad709aebb 100644 --- a/src/sage/combinat/root_system/weyl_group.py +++ b/src/sage/combinat/root_system/weyl_group.py @@ -53,7 +53,9 @@ from sage.combinat.root_system.root_lattice_realizations import RootLatticeRealizations from sage.structure.unique_representation import UniqueRepresentation from sage.structure.richcmp import richcmp, richcmp_not_equal -from sage.categories.all import WeylGroups, FiniteWeylGroups, AffineWeylGroups +from sage.categories.weyl_groups import WeylGroups +from sage.categories.finite_weyl_groups import FiniteWeylGroups +from sage.categories.affine_weyl_groups import AffineWeylGroups from sage.categories.permutation_groups import PermutationGroups from sage.sets.family import Family from sage.matrix.constructor import Matrix diff --git a/src/sage/combinat/schubert_polynomial.py b/src/sage/combinat/schubert_polynomial.py index 07d679ac65d..a6efb83a561 100644 --- a/src/sage/combinat/schubert_polynomial.py +++ b/src/sage/combinat/schubert_polynomial.py @@ -74,7 +74,7 @@ # https://www.gnu.org/licenses/ # **************************************************************************** from sage.combinat.free_module import CombinatorialFreeModule -from sage.categories.all import GradedAlgebrasWithBasis +from sage.categories.graded_algebras_with_basis import GradedAlgebrasWithBasis from sage.rings.integer import Integer from sage.rings.integer_ring import ZZ from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing diff --git a/src/sage/combinat/set_partition_ordered.py b/src/sage/combinat/set_partition_ordered.py index 62f59de06b4..3c6dcbb383c 100644 --- a/src/sage/combinat/set_partition_ordered.py +++ b/src/sage/combinat/set_partition_ordered.py @@ -24,7 +24,8 @@ # # https://www.gnu.org/licenses/ # **************************************************************************** -from sage.arith.all import factorial, multinomial +from sage.arith.misc import factorial +from sage.arith.misc import multinomial from sage.categories.cartesian_product import cartesian_product from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets diff --git a/src/sage/combinat/sf/character.py b/src/sage/combinat/sf/character.py index e5752c307eb..b57874ad832 100644 --- a/src/sage/combinat/sf/character.py +++ b/src/sage/combinat/sf/character.py @@ -31,7 +31,9 @@ from sage.misc.cachefunc import cached_method from sage.categories.homset import Hom from sage.categories.morphism import SetMorphism -from sage.arith.all import divisors, moebius, binomial +from sage.arith.misc import divisors +from sage.arith.misc import moebius +from sage.arith.misc import binomial from sage.rings.integer import Integer diff --git a/src/sage/combinat/sf/elementary.py b/src/sage/combinat/sf/elementary.py index 446acbf23a3..3ed3db345d5 100644 --- a/src/sage/combinat/sf/elementary.py +++ b/src/sage/combinat/sf/elementary.py @@ -20,7 +20,8 @@ from . import multiplicative, classical from sage.combinat.partition import Partition from sage.misc.misc_c import prod -from sage.arith.all import factorial, binomial +from sage.arith.misc import factorial +from sage.arith.misc import binomial from sage.rings.infinity import infinity ################################### diff --git a/src/sage/combinat/sf/homogeneous.py b/src/sage/combinat/sf/homogeneous.py index 3157a9bf0eb..42c6aeb55ad 100644 --- a/src/sage/combinat/sf/homogeneous.py +++ b/src/sage/combinat/sf/homogeneous.py @@ -29,7 +29,8 @@ from sage.combinat.partition import Partition from sage.rings.infinity import infinity from sage.misc.misc_c import prod -from sage.arith.all import factorial, binomial +from sage.arith.misc import factorial +from sage.arith.misc import binomial class SymmetricFunctionAlgebra_homogeneous(multiplicative.SymmetricFunctionAlgebra_multiplicative): diff --git a/src/sage/combinat/sf/jack.py b/src/sage/combinat/sf/jack.py index c46c78afefe..233471d1b7e 100644 --- a/src/sage/combinat/sf/jack.py +++ b/src/sage/combinat/sf/jack.py @@ -33,7 +33,8 @@ import sage.categories.all from sage.rings.integer import Integer from sage.rings.rational_field import QQ -from sage.arith.all import gcd, lcm +from sage.arith.misc import GCD as gcd +from sage.arith.functions import lcm from sage.rings.fraction_field import is_FractionField from sage.misc.misc_c import prod from sage.categories.morphism import SetMorphism diff --git a/src/sage/combinat/sf/k_dual.py b/src/sage/combinat/sf/k_dual.py index 425af1bc96f..0828cb636d3 100644 --- a/src/sage/combinat/sf/k_dual.py +++ b/src/sage/combinat/sf/k_dual.py @@ -31,7 +31,7 @@ from sage.structure.parent import Parent from sage.structure.unique_representation import UniqueRepresentation -from sage.categories.all import GradedHopfAlgebras +from sage.categories.graded_hopf_algebras import GradedHopfAlgebras from sage.combinat.partition import Partition, Partitions, Partitions_all_bounded, PartitionsGreatestLE from sage.combinat.free_module import CombinatorialFreeModule from sage.categories.realizations import Realizations, Category_realization_of_parent diff --git a/src/sage/combinat/sf/macdonald.py b/src/sage/combinat/sf/macdonald.py index d30339bc82d..8db4b595dae 100644 --- a/src/sage/combinat/sf/macdonald.py +++ b/src/sage/combinat/sf/macdonald.py @@ -53,7 +53,7 @@ from sage.categories.modules_with_basis import ModulesWithBasis from . import sfa from sage.combinat.partition import Partitions_n, _Partitions -from sage.matrix.all import MatrixSpace +from sage.matrix.matrix_space import MatrixSpace from sage.rings.rational_field import QQ from sage.misc.misc_c import prod from sage.misc.cachefunc import cached_function diff --git a/src/sage/combinat/sf/powersum.py b/src/sage/combinat/sf/powersum.py index f7019407840..4a960369214 100644 --- a/src/sage/combinat/sf/powersum.py +++ b/src/sage/combinat/sf/powersum.py @@ -19,7 +19,7 @@ #***************************************************************************** from . import sfa, multiplicative, classical from sage.combinat.partition import Partition -from sage.arith.all import divisors +from sage.arith.misc import divisors from sage.rings.infinity import infinity from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.misc.misc_c import prod diff --git a/src/sage/combinat/sf/sfa.py b/src/sage/combinat/sf/sfa.py index 040dd78f4d3..30a6086964d 100644 --- a/src/sage/combinat/sf/sfa.py +++ b/src/sage/combinat/sf/sfa.py @@ -1013,7 +1013,8 @@ def gessel_reutenauer(self, lam): m = lam.to_exp_dict() # == {i: m_i | i occurs in lam} p = self.realization_of().power() h = self.realization_of().complete() - from sage.arith.all import moebius, squarefree_divisors + from sage.arith.misc import moebius + from sage.arith.misc import squarefree_divisors mu = moebius def component(i, g): # == h_g[L_i] @@ -1802,7 +1803,7 @@ def __init__(self, Sym, basis_name=None, prefix=None, graded=True): sage: TestSuite(s).run() """ R = Sym.base_ring() - from sage.categories.all import CommutativeRings + from sage.categories.commutative_rings import CommutativeRings if R not in CommutativeRings(): raise TypeError("argument R must be a commutative ring") try: @@ -4707,7 +4708,8 @@ def arithmetic_product(self, x): parent = self.parent() if parent.has_coerce_map_from(QQ): from sage.combinat.partition import Partition - from sage.arith.all import gcd, lcm + from sage.arith.misc import GCD as gcd + from sage.arith.functions import lcm from itertools import product, repeat, chain p = parent.realization_of().power() diff --git a/src/sage/combinat/sf/witt.py b/src/sage/combinat/sf/witt.py index 2f942af97f3..51c9598d2e5 100644 --- a/src/sage/combinat/sf/witt.py +++ b/src/sage/combinat/sf/witt.py @@ -756,7 +756,7 @@ def _precompute_p(self, n): """ l = len(self._p_transition_matrices) if l <= n: - from sage.arith.all import divisors + from sage.arith.misc import divisors from sage.combinat.partition import Partition from sage.misc.cachefunc import cached_function @@ -1148,7 +1148,7 @@ def wsum(m): # expansion of h_m in w-basis, for m > 0 return result if parent_name == "powersum": - from sage.arith.all import divisors + from sage.arith.misc import divisors from sage.combinat.partition import Partition @cached_function diff --git a/src/sage/combinat/similarity_class_type.py b/src/sage/combinat/similarity_class_type.py index e7c3f972ac3..b2ca90a710b 100644 --- a/src/sage/combinat/similarity_class_type.py +++ b/src/sage/combinat/similarity_class_type.py @@ -191,7 +191,8 @@ class type, it is also possible to compute the number of classes of that type from itertools import chain, product from sage.misc.misc_c import prod from sage.arith.misc import factorial -from sage.arith.all import moebius, divisors +from sage.arith.misc import moebius +from sage.arith.misc import divisors from sage.misc.inherit_comparison import InheritComparisonClasscallMetaclass from sage.structure.element import Element, is_Matrix from sage.structure.parent import Parent diff --git a/src/sage/combinat/skew_tableau.py b/src/sage/combinat/skew_tableau.py index 3eeae3d8d56..43b34b2b008 100644 --- a/src/sage/combinat/skew_tableau.py +++ b/src/sage/combinat/skew_tableau.py @@ -36,9 +36,9 @@ from sage.rings.integer import Integer from sage.rings.integer_ring import ZZ from sage.rings.rational_field import QQ -from sage.arith.all import factorial +from sage.arith.misc import factorial from sage.rings.infinity import PlusInfinity -from sage.matrix.all import zero_matrix +from sage.matrix.special import zero_matrix from sage.structure.list_clone import ClonableList from sage.combinat.partition import Partition diff --git a/src/sage/combinat/species/cycle_species.py b/src/sage/combinat/species/cycle_species.py index 7878a028265..fe5ee4a9f94 100644 --- a/src/sage/combinat/species/cycle_species.py +++ b/src/sage/combinat/species/cycle_species.py @@ -15,7 +15,8 @@ from .species import GenericCombinatorialSpecies from .structure import GenericSpeciesStructure from sage.structure.unique_representation import UniqueRepresentation -from sage.arith.all import divisors, euler_phi +from sage.arith.misc import divisors +from sage.arith.misc import euler_phi from sage.combinat.species.misc import accept_size class CycleSpeciesStructure(GenericSpeciesStructure): diff --git a/src/sage/combinat/species/generating_series.py b/src/sage/combinat/species/generating_series.py index c6c30f301b6..a893e011171 100644 --- a/src/sage/combinat/species/generating_series.py +++ b/src/sage/combinat/species/generating_series.py @@ -53,7 +53,7 @@ from sage.rings.lazy_series_ring import LazyPowerSeriesRing, LazySymmetricFunctions from sage.rings.integer import Integer from sage.rings.rational_field import QQ -from sage.arith.all import divisors +from sage.arith.misc import divisors from sage.combinat.partition import Partition, Partitions from sage.combinat.sf.sf import SymmetricFunctions from sage.misc.cachefunc import cached_function diff --git a/src/sage/combinat/subset.py b/src/sage/combinat/subset.py index 5f3d481de68..b44051020b9 100644 --- a/src/sage/combinat/subset.py +++ b/src/sage/combinat/subset.py @@ -38,7 +38,7 @@ from sage.structure.element import Element from sage.sets.set import Set, Set_object_enumerated -from sage.arith.all import binomial +from sage.arith.misc import binomial from sage.misc.misc import _stable_uniq as uniq from sage.rings.integer_ring import ZZ from sage.rings.integer import Integer @@ -1059,7 +1059,7 @@ def cardinality(self): sage: len(S.list()) 24 """ - from sage.all import prod + from sage.misc.misc_c import prod return Integer(prod(k + 1 for k in self._d.values())) def random_element(self): diff --git a/src/sage/combinat/symmetric_group_algebra.py b/src/sage/combinat/symmetric_group_algebra.py index b8a0bebab44..2b7df01dd0a 100644 --- a/src/sage/combinat/symmetric_group_algebra.py +++ b/src/sage/combinat/symmetric_group_algebra.py @@ -21,7 +21,7 @@ from sage.categories.weyl_groups import WeylGroups from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.rational_field import QQ -from sage.arith.all import factorial +from sage.arith.misc import factorial from sage.matrix.constructor import matrix from sage.modules.free_module_element import vector from sage.groups.perm_gps.permgroup_element import PermutationGroupElement diff --git a/src/sage/combinat/t_sequences.py b/src/sage/combinat/t_sequences.py index fb20500ab28..883d55c87bd 100644 --- a/src/sage/combinat/t_sequences.py +++ b/src/sage/combinat/t_sequences.py @@ -1,17 +1,17 @@ r""" T-sequences -T-sequences are tuples of four (-1, 0, 1) sequences of length `t` where -for every `i` exactly one sequence has a nonzero entry at index `i` -and for which the nonperiodic autocorrelation function is equal to zero +T-sequences are tuples of four (-1, 0, 1) sequences of length `t` where +for every `i` exactly one sequence has a nonzero entry at index `i` +and for which the nonperiodic autocorrelation function is equal to zero (i.e. they are complementary). See Definition 7.5 of [Seb2017]_. -These can be constructed from Turyn sequences. In particular, +These can be constructed from Turyn sequences. In particular, if Turyn sequences of length `l` exists, there will be T-sequences of length `4l-1` and `2l-1`. Turyn sequences are tuples of four (-1, +1) sequences `X, U, Y, V` of length -`l`, `l`, `l-1`, `l-1` with nonperiodic autocorrelation equal to zero and +`l`, `l`, `l-1`, `l-1` with nonperiodic autocorrelation equal to zero and the additional constraints that: * the first element of `X` is 1 @@ -55,15 +55,15 @@ def _nonperiodic_autocorrelation(sequences, j): N_X(j) = \sum_{i=1}^{n-j}(a_{1,i}a_{1,i+j} + a_{2,i}a_{2,i+j} + ... + a_{n,i}a_{n,i+j}) INPUT: - + - ``sequences`` -- either a single sequence or a list of sequences for which we want to compute the nonperiodic autocorrelation. - + - ``j`` -- integer, the parameter `j` used when calculating the nonperiodic autocorrelation. """ if not isinstance(sequences[0], list): sequences = [sequences] - + t = len(sequences[0]) result = 0 for i in range(t-j): @@ -75,7 +75,7 @@ def is_skew(seq, verbose=False): r""" Check if the given sequence is skew. - A sequence `X=\{x_1, x_2, ...,x_n\}` is defined skew (according to Definition + A sequence `X=\{x_1, x_2, ...,x_n\}` is defined skew (according to Definition 7.4 of [Seb2017]_) if `n` is even and `x_i = -x_{n-i+1}`. INPUT: @@ -121,11 +121,11 @@ def is_symmetric(seq, verbose=False): r""" Check if the given sequence is symmetric. - A sequence `X=\{x_1, x_2, ...,x_n\}` is defined symmetric (according to Definition + A sequence `X=\{x_1, x_2, ...,x_n\}` is defined symmetric (according to Definition 7.4 of [Seb2017]_) if `n` is odd and `x_i = x_{n-i+1}`. INPUT: - + - ``seq`` -- the sequence that should be checked. - ``verbose`` -- a boolean (default false). If true the function will be verbose @@ -169,14 +169,14 @@ def is_T_sequences_set(sequences, verbose=False): Check if a family of sequences is composed of T-sequences. Given 4 (-1, 0, +1) sequences, they will be T-sequences if - (Definition 7.4 of [Seb2017]_): + (Definition 7.4 of [Seb2017]_): * they have all the same length `t` * for each index `i`, exactly one sequence is nonzero at `i` * the nonperiodic autocorrelation is equal to `0` INPUT: - + - ``sequences`` -- a list of four sequences. - ``verbose`` -- a boolean (default false). If true the function will be verbose @@ -214,10 +214,10 @@ def is_T_sequences_set(sequences, verbose=False): if verbose: print(f"T-Sequence should contain 4 sequences, found {len(sequences)} instead") return False - - + + t = len(sequences[0]) - + for i in range(t): tot = 0 for seq in sequences: @@ -230,11 +230,11 @@ def is_T_sequences_set(sequences, verbose=False): if verbose: print(f"There should be exactly a nonzero element at every index, found {tot} such elemnents at index {i}") return False - + for j in range(1, t): autocorr = _nonperiodic_autocorrelation(sequences, j) if autocorr != 0: - if verbose: + if verbose: print(f"Nonperiodic autocorrelation should always be zero, found {autocorr} for parameter {j}") return False @@ -250,7 +250,7 @@ def turyn_sequences_smallcases(l, existence=False): - ``l`` -- integer, the length of the Turyn sequences. - - ``existence`` -- boolean (default False). If true, only return whether the + - ``existence`` -- boolean (default False). If true, only return whether the Turyn sequences are available for the given length. EXAMPLES: @@ -283,7 +283,7 @@ def turyn_sequences_smallcases(l, existence=False): 6: [[1, 1, 1, -1, -1, -1], [1, 1, -1, 1, -1, 1], [1, 1, -1, 1, 1], [1, 1, -1, 1, 1]], 7: [[1, 1, 1, -1, 1, 1, 1], [1, 1, -1, -1, -1, 1, -1], [1, 1, -1, 1, -1, -1], [1, 1, -1, 1, -1, -1]], 8: [[1, 1, -1, 1, -1, 1, -1, -1], [1, 1, 1, 1, -1, -1, -1, 1], [1, 1, 1, -1, 1, 1, 1], [1, -1, -1, 1, -1, -1, 1]], - 13: [[1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1], [1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1], + 13: [[1, 1, 1, 1, -1, 1, -1, 1, -1, 1, 1, 1, 1], [1, 1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1], [1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, -1], [1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1]], 15: [[1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1], [1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, 1, -1], [1, 1, 1, 1, -1, -1, 1, -1, 1, 1, -1, -1, -1, -1], [1, -1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1]], @@ -358,13 +358,13 @@ def T_sequences_construction_from_base_sequences(base_sequences, check=True): def seq_sum(seq1, seq2): return [(a+b)//2 for (a, b) in zip(seq1, seq2)] - + def seq_subtract(seq1, seq2): return [(a-b)//2 for (a, b) in zip(seq1, seq2)] def zero_seq(n): return [0 for _ in range(n)] - + X1 = Sequence(seq_sum(A, B) + zero_seq(n)) X2 = Sequence(seq_subtract(A, B) + zero_seq(n)) X3 = Sequence(zero_seq(n+p) + seq_sum(C, D)) @@ -451,19 +451,19 @@ def T_sequences_smallcases(t, existence=False, check=True): r""" Construct T-sequences for some small values of `t`. - This method will try to use the constructions defined in - :func:`T_sequences_construction_from_base_sequences` and - :func:`T_sequences_construction_from_turyn_sequences` - together with the Turyn sequences stored in :func:`turyn_sequences_smallcases`, + This method will try to use the constructions defined in + :func:`T_sequences_construction_from_base_sequences` and + :func:`T_sequences_construction_from_turyn_sequences` + together with the Turyn sequences stored in :func:`turyn_sequences_smallcases`, or base sequences created by :func:`base_sequences_smallcases`. - + This function contains also some T-sequences taken directly from [CRSKKY1989]_. INPUT: - ``t`` -- integer, the length of the T-sequences to construct. - - ``existence`` -- boolean (default false). If true, this method only returns whether a T-sequences of + - ``existence`` -- boolean (default false). If true, this method only returns whether a T-sequences of the given size can be constructed. - ``check`` -- boolean, if true (default) check that the sequences are T-sequences before returning them. @@ -471,7 +471,7 @@ def T_sequences_smallcases(t, existence=False, check=True): EXAMPLES: By default, this method returns the four T-sequences :: - + sage: from sage.combinat.t_sequences import T_sequences_smallcases, is_T_sequences_set sage: T_sequences_smallcases(9) [[1, 1, 0, 1, 0, 0, 0, 0, 0], @@ -479,7 +479,7 @@ def T_sequences_smallcases(t, existence=False, check=True): [0, 0, 0, 0, 0, 1, 0, 0, -1], [0, 0, 0, 0, 0, 0, 1, -1, 0]] - If the existence flag is passed, the method returns a boolean :: + If the existence flag is passed, the method returns a boolean :: sage: T_sequences_smallcases(9, existence=True) True @@ -530,7 +530,7 @@ def T_sequences_smallcases(t, existence=False, check=True): return True turyn_seqs = turyn_sequences_smallcases((t+1)//2) return T_sequences_construction_from_base_sequences(turyn_seqs, check=check) - + if (t+1)%4 == 0 and turyn_sequences_smallcases((t+1)//4, existence=True): if existence: return True @@ -552,8 +552,8 @@ def T_sequences_smallcases(t, existence=False, check=True): def base_sequences_construction(turyn_type_seqs, check=True): r"""Construct base sequences of length `2n-1, 2n-1, n, n` from Turyn type sequences of length `n,n,n,n-1`. - - Given Turyn type sequences `X, Y, Z, W` of length `n,n,n,n-1`, Theorem 1 of [KTR2005]_ shows that the + + Given Turyn type sequences `X, Y, Z, W` of length `n,n,n,n-1`, Theorem 1 of [KTR2005]_ shows that the following are base sequences of length `2n-1, 2n-1, n, n`: .. MATH:: @@ -563,13 +563,13 @@ def base_sequences_construction(turyn_type_seqs, check=True): B &= Z; -W \\ C &= X \\ D &= Y - \end{aligned} + \end{aligned} INPUT: - ``turyn_type_seqs`` -- The list of 4 Turyn type sequences that should be used to construct the base sequences. - - ``check`` -- boolean, if True (default) check that the resulting sequences are base sequences + - ``check`` -- boolean, if True (default) check that the resulting sequences are base sequences before returning them. OUTPUT: A list containing the four base sequences. @@ -610,7 +610,7 @@ def base_sequences_construction(turyn_type_seqs, check=True): if check: assert is_base_sequences_tuple([A, B, C, D]) - return [A, B, C, D] + return [A, B, C, D] def is_base_sequences_tuple(base_sequences, verbose=False): @@ -621,7 +621,7 @@ def is_base_sequences_tuple(base_sequences, verbose=False): .. MATH:: - N_A(j)+N_B(j)+N_C(j)+N_D(j) = 0 + N_A(j)+N_B(j)+N_C(j)+N_D(j) = 0 where `N_X(j)` is the nonperiodic autocorrelation (See definition in [KTR2005]_). @@ -633,7 +633,7 @@ def is_base_sequences_tuple(base_sequences, verbose=False): when the sequences do not satisfy the contraints. EXAMPLES:: - + sage: from sage.combinat.t_sequences import is_base_sequences_tuple sage: seqs = [[1, -1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, 1, -1],[1, -1, -1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, -1, 1],[1, 1, -1, 1, -1, 1, -1, 1],[1, -1, -1, -1, -1, -1, -1, 1]] sage: is_base_sequences_tuple(seqs) @@ -647,7 +647,7 @@ def is_base_sequences_tuple(base_sequences, verbose=False): False TESTS: - + sage: seqs = [[1, -1], [1], [-1]] sage: is_base_sequences_tuple(seqs) False @@ -663,7 +663,7 @@ def is_base_sequences_tuple(base_sequences, verbose=False): .. SEEALSO:: - :func:`base_sequences_construction` + :func:`base_sequences_construction` """ if len(base_sequences) != 4: if verbose: @@ -676,19 +676,19 @@ def is_base_sequences_tuple(base_sequences, verbose=False): if verbose: print(f'Base sequences should have length n+p, n+p, n, n, found {len(A)}, {len(B)}, {len(C)}, {len(D)}') return False - + for seq in base_sequences: for el in seq: if abs(el) != 1: if verbose: print(f'Base sequences should only contiain -1, +1, found {el}') return False - + for j in range(1, n+p): - autocorr = _nonperiodic_autocorrelation(A, j) + _nonperiodic_autocorrelation(B, j) + _nonperiodic_autocorrelation(C, j) + _nonperiodic_autocorrelation(D, j) + autocorr = _nonperiodic_autocorrelation(A, j) + _nonperiodic_autocorrelation(B, j) + _nonperiodic_autocorrelation(C, j) + _nonperiodic_autocorrelation(D, j) if autocorr != 0: - if verbose: + if verbose: print(f"Nonperiodic autocorrelation should always be zero, found {autocorr} for parameter {j}") return False @@ -704,7 +704,7 @@ def turyn_type_sequences_smallcases(n, existence=False): - ``n`` -- integer, the length of the Turyn type sequences. - - ``existence`` -- boolean (default False). If true, only return whether the + - ``existence`` -- boolean (default False). If true, only return whether the Turyn type sequences are available for the given length. EXAMPLES: @@ -733,10 +733,10 @@ def turyn_type_sequences_smallcases(n, existence=False): The Turyn type sequences are stored in hexadecimal format. Given `n` hexadecimal digits `h_1, h_2,...,h_n`, it is possible to get the Turyn type sequences - by converting each `h_i` (`1 \le i \le n-1`) into a four digits binary number. Then, the j-th binary digit is + by converting each `h_i` (`1 \le i \le n-1`) into a four digits binary number. Then, the j-th binary digit is `0` if the i-th number in the j-th sequence is `1`, and it is `1` if the number in the sequence is -1. - For the n-th digit, it should be converted to a 3 digits binary number, and then the same mapping + For the n-th digit, it should be converted to a 3 digits binary number, and then the same mapping as before can be used (see also [BDKR2013]_). """ def convertLists(hexstring): @@ -755,7 +755,7 @@ def convertLists(hexstring): else: seqs[i].append(-1) return seqs - + db = { 2: '01', 4: '0161', @@ -781,17 +781,17 @@ def convertLists(hexstring): if n not in db: raise ValueError(f"Turyn type sequences of length {n} are not implemented yet.") - + return convertLists(db[n]) def base_sequences_smallcases(n, p, existence=False, check=True): r"""Construct base sequences of length `n+p, n+p, n, n` from available data. The function uses the construction :func:`base_sequences_construction`, together with - Turyn type sequences from :func:`turyn_type_sequences_smallcases` to construct base sequences + Turyn type sequences from :func:`turyn_type_sequences_smallcases` to construct base sequences with `p = n-1`. - Furthermore, this function uses also Turyn sequences (i.e. base sequences with `p=1`) from + Furthermore, this function uses also Turyn sequences (i.e. base sequences with `p=1`) from :func:`turyn_sequences_smallcases`. INPUT: @@ -803,13 +803,13 @@ def base_sequences_smallcases(n, p, existence=False, check=True): - ``existence`` -- boolean (default False). If True, the function will only check whether the base sequences can be constructed. - - ``check`` -- boolean, if True (default) check that the resulting sequences are base sequences + - ``check`` -- boolean, if True (default) check that the resulting sequences are base sequences before returning them. - OUTPUT: - + OUTPUT: + If ``existence`` is ``False``, the function returns a list containing the four base sequences, or raises - an error if the base sequences cannot be constructed. If ``existence`` is ``True``, the function returns a + an error if the base sequences cannot be constructed. If ``existence`` is ``True``, the function returns a boolean, which is ``True`` if the base sequences can be constructed and ``False`` otherwise. EXAMPLES:: @@ -843,9 +843,9 @@ def base_sequences_smallcases(n, p, existence=False, check=True): if existence: return p == n-1 and turyn_type_sequences_smallcases(n, existence=True) - + if p == n-1 and turyn_type_sequences_smallcases(n, existence=True): - if existence: + if existence: return True turyn_type_seqs = turyn_type_sequences_smallcases(n) return base_sequences_construction(turyn_type_seqs, check=check) @@ -853,5 +853,5 @@ def base_sequences_smallcases(n, p, existence=False, check=True): if existence: return True return turyn_sequences_smallcases(n+p) - + raise ValueError(f'Base sequences of order {n+p}, {n+p}, {n}, {n} not yet implemented.') diff --git a/src/sage/combinat/tableau.py b/src/sage/combinat/tableau.py index f5652f86733..deb191ea1c8 100644 --- a/src/sage/combinat/tableau.py +++ b/src/sage/combinat/tableau.py @@ -97,7 +97,8 @@ from sage.misc.inherit_comparison import InheritComparisonClasscallMetaclass from sage.rings.finite_rings.integer_mod_ring import IntegerModRing from sage.rings.infinity import PlusInfinity -from sage.arith.all import factorial, binomial +from sage.arith.misc import factorial +from sage.arith.misc import binomial from sage.arith.misc import multinomial from sage.rings.integer import Integer from sage.combinat.composition import Composition, Compositions diff --git a/src/sage/combinat/tableau_tuple.py b/src/sage/combinat/tableau_tuple.py index 3deb562bbb6..29f1aae0bd7 100644 --- a/src/sage/combinat/tableau_tuple.py +++ b/src/sage/combinat/tableau_tuple.py @@ -228,7 +228,7 @@ from sage.misc.lazy_attribute import lazy_attribute from sage.misc.misc_c import prod from sage.misc.prandom import randint -from sage.arith.all import factorial +from sage.arith.misc import factorial from sage.rings.finite_rings.integer_mod_ring import IntegerModRing from sage.rings.integer import Integer from sage.rings.semirings.non_negative_integer_semiring import NN diff --git a/src/sage/combinat/tamari_lattices.py b/src/sage/combinat/tamari_lattices.py index c08b1348e44..ba4de2ad8fb 100644 --- a/src/sage/combinat/tamari_lattices.py +++ b/src/sage/combinat/tamari_lattices.py @@ -48,7 +48,7 @@ # **************************************************************************** from __future__ import annotations from sage.combinat.posets.lattices import LatticePoset, MeetSemilattice -from sage.arith.all import gcd +from sage.arith.misc import GCD as gcd def paths_in_triangle(i, j, a, b) -> list[tuple[int, ...]]: diff --git a/src/sage/combinat/words/lyndon_word.py b/src/sage/combinat/words/lyndon_word.py index ca271c5a114..3e2987fb811 100644 --- a/src/sage/combinat/words/lyndon_word.py +++ b/src/sage/combinat/words/lyndon_word.py @@ -17,7 +17,10 @@ from sage.combinat.composition import Composition, Compositions from sage.rings.integer import Integer -from sage.arith.all import divisors, gcd, moebius, multinomial +from sage.arith.misc import divisors +from sage.arith.misc import GCD as gcd +from sage.arith.misc import moebius +from sage.arith.misc import multinomial from sage.combinat.necklace import _sfc from sage.combinat.words.words import FiniteWords diff --git a/src/sage/combinat/words/morphism.py b/src/sage/combinat/words/morphism.py index fbeb8cd749a..a9044f3cd44 100644 --- a/src/sage/combinat/words/morphism.py +++ b/src/sage/combinat/words/morphism.py @@ -3003,7 +3003,7 @@ def rauzy_fractal_plot(self, n=None, exchange=False, eig=None, # 1D plots if dim_fractal == 1: - from sage.all import plot + from sage.plot.plot import plot for a in col_dict: # We plot only the points with a color in col_dict and with positive opacity if (a in col_dict) and (opacity[a] > 0): diff --git a/src/sage/combinat/words/paths.py b/src/sage/combinat/words/paths.py index 3d0ee41a4c4..9d35fe149ee 100644 --- a/src/sage/combinat/words/paths.py +++ b/src/sage/combinat/words/paths.py @@ -1226,7 +1226,7 @@ def tikz_trajectory(self): '(0.000, 0.000) -- (1.00, 0.000) -- (1.50, 0.866) -- (1.00, 1.73) -- (0.000, 1.73) -- (-0.500, 0.866)' """ - from sage.all import n + from sage.misc.functional import N as n f = lambda x: n(x,digits=3) l = [str(tuple(map(f, pt))) for pt in self.points()] return ' -- '.join(l) diff --git a/src/sage/combinat/words/shuffle_product.py b/src/sage/combinat/words/shuffle_product.py index 101e7ca695c..7363d642126 100644 --- a/src/sage/combinat/words/shuffle_product.py +++ b/src/sage/combinat/words/shuffle_product.py @@ -22,7 +22,7 @@ # https://www.gnu.org/licenses/ # **************************************************************************** from sage.combinat.words.word import Word_class, Word -from sage.arith.all import binomial +from sage.arith.misc import binomial from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets from sage.combinat.integer_vector import IntegerVectors from sage.combinat.composition import Composition diff --git a/src/sage/combinat/words/word_generators.py b/src/sage/combinat/words/word_generators.py index b485205878f..b08766fda79 100644 --- a/src/sage/combinat/words/word_generators.py +++ b/src/sage/combinat/words/word_generators.py @@ -66,7 +66,7 @@ from sage.combinat.words.finite_word import FiniteWord_class, Factorization from sage.combinat.words.words import FiniteWords, InfiniteWords from sage.combinat.words.morphism import WordMorphism -from sage.arith.all import gcd +from sage.arith.misc import GCD as gcd from sage.misc.decorators import rename_keyword diff --git a/src/sage/matroids/basis_matroid.pyx b/src/sage/matroids/basis_matroid.pyx index ff70add1ce2..042f529fedc 100644 --- a/src/sage/matroids/basis_matroid.pyx +++ b/src/sage/matroids/basis_matroid.pyx @@ -79,7 +79,7 @@ from .basis_exchange_matroid cimport BasisExchangeMatroid from .set_system cimport SetSystem from cpython.object cimport Py_EQ, Py_NE -from sage.arith.all import binomial +from sage.arith.misc import binomial from itertools import permutations, combinations diff --git a/src/sage/matroids/constructor.py b/src/sage/matroids/constructor.py index 1fb2cd2b93e..ea3bd181f0c 100644 --- a/src/sage/matroids/constructor.py +++ b/src/sage/matroids/constructor.py @@ -107,7 +107,8 @@ from sage.structure.element import is_Matrix from sage.rings.integer_ring import ZZ from sage.rings.rational_field import QQ -from sage.categories.all import Fields, Rings +from sage.categories.fields import Fields +from sage.categories.rings import Rings from sage.rings.finite_rings.finite_field_base import FiniteField import sage.matroids.matroid import sage.matroids.basis_exchange_matroid diff --git a/src/sage/matroids/extension.pyx b/src/sage/matroids/extension.pyx index 0408e60f86e..04ccf9ec61f 100644 --- a/src/sage/matroids/extension.pyx +++ b/src/sage/matroids/extension.pyx @@ -31,7 +31,7 @@ Methods from sage.data_structures.bitset_base cimport * from .basis_matroid cimport BasisMatroid -from sage.arith.all import binomial +from sage.arith.misc import binomial cdef class CutNode: diff --git a/src/sage/matroids/lean_matrix.pyx b/src/sage/matroids/lean_matrix.pyx index 6b3cf27bcf2..bb8f1012f19 100644 --- a/src/sage/matroids/lean_matrix.pyx +++ b/src/sage/matroids/lean_matrix.pyx @@ -37,7 +37,10 @@ from cysignals.signals cimport sig_on, sig_off from sage.data_structures.bitset_base cimport * from sage.matrix.matrix2 cimport Matrix -from sage.rings.all import ZZ, FiniteField, GF, QQ +from sage.rings.integer_ring import Z as ZZ +from sage.rings.finite_rings.finite_field_constructor import FiniteField +from sage.rings.finite_rings.finite_field_constructor import FiniteField as GF +from sage.rings.rational_field import Q as QQ from sage.rings.integer cimport Integer from sage.rings.rational cimport Rational from sage.libs.gmp.mpq cimport * diff --git a/src/sage/matroids/linear_matroid.pyx b/src/sage/matroids/linear_matroid.pyx index 0c9b0a1baff..e6ae08e0e79 100644 --- a/src/sage/matroids/linear_matroid.pyx +++ b/src/sage/matroids/linear_matroid.pyx @@ -129,7 +129,10 @@ from sage.matrix.matrix2 cimport Matrix import sage.matrix.constructor from sage.matrix.constructor import matrix from copy import copy, deepcopy -from sage.rings.all import ZZ, QQ, FiniteField, GF +from sage.rings.integer_ring import Z as ZZ +from sage.rings.rational_field import Q as QQ +from sage.rings.finite_rings.finite_field_constructor import FiniteField +from sage.rings.finite_rings.finite_field_constructor import FiniteField as GF import itertools from itertools import combinations, product From 301a0d1f4568ae4d17c44103d0d17ea93085f5f0 Mon Sep 17 00:00:00 2001 From: Alex Chandler Date: Sun, 29 Jan 2023 14:10:18 -0800 Subject: [PATCH 311/751] sage -fiximports src/sage/{topology,homology} --- src/sage/homology/chain_complex.py | 3 ++- src/sage/homology/koszul_complex.py | 2 +- src/sage/topology/delta_complex.py | 2 +- src/sage/topology/simplicial_complex.py | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/sage/homology/chain_complex.py b/src/sage/homology/chain_complex.py index d88389e5c6d..1a8f28b1be7 100644 --- a/src/sage/homology/chain_complex.py +++ b/src/sage/homology/chain_complex.py @@ -62,7 +62,8 @@ from sage.matrix.constructor import matrix from sage.misc.latex import latex from sage.misc.superseded import deprecation -from sage.rings.all import GF, prime_range +from sage.rings.finite_rings.finite_field_constructor import FiniteField as GF +from sage.rings.fast_arith import prime_range from sage.homology.homology_group import HomologyGroup diff --git a/src/sage/homology/koszul_complex.py b/src/sage/homology/koszul_complex.py index 858d5a71283..af480a9c8db 100644 --- a/src/sage/homology/koszul_complex.py +++ b/src/sage/homology/koszul_complex.py @@ -14,7 +14,7 @@ from sage.structure.unique_representation import UniqueRepresentation from sage.structure.parent import Parent from sage.combinat.combination import rank -from sage.arith.all import binomial +from sage.arith.misc import binomial from sage.rings.integer_ring import ZZ from sage.matrix.constructor import matrix from sage.homology.chain_complex import ChainComplex_class diff --git a/src/sage/topology/delta_complex.py b/src/sage/topology/delta_complex.py index 420fd2fad5a..bdc16265c68 100644 --- a/src/sage/topology/delta_complex.py +++ b/src/sage/topology/delta_complex.py @@ -59,7 +59,7 @@ from .simplicial_complex import Simplex, lattice_paths, SimplicialComplex from sage.homology.chain_complex import ChainComplex from sage.graphs.graph import Graph -from sage.arith.all import binomial +from sage.arith.misc import binomial from sage.misc.cachefunc import cached_method diff --git a/src/sage/topology/simplicial_complex.py b/src/sage/topology/simplicial_complex.py index 79393f7317b..c61bde73d76 100644 --- a/src/sage/topology/simplicial_complex.py +++ b/src/sage/topology/simplicial_complex.py @@ -1452,7 +1452,7 @@ def h_vector(self): sage: octa.h_vector() [1, 3, 3, 1] """ - from sage.arith.all import binomial + from sage.arith.misc import binomial d = self.dimension() f = self.f_vector() # indexed starting at 0, since it's a Python list h = [] @@ -1573,7 +1573,7 @@ def h_triangle(self): [0, 0, 4], [1, 2, -1, 0]] """ - from sage.arith.all import binomial + from sage.arith.misc import binomial ret = [[0]*(i+1) for i in range(self.dimension() + 2)] f = self.f_triangle() for i, row in enumerate(ret): From 21148e59393ea5c503f856074b59bd27e4cec156 Mon Sep 17 00:00:00 2001 From: Alex Chandler Date: Sun, 29 Jan 2023 14:15:16 -0800 Subject: [PATCH 312/751] sage -fiximports src/sage/{functions,interfaces,symbolic} --- src/sage/functions/hypergeometric.py | 4 +++- src/sage/functions/piecewise.py | 15 +++++++++++---- src/sage/interfaces/axiom.py | 3 ++- src/sage/interfaces/fricas.py | 7 +++++-- src/sage/interfaces/genus2reduction.py | 4 +++- src/sage/interfaces/maxima_abstract.py | 2 +- src/sage/interfaces/octave.py | 4 ++-- src/sage/interfaces/scilab.py | 2 +- src/sage/interfaces/singular.py | 14 +++++++++----- src/sage/interfaces/sympy.py | 4 ++-- src/sage/symbolic/pynac_impl.pxi | 8 ++++++-- src/sage/symbolic/substitution_map_impl.pxi | 8 ++++---- 12 files changed, 49 insertions(+), 26 deletions(-) diff --git a/src/sage/functions/hypergeometric.py b/src/sage/functions/hypergeometric.py index 50c60b25638..47bff45ecdd 100644 --- a/src/sage/functions/hypergeometric.py +++ b/src/sage/functions/hypergeometric.py @@ -166,7 +166,9 @@ from sage.rings.integer_ring import ZZ from sage.rings.rational_field import QQ from sage.rings.infinity import Infinity -from sage.arith.all import binomial, rising_factorial, factorial +from sage.arith.misc import binomial +from sage.arith.misc import rising_factorial +from sage.arith.misc import factorial from sage.symbolic.constants import pi from sage.symbolic.function import BuiltinFunction from sage.symbolic.ring import SR diff --git a/src/sage/functions/piecewise.py b/src/sage/functions/piecewise.py index 10d82e3709a..dacd79f2326 100644 --- a/src/sage/functions/piecewise.py +++ b/src/sage/functions/piecewise.py @@ -1089,7 +1089,9 @@ def laplace(self, parameters, variable, x='x', s='t'): sage: f.laplace(t,s) (s + 1)*e^(-s)/s^2 + 2*e^(-s)/s - 1/s^2 """ - from sage.all import assume, exp, forget + from sage.symbolic.assumptions import assume + from sage.functions.log import exp + from sage.symbolic.assumptions import forget x = SR.var(x) s = SR.var(s) assume(s>0) @@ -1180,7 +1182,8 @@ def fourier_series_cosine_coefficient(self, parameters, -3/5/pi """ - from sage.all import cos, pi + from sage.functions.trig import cos + from sage.symbolic.constants import pi L0 = (self.domain().sup() - self.domain().inf()) / 2 if not L: L = L0 @@ -1270,7 +1273,8 @@ def fourier_series_sine_coefficient(self, parameters, variable, 4/3/pi """ - from sage.all import sin, pi + from sage.functions.trig import sin + from sage.symbolic.constants import pi L0 = (self.domain().sup() - self.domain().inf()) / 2 if not L: L = L0 @@ -1358,7 +1362,10 @@ def fourier_series_partial_sum(self, parameters, variable, N, - 4/9*sin(3*pi*x)/pi^2 + 4*sin(pi*x)/pi^2 + 1/4 """ - from sage.all import pi, sin, cos, srange + from sage.symbolic.constants import pi + from sage.functions.trig import sin + from sage.functions.trig import cos + from sage.arith.srange import srange if not L: L = (self.domain().sup() - self.domain().inf()) / 2 x = self.default_variable() diff --git a/src/sage/interfaces/axiom.py b/src/sage/interfaces/axiom.py index 160fbd84c54..7e741b85f7e 100644 --- a/src/sage/interfaces/axiom.py +++ b/src/sage/interfaces/axiom.py @@ -836,7 +836,8 @@ def _sage_(self): return self._sage_domain() if type == "Float": - from sage.rings.all import RealField, ZZ + from sage.rings.real_mpfr import RealField + from sage.rings.integer_ring import Z as ZZ prec = max(self.mantissa().length()._sage_(), 53) R = RealField(prec) x,e,b = self.unparsed_input_form().lstrip('float(').rstrip(')').split(',') diff --git a/src/sage/interfaces/fricas.py b/src/sage/interfaces/fricas.py index dc2ce71f26a..d3da7d796f2 100644 --- a/src/sage/interfaces/fricas.py +++ b/src/sage/interfaces/fricas.py @@ -1217,7 +1217,9 @@ def _get_sage_type(self, domain): sage: fricas(0)._get_sage_type(m) # optional - fricas Univariate Polynomial Ring in y over Univariate Polynomial Ring in x over Algebraic Field """ - from sage.rings.all import QQbar, RDF, PolynomialRing + from sage.rings.qqbar import QQbar + from sage.rings.real_double import RDF + from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.fraction_field import FractionField from sage.rings.finite_rings.integer_mod_ring import Integers from sage.rings.finite_rings.finite_field_constructor import FiniteField @@ -1730,7 +1732,8 @@ def convert_rootOf(x, y): ex, _ = FriCASElement._parse_and_eval(fricas_InputForm) # postprocessing of rootOf - from sage.rings.all import QQbar, PolynomialRing + from sage.rings.qqbar import QQbar + from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing while rootOf: for var, poly in rootOf.items(): pvars = poly.variables() diff --git a/src/sage/interfaces/genus2reduction.py b/src/sage/interfaces/genus2reduction.py index 56ae04b2357..ea3380196c6 100644 --- a/src/sage/interfaces/genus2reduction.py +++ b/src/sage/interfaces/genus2reduction.py @@ -34,7 +34,9 @@ # **************************************************************************** from sage.structure.sage_object import SageObject -from sage.rings.all import ZZ, QQ, PolynomialRing +from sage.rings.integer_ring import Z as ZZ +from sage.rings.rational_field import Q as QQ +from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.libs.pari.all import pari roman_numeral = ["", "I", "II", "III", "IV", "V", "VI", "VII"] diff --git a/src/sage/interfaces/maxima_abstract.py b/src/sage/interfaces/maxima_abstract.py index cc1d88160bb..544e3b678a3 100644 --- a/src/sage/interfaces/maxima_abstract.py +++ b/src/sage/interfaces/maxima_abstract.py @@ -1846,7 +1846,7 @@ def _matrix_(self, R): [ 3 3/2 1 3/4] [ 4 2 4/3 1] """ - from sage.matrix.all import MatrixSpace + from sage.matrix.matrix_space import MatrixSpace self._check_valid() P = self.parent() nrows = int(P.eval('length(%s)'%self.name())) diff --git a/src/sage/interfaces/octave.py b/src/sage/interfaces/octave.py index 81d48cf3c10..f8f426c67e6 100644 --- a/src/sage/interfaces/octave.py +++ b/src/sage/interfaces/octave.py @@ -508,7 +508,7 @@ def solve_linear_system(self, A, b): m = A.nrows() if m != len(b): raise ValueError("dimensions of A and b must be compatible") - from sage.matrix.all import MatrixSpace + from sage.matrix.matrix_space import MatrixSpace from sage.rings.rational_field import QQ MS = MatrixSpace(QQ,m,1) b = MS(list(b)) # converted b to a "column vector" @@ -707,7 +707,7 @@ def _matrix_(self, R=None): if self.iscomplex(): w = [[to_complex(x,R) for x in row] for row in w] - from sage.matrix.all import MatrixSpace + from sage.matrix.matrix_space import MatrixSpace return MatrixSpace(R, nrows, ncols)(w) def _vector_(self, R=None): diff --git a/src/sage/interfaces/scilab.py b/src/sage/interfaces/scilab.py index 8349739633c..75ab263a53e 100644 --- a/src/sage/interfaces/scilab.py +++ b/src/sage/interfaces/scilab.py @@ -486,7 +486,7 @@ def _matrix_(self, R): [1.00000000000000 2.00000000000000] [3.00000000000000 4.50000000000000] """ - from sage.matrix.all import MatrixSpace + from sage.matrix.matrix_space import MatrixSpace s = str(self).strip() v = s.split('\n ') nrows = len(v) diff --git a/src/sage/interfaces/singular.py b/src/sage/interfaces/singular.py index cb93395125e..2305501a30d 100644 --- a/src/sage/interfaces/singular.py +++ b/src/sage/interfaces/singular.py @@ -1656,15 +1656,19 @@ def sage_global_ring(self): br = ZZ is_extension = False elif charstr[0] in ['0', 'QQ']: - from sage.all import QQ + from sage.rings.rational_field import Q as QQ br = QQ elif charstr[0].startswith('Float'): - from sage.all import RealField, ceil, log + from sage.rings.real_mpfr import RealField + from sage.functions.other import ceil + from sage.misc.functional import log prec = singular.eval('ringlist(basering)[1][2][1]') br = RealField(ceil((ZZ(prec)+1)/log(2,10))) is_extension = False elif charstr[0]=='complex': - from sage.all import ComplexField, ceil, log + from sage.rings.complex_mpfr import ComplexField + from sage.functions.other import ceil + from sage.misc.functional import log prec = singular.eval('ringlist(basering)[1][2][1]') br = ComplexField(ceil((ZZ(prec)+1)/log(2,10))) is_extension = False @@ -1684,7 +1688,7 @@ def sage_global_ring(self): if is_extension: minpoly = singular.eval('minpoly') if minpoly == '0': - from sage.all import Frac + from sage.rings.fraction_field import FractionField as Frac BR = Frac(br[charstr[1]]) else: is_short = singular.eval('short') @@ -1701,7 +1705,7 @@ def sage_global_ring(self): # Now, we form the polynomial ring over BR with the given variables, # using Singular's term order from sage.rings.polynomial.term_order import termorder_from_singular - from sage.all import PolynomialRing + from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing # Meanwhile Singulars quotient rings are also of 'ring' type, not 'qring' as it was in the past. # To find out if a singular ring is a quotient ring or not checking for ring type does not help # and instead of that we check if the quotient ring is zero or not: diff --git a/src/sage/interfaces/sympy.py b/src/sage/interfaces/sympy.py index 2c847d56892..aca0a43fa67 100644 --- a/src/sage/interfaces/sympy.py +++ b/src/sage/interfaces/sympy.py @@ -453,7 +453,7 @@ def _sympysage_rf(self): sage: assert rising_factorial(x,y)._sympy_() == rfxy.rewrite('gamma', piecewise=False) sage: assert rising_factorial(x,y) == rfxy._sage_() """ - from sage.arith.all import rising_factorial + from sage.arith.misc import rising_factorial return rising_factorial(self.args[0]._sage_(), self.args[1]._sage_()) def _sympysage_ff(self): @@ -466,7 +466,7 @@ def _sympysage_ff(self): sage: assert falling_factorial(x,y)._sympy_() == ffxy.rewrite('gamma') # known bug sage: assert falling_factorial(x,y) == ffxy._sage_() """ - from sage.arith.all import falling_factorial + from sage.arith.misc import falling_factorial return falling_factorial(self.args[0]._sage_(), self.args[1]._sage_()) def _sympysage_lgamma(self): diff --git a/src/sage/symbolic/pynac_impl.pxi b/src/sage/symbolic/pynac_impl.pxi index 0af6aae7fe1..53e4884a91a 100644 --- a/src/sage/symbolic/pynac_impl.pxi +++ b/src/sage/symbolic/pynac_impl.pxi @@ -45,7 +45,11 @@ from sage.libs.pari.all import pari from sage.cpython.string cimport str_to_bytes, char_to_str -from sage.arith.all import gcd, lcm, is_prime, factorial, bernoulli +from sage.arith.misc import GCD as gcd +from sage.arith.functions import lcm +from sage.arith.misc import is_prime +from sage.arith.misc import factorial +from sage.arith.misc import bernoulli from sage.structure.coerce cimport coercion_model from sage.structure.element cimport Element, parent @@ -2391,7 +2395,7 @@ def register_symbol(obj, conversions, nargs=None): this can be deduced automatically. EXAMPLES:: - + sage: from sage.symbolic.expression import register_symbol as rs sage: rs(SR(5),{'maxima':'five'}) sage: SR(maxima_calculus('five')) diff --git a/src/sage/symbolic/substitution_map_impl.pxi b/src/sage/symbolic/substitution_map_impl.pxi index d53b9971c6e..ea60e899d1a 100644 --- a/src/sage/symbolic/substitution_map_impl.pxi +++ b/src/sage/symbolic/substitution_map_impl.pxi @@ -29,13 +29,13 @@ cdef class SubstitutionMap(SageObject): Apply the substitution to a symbolic expression EXAMPLES:: - + sage: from sage.symbolic.expression import make_map sage: subs = make_map({x:x+1}) sage: subs.apply_to(x^2, 0) (x + 1)^2 """ - return new_Expression_from_GEx(expr._parent, + return new_Expression_from_GEx(expr._parent, expr._gobj.subs_map(self._gmapobj, options)) def _repr_(self): @@ -43,7 +43,7 @@ cdef class SubstitutionMap(SageObject): Return the string representation EXAMPLES:: - + sage: from sage.symbolic.expression import make_map sage: make_map({x:x+1}) SubsMap @@ -94,4 +94,4 @@ cpdef SubstitutionMap make_map(subs_dict): smap.insert(make_pair((k)._gobj, (v)._gobj)) return new_SubstitutionMap_from_GExMap(smap) - + From 1e88c12c13447aa29413bc69bbfe33cfe50a5335 Mon Sep 17 00:00:00 2001 From: Alex Chandler Date: Sun, 29 Jan 2023 16:02:21 -0800 Subject: [PATCH 313/751] sage -fiximports src/sage/{finance,interacts,libs,numerical,statistics,tests} --- src/sage/finance/fractal.pyx | 4 +- src/sage/interacts/library.py | 4 +- src/sage/libs/arb/arb_version.pyx | 2 +- src/sage/libs/coxeter3/coxeter_group.py | 4 +- src/sage/libs/eclib/homspace.pyx | 2 +- src/sage/libs/eclib/mat.pyx | 2 +- src/sage/libs/eclib/mwrank.pyx | 12 +- src/sage/libs/gap/element.pyx | 4 +- src/sage/libs/giac/auto-methods.pxi | 5810 ++++++++--------- src/sage/libs/giac/giac.pyx | 4 +- src/sage/libs/lcalc/lcalc_Lfunction.pyx | 2 +- src/sage/libs/linkages/padics/API.pxi | 4 +- .../linkages/padics/Polynomial_shared.pxi | 8 +- .../libs/linkages/padics/fmpz_poly_unram.pxi | 2 +- src/sage/libs/linkages/padics/mpz.pxi | 4 +- src/sage/libs/linkages/padics/relaxed/API.pxi | 2 +- src/sage/libs/pari/convert_sage.pyx | 4 +- .../numerical/backends/cvxopt_backend.pyx | 2 +- .../numerical/backends/cvxopt_sdp_backend.pyx | 2 +- .../numerical/backends/generic_backend.pyx | 5 +- .../numerical/backends/matrix_sdp_backend.pyx | 2 +- src/sage/numerical/gauss_legendre.pyx | 24 +- .../numerical/interactive_simplex_method.py | 14 +- src/sage/numerical/linear_tensor_element.pyx | 16 +- src/sage/numerical/sdp.pyx | 2 +- 25 files changed, 2977 insertions(+), 2964 deletions(-) diff --git a/src/sage/finance/fractal.pyx b/src/sage/finance/fractal.pyx index a3323bc6c3c..ed67ade8181 100644 --- a/src/sage/finance/fractal.pyx +++ b/src/sage/finance/fractal.pyx @@ -21,7 +21,9 @@ AUTHOR: - William Stein (2008) """ -from sage.rings.all import RDF, CDF, Integer +from sage.rings.real_double import RDF +from sage.rings.complex_double import CDF +from sage.rings.integer import Integer from sage.modules.free_module_element import vector I = CDF.gen() diff --git a/src/sage/interacts/library.py b/src/sage/interacts/library.py index bb6dfbcf8f4..da0c3a9730d 100644 --- a/src/sage/interacts/library.py +++ b/src/sage/interacts/library.py @@ -161,7 +161,7 @@ def html(obj): sage: html("

Hello world

")

Hello world

""" - from sage.all import html + from sage.misc.html import html pretty_print(html(obj)) @@ -1301,7 +1301,7 @@ def simpson_integration( else: interval = interval_g[0] def parabola(a, b, c): - from sage.all import solve + from sage.symbolic.relation import solve A, B, C = SR.var("A, B, C") K = solve([A*a[0]**2+B*a[0]+C==a[1], A*b[0]**2+B*b[0]+C==b[1], A*c[0]**2+B*c[0]+C==c[1]], [A, B, C], solution_dict=True)[0] f = K[A]*x**2+K[B]*x+K[C] diff --git a/src/sage/libs/arb/arb_version.pyx b/src/sage/libs/arb/arb_version.pyx index 6ad567e67ce..55736c392e9 100644 --- a/src/sage/libs/arb/arb_version.pyx +++ b/src/sage/libs/arb/arb_version.pyx @@ -1,5 +1,5 @@ # -*- coding: utf-8 -from sage.libs.arb.arb cimport arb_version +from sage.libs.arb.arb cimport arb_version from sage.cpython.string cimport char_to_str def version(): diff --git a/src/sage/libs/coxeter3/coxeter_group.py b/src/sage/libs/coxeter3/coxeter_group.py index ffb434f4ecd..c9aeddcee33 100644 --- a/src/sage/libs/coxeter3/coxeter_group.py +++ b/src/sage/libs/coxeter3/coxeter_group.py @@ -15,7 +15,7 @@ from sage.structure.unique_representation import UniqueRepresentation from sage.structure.element_wrapper import ElementWrapper from sage.structure.richcmp import richcmp -from sage.categories.all import CoxeterGroups +from sage.categories.coxeter_groups import CoxeterGroups from sage.structure.parent import Parent from sage.combinat.root_system.coxeter_matrix import CoxeterMatrix @@ -37,7 +37,7 @@ def __classcall__(cls, cartan_type, *args, **options): Coxeter group of type ['B', 3] relabelled by {1: 3, 2: 2, 3: 1} implemented by Coxeter3 """ - from sage.combinat.all import CartanType + from sage.combinat.root_system.cartan_type import CartanType ct = CartanType(cartan_type) return super().__classcall__(cls, ct, *args, **options) diff --git a/src/sage/libs/eclib/homspace.pyx b/src/sage/libs/eclib/homspace.pyx index 3feea84fda7..090fa3b693d 100644 --- a/src/sage/libs/eclib/homspace.pyx +++ b/src/sage/libs/eclib/homspace.pyx @@ -8,7 +8,7 @@ from libcpp.map cimport map from ..eclib cimport vec, svec, mat, smat from .mat cimport MatrixFactory -from sage.matrix.all import MatrixSpace +from sage.matrix.matrix_space import MatrixSpace from sage.matrix.matrix_integer_sparse cimport Matrix_integer_sparse from sage.rings.integer_ring import ZZ from sage.rings.integer cimport Integer diff --git a/src/sage/libs/eclib/mat.pyx b/src/sage/libs/eclib/mat.pyx index 2ad3474b221..39dee4afc94 100644 --- a/src/sage/libs/eclib/mat.pyx +++ b/src/sage/libs/eclib/mat.pyx @@ -4,7 +4,7 @@ Cremona matrices from ..eclib cimport scalar, addscalar -from sage.matrix.all import MatrixSpace +from sage.matrix.matrix_space import MatrixSpace from sage.rings.integer_ring import ZZ from sage.matrix.matrix_integer_sparse cimport Matrix_integer_sparse diff --git a/src/sage/libs/eclib/mwrank.pyx b/src/sage/libs/eclib/mwrank.pyx index 119d4d49dd4..4fa12cc10dd 100644 --- a/src/sage/libs/eclib/mwrank.pyx +++ b/src/sage/libs/eclib/mwrank.pyx @@ -593,9 +593,9 @@ cdef class _mw: Reducing saturation bound from given value 20 to computed index bound 3 Tamagawa index primes are [ 2 ] Checking saturation at [ 2 3 ] - Checking 2-saturation + Checking 2-saturation Points were proved 2-saturated (max q used = 7) - Checking 3-saturation + Checking 3-saturation Points were proved 3-saturated (max q used = 7) done P2 = [-2:3:1] is generator number 2 @@ -603,10 +603,10 @@ cdef class _mw: Reducing saturation bound from given value 20 to computed index bound 4 Tamagawa index primes are [ 2 ] Checking saturation at [ 2 3 ] - Checking 2-saturation + Checking 2-saturation possible kernel vector = [1,1] This point may be in 2E(Q): [14:-52:1] - ...and it is! + ...and it is! Replacing old generator #1 with new generator [1:-1:1] Reducing index bound from 4 to 2 Points have successfully been 2-saturated (max q used = 7) @@ -618,9 +618,9 @@ cdef class _mw: Reducing saturation bound from given value 20 to computed index bound 3 Tamagawa index primes are [ 2 ] Checking saturation at [ 2 3 ] - Checking 2-saturation + Checking 2-saturation Points were proved 2-saturated (max q used = 11) - Checking 3-saturation + Checking 3-saturation Points were proved 3-saturated (max q used = 13) done, index = 1. P4 = [-1:3:1] = -1*P1 + -1*P2 + -1*P3 (mod torsion) diff --git a/src/sage/libs/gap/element.pyx b/src/sage/libs/gap/element.pyx index c555ea0333c..7ce70bda06a 100644 --- a/src/sage/libs/gap/element.pyx +++ b/src/sage/libs/gap/element.pyx @@ -27,7 +27,9 @@ from sage.cpython.string cimport str_to_bytes, char_to_str from sage.misc.cachefunc import cached_method from sage.structure.sage_object cimport SageObject from sage.structure.parent import Parent -from sage.rings.all import ZZ, QQ, RDF +from sage.rings.integer_ring import Z as ZZ +from sage.rings.rational_field import Q as QQ +from sage.rings.real_double import RDF from sage.groups.perm_gps.permgroup_element cimport PermutationGroupElement from sage.combinat.permutation import Permutation diff --git a/src/sage/libs/giac/auto-methods.pxi b/src/sage/libs/giac/auto-methods.pxi index 9af4c0023bf..776900bcf4f 100644 --- a/src/sage/libs/giac/auto-methods.pxi +++ b/src/sage/libs/giac/auto-methods.pxi @@ -14,10 +14,10 @@ cdef class GiacMethods_base: Help for Airy_Ai: Airy_Ai(Real) Returns the value of Ai the Airy function solution of w''-xw=0. Ai(x)=Ai(0)f(z)+Ai'(0)g(z)(f and g are taylor's series sol of w''-xw=0). - See also: 1/ Airy_Bi + See also: 1/ Airy_Bi Ex1:Airy_Ai(0) Ex2:Airy_Ai(1.5) - + ''' return GiacMethods['Airy_Ai'](self,*args) @@ -26,10 +26,10 @@ cdef class GiacMethods_base: Help for Airy_Bi: Airy_Bi(Real) Returns the value of Ai the Airy function solution of w''-xw=0. Bi(x)=sqrt(3)(Bi(0)f(z)-Bi'(0)g(z))(f and g are taylor's series sol of w''-xw=0). - See also: 1/ Airy_Ai + See also: 1/ Airy_Ai Ex1:Airy_Bi(1.5) Ex2:Airy_Bi(0) - + ''' return GiacMethods['Airy_Bi'](self,*args) @@ -38,9 +38,9 @@ cdef class GiacMethods_base: Help for Archive: Archive(SeqVar) Protects the variables given as argument in an archive file. - See also: 1/ Unarchiv 2/ archive 3/ unarchive + See also: 1/ Unarchiv 2/ archive 3/ unarchive Ex1:Archive(a,b) - + ''' return GiacMethods['Archive'](self,*args) @@ -49,10 +49,10 @@ cdef class GiacMethods_base: Help for BesselJ: BesselJ(Int(p),Real(x)) BesselJ(p,x) returns the Bessel function of the first kind Jp(x). - See also: 1/ besselJ 2/ BesselY 3/ besselY + See also: 1/ besselJ 2/ BesselY 3/ besselY Ex1:BesselJ(2,sqrt(2)) Ex2:BesselJ(-2,sqrt(2)) - + ''' return GiacMethods['BesselJ'](self,*args) @@ -61,10 +61,10 @@ cdef class GiacMethods_base: Help for BesselY: BesselY(Int(p),Real(x)) BesselY(p,x) returns the Bessel function of the second kind Yp(x). - See also: 1/ besselY 2/ BesselJ 3/ besselJ + See also: 1/ besselY 2/ BesselJ 3/ besselJ Ex1:BesselY(BesselJ(2,sqrt(2))) Ex2:BesselY(BesselJ(-2,sqrt(2))) - + ''' return GiacMethods['BesselY'](self,*args) @@ -73,12 +73,12 @@ cdef class GiacMethods_base: Help for Beta: Beta(Expr,Expr,[Expr],[1]) Beta(a,b)=int(t^(a-1)*(1-t)^(b-1),t=0..1), Beta(a,b,p)=int(t^(a-1)*(1-t)^(b-1),t=0..p), Beta(a,b,p,1)=Beta(a,b,p)/Beta(a,b).(Beta(x,y) returns Gamma(x)*Gamma(y)/Gamma(x+y)). - See also: 1/ Gamma 2/ igamma + See also: 1/ Gamma 2/ igamma Ex1:Beta(x,y) Ex2:Beta(3,2) Ex3:Beta(3,2,0.5) Ex4:Beta(3,2,0.5,1) - + ''' return GiacMethods['Beta'](self,*args) @@ -87,10 +87,10 @@ cdef class GiacMethods_base: Help for BlockDiagonal: BlockDiagonal(Lst(l)||Mtrx(A)) Returns either the diagonal matrix with diagonal l or the diagonal of A. - See also: 1/ identity 2/ diag + See also: 1/ identity 2/ diag Ex1:BlockDiagonal([[1,2],[3,4]]) Ex2:BlockDiagonal([1,2,3]) - + ''' return GiacMethods['BlockDiagonal'](self,*args) @@ -99,9 +99,9 @@ cdef class GiacMethods_base: Help for Ci: Ci(Expr) Cosine integral int(cos(t)/t,t=-inf..x). - See also: 1/ Ei 2/ Si 3/ Li + See also: 1/ Ei 2/ Si 3/ Li Ex1:Ci(1.0) - + ''' return GiacMethods['Ci'](self,*args) @@ -110,11 +110,11 @@ cdef class GiacMethods_base: Help for Circle: Circle(Real(xc),Real(yc),Real(r),[Intg(option)]) Draws the circle with center (xc,yc) and radius r (by default option=1 and option=0 is to remove this circle). - See also: 1/ circle + See also: 1/ circle Ex1:Circle(0,1,1) Ex2:Circle(0,1,1,0) Ex3:Circle(0,1,1,1) - + ''' return GiacMethods['Circle'](self,*args) @@ -123,9 +123,9 @@ cdef class GiacMethods_base: Help for Col: Col(NULL) Returns the index of the column of the lightened cell in the matrixwriter. - See also: 1/ Row + See also: 1/ Row Ex1:Col() - + ''' return GiacMethods['Col'](self,*args) @@ -134,9 +134,9 @@ cdef class GiacMethods_base: Help for CopyVar: CopyVar(Var(var1),Var(var2)) Copies the storage without evaluation of var1 into var2. - See also: 1/ + See also: 1/ Ex1:CopyVar(A,B) - + ''' return GiacMethods['CopyVar'](self,*args) @@ -145,11 +145,11 @@ cdef class GiacMethods_base: Help for Dirac: Dirac(Real) Function derivative of Heaviside. - See also: 1/ Heaviside + See also: 1/ Heaviside Ex1:Dirac(1) Ex2:Dirac(-1) Ex3: int(Dirac(x)*(x-1)^2,x,-1,2) - + ''' return GiacMethods['Dirac'](self,*args) @@ -158,9 +158,9 @@ cdef class GiacMethods_base: Help for Ei: Ei(Expr) Exponential integral int(exp(t)/t,t=-inf..x). - See also: 1/ Si 2/ Ci 3/ Li + See also: 1/ Si 2/ Ci 3/ Li Ex1:Ei(1.0) - + ''' return GiacMethods['Ei'](self,*args) @@ -169,10 +169,10 @@ cdef class GiacMethods_base: Help for Factor: Factor(Expr) Factors a polynomial without evaluation. - See also: 1/ factor 2/ ifactor 3/ normal + See also: 1/ factor 2/ ifactor 3/ normal Ex1:Factor(x^4-1) Ex2:Factor(x^4+12*x^3+54*x^2+108*x+81) - + ''' return GiacMethods['Factor'](self,*args) @@ -187,7 +187,7 @@ cdef class GiacMethods_base: Ex4:GF(2,w^8+w^7+w^5+w+1) Ex5:GF(2,8,['a','G']) Ex6: G:=GF(2,a^8+a^6+a^3+a^2+1,['a','G'],undef) - + ''' return GiacMethods['GF'](self,*args) @@ -196,12 +196,12 @@ cdef class GiacMethods_base: Help for Gamma: Gamma(Real(a),[Real(b)]) Calculates Gamma at a point a (Gamma(n+1)=n! for n integer) if a>0, Gamma(a)=int(e^{-t}*t^{a-1},t=0..inf)) and Gamma(a)=Gamma(a+1)/a and Gamma(a,b)=ugamma(a,b). - See also: 1/ Psi 2/ Beta 3/ ugamma 4/ igamma + See also: 1/ Psi 2/ Beta 3/ ugamma 4/ igamma Ex1:Gamma(5) Ex2:Gamma(1/2) Ex3:Gamma(gamma(-5.1)) Ex4:Gamma(-5.1,2.1) - + ''' return GiacMethods['Gamma'](self,*args) @@ -210,11 +210,11 @@ cdef class GiacMethods_base: Help for Heaviside: Heaviside(Real) Function equal to 0 if x<0 and 1 if x>=0. - See also: 1/ Dirac 2/ laplace + See also: 1/ Dirac 2/ laplace Ex1:Heaviside(1) Ex2:Heaviside(-1) Ex3:Heaviside(0) - + ''' return GiacMethods['Heaviside'](self,*args) @@ -223,9 +223,9 @@ cdef class GiacMethods_base: Help for JordanBlock: JordanBlock(Expr(a),Intg(n)) Returns an n*n matrix with a on the diagonal, 1 above and 0 everywhere else. - See also: 1/ jordan + See also: 1/ jordan Ex1:JordanBlock(7,3) - + ''' return GiacMethods['JordanBlock'](self,*args) @@ -234,10 +234,10 @@ cdef class GiacMethods_base: Help for LU: LU(Mtrx(A),Var(L),Var(U),Var(P)) For a numerical matrix A, stores in L a lower triangular matrix, in U an upper triangular matrix and in P a permutation matrix such that P*A=L*U. - See also: 1/ lu 2/ QR + See also: 1/ lu 2/ QR Ex1:LU([[1,2],[3,4]],L,U,P) Ex2:LU([[6,12,18],[5,14,31],[3,8,18]],L,U,P) - + ''' return GiacMethods['LU'](self,*args) @@ -249,7 +249,7 @@ cdef class GiacMethods_base: Ex1:LambertW(1.0) Ex2:LambertW(ln(4)) Ex3:LambertW(-0.1,-1) - + ''' return GiacMethods['LambertW'](self,*args) @@ -258,9 +258,9 @@ cdef class GiacMethods_base: Help for Li: Li(Expr) Logarithm integral Li(x)=Ei(ln(x)) primitive of 1/ln(x). - See also: 1/ Si 2/ Ci 3/ Ei + See also: 1/ Si 2/ Ci 3/ Ei Ex1:Li(2.0) - + ''' return GiacMethods['Li'](self,*args) @@ -269,9 +269,9 @@ cdef class GiacMethods_base: Help for Line: Line(Expr(a),Expr(b),Expr(c),Expr(d)) Draws the segment [a+i*b,c+i*d]. - See also: 1/ segment + See also: 1/ segment Ex1:Line(-1,-2,1,2) - + ''' return GiacMethods['Line'](self,*args) @@ -280,9 +280,9 @@ cdef class GiacMethods_base: Help for LineHorz: LineHorz(Expr(a)) Draws the horizontal line y=a. - See also: 1/ Line 2/ LineVert + See also: 1/ Line 2/ LineVert Ex1:LineHorz(-1) - + ''' return GiacMethods['LineHorz'](self,*args) @@ -291,13 +291,13 @@ cdef class GiacMethods_base: Help for LineTan: LineTan(Expr(f(x)),[Var],Expr(a)) Draws the tangent to y=f(x) at x=a. Do not use parentheses or put the parenthesis around the entire expression. - See also: 1/ tangent 2/ droite_tangente + See also: 1/ tangent 2/ droite_tangente Ex1: LineTan sin(x),pi/4 Ex2: LineTan sin(t),t=pi/4) Ex3: LineTan sin(t),t,pi/4 Ex4: LineTan x^2-x,1 Ex5: (LineTan sin(t),t,pi/4) - + ''' return GiacMethods['LineTan'](self,*args) @@ -306,9 +306,9 @@ cdef class GiacMethods_base: Help for LineVert: LineVert(Expr(a)) Draws the vertical line x=a. - See also: 1/ Line 2/ LineHorz + See also: 1/ Line 2/ LineHorz Ex1:LineVert(2) - + ''' return GiacMethods['LineVert'](self,*args) @@ -317,10 +317,10 @@ cdef class GiacMethods_base: Help for Phi: Phi(Intg(n)) Euler's function (euler(n)=card({p1 sum(1/n^a,n,1,+infinity). - See also: 1/ sum + See also: 1/ sum Ex1:Zeta(2) - + ''' return GiacMethods['Zeta'](self,*args) @@ -507,10 +507,10 @@ cdef class GiacMethods_base: Help for a2q: a2q(Mtrx,VectVar) a2q(A,X)=the quadratic form q associated to A, X=vector of variables. - See also: 1/ q2a + See also: 1/ q2a Ex1:a2q([[1,2],[4,4]],[x,y]) Ex2:a2q([[1,3],[3,4]],[x,y]) - + ''' return GiacMethods['a2q'](self,*args) @@ -519,13 +519,13 @@ cdef class GiacMethods_base: Help for abcuv: abcuv(Poly(a),Poly(b),Poly(c),[Var]) Returns [u,v] such that au+bv=c for 3 polynomials a,b,c. - See also: 1/ egcd 2/ iabcuv + See also: 1/ egcd 2/ iabcuv Ex1:abcuv(x^2+2*x+1,x^2-1,x+1) Ex2:abcuv(X^2+2*X+1,X^2-1,X+1,X) Ex3:abcuv(x^2+2*x+1,x^2-1,x^3+1) Ex4:abcuv(X^2+2*X+1,X^2-1,X^3+1,X) Ex5:abcuv([1,2,1],[1,0,-1],[1,0,0,1]) - + ''' return GiacMethods['abcuv'](self,*args) @@ -534,10 +534,10 @@ cdef class GiacMethods_base: Help for about: about(Var(a)) Returns the hypothesis made with assume on the variable a. - See also: 1/ assume 2/ purge + See also: 1/ assume 2/ purge Ex1:about(a) Ex2:about(n) - + ''' return GiacMethods['about'](self,*args) @@ -546,12 +546,12 @@ cdef class GiacMethods_base: Help for abs: abs(Cplx||LstCplx) Returns the absolute value or the norm of its argument. - See also: 1/ arg + See also: 1/ arg Ex1:abs(-4) Ex2:abs(1+2*i) Ex3:abs((1+2*i)^2) Ex4:abs([-2,1+i,-4]) - + ''' return GiacMethods['abs'](self,*args) @@ -560,12 +560,12 @@ cdef class GiacMethods_base: Help for abscissa: abscissa(Pnt or Vect) Returns the abscissa of a point or a vector. - See also: 1/ ordinate 2/ affix 3/ cote 4/ coordinates + See also: 1/ ordinate 2/ affix 3/ cote 4/ coordinates Ex1:abscissa(point(1+2*i)) Ex2:abscissa(point(i)-point(1+2*i)) Ex3:abscissa(-1-i) Ex4:abscissa(point(1,2,3)) - + ''' return GiacMethods['abscissa'](self,*args) @@ -574,9 +574,9 @@ cdef class GiacMethods_base: Help for accumulate_head_tail: accumulate_head_tail(Lst(l),Intg(p),Intg(q)) Returns the list where the first p and the last q elements of l are replaced by their sum. - See also: 1/ + See also: 1/ Ex1:accumulate_head_tail([0,1,2,3,4,5,6,7,8,9],3,2) - + ''' return GiacMethods['accumulate_head_tail'](self,*args) @@ -585,9 +585,9 @@ cdef class GiacMethods_base: Help for acos: acos(Expr) Arccosine. - See also: 1/ cos 2/ acosh + See also: 1/ cos 2/ acosh Ex1:acos(0) - + ''' return GiacMethods['acos'](self,*args) @@ -596,10 +596,10 @@ cdef class GiacMethods_base: Help for acos2asin: acos2asin(Expr) Replaces arccos(x) by pi/2-arcsin(x) in the argument. - See also: 1/ acos2atan + See also: 1/ acos2atan Ex1:acos2asin(acos(x)+asin(x)) Ex2:acos2asin(2*acos(x)) - + ''' return GiacMethods['acos2asin'](self,*args) @@ -608,10 +608,10 @@ cdef class GiacMethods_base: Help for acos2atan: acos2atan(Expr) Replaces arccos(x) by pi/2-arctan(x/sqrt(1-x^2)) in the argument. - See also: 1/ acos2asin + See also: 1/ acos2asin Ex1:acos2atan(2*acos(x)) Ex2:acos2atan(acos(sqrt(1-x^2))+acos(x)) - + ''' return GiacMethods['acos2atan'](self,*args) @@ -620,9 +620,9 @@ cdef class GiacMethods_base: Help for acosh: acosh(Expr) Hyperbolic arccosine. - See also: 1/ cosh 2/ acos + See also: 1/ cosh 2/ acos Ex1:acosh(1) - + ''' return GiacMethods['acosh'](self,*args) @@ -631,9 +631,9 @@ cdef class GiacMethods_base: Help for acot: acot(Expr) Arccotangent. - See also: 1/ atan 2/ arccos + See also: 1/ atan 2/ arccos Ex1:acot(0) - + ''' return GiacMethods['acot'](self,*args) @@ -642,10 +642,10 @@ cdef class GiacMethods_base: Help for acsc: acsc(Expr) Arccosecant: acsc(x)=asin(1/x). - See also: 1/ asin 2/ csc + See also: 1/ asin 2/ csc Ex1:acsc(1) Ex2:acsc(2) - + ''' return GiacMethods['acsc'](self,*args) @@ -654,8 +654,8 @@ cdef class GiacMethods_base: Help for acyclic: acyclic(Opt) Option for the random_network command. - See also: 1/ random_network - + See also: 1/ random_network + ''' return GiacMethods['acyclic'](self,*args) @@ -664,7 +664,7 @@ cdef class GiacMethods_base: Help for add: add(Expr,Var,VarMin(a),VarMax(b),[VarStep(p)]) Discrete sum (with 2 or 4 arguments return then sum from a to b if a<=b or of the opposite of the sum from b+1 to a-1 if a>b+1 or 0 if a=b+1) or the discrete primitive or sum of the elements of a list or a sequence. - See also: 1/ + + See also: 1/ + Ex1:add(1/n^2,n,1,17) Ex2:add(1/n^2,n=1..17) Ex3:add(1/n^2,n,17,1) @@ -675,7 +675,7 @@ cdef class GiacMethods_base: Ex8:add([[1,2,3,4,5,6,7,8,9],[1,2,3,4,5,6,7,8,9]]) Ex9:add(1/(x*(x+1)),x) Ex10:add(cos(n*x),n) - + ''' return GiacMethods['add'](self,*args) @@ -684,9 +684,9 @@ cdef class GiacMethods_base: Help for add_arc: add_arc(Graph(G),Edge(e)||Trail(T)||Lst(E)) Returns a modified copy of digraph G with added arc e (or trail T or list of arcs E). - See also: 1/ add_edge 2/ delete_arc 3/ digraph 4/ edges 5/ has_arc 6/ trail + See also: 1/ add_edge 2/ delete_arc 3/ digraph 4/ edges 5/ has_arc 6/ trail Ex1:add_arc(digraph(trail(1,2,3,4,5,1)),[[1,3],[2,4]]) - + ''' return GiacMethods['add_arc'](self,*args) @@ -695,9 +695,9 @@ cdef class GiacMethods_base: Help for add_edge: add_edge(Graph(G),Edge(e)||Trail(T)||Lst(E)) Returns a modified copy of undirected graph G with added edge e (or trail T or list of edges E). - See also: 1/ add_arc 2/ delete_edge 3/ edges 4/ graph 5/ has_edge 6/ trail + See also: 1/ add_arc 2/ delete_edge 3/ edges 4/ graph 5/ has_edge 6/ trail Ex1:add_edge(graph(trail(1,2,3,4)),[4,1]) - + ''' return GiacMethods['add_edge'](self,*args) @@ -706,9 +706,9 @@ cdef class GiacMethods_base: Help for add_vertex: add_vertex(Graph(G),Vrtx(v)||Lst(V)) Returns a modified copy of G with added vertex v [or vertices from list V]. - See also: 1/ add_arc 2/ add_edge 3/ delete_vertex + See also: 1/ add_arc 2/ add_edge 3/ delete_vertex Ex1:add_vertex(cycle_graph(5),["a","b"]) - + ''' return GiacMethods['add_vertex'](self,*args) @@ -717,10 +717,10 @@ cdef class GiacMethods_base: Help for additionally: additionally(Expr) Makes an additionally assumption on a variable. - See also: 1/ purge 2/ about 3/ assume + See also: 1/ purge 2/ about 3/ assume Ex1: assume(n,integer);additionally(n>5) Ex2: assume(n,integer);assume(n>=2,additionally) - + ''' return GiacMethods['additionally'](self,*args) @@ -729,9 +729,9 @@ cdef class GiacMethods_base: Help for addtable: addtable(fourier||laplace,f(x),F(s),Var(x),Var(s)) Stores an unknown Fourier/Laplace transform pair (f,F). - See also: 1/ fourier 2/ laplace + See also: 1/ fourier 2/ laplace Ex1:addtable(fourier,y(x),Y(s),x,s) - + ''' return GiacMethods['addtable'](self,*args) @@ -740,9 +740,9 @@ cdef class GiacMethods_base: Help for adjacency_matrix: adjacency_matrix(Graph(G)) Returns the adjacency matrix of G (rows and columns are indexed by the vertices). - See also: 1/ neighbors + See also: 1/ neighbors Ex1:adjacency_matrix(graph(trail(1,2,3,4,2,5,1,3))) - + ''' return GiacMethods['adjacency_matrix'](self,*args) @@ -751,9 +751,9 @@ cdef class GiacMethods_base: Help for adjoint_matrix: adjoint_matrix(Mtrx) Returns the characteristic polynomial of A and the comatrix of A-xI. - See also: 1/ pcar + See also: 1/ pcar Ex1:adjoint_matrix([[1,i],[2,3]]) - + ''' return GiacMethods['adjoint_matrix'](self,*args) @@ -762,11 +762,11 @@ cdef class GiacMethods_base: Help for affix: affix(Pnt||Vect) Complex number equal to the affix of a point or of a vector. - See also: 1/ point 2/ vector + See also: 1/ point 2/ vector Ex1:affix(point(i)) Ex2:affix(point(i)-point(1+2*i)) Ex3:affix([1,2]) - + ''' return GiacMethods['affix'](self,*args) @@ -775,11 +775,11 @@ cdef class GiacMethods_base: Help for algsubs: algsubs(Equal(Xpr1=Xpr2),Expr(Xpr)) Substitutes in the expression Xpr, the algebraic expression Xpr1 by the algebraic expression Xpr2. - See also: 1/ subst 2/ subs + See also: 1/ subst 2/ subs Ex1:algsubs(x^2=u,1+x^2+x^4) Ex2:algsubs(a*b/c=d, 2*a*b^2/c) Ex3:algsubs(2a=p^2-q^2,algsubs(2c=p^2+q^2,c^2-a^2)) - + ''' return GiacMethods['algsubs'](self,*args) @@ -788,9 +788,9 @@ cdef class GiacMethods_base: Help for algvar: algvar(Expr) List of the variables by ascending algebraic extension order. - See also: 1/ lvar 2/ lname + See also: 1/ lvar 2/ lname Ex1:algvar(sqrt(x)+y) - + ''' return GiacMethods['algvar'](self,*args) @@ -799,10 +799,10 @@ cdef class GiacMethods_base: Help for all_trig_solutions: all_trig_solutions(:=Intg(0 or 1)) Pseudo-variable to return the general solution (all_trig_solutions:=1) or principal solution (all_trig_solutions:=0). - See also: 1/ cas_setup + See also: 1/ cas_setup Ex1: all_trig_solutions:=1 Ex2: all_trig_solutions:=0 - + ''' return GiacMethods['all_trig_solutions'](self,*args) @@ -811,9 +811,9 @@ cdef class GiacMethods_base: Help for allpairs_distance: allpairs_distance(Graph(G)) Returns a square matrix D of order equal to the number of vertices in G such that D(i,j) is the distance between i-th and j-th vertex of the (weighted) graph G. - See also: 1/ dijkstra 2/ graph_diameter 3/ vertex_distance + See also: 1/ dijkstra 2/ graph_diameter 3/ vertex_distance Ex1:allpairs_distance(graph(%{[1,2],[1,3],[1,4],[1,5],[2,3],[3,4],[4,5],[5,2]%})) - + ''' return GiacMethods['allpairs_distance'](self,*args) @@ -822,9 +822,9 @@ cdef class GiacMethods_base: Help for alog10: alog10(Expr) Function x->10^x. - See also: 1/ log10 + See also: 1/ log10 Ex1:alog10(3) - + ''' return GiacMethods['alog10'](self,*args) @@ -833,9 +833,9 @@ cdef class GiacMethods_base: Help for altitude: altitude((Pnt or Cplx),(Pnt or Cplx),(Pnt or Cplx)) altitude(A,B,C) draws the altitude through A of the triangle ABC. - See also: 1/ perpendicular 2/ orthogonal 3/ orthocenter 4/ common_perpendicular + See also: 1/ perpendicular 2/ orthogonal 3/ orthocenter 4/ common_perpendicular Ex1:altitude(-1,1-i,i) - + ''' return GiacMethods['altitude'](self,*args) @@ -844,13 +844,13 @@ cdef class GiacMethods_base: Help for angle: angle((Pnt or Cplx),(Pnt or Cplx),(Pnt or Cplx)) angle(A,B,C) is the value of the measure of the angle (AB,AC). - See also: 1/ triangle 2/ bissector 3/ legend 4/ labels 5/ angleat 6/ angleatraw + See also: 1/ triangle 2/ bissector 3/ legend 4/ labels 5/ angleat 6/ angleatraw Ex1:angle(point(0),point(i),point(1)) Ex2:angle(0,1,i) Ex3:angle(0,1,i,"") Ex4:angle(0,1,i,"a") Ex5:angle(i,1,1+i,"b") - + ''' return GiacMethods['angle'](self,*args) @@ -859,10 +859,10 @@ cdef class GiacMethods_base: Help for angle_radian: angle_radian(:=Intg(0 or 1)) Pseudo-variable to work with radians (angle_radian:=1) or degrees (angle_radian:=0). - See also: 1/ cas_setup + See also: 1/ cas_setup Ex1: angle_radian:=1 Ex2: angle_radian:=0 - + ''' return GiacMethods['angle_radian'](self,*args) @@ -871,9 +871,9 @@ cdef class GiacMethods_base: Help for angleat: angleat(Pnt(A),Pnt(B),Pnt(C),(Pnt or Cplx(z0))) angleat(A,B,C,z0) displays at point(z0) with a legend, the value of the measure of the angle (AB,AC). - See also: 1/ angle 2/ angleatraw 3/ legend + See also: 1/ angle 2/ angleatraw 3/ legend Ex1: A:=point(0);B:=point(1);C:=point(i);angleat(A,B,C,-2-i) - + ''' return GiacMethods['angleat'](self,*args) @@ -882,9 +882,9 @@ cdef class GiacMethods_base: Help for angleatraw: angleatraw(Pnt(A)),Pnt(B),Pnt(C),(Pnt or Cplx(z0))) angleatraw(A,B,C,z0) displays at point(z0), the value of the measure of the angle (AB,AC). - See also: 1/ angle 2/ angleat + See also: 1/ angle 2/ angleat Ex1: A:=point(0);B:=point(1);C:=point(i);angleatraw(A,B,C,-2-i) - + ''' return GiacMethods['angleatraw'](self,*args) @@ -893,11 +893,11 @@ cdef class GiacMethods_base: Help for ans: ans(Intg(n)) Returns the (n+1)th answer of the command history if n>=0 or, the (-n)th previous answer if n<0 (by default n=-1 for the previous answer). - See also: 1/ quest + See also: 1/ quest Ex1:ans() Ex2:ans(2) Ex3:ans(-2) - + ''' return GiacMethods['ans'](self,*args) @@ -906,9 +906,9 @@ cdef class GiacMethods_base: Help for antiprism_graph: antiprism_graph(Intg(n)) Returns the antiprism graph of order n. - See also: 1/ prism_graph + See also: 1/ prism_graph Ex1:antiprism_graph(5) - + ''' return GiacMethods['antiprism_graph'](self,*args) @@ -917,14 +917,14 @@ cdef class GiacMethods_base: Help for append: append((Lst||Set||Str(L),Elem)) Append an element to a set or at the end of a list or of a string (L:=append(L,a) or L.append(a)). - See also: 1/ concat 2/ prepend + See also: 1/ concat 2/ prepend Ex1:append([1,2,4],6) Ex2:append(%{1,2,4%},6) Ex3: L:=[1,2,4];L:=append(L,6) Ex4: L:=[1,2,4];L.append(6) Ex5: S:=set[1,2,4];S:=append(S,6) Ex6: S:=set[1,2,4];S.append(6) - + ''' return GiacMethods['append'](self,*args) @@ -933,10 +933,10 @@ cdef class GiacMethods_base: Help for apply: apply(Fnc(f),Lst(l)) Applies the function f at the elements of the list l (option matrix for a matrix). - See also: 1/ map 2/ unapply 3/ matrix + See also: 1/ map 2/ unapply 3/ matrix Ex1:apply(x->x^3,[1,2,3]) Ex2:apply(x->x+1,[[1,2,3],[1,2,3]],matrix) - + ''' return GiacMethods['apply'](self,*args) @@ -945,14 +945,14 @@ cdef class GiacMethods_base: Help for approx: approx(Expr,[Int]) Numerical evaluation of the first argument (we can give the number of digits as second argument). - See also: 1/ evalb 2/ eval + See also: 1/ evalb 2/ eval Ex1:approx(2/3) Ex2:approx(2/3,2) Ex3:approx(2*sin(1)) Ex4:approx(2*sin(1),40) Ex5:approx(sqrt(2)+pi) Ex6:approx(sqrt(2)+pi,30) - + ''' return GiacMethods['approx'](self,*args) @@ -961,12 +961,12 @@ cdef class GiacMethods_base: Help for arc: arc(Pnt, Pnt, Real,[Var(C)],[Var(r)],[Opt(segment)]) Draws a circular arc given by 2 vertices and the central angle [Xcas will put the center in C and the radius in r]. - See also: 1/ circle 2/ segment 3/ plotparam + See also: 1/ circle 2/ segment 3/ plotparam Ex1:arc(0,1,pi/4) Ex2:arc(i,1,pi/4,C,r) Ex3:arc(i,1,pi/4,segment) Ex4:arc(i,1,pi/4,segment,affichage=1+rempli) - + ''' return GiacMethods['arc'](self,*args) @@ -975,11 +975,11 @@ cdef class GiacMethods_base: Help for arcLen: arcLen(Expr(Xpr) or Lst([Xpr1,Xpr2]),Var,Real(a),Real(b)) Returns the length of the arc of the curve defined by y=Xpr(or by x=Xpr1,y=Xpr2) when the parameter values are between a and b. - See also: 1/ int + See also: 1/ int Ex1:arcLen(t^2,t,1,2) Ex2:arcLen([t,t^2],t,1,2) Ex3:arcLen([cos(t),sin(t)],t,1,2) - + ''' return GiacMethods['arcLen'](self,*args) @@ -988,9 +988,9 @@ cdef class GiacMethods_base: Help for arccos: arccos(Expr) Arccosine. - See also: 1/ cos 2/ acosh + See also: 1/ cos 2/ acosh Ex1:arccos(0) - + ''' return GiacMethods['arccos'](self,*args) @@ -999,9 +999,9 @@ cdef class GiacMethods_base: Help for arccosh: arccosh(Expr) Hyperbolic arccosine. - See also: 1/ cosh 2/ acos + See also: 1/ cosh 2/ acos Ex1:arccosh(1) - + ''' return GiacMethods['arccosh'](self,*args) @@ -1010,11 +1010,11 @@ cdef class GiacMethods_base: Help for arclen: arclen(Expr(Xpr) or Lst([Xpr1,Xpr2]),Var,Real(a),Real(b)) Returns the length of the arc of the curve defined by y=Xpr(or by x=Xpr1,y=Xpr2) when the parameter values are between a and b. - See also: 1/ int + See also: 1/ int Ex1:arclen(t^2,t,1,2) Ex2:arclen([t,t^2],t,1,2) Ex3:arclen([cos(t),sin(t)],t,1,2) - + ''' return GiacMethods['arclen'](self,*args) @@ -1023,9 +1023,9 @@ cdef class GiacMethods_base: Help for arcsin: arcsin(Expr) Arcsine. - See also: 1/ sin + See also: 1/ sin Ex1:arcsin(0) - + ''' return GiacMethods['arcsin'](self,*args) @@ -1034,9 +1034,9 @@ cdef class GiacMethods_base: Help for arcsinh: arcsinh(Expr) Hyperbolic arcsine. - See also: 1/ sinh 2/ asin + See also: 1/ sinh 2/ asin Ex1:arcsinh(0) - + ''' return GiacMethods['arcsinh'](self,*args) @@ -1045,9 +1045,9 @@ cdef class GiacMethods_base: Help for arctan: arctan(Expr) Arctangent. - See also: 1/ tan 2/ atanh + See also: 1/ tan 2/ atanh Ex1:arctan(0) - + ''' return GiacMethods['arctan'](self,*args) @@ -1056,9 +1056,9 @@ cdef class GiacMethods_base: Help for arctanh: arctanh(Expr) Hyperbolic arctangent. - See also: 1/ atan 2/ tanh + See also: 1/ atan 2/ tanh Ex1:arctanh(0) - + ''' return GiacMethods['arctanh'](self,*args) @@ -1067,7 +1067,7 @@ cdef class GiacMethods_base: Help for area: area(Polygone || Expr,x=a..b,[n],[Method]) Algebraic area of a circle, a circular arc or of a (star) polygon (e.g. triangle, square, ...) or of the area below a curve, optionally with a quadrature method (trapezoid,left_rectangle,right_rectangle,middle_point,simpson,rombergt,rombergm). - See also: 1/ trapezoid 2/ perimeter 3/ areaatraw 4/ areaat 5/ areaplot + See also: 1/ trapezoid 2/ perimeter 3/ areaatraw 4/ areaat 5/ areaplot Ex1:area(triangle(0,1,i)) Ex2:area(square(0,2)) Ex3:area(circle(0,2)) @@ -1075,7 +1075,7 @@ cdef class GiacMethods_base: Ex5:area(x^2,x=0..1,5,trapezoid) Ex6:area(x^2,x=0..1,5,simpson) Ex7:area(x^2,x=0..1,5,rombergm) - + ''' return GiacMethods['area'](self,*args) @@ -1084,13 +1084,13 @@ cdef class GiacMethods_base: Help for areaat: areaat(Polygone, Pnt||Cplx(z0)) Displays at point(z0), with a legend, the algebraic area of a circle or of a (star) polygon (e.g. triangle, square, ...) - See also: 1/ area 2/ areaatraw 3/ polygon 4/ perimeteratraw 5/ areaplot + See also: 1/ area 2/ areaatraw 3/ polygon 4/ perimeteratraw 5/ areaplot Ex1: t:=triangle(0,1,i);areaat(t,(1+i)/2) Ex2: c:=square(0,2);areaat(c,1+i) Ex3: c2:=circle(0,2);areaat(c2,1+i) Ex4: p:=polygon(0,1,i);areaat(p,1+i) Ex5: A:=point(0);B:=point(1+i);c:=carre(A,B);areaat(c,i) - + ''' return GiacMethods['areaat'](self,*args) @@ -1099,13 +1099,13 @@ cdef class GiacMethods_base: Help for areaatraw: areaatraw(Polygone, Pnt||Cplx(z0)) Displays at point(z0), the algebraic area of a circle or of a (star-)polygon (e.g. triangle, square, ...) - See also: 1/ area 2/ areaat 3/ polygon 4/ perimeteratraw 5/ areaplot + See also: 1/ area 2/ areaat 3/ polygon 4/ perimeteratraw 5/ areaplot Ex1:areaatraw(triangle(0,1,i),(1+i)/2) Ex2:areaatraw(square(0,2),1+i) Ex3:areaatraw(circle(0,2),1+i) Ex4:areaatraw(polygon(0,1,i),1+i) Ex5: A:=point(0);B:=point(1+i);c:=carre(A,B);areaatraw(c,i) - + ''' return GiacMethods['areaatraw'](self,*args) @@ -1114,11 +1114,11 @@ cdef class GiacMethods_base: Help for areaplot: areaplot(Expr,x=a..b,[n],[Method]) Displays the area below a curve, optionally with a quadrature method (trapezoid,left_rectangle,right_rectangle,middle_point). - See also: 1/ integrate 2/ plot 3/ area 4/ areaat 5/ areaatraw + See also: 1/ integrate 2/ plot 3/ area 4/ areaat 5/ areaatraw Ex1:areaplot(sin(x),x=0..pi) Ex2:areaplot(x^2,x=0..1,5,trapezoid) Ex3:areaplot(x^2,x=0..1,5,middle_point) - + ''' return GiacMethods['areaplot'](self,*args) @@ -1127,11 +1127,11 @@ cdef class GiacMethods_base: Help for arg: arg(Expr) Returns the argument of a complex number. - See also: 1/ abs + See also: 1/ abs Ex1:arg(1+i) Ex2:arg(1+2*i) Ex3:arg((1+2*i)^2) - + ''' return GiacMethods['arg'](self,*args) @@ -1140,10 +1140,10 @@ cdef class GiacMethods_base: Help for array: array(Opt) Option for convert for definitions of sparse matrices. - See also: 1/ convert 2/ table + See also: 1/ convert 2/ table Ex1: A[0..2,0..2]:=1;A[0..1,1..2]:=2;convert(A,array) Ex2: B[0..1,1..2]:=1;B[2,2]:=2;convert(B,array) - + ''' return GiacMethods['array'](self,*args) @@ -1152,9 +1152,9 @@ cdef class GiacMethods_base: Help for arrivals: arrivals(Graph(G),[Vrtx(v)]) Returns the list of vertices in digraph G which are connected by v with arcs such that heads are in v. If v is omitted, a list of arrivals is computed for every vertex in G. - See also: 1/ in_degree + See also: 1/ in_degree Ex1:arrivals(digraph(%{[1,2],[1,3],[2,3]%}),1) - + ''' return GiacMethods['arrivals'](self,*args) @@ -1163,10 +1163,10 @@ cdef class GiacMethods_base: Help for articulation_points: articulation_points(Graph(G)) Returns the list of articulation points (cut vertices) of G. - See also: 1/ biconnected_components 2/ is_biconnected 3/ is_connected 4/ is_triconnected + See also: 1/ biconnected_components 2/ is_biconnected 3/ is_connected 4/ is_triconnected Ex1:articulation_points(path_graph(5)) Ex2:articulation_points(cycle_graph(5)) - + ''' return GiacMethods['articulation_points'](self,*args) @@ -1175,9 +1175,9 @@ cdef class GiacMethods_base: Help for asin: asin(Expr) Arcsine. - See also: 1/ sin + See also: 1/ sin Ex1:asin(0) - + ''' return GiacMethods['asin'](self,*args) @@ -1186,10 +1186,10 @@ cdef class GiacMethods_base: Help for asin2acos: asin2acos(Expr) Replaces arcsin(x) by pi/2-arccos(x) in the argument. - See also: 1/ asin2atan + See also: 1/ asin2atan Ex1:asin2acos(acos(x)+asin(x)) Ex2:asin2acos(2*asin(x)) - + ''' return GiacMethods['asin2acos'](self,*args) @@ -1198,10 +1198,10 @@ cdef class GiacMethods_base: Help for asin2atan: asin2atan(Expr) Replaces arcsin(x) by arctan(x/sqrt(1-x^2)) in the argument. - See also: 1/ asin2acos + See also: 1/ asin2acos Ex1:asin2atan(2*asin(x)) Ex2:asin2atan(asin(sqrt(1-x^2))+asin(x)) - + ''' return GiacMethods['asin2atan'](self,*args) @@ -1210,9 +1210,9 @@ cdef class GiacMethods_base: Help for asinh: asinh(Expr) Hyperbolic arcsine. - See also: 1/ sinh 2/ asin + See also: 1/ sinh 2/ asin Ex1:asinh(0) - + ''' return GiacMethods['asinh'](self,*args) @@ -1221,10 +1221,10 @@ cdef class GiacMethods_base: Help for assign_edge_weights: assign_edge_weights(Graph(G),Seq(m,n)||Intrv(a..b)) Assigns random edge weights to the edges of G and returns a modified copy of G. If integers n and m such that n>=m are specified, weights are integers randomly chosen in [m,n]. If an interval a..b is specified, weights are uniformly distributed in the interval [a,b). - See also: 1/ set_edge_weight 2/ get_edge_weight 3/ weight_matrix 4/ random_digraph 5/ random_tournament + See also: 1/ set_edge_weight 2/ get_edge_weight 3/ weight_matrix 4/ random_digraph 5/ random_tournament Ex1:assign_edge_weights(digraph(trail(1,2,3,4,1)),1,9) Ex2:assign_edge_weights(digraph(trail(1,2,3,4,1)),0..1) - + ''' return GiacMethods['assign_edge_weights'](self,*args) @@ -1233,7 +1233,7 @@ cdef class GiacMethods_base: Help for assume: assume(Expr) Makes an assumption on a variable. - See also: 1/ purge 2/ about 3/ additionally + See also: 1/ purge 2/ about 3/ additionally Ex1:assume(a>0) Ex2:assume(a=0.3) Ex3:assume(a:=[pi/4,0,pi/2]) @@ -1244,7 +1244,7 @@ cdef class GiacMethods_base: Ex8:assume((a>=2 and a<4) or a>6) Ex9:assume(a>=2);additionally(a<6) Ex10:assume(a) - + ''' return GiacMethods['assume'](self,*args) @@ -1253,10 +1253,10 @@ cdef class GiacMethods_base: Help for at: at(Lst(l)||Mtrx(m),Index(j)||Lst([j,k])) at(l,j) (or at(m,[j,k])) is the element of the list l (or matrix m) for index=j (or for index j,k). - See also: 1/ of + See also: 1/ of Ex1:at([10,11,12],1) Ex2:at([[1,2],[3,4]],[1,0]) - + ''' return GiacMethods['at'](self,*args) @@ -1265,9 +1265,9 @@ cdef class GiacMethods_base: Help for atan: atan(Expr) Arctangent. - See also: 1/ tan 2/ atanh + See also: 1/ tan 2/ atanh Ex1:atan(0) - + ''' return GiacMethods['atan'](self,*args) @@ -1276,8 +1276,8 @@ cdef class GiacMethods_base: Help for atan2acos: atan2acos(Expr) Replaces arctan(x) by pi/2-arccos(x/sqrt(1+x^2)) in the argument. - See also: 1/ atan2acos(atan(x)) - + See also: 1/ atan2acos(atan(x)) + ''' return GiacMethods['atan2acos'](self,*args) @@ -1286,8 +1286,8 @@ cdef class GiacMethods_base: Help for atan2asin: atan2asin(Expr) Replaces arctan(x) by arcsin(x/sqrt(1+x^2)) in the argument. - See also: 1/ atan2asin(atan(x)) - + See also: 1/ atan2asin(atan(x)) + ''' return GiacMethods['atan2asin'](self,*args) @@ -1296,9 +1296,9 @@ cdef class GiacMethods_base: Help for atanh: atanh(Expr) Hyperbolic arctangent. - See also: 1/ atan 2/ tanh + See also: 1/ atan 2/ tanh Ex1:atanh(0) - + ''' return GiacMethods['atanh'](self,*args) @@ -1307,11 +1307,11 @@ cdef class GiacMethods_base: Help for atrig2ln: atrig2ln(Expr) Rewrites the expression containing inverse trigonometric functions into logarithmic functions. - See also: 1/ trig2exp 2/ exp2trig + See also: 1/ trig2exp 2/ exp2trig Ex1:atrig2ln(atan(x)) Ex2:atrig2ln(asin(x)) Ex3:atrig2ln(acos(x)) - + ''' return GiacMethods['atrig2ln'](self,*args) @@ -1320,13 +1320,13 @@ cdef class GiacMethods_base: Help for augment: augment(Lst,Lst||Seq,Seq||Str,Str||Mtrx,Mtrx) Concatenates two lists or two strings or two sequences or 2 matrices; L:=concat(L,L1) or L.concat(L1). - See also: 1/ append 2/ cat 3/ semi_augment 4/ border 5/ + + See also: 1/ append 2/ cat 3/ semi_augment 4/ border 5/ + Ex1:augment([1,2],[3,4,5]) Ex2:augment("bon","jour") Ex3:augment([[1,2],[3,4]],[[4,5,6],[6,7,8]]) Ex4: L:=[1,2];L.concat([3,4,5]) Ex5: S:="abcd";S.concat("efghi") - + ''' return GiacMethods['augment'](self,*args) @@ -1335,9 +1335,9 @@ cdef class GiacMethods_base: Help for auto_correlation: auto_correlation(Lst) Returns the cross-correlation of the given signal with itself. - See also: 1/ cross_correlation 2/ correlation + See also: 1/ cross_correlation 2/ correlation Ex1:auto_correlation([1,-1,0,2,1]) - + ''' return GiacMethods['auto_correlation'](self,*args) @@ -1346,14 +1346,14 @@ cdef class GiacMethods_base: Help for autosimplify: autosimplify(Cmds) The argument is a command that Xcas will use to rewrite answers (initial value is regroup and for no simplification it is nop or 0). - See also: 1/ simplify 2/ factor 3/ regroup + See also: 1/ simplify 2/ factor 3/ regroup Ex1:autosimplify(nop) Ex2:autosimplify(0) Ex3:autosimplify(regroup) Ex4:autosimplify(1) Ex5:autosimplify(factor) Ex6:autosimplify(simplify) - + ''' return GiacMethods['autosimplify'](self,*args) @@ -1362,10 +1362,10 @@ cdef class GiacMethods_base: Help for avance: avance(NULL or Real(n)) The turtle takes n steps forward (by default n=10). - See also: 1/ recule 2/ saute + See also: 1/ recule 2/ saute Ex1: avance 30 Ex2:avance(30) - + ''' return GiacMethods['avance'](self,*args) @@ -1374,11 +1374,11 @@ cdef class GiacMethods_base: Help for avgRC: avgRC(Expr(Xpr),Var(Var),[Real(h)]) Returns (Xpr(var+h)-Xpr(Var))/h (by default h=0.001). - See also: 1/ nDeriv + See also: 1/ nDeriv Ex1:avgRC(f(x),x,h) Ex2:avgRC(x^2,x,0.1) Ex3:avgRC(x^2,x) - + ''' return GiacMethods['avgRC'](self,*args) @@ -1387,10 +1387,10 @@ cdef class GiacMethods_base: Help for axes: axes(Opt) Global option (Maple compatibility) of a graphic command to put or not the axes. - See also: 1/ line_width 2/ gl_showaxes 3/ switch_axes + See also: 1/ line_width 2/ gl_showaxes 3/ switch_axes Ex1: axes=0;segment(0,point(1,1)) Ex2: axes=1;segment(0,point(1,1),epaisseur=5) - + ''' return GiacMethods['axes'](self,*args) @@ -1400,7 +1400,7 @@ cdef class GiacMethods_base: axis(xmin,xmax,ymin,ymax,[zmin,zmaz]) Defines the graphic display Ex1:axis(-2,4,-1,6) - + ''' return GiacMethods['axis'](self,*args) @@ -1409,11 +1409,11 @@ cdef class GiacMethods_base: Help for back: back(Vect or Seq or Str) Returns the last element of a vector or a sequence or a string. - See also: 1/ inter 2/ head 3/ mid 4/ left 5/ right + See also: 1/ inter 2/ head 3/ mid 4/ left 5/ right Ex1:back(1,2,3) Ex2:back([1,2,3]) Ex3:back("bonjour") - + ''' return GiacMethods['back'](self,*args) @@ -1422,10 +1422,10 @@ cdef class GiacMethods_base: Help for backward: backward(NULL or Real(n)) The turtle takes n steps back (by default n=10). - See also: 1/ avance 2/ saute + See also: 1/ avance 2/ saute Ex1: recule 30 Ex2:backward(30) - + ''' return GiacMethods['backward'](self,*args) @@ -1434,9 +1434,9 @@ cdef class GiacMethods_base: Help for baisse_crayon: baisse_crayon(NULL) Presses the pencil down so that the turtle move with traces. - See also: 1/ leve_crayon 2/ crayon + See also: 1/ leve_crayon 2/ crayon Ex1:baisse_crayon() - + ''' return GiacMethods['baisse_crayon'](self,*args) @@ -1445,8 +1445,8 @@ cdef class GiacMethods_base: Help for bandwidth: bandwidth(Opt) Option for the kernel_density command. - See also: 1/ kernel_density 2/ bins - + See also: 1/ kernel_density 2/ bins + ''' return GiacMethods['bandwidth'](self,*args) @@ -1455,11 +1455,11 @@ cdef class GiacMethods_base: Help for bar_plot: bar_plot(Mtrx) Draws a barplot of a one variable statistical series. - See also: 1/ camembert 2/ histogram 3/ frequencies + See also: 1/ camembert 2/ histogram 3/ frequencies Ex1:bar_plot([["France",6],["Allemagne",12],["Suisse",5]]) Ex2:bar_plot([3/2,2/3,5/4,4/5,7/6,6/7,9/8,8/9,11/10]) Ex3:bar_plot([[2,"xyz","abc"],["A",2,5],["B",5,6],["C",7,7]]) - + ''' return GiacMethods['bar_plot'](self,*args) @@ -1468,11 +1468,11 @@ cdef class GiacMethods_base: Help for barplot: barplot(Mtrx) Draws a barplot of a one variable statistical series. - See also: 1/ camembert 2/ histogram 3/ frequencies + See also: 1/ camembert 2/ histogram 3/ frequencies Ex1:barplot([["France",6],["Allemagne",12],["Suisse",5]]) Ex2:barplot([3/2,2/3,5/4,4/5,7/6,6/7,9/8,8/9,11/10]) Ex3:barplot([[2,"xyz","abc"],["A",2,5],["B",5,6],["C",7,7]]) - + ''' return GiacMethods['barplot'](self,*args) @@ -1481,9 +1481,9 @@ cdef class GiacMethods_base: Help for bartlett_hann_window: bartlett_hann_window(Lst,[Interval(n1..n2)]) Applies the Bartlett-Hann windowing function to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window + See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window Ex1: scatterplot(bartlett_hann_window(randvector(1000,0..1))) - + ''' return GiacMethods['bartlett_hann_window'](self,*args) @@ -1492,11 +1492,11 @@ cdef class GiacMethods_base: Help for barycenter: barycenter([Pnt,Real],[Pnt,Real],[Pnt,Real]) barycenter([point1,coeff1],...) draws the barycenter of point1 with weight coeff1... - See also: 1/ isobarycenter 2/ midpoint + See also: 1/ isobarycenter 2/ midpoint Ex1:barycenter([point(-1),1],[point(1+i),2],[point(1-i),1]) Ex2:barycenter([[point(-1),1],[point(1+i),2],[point(1-i),1]]) Ex3:barycenter([point(-1),point(1+i),point(1-i)],[1,2,1]) - + ''' return GiacMethods['barycenter'](self,*args) @@ -1505,11 +1505,11 @@ cdef class GiacMethods_base: Help for base: base(Opt) Option for convert : convert(p,base,b)= [a0,a1,..an] or convert([a0,a1,..an],base,b)=p with p=a0+a1*b+....an*b^(n-1). - See also: 1/ convert 2/ horner 3/ revlist + See also: 1/ convert 2/ horner 3/ revlist Ex1: convert(123,base,8) Ex2: convert([3,7,1],base,8) Ex3: horner(revlist([3,7,1]),8) - + ''' return GiacMethods['base'](self,*args) @@ -1518,9 +1518,9 @@ cdef class GiacMethods_base: Help for basis: basis(Lst(vector1,..,vectorn)) Extracts a basis from a spanning set of vectors. - See also: 1/ ker 2/ ibasis + See also: 1/ ker 2/ ibasis Ex1:basis([[1,2,3],[4,5,6],[7,8,9],[10,11,12]]) - + ''' return GiacMethods['basis'](self,*args) @@ -1529,11 +1529,11 @@ cdef class GiacMethods_base: Help for batons: batons(Mtrx) Draws for k=0..nrows, the segments (xk,0)-(xk,yk) where xk=element row k column 0 and yk=element row k column j (j=1..ncols). - See also: 1/ polygonplot 2/ scatterplot 3/ listplot + See also: 1/ polygonplot 2/ scatterplot 3/ listplot Ex1:batons([1,3],[2,5],[3,2]) Ex2:batons([[1,3],[2,5],[3,2]]) Ex3:batons([1,2,3],[3,5,2]) - + ''' return GiacMethods['batons'](self,*args) @@ -1542,9 +1542,9 @@ cdef class GiacMethods_base: Help for bellman_ford: bellman_ford(Graph(G),Vrtx(s),Vrtx(t)||Lst(T)) Returns the length of the shortest path resp. paths from s to vertex t resp. vertices in T in weighted graph G. - See also: 1/ dijkstra 2/ shortest_path + See also: 1/ dijkstra 2/ shortest_path Ex1:bellman_ford(graph(%{[[1,2],-1],[[2,3],-3],[[3,4],-7],[[4,5],-3],[[5,6],-3],[[1,6],-3]%}),1,4) - + ''' return GiacMethods['bellman_ford'](self,*args) @@ -1553,10 +1553,10 @@ cdef class GiacMethods_base: Help for bernoulli: bernoulli(Intg||(Intg,Var)) bernoulli(n) is the n-th number of Bernoulli and bernoulli(n,x) is the n-th polynomial of Bernoulli and the second argument is the variable. - See also: 1/ + See also: 1/ Ex1:bernoulli(6) Ex2:bernoulli(6,x) - + ''' return GiacMethods['bernoulli'](self,*args) @@ -1565,10 +1565,10 @@ cdef class GiacMethods_base: Help for besselJ: besselJ(Real(x),Int(p)) besselJ(x,p) returns the Bessel function of the first kind Jp(x). - See also: 1/ BesselJ 2/ BesselY 3/ besselY + See also: 1/ BesselJ 2/ BesselY 3/ besselY Ex1:besselJ(sqrt(2),2) Ex2:besselJ(sqrt(2),-2) - + ''' return GiacMethods['besselJ'](self,*args) @@ -1577,10 +1577,10 @@ cdef class GiacMethods_base: Help for besselY: besselY(Real(x),Int(p)) besselY(x,p) returns the Bessel function of the second kind Yp(x). - See also: 1/ BesselY 2/ BesselJ 3/ besselJ + See also: 1/ BesselY 2/ BesselJ 3/ besselJ Ex1:besselY(sqrt(2),2) Ex2:besselY(sqrt(2),-2) - + ''' return GiacMethods['besselY'](self,*args) @@ -1589,9 +1589,9 @@ cdef class GiacMethods_base: Help for betad: betad(Real(a>0),Real(b>0),Real(0<=x<=1)) Returns the probability density of the Beta law (=Gamma(a+b)*x^(a-1)*(1-x)^(b-1)/(Gamma(a)*Gamma(b))). - See also: 1/ betad_cdf 2/ betad_icdf + See also: 1/ betad_cdf 2/ betad_icdf Ex1:betad(2.2,1.5,0.8) - + ''' return GiacMethods['betad'](self,*args) @@ -1600,10 +1600,10 @@ cdef class GiacMethods_base: Help for betad_cdf: betad_cdf(Real(a>0),Real(b>0),Real(0<=x0<=1),[Real(0<=y0<=1)]) Returns the probability that a Beta random variable (with a and b as parameters) is less than x0 or between x0 and y0. - See also: 1/ betad 2/ betad_icdf + See also: 1/ betad 2/ betad_icdf Ex1:betad_cdf(2,1,0.2) Ex2:betad_cdf(2,1,0.1,0.3) - + ''' return GiacMethods['betad_cdf'](self,*args) @@ -1612,10 +1612,10 @@ cdef class GiacMethods_base: Help for betad_icdf: betad_icdf(Real(a>0),Real(b>0),Real(0<=p<=1)) Returns h such that the probability that a Beta random variable is less than h is p (0<=p<=1). - See also: 1/ betad_cdf 2/ betad + See also: 1/ betad_cdf 2/ betad Ex1:betad_icdf(2,1,0.95) Ex2:betad_icdf(2,1,0.5) - + ''' return GiacMethods['betad_icdf'](self,*args) @@ -1624,10 +1624,10 @@ cdef class GiacMethods_base: Help for betavariate: betavariate(Real(a),Real(b)) Returns a random real according to the Beta distribution with parameters a>0 and b>0. - See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector + See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector Ex1:betavariate(1,2) Ex2:betavariate(1.5,4) - + ''' return GiacMethods['betavariate'](self,*args) @@ -1636,12 +1636,12 @@ cdef class GiacMethods_base: Help for bezier: bezier(Lst,[plot]) Bezier curve defined by control points. - See also: 1/ parameq + See also: 1/ parameq Ex1:bezier(1,1+i,2+i,3-i,plot) Ex2:bezier(point([0,0,0]),point([1,1,0]),point([0,1,1]),plot) Ex3: parameq(bezier(1,1+i,2+i,3-i)) Ex4: parameq(bezier(point([0,0,0]),point([1,1,0]),point([0,1,1]))) - + ''' return GiacMethods['bezier'](self,*args) @@ -1650,11 +1650,11 @@ cdef class GiacMethods_base: Help for bezout_entiers: bezout_entiers(Intg,Intg) Extended greatest common divisor of 2 integers. - See also: 1/ gcd 2/ iabcuv 3/ egcd + See also: 1/ gcd 2/ iabcuv 3/ egcd Ex1:bezout_entiers(45,75) Ex2:bezout_entiers(21,28) Ex3:bezout_entiers(30,49) - + ''' return GiacMethods['bezout_entiers'](self,*args) @@ -1663,9 +1663,9 @@ cdef class GiacMethods_base: Help for biconnected_components: biconnected_components(Graph(G)) Returns the biconnected components of G as a list of lists of vertices. - See also: 1/ articulation_points 2/ is_biconnected 3/ is_connected 4/ trail + See also: 1/ articulation_points 2/ is_biconnected 3/ is_connected 4/ trail Ex1:biconnected_components(graph(trail(1,2,3,4,2),trail(4,5,6,7,5))) - + ''' return GiacMethods['biconnected_components'](self,*args) @@ -1674,7 +1674,7 @@ cdef class GiacMethods_base: Help for binomial: binomial(Intg(n),Intg(k),[Real(p in 0..1)]) Returns comb(n,k)*p^k*(1-p)^(n-k) or comb(n,k) if no 3rd argument. - See also: 1/ binomial_cdf 2/ binomial_icdf 3/ multinomial 4/ randvector 5/ ranm + See also: 1/ binomial_cdf 2/ binomial_icdf 3/ multinomial 4/ randvector 5/ ranm Ex1:binomial(4,2) Ex2:binomial(4,0,0.5) Ex3:binomial(4,2,0.5) @@ -1682,7 +1682,7 @@ cdef class GiacMethods_base: Ex5: assume(p>=0 and p<=1);binomial(4,p,2) Ex6: randvector(6,binomial,4,0.2) Ex7: ranm(4,6,binomial,4,0.7) - + ''' return GiacMethods['binomial'](self,*args) @@ -1691,11 +1691,11 @@ cdef class GiacMethods_base: Help for binomial_cdf: binomial_cdf(Intg(n),Real(p),Real(x),[Real(y)]) Returns Proba(X<=x) or Proba(x<=X<=y) when X follows the B(n,p) law. - See also: 1/ binomial 2/ binomial_icdf + See also: 1/ binomial 2/ binomial_icdf Ex1:binomial_cdf(4,0.5,2) Ex2:binomial_cdf(4,0.1,2) Ex3:binomial_cdf(4,0.5,2,3) - + ''' return GiacMethods['binomial_cdf'](self,*args) @@ -1704,10 +1704,10 @@ cdef class GiacMethods_base: Help for binomial_icdf: binomial_icdf(Intg(n),Real(p),Real(t)) Returns h such as Proba(X<=h)=t when X follows the B(n,p) law. - See also: 1/ binomial 2/ binomial_cdf + See also: 1/ binomial 2/ binomial_cdf Ex1:binomial_icdf(4,0.5,0.68) Ex2:binomial_icdf(4,0.1,0.95) - + ''' return GiacMethods['binomial_icdf'](self,*args) @@ -1716,8 +1716,8 @@ cdef class GiacMethods_base: Help for bins: bins(Opt) Option for the kernel_density command. - See also: 1/ kernel_density 2/ bandwidth - + See also: 1/ kernel_density 2/ bandwidth + ''' return GiacMethods['bins'](self,*args) @@ -1726,8 +1726,8 @@ cdef class GiacMethods_base: Help for bipartite: bipartite(Opt) Option for the draw_graph command - See also: 1/ draw_graph - + See also: 1/ draw_graph + ''' return GiacMethods['bipartite'](self,*args) @@ -1736,9 +1736,9 @@ cdef class GiacMethods_base: Help for bipartite_matching: bipartite_matching(Graph(G)) Returns the list of edges in a maximum matching of the undirected unweighted bipartite graph G. - See also: 1/ is_bipartite 2/ maximum_matching + See also: 1/ is_bipartite 2/ maximum_matching Ex1:bipartite_matching(graph("desargues")) - + ''' return GiacMethods['bipartite_matching'](self,*args) @@ -1747,14 +1747,14 @@ cdef class GiacMethods_base: Help for bisection_solver: bisection_solver(Opt) Argument for fsolve giving the method for solving a numerical equation. - See also: 1/ fsolve + See also: 1/ fsolve Ex1: fsolve(cos(x)=x,x,0..1,bisection_solver) Ex2: fsolve(cos(x)=x,x,0..1,brent_solver) Ex3: fsolve(cos(x)=x,x,0..1,falsepos_solver) Ex4: fsolve(cos(x)=x,x,0,newton_solver) Ex5: fsolve(cos(x)=x,x,0,secant_solver) Ex6: fsolve(cos(x)=x,x,0,steffenson_solver) - + ''' return GiacMethods['bisection_solver'](self,*args) @@ -1763,9 +1763,9 @@ cdef class GiacMethods_base: Help for bisector: bisector((Pnt(A) or Cplx),(Pnt(B) or Cplx),(Pnt(C) or Cplx)) Draws the bisector of the angle (AB,AC) given by 3 points A,B,C. - See also: 1/ angle 2/ exbisector + See also: 1/ angle 2/ exbisector Ex1:bisector(0,1,i) - + ''' return GiacMethods['bisector'](self,*args) @@ -1774,9 +1774,9 @@ cdef class GiacMethods_base: Help for bit_depth: bit_depth(Lst(clip)) Returns the bit depth of an audio clip. - See also: 1/ channels 2/ channel_data 3/ duration 4/ samplerate + See also: 1/ channels 2/ channel_data 3/ duration 4/ samplerate Ex1:bit_depth(readwav("/some/file")) - + ''' return GiacMethods['bit_depth'](self,*args) @@ -1785,9 +1785,9 @@ cdef class GiacMethods_base: Help for bitand: bitand(Intg,Intg) Logical bit and. - See also: 1/ bitxor 2/ bitor + See also: 1/ bitxor 2/ bitor Ex1:bitand(0x12,0x38) - + ''' return GiacMethods['bitand'](self,*args) @@ -1796,9 +1796,9 @@ cdef class GiacMethods_base: Help for bitor: bitor(Intg,Intg) Inclusive logical bit or. - See also: 1/ bitxor 2/ bitand + See also: 1/ bitxor 2/ bitand Ex1:bitor(0x12,0x38) - + ''' return GiacMethods['bitor'](self,*args) @@ -1807,9 +1807,9 @@ cdef class GiacMethods_base: Help for bitxor: bitxor(Intg,Intg) Exclusive logical bit or. - See also: 1/ bitor 2/ bitand + See also: 1/ bitor 2/ bitand Ex1:bitxor(0x12,0x38) - + ''' return GiacMethods['bitxor'](self,*args) @@ -1818,9 +1818,9 @@ cdef class GiacMethods_base: Help for blackman_harris_window: blackman_harris_window(Lst,[Interval(n1..n2)]) Applies the Blackman-Harris windowing function to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ bartlett_hann_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window + See also: 1/ bartlett_hann_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window Ex1: scatterplot(blackman_harris_window(randvector(1000,0..1))) - + ''' return GiacMethods['blackman_harris_window'](self,*args) @@ -1829,9 +1829,9 @@ cdef class GiacMethods_base: Help for blackman_window: blackman_window(Lst,[Real(a)],[Interval(n1..n2)]) Applies the Blackman windowing function with parameter a (by default a=0.16) to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ bartlett_harris_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window + See also: 1/ blackman_harris_window 2/ bartlett_harris_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window Ex1: scatterplot(blackman_window(randvector(1000,0..1))) - + ''' return GiacMethods['blackman_window'](self,*args) @@ -1840,10 +1840,10 @@ cdef class GiacMethods_base: Help for blockmatrix: blockmatrix(Intg(n),Intg(m),Lst) Returns the matrix obtained from the list divided into n lists of dimension m. - See also: 1/ list2mat + See also: 1/ list2mat Ex1:blockmatrix(2,3,[idn(2),idn(2),idn(2),idn(2),idn(2),idn(2)]) Ex2:blockmatrix(2,2,[idn(2),newMat(2,3),newMat(3,2),idn(3)]) - + ''' return GiacMethods['blockmatrix'](self,*args) @@ -1852,9 +1852,9 @@ cdef class GiacMethods_base: Help for bohman_window: bohman_window(Lst,[Interval(n1..n2)]) Applies the Bohman windowing function to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ blackman_window 3/ bartlett_hann_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window + See also: 1/ blackman_harris_window 2/ blackman_window 3/ bartlett_hann_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window Ex1: scatterplot(bohman_window(randvector(1000,0..1))) - + ''' return GiacMethods['bohman_window'](self,*args) @@ -1863,10 +1863,10 @@ cdef class GiacMethods_base: Help for border: border(Mtrx(A),Lst(b)) Returns the matrix obtained by augmenting A with b as the last column, if nrows(A)=size(b), border(A,b)=tran(append(tran(A),b)). - See also: 1/ tran 2/ append 3/ augment + See also: 1/ tran 2/ append 3/ augment Ex1:border([[1,2,3,4],[4,5,6,8],[7,8,9,10]],[1,3,5]) Ex2:border([[1,2,3],[4,5,6],[7,8,9]],[1,0,1]) - + ''' return GiacMethods['border'](self,*args) @@ -1875,9 +1875,9 @@ cdef class GiacMethods_base: Help for boxcar: boxcar(Real(a),Real(b),Expr(x)) Returns the value at x of the boxcar function corresponding to a and b. - See also: 1/ rect 2/ Heaviside + See also: 1/ rect 2/ Heaviside Ex1:boxcar(1,2,x) - + ''' return GiacMethods['boxcar'](self,*args) @@ -1886,12 +1886,12 @@ cdef class GiacMethods_base: Help for boxwhisker: boxwhisker(Lst,[Lst],[x=a..b||y=a..b]) Box and Whisker plot for a statistical series. - See also: 1/ quartiles + See also: 1/ quartiles Ex1:boxwhisker([-1,1,2,2.2,3,4,-2,5]) Ex2:boxwhisker([1,2,3,5,10,4],x=1..2) Ex3:boxwhisker([1,2,3,5,10,4],[1,2,3,1,2,3]) Ex4:boxwhisker([[6,0,1,3,4,2,5],[0,1,3,4,2,5,6],[1,3,4,2,5,6,0],[3,4,2,5,6,0,1],[4,2,5,6,0,1,3],[2,5,6,0,1,3,4]]) - + ''' return GiacMethods['boxwhisker'](self,*args) @@ -1900,14 +1900,14 @@ cdef class GiacMethods_base: Help for brent_solver: brent_solver(Opt) Argument for fsolve giving the method for solving a numerical equation. - See also: 1/ fsolve + See also: 1/ fsolve Ex1: fsolve(cos(x)=x,x,0..1,bisection_solver) Ex2: fsolve(cos(x)=x,x,0..1,brent_solver) Ex3: fsolve(cos(x)=x,x,0..1,falsepos_solver) Ex4: fsolve(cos(x)=x,x,0,newton_solver) Ex5: fsolve(cos(x)=x,x,0,secant_solver) Ex6: fsolve(cos(x)=x,x,0,steffenson_solver) - + ''' return GiacMethods['brent_solver'](self,*args) @@ -1916,10 +1916,10 @@ cdef class GiacMethods_base: Help for bvpsolve: bvpsolve(Expr(f(x,y,y')),Lst(x=a..b,y),Lst(y(a),y(b),[y'(1)]),[options]) Returns an approximation of the function y (and optionally of y') on the interval a..b. - See also: 1/ odesolve + See also: 1/ odesolve Ex1:bvpsolve((32+2x^3-y*diff(y(x),x))/8,[x=1..3,y],[17,43/3],20) Ex2:bvpsolve((x^2*diff(y(x),x)^2-9y^2+4x^6)/x^5,[x=1..2,y],[0,ln(256),1],10,output=spline) - + ''' return GiacMethods['bvpsolve'](self,*args) @@ -1928,11 +1928,11 @@ cdef class GiacMethods_base: Help for cFactor: cFactor(Expr) Factorization of the expression in ℂ (on the Gaussian integers if there are more than 2 variables). - See also: 1/ factor + See also: 1/ factor Ex1:cFactor(x^2*y+y) Ex2:cFactor(x^2*y^2+y^2+4*x^2+4) Ex3:cFactor(x^2*y^2+y^2+2*x^2+2) - + ''' return GiacMethods['cFactor'](self,*args) @@ -1941,12 +1941,12 @@ cdef class GiacMethods_base: Help for cSolve: cSolve(LstEq,LstVar) Returns the list of complex solutions of an equation or a matrix where the rows are ℂ-solutions of a system of polynomial equations. - See also: 1/ cZeros 2/ solve 3/ fslove + See also: 1/ cZeros 2/ solve 3/ fslove Ex1:cSolve(x^4-1,x) Ex2:cSolve(x^4-y^4 and x+y=2,[x,y]) Ex3:cSolve(x^4-y^4 and x+y=0 and x^2=2*x,[x,y]) Ex4:cSolve(u*v-u=v and v^2=u,[u,v]) - + ''' return GiacMethods['cSolve'](self,*args) @@ -1955,10 +1955,10 @@ cdef class GiacMethods_base: Help for cZeros: cZeros(Expr(Xpr)||LstExpr, [Var||LstVar]) Returns the list of complex solutions of Xpr=0 or the matrix where the rows are the solutions of the system : Xpr1=0,Xpr2=0... - See also: 1/ solve + See also: 1/ solve Ex1:cZeros(x^2-1) Ex2:cZeros([x^2-1,x^2-y^2],[x,y]) - + ''' return GiacMethods['cZeros'](self,*args) @@ -1967,11 +1967,11 @@ cdef class GiacMethods_base: Help for camembert: camembert(Mtrx) Draws pie chart of a one variable statistical series. - See also: 1/ bar_plot + See also: 1/ bar_plot Ex1:camembert([["France",6],["Allemagne",12],["Suisse",5]]) Ex2:camembert([3/2,2/3,5/4,4/5,7/6,6/7,9/8,8/9,11/10]) Ex3:camembert([[2,"xyz","abc"],["A",2,5],["B",5,6],["C",7,7]]) - + ''' return GiacMethods['camembert'](self,*args) @@ -1980,10 +1980,10 @@ cdef class GiacMethods_base: Help for canonical_form: canonical_form(Trinom(a*x^2+b*x+c),[Var]) Canonical_form of a 2nd degree polynomial. - See also: 1/ + See also: 1/ Ex1:canonical_form(2*x^2-12*x+1) Ex2:canonical_form(2*a^2-12*a+1,a) - + ''' return GiacMethods['canonical_form'](self,*args) @@ -1992,9 +1992,9 @@ cdef class GiacMethods_base: Help for canonical_labeling: canonical_labeling(Graph(G)) Returns the permutation representing the canonical labeling of G. - See also: 1/ isomorphic_copy 2/ relabel_vertices + See also: 1/ isomorphic_copy 2/ relabel_vertices Ex1:canonical_labeling(graph("petersen")) - + ''' return GiacMethods['canonical_labeling'](self,*args) @@ -2003,9 +2003,9 @@ cdef class GiacMethods_base: Help for cartesian_product: cartesian_product(Seq(G1,G2,..)) Returns the Cartesian product of graphs G1, G2, ... with vertices labelled as "u:v:..." where u, v, ... are vertices from G1, G2, ..., respectively. - See also: 1/ tensor_product + See also: 1/ tensor_product Ex1:cartesian_product(graph(trail(1,2,3,4,5,2)),star_graph(3)) - + ''' return GiacMethods['cartesian_product'](self,*args) @@ -2014,9 +2014,9 @@ cdef class GiacMethods_base: Help for cauchy: cauchy(Real(x0),Real(a),Real(x)) Returns the density of probability at x of the Cauchy law with parameters x0 and a (by default x0=0 and a=1). - See also: 1/ cauchy_cdf 2/ cauchy_icdf + See also: 1/ cauchy_cdf 2/ cauchy_icdf Ex1:cauchy(0.0,2.0,1.0) - + ''' return GiacMethods['cauchy'](self,*args) @@ -2025,10 +2025,10 @@ cdef class GiacMethods_base: Help for cauchy_cdf: cauchy_cdf(Real(x0),Real(a),Real(x),[Real(y)]) Returns the probability that a Cauchy random variable is less than x. - See also: 1/ cauchyd 2/ cauchy_icdf + See also: 1/ cauchyd 2/ cauchy_icdf Ex1:cauchy_cdf(0.0,2.0,2.1) Ex2:cauchy_cdf(2,3,-1.9,1.4) - + ''' return GiacMethods['cauchy_cdf'](self,*args) @@ -2037,9 +2037,9 @@ cdef class GiacMethods_base: Help for cauchy_icdf: cauchy_icdf(Real(x0),Real(a),Real(p)) Returns h such that the probability that a Cauchy random variable is less than h is p (0<=p<=1). - See also: 1/ cauchy_cdf 2/ cauchy + See also: 1/ cauchy_cdf 2/ cauchy Ex1:cauchy_icdf(0.0,2.0,0.95) - + ''' return GiacMethods['cauchy_icdf'](self,*args) @@ -2048,9 +2048,9 @@ cdef class GiacMethods_base: Help for cauchyd: cauchyd(Real(x0),Real(a),Real(x)) Returns the density of probability at x of the Cauchy law with parameters x0 and a (by default x0=0 and a=1). - See also: 1/ cauchy_cdf 2/ cauchy_icdf + See also: 1/ cauchy_cdf 2/ cauchy_icdf Ex1:cauchyd(0.0,2.0,1.0) - + ''' return GiacMethods['cauchyd'](self,*args) @@ -2059,10 +2059,10 @@ cdef class GiacMethods_base: Help for cauchyd_cdf: cauchyd_cdf(Real(x0),Real(a),Real(x),[Real(y)]) Returns the probability that a Cauchy random variable is less than x. - See also: 1/ cauchyd 2/ cauchy_icdf + See also: 1/ cauchyd 2/ cauchy_icdf Ex1:cauchyd_cdf(0.0,2.0,2.1) Ex2:cauchyd_cdf(2,3,-1.9,1.4) - + ''' return GiacMethods['cauchyd_cdf'](self,*args) @@ -2071,9 +2071,9 @@ cdef class GiacMethods_base: Help for cauchyd_icdf: cauchyd_icdf(Real(x0),Real(a),Real(p)) Returns h such that the probability that a Cauchy random variable is less than h is p (0<=p<=1). - See also: 1/ cauchy_cdf 2/ cauchy + See also: 1/ cauchy_cdf 2/ cauchy Ex1:cauchyd_icdf(0.0,2.0,0.95) - + ''' return GiacMethods['cauchyd_icdf'](self,*args) @@ -2082,12 +2082,12 @@ cdef class GiacMethods_base: Help for cdf: cdf(Func,FuncParams) Cumulative distribution function. - See also: 1/ icdf 2/ binomial_cdf 3/ normald_cdf 4/ plotcdf + See also: 1/ icdf 2/ binomial_cdf 3/ normald_cdf 4/ plotcdf Ex1:cdf(binomial,10,0.5,4) Ex2:cdf(normald,0.0,1.0,2.0) Ex3:cdf([1,3,4,3,5,6],4) Ex4:cdf([1,3,4,3,5,6],plot) - + ''' return GiacMethods['cdf'](self,*args) @@ -2096,10 +2096,10 @@ cdef class GiacMethods_base: Help for ceil: ceil(Real or Cplx) Returns the smallest integer >= to the argument. - See also: 1/ floor 2/ round + See also: 1/ floor 2/ round Ex1:ceil(-4.2) Ex2:ceil(4.3+2.4*i) - + ''' return GiacMethods['ceil'](self,*args) @@ -2108,10 +2108,10 @@ cdef class GiacMethods_base: Help for ceiling: ceiling(Real or Cplx) Returns the smallest integer >= to the argument. - See also: 1/ floor 2/ round + See also: 1/ floor 2/ round Ex1:ceiling(-4.2) Ex2:ceiling(4.3+2.4*i) - + ''' return GiacMethods['ceiling'](self,*args) @@ -2120,10 +2120,10 @@ cdef class GiacMethods_base: Help for center: center(Crcle) Shows the center of a circle. - See also: 1/ circle 2/ radius + See also: 1/ circle 2/ radius Ex1:center(circle(1+i,2)) Ex2:center(circumcircle(0,1,1+i)) - + ''' return GiacMethods['center'](self,*args) @@ -2132,10 +2132,10 @@ cdef class GiacMethods_base: Help for center2interval: center2interval(LstVal(l),[Real(a0)]) Returns the list of intervals beginning with a0 and with l as centers. - See also: 1/ interval2center + See also: 1/ interval2center Ex1:center2interval([2,5,9],1) Ex2:center2interval([2,5,8]) - + ''' return GiacMethods['center2interval'](self,*args) @@ -2144,10 +2144,10 @@ cdef class GiacMethods_base: Help for centered_cube: centered_cube(Pnt(A),Pnt(B),Pnt(C)) Draws the direct cube with center A, vertex B and such that the plane ABC contains an axis of symmetry of the cube. - See also: 1/ parallelepiped 2/ cube 3/ icosahedron 4/ dodecahedron 5/ octahedron 6/ centered_tetrahedron + See also: 1/ parallelepiped 2/ cube 3/ icosahedron 4/ dodecahedron 5/ octahedron 6/ centered_tetrahedron Ex1:centered_cube([0,0,0],[3,0,0],[0,0,1]) Ex2:centered_cube(evalf([0,0,0],[3,2,4],[1,1,0])) - + ''' return GiacMethods['centered_cube'](self,*args) @@ -2156,10 +2156,10 @@ cdef class GiacMethods_base: Help for centered_tetrahedron: centered_tetrahedron(Pnt(A),Pnt(B),Pnt(C)) Draws the regular direct pyramid with center A, vertex B and a vertex in the plane (A,B,C). - See also: 1/ cube 2/ tetrahedron 3/ icosahedron 4/ dodecahedron 5/ octahedron + See also: 1/ cube 2/ tetrahedron 3/ icosahedron 4/ dodecahedron 5/ octahedron Ex1:centered_tetrahedron([0,0,0],[3,0,0],[0,1,0]) Ex2:centered_tetrahedron(evalf([0,0,0],[3,2,4],[1,1,0])) - + ''' return GiacMethods['centered_tetrahedron'](self,*args) @@ -2168,11 +2168,11 @@ cdef class GiacMethods_base: Help for cfactor: cfactor(Expr) Factorization of the expression in ℂ (on the Gaussian integers if there are more than 2 variables). - See also: 1/ factor + See also: 1/ factor Ex1:cfactor(x^2*y+y) Ex2:cfactor(x^2*y^2+y^2+4*x^2+4) Ex3:cfactor(x^2*y^2+y^2+2*x^2+2) - + ''' return GiacMethods['cfactor'](self,*args) @@ -2181,10 +2181,10 @@ cdef class GiacMethods_base: Help for cfsolve: cfsolve(Expr,Var,[Guess or Interval],[Method]) Numerical solution of an equation or a system of equations on ℂ. - See also: 1/ fsolve 2/ nSolve 3/ csolve 4/ solve + See also: 1/ fsolve 2/ nSolve 3/ csolve 4/ solve Ex1:cfsolve(cos(x)=2) Ex2:cfsolve([x^2+y+2,x+y^2+2],[x,y]) - + ''' return GiacMethods['cfsolve'](self,*args) @@ -2193,10 +2193,10 @@ cdef class GiacMethods_base: Help for changebase: changebase(Mtrx(A),Mtrx(P)) Returns the matrix B=inv(P)*A*P. - See also: 1/ + See also: 1/ Ex1:changebase([[1,2],[1,3]],[[1,1],[0,1]]) Ex2:changebase([[1,2],[1,3]],[[1,0],[1,1]]) - + ''' return GiacMethods['changebase'](self,*args) @@ -2205,12 +2205,12 @@ cdef class GiacMethods_base: Help for channel_data: channel_data(Lst(clip),[Intg(chn) or matrix],[range=a..b]) Extracts the data from an audio clip (optionally specifying the channel and range). - See also: 1/ bit_depth 2/ channels 3/ duration 4/ samplerate + See also: 1/ bit_depth 2/ channels 3/ duration 4/ samplerate Ex1:channel_data(readwav("/some/file")) Ex2:channel_data(readwav("/some/file"),matrix) Ex3:channel_data(readwav("/some/file"),2) Ex4:channel_data(readwav("/some/file"),matrix,range=1.0..2.5) - + ''' return GiacMethods['channel_data'](self,*args) @@ -2219,9 +2219,9 @@ cdef class GiacMethods_base: Help for channels: channels(Lst(clip)) Returns the number of channels in audio clip. - See also: 1/ bit_depth 2/ channel_data 3/ duration 4/ samplerate + See also: 1/ bit_depth 2/ channel_data 3/ duration 4/ samplerate Ex1:channels(readwav("/some/file")) - + ''' return GiacMethods['channels'](self,*args) @@ -2230,10 +2230,10 @@ cdef class GiacMethods_base: Help for char: char(Intg or Lst(Intg)) Returns the string corresponding to the character code of the argument. - See also: 1/ asc 2/ ord + See also: 1/ asc 2/ ord Ex1:char(65) Ex2:char([65,66,67]) - + ''' return GiacMethods['char'](self,*args) @@ -2242,12 +2242,12 @@ cdef class GiacMethods_base: Help for charpoly: charpoly(Mtrx,[Var]) List of the coefficients of the characteristic polynomial of a matrix or characteristic polynomial of a matrix with the second argument as variable. - See also: 1/ jordan 2/ egv 3/ egvl 4/ companion 5/ rat_jordan 6/ pmin 7/ adjoint_matrix + See also: 1/ jordan 2/ egv 3/ egvl 4/ companion 5/ rat_jordan 6/ pmin 7/ adjoint_matrix Ex1:charpoly([[1,2],[3,4]]) Ex2:charpoly([[1,2],[3,4]],x) Ex3:charpoly([[1,2,3],[1,3,6],[2,5,7]]) Ex4:charpoly([[1,2,3],[1,3,6],[2,5,7]],z) - + ''' return GiacMethods['charpoly'](self,*args) @@ -2256,10 +2256,10 @@ cdef class GiacMethods_base: Help for chinrem: chinrem([Lst||Expr,Lst||Expr],[Lst||Expr,Lst||Expr]) Chinese remainder for polynomials written as lists or no. - See also: 1/ ichinrem + See also: 1/ ichinrem Ex1:chinrem([x+2,x^2+1],[x+1,x^2+x+1]) Ex2:chinrem([[1,2],[1,0,1]],[[1,1],[1,1,1]]) - + ''' return GiacMethods['chinrem'](self,*args) @@ -2268,12 +2268,12 @@ cdef class GiacMethods_base: Help for chisquare: chisquare(Intg(n),Real(x0)) Returns the probability density of the Chi^2 law at x0 (n is the number of degrees of freedom). - See also: 1/ chisquare_cdf 2/ chisquare_icdf 3/ randvector 4/ ranm + See also: 1/ chisquare_cdf 2/ chisquare_icdf 3/ randvector 4/ ranm Ex1:chisquare(2,3.2) Ex2:chisquare(4,10.5) Ex3: randvector(3,chisquare,2) Ex4: ranm(4,3,chisquare,2) - + ''' return GiacMethods['chisquare'](self,*args) @@ -2282,10 +2282,10 @@ cdef class GiacMethods_base: Help for chisquare_cdf: chisquare_cdf(Intg(n),Real(x0)) Returns the probability that a Chi^2 random variable is less than x0 (n is the number of degrees of freedom). - See also: 1/ UTPC 2/ chisquare_icdf 3/ chisquared + See also: 1/ UTPC 2/ chisquare_icdf 3/ chisquared Ex1:chisquare_cdf(2,6.1) Ex2:chisquare_cdf(4,6.1) - + ''' return GiacMethods['chisquare_cdf'](self,*args) @@ -2294,10 +2294,10 @@ cdef class GiacMethods_base: Help for chisquare_icdf: chisquare_icdf(Intg(n),Real(p)) Returns h such as the probability that a Chi^2 random variable is less than h is p (n is the number of degrees of freedom and 0<=p<=1). - See also: 1/ chisquare_cdf 2/ chisquared + See also: 1/ chisquare_cdf 2/ chisquared Ex1:chisquare_icdf(2,0.95) Ex2:chisquare_icdf(4,0.05) - + ''' return GiacMethods['chisquare_icdf'](self,*args) @@ -2306,12 +2306,12 @@ cdef class GiacMethods_base: Help for chisquared: chisquared(Intg(n),Real(x0)) Returns the probability density of the Chi^2 law at x0 (n is the number of degrees of freedom). - See also: 1/ chisquare_cdf 2/ chisquare_icdf 3/ randvector 4/ ranm + See also: 1/ chisquare_cdf 2/ chisquare_icdf 3/ randvector 4/ ranm Ex1:chisquared(2,3.2) Ex2:chisquared(4,10.5) Ex3: randvector(3,chisquare,2) Ex4: ranm(4,3,chisquare,2) - + ''' return GiacMethods['chisquared'](self,*args) @@ -2320,10 +2320,10 @@ cdef class GiacMethods_base: Help for chisquared_cdf: chisquared_cdf(Intg(n),Real(x0)) Returns the probability that a Chi^2 random variable is less than x0 (n is the number of degrees of freedom). - See also: 1/ UTPC 2/ chisquare_icdf 3/ chisquared + See also: 1/ UTPC 2/ chisquare_icdf 3/ chisquared Ex1:chisquared_cdf(2,6.1) Ex2:chisquared_cdf(4,6.1) - + ''' return GiacMethods['chisquared_cdf'](self,*args) @@ -2332,10 +2332,10 @@ cdef class GiacMethods_base: Help for chisquared_icdf: chisquared_icdf(Intg(n),Real(p)) Returns h such as the probability that a Chi^2 random variable is less than h is p (n is the number of degrees of freedom and 0<=p<=1). - See also: 1/ chisquare_cdf 2/ chisquared + See also: 1/ chisquare_cdf 2/ chisquared Ex1:chisquared_icdf(2,0.95) Ex2:chisquared_icdf(4,0.05) - + ''' return GiacMethods['chisquared_icdf'](self,*args) @@ -2344,7 +2344,7 @@ cdef class GiacMethods_base: Help for chisquaret: chisquaret(Data,[Func],[FuncParams]) Chi^2 test : fitness between 2 (or n) samples or between 1 sample and a distribution law (multinomial or given by a law). - See also: 1/ normalt 2/ studentt 3/ kolmogorovt + See also: 1/ normalt 2/ studentt 3/ kolmogorovt Ex1:chisquaret([57,54]) Ex2:chisquaret([1,1,1,1,1,0,0,1,0,0,1,1,1,0,1,1,0,1,1,0,0,0,0],[.4,.6]) Ex3:chisquaret([57,30],[.6,.4]) @@ -2354,7 +2354,7 @@ cdef class GiacMethods_base: Ex7:chisquaret(ranv(1000,normald,0,.2),normald) Ex8:chisquaret([11,16,17,22,14,10],[1/6,1/6,1/6,1/6,1/6,1/6]) Ex9:chisquaret([11,16,17,22,14,10],[(1/6)$6]) - + ''' return GiacMethods['chisquaret'](self,*args) @@ -2363,12 +2363,12 @@ cdef class GiacMethods_base: Help for choice: choice(Lst(L)) choice(L)=rand(L)=one extracted element of L. - See also: 1/ rand 2/ sample + See also: 1/ rand 2/ sample Ex1:choice([1,2,3,4,5,6]) Ex2:choice(["r","r","r","b","n"]) Ex3: L:=[1,2,3,4,5,6];L:=choice(L) Ex4: L:=[1,2,3,4,5,6];L.choice() - + ''' return GiacMethods['choice'](self,*args) @@ -2377,9 +2377,9 @@ cdef class GiacMethods_base: Help for cholesky: cholesky(Mtrx) For a numerical symmetric matrix A, returns L matrix such that A=L*tran(L). - See also: 1/ lu 2/ qr 3/ gauss + See also: 1/ lu 2/ qr 3/ gauss Ex1:cholesky([[3,1],[1,4]]) - + ''' return GiacMethods['cholesky'](self,*args) @@ -2388,10 +2388,10 @@ cdef class GiacMethods_base: Help for chr: chr(Intg or Lst(Intg)) Returns the string corresponding to the character code of the argument. - See also: 1/ asc 2/ ord + See also: 1/ asc 2/ ord Ex1:chr(65) Ex2:chr([65,66,67]) - + ''' return GiacMethods['chr'](self,*args) @@ -2400,13 +2400,13 @@ cdef class GiacMethods_base: Help for chrem: chrem(LstIntg(a,b,c....),LstIntg(p,q,r,....)) Chinese remainders for integers or for polynomials. - See also: 1/ gcd 2/ fracmod 3/ chinrem 4/ ichinrem + See also: 1/ gcd 2/ fracmod 3/ chinrem 4/ ichinrem Ex1:chrem(symbolique.) Ex2:chrem([2,3],[7,5]) Ex3:chrem([2,4,6],[3,5,7]) Ex4:chrem([2,4,6,7],[3,5,7,11]) Ex5:chrem([2*x+1,4*x+2,6*x-1,x+1],[3,5,7,11]) - + ''' return GiacMethods['chrem'](self,*args) @@ -2415,10 +2415,10 @@ cdef class GiacMethods_base: Help for chromatic_index: chromatic_index(Graph(G),[Lst(cols)]) Returns the number of colors in the minimal edge coloring of G. If an unassigned identifier cols is given, the coloring is stored to it. - See also: 1/ minimal_edge_coloring 2/ chromatic_number + See also: 1/ minimal_edge_coloring 2/ chromatic_number Ex1:chromatic_index(graph("petersen")) Ex2:chromatic_index(graph("dodecahedron"),colors) - + ''' return GiacMethods['chromatic_index'](self,*args) @@ -2428,7 +2428,7 @@ cdef class GiacMethods_base: chromatic_number(Graph(G)) Returns the chromatic number of G. Ex1:chromatic_number(graph("petersen")) - + ''' return GiacMethods['chromatic_number'](self,*args) @@ -2437,10 +2437,10 @@ cdef class GiacMethods_base: Help for chromatic_polynomial: chromatic_polynomial(Graph(G),[Var(t)]) Returns the chromatic polynomial [or its value at point t] of undirected unweighted graph G. - See also: 1/ flow_polynomial 2/ reliability_polynomial 3/ tutte_polynomial + See also: 1/ flow_polynomial 2/ reliability_polynomial 3/ tutte_polynomial Ex1:chromatic_polynomial(graph("petersen")) Ex2:chromatic_polynomial(graph("petersen"),3) - + ''' return GiacMethods['chromatic_polynomial'](self,*args) @@ -2449,7 +2449,7 @@ cdef class GiacMethods_base: Help for circle: circle((Pnt(M) or Cplx(M),(Pnt(N) or Cplx(zN)),[Real(a)],[Real(b)],[Var(A)],[Var(B)]) Define for 2-d a circle with a diameter MN (arg1=M or zM,arg2=N) or with center and radius (arg1=M or zM,arg2=zN) and (center=M and radius=abs(zN)) [or the arc AB, A angle a, B angle b, (MN=angle 0) or M(M+zN)=angle 0] or by its equation and for 3-d with a diameter and a third point. - See also: 1/ circumcircle 2/ incircle 3/ excircle 4/ center 5/ radius 6/ sphere 7/ Circle + See also: 1/ circumcircle 2/ incircle 3/ excircle 4/ center 5/ radius 6/ sphere 7/ Circle Ex1:circle(0,point(2*i)) Ex2:circle(i,i) Ex3:circle(i,1) @@ -2458,7 +2458,7 @@ cdef class GiacMethods_base: Ex6:circle(x^2+y^2-x-y) Ex7:circle(cercle(point([-1,0,0]),point([1,0,0]),point([0,2,0]))) Ex8:circle(cercle([-1,0,0],point([1,0,0]),[0,2,0])) - + ''' return GiacMethods['circle'](self,*args) @@ -2467,9 +2467,9 @@ cdef class GiacMethods_base: Help for circumcircle: circumcircle((Pnt or Cplx),(Pnt or Cplx),((Pnt or Cplx)) circumcircle(A,B,C)=circumcircle of the triangle ABC. - See also: 1/ circle 2/ incircle 3/ excircle + See also: 1/ circle 2/ incircle 3/ excircle Ex1:circumcircle(0,1,1+i) - + ''' return GiacMethods['circumcircle'](self,*args) @@ -2478,13 +2478,13 @@ cdef class GiacMethods_base: Help for classes: classes(Lst(l),[ClassMin],[ClassSize||Lst(Center)]) Returns the matrix [[class,number],...] obtained with class_min and class_size: see init of geo or argument 2 and 3 or with the list of centers. - See also: 1/ histogram 2/ cumulated_frequencies 3/ bar_plot 4/ frequencies + See also: 1/ histogram 2/ cumulated_frequencies 3/ bar_plot 4/ frequencies Ex1:classes([1,1.2,1.4,1.6,1.8,2,2.5]) Ex2:classes([1,1.2,1.4,1.6,1.8,2,2.5],1.2,0.5) Ex3:classes([1,1.2,1.4,1.6,1.8,2,2.5],1,[1.2,1.6,2,2.4]) Ex4:classes([1,1.2,1.4,1.6,1.8,2,2.5],1,[1.2,1.6,2.2]) Ex5:classes([0,0.5,1,1.5,2,2.5,3,3.5,4],[0..2,2..4,4..6]) - + ''' return GiacMethods['classes'](self,*args) @@ -2493,9 +2493,9 @@ cdef class GiacMethods_base: Help for clear: clear(NULL) Clears the list of pixels. - See also: 1/ set_pixel 2/ show_pixels + See also: 1/ set_pixel 2/ show_pixels Ex1:clear() - + ''' return GiacMethods['clear'](self,*args) @@ -2504,11 +2504,11 @@ cdef class GiacMethods_base: Help for clique_cover: clique_cover(Graph(G),[Intg(k)]) Returns a clique vertex cover of G [containing at most k cliques]. - See also: 1/ clique_cover_number 2/ maximal_cliques + See also: 1/ clique_cover_number 2/ maximal_cliques Ex1:clique_cover(graph("petersen")) Ex2:clique_cover(cycle_graph(5)) Ex3:clique_cover(graph_complement(complete_graph(3,4))) - + ''' return GiacMethods['clique_cover'](self,*args) @@ -2517,11 +2517,11 @@ cdef class GiacMethods_base: Help for clique_cover_number: clique_cover_number(Graph(G)) Returns the clique cover number of G. - See also: 1/ clique_cover 3/ maximal_cliques + See also: 1/ clique_cover 3/ maximal_cliques Ex1:clique_cover_number(graph("petersen")) Ex2:clique_cover_number(cycle_graph(5)) Ex3:clique_cover_number(graph_complement(complete_graph(3,4))) - + ''' return GiacMethods['clique_cover_number'](self,*args) @@ -2530,9 +2530,9 @@ cdef class GiacMethods_base: Help for clique_number: clique_number(Graph(G)) Returns the clique number of G, which is equal to the size of a maximum clique in G. - See also: 1/ maximum_clique + See also: 1/ maximum_clique Ex1:clique_number(graph_complement(complete_graph(3,4))) - + ''' return GiacMethods['clique_number'](self,*args) @@ -2541,11 +2541,11 @@ cdef class GiacMethods_base: Help for clique_stats: clique_stats(Graph(G),[Intg(k)||Intrv(m..n)]) Returns the list of numbers of maximal cliques of size s in G for each s. If parameter k is given, the number of k-cliques is returned. If an interval m..n is given, only cliques with size between m and n (inclusive) are counted (m also may be +infinity). - See also: 1/ maximum_clique 2/ clique_cover + See also: 1/ maximum_clique 2/ clique_cover Ex1:clique_stats(random_graph(50,0.5)) Ex2:clique_stats(random_graph(50,0.5),5) Ex3:clique_stats(random_graph(50,0.5),3..5) - + ''' return GiacMethods['clique_stats'](self,*args) @@ -2554,10 +2554,10 @@ cdef class GiacMethods_base: Help for clustering_coefficient: clustering_coefficient(Graph(G),[Vrtx(v)]) Returns the average clustering coefficient of undirected graph G, or the local clustering coefficient of the vertex v in G. - See also: 1/ network_transitivity 2/ number_of_triangles + See also: 1/ network_transitivity 2/ number_of_triangles Ex1:clustering_coefficient(graph(%{[1,2],[2,3],[2,4],[3,4],[4,1]%})) Ex2:clustering_coefficient(graph(%{[1,2],[2,3],[2,4],[3,4],[4,1]%}),2) - + ''' return GiacMethods['clustering_coefficient'](self,*args) @@ -2566,11 +2566,11 @@ cdef class GiacMethods_base: Help for coeff: coeff(Expr(P),[Var]) Returns the list of coefficients of a polynomial with respect to the 2nd argument or the coefficient of degree the 3rd argument. - See also: 1/ pcoeff 2/ fcoeff + See also: 1/ pcoeff 2/ fcoeff Ex1:coeff(x*3+2) Ex2:coeff(5*y^2-3,y) Ex3:coeff(5*y^2-3,y,2) - + ''' return GiacMethods['coeff'](self,*args) @@ -2579,11 +2579,11 @@ cdef class GiacMethods_base: Help for coeffs: coeffs(Expr(P),[Var]) Returns the list of coefficients of a polynomial with respect to the 2nd argument or the coefficient of degree the 3rd argument. - See also: 1/ pcoeff 2/ fcoeff + See also: 1/ pcoeff 2/ fcoeff Ex1:coeffs(x*3+2) Ex2:coeffs(5*y^2-3,y) Ex3:coeffs(5*y^2-3,y,2) - + ''' return GiacMethods['coeffs'](self,*args) @@ -2592,11 +2592,11 @@ cdef class GiacMethods_base: Help for col: col(Mtrx(A),Intg(n)||Interval(n1..n2)) Returns column n or the sequence of the columns n1..n2 of the matrix A, or optional argument of count,count_eq,count_inf,count_sup. - See also: 1/ row 2/ count 3/ count_eq 4/ count_inf 5/ count_sup + See also: 1/ row 2/ count 3/ count_eq 4/ count_inf 5/ count_sup Ex1:col([[1,2,3],[4,5,6],[7,8,9]],1) Ex2:col([[1,2,3],[4,5,6],[7,8,9]],0..1) Ex3: count_eq(3,[[3,2,3],[4,3,2],[3,2,1]],col) - + ''' return GiacMethods['col'](self,*args) @@ -2605,10 +2605,10 @@ cdef class GiacMethods_base: Help for colDim: colDim(Mtrx) Number of columns of a matrix. - See also: 1/ rowdim + See also: 1/ rowdim Ex1:colDim([[1,2,3],[4,5,6]]) Ex2:colDim([[1,2],[3,4],[5,6]]) - + ''' return GiacMethods['colDim'](self,*args) @@ -2617,10 +2617,10 @@ cdef class GiacMethods_base: Help for colNorm: colNorm(Vect or Mtrx) Returns the max of the l1_norm of the columns of a matrix: colNorm(a_{j,k})=max_k(sum_j(|a_{j,k}|)). - See also: 1/ norm + See also: 1/ norm Ex1:colNorm([[1,2],[3,-4]]) Ex2:colNorm([[1,2,3,-4],[-5,3,2,1]]) - + ''' return GiacMethods['colNorm'](self,*args) @@ -2629,9 +2629,9 @@ cdef class GiacMethods_base: Help for colSwap: colSwap(Mtrx(A),Intg(n1),Intg(n2)) Returns the matrix obtained from A by swapping the n1-th column and the n2-th column. - See also: 1/ rowSwap + See also: 1/ rowSwap Ex1:colSwap([[1,2],[3,4],[5,6]],0,1) - + ''' return GiacMethods['colSwap'](self,*args) @@ -2640,10 +2640,10 @@ cdef class GiacMethods_base: Help for coldim: coldim(Mtrx) Number of columns of a matrix. - See also: 1/ rowdim + See also: 1/ rowdim Ex1:coldim([[1,2,3],[4,5,6]]) Ex2:coldim([[1,2],[3,4],[5,6]]) - + ''' return GiacMethods['coldim'](self,*args) @@ -2652,11 +2652,11 @@ cdef class GiacMethods_base: Help for collect: collect(Poly or LstPoly) Integer factorization of a polynomial (or of a list of poly). - See also: 1/ factor 2/ factors + See also: 1/ factor 2/ factors Ex1:collect(x^2-4) Ex2:collect(x^2-2) Ex3:collect([x^2-2,x^2-4]) - + ''' return GiacMethods['collect'](self,*args) @@ -2665,10 +2665,10 @@ cdef class GiacMethods_base: Help for colnorm: colnorm(Vect or Mtrx) Returns the max of the l1_norm of the columns of a matrix: colNorm(a_{j,k})=max_k(sum_j(|a_{j,k}|)). - See also: 1/ norm + See also: 1/ norm Ex1:colnorm([[1,2],[3,-4]]) Ex2:colnorm([[1,2,3,-4],[-5,3,2,1]]) - + ''' return GiacMethods['colnorm'](self,*args) @@ -2677,7 +2677,7 @@ cdef class GiacMethods_base: Help for color: color([GeoObj or legende],Intg) Draws a geometrical object with colors black=0 red=1 green=2 yellow=3 blue=4, filled with the color in the interior of a closed curve,line_width_n (00 (by default a=1 for sine window) to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ bartlett_hann_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window + See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ bartlett_hann_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window Ex1: scatterplot(cosine_window(randvector(1000,0..1),1.5)) - + ''' return GiacMethods['cosine_window'](self,*args) @@ -3260,9 +3260,9 @@ cdef class GiacMethods_base: Help for cot: cot(Expr) Cotangent. - See also: 1/ acot 2/ tan + See also: 1/ acot 2/ tan Ex1:cot(pi/2) - + ''' return GiacMethods['cot'](self,*args) @@ -3271,10 +3271,10 @@ cdef class GiacMethods_base: Help for cote: cote(Vect) Third coordinate (z) of a 3-d point. - See also: 1/ abscissa 2/ ordinate 3/ coordinates + See also: 1/ abscissa 2/ ordinate 3/ coordinates Ex1:cote(point[1,2,3]) Ex2:cote(point(1,2,3)) - + ''' return GiacMethods['cote'](self,*args) @@ -3283,7 +3283,7 @@ cdef class GiacMethods_base: Help for count: count(Fnc(f)||LstIntg,(Lst||Mtrx)(l),[Opt(row||col)]) Returns f(l[0])+f(l[1])+...+f(l[size(l)-1]) or counts the number of occurrences if the argument is a vector of integers. - See also: 1/ count_eq 2/ count_inf 3/ count_sup + See also: 1/ count_eq 2/ count_inf 3/ count_sup Ex1:count(id,[-2/5,-1,0,1,2,3/5]) Ex2:count(1,[-2,-1,0,1,2,3]) Ex3:count([1,3,1,1,2,10,3]) @@ -3294,7 +3294,7 @@ cdef class GiacMethods_base: Ex8:count((x)->x>2,[[3,5/2],[4,1]],col) Ex9:count((x)->x>2 && x<4,[[3,9/2],[4,1]]) Ex10:count((x)->x<2 || x>4,[[3,9/2],[4,1]]) - + ''' return GiacMethods['count'](self,*args) @@ -3303,12 +3303,12 @@ cdef class GiacMethods_base: Help for count_eq: count_eq(Real(a),(Lst||Mtrx)(L),[Opt(row||col)]) Returns the number of elements of L equal to a. - See also: 1/ count 2/ count_inf 3/ count_sup + See also: 1/ count 2/ count_inf 3/ count_sup Ex1:count_eq(1,[-2,1,0,1,2,-3]) Ex2:count_eq(4,[[3,4],[4,1]]) Ex3:count_eq(4,[[3,4],[4,1]],row) Ex4:count_eq(4,[[3,4],[4,1]],col) - + ''' return GiacMethods['count_eq'](self,*args) @@ -3317,12 +3317,12 @@ cdef class GiacMethods_base: Help for count_inf: count_inf(Real(a),(Lst||Mtrx)(L),[Opt(row||col)]) Returns the number of elements of L strictly less than a. - See also: 1/ count 2/ count_eq 3/ count_sup + See also: 1/ count 2/ count_eq 3/ count_sup Ex1:count_inf(1,[-2,-1,0,1,2,3]) Ex2:count_inf(4,[[3,5],[4,1]]) Ex3:count_inf(4,[[3,5],[4,1]],row) Ex4:count_inf(4,[[3,5],[4,1]],col) - + ''' return GiacMethods['count_inf'](self,*args) @@ -3331,12 +3331,12 @@ cdef class GiacMethods_base: Help for count_sup: count_sup(Real(a),(Lst||Mtrx)(L),[Opt(row||col)]) Returns the number of elements of L strictly greater than a. - See also: 1/ count 2/ count_inf 3/ count_eq + See also: 1/ count 2/ count_inf 3/ count_eq Ex1:count_sup(1,[-2,-1,0,1,2,3]) Ex2:count_sup(3,[[3,5],[4,1]]) Ex3:count_sup(3,[[3,5],[4,1]],row) Ex4:count_sup(3,[[3,5],[4,1]],col) - + ''' return GiacMethods['count_sup'](self,*args) @@ -3345,7 +3345,7 @@ cdef class GiacMethods_base: Help for courbe_parametrique: courbe_parametrique(Cplx||Lst,Var||Lst(Var)) plotparam(a(x)+i*b(x),x=x0..x1) draws the curve X=a(x),Y=b(x) x=x0..x1 or plotparam([a(u,v),b(u,v),c(u,v)],[u=u0..u1,v=v0..v1]) draws the surface X=a(u,v),Y=b(u,v),Z=c(u,v) u=u0..u1 and v=v0..v1. - See also: 1/ plotfunc 2/ plotpolar 3/ arc + See also: 1/ plotfunc 2/ plotpolar 3/ arc Ex1:courbe_parametrique(sin(t)+i*cos(t),t) Ex2:courbe_parametrique(exp(i*t),t=0..pi/2,affichage=1) Ex3:courbe_parametrique(exp(i*t),t=0..pi/2,affichage=1+rempli) @@ -3354,7 +3354,7 @@ cdef class GiacMethods_base: Ex6:courbe_parametrique(sin(x)+i*cos(x),x=0..1,tstep=0.01) Ex7:courbe_parametrique([v*cos(u),v*sin(u),v],[u,v]) Ex8:courbe_parametrique([v*cos(u),v*sin(u),v],[u=0..pi,v=0..3],ustep=0.1,vstep=0.2) - + ''' return GiacMethods['courbe_parametrique'](self,*args) @@ -3363,10 +3363,10 @@ cdef class GiacMethods_base: Help for courbe_polaire: courbe_polaire(Expr,Var,VarMin,VarMax) plotpolar(f(x),x,a,b) draws the polar curve r=f(x) for x in [a,b]. - See also: 1/ plotparam 2/ plotfunc 3/ plotpolar + See also: 1/ plotparam 2/ plotfunc 3/ plotpolar Ex1:courbe_polaire(sin(2*x),x,0,pi) Ex2:courbe_polaire(sin(2*x),x,0,pi,tstep=0.1) - + ''' return GiacMethods['courbe_polaire'](self,*args) @@ -3375,9 +3375,9 @@ cdef class GiacMethods_base: Help for covariance: covariance(Lst||Mtrx,[Lst]) Returns the covariance of the elements of its argument. - See also: 1/ correlation 2/ covariance_correlation + See also: 1/ correlation 2/ covariance_correlation Ex1:covariance([[1,2],[1,1],[4,7]]) - + ''' return GiacMethods['covariance'](self,*args) @@ -3386,9 +3386,9 @@ cdef class GiacMethods_base: Help for covariance_correlation: covariance_correlation(Lst||Mtrx,[Lst]) Returns the list of the covariance and the correlation of the elements of its argument. - See also: 1/ covariance 2/ correlation + See also: 1/ covariance 2/ correlation Ex1:covariance_correlation([[1,2],[1,1],[4,7]]) - + ''' return GiacMethods['covariance_correlation'](self,*args) @@ -3397,11 +3397,11 @@ cdef class GiacMethods_base: Help for cpartfrac: cpartfrac(RatFrac) Performs partial fraction decomposition in ℂ of a fraction. - See also: 1/ factor 2/ normal + See also: 1/ factor 2/ normal Ex1:cpartfrac((x)/(4-x^2)) Ex2:cpartfrac((x^2-2*x+3)/(x^2-3*x+2)) Ex3:cpartfrac(a/(z*(z-b)),z) - + ''' return GiacMethods['cpartfrac'](self,*args) @@ -3410,9 +3410,9 @@ cdef class GiacMethods_base: Help for crationalroot: crationalroot(Poly(P)) Returns the list of complex rational roots of P without indicating the multiplicity. - See also: 1/ proot 2/ froot 3/ complexroot 4/ rationalroot 5/ realroot + See also: 1/ proot 2/ froot 3/ complexroot 4/ rationalroot 5/ realroot Ex1:crationalroot(2*x^3+(-5-7*i)*x^2+(-4+14*i)*x+8-4*i) - + ''' return GiacMethods['crationalroot'](self,*args) @@ -3421,12 +3421,12 @@ cdef class GiacMethods_base: Help for crayon: crayon(Color) Changes the color of the pencil (without parameter, returns the current color). - See also: 1/ leve_crayon 2/ baisse_crayon + See also: 1/ leve_crayon 2/ baisse_crayon Ex1: crayon vert Ex2:crayon(rouge) Ex3:crayon(5) Ex4:crayon(gomme) - + ''' return GiacMethods['crayon'](self,*args) @@ -3435,13 +3435,13 @@ cdef class GiacMethods_base: Help for createwav: createwav(Lst(data),[opts]) Returns an audio clip from data, optionally setting channel count, bit depth, sample rate, duration and normalization level. - See also: 1/ readwav 2/ writewav 3/ playsnd + See also: 1/ readwav 2/ writewav 3/ playsnd Ex1:createwav(duration=3.5) Ex2:createwav(sin(2*pi*440*soundsec(2)),samplerate=48000) Ex3:createwav(sin(2*pi*440*soundsec(2)),bit_depth=8) Ex4:createwav(10*sin(2*pi*440*soundsec(2)),normalize=-3) Ex5: t:=soundsec(3):;L,R:=sin(2*pi*440*t),sin(2*pi*445*t):;createwav([L,R]) - + ''' return GiacMethods['createwav'](self,*args) @@ -3450,10 +3450,10 @@ cdef class GiacMethods_base: Help for cross: cross(Vect(v1),Vect(v2)) Wedge product. - See also: 1/ dot + See also: 1/ dot Ex1:cross([1,2],[3,4]) Ex2:cross([1,2,3],[4,5,6]) - + ''' return GiacMethods['cross'](self,*args) @@ -3462,10 +3462,10 @@ cdef class GiacMethods_base: Help for crossP: crossP(Vect(v1),Vect(v2)) Wedge product. - See also: 1/ dot + See also: 1/ dot Ex1:crossP([1,2],[3,4]) Ex2:crossP([1,2,3],[4,5,6]) - + ''' return GiacMethods['crossP'](self,*args) @@ -3474,9 +3474,9 @@ cdef class GiacMethods_base: Help for cross_correlation: cross_correlation(cross_correlation(Lst(u),Lst(v))) Returns the cross_correlation of two signals u and v. - See also: 1/ auto_correlation 2/ correlation + See also: 1/ auto_correlation 2/ correlation Ex1:cross_correlation([1,2],[3,4,5]) - + ''' return GiacMethods['cross_correlation'](self,*args) @@ -3485,10 +3485,10 @@ cdef class GiacMethods_base: Help for cross_point: cross_point(Opt) Option of the display command for a point. - See also: 1/ display + See also: 1/ display Ex1: F:=display(point(2+1.5*i),point_point) Ex2: F:=display(point(2+1.5*i),rhombus_point) - + ''' return GiacMethods['cross_point'](self,*args) @@ -3497,11 +3497,11 @@ cdef class GiacMethods_base: Help for cross_ratio: cross_ratio(Pnt or Cplx(a),Pnt or Cplx(b),Pnt or Cplx(c),Pnt or Cplx(d)) Returns the complex number equal to ((c-a)/(c-b))/((d-a)/(d-b)). - See also: 1/ harmonic_conjugate 2/ is_conjugate + See also: 1/ harmonic_conjugate 2/ is_conjugate Ex1:cross_ratio(i,2+i,3/2+i,3+i) Ex2:cross_ratio(0,1+i,1,i) Ex3:cross_ratio(0,1,2,3) - + ''' return GiacMethods['cross_ratio'](self,*args) @@ -3510,10 +3510,10 @@ cdef class GiacMethods_base: Help for crossproduct: crossproduct(Vect(v1),Vect(v2)) Wedge product. - See also: 1/ dot + See also: 1/ dot Ex1:crossproduct([1,2],[3,4]) Ex2:crossproduct([1,2,3],[4,5,6]) - + ''' return GiacMethods['crossproduct'](self,*args) @@ -3522,9 +3522,9 @@ cdef class GiacMethods_base: Help for csc: csc(Expr) Cosecant: csc(x)=1/sin(x). - See also: 1/ sin 2/ acsc + See also: 1/ sin 2/ acsc Ex1:csc(pi/2) - + ''' return GiacMethods['csc'](self,*args) @@ -3533,12 +3533,12 @@ cdef class GiacMethods_base: Help for csolve: csolve(LstEq,LstVar) Returns the list of complex solutions of an equation or a matrix where the rows are ℂ-solutions of a system of polynomial equations. - See also: 1/ cZeros 2/ solve 3/ fslove + See also: 1/ cZeros 2/ solve 3/ fslove Ex1:csolve(x^4-1,x) Ex2:csolve(x^4-y^4 and x+y=2,[x,y]) Ex3:csolve(x^4-y^4 and x+y=0 and x^2=2*x,[x,y]) Ex4:csolve(u*v-u=v and v^2=u,[u,v]) - + ''' return GiacMethods['csolve'](self,*args) @@ -3547,9 +3547,9 @@ cdef class GiacMethods_base: Help for csv2gen: csv2gen(Strng(filename),Strng(sep),Strng(nl),Strng(decsep),Strng(eof),[string]) Reads a file (or string) in CSV format. - See also: 1/ read + See also: 1/ read Ex1:csv2gen("mat.txt",",",char(10),".") - + ''' return GiacMethods['csv2gen'](self,*args) @@ -3558,13 +3558,13 @@ cdef class GiacMethods_base: Help for cube: cube(Pnt(A),Pnt(B),Pnt(C)) Draws the direct cube with vertices A,B with a face in the plane (A,B,C). - See also: 1/ parallelepiped 2/ cylinder 3/ icosahedron 4/ dodecahedron 5/ octahedron 6/ tetrahedron 7/ centered_cube - Ex1:cube([0,0,0],[3,0,0],[0,0,1]) - Ex2: A,B,C:=point(1,0,0),point(1,1,0),point(0,1,0);c:=cube(A,B,C);A,B,C,D,E,F,G,H:=sommets(c); - Ex3: A,B,K:=point(1,0,0),point(1,1,0),point(0,2,0);c:=cube(A,B,C);A,B,C,D,E,F,G,H:=sommets(c); - Ex4: c:=cube([0,0,0],[1,0,0],[0,1,0]);c1,c2,c4,c3,c5,c6,c7,c8:=sommets(c); - Ex5: c:=cube([0,0,0],[0,2,0],[0,0,1]);c1,c2,c4,c3,c5,c6,c7,c8:=sommets(c); - + See also: 1/ parallelepiped 2/ cylinder 3/ icosahedron 4/ dodecahedron 5/ octahedron 6/ tetrahedron 7/ centered_cube + Ex1:cube([0,0,0],[3,0,0],[0,0,1]) + Ex2: A,B,C:=point(1,0,0),point(1,1,0),point(0,1,0);c:=cube(A,B,C);A,B,C,D,E,F,G,H:=sommets(c); + Ex3: A,B,K:=point(1,0,0),point(1,1,0),point(0,2,0);c:=cube(A,B,C);A,B,C,D,E,F,G,H:=sommets(c); + Ex4: c:=cube([0,0,0],[1,0,0],[0,1,0]);c1,c2,c4,c3,c5,c6,c7,c8:=sommets(c); + Ex5: c:=cube([0,0,0],[0,2,0],[0,0,1]);c1,c2,c4,c3,c5,c6,c7,c8:=sommets(c); + ''' return GiacMethods['cube'](self,*args) @@ -3573,11 +3573,11 @@ cdef class GiacMethods_base: Help for cumSum: cumSum(Lst(l)||Seq||Str) Returns the list (or the sequence or the string) lr where the elements are the cumulative sum of the list l: lr[k]=sum(l[j],j=0..k) (or lr=sum(l[j],j=0..k)$(k=0..size(l)-1)). - See also: 1/ sum + See also: 1/ sum Ex1:cumSum([0,1,2,3,4]) Ex2:cumSum(1.2,3,4.5,6) Ex3:cumSum("a","b","c","d") - + ''' return GiacMethods['cumSum'](self,*args) @@ -3586,11 +3586,11 @@ cdef class GiacMethods_base: Help for cumsum: cumsum(Lst(l)||Seq||Str) Returns the list (or the sequence or the string) lr where the elements are the cumulative sum of the list l: lr[k]=sum(l[j],j=0..k) (or lr=sum(l[j],j=0..k)$(k=0..size(l)-1)). - See also: 1/ sum + See also: 1/ sum Ex1:cumsum([0,1,2,3,4]) Ex2:cumsum(1.2,3,4.5,6) Ex3:cumsum("a","b","c","d") - + ''' return GiacMethods['cumsum'](self,*args) @@ -3599,13 +3599,13 @@ cdef class GiacMethods_base: Help for cumulated_frequencies: cumulated_frequencies(Lst || Mtrx) Draws the diagram of the cumulated frequencies (rows=[value,frequencies]) - See also: 1/ histogram 2/ classes 3/ bar_plot + See also: 1/ histogram 2/ classes 3/ bar_plot Ex1:cumulated_frequencies([1,2,1,1,2,1,2,4,3,3]) Ex2:cumulated_frequencies([(rand(6)+1)$(k=1..100)]) Ex3:cumulated_frequencies([[1,0.3],[2,0.5],[3,0.2]]) Ex4:cumulated_frequencies([[1..2,0.3],[2..3,0.5],[3..4,0.2]]) Ex5:cumulated_frequencies([[1..2,0.3,0.5],[2..3,0.5,0.2],[3..4,0.2,0.3]]) - + ''' return GiacMethods['cumulated_frequencies'](self,*args) @@ -3614,9 +3614,9 @@ cdef class GiacMethods_base: Help for curl: curl(Lst(A,B,C),Lst(x,y,z)) curl([A,B,C],[x,y,z])=[dC/dy-dB/dz,dA/dz-dC/dx,dB/dx-dA/dy]. - See also: 1/ derive 2/ divergence + See also: 1/ derive 2/ divergence Ex1:curl([2*x*y,x*z,y*z],[x,y,z]) - + ''' return GiacMethods['curl'](self,*args) @@ -3627,7 +3627,7 @@ cdef class GiacMethods_base: Content of the matrix editor or spreadsheet. Ex1:current_sheet(1,2) Ex2:current_sheet(A1..A5,B,G) - + ''' return GiacMethods['current_sheet'](self,*args) @@ -3636,7 +3636,7 @@ cdef class GiacMethods_base: Help for curvature: curvature(Curve,Point) Curvature of curve C at point M. - See also: 1/ osculating_circle 2/ evolute + See also: 1/ osculating_circle 2/ evolute Ex1:curvature(plot(x^2),point(1,1)) Ex2:curvature([5*cos(t),5*sin(t)],t) Ex3:curvature([t,t^2],t) @@ -3644,7 +3644,7 @@ cdef class GiacMethods_base: Ex5:curvature([3*exp(t/2)*cos(t),3*exp(t/2)*sin(t)],t) Ex6:curvature([3*exp(t/2)*cos(t),3*exp(t/2)*sin(t)],t,7) Ex7: trigcos(curvature([2*cos(t),2*sin(t),3*t],t)) - + ''' return GiacMethods['curvature'](self,*args) @@ -3653,8 +3653,8 @@ cdef class GiacMethods_base: Help for curve: curve(Expr) Reserved word. - See also: 1/ - + See also: 1/ + ''' return GiacMethods['curve'](self,*args) @@ -3663,10 +3663,10 @@ cdef class GiacMethods_base: Help for cyan: cyan(Opt) Option of the display command to display with color. - See also: 1/ display + See also: 1/ display Ex1: F:=display(point(2+1.5*i),red) Ex2: F:=display(point(2+1.5*i),point_point+green) - + ''' return GiacMethods['cyan'](self,*args) @@ -3675,9 +3675,9 @@ cdef class GiacMethods_base: Help for cycle2perm: cycle2perm(Cycle) Converts the cycle c to a permutation. - See also: 1/ cycles2permu 2/ permu2cycles + See also: 1/ cycles2permu 2/ permu2cycles Ex1:cycle2perm([1,3,5]) - + ''' return GiacMethods['cycle2perm'](self,*args) @@ -3686,10 +3686,10 @@ cdef class GiacMethods_base: Help for cycle_graph: cycle_graph(Intg(n)||Lst(V)) Returns a cyclic graph with n vertices (or with vertices from list V). - See also: 1/ graph 2/ path_graph + See also: 1/ graph 2/ path_graph Ex1:cycle_graph(4) Ex2:cycle_graph(["one","two","three","four","five"]) - + ''' return GiacMethods['cycle_graph'](self,*args) @@ -3698,9 +3698,9 @@ cdef class GiacMethods_base: Help for cycleinv: cycleinv(Cycle(c)) Returns the inverse cycle of the cycle c. - See also: 1/ perminv + See also: 1/ perminv Ex1:cycleinv([1,3,5]) - + ''' return GiacMethods['cycleinv'](self,*args) @@ -3709,9 +3709,9 @@ cdef class GiacMethods_base: Help for cycles2permu: cycles2permu(Lst(Cycle)) Converts a product of cycles into a permutation. - See also: 1/ permu2cycles 2/ cycle2perm + See also: 1/ permu2cycles 2/ cycle2perm Ex1:cycles2permu([[1,3,5],[3,4]]) - + ''' return GiacMethods['cycles2permu'](self,*args) @@ -3720,9 +3720,9 @@ cdef class GiacMethods_base: Help for cyclotomic: cyclotomic(Expr) N-th cyclotomic polynomial. - See also: 1/ none + See also: 1/ none Ex1:cyclotomic(20) - + ''' return GiacMethods['cyclotomic'](self,*args) @@ -3731,10 +3731,10 @@ cdef class GiacMethods_base: Help for cylinder: cylinder(Pnt(A),Vect(v),Real(r),[Real(h)]) Draws a cylinder with axis (A,v), with radius r [and with altitude h]. - See also: 1/ half_cone 2/ cone + See also: 1/ half_cone 2/ cone Ex1:cylinder([0,0,0],[0,1,0],2) Ex2:cylinder([0,0,0],[0,1,0],2,-3) - + ''' return GiacMethods['cylinder'](self,*args) @@ -3743,10 +3743,10 @@ cdef class GiacMethods_base: Help for dash_line: dash_line(Opt) Option of the display command for a line. - See also: 1/ display + See also: 1/ display Ex1: display(line(y=x),green+dash_line+line_width_2) Ex2: d:=display(line(2+i,1),cap_round_line) - + ''' return GiacMethods['dash_line'](self,*args) @@ -3755,10 +3755,10 @@ cdef class GiacMethods_base: Help for dashdot_line: dashdot_line(Opt) Option of the display command for a line. - See also: 1/ display + See also: 1/ display Ex1: display(line(y=x),green+dash_line+line_width_2) Ex2: d:=display(line(2+i,1),cap_round_line) - + ''' return GiacMethods['dashdot_line'](self,*args) @@ -3767,10 +3767,10 @@ cdef class GiacMethods_base: Help for dashdotdot_line: dashdotdot_line(Opt) Option of the display command for a line. - See also: 1/ display + See also: 1/ display Ex1: display(line(y=x),green+dash_line+line_width_2) Ex2: d:=display(line(2+i,1),cap_round_line) - + ''' return GiacMethods['dashdotdot_line'](self,*args) @@ -3781,7 +3781,7 @@ cdef class GiacMethods_base: dayofweek(d,m,y) returns the day of the given date (day,month,year) : 0 for sunday, 1 for monday ...6 for saturday. Ex1:dayofweek(21,4,2014) Ex2:dayofweek(15,10,1582) - + ''' return GiacMethods['dayofweek'](self,*args) @@ -3790,12 +3790,12 @@ cdef class GiacMethods_base: Help for deSolve: deSolve(Eq,[TimeVar],FncVar) Solves a differential equation or a differential linear system with constant coefficients. - See also: 1/ integrate 2/ diff 3/ odesolve 4/ plotode 5/ plotfiefd + See also: 1/ integrate 2/ diff 3/ odesolve 4/ plotode 5/ plotfiefd Ex1:deSolve(y'+x*y=0) Ex2:deSolve(y'+x*y=0,y) Ex3:deSolve(y'+x*y=0,[0,1]) Ex4:deSolve([y'+x*y=0,y(0)=1],y) - Ex5:deSolve([y'=[[1,2],[2,1]]*y+[x,x+1],y(0)=[1,2]]) + Ex5:deSolve([y'=[[1,2],[2,1]]*y+[x,x+1],y(0)=[1,2]]) Ex6:deSolve(y''+y=0,y) Ex7:deSolve([y''+y=sin(x),y(0)=1,y'(0)=2],y) Ex8:deSolve([y''+y=sin(x),y(0)=1,y'(0)=2],x,y) @@ -3807,7 +3807,7 @@ cdef class GiacMethods_base: Ex14:deSolve([z''+2*z'+z,z(0)=1,z'(0)=0],z(u)) Ex15:deSolve([z'=[[1,2],[2,1]]*z+[t,t+1],z(0)=[1,2]],t,z) Ex16:deSolve([z'=[[1,2],[2,1]]*z+[t,t+1],z(0)=[1,2]],z(t)) - + ''' return GiacMethods['deSolve'](self,*args) @@ -3816,10 +3816,10 @@ cdef class GiacMethods_base: Help for debut_enregistrement: debut_enregistrement(Var(nom_du_dessin)) Begins recording the commands making up the drawing; the name of the resulting procedure is the argument. - See also: 1/ fin_enregistrement + See also: 1/ fin_enregistrement Ex1:debut_enregistrement(maison) Ex2:debut_enregistrement(arbre) - + ''' return GiacMethods['debut_enregistrement'](self,*args) @@ -3828,11 +3828,11 @@ cdef class GiacMethods_base: Help for degree: degree(Poly(P),Var(Var)) Degree of the polynomial P with respect to the second argument. - See also: 1/ valuation 2/ size 3/ total_degree + See also: 1/ valuation 2/ size 3/ total_degree Ex1:degree(x^3+x) Ex2:degree([1,0,1,0]) Ex3:degree(x^3+x*y,y) - + ''' return GiacMethods['degree'](self,*args) @@ -3841,9 +3841,9 @@ cdef class GiacMethods_base: Help for degree_sequence: degree_sequence(Graph(G)) Returns the list of degrees of vertices of G (arc directions are ignored). - See also: 1/ is_graphic_sequence 2/ is_regular 2/ sequence_graph 3/ vertex_degree + See also: 1/ is_graphic_sequence 2/ is_regular 2/ sequence_graph 3/ vertex_degree Ex1:degree_sequence(graph(trail(1,2,3,4,2))) - + ''' return GiacMethods['degree_sequence'](self,*args) @@ -3852,11 +3852,11 @@ cdef class GiacMethods_base: Help for delcols: delcols(Mtrx(A),Interval(n1..n2)||n1) Returns the matrix where the columns n1..n2 (or n1) of the matrix A are deleted. - See also: 1/ delrows + See also: 1/ delrows Ex1:delcols([[1,2,3],[4,5,6],[7,8,9]],1..1) Ex2:delcols([[1,2,3],[4,5,6],[7,8,9]],0..1) Ex3:delcols([[1,2,3],[4,5,6],[7,8,9]],1) - + ''' return GiacMethods['delcols'](self,*args) @@ -3865,9 +3865,9 @@ cdef class GiacMethods_base: Help for delete_arc: delete_arc(Graph(G),Edge(e)||Trail(T)||Lst(E)) Returns a modified copy of digraph G with arc e (or trail T or list of arcs E) removed. - See also: 1/ add_arc 2/ delete_edge 3/ digraph 4/ edges 5/ has_arc 6/ trail + See also: 1/ add_arc 2/ delete_edge 3/ digraph 4/ edges 5/ has_arc 6/ trail Ex1:delete_arc(digraph(trail(1,2,3,4,5,1)),[5,1]) - + ''' return GiacMethods['delete_arc'](self,*args) @@ -3876,9 +3876,9 @@ cdef class GiacMethods_base: Help for delete_edge: delete_edge(Graph(G),Edge(e)||Trail(T)||Lst(E)) Returns a modified copy of undirected graph G with edge e (or trail T or list of edges E) removed. - See also: 1/ add_edge 2/ delete_arc 3/ edges 4/ graph 5/ has_edge 6/ trail + See also: 1/ add_edge 2/ delete_arc 3/ edges 4/ graph 5/ has_edge 6/ trail Ex1:delete_edge(cycle_graph(4),[1,2]) - + ''' return GiacMethods['delete_edge'](self,*args) @@ -3887,9 +3887,9 @@ cdef class GiacMethods_base: Help for delete_vertex: delete_vertex(Graph(G),Vrtx(v)||Lst(V)) Returns a modified copy of G with vertex v (or vertices from V) removed. - See also: 1/ add_vertex 2/ induced_subgraph + See also: 1/ add_vertex 2/ induced_subgraph Ex1:delete_vertex(cycle_graph(5),[1,4]) - + ''' return GiacMethods['delete_vertex'](self,*args) @@ -3898,11 +3898,11 @@ cdef class GiacMethods_base: Help for delrows: delrows(Mtrx(A),Interval(n1..n2)||n1) Returns the matrix where the rows n1..n2 (or n1) of the matrix A are deleted. - See also: 1/ delcols + See also: 1/ delcols Ex1:delrows([[1,2,3],[4,5,6],[7,8,9]],1..1) Ex2:delrows([[1,2,3],[4,5,6],[7,8,9]],0..1) Ex3:delrows([[1,2,3],[4,5,6],[7,8,9]],1) - + ''' return GiacMethods['delrows'](self,*args) @@ -3911,10 +3911,10 @@ cdef class GiacMethods_base: Help for deltalist: deltalist(Lst) Returns the list of the differences of two terms in succession. - See also: 1/ + See also: 1/ Ex1:deltalist([1,4,8,9]) Ex2:deltalist([1,8,4,9]) - + ''' return GiacMethods['deltalist'](self,*args) @@ -3923,11 +3923,11 @@ cdef class GiacMethods_base: Help for denom: denom(Frac(a/b) or RatFrac) Returns the denominator of the simplified fraction. - See also: 1/ getDenom 2/ getNum 3/ numer 4/ f2nd + See also: 1/ getDenom 2/ getNum 3/ numer 4/ f2nd Ex1:denom(25/15) Ex2:denom((x^3-1)/(x^2-1)) Ex3:denom(1+(x^3-1)/x^2) - + ''' return GiacMethods['denom'](self,*args) @@ -3936,10 +3936,10 @@ cdef class GiacMethods_base: Help for densityplot: densityplot(Expr,[x=xrange,y=yrange],[z],[xstep],[ystep]) Shows in the plane with colors the graph of an expression of 2 variables. - See also: 1/ plotfunc 2/ plotcontour + See also: 1/ plotfunc 2/ plotcontour Ex1:densityplot(x^2-y^2,[x=-2..2,y=-2..2],xstep=0.1,ystep=0.1) Ex2:densityplot(x^2-y^2,[x=-2..2,y=-2..2],z=-2..2,xstep=0.1,ystep=0.1) - + ''' return GiacMethods['densityplot'](self,*args) @@ -3948,9 +3948,9 @@ cdef class GiacMethods_base: Help for departures: departures(Graph(G),[Vrtx(v)]) Returns the list of vertices of digraph G which are connected by v with arcs such that tails are in v. If v is omitted, a list of departures is computed for every vertex in G. - See also: 1/ out_degree + See also: 1/ out_degree Ex1:departures(digraph(%{[1,2],[1,3],[2,3]%}),1) - + ''' return GiacMethods['departures'](self,*args) @@ -3959,7 +3959,7 @@ cdef class GiacMethods_base: Help for derive: derive(Expr or Fnc,[SeqVar or LstVar],[n]) Returns the derivative with respect to the 2nd argument. - See also: 1/ ' 2/ function_diff 3/ integrate 4/ taux_accroissement 5/ implicitdiff + See also: 1/ ' 2/ function_diff 3/ integrate 4/ taux_accroissement 5/ implicitdiff Ex1:derive(x^3-x) Ex2:derive(x^3-x,x,3) Ex3:derive(x^3-x,quote(x)$3) @@ -3968,7 +3968,7 @@ cdef class GiacMethods_base: Ex6:derive(x*y+z*y,y,z) Ex7:derive(x*y+z*y,[y,z]) Ex8: f(x):=sin(2x);g:=diff(f);h:=diff(diff(f)) - + ''' return GiacMethods['derive'](self,*args) @@ -3977,7 +3977,7 @@ cdef class GiacMethods_base: Help for deriver: deriver(Expr or Fnc,[SeqVar or LstVar],[n]) Returns the derivative with respect to the 2nd argument. - See also: 1/ ' 2/ function_diff 3/ integrate 4/ taux_accroissement 5/ implicitdiff + See also: 1/ ' 2/ function_diff 3/ integrate 4/ taux_accroissement 5/ implicitdiff Ex1:deriver(x^3-x) Ex2:deriver(x^3-x,x,3) Ex3:deriver(x^3-x,quote(x)$3) @@ -3986,7 +3986,7 @@ cdef class GiacMethods_base: Ex6:deriver(x*y+z*y,y,z) Ex7:deriver(x*y+z*y,[y,z]) Ex8: f(x):=sin(2x);g:=diff(f);h:=diff(diff(f)) - + ''' return GiacMethods['deriver'](self,*args) @@ -3995,12 +3995,12 @@ cdef class GiacMethods_base: Help for desolve: desolve(Eq,[TimeVar],FncVar) Solves a differential equation or a differential linear system with constant coefficients. - See also: 1/ integrate 2/ diff 3/ odesolve 4/ plotode 5/ plotfiefd + See also: 1/ integrate 2/ diff 3/ odesolve 4/ plotode 5/ plotfiefd Ex1:desolve(y'+x*y=0) Ex2:desolve(y'+x*y=0,y) Ex3:desolve(y'+x*y=0,[0,1]) Ex4:desolve([y'+x*y=0,y(0)=1],y) - Ex5:desolve([y'=[[1,2],[2,1]]*y+[x,x+1],y(0)=[1,2]]) + Ex5:desolve([y'=[[1,2],[2,1]]*y+[x,x+1],y(0)=[1,2]]) Ex6:desolve(y''+y=0,y) Ex7:desolve([y''+y=sin(x),y(0)=1,y'(0)=2],y) Ex8:desolve([y''+y=sin(x),y(0)=1,y'(0)=2],x,y) @@ -4012,7 +4012,7 @@ cdef class GiacMethods_base: Ex14:desolve([z''+2*z'+z,z(0)=1,z'(0)=0],z(u)) Ex15:desolve([z'=[[1,2],[2,1]]*z+[t,t+1],z(0)=[1,2]],t,z) Ex16:desolve([z'=[[1,2],[2,1]]*z+[t,t+1],z(0)=[1,2]],z(t)) - + ''' return GiacMethods['desolve'](self,*args) @@ -4021,11 +4021,11 @@ cdef class GiacMethods_base: Help for dessine_tortue: dessine_tortue([Intg(n)]) Draws the full (or not full if n=1) triangle representing the turtle. - See also: 1/ crayon + See also: 1/ crayon Ex1:dessine_tortue() Ex2:dessine_tortue(0) Ex3:dessine_tortue(1) - + ''' return GiacMethods['dessine_tortue'](self,*args) @@ -4034,10 +4034,10 @@ cdef class GiacMethods_base: Help for det: det(Mtrx) Determinant of a square matrix M. - See also: 1/ rref 2/ det_minor 3/ Det + See also: 1/ rref 2/ det_minor 3/ Det Ex1:det([[1,2],[3,4]]) Ex2:det([[1,2,3],[1,3,6],[2,5,7]]) - + ''' return GiacMethods['det'](self,*args) @@ -4046,9 +4046,9 @@ cdef class GiacMethods_base: Help for det_minor: det_minor(Mtrx(A)) Returns the determinant calculated with the calculus of minors. - See also: 1/ det + See also: 1/ det Ex1:det_minor([[1,2],[3,4]]) - + ''' return GiacMethods['det_minor'](self,*args) @@ -4057,13 +4057,13 @@ cdef class GiacMethods_base: Help for developper: developper(Expr) Full distribution of * and / over + and -. - See also: 1/ texpand 2/ normal 3/ simplify 4/ ratnormal + See also: 1/ texpand 2/ normal 3/ simplify 4/ ratnormal Ex1:developper((x+y)*(z+1)) Ex2:developper((a+b+c)/d) Ex3:developper((y+x)*(z+y)*(x+z)) Ex4:developper((x+3)^4) Ex5:developper((2*x-2*1)*(x^2-3*x+2)+(x^2-2*x+3)*(2*x-3*1)) - + ''' return GiacMethods['developper'](self,*args) @@ -4072,11 +4072,11 @@ cdef class GiacMethods_base: Help for developper_transcendant: developper_transcendant(Expr) Expands transcendental expressions. - See also: 1/ tcollect 2/ tlin 3/ lin 4/ trigexpand + See also: 1/ tcollect 2/ tlin 3/ lin 4/ trigexpand Ex1:developper_transcendant(sin(2*x)+exp(x+y)) Ex2:developper_transcendant(cos(x+y)) Ex3:developper_transcendant(cos(3*x)) - + ''' return GiacMethods['developper_transcendant'](self,*args) @@ -4085,13 +4085,13 @@ cdef class GiacMethods_base: Help for dfc: dfc(Real(x0),Int(n)||Real(eps)) Returns the continued fraction development at x0 of order n or with precision eps. - See also: 1/ dfc2f 2/ convert + See also: 1/ dfc2f 2/ convert Ex1:dfc(sqrt(2),5) Ex2:dfc(pi,4) Ex3:dfc(evalf(pi),1e-09) Ex4: convert(sqrt(2),confrac,'dev');dev Ex5: convert(9976/6961,confrac,'l');l - + ''' return GiacMethods['dfc'](self,*args) @@ -4100,10 +4100,10 @@ cdef class GiacMethods_base: Help for dfc2f: dfc2f(LstFrac_Cont)) Converts a continued fraction into a real. - See also: 1/ dfc 2/ convert + See also: 1/ dfc 2/ convert Ex1:dfc2f([1,1,1]) Ex2:dfc2f([1,2,[2]]) - + ''' return GiacMethods['dfc2f'](self,*args) @@ -4112,14 +4112,14 @@ cdef class GiacMethods_base: Help for diag: diag(Lst(l)||(Mtrx(A),[left||right||lu])||Lst(l),Lst(d),Lst(u)) With 1 argument returns either the diagonal matrix with diagonal l or the diagonal of A, with 2 arguments returns the large left (lower) triangular part of A or the large right (upper) triangular part of A or factors A into 3 parts : strict left (lower) triangular, diagonal, strict right (upper) triangular and with 3 arguments returns the tridiagonal matrix with diagonals l,d,u. - See also: 1/ identity 2/ lu 3/ BlockDiagonal 4/ upper 5/ lower + See also: 1/ identity 2/ lu 3/ BlockDiagonal 4/ upper 5/ lower Ex1:diag([[1,2],[3,4]]) Ex2:diag([1,2,3]) Ex3:diag([[1,2],[3,4]],left) Ex4:diag([[1,2],[3,4]],right) Ex5:diag([[1,2],[3,4]],lu) Ex6:diag([1,2],[3,4,5],[6,7]) - + ''' return GiacMethods['diag'](self,*args) @@ -4128,7 +4128,7 @@ cdef class GiacMethods_base: Help for diff: diff(Expr or Fnc,[SeqVar or LstVar],[n]) Returns the derivative with respect to the 2nd argument. - See also: 1/ ' 2/ function_diff 3/ integrate 4/ taux_accroissement 5/ implicitdiff + See also: 1/ ' 2/ function_diff 3/ integrate 4/ taux_accroissement 5/ implicitdiff Ex1:diff(x^3-x) Ex2:diff(x^3-x,x,3) Ex3:diff(x^3-x,quote(x)$3) @@ -4137,7 +4137,7 @@ cdef class GiacMethods_base: Ex6:diff(x*y+z*y,y,z) Ex7:diff(x*y+z*y,[y,z]) Ex8: f(x):=sin(2x);g:=diff(f);h:=diff(diff(f)) - + ''' return GiacMethods['diff'](self,*args) @@ -4146,10 +4146,10 @@ cdef class GiacMethods_base: Help for digraph: digraph([Lst(V)],[Set(E)],[Mtrx(A)],[options]) Create a directed (un)weighted graph from vertices V, edges E and/or adjacency or weight matrix A. All parameters are optional. - See also: 1/ graph 2/ trail + See also: 1/ graph 2/ trail Ex1:digraph(%{[1,2],[2,3],[3,4],[4,1]%}) Ex2:digraph([a,b,c,d],%{[[a,b],1.0],[[a,c],2.3],[[b,d],3.1],[[c,d],4]%}) - + ''' return GiacMethods['digraph'](self,*args) @@ -4158,9 +4158,9 @@ cdef class GiacMethods_base: Help for dijkstra: dijkstra(Graph(G),Vrtx(v),[Vrtx(w)||Lst(W)]) Returns the cheapest weighted path from vertex v to w (or to vertices from W) in undirected graph G. Output is in the form [[v1,v2,...,vk],d] (or list of these) where v1,v2,...,vk are vertices along each path and d is the weight of the path. - See also: 1/ allpairs_distance 2/ shortest_path + See also: 1/ allpairs_distance 2/ shortest_path Ex1:dijkstra(graph(%{[[1,2],1],[[2,3],3],[[3,4],7],[[4,5],3],[[5,6],3],[[1,6],3]%}),1,4) - + ''' return GiacMethods['dijkstra'](self,*args) @@ -4169,9 +4169,9 @@ cdef class GiacMethods_base: Help for dim: dim(Mtrx) Returns the list which gives the dimension of the matrix specified as argument. - See also: 1/ rowdim 2/ coldim 3/ sizes 4/ size + See also: 1/ rowdim 2/ coldim 3/ sizes 4/ size Ex1:dim([[1,2,3],[4,5,6]]) - + ''' return GiacMethods['dim'](self,*args) @@ -4180,8 +4180,8 @@ cdef class GiacMethods_base: Help for directed: directed(Opt) Option for graph and digraph commands. - See also: 1/ weighted 2/ graph 3/ digraph - + See also: 1/ weighted 2/ graph 3/ digraph + ''' return GiacMethods['directed'](self,*args) @@ -4190,9 +4190,9 @@ cdef class GiacMethods_base: Help for discard_edge_attribute: discard_edge_attribute(Graph(G),Edge(e),Seq(tag1=value1,tag2=value2,..)) Discards the attributes with tags tag1, tag2, ... assigned to edge e in G and returns the modified copy of G. - See also: 1/ get_edge_attribute 2/ set_edge_attribute 3/ list_edge_attributes + See also: 1/ get_edge_attribute 2/ set_edge_attribute 3/ list_edge_attributes Ex1:discard_edge_attribute(cycle_graph(3),[1,2],"cost") - + ''' return GiacMethods['discard_edge_attribute'](self,*args) @@ -4201,9 +4201,9 @@ cdef class GiacMethods_base: Help for discard_graph_attribute: discard_graph_attribute(Graph(G),Seq(tag1=value1,tag2=value2,..)) Discards the graph attributes with tags tag1, tag2, ... and returns the modified copy of G. - See also: 1/ get_graph_attribute 2/ set_graph_attribute 3/ list_graph_attributes + See also: 1/ get_graph_attribute 2/ set_graph_attribute 3/ list_graph_attributes Ex1:discard_graph_attribute(cycle_graph(3),"name") - + ''' return GiacMethods['discard_graph_attribute'](self,*args) @@ -4212,9 +4212,9 @@ cdef class GiacMethods_base: Help for discard_vertex_attribute: discard_vertex_attribute(Graph(G),Vrtx(v),Seq(tag1=value1,tag2=value2,..)) Discards the attributes with tags tag1, tag2, ... assigned to vertex v in G and returns the modified copy of G. - See also: 1/ get_vertex_attribute 2/ set_vertex_attribute 3/ list_vertex_attributes + See also: 1/ get_vertex_attribute 2/ set_vertex_attribute 3/ list_vertex_attributes Ex1:discard_vertex_attribute(cycle_graph(3),1,"supply") - + ''' return GiacMethods['discard_vertex_attribute'](self,*args) @@ -4223,9 +4223,9 @@ cdef class GiacMethods_base: Help for disjoint_union: disjoint_union(Seq(G1,G2,...)) Returns the disjoint union of the graphs G1, G2, ... Vertices in the resulting graph are labelled with "k:v", where k is index of the corresponding k-th graph Gk and v is vertex in Gk. - See also: 1/ graph_join 2/ graph_union + See also: 1/ graph_join 2/ graph_union Ex1:disjoint_union(is_connected(disjoint_union(cycle_graph(5),path_graph(4)))) - + ''' return GiacMethods['disjoint_union'](self,*args) @@ -4234,7 +4234,7 @@ cdef class GiacMethods_base: Help for display: display([GeoObj or legende],Intg) Draws a geometrical object with colors black=0 red=1 green=2 yellow=3 blue=4, filled with the color in the interior of a closed curve,line_width_n (0=0 or, the (-n)th previous question if n<0 (by default n=-1 for the previous question). - See also: 1/ ans + See also: 1/ ans Ex1:entry() Ex2:entry(2) Ex3:entry(-2) - + ''' return GiacMethods['entry'](self,*args) @@ -4916,10 +4916,10 @@ cdef class GiacMethods_base: Help for envelope: envelope(Expr(Xpr),Var(t)||[x,y,t]) Returns the envelope of the curves with equation Xpr=0 as t varies. - See also: 1/ tangent 2/ locus + See also: 1/ tangent 2/ locus Ex1:envelope(y+x*tan(t)-2*sin(t),t) Ex2:envelope(v+u*tan(t)-3*sin(t),[u,v,t]) - + ''' return GiacMethods['envelope'](self,*args) @@ -4928,9 +4928,9 @@ cdef class GiacMethods_base: Help for epsilon: epsilon(NULL) Returns the value of epsilon of the CAS configuration. - See also: 1/ epsilon2zero + See also: 1/ epsilon2zero Ex1:epsilon() - + ''' return GiacMethods['epsilon'](self,*args) @@ -4939,9 +4939,9 @@ cdef class GiacMethods_base: Help for epsilon2zero: epsilon2zero(Expr) Values < epsilon are replaced by zero. - See also: 1/ evalf + See also: 1/ evalf Ex1:epsilon2zero(1e-13+x+5) - + ''' return GiacMethods['epsilon2zero'](self,*args) @@ -4950,11 +4950,11 @@ cdef class GiacMethods_base: Help for equal: equal(Expr,Expr) Prefixed version of =. - See also: 1/ = 2/ equal2diff 3/ equal2list 4/ left 5/ right + See also: 1/ = 2/ equal2diff 3/ equal2list 4/ left 5/ right Ex1: 2*x=4 Ex2:equal(2*x,4) Ex3:equal(x^2-3x+2,0) - + ''' return GiacMethods['equal'](self,*args) @@ -4963,10 +4963,10 @@ cdef class GiacMethods_base: Help for equal2diff: equal2diff(Equal) A=B or equal(A,B) is converted into the difference A-B. - See also: 1/ left 2/ right 3/ equal2list 4/ equal 5/ = + See also: 1/ left 2/ right 3/ equal2list 4/ equal 5/ = Ex1:equal2diff(x=2) Ex2:equal2diff(equal(x,2)) - + ''' return GiacMethods['equal2diff'](self,*args) @@ -4975,10 +4975,10 @@ cdef class GiacMethods_base: Help for equal2list: equal2list(Equal) A=B or equal(A,B) is converted into the list [A,B]. - See also: 1/ left 2/ right 3/ equal2diff 4/ equal 5/ = + See also: 1/ left 2/ right 3/ equal2diff 4/ equal 5/ = Ex1:equal2list(x=2) Ex2:equal2list(equal(x,2)) - + ''' return GiacMethods['equal2list'](self,*args) @@ -4987,9 +4987,9 @@ cdef class GiacMethods_base: Help for equation: equation(GeoObj, VectParam) equation returns the cartesian equation of a curve. - See also: 1/ parameq + See also: 1/ parameq Ex1:equation(line(1-i,i),[x,y]) - + ''' return GiacMethods['equation'](self,*args) @@ -4998,12 +4998,12 @@ cdef class GiacMethods_base: Help for equilateral_triangle: equilateral_triangle((Pnt(A) or Cplx),(Pnt(B) or Cplx),[Pnt(P)],[Var(C)]) equilateral_triangle(A,B) (resp equilateral_triangle(A,B,P)) draws the direct equilateral triangle ABC with side AB (resp in the half-plane ABP). - See also: 1/ triangle + See also: 1/ triangle Ex1:equilateral_triangle(point(1+i),0) Ex2:equilateral_triangle(0,1+i,C) Ex3:equilateral_triangle(point(0,0,0),point(3,3,3),point(0,0,3)) Ex4:equilateral_triangle(point(0,0,0),point(3,3,3),point(0,0,3),C) - + ''' return GiacMethods['equilateral_triangle'](self,*args) @@ -5012,10 +5012,10 @@ cdef class GiacMethods_base: Help for erf: erf(Real(x0)) Returns the approximate value of 2/sqrt(pi)*int(exp(-t^2),t,0,x0). - See also: 1/ erfc + See also: 1/ erfc Ex1:erf(1) Ex2:erf(1/(sqrt(2)))*1/2 - + ''' return GiacMethods['erf'](self,*args) @@ -5024,10 +5024,10 @@ cdef class GiacMethods_base: Help for erfc: erfc(Real(x0)) Returns the approximate value of 2/sqrt(pi)*int(exp(-t^2),t,x0,+infinity). - See also: 1/ erf + See also: 1/ erf Ex1:erfc(1) Ex2:erfc(1/(sqrt(2)))*1/2 - + ''' return GiacMethods['erfc'](self,*args) @@ -5036,10 +5036,10 @@ cdef class GiacMethods_base: Help for error: error(Str) Generates the display of an error in a program. - See also: 1/ try 2/ catch + See also: 1/ try 2/ catch Ex1:error("Argument should be integer") Ex2:error("je provoque une erreur") - + ''' return GiacMethods['error'](self,*args) @@ -5048,10 +5048,10 @@ cdef class GiacMethods_base: Help for est_permu: est_permu(Lst) Returns 1 if the argument is a permutation and 0 otherwise. - See also: 1/ is_cycle 2/ permu2cycles + See also: 1/ is_cycle 2/ permu2cycles Ex1:est_permu([4,2,3,1]) Ex2:est_permu([4,2,3,1,0]) - + ''' return GiacMethods['est_permu'](self,*args) @@ -5060,10 +5060,10 @@ cdef class GiacMethods_base: Help for euler: euler(Intg(n)) Euler's function (euler(n)=card({p=0):; euler_lagrange(sqrt((1+y'^2)/y),t,y) - + ''' return GiacMethods['euler_lagrange'](self,*args) @@ -5100,7 +5100,7 @@ cdef class GiacMethods_base: Ex3: purge(a,b,c);eval_level(1);a:=b+1; b:=c+1;c:=3; Ex4: purge(a,b,c);eval_level(2);a:=b+1; b:=c+1;c:=3; Ex5: purge(a,b,c);eval_level(3);a:=b+1; b:=c+1;c:=3; - + ''' return GiacMethods['eval_level'](self,*args) @@ -5109,11 +5109,11 @@ cdef class GiacMethods_base: Help for evala: evala(Expr) Simplifies the expression. - See also: 1/ simplify + See also: 1/ simplify Ex1:evala(2*x+y=1) Ex2:evala(2*x*2) Ex3:evala((2*x+1)^2) - + ''' return GiacMethods['evala'](self,*args) @@ -5122,10 +5122,10 @@ cdef class GiacMethods_base: Help for evalb: evalb(Expr) Boolean evaluation of the argument. - See also: 1/ evalf 2/ eval + See also: 1/ evalf 2/ eval Ex1:evalb(a==2) Ex2:evalb(sqrt(2)+pi>a) - + ''' return GiacMethods['evalb'](self,*args) @@ -5134,10 +5134,10 @@ cdef class GiacMethods_base: Help for evalc: evalc(Expr) Returns a complex expression simplified to the format real+i*imag. - See also: 1/ normal + See also: 1/ normal Ex1:evalc(-3+4*i+exp(i)) Ex2:evalc(1/(x+y*i)) - + ''' return GiacMethods['evalc'](self,*args) @@ -5146,14 +5146,14 @@ cdef class GiacMethods_base: Help for evalf: evalf(Expr,[Int]) Numerical evaluation of the first argument (we can give the number of digits as second argument). - See also: 1/ evalb 2/ eval + See also: 1/ evalb 2/ eval Ex1:evalf(2/3) Ex2:evalf(2/3,2) Ex3:evalf(2*sin(1)) Ex4:evalf(2*sin(1),40) Ex5:evalf(sqrt(2)+pi) Ex6:evalf(sqrt(2)+pi,30) - + ''' return GiacMethods['evalf'](self,*args) @@ -5162,9 +5162,9 @@ cdef class GiacMethods_base: Help for evalm: evalm(Expr) Evaluates its argument. - See also: 1/ evalf + See also: 1/ evalf Ex1:evalm(2*sin(pi)) - + ''' return GiacMethods['evalm'](self,*args) @@ -5173,10 +5173,10 @@ cdef class GiacMethods_base: Help for even: even(Intg(n)) Returns 1 if the integer is even, else returns 0. - See also: 1/ odd + See also: 1/ odd Ex1:even(6) Ex2:even(1251) - + ''' return GiacMethods['even'](self,*args) @@ -5185,11 +5185,11 @@ cdef class GiacMethods_base: Help for evolute: evolute(Curve) Evolute of a curve C. - See also: 1/ curvature 2/ osculating_circle + See also: 1/ curvature 2/ osculating_circle Ex1:evolute(plot(x^2)) Ex2:evolute([t,t^2],t) Ex3:evolute([3*exp(t/2)*cos(t),3*exp(t/2)*sin(t)],t) - + ''' return GiacMethods['evolute'](self,*args) @@ -5198,12 +5198,12 @@ cdef class GiacMethods_base: Help for exact: exact(Expr) Converts the expression to a rational or real expression. - See also: 1/ + See also: 1/ Ex1:exact(-2) Ex2:exact(1.5) Ex3:exact(1.4141) Ex4:exact(0.156381102937) - + ''' return GiacMethods['exact'](self,*args) @@ -5212,9 +5212,9 @@ cdef class GiacMethods_base: Help for exbisector: exbisector((Pnt(A) or Cplx),(Pnt(B) or Cplx),(Pnt(C) or Cplx)) Draws the exterior bisector of the angle (AB,AC) given by 3 points A,B,C. - See also: 1/ angle 2/ bisector + See also: 1/ angle 2/ bisector Ex1:exbisector(0,1,i) - + ''' return GiacMethods['exbisector'](self,*args) @@ -5223,9 +5223,9 @@ cdef class GiacMethods_base: Help for excircle: excircle((Pnt or Cplx),(Pnt or Cplx),(Pnt or Cplx)) excircle(A,B,C) draws the A-excircle of the triangle ABC. - See also: 1/ incircle 2/ circumcircle + See also: 1/ incircle 2/ circumcircle Ex1:excircle(0,1,1+i) - + ''' return GiacMethods['excircle'](self,*args) @@ -5234,12 +5234,12 @@ cdef class GiacMethods_base: Help for execute: execute(Str) Instruction transforming a string into a command or into a number. - See also: 1/ string + See also: 1/ string Ex1:execute("ifactor(54)") Ex2:execute("123") Ex3:execute("0123") Ex4:execute(sin,x) - + ''' return GiacMethods['execute'](self,*args) @@ -5248,10 +5248,10 @@ cdef class GiacMethods_base: Help for exp: exp(Expr or Opt) Exponential or option of the convert or convertir command (id trig2exp). - See also: 1/ ln 2/ convert 3/ trig2exp + See also: 1/ ln 2/ convert 3/ trig2exp Ex1:exp(0) Ex2: convert(cos(x),exp) - + ''' return GiacMethods['exp'](self,*args) @@ -5260,10 +5260,10 @@ cdef class GiacMethods_base: Help for exp2list: exp2list(Expr) Returns the list made with the righthand member of (var=expr0 or var=expr1), to be used after solve in TI mode. - See also: 1/ list2exp + See also: 1/ list2exp Ex1:exp2list((x=2) or (x=0)) Ex2:exp2list((x=3 and y=9) or (x=-1 and y=1) ) - + ''' return GiacMethods['exp2list'](self,*args) @@ -5272,10 +5272,10 @@ cdef class GiacMethods_base: Help for exp2pow: exp2pow(Expr) Transforms exp(n*ln(x)) to x^n. - See also: 1/ pow2exp + See also: 1/ pow2exp Ex1:exp2pow(exp(3*ln(x))) Ex2:exp2pow(exp(x*ln(x))) - + ''' return GiacMethods['exp2pow'](self,*args) @@ -5284,10 +5284,10 @@ cdef class GiacMethods_base: Help for exp2trig: exp2trig(Expr) Transforms the complex exponential into sine and cosine. - See also: 1/ trig2exp 2/ atrig2ln + See also: 1/ trig2exp 2/ atrig2ln Ex1:exp2trig(exp(i*x)) Ex2:exp2trig(exp(-i*x)) - + ''' return GiacMethods['exp2trig'](self,*args) @@ -5296,13 +5296,13 @@ cdef class GiacMethods_base: Help for expand: expand(Expr) Full distribution of * and / over + and -. - See also: 1/ texpand 2/ normal 3/ simplify 4/ ratnormal + See also: 1/ texpand 2/ normal 3/ simplify 4/ ratnormal Ex1:expand((x+y)*(z+1)) Ex2:expand((a+b+c)/d) Ex3:expand((y+x)*(z+y)*(x+z)) Ex4:expand((x+3)^4) Ex5:expand((2*x-2*1)*(x^2-3*x+2)+(x^2-2*x+3)*(2*x-3*1)) - + ''' return GiacMethods['expand'](self,*args) @@ -5311,9 +5311,9 @@ cdef class GiacMethods_base: Help for expexpand: expexpand(Expr) Expands exponentials. - See also: 1/ texpand 2/ lnexpand 3/ trigexpand + See also: 1/ texpand 2/ lnexpand 3/ trigexpand Ex1:expexpand(exp(3*x)) - + ''' return GiacMethods['expexpand'](self,*args) @@ -5322,9 +5322,9 @@ cdef class GiacMethods_base: Help for expln: expln(Opt) Option of the convert or convertir command (id trig2exp). - See also: 1/ exp 2/ ln 3/ convert 4/ trig2exp + See also: 1/ exp 2/ ln 3/ convert 4/ trig2exp Ex1: convert(cos(x),expln) - + ''' return GiacMethods['expln'](self,*args) @@ -5333,12 +5333,12 @@ cdef class GiacMethods_base: Help for exponential: exponential(Real(lambda),Real(x)) Returns the probability density at x of the exponential law of parameter lambda. - See also: 1/ exponential_cdf 2/ exponential_icdf 3/ randvector 4/ ranm + See also: 1/ exponential_cdf 2/ exponential_icdf 3/ randvector 4/ ranm Ex1:exponential(2.1,3.5) Ex2:exponential(2.1,0.5) Ex3: randvector(3,exponential,1.2) Ex4: ranm(4,3,exponential,1.2) - + ''' return GiacMethods['exponential'](self,*args) @@ -5347,10 +5347,10 @@ cdef class GiacMethods_base: Help for exponential_cdf: exponential_cdf(Real(lambda),Real(x0),[Real(y0)]) Returns the probability that a exponential random variable of parameter lambda is less than x0 (or between x0 and y0). - See also: 1/ exponentiald 2/ exponential_icdf + See also: 1/ exponentiald 2/ exponential_icdf Ex1:exponential_cdf(4.2,2.1) Ex2:exponential_cdf(4.2,2.1,3.2) - + ''' return GiacMethods['exponential_cdf'](self,*args) @@ -5359,10 +5359,10 @@ cdef class GiacMethods_base: Help for exponential_icdf: exponential_icdf(Real(lambda),Real(x0),Real(p)) Returns h such that the probability that a exponential random variable of parameter lambda is less than h is p (0<=p<=1). - See also: 1/ exponential_cdf 2/ exponentiald + See also: 1/ exponential_cdf 2/ exponentiald Ex1:exponential_icdf(4.2,0.95) Ex2:exponential_icdf(4.2,0.6) - + ''' return GiacMethods['exponential_icdf'](self,*args) @@ -5371,10 +5371,10 @@ cdef class GiacMethods_base: Help for exponential_regression: exponential_regression(Lst||Mtrx(A),[Lst]) Returns the coefficients (a,b) of y=b*a^x : it is the best exponential which approx the points where the coordinates are the rows of A (or the 2 lists). - See also: 1/ logarithmic_regression + See also: 1/ logarithmic_regression Ex1:exponential_regression([[1.0,2.0],[0.0,1.0],[4.0,7.0]]) Ex2:exponential_regression([1.0,0.0,4.0],[2.0,1.0,7.0]) - + ''' return GiacMethods['exponential_regression'](self,*args) @@ -5383,10 +5383,10 @@ cdef class GiacMethods_base: Help for exponential_regression_plot: exponential_regression_plot(Lst||Mtrx(A),[Lst]) Returns the plot of y=b*a^x : it is the best exponential which approx the points where the coordinates are the rows of A (or the 2 lists). - See also: 1/ logarithmic_regression_plot + See also: 1/ logarithmic_regression_plot Ex1:exponential_regression_plot([[1.0,2.0],[0.0,1.0],[4.0,7.0]]) Ex2:exponential_regression_plot([1.0,0.0,4.0],[2.0,1.0,7.0]) - + ''' return GiacMethods['exponential_regression_plot'](self,*args) @@ -5395,12 +5395,12 @@ cdef class GiacMethods_base: Help for exponentiald: exponentiald(Real(lambda),Real(x)) Returns the probability density at x of the exponential law of parameter lambda. - See also: 1/ exponential_cdf 2/ exponential_icdf 3/ randvector 4/ ranm + See also: 1/ exponential_cdf 2/ exponential_icdf 3/ randvector 4/ ranm Ex1:exponentiald(2.1,3.5) Ex2:exponentiald(2.1,0.5) Ex3: randvector(3,exponential,1.2) Ex4: ranm(4,3,exponential,1.2) - + ''' return GiacMethods['exponentiald'](self,*args) @@ -5409,10 +5409,10 @@ cdef class GiacMethods_base: Help for exponentiald_cdf: exponentiald_cdf(Real(lambda),Real(x0),[Real(y0)]) Returns the probability that a exponential random variable of parameter lambda is less than x0 (or between x0 and y0). - See also: 1/ exponentiald 2/ exponential_icdf + See also: 1/ exponentiald 2/ exponential_icdf Ex1:exponentiald_cdf(4.2,2.1) Ex2:exponentiald_cdf(4.2,2.1,3.2) - + ''' return GiacMethods['exponentiald_cdf'](self,*args) @@ -5421,10 +5421,10 @@ cdef class GiacMethods_base: Help for exponentiald_icdf: exponentiald_icdf(Real(lambda),Real(x0),Real(p)) Returns h such that the probability that a exponential random variable of parameter lambda is less than h is p (0<=p<=1). - See also: 1/ exponential_cdf 2/ exponentiald + See also: 1/ exponential_cdf 2/ exponentiald Ex1:exponentiald_icdf(4.2,0.95) Ex2:exponentiald_icdf(4.2,0.6) - + ''' return GiacMethods['exponentiald_icdf'](self,*args) @@ -5433,9 +5433,9 @@ cdef class GiacMethods_base: Help for export_graph: export_graph(Graph(G),Str("path/to/graphname")) Writes G to the file 'graphname.dot' in directory 'path/to' in dot format, returns 1 on success and 0 on failure. - See also: 1/ import_graph + See also: 1/ import_graph Ex1:export_graph(complete_graph(5),"K5") - + ''' return GiacMethods['export_graph'](self,*args) @@ -5444,11 +5444,11 @@ cdef class GiacMethods_base: Help for export_mathml: export_mathml(Expr,[display||content]) Converts an expression to presentation or content MathML block. - See also: 1/ mathml 2/ latex + See also: 1/ mathml 2/ latex Ex1:export_mathml(a+2*b) Ex2:export_mathml(a+2*b,display) Ex3:export_mathml(a+2*b,content) - + ''' return GiacMethods['export_mathml'](self,*args) @@ -5457,10 +5457,10 @@ cdef class GiacMethods_base: Help for expovariate: expovariate(Real(a)) Returns a random real according to the exponential distribution with parameter a>0. - See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector + See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector Ex1:expovariate(1) Ex2:expovariate(2) - + ''' return GiacMethods['expovariate'](self,*args) @@ -5469,12 +5469,12 @@ cdef class GiacMethods_base: Help for expr: expr(Str) Instruction transforming a string into a command or into a number. - See also: 1/ string + See also: 1/ string Ex1:expr("ifactor(54)") Ex2:expr("123") Ex3:expr("0123") Ex4:expr(sin,x) - + ''' return GiacMethods['expr'](self,*args) @@ -5483,13 +5483,13 @@ cdef class GiacMethods_base: Help for extend: extend(Lst,Lst||Seq,Seq||Str,Str||Mtrx,Mtrx) Concatenates two lists or two strings or two sequences or 2 matrices; L:=concat(L,L1) or L.concat(L1). - See also: 1/ append 2/ cat 3/ semi_augment 4/ border 5/ + + See also: 1/ append 2/ cat 3/ semi_augment 4/ border 5/ + Ex1:extend([1,2],[3,4,5]) Ex2:extend("bon","jour") Ex3:extend([[1,2],[3,4]],[[4,5,6],[6,7,8]]) Ex4: L:=[1,2];L.concat([3,4,5]) Ex5: S:="abcd";S.concat("efghi") - + ''' return GiacMethods['extend'](self,*args) @@ -5498,11 +5498,11 @@ cdef class GiacMethods_base: Help for extract_measure: extract_measure(Var) extract_measure gives as answer the value calculated by the argument. - See also: 1/ angleatraw 2/ distanceatraw 3/ angleat 4/ distanceat 5/ slopeatraw 6/ areaatraw 7/ perimeteratraw 8/ slopeat 5/ areaat 10/ perimeterat + See also: 1/ angleatraw 2/ distanceatraw 3/ angleat 4/ distanceat 5/ slopeatraw 6/ areaatraw 7/ perimeteratraw 8/ slopeat 5/ areaat 10/ perimeterat Ex1:extract_measure(distanceatraw(0,1+i,(1+i)/2)) Ex2:extract_measure(angleatraw(0,1,1+i,1)) Ex3: A:=point(0);B:=point(1+i);a:=distanceatraw(A,B,(1+i)/2);extract_measure(a) - + ''' return GiacMethods['extract_measure'](self,*args) @@ -5556,7 +5556,7 @@ cdef class GiacMethods_base: Ex43:extrema(4x*y-x^4-y^4,[x,y]) Ex44:extrema(x*sin(y),[x,y]) Ex45:extrema(x^4+y^4,[x,y]) - Ex46:extrema(x^3*y-x*y^3,[x,y]) + Ex46:extrema(x^3*y-x*y^3,[x,y]) Ex47:extrema(x^2+y^2+z^2,x^4+y^4+z^4=1,[x,y,z]) Ex48:extrema(3x+3y+8z,[x^2+z^2=1,y^2+z^2=1],[x,y,z]) Ex49:extrema(2x^2+y^2,x^4-x^2+y^2=5,[x,y]) @@ -5565,10 +5565,10 @@ cdef class GiacMethods_base: Ex52:extrema(ln(x)+2*ln(y)+3*ln(z)+4*ln(u)+5*ln(v),x+y+z+u+v=1,[x,y,z,u,v]) Ex53:extrema(x*y*z,-2x^3+15x^2*y+11y^3-24y=0,[x,y,z]) Ex54:extrema(x+y-exp(x)-exp(y)-exp(x+y),[x,y]) - Ex55:extrema(x^2*sin(y)-4*x,[x,y]) + Ex55:extrema(x^2*sin(y)-4*x,[x,y]) Ex56:extrema((1+y*sinh(x))/(1+y^2+tanh(x)^2),[x,y]) Ex57:extrema((1+y*sinh(x))/(1+y^2+tanh(x)^2),y=x^2,[x,y]) - + ''' return GiacMethods['extrema'](self,*args) @@ -5577,11 +5577,11 @@ cdef class GiacMethods_base: Help for ezgcd: ezgcd(Poly,Poly) GCD of 2 polynomials with at least 2 variables, with the ezgcd algorithm. - See also: 1/ gcd 2/ modgcd 3/ heugcd 4/ psrgcd + See also: 1/ gcd 2/ modgcd 3/ heugcd 4/ psrgcd Ex1:ezgcd(x^2-2*xy+y^2-1,x-y) Ex2:ezgcd((x+1)^4-y^4,(x+1-y)^2) Ex3:ezgcd((x+y-1)*(x+y+1),(x+y+1)^2) - + ''' return GiacMethods['ezgcd'](self,*args) @@ -5590,10 +5590,10 @@ cdef class GiacMethods_base: Help for f2nd: f2nd(Frac or RatFrac) Returns the list built with the numerator and the denominator of the simplified fraction. - See also: 1/ simp2 2/ numer 3/ denom 4/ getNum 5/ getDenom + See also: 1/ simp2 2/ numer 3/ denom 4/ getNum 5/ getDenom Ex1:f2nd(42/12) Ex2:f2nd((x^2+2*x+1)/(x^2-1)) - + ''' return GiacMethods['f2nd'](self,*args) @@ -5602,10 +5602,10 @@ cdef class GiacMethods_base: Help for fMax: fMax(Expr,[Var]) Returns the abscissa of the maximum of the expression. - See also: 1/ fMin + See also: 1/ fMin Ex1:fMax(-x^2+2*x+1,x) Ex2:fMax(-x^2+2*x+1,x=1..2) - + ''' return GiacMethods['fMax'](self,*args) @@ -5614,12 +5614,12 @@ cdef class GiacMethods_base: Help for fMin: fMin(Expr,[Var]) Returns the abscissa of the minimum of the expression. - See also: 1/ fMax + See also: 1/ fMax Ex1:fMin(x^2-2*x+1,x) Ex2:fMin(x^2-2*x+1,x=1..2) Ex3:fMin((x-3)^2+(y-5)^2+1,[],[x,y],[1,1]) Ex4:fMin((x-3)^2+(y-5)^2+1,[x+y^2=1],[x,y],[1,1]) - + ''' return GiacMethods['fMin'](self,*args) @@ -5628,13 +5628,13 @@ cdef class GiacMethods_base: Help for fPart: fPart(Real||LstReal) Returns the fractional part (if x<0 then frac(x)+floor(x)+1=x else frac(x)+floor(x)=x). - See also: 1/ floor 2/ iPart 3/ trunc + See also: 1/ floor 2/ iPart 3/ trunc Ex1:fPart(1/2) Ex2:fPart(-1/2) Ex3:fPart(1.2) Ex4:fPart(-1.2) Ex5:fPart([3.4,sqrt(2)]) - + ''' return GiacMethods['fPart'](self,*args) @@ -5643,10 +5643,10 @@ cdef class GiacMethods_base: Help for faces: faces(Polygon or Polyedr(P)) Returns the list of the faces (1 face=matrix(n,3) where the n rows are the n vertices of the face) of the polyhedron P. - See also: 1/ polyhedron + See also: 1/ polyhedron Ex1:faces(polyhedron([0,0,0],[0,5,0],[0,0,5],[1,2,6])) Ex2:faces(polyhedron([0,0,0],[0,5,0],[0,0,5],[1,2,6]))[2] - + ''' return GiacMethods['faces'](self,*args) @@ -5655,10 +5655,10 @@ cdef class GiacMethods_base: Help for facteurs_premiers: facteurs_premiers(Intg(a) or LstIntg) Returns the list of prime factors of an integer (each factor is followed by its multiplicity). - See also: 1/ ifactor 2/ factors + See also: 1/ ifactor 2/ factors Ex1:facteurs_premiers(36) Ex2:facteurs_premiers([36,52]) - + ''' return GiacMethods['facteurs_premiers'](self,*args) @@ -5667,11 +5667,11 @@ cdef class GiacMethods_base: Help for factor: factor(Expr) Factors a polynomial. - See also: 1/ ifactor 2/ cfactor 3/ partfrac 4/ normal + See also: 1/ ifactor 2/ cfactor 3/ partfrac 4/ normal Ex1:factor(x^4-1) Ex2:factor(x^4-4,sqrt(2)) Ex3:factor(x^4+12*x^3+54*x^2+108*x+81) - + ''' return GiacMethods['factor'](self,*args) @@ -5680,10 +5680,10 @@ cdef class GiacMethods_base: Help for factor_xn: factor_xn(Poly(P)) Factors x^n in P (n=degree of polynomial P). - See also: 1/ ifactor 2/ partfrac 3/ normal + See also: 1/ ifactor 2/ partfrac 3/ normal Ex1:factor_xn(x^4-1) Ex2:factor_xn(x^4+12*x^3+54*x^2+108*x+81) - + ''' return GiacMethods['factor_xn'](self,*args) @@ -5692,10 +5692,10 @@ cdef class GiacMethods_base: Help for factorial: factorial(Intg(n)|| Real(a)) factorial(n)=n!. For non-integers, factorial(a)=a! = G(a + 1). This calculates the Gamma function. - See also: 1/ comb 2/ perm + See also: 1/ comb 2/ perm Ex1:factorial(4) Ex2:factorial(1.2) - + ''' return GiacMethods['factorial'](self,*args) @@ -5704,11 +5704,11 @@ cdef class GiacMethods_base: Help for factoriser: factoriser(Expr) Factors a polynomial. - See also: 1/ ifactor 2/ cfactor 3/ partfrac 4/ normal + See also: 1/ ifactor 2/ cfactor 3/ partfrac 4/ normal Ex1:factoriser(x^4-1) Ex2:factoriser(x^4-4,sqrt(2)) Ex3:factoriser(x^4+12*x^3+54*x^2+108*x+81) - + ''' return GiacMethods['factoriser'](self,*args) @@ -5717,10 +5717,10 @@ cdef class GiacMethods_base: Help for factoriser_entier: factoriser_entier(Intg(a)) Factorization of an integer into prime factors. - See also: 1/ factor 2/ ecm_factor + See also: 1/ factor 2/ ecm_factor Ex1:factoriser_entier(50) Ex2:factoriser_entier(123456789) - + ''' return GiacMethods['factoriser_entier'](self,*args) @@ -5729,11 +5729,11 @@ cdef class GiacMethods_base: Help for factoriser_sur_C: factoriser_sur_C(Expr) Factorization of the expression in ℂ (on the Gaussian integers if there are more than 2 variables). - See also: 1/ factor + See also: 1/ factor Ex1:factoriser_sur_C(x^2*y+y) Ex2:factoriser_sur_C(x^2*y^2+y^2+4*x^2+4) Ex3:factoriser_sur_C(x^2*y^2+y^2+2*x^2+2) - + ''' return GiacMethods['factoriser_sur_C'](self,*args) @@ -5742,10 +5742,10 @@ cdef class GiacMethods_base: Help for factors: factors(Poly or LstPoly) Returns the list of prime factors of a polynomial (each factor is followed by its multiplicity). - See also: 1/ factor 2/ ifactors + See also: 1/ factor 2/ ifactors Ex1:factors(x^4-1) Ex2:factors([x^2,x^2-1]) - + ''' return GiacMethods['factors'](self,*args) @@ -5754,9 +5754,9 @@ cdef class GiacMethods_base: Help for fadeev: fadeev(Opt) Option of the pcar or charpoly command to specify the algorithm. - See also: 1/ pcar + See also: 1/ pcar Ex1: pcar([[4,1,-2],[1,2,-1],[2,1,0]],fadeev) - + ''' return GiacMethods['fadeev'](self,*args) @@ -5765,9 +5765,9 @@ cdef class GiacMethods_base: Help for false: false() Boolean equal to false or 0. - See also: 1/ true + See also: 1/ true Ex1: a:=false - + ''' return GiacMethods['false'](self,*args) @@ -5776,14 +5776,14 @@ cdef class GiacMethods_base: Help for falsepos_solver: falsepos_solver(Opt) Argument for fsolve giving the method for solving a numerical equation. - See also: 1/ fsolve + See also: 1/ fsolve Ex1: fsolve(cos(x)=x,x,0..1,bisection_solver) Ex2: fsolve(cos(x)=x,x,0..1,brent_solver) Ex3: fsolve(cos(x)=x,x,0..1,falsepos_solver) Ex4: fsolve(cos(x)=x,x,0,newton_solver) Ex5: fsolve(cos(x)=x,x,0,secant_solver) Ex6: fsolve(cos(x)=x,x,0,steffenson_solver) - + ''' return GiacMethods['falsepos_solver'](self,*args) @@ -5792,9 +5792,9 @@ cdef class GiacMethods_base: Help for fclose: fclose(File(f)) Closes the file f. - See also: 1/ fprint 2/ fopen + See also: 1/ fprint 2/ fopen Ex1:fclose(f) - + ''' return GiacMethods['fclose'](self,*args) @@ -5803,9 +5803,9 @@ cdef class GiacMethods_base: Help for fcoeff: fcoeff(Lst(root||pole,order)) Returns the polynomial described by the list (root or pole, order). - See also: 1/ pcoeff 2/ froot 3/ proot + See also: 1/ pcoeff 2/ froot 3/ proot Ex1:fcoeff([1,2,0,1,3,-1]) - + ''' return GiacMethods['fcoeff'](self,*args) @@ -5814,13 +5814,13 @@ cdef class GiacMethods_base: Help for fdistrib: fdistrib(Expr) Full distribution of * and / over + and -. - See also: 1/ texpand 2/ normal 3/ simplify 4/ ratnormal + See also: 1/ texpand 2/ normal 3/ simplify 4/ ratnormal Ex1:fdistrib((x+y)*(z+1)) Ex2:fdistrib((a+b+c)/d) Ex3:fdistrib((y+x)*(z+y)*(x+z)) Ex4:fdistrib((x+3)^4) Ex5:fdistrib((2*x-2*1)*(x^2-3*x+2)+(x^2-2*x+3)*(2*x-3*1)) - + ''' return GiacMethods['fdistrib'](self,*args) @@ -5829,10 +5829,10 @@ cdef class GiacMethods_base: Help for fft: fft(Vect or (Vect(L),Intg(a),Intg(p)) Fast Fourier Transform in ℝ or in the field ℤ/pℤ, with a as primitive n-th root of 1 (n=size(L)). - See also: 1/ ifft + See also: 1/ ifft Ex1:fft([1,2,3,4,0,0,0,0]) Ex2:fft(ranm(128),22798,35969) - + ''' return GiacMethods['fft'](self,*args) @@ -5841,13 +5841,13 @@ cdef class GiacMethods_base: Help for fieldplot: fieldplot(Expr,VectVar,[Opt]) fieldplot(f(t,y),[t,y]) draws the plotfield of the diff equation y'=f(t,y). - See also: 1/ interactive_plotode 2/ odeplot 3/ odesolve 4/ desolve + See also: 1/ interactive_plotode 2/ odeplot 3/ odesolve 4/ desolve Ex1:fieldplot(sin(t*y),[t=-5..5,y=-3..3],xstep=0.5,ystep=0.5) Ex2:fieldplot(-t*y,[t,y]) Ex3:fieldplot(-t*y,[t,y],normalize) Ex4:fieldplot(-t*y,[t,y],normalize,xstep=0.5,ystep=0.5) Ex5:fieldplot(-t*y,[t=-6.868..6.868,y=-6.868..6.868],normalize) - + ''' return GiacMethods['fieldplot'](self,*args) @@ -5856,13 +5856,13 @@ cdef class GiacMethods_base: Help for find: find(Expr,Vect) List of positions of an object in a list, a string or a set. - See also: 1/ index 2/ member + See also: 1/ index 2/ member Ex1:find(1,[3,x,1,2,1,3]) Ex2:find(2,[0,1,3,2,4,2,5])[0] Ex3:find("a","abracadabrant") Ex4:find("ab","abracadabrant") Ex5:find(1,%{4,3,1,2%}) - + ''' return GiacMethods['find'](self,*args) @@ -5871,11 +5871,11 @@ cdef class GiacMethods_base: Help for find_cycles: find_cycles(Graph(G,[length=k||l..u])) Returns the list of elementary cycles of the digraph G. If option "length" is specified, only cycles of length k resp. of length between l and u are returned. - See also: 1/ is_acyclic + See also: 1/ is_acyclic Ex1:find_cycles(digraph(%{[1,2],[1,3],[3,1],[1,4],[2,3],[4,3],[4,5],[5,3],[5,6],[7,6],[8,6],[8,7]%})) Ex2:find_cycles(digraph(%{[1,2],[1,3],[3,1],[1,4],[2,3],[4,3],[4,5],[5,3],[5,6],[7,6],[8,6],[8,7]%}),length=3) Ex3:find_cycles(digraph(%{[1,2],[1,3],[3,1],[1,4],[2,3],[4,3],[4,5],[5,3],[5,6],[7,6],[8,6],[8,7]%}),length=3..4) - + ''' return GiacMethods['find_cycles'](self,*args) @@ -5884,9 +5884,9 @@ cdef class GiacMethods_base: Help for findhelp: findhelp(Cmd) Returns help about the command (if ? is infixed see when) . - See also: 1/ ifte 2/ when + See also: 1/ ifte 2/ when Ex1:findhelp(ifactor) - + ''' return GiacMethods['findhelp'](self,*args) @@ -5895,12 +5895,12 @@ cdef class GiacMethods_base: Help for fisher: fisher(Intg(n),Intg(m),Real(x0)) Returns the probability density of the Fisher-Snedecor law (n and m are the numbers of degrees of freedom). - See also: 1/ fisher_cdf 2/ fisher_icdf 3/ randvector 4/ ranm + See also: 1/ fisher_cdf 2/ fisher_icdf 3/ randvector 4/ ranm Ex1:fisher(4,10,2.1) Ex2:fisher(4,4,2.1) Ex3: randvector(5,fisher,4,6) Ex4: ranm(2,3,fisher,4,6) - + ''' return GiacMethods['fisher'](self,*args) @@ -5909,10 +5909,10 @@ cdef class GiacMethods_base: Help for fisher_cdf: fisher_cdf(Intg(n),Intg(m),Real(x0)) Returns the probability that a Fisher-Snedecor random variable is less than x0 (n and m are the numbers of degrees of freedom). - See also: 1/ UTPF 2/ fisher_icdf 3/ fisherd + See also: 1/ UTPF 2/ fisher_icdf 3/ fisherd Ex1:fisher_cdf(4,4,2.1) Ex2:fisher_cdf(4,10,3.5) - + ''' return GiacMethods['fisher_cdf'](self,*args) @@ -5921,10 +5921,10 @@ cdef class GiacMethods_base: Help for fisher_icdf: fisher_icdf(Intg(n),Intg(m),Real(p)) Returns h such as the probability that a Fisher-Snedecor random variable is less than h is p (n and m are the numbers of degrees of freedom and 0<=p<=1). - See also: 1/ fisher_cdf 2/ fisherd + See also: 1/ fisher_cdf 2/ fisherd Ex1:fisher_icdf(4,10,0.95) Ex2:fisher_icdf(4,10,0.05) - + ''' return GiacMethods['fisher_icdf'](self,*args) @@ -5933,12 +5933,12 @@ cdef class GiacMethods_base: Help for fisherd: fisherd(Intg(n),Intg(m),Real(x0)) Returns the probability density of the Fisher-Snedecor law (n and m are the numbers of degrees of freedom). - See also: 1/ fisher_cdf 2/ fisher_icdf 3/ randvector 4/ ranm + See also: 1/ fisher_cdf 2/ fisher_icdf 3/ randvector 4/ ranm Ex1:fisherd(4,10,2.1) Ex2:fisherd(4,4,2.1) Ex3: randvector(5,fisher,4,6) Ex4: ranm(2,3,fisher,4,6) - + ''' return GiacMethods['fisherd'](self,*args) @@ -5947,10 +5947,10 @@ cdef class GiacMethods_base: Help for fisherd_cdf: fisherd_cdf(Intg(n),Intg(m),Real(x0)) Returns the probability that a Fisher-Snedecor random variable is less than x0 (n and m are the numbers of degrees of freedom). - See also: 1/ UTPF 2/ fisher_icdf 3/ fisherd + See also: 1/ UTPF 2/ fisher_icdf 3/ fisherd Ex1:fisherd_cdf(4,4,2.1) Ex2:fisherd_cdf(4,10,3.5) - + ''' return GiacMethods['fisherd_cdf'](self,*args) @@ -5959,10 +5959,10 @@ cdef class GiacMethods_base: Help for fisherd_icdf: fisherd_icdf(Intg(n),Intg(m),Real(p)) Returns h such as the probability that a Fisher-Snedecor random variable is less than h is p (n and m are the numbers of degrees of freedom and 0<=p<=1). - See also: 1/ fisher_cdf 2/ fisherd + See also: 1/ fisher_cdf 2/ fisherd Ex1:fisherd_icdf(4,10,0.95) Ex2:fisherd_icdf(4,10,0.05) - + ''' return GiacMethods['fisherd_icdf'](self,*args) @@ -5971,11 +5971,11 @@ cdef class GiacMethods_base: Help for fitdistr: fitdistr(Lst(L),Fnc(D)) Returns the distribution of type D which fits most closely to the i.i.d. samples in the list L. - See also: 1/ normald 2/ poisson 3/ exponentiald 4/ geometric 5/ gammad 6/ betad 7/ cauchyd 8/ weibulld 9/ sample 10/ randvector 11/ randvar + See also: 1/ normald 2/ poisson 3/ exponentiald 4/ geometric 5/ gammad 6/ betad 7/ cauchyd 8/ weibulld 9/ sample 10/ randvector 11/ randvar Ex1:fitdistr(randvector(1000,weibulld,1/2,1),weibull) Ex2: X:=randvar(normal,stddev=9.5):;Y:=randvar(normal,stddev=1.5):;S:=sample(eval(X/Y,0),1000):;Z:=fitdistr(S,cauchy) Ex3: X:=randvar(normal,mean=5,variance=2):;S:=sample(exp(X),1000):;fitdistr(log(S),normal) - + ''' return GiacMethods['fitdistr'](self,*args) @@ -5984,9 +5984,9 @@ cdef class GiacMethods_base: Help for flatten: flatten(Lst) Recursively flatten a list containing lists. - See also: 1/ mat2list + See also: 1/ mat2list Ex1:flatten([[1,[2,3],4],[5,6]]) - + ''' return GiacMethods['flatten'](self,*args) @@ -5995,12 +5995,12 @@ cdef class GiacMethods_base: Help for float2rational: float2rational(Expr) Converts the expression to a rational or real expression. - See also: 1/ + See also: 1/ Ex1:float2rational(-2) Ex2:float2rational(1.5) Ex3:float2rational(1.4141) Ex4:float2rational(0.156381102937) - + ''' return GiacMethods['float2rational'](self,*args) @@ -6009,10 +6009,10 @@ cdef class GiacMethods_base: Help for floor: floor(Real or Cplx) Returns the greatest integer <= to the argument. - See also: 1/ round 2/ ceil 3/ iPart 4/ trunc + See also: 1/ round 2/ ceil 3/ iPart 4/ trunc Ex1:floor(-2.5) Ex2:floor(2.5-4.2*i) - + ''' return GiacMethods['floor'](self,*args) @@ -6021,10 +6021,10 @@ cdef class GiacMethods_base: Help for flow_polynomial: flow_polynomial(Graph(G),[Var(x)]) Returns the flow polynomial [or its value at point x] of undirected unweighted graph G. - See also: 1/ chromatic_polynomial 2/ reliability_polynomial 3/ tutte_polynomial + See also: 1/ chromatic_polynomial 2/ reliability_polynomial 3/ tutte_polynomial Ex1:flow_polynomial(graph("tetrahedron")) Ex2:flow_polynomial(graph("tetrahedron"),5) - + ''' return GiacMethods['flow_polynomial'](self,*args) @@ -6034,7 +6034,7 @@ cdef class GiacMethods_base: fmod(Real(a),Real(b)) Returns a mod b for a and b floats. Ex1:fmod(10.0,pi) - + ''' return GiacMethods['fmod'](self,*args) @@ -6043,9 +6043,9 @@ cdef class GiacMethods_base: Help for foldl: foldl(op,id,Seq(r1,r2,...)) Returns the composition of the binary operator or function op, with an identity or initial value id onto its arguments r1, r2, ..., associating from the left. - See also: 1/ apply 2/ foldr 3/ map + See also: 1/ apply 2/ foldr 3/ map Ex1:foldl(F,init,a,b,c) - + ''' return GiacMethods['foldl'](self,*args) @@ -6054,9 +6054,9 @@ cdef class GiacMethods_base: Help for foldr: foldr(op,id,Seq(r1,r2,...)) Returns the composition of the binary operator or function op, with an identity or initial value id onto its arguments r1, r2, ..., associating from the right. - See also: 1/ apply 2/ foldl 3/ map + See also: 1/ apply 2/ foldl 3/ map Ex1:foldr(F,init,a,b,c) - + ''' return GiacMethods['foldr'](self,*args) @@ -6065,13 +6065,13 @@ cdef class GiacMethods_base: Help for fonction_derivee: fonction_derivee(Fnc(f)) Returns the derivative function of the function f. - See also: 1/ diff 2/ ' 3/ @ + See also: 1/ diff 2/ ' 3/ @ Ex1:fonction_derivee(sin+id) Ex2:fonction_derivee(sq@sin+id) Ex3:fonction_derivee(ln)(x,y) Ex4:fonction_derivee(ln)([x,y]) - Ex5: (function_diff @@3)(ln)('x') - + Ex5: (function_diff @@3)(ln)('x') + ''' return GiacMethods['fonction_derivee'](self,*args) @@ -6080,10 +6080,10 @@ cdef class GiacMethods_base: Help for forward: forward(NULL or Real(n)) The turtle takes n steps forward (by default n=10). - See also: 1/ recule 2/ saute + See also: 1/ recule 2/ saute Ex1: avance 30 Ex2:forward(30) - + ''' return GiacMethods['forward'](self,*args) @@ -6092,7 +6092,7 @@ cdef class GiacMethods_base: Help for fourier: fourier(Expr(f(x)),[Var(x),[Var(s)]]) Returns the Fourier transform F(s) of f(x). - See also: 1/ ifourier 2/ fourier_cn 3/ fft + See also: 1/ ifourier 2/ fourier_cn 3/ fft Ex1:fourier(x/(x^3-19x+30),x,s) Ex2:fourier((x^2+1)/(x^2-1),x,s) Ex3:fourier(3x^2+2x+1,x,s) @@ -6109,7 +6109,7 @@ cdef class GiacMethods_base: Ex14:fourier(Gamma(1+i*x/3),x,s) Ex15:fourier(atan(x/4)/x,x,s) Ex16:fourier(piecewise(x<=-1,exp(x+1),x<=1,1,exp(2-2x)),x,s) - + ''' return GiacMethods['fourier'](self,*args) @@ -6118,10 +6118,10 @@ cdef class GiacMethods_base: Help for fourier_an: fourier_an(Expr(f(x)),Var(x),Period(T),Intg(n),Real(a)) Returns the n-th Fourier coefficient an=2/T*integrate(f(x)*cos(2*pi*n*x/T),a,a+T). - See also: 1/ fourier_cn 2/ fourier_bn 3/ assume + See also: 1/ fourier_cn 2/ fourier_bn 3/ assume Ex1:fourier_an(x^2,x,2,0,-1) Ex2:fourier_an(x^2,x,2,n,-1) - + ''' return GiacMethods['fourier_an'](self,*args) @@ -6130,10 +6130,10 @@ cdef class GiacMethods_base: Help for fourier_bn: fourier_bn(Expr(f(x)),Var(x),Period(T),Intg(n),Real(a)) Returns the n-th Fourier coefficient bn=2/T*integrate(f(x)*sin(2*pi*n*x/T),a,a+T). - See also: 1/ fourier_cn 2/ fourier_an 3/ assume + See also: 1/ fourier_cn 2/ fourier_an 3/ assume Ex1:fourier_bn(x^2,x,2,0,-1) Ex2:fourier_bn(x^2,x,2,n,-1) - + ''' return GiacMethods['fourier_bn'](self,*args) @@ -6142,10 +6142,10 @@ cdef class GiacMethods_base: Help for fourier_cn: fourier_cn(Expr(f(x)),Var(x),Period(T),Intg(n),Real(a)) Returns the n-th Fourier coefficient cn=1/T*integrate(f(x)*exp(-2*i*pi*n*x/T),a,a+T). - See also: 1/ fourier_an 2/ fourier_bn 3/ assume + See also: 1/ fourier_an 2/ fourier_bn 3/ assume Ex1:fourier_cn(x^2,x,2,0,-1) Ex2:fourier_cn(x^2,x,2,n,-1) - + ''' return GiacMethods['fourier_cn'](self,*args) @@ -6154,11 +6154,11 @@ cdef class GiacMethods_base: Help for fprint: fprint(File(f),Var,[Var,Var...]) Writes in the file f some data. - See also: 1/ fopen 2/ fclose + See also: 1/ fopen 2/ fclose Ex1:fprint(f,x+1,"2") Ex2:fprint(f,"blabla") Ex3:fprint(f,Unquoted,"blabla") - + ''' return GiacMethods['fprint'](self,*args) @@ -6167,13 +6167,13 @@ cdef class GiacMethods_base: Help for frac: frac(Real||LstReal) Returns the fractional part (if x<0 then frac(x)+floor(x)+1=x else frac(x)+floor(x)=x). - See also: 1/ floor 2/ iPart 3/ trunc + See also: 1/ floor 2/ iPart 3/ trunc Ex1:frac(1/2) Ex2:frac(-1/2) Ex3:frac(1.2) Ex4:frac(-1.2) Ex5:frac([3.4,sqrt(2)]) - + ''' return GiacMethods['frac'](self,*args) @@ -6182,9 +6182,9 @@ cdef class GiacMethods_base: Help for fracmod: fracmod(Expr(Xpr),Intg(n)) Returns the fraction a/b such as b*Xpr=a mod n, -sqrt(n)/20),Real(b>0),Real(x>=0)) Returns the probability density of the Gamma law (=x^(a-1)*exp(-b*x)*b^a/Gamma(a)). - See also: 1/ gammad_cdf; 2/ gammad_icdf + See also: 1/ gammad_cdf; 2/ gammad_icdf Ex1:gammad(2.2,1.5,0.8) - + ''' return GiacMethods['gammad'](self,*args) @@ -6318,10 +6318,10 @@ cdef class GiacMethods_base: Help for gammad_cdf: gammad_cdf(Real(a>0),Real(b>0),Real(x0>=0),[Real(y0>=0)]) Returns the probability that a Gamma random variable (with a and b as parameters) is less than x0 or between x0 and y0. - See also: 1/ gammad 2/ gammad_icdf + See also: 1/ gammad 2/ gammad_icdf Ex1:gammad_cdf(2,1,2.96) Ex2:gammad_cdf(2,1,1.4,2.96) - + ''' return GiacMethods['gammad_cdf'](self,*args) @@ -6330,10 +6330,10 @@ cdef class GiacMethods_base: Help for gammad_icdf: gammad_icdf(Real(a>0),Real(b>0),Real(0<=p<=1)) Returns h such that the probability that a Gamma random variable is less than h is p (0<=p<=1). - See also: 1/ gammad_cdf 2/ gammad + See also: 1/ gammad_cdf 2/ gammad Ex1:gammad_icdf(2,1,0.95) Ex2:gammad_icdf(2,1,0.5) - + ''' return GiacMethods['gammad_icdf'](self,*args) @@ -6342,10 +6342,10 @@ cdef class GiacMethods_base: Help for gammavariate: gammavariate(Real(a),Real(b)) Returns a random real according to the Gamma distribution with parameters a>0 and b>0. - See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector + See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector Ex1:gammavariate(1,2) Ex2:gammavariate(1.5,4) - + ''' return GiacMethods['gammavariate'](self,*args) @@ -6354,9 +6354,9 @@ cdef class GiacMethods_base: Help for gauss: gauss(Expr,VectVar) Splits a quadratic form as a sum/difference of squares. - See also: 1/ cholesky + See also: 1/ cholesky Ex1:gauss(x^2+2*a*x*y,[x,y]) - + ''' return GiacMethods['gauss'](self,*args) @@ -6365,12 +6365,12 @@ cdef class GiacMethods_base: Help for gauss15: gauss15(Opt) Option of the area command. - See also: 1/ area + See also: 1/ area Ex1: area(x^2,x=0..1,5,simpson) Ex2: area(x^2,x=0..1,5,rombergt) Ex3: area(x^2,x=0..1,5,rombergm) Ex4:gauss15(area(x^2,x=0..1,5,gauss15)) - + ''' return GiacMethods['gauss15'](self,*args) @@ -6379,12 +6379,12 @@ cdef class GiacMethods_base: Help for gauss_seidel_linsolve: gauss_seidel_linsolve([Real(omega)],Mtrx(A),Vect(b),Real(eps),[Int(maxiter)]) Resolution of a linear system A*X=b by the iterative Gauss-Seidel method (by defaut omega=1) or by relaxation method, with eps as error margin and a number of iterations less than maxiter. - See also: 1/ jacobi_linsolve 2/ linsolve + See also: 1/ jacobi_linsolve 2/ linsolve Ex1: a:=[[100,2],[2,100]];gauss_seidel_linsolve(a,[0,1],1e-12); - Ex2: a:=[[100,2],[2,100]];gauss_seidel_linsolve(table(a),[0,1],1e-12); + Ex2: a:=[[100,2],[2,100]];gauss_seidel_linsolve(table(a),[0,1],1e-12); Ex3: a:=[[100,2],[2,100]];gauss_seidel_linsolve(1.5,a,[0,1],1e-12); - Ex4: a:=[[100,2],[2,100]];gauss_seidel_linsolve(1.5,table(a),[0,1],1e-12); - + Ex4: a:=[[100,2],[2,100]];gauss_seidel_linsolve(1.5,table(a),[0,1],1e-12); + ''' return GiacMethods['gauss_seidel_linsolve'](self,*args) @@ -6393,9 +6393,9 @@ cdef class GiacMethods_base: Help for gaussian_window: gaussian_window(Lst,[Real(a)],[Interval(n1..n2)]) Applies the Gaussian windowing function with parameter 0= b (default a=0.2 and b=1/6.) - See also: 1/ gbasis 2/ gbasis_max_pairs 3/ gbasis_reinject + See also: 1/ gbasis 2/ gbasis_max_pairs 3/ gbasis_reinject Ex1:gbasis_reinject(0.1) Ex2:gbasis_reinject(0.1,0.05) - + ''' return GiacMethods['gbasis_reinject'](self,*args) @@ -6470,9 +6470,9 @@ cdef class GiacMethods_base: Help for gbasis_simult_primes: gbasis_simult_primes(Intg) Gbasis fine-tuning: maximal number of Groebner basis modulo a prime that are computed simultaneously to rebuild a Groebner basis over Q (default 16). Set it to a smaller value if short in memory. - See also: 1/ gbasis 2/ gbasis_max_pairs 3/ gbasis_reinject + See also: 1/ gbasis 2/ gbasis_max_pairs 3/ gbasis_reinject Ex1:gbasis_simult_primes(3) - + ''' return GiacMethods['gbasis_simult_primes'](self,*args) @@ -6481,13 +6481,13 @@ cdef class GiacMethods_base: Help for gcd: gcd((Intg(a) or Poly),(Intg(b) or Poly)) Returns the greatest common divisor of 2 polynomials of several variables or of 2 integers or of 2 rationals. - See also: 1/ lcm 2/ euler 2/ modgcd 3/ ezgcd 4/ psrgcd 5/ heugcd 6/ Gcd + See also: 1/ lcm 2/ euler 2/ modgcd 3/ ezgcd 4/ psrgcd 5/ heugcd 6/ Gcd Ex1:gcd(45,75) Ex2:gcd(15/7,50/9) Ex3:gcd(x^2-2*x+1,x^3-1) Ex4:gcd(t^2-2*t+1,t^2+t-2) Ex5:gcd((x^2-1)*(y^2-1)*z^2,x^3*y^3*z+(-(y^3))*z+x^3*z-z) - + ''' return GiacMethods['gcd'](self,*args) @@ -6496,12 +6496,12 @@ cdef class GiacMethods_base: Help for gcdex: gcdex((Poly or Lst),(Poly or Lst),[Var]) Extended greatest common divisor of 2 polynomials. - See also: 1/ gcd 2/ iegcd + See also: 1/ gcd 2/ iegcd Ex1:gcdex((x-1)^2,x^3-1) Ex2:gcdex((X-1)^2,X^3-1,X) Ex3:gcdex([1,-2,1],[1,0,0,-1]) Ex4:gcdex([1,-2,1],[1,-1,2]) - + ''' return GiacMethods['gcdex'](self,*args) @@ -6510,11 +6510,11 @@ cdef class GiacMethods_base: Help for genpoly: genpoly(Poly(P),Intg(b),Var) Returns the reconstruction of a n-variables polynomial Q(-b/2<=coef<=b/2) from an (n-1)-variable polynomial P and a base b (subst(Q,var=b)=P). - See also: 1/ + See also: 1/ Ex1:genpoly(15,4,x) Ex2:genpoly(7*y+5,6,x) Ex3:genpoly(7*y-5*z,10,x) - + ''' return GiacMethods['genpoly'](self,*args) @@ -6523,12 +6523,12 @@ cdef class GiacMethods_base: Help for geometric: geometric(Real(p),Intg(k)) Returns the value at k of the geometric law with parameter p (0cos(2*x)) Ex4:getType(1.414) - + ''' return GiacMethods['getType'](self,*args) @@ -6611,9 +6611,9 @@ cdef class GiacMethods_base: Help for get_edge_attribute: get_edge_attribute(Graph(G),Edge(e),Seq(tag1=value1,tag2=value2,..)) Returns the attributes tag1, tag2, ... assigned to edge e in G as a sequence of the corresponding values. - See also: 1/ discard_edge_attribute 2/ set_edge_attribute 3/ list_edge_attributes + See also: 1/ discard_edge_attribute 2/ set_edge_attribute 3/ list_edge_attributes Ex1:get_edge_attribute(cycle_graph(3),[1,2],"cost") - + ''' return GiacMethods['get_edge_attribute'](self,*args) @@ -6622,9 +6622,9 @@ cdef class GiacMethods_base: Help for get_edge_weight: get_edge_weight(Graph(G),Edge(e)) Returns the weight of the edge e in the weighted graph G. - See also: 1/ is_weighted 2/ make_weighted 3/ set_edge_weight 4/ weight_matrix + See also: 1/ is_weighted 2/ make_weighted 3/ set_edge_weight 4/ weight_matrix Ex1:get_edge_weight(graph(%{[[1,2],5],[[2,3],6]%}),[1,2]) - + ''' return GiacMethods['get_edge_weight'](self,*args) @@ -6633,9 +6633,9 @@ cdef class GiacMethods_base: Help for get_graph_attribute: get_graph_attribute(Graph(G),Seq(tag1=value1,tag2=value2,..)) Return the graph attributes tag1, tag2, ..., as a sequence of the corresponding values. - See also: 1/ discard_graph_attribute 2/ set_graph_attribute 3/ list_graph_attributes + See also: 1/ discard_graph_attribute 2/ set_graph_attribute 3/ list_graph_attributes Ex1:get_graph_attribute(cycle_graph(3),"name") - + ''' return GiacMethods['get_graph_attribute'](self,*args) @@ -6644,9 +6644,9 @@ cdef class GiacMethods_base: Help for get_vertex_attribute: get_vertex_attribute(Graph(G),Vrtx(v),Seq(tag1=value1,tag2=value2,..)) Returns the attributes tag1, tag2, ... assigned to vertex v in G as a sequence of the corresponding values. - See also: 1/ discard_vertex_attribute 2/ set_vertex_attribute 3/ list_vertex_attributes + See also: 1/ discard_vertex_attribute 2/ set_vertex_attribute 3/ list_vertex_attributes Ex1:get_vertex_attribute(cycle_graph(3),1,"supply") - + ''' return GiacMethods['get_vertex_attribute'](self,*args) @@ -6655,10 +6655,10 @@ cdef class GiacMethods_base: Help for girth: girth(Graph(G)) Returns the length of the shortest cycle in the undirected unweighted graph G. - See also: 1/ odd_girth + See also: 1/ odd_girth Ex1:girth(graph("petersen")) Ex2:girth(hypercube_graph(3)) - + ''' return GiacMethods['girth'](self,*args) @@ -6667,10 +6667,10 @@ cdef class GiacMethods_base: Help for gl_showaxes: gl_showaxes(Opt=Boolean) Option that shows or hides axes. - See also: 1/ switch_axes 2/ axes + See also: 1/ switch_axes 2/ axes Ex1: gl_showaxes=true;plot(sin(x)) - Ex2: gl_showaxes=false;plot(sin(x)) - + Ex2: gl_showaxes=false;plot(sin(x)) + ''' return GiacMethods['gl_showaxes'](self,*args) @@ -6679,9 +6679,9 @@ cdef class GiacMethods_base: Help for grad: grad(Expr(Xpr),LstVar) Returns the gradient of the expression Xpr. - See also: 1/ hessian + See also: 1/ hessian Ex1:grad(2*x^2*y-x*z^3,[x,y,z]) - + ''' return GiacMethods['grad'](self,*args) @@ -6690,10 +6690,10 @@ cdef class GiacMethods_base: Help for gramschmidt: gramschmidt(Basis(B),ScalarProd(Sp)) Returns an orthonormal basis of E with basis B for the scalar product Sp. - See also: 1/ + See also: 1/ Ex1:gramschmidt(-2) Ex2:gramschmidt([1,1+x],(p,q)->integrate(p*q,x,-1,1)) - + ''' return GiacMethods['gramschmidt'](self,*args) @@ -6702,7 +6702,7 @@ cdef class GiacMethods_base: Help for graph: graph([Lst(V)],[Set(E)],[Mtrx(A)],[options]) Create an (un)directed (un)weighted graph from vertices V, edges E, and/or adjacency or weight matrix A. All parameters are optional. - See also: 1/ digraph 2/ trail + See also: 1/ digraph 2/ trail Ex1:graph(5) Ex2:graph([a,b,c]) Ex3:graph([1,2,3],%{[1,2],[2,3],[3,1]%}) @@ -6710,7 +6710,7 @@ cdef class GiacMethods_base: Ex5:graph([a,b,c],[[0,2,0],[2,0,3],[0,3,0]]) Ex6:graph("petersen") Ex7:graph([[0,1,1,0],[1,0,0,1],[1,0,0,0],[0,1,0,0]]) - + ''' return GiacMethods['graph'](self,*args) @@ -6719,9 +6719,9 @@ cdef class GiacMethods_base: Help for graph_automorphisms: graph_automorphisms(Graph(G)) Returns the sequence of generators of Aut(G), the automorphism group of G. Each element is a permutation in the form of list of disjoint cycles. - See also: 1/ cycles2permu 2/ isomorphic_copy 3/ permute_vertices + See also: 1/ cycles2permu 2/ isomorphic_copy 3/ permute_vertices Ex1:graph_automorphisms(graph("petersen")) - + ''' return GiacMethods['graph_automorphisms'](self,*args) @@ -6730,10 +6730,10 @@ cdef class GiacMethods_base: Help for graph_charpoly: graph_charpoly(Graph(G),[Var(x)]) Returns the value p(x) of the characteristic polynomial p of G. If x is omitted, a list of coefficients of p is returned. - See also: 1/ graph_spectrum 2/ charpoly + See also: 1/ graph_spectrum 2/ charpoly Ex1:graph_charpoly(graph(%{[1,2],[2,3]%})) Ex2:graph_charpoly(graph("shrikhande")) - + ''' return GiacMethods['graph_charpoly'](self,*args) @@ -6742,9 +6742,9 @@ cdef class GiacMethods_base: Help for graph_complement: graph_complement(Graph(G)) Return the graph with the same vertex set as G, but whose edge (arc) set consists of the edges (arcs) not present in G. - See also: 1/ edges + See also: 1/ edges Ex1:graph_complement(cycle_graph(5)) - + ''' return GiacMethods['graph_complement'](self,*args) @@ -6753,9 +6753,9 @@ cdef class GiacMethods_base: Help for graph_diameter: graph_diameter(Graph(G)) Returns the maximum distance between a pair of vertices in G or +infinity if G is disconnected. - See also: 1/ allpairs_distance 2/ dijkstra 3/ shortest_path 4/ vertex_distance + See also: 1/ allpairs_distance 2/ dijkstra 3/ shortest_path 4/ vertex_distance Ex1:graph_diameter(graph("petersen")) - + ''' return GiacMethods['graph_diameter'](self,*args) @@ -6764,9 +6764,9 @@ cdef class GiacMethods_base: Help for graph_equal: graph_equal(Graph(G1),Graph(G2)) Returns true iff the input graphs G1 and G2 are equal, that is when the sets of vertices and edges of G1 and G2, as well as the orderings of vertices in both graphs, mutually coincide. If the graphs are weighted (they must both be (un)weighted and (un)directed), weights given to the same edge in two graphs must be equal. - See also: 1/ edges 2/ graph_vertices + See also: 1/ edges 2/ graph_vertices Ex1:graph_equal(graph([1,2,3],%{[1,2],[2,3],[3,1]%}),graph(trail(1,2,3,1))) - + ''' return GiacMethods['graph_equal'](self,*args) @@ -6775,9 +6775,9 @@ cdef class GiacMethods_base: Help for graph_join: graph_join(Graph(G),Graph(H)) Returns the graph obtained by connecting every vertex from G with every vertex from H. The vertex labels in the resulting graph are strings of form "1:u" and "2:v" where u and v are vertices from G and H, respectively. - See also: 1/ disjoint_union 2/ graph_union + See also: 1/ disjoint_union 2/ graph_union Ex1:graph_join(edges(graph_join(cycle_graph(3),graph(2)))) - + ''' return GiacMethods['graph_join'](self,*args) @@ -6786,9 +6786,9 @@ cdef class GiacMethods_base: Help for graph_power: graph_power(Graph(G),Intg(k)) Returns the k-th power of G, where two vertices are connected iff there exists a path of length at most k in the original graph. - See also: 1/ adjacency matrix 2/ graph_diameter 3/ shortest_path + See also: 1/ adjacency matrix 2/ graph_diameter 3/ shortest_path Ex1:graph_power(edges(graph_power(path_graph(5),3))) - + ''' return GiacMethods['graph_power'](self,*args) @@ -6797,10 +6797,10 @@ cdef class GiacMethods_base: Help for graph_rank: graph_rank(Graph(G),[Lst(E)]) Returns the graph rank of G. If optional set E of edges is given, the rank of the spanning subgraph of G with edge set E is returned. - See also: 1/ connected_components 2/ number_of_vertices + See also: 1/ connected_components 2/ number_of_vertices Ex1:graph_rank(graph(%{[1,2],[3,4],[4,5]%})) Ex2:graph_rank(graph(%{[1,2],[3,4],[4,5]%}),[[1,2],[3,4]) - + ''' return GiacMethods['graph_rank'](self,*args) @@ -6809,9 +6809,9 @@ cdef class GiacMethods_base: Help for graph_spectrum: graph_spectrum(Graph(G)) Returns the graph spectrum of G as a list of lists with two elements, each containing an eigenvalue and its multiplicity. - See also: 1/ graph_charpoly 2/ seidel_spectrum 3/ is_integer_graph + See also: 1/ graph_charpoly 2/ seidel_spectrum 3/ is_integer_graph Ex1:graph_spectrum(cycle_graph(5)) - + ''' return GiacMethods['graph_spectrum'](self,*args) @@ -6820,9 +6820,9 @@ cdef class GiacMethods_base: Help for graph_union: graph_union(Seq(G1,G2,...)) Returns the union of the graphs G1, G2, ... The set of vertices of the resulting graph is the union of the sets of vertices of the input graphs and the set of edges of the resulting graph is the union of sets of edges of the input graphs. If the input graphs are weighted, the weight of any common edge is the sum of the weights of that edge in G1, G2, ... - See also: 1/ disjoint_union 2/ graph_join + See also: 1/ disjoint_union 2/ graph_join Ex1:graph_union(edges(graph_union(cycle_graph(4),path_graph(5)))) - + ''' return GiacMethods['graph_union'](self,*args) @@ -6831,9 +6831,9 @@ cdef class GiacMethods_base: Help for graph_vertices: graph_vertices(Graph(G)) Return the list of vertices in G. - See also: 1/ add_vertex 2/ graph 3/ neighbors 4/ permute_vertices 5/ relabel_vertices + See also: 1/ add_vertex 2/ graph 3/ neighbors 4/ permute_vertices 5/ relabel_vertices Ex1:graph_vertices(graph(%{[a,c],[b,c],[a,b]%})) - + ''' return GiacMethods['graph_vertices'](self,*args) @@ -6842,11 +6842,11 @@ cdef class GiacMethods_base: Help for greduce: greduce(Poly,LstPoly,LstVar,[order]) Returns the remainder of the division of a polynomial by a Groebner basis. - See also: 1/ gbasis + See also: 1/ gbasis Ex1:greduce(x*y-1,[x^2-y^2,2*x*y-y^2,y^3],[x,y]) Ex2:greduce(x1^2*x3^2,[x3^3-1,-x2^2-x2*x3-x3^2,x1+x2+x3],[x1,x2,x3],tdeg) Ex3:greduce(x1^2*x3^2-x2,[x3^3-1,-x2^2-x2*x3-x3^2,x1+x2+x3],[x1,x2,x3]) - + ''' return GiacMethods['greduce'](self,*args) @@ -6855,9 +6855,9 @@ cdef class GiacMethods_base: Help for greedy_color: greedy_color(Graph(G),[Permu(p)]) Returns the list of vertex colors (positive integers) obtained by coloring vertices one at a time [in the order given by permutation p], assigning to it the smallest available color. - See also: 1/ is_vertex_colorable 2/ chromatic_number + See also: 1/ is_vertex_colorable 2/ chromatic_number Ex1:greedy_color(graph("petersen")) - + ''' return GiacMethods['greedy_color'](self,*args) @@ -6866,9 +6866,9 @@ cdef class GiacMethods_base: Help for grid_graph: grid_graph(Intg(m),Intg(n),[triangle]) Returns a [triangular] grid graph on m*n vertices, where m,n>=2. - See also: 1/ torus_grid_graph + See also: 1/ torus_grid_graph Ex1:grid_graph(5,8) - + ''' return GiacMethods['grid_graph'](self,*args) @@ -6877,9 +6877,9 @@ cdef class GiacMethods_base: Help for groupermu: groupermu(Permut(a),Permut(b)) Returns the group of permutations generated by a and b. - See also: 1/ + See also: 1/ Ex1:groupermu([1,2,0],[3,1,2,0]) - + ''' return GiacMethods['groupermu'](self,*args) @@ -6888,10 +6888,10 @@ cdef class GiacMethods_base: Help for hadamard: hadamard(Mtrx,Mtrx) Hadamard bound of a matrix or element by element multiplication of 2 matrices. - See also: 1/ .* 2/ * + See also: 1/ .* 2/ * Ex1:hadamard([[1,2],[3,4]]) Ex2:hadamard([[1,2],[3,4]],[[3,4],[5,6]]) - + ''' return GiacMethods['hadamard'](self,*args) @@ -6900,10 +6900,10 @@ cdef class GiacMethods_base: Help for half_cone: half_cone(Pnt(A),Vect(v),Real(t),[Real(h)]) Draws a half-cone with vertex A, direction v and with half_angle=t [and with altitude h]. - See also: 1/ cone 2/ cylinder + See also: 1/ cone 2/ cylinder Ex1:half_cone([0,0,0],[0,0,1],pi/6) Ex2:half_cone([0,0,0],[0,1,1],pi/6,-4) - + ''' return GiacMethods['half_cone'](self,*args) @@ -6912,10 +6912,10 @@ cdef class GiacMethods_base: Help for half_line: half_line((Pnt or Cplx),(Pnt or Cplx)) half_line(A,B) draws the half-line AB with A as origin. - See also: 1/ line + See also: 1/ line Ex1:half_line(i,1+i) Ex2:half_line(point(i),point(1+i)) - + ''' return GiacMethods['half_line'](self,*args) @@ -6927,7 +6927,7 @@ cdef class GiacMethods_base: Ex1:halftan(sin(x)) Ex2:halftan(cos(x)) Ex3:halftan(tan(x)) - + ''' return GiacMethods['halftan'](self,*args) @@ -6936,9 +6936,9 @@ cdef class GiacMethods_base: Help for halftan_hyp2exp: halftan_hyp2exp(ExprTrig) Transforms the trigonometric functions in tan(x/2) and hyperbolic functions to exp. - See also: 1/ hyp2exp 2/ halftan + See also: 1/ hyp2exp 2/ halftan Ex1:halftan_hyp2exp(sin(x)+sinh(x)) - + ''' return GiacMethods['halftan_hyp2exp'](self,*args) @@ -6947,9 +6947,9 @@ cdef class GiacMethods_base: Help for halt: halt(NULL) Puts a program in step-by-step debug mode. - See also: 1/ + See also: 1/ Ex1:halt() - + ''' return GiacMethods['halt'](self,*args) @@ -6959,7 +6959,7 @@ cdef class GiacMethods_base: hamdist(Intg,Intg) Bitwise Hamming distance. Ex1:hamdist(0x12,0x38) - + ''' return GiacMethods['hamdist'](self,*args) @@ -6968,9 +6968,9 @@ cdef class GiacMethods_base: Help for hamming_window: hamming_window(Lst,[Interval(n1..n2)]) Applies the Hamming windowing function to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ bartlett_hann_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window + See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ bartlett_hann_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window Ex1: scatterplot(hamming_window(randvector(1000,0..1))) - + ''' return GiacMethods['hamming_window'](self,*args) @@ -6979,9 +6979,9 @@ cdef class GiacMethods_base: Help for hann_poisson_window: hann_poisson_window(Lst,[Interval(n1..n2)]) Applies the Hann-Poisson windowing function with parameter a (by default a=1) to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ bartlett_hann_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window + See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ bartlett_hann_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window Ex1: scatterplot(hann_poisson_window(randvector(1000,0..1),2)) - + ''' return GiacMethods['hann_poisson_window'](self,*args) @@ -6990,9 +6990,9 @@ cdef class GiacMethods_base: Help for hann_window: hann_window(Lst,[Interval(n1..n2)]) Applies the Hann windowing function to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ bartlett_hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window + See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ bartlett_hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window Ex1: scatterplot(hann_window(randvector(1000,0..1))) - + ''' return GiacMethods['hann_window'](self,*args) @@ -7001,12 +7001,12 @@ cdef class GiacMethods_base: Help for harmonic_conjugate: harmonic_conjugate(Line or Pnt(A),Line or Pnt(B),Line or Pnt(C)) Returns the harmonic conjugate C with respect to A and B of 3 points or of 3 parallel or concurrent lines or the line of conjugates of a point with respect to 2 lines. - See also: 1/ is_harmonic 2/ harmonic_division + See also: 1/ is_harmonic 2/ harmonic_division Ex1:harmonic_conjugate(0,2,3/2) Ex2:harmonic_conjugate(0,1+i,2+2*i) Ex3:harmonic_conjugate(line(0,1+i),line(0,3+i),line(0,i)) Ex4:harmonic_conjugate(line(0,1+i),line(0,3+i),point(3/2+i)) - + ''' return GiacMethods['harmonic_conjugate'](self,*args) @@ -7015,12 +7015,12 @@ cdef class GiacMethods_base: Help for harmonic_division: harmonic_division(Pnt or Line,Pnt or Line,Pnt or Line,Var) Returns 4 points (resp lines) and affects the last argument, such that the 4 points (resp lines) are in a harmonic division and assigns the fourth point to the variable name. - See also: 1/ harmonic_conjugate 2/ is_harmonic + See also: 1/ harmonic_conjugate 2/ is_harmonic Ex1:harmonic_division(0,2,3/2,D) Ex2:harmonic_division(0,1+i,2+2*i,D) Ex3:harmonic_division(line(i,0),line(i,1+i),line(i,3+2*i),D) Ex4:harmonic_division(line(0,1+i),line(0,3+i),line(0,i),D) - + ''' return GiacMethods['harmonic_division'](self,*args) @@ -7029,10 +7029,10 @@ cdef class GiacMethods_base: Help for has: has(Expr,Var) Checks if a variable is in an expression. - See also: 1/ lname 2/ lvar + See also: 1/ lname 2/ lvar Ex1:has(x+y,x) Ex2:has(x+y,n) - + ''' return GiacMethods['has'](self,*args) @@ -7041,10 +7041,10 @@ cdef class GiacMethods_base: Help for has_arc: has_arc(Graph(G),Edge(e)) Returns true iff the arc e=[i,j] is contained in digraph G or, if e={i,j} is a set, iff G has both edges [i,j] and [j,i]. - See also: 1/ edges 2/ has_edge + See also: 1/ edges 2/ has_edge Ex1:has_arc(digraph(trail(1,2,3,4,1)),[4,2]) Ex2:has_arc(digraph(trail(1,2,3,4,1)),%{4,2%}) - + ''' return GiacMethods['has_arc'](self,*args) @@ -7053,9 +7053,9 @@ cdef class GiacMethods_base: Help for has_edge: has_edge(Graph(G),Edge(e)) Returns true iff the edge e=[i,j] is contained in undirected graph G. - See also: 1/ edges 2/ has_arc + See also: 1/ edges 2/ has_arc Ex1:has_edge(graph(trail(1,2,3,4,1)),[2,4]) - + ''' return GiacMethods['has_edge'](self,*args) @@ -7064,7 +7064,7 @@ cdef class GiacMethods_base: Help for hasard: hasard(Intg(n) or Interval(p..n) or NULL,[Intg(b1) or Lst(L)],[Intg(b2)]) (hasard n)=a random integer (resp (hasard p,n)=a real or hasard(p..n)=a real function) with uniform distribution in 0..n-1 (resp in [p;n])(hasard= (hasard 0,1)=a random real in [0,1[) or hasard(n,b1,b2)=n integers between b1 and b2 or hasard(n,L)=n elements of L. If hasard has only one argument, () are not necessary (compatibility with turtle language). - See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ srand + See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ srand Ex1: hasard 4 Ex2: hasard(4) Ex3:hasard(0,2) @@ -7072,7 +7072,7 @@ cdef class GiacMethods_base: Ex5: f:=hasard 0..2 Ex6:hasard(3,1,10) Ex7:hasard(3,["r","r","r","b","n"]) - + ''' return GiacMethods['hasard'](self,*args) @@ -7081,11 +7081,11 @@ cdef class GiacMethods_base: Help for head: head(Vect or Seq or Str) Shows the first element of a vector or a sequence or a string. - See also: 1/ back 2/ tail 3/ mid 4/ left 5/ right + See also: 1/ back 2/ tail 3/ mid 4/ left 5/ right Ex1:head(1,2,3) Ex2:head([1,2,3]) Ex3:head("bonjour") - + ''' return GiacMethods['head'](self,*args) @@ -7094,11 +7094,11 @@ cdef class GiacMethods_base: Help for heading: heading(NULL or Real) Returns the turtle cap in degrees or turns the turtle in the direction given by the argument. - See also: 1/ position 2/ initialise + See also: 1/ position 2/ initialise Ex1: cap Ex2:heading() Ex3:heading(cap 90) - + ''' return GiacMethods['heading'](self,*args) @@ -7107,8 +7107,8 @@ cdef class GiacMethods_base: Help for heapify: heapify(List) Partial ordering of a list as a heap. - See also: 1/ heappush 2/ heappop - + See also: 1/ heappush 2/ heappop + ''' return GiacMethods['heapify'](self,*args) @@ -7117,8 +7117,8 @@ cdef class GiacMethods_base: Help for heappop: heappop(List) Removes and returns the root node of a heap. - See also: 1/ heapify 2/ heappush - + See also: 1/ heapify 2/ heappush + ''' return GiacMethods['heappop'](self,*args) @@ -7127,8 +7127,8 @@ cdef class GiacMethods_base: Help for heappush: heappush(List,Object) Adds an object in a heap. - See also: 1/ heapify 2/ heappop - + See also: 1/ heapify 2/ heappop + ''' return GiacMethods['heappush'](self,*args) @@ -7137,10 +7137,10 @@ cdef class GiacMethods_base: Help for hermite: hermite(Intg(n)||Matr(A)) Returns the Hermite polynomial of degree n or the Hermite normal form for a matrix with polynomial coefficients (I,U such that I*A=U). - See also: 1/ legendre 2/ laguerre 3/ smith 4/ ihermite 5/ ismith + See also: 1/ legendre 2/ laguerre 3/ smith 4/ ihermite 5/ ismith Ex1:hermite(3) Ex2: n:=5; a:=ranm(n,n) % 17; l,u:=hermite(x-a);normal(l*(x-a)-u); - + ''' return GiacMethods['hermite'](self,*args) @@ -7149,13 +7149,13 @@ cdef class GiacMethods_base: Help for hessenberg: hessenberg(Mtrx(A),[Intg(n)]) Matrix reduction to Hessenberg form. Returns [P,B] such that B=inv(P)*A*P, by default n=0 the result is exact else the result is numeric. For n=-1 B is triangular, n=-2 P is orthogonal and if n is prime the result is mod n. - See also: 1/ SCHUR + See also: 1/ SCHUR Ex1:hessenberg([[1,2,3],[4,5,6],[7,8,1]]) Ex2:hessenberg([[1,2,3,4],[4,5,6,7],[7,8,9,0],[0,1,2,3]]) Ex3:hessenberg([[1,2,3],[4,5,6],[7,8,1]],-1) Ex4:hessenberg([[1,2,3],[4,5,6],[7,8,1]],-2) Ex5:hessenberg([[1,2,3],[4,5,6],[7,8,1]],3) - + ''' return GiacMethods['hessenberg'](self,*args) @@ -7164,9 +7164,9 @@ cdef class GiacMethods_base: Help for hessian: hessian(Expr(Xpr),LstVar) Returns the hessian of the expression Xpr. - See also: 1/ grad + See also: 1/ grad Ex1:hessian(2*x^2*y-x*z,[x,y,z]) - + ''' return GiacMethods['hessian'](self,*args) @@ -7175,9 +7175,9 @@ cdef class GiacMethods_base: Help for heugcd: heugcd(Poly,Poly) GCD of 2 polynomials, with the algorithm called heuristic pgcd. - See also: 1/ gcd 2/ modgcd 3/ ezgcd 4/ psrgcd + See also: 1/ gcd 2/ modgcd 3/ ezgcd 4/ psrgcd Ex1:heugcd(x^4-1,(x-1)^2) - + ''' return GiacMethods['heugcd'](self,*args) @@ -7186,12 +7186,12 @@ cdef class GiacMethods_base: Help for hexagon: hexagon(Pnt(A)||Cplx,Pnt(B)||Cplx,[Pnt(P)],[Var(C)],[Var(D)],[Var(E)],[Var(F)]) Returns and draws the hexagon of side AB (ABCDEF is direct) (in the plane ABP). - See also: 1/ isopolygon 2/ polygon + See also: 1/ isopolygon 2/ polygon Ex1:hexagon(i,1+i) Ex2:hexagon(i,1+i,C,D,E,F) Ex3:hexagon(point(0,0,0),point(3,3,3),point(0,0,3)) Ex4:hexagon(point(0,0,0),point(3,3,3),point(0,0,3),C,D,E,F) - + ''' return GiacMethods['hexagon'](self,*args) @@ -7200,9 +7200,9 @@ cdef class GiacMethods_base: Help for highlight_edges: highlight_edges(Graph(G),Edge(e)||Lst(E),[Color(c)||Lst(C)]) Changes color of edge e resp. colors of edges in E of the input graph V to c resp C (by default red) and returns the modified copy of G. - See also: 1/ highlight_vertex 2/ highlight_subgraph 3/ highlight_trail + See also: 1/ highlight_vertex 2/ highlight_subgraph 3/ highlight_trail Ex1: draw_graph(highlight_edges(cycle_graph(3),[1,2])) - + ''' return GiacMethods['highlight_edges'](self,*args) @@ -7211,9 +7211,9 @@ cdef class GiacMethods_base: Help for highlight_subgraph: highlight_subgraph(Graph(G),Graph(S)||Lst(S1,S2,..),Seq(c1,c2)) Changes colors of edges and vertices from the sugbraph S or list of subgraphs S1, S2, ... of G to c1 and c2, respectively (red and green by default), and returns the modified copy of G. - See also: 1/ highlight_edges 2/ highlight_vertex 3/ highlight_trail + See also: 1/ highlight_edges 2/ highlight_vertex 3/ highlight_trail Ex1: draw_graph(highlight_subgraph(cycle_graph(5),path_graph(3))) - + ''' return GiacMethods['highlight_subgraph'](self,*args) @@ -7222,9 +7222,9 @@ cdef class GiacMethods_base: Help for highlight_trail: highlight_trail(Graph(G),Trail(t)||Lst(T),[Color(c)||Lst(C)]) Changes colors of edges in G which lie along the trail t resp. trails in T to c resp. C (by default red) and returns the modified copy of G. - See also: 1/ highlight_edges 2/ highlight_subgraph 3/ highlight_vertex + See also: 1/ highlight_edges 2/ highlight_subgraph 3/ highlight_vertex Ex1: draw_graph(highlight_trail(cycle_graph(5),trail(1,2,3),green) - + ''' return GiacMethods['highlight_trail'](self,*args) @@ -7233,9 +7233,9 @@ cdef class GiacMethods_base: Help for highlight_vertex: highlight_vertex(Graph(G),Vrtx(v)||Lst(V),[Color(c)||Lst(C)]) Changes the color of vertex v resp. colors of vertices from V in G to c resp. C (green by default) and returns the modified copy of G. - See also: 1/ highlight_edges 2/ highlight_subgraph 3/ highlight_trail + See also: 1/ highlight_edges 2/ highlight_subgraph 3/ highlight_trail Ex1: draw_graph(highlight_vertex(cycle_graph(3),1)) - + ''' return GiacMethods['highlight_vertex'](self,*args) @@ -7244,9 +7244,9 @@ cdef class GiacMethods_base: Help for highpass: highpass(Lst(s),Real(c),[Intg(samplerate)]) Returns the result of applying a simple first-order highpass RC filter with cutoff frequency c (the default samplerate is 44100) to the given signal s. - See also: 1/ lowpass 2/ moving_average + See also: 1/ lowpass 2/ moving_average Ex1: f:=unapply(periodic(sign(x),x,-1/880,1/880),x):;s:=createwav(apply(f,soundsec(1))):;playsnd(highpass(s,5000)) - + ''' return GiacMethods['highpass'](self,*args) @@ -7255,9 +7255,9 @@ cdef class GiacMethods_base: Help for hilbert: hilbert(Intg(n)) Returns the order n Hilbert matrix : Hjk=1/(j+k+1) j,k=1..n. - See also: 1/ + See also: 1/ Ex1:hilbert(4) - + ''' return GiacMethods['hilbert'](self,*args) @@ -7266,7 +7266,7 @@ cdef class GiacMethods_base: Help for histogram: histogram(Lst(data),[Lst(eff) || Intg(nc) || Real(classmin)],[Real(classsize)]) Draws the histogram of data, optional arguments are eff (number of data for each data element) or nc the number of classes or the classes minimum and size. - See also: 1/ cumulated_frequencies 2/ classes 3/ bar_plot 4/ frequencies + See also: 1/ cumulated_frequencies 2/ classes 3/ bar_plot 4/ frequencies Ex1:histogram([1,2,1,1,2,1,2,4,3,3]) Ex2:histogram([1,2,1,1,2,1,2,4,3,3],0.5,1) Ex3:histogram(seq(rand(1000),k,0,100),0,100) @@ -7275,7 +7275,7 @@ cdef class GiacMethods_base: Ex6:histogram([[1.5..1.65,50],[1.65..1.7,20],[1.7..1.8,30]]) Ex7:histogram(seq(rand(1000),k,0,100),0,100) Ex8:histogram(seq(rand(1000),k,0,100),10) - + ''' return GiacMethods['histogram'](self,*args) @@ -7284,11 +7284,11 @@ cdef class GiacMethods_base: Help for hold: hold(Expr) Returns its argument unevaluated (and also a:=quote(a) purges a). - See also: 1/ + See also: 1/ Ex1:hold(1+2) Ex2:hold(1/x+1/(x-1)) Ex3:hold((x+1)*(x-1)) - + ''' return GiacMethods['hold'](self,*args) @@ -7299,7 +7299,7 @@ cdef class GiacMethods_base: Make P homogeneous by adding a variable (by default t) Ex1:homogeneize(x^2-1) Ex2:homogeneize(x^2-y,z) - + ''' return GiacMethods['homogeneize'](self,*args) @@ -7308,12 +7308,12 @@ cdef class GiacMethods_base: Help for homothety: homothety(Pnt(C),Real(k),Pnt(A)) homothety(C,k,A)=point A1 such as vect(C,A1)=k*vect(C,A) i.e in 2d it is the similarity with center C, coeff abs(k) and angle arg(k). - See also: 1/ similarity 2/ inversion + See also: 1/ similarity 2/ inversion Ex1:homothety(1+i,1/3,i) Ex2:homothety(point(1,1,1),1/3,point(0,1,0)) Ex3: h:=homothety(1+i,1/3);h(i) Ex4: h:=homothety(point(1,1,1),1/3);h(point(0,1,0)) - + ''' return GiacMethods['homothety'](self,*args) @@ -7322,12 +7322,12 @@ cdef class GiacMethods_base: Help for horner: horner(Poly(P),Real(a)) Returns the value of P(a) calculated with Horner's method. With horner(list_alpha_i,list_x_i,x), evals an interpolation polynomial from the divided differences of x. - See also: 1/ convert 2/ base 3/ revlist + See also: 1/ convert 2/ base 3/ revlist Ex1:horner(x^2+1,2) Ex2:horner([1,0,1],2) Ex3:horner(x^2+y*x+y^3-1,2,y) Ex4: X:=[0.0,1.0,2.0]; A:=lagrange(X,exp,lagrange); horner(A,X,1.5); - + ''' return GiacMethods['horner'](self,*args) @@ -7336,14 +7336,14 @@ cdef class GiacMethods_base: Help for hybrid_solver: hybrid_solver(Opt) Argument for fsolve giving the method for solving a system of numerical equations. - See also: 1/ fsolve + See also: 1/ fsolve Ex1: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],dnewton_solver) Ex2: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybrid_solver) Ex3: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybrids_solver) Ex4: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybridj_solver) Ex5: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybridsj_solver) Ex6: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],newtonj_solver) - + ''' return GiacMethods['hybrid_solver'](self,*args) @@ -7352,14 +7352,14 @@ cdef class GiacMethods_base: Help for hybridj_solver: hybridj_solver(Opt) Argument for fsolve giving the method for solving a system of numerical equations. - See also: 1/ fsolve + See also: 1/ fsolve Ex1: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],dnewton_solver) Ex2: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybrid_solver) Ex3: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybrids_solver) Ex4: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybridj_solver) Ex5: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybridsj_solver) Ex6: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],newtonj_solver) - + ''' return GiacMethods['hybridj_solver'](self,*args) @@ -7368,14 +7368,14 @@ cdef class GiacMethods_base: Help for hybrids_solver: hybrids_solver(Opt) Argument for fsolve giving the method for solving a system of numerical equations. - See also: 1/ fsolve + See also: 1/ fsolve Ex1: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],dnewton_solver) Ex2: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybrid_solver) Ex3: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybrids_solver) Ex4: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybridj_solver) Ex5: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybridsj_solver) Ex6: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],newtonj_solver) - + ''' return GiacMethods['hybrids_solver'](self,*args) @@ -7384,14 +7384,14 @@ cdef class GiacMethods_base: Help for hybridsj_solver: hybridsj_solver(Opt) Argument for fsolve giving the method for solving a system of numerical equations. - See also: 1/ fsolve + See also: 1/ fsolve Ex1: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],dnewton_solver) Ex2: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybrid_solver) Ex3: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybrids_solver) Ex4: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybridj_solver) Ex5: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybridsj_solver) Ex6: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],newtonj_solver) - + ''' return GiacMethods['hybridsj_solver'](self,*args) @@ -7400,9 +7400,9 @@ cdef class GiacMethods_base: Help for hyp2exp: hyp2exp(ExprHyperb) Transforms the hyperbolic functions to the exponential function. - See also: 1/ halftan_hyp2exp + See also: 1/ halftan_hyp2exp Ex1:hyp2exp(cosh(x)) - + ''' return GiacMethods['hyp2exp'](self,*args) @@ -7411,12 +7411,12 @@ cdef class GiacMethods_base: Help for hyperbola: hyperbola(Focus(F1),Focus(F2),(Pnt(M) or Real(a))) hyperbola(F1,F2,M)=hyperbola with foci F1,F2 through M or (|MF1-MF2|=2*a geo2d) and hyperbola(p(x,y)) draws the conic if deg(p)=2. - See also: 1/ ellipse 2/ parabola + See also: 1/ ellipse 2/ parabola Ex1:hyperbola(-1,1,point(1+i)) Ex2:hyperbola(-1,1,sqrt(5)-1) Ex3:hyperbola(point(-1,0,0),point(1,0,0),point(1,1,1)) Ex4:hyperbola(x^2-y^2+y+2) - + ''' return GiacMethods['hyperbola'](self,*args) @@ -7425,9 +7425,9 @@ cdef class GiacMethods_base: Help for hypercube_graph: hypercube_graph(Intg(n)) Constructs and returns the hypercube graph in dimension n (with 2^n vertices). - See also: 1/ graph + See also: 1/ graph Ex1:hypercube_graph(3) - + ''' return GiacMethods['hypercube_graph'](self,*args) @@ -7436,11 +7436,11 @@ cdef class GiacMethods_base: Help for iPart: iPart(Real||LstReal) Returns the argument without its fractional part (type=DOM_FLOAT). - See also: 1/ fPart 2/ floor 3/ trunc + See also: 1/ fPart 2/ floor 3/ trunc Ex1:iPart(4.3) Ex2:iPart(sqrt(2)) Ex3:iPart(4.3,sqrt(2)) - + ''' return GiacMethods['iPart'](self,*args) @@ -7449,11 +7449,11 @@ cdef class GiacMethods_base: Help for iabcuv: iabcuv(Intg(a),Intg(b),Intg(c)) Returns [u,v] such that au+bv=c for 3 integers a,b,c. - See also: 1/ iegcd 2/ abcuv + See also: 1/ iegcd 2/ abcuv Ex1:iabcuv(21,28,7) Ex2:iabcuv(21,28,14) Ex3:iabcuv(21,28,1) - + ''' return GiacMethods['iabcuv'](self,*args) @@ -7462,9 +7462,9 @@ cdef class GiacMethods_base: Help for ibasis: ibasis(Lst(Vect,..,Vect),Lst(Vect,..,Vect)) Basis of the intersection of two vector spaces. - See also: 1/ basis + See also: 1/ basis Ex1:ibasis([[1,0,0],[0,1,0]],[[1,1,1],[0,0,1]]) - + ''' return GiacMethods['ibasis'](self,*args) @@ -7473,13 +7473,13 @@ cdef class GiacMethods_base: Help for ibpdv: ibpdv(Expr(f(x)),Expr(v(x)),[Var(x)],[Real(a)],[Real(b)]) Integration by parts of f(x)=u(x)*v'(x) with f(x) as 1st argument and v(x) (or 0) as 2nd argument. You can specify a variable of integration and also calculate the integral (bounds a and b). - See also: 1/ ibpu 2/ int + See also: 1/ ibpu 2/ int Ex1:ibpdv(ln(x),x) Ex2:ibpdv(ln(x),x,x,1,3) Ex3:ibpdv(x*ln(x),x^2/2) Ex4:ibpdv([x*ln(x),-1],0) Ex5:ibpdv(ibpdv(ln(x),x,x,2,3),0,x,2,3) - + ''' return GiacMethods['ibpdv'](self,*args) @@ -7488,13 +7488,13 @@ cdef class GiacMethods_base: Help for ibpu: ibpu(Expr(f(x)),Expr(u(x)),[Var(x)],[Real(a)],[Real(b)]) Integration by parts of f(x)=u(x)*v'(x) with f(x) as 1st argument and u(x) (or 0) as 2nd argument. You can specify a variable of integration and also calculate the integral (bounds a and b). - See also: 1/ ibpdv 2/ int + See also: 1/ ibpdv 2/ int Ex1:ibpu(ln(x),ln(x)) Ex2:ibpu(ln(x),ln(x),x,1,3) Ex3:ibpu(x*ln(x),ln(x)) Ex4:ibpu([x*ln(x),-1],0) Ex5:ibpu(ibpu(ln(x),ln(x),x,2,3),0,x,2,3) - + ''' return GiacMethods['ibpu'](self,*args) @@ -7503,10 +7503,10 @@ cdef class GiacMethods_base: Help for icdf: icdf(Func,FuncParams) Inverse cumulative distribution function. - See also: 1/ cdf 2/ binomial_icdf 3/ normald_icdf + See also: 1/ cdf 2/ binomial_icdf 3/ normald_icdf Ex1:icdf(binomial,10,0.5,0.6) Ex2:icdf(normald,0.0,1.0,0.975) - + ''' return GiacMethods['icdf'](self,*args) @@ -7515,12 +7515,12 @@ cdef class GiacMethods_base: Help for ichinrem: ichinrem(LstIntg(a,p),LstIntg(b,q)) Chinese remainders for integers. - See also: 1/ gcd 2/ fracmod 3/ chinrem 4/ chrem + See also: 1/ gcd 2/ fracmod 3/ chinrem 4/ chrem Ex1:ichinrem([2,7],[3,5]) Ex2:ichinrem([2%7,3%5]) Ex3:ichinrem([2%7,3%5,1%9]) Ex4:ichinrem([(x+1)%2,(x+2)%3,(3*x-1)%5]) - + ''' return GiacMethods['ichinrem'](self,*args) @@ -7529,12 +7529,12 @@ cdef class GiacMethods_base: Help for ichrem: ichrem(LstIntg(a,p),LstIntg(b,q)) Chinese remainders for integers. - See also: 1/ gcd 2/ fracmod 3/ chinrem 4/ chrem + See also: 1/ gcd 2/ fracmod 3/ chinrem 4/ chrem Ex1:ichrem([2,7],[3,5]) Ex2:ichrem([2%7,3%5]) Ex3:ichrem([2%7,3%5,1%9]) Ex4:ichrem([(x+1)%2,(x+2)%3,(3*x-1)%5]) - + ''' return GiacMethods['ichrem'](self,*args) @@ -7543,10 +7543,10 @@ cdef class GiacMethods_base: Help for icomp: icomp(Intg(n),Intg(k),[zeros=true||false]) Returns the list of compositions of n into k parts. - See also: 1/ sum + See also: 1/ sum Ex1:icomp(4,2) Ex2:icomp(6,3,zeros=false) - + ''' return GiacMethods['icomp'](self,*args) @@ -7555,10 +7555,10 @@ cdef class GiacMethods_base: Help for icontent: icontent(Poly,[Var]) GCD of the integer coefficients of a polynomial. - See also: 1/ + See also: 1/ Ex1:icontent(24x^3+6x^2-12x+18) Ex2:icontent(24t^3+6t^2-12t+18,t) - + ''' return GiacMethods['icontent'](self,*args) @@ -7567,10 +7567,10 @@ cdef class GiacMethods_base: Help for icosahedron: icosahedron(Pnt(A),Pnt(B),Pnt(C)) Draws an icosahedron with center A, vertex B and such that the plane ABC contains one vertex among the 5 nearest vertices from B. - See also: 1/ octahedron 2/ dodecahedron 3/ cube 4/ tetrahedron + See also: 1/ octahedron 2/ dodecahedron 3/ cube 4/ tetrahedron Ex1:icosahedron([0,0,0],[sqrt(5),0,0],[1,2,0]) Ex2:icosahedron(evalf([0,0,0],[3,2,4],[1,1,0])) - + ''' return GiacMethods['icosahedron'](self,*args) @@ -7579,9 +7579,9 @@ cdef class GiacMethods_base: Help for id: id(Seq) The name of the identity function (ℝ^n -> ℝ^n). - See also: 1/ sq 2/ sqrt + See also: 1/ sq 2/ sqrt Ex1:id(1,2,3) - + ''' return GiacMethods['id'](self,*args) @@ -7590,10 +7590,10 @@ cdef class GiacMethods_base: Help for identity: identity(Intg(n)) Returns the identity matrix of specified dimension n. - See also: 1/ ranm + See also: 1/ ranm Ex1:identity(3) Ex2:identity(5) - + ''' return GiacMethods['identity'](self,*args) @@ -7602,10 +7602,10 @@ cdef class GiacMethods_base: Help for idivis: idivis(Intg(a) or LstIntg) Returns the list of divisors of an integer. - See also: 1/ divis 2/ ifactors + See also: 1/ divis 2/ ifactors Ex1:idivis(36) Ex2:idivis([36,49]) - + ''' return GiacMethods['idivis'](self,*args) @@ -7614,10 +7614,10 @@ cdef class GiacMethods_base: Help for idn: idn(Intg(n)) Returns the identity matrix of specified dimension n. - See also: 1/ ranm + See also: 1/ ranm Ex1:idn(3) Ex2:idn(5) - + ''' return GiacMethods['idn'](self,*args) @@ -7626,11 +7626,11 @@ cdef class GiacMethods_base: Help for iegcd: iegcd(Intg,Intg) Extended greatest common divisor of 2 integers. - See also: 1/ gcd 2/ iabcuv 3/ egcd + See also: 1/ gcd 2/ iabcuv 3/ egcd Ex1:iegcd(45,75) Ex2:iegcd(21,28) Ex3:iegcd(30,49) - + ''' return GiacMethods['iegcd'](self,*args) @@ -7639,10 +7639,10 @@ cdef class GiacMethods_base: Help for ifactor: ifactor(Intg(a)) Factorization of an integer into prime factors. - See also: 1/ factor 2/ ecm_factor + See also: 1/ factor 2/ ecm_factor Ex1:ifactor(50) Ex2:ifactor(123456789) - + ''' return GiacMethods['ifactor'](self,*args) @@ -7651,10 +7651,10 @@ cdef class GiacMethods_base: Help for ifactors: ifactors(Intg(a) or LstIntg) Returns the list of prime factors of an integer (each factor is followed by its multiplicity). - See also: 1/ ifactor 2/ factors + See also: 1/ ifactor 2/ factors Ex1:ifactors(36) Ex2:ifactors([36,52]) - + ''' return GiacMethods['ifactors'](self,*args) @@ -7663,7 +7663,7 @@ cdef class GiacMethods_base: Help for ifourier: ifourier(Expr(F(s)),[Var(s),[Var(x)]]) Returns the inverse Fourier transform f(x) of F(s). - See also: 1/ fourier 2/ fourier_cn 3/ ifft + See also: 1/ fourier 2/ fourier_cn 3/ ifft Ex1:ifourier(2*pi*(Dirac(s)-sign(s)*sin(s)),s,x) Ex2:ifourier(-2/(s^2-1),s,x) Ex3:ifourier(pi/(exp(pi*s/4)+exp(-pi*s/4)),s,x) @@ -7671,7 +7671,7 @@ cdef class GiacMethods_base: Ex5:ifourier(pi*ugamma(0,4*abs(s)),s,x) Ex6:ifourier(fourier(exp(-abs(x)),x,s)^2,s,x) Ex7:ifourier(sinc(s),s,x) - + ''' return GiacMethods['ifourier'](self,*args) @@ -7680,11 +7680,11 @@ cdef class GiacMethods_base: Help for igamma: igamma(Real(a),Real(x),[1]) Calculates of gamma at a point (a,x). If a and x>0, igamma(a,x)=int(e^{-t}*t^{a-1},t=0..x), (igamma(a,x,1)=igamma(a,x)/Gamma(a)). - See also: 1/ Psi 2/ Beta 3/ Gamma 3/ ugamma + See also: 1/ Psi 2/ Beta 3/ Gamma 3/ ugamma Ex1:igamma(5.0,2.0) Ex2:igamma(-5.1,2.1) Ex3:igamma(5.0,2.0,1) - + ''' return GiacMethods['igamma'](self,*args) @@ -7693,13 +7693,13 @@ cdef class GiacMethods_base: Help for igcd: igcd((Intg(a) or Poly),(Intg(b) or Poly)) Returns the greatest common divisor of 2 polynomials of several variables or of 2 integers or of 2 rationals. - See also: 1/ lcm 2/ euler 2/ modgcd 3/ ezgcd 4/ psrgcd 5/ heugcd 6/ Gcd + See also: 1/ lcm 2/ euler 2/ modgcd 3/ ezgcd 4/ psrgcd 5/ heugcd 6/ Gcd Ex1:igcd(45,75) Ex2:igcd(15/7,50/9) Ex3:igcd(x^2-2*x+1,x^3-1) Ex4:igcd(t^2-2*t+1,t^2+t-2) Ex5:igcd((x^2-1)*(y^2-1)*z^2,x^3*y^3*z+(-(y^3))*z+x^3*z-z) - + ''' return GiacMethods['igcd'](self,*args) @@ -7708,11 +7708,11 @@ cdef class GiacMethods_base: Help for igcdex: igcdex(Intg,Intg) Extended greatest common divisor of 2 integers. - See also: 1/ gcd 2/ iabcuv 3/ egcd + See also: 1/ gcd 2/ iabcuv 3/ egcd Ex1:igcdex(45,75) Ex2:igcdex(21,28) Ex3:igcdex(30,49) - + ''' return GiacMethods['igcdex'](self,*args) @@ -7721,10 +7721,10 @@ cdef class GiacMethods_base: Help for ihermite: ihermite(Mtrx(A)) Hermite normal form of a matrix with coefficients in ℤ : returns L,U such that L is invertible in ℤ, U is upper triangular and U=L*A. - See also: 1/ ismith + See also: 1/ ismith Ex1:ihermite([[9,-36,30], [-36,192,-180], [30,-180,180]]) Ex2:ihermite([[1,2,3],[4,5,6],[7,8,9]]) - + ''' return GiacMethods['ihermite'](self,*args) @@ -7733,11 +7733,11 @@ cdef class GiacMethods_base: Help for ilaplace: ilaplace(Expr,[Var],[IlapVar]) Inverse Laplace transform of a rational fraction. - See also: 1/ laplace 2/ ztrans 3/ invztrans 4/ Heaviside + See also: 1/ laplace 2/ ztrans 3/ invztrans 4/ Heaviside Ex1:ilaplace(1/(x^2+1)^2) Ex2:ilaplace(s/(s^4-1),s,x) Ex3:ilaplace(exp(-s)/s,s,x) - + ''' return GiacMethods['ilaplace'](self,*args) @@ -7746,11 +7746,11 @@ cdef class GiacMethods_base: Help for im: im(Cplx) Returns the imaginary part of a complex number. - See also: 1/ re 2/ conj + See also: 1/ re 2/ conj Ex1:im(1+2*i) Ex2:im((1+2*i)^2) Ex3:im([1+2*i,(1+2*i)^2]) - + ''' return GiacMethods['im'](self,*args) @@ -7759,11 +7759,11 @@ cdef class GiacMethods_base: Help for imag: imag(Cplx) Returns the imaginary part of a complex number. - See also: 1/ re 2/ conj + See also: 1/ re 2/ conj Ex1:imag(1+2*i) Ex2:imag((1+2*i)^2) Ex3:imag([1+2*i,(1+2*i)^2]) - + ''' return GiacMethods['imag'](self,*args) @@ -7772,10 +7772,10 @@ cdef class GiacMethods_base: Help for image: image(Mtrx(M)) Image of a linear map with matrix M. - See also: 1/ ker 2/ rref + See also: 1/ ker 2/ rref Ex1:image([[1,2],[3,6]]) Ex2:image([[1,2,3],[1,3,6],[2,5,9]]) - + ''' return GiacMethods['image'](self,*args) @@ -7784,7 +7784,7 @@ cdef class GiacMethods_base: Help for implicitdiff: implicitdiff(constr,[depvars],y,diffvars) Implicit differentiation. - See also: 1/ diff + See also: 1/ diff Ex1:implicitdiff(x^2*y+y^2=1,y,x) Ex2:implicitdiff(R=P*V/T,P,T) Ex3:implicitdiff([x^2+y=z,x+y*z=1],[y(x),z(x)],y,x) @@ -7803,7 +7803,7 @@ cdef class GiacMethods_base: Ex16:implicitdiff(x*y*z,-2x^3+15x^2*y+11y^3-24y=0,[x,z,y],order=1) Ex17:implicitdiff(x*y*z,-2x^3+15x^2*y+11y^3-24y=0,[x,z,y],order=2,[1,-1,0]) Ex18: pd:=implicitdiff(x*y*z,-2x^3+15x^2*y+11y^3-24y=0,[x,z,y],order=4,[0,z,0]);pd[4,0,0] - + ''' return GiacMethods['implicitdiff'](self,*args) @@ -7812,7 +7812,7 @@ cdef class GiacMethods_base: Help for implicitplot: implicitplot(Expr,Var1,Var2) plotimplicit(f(x,y),x,y) or plotimplicit(f(x,y),[x,y]) draws graph of f(x,y)=0. - See also: 1/ plotcontour 2/ unfactored 3/ plotinequation + See also: 1/ plotcontour 2/ unfactored 3/ plotinequation Ex1:implicitplot(x^2+y^2-1,x,y) Ex2:implicitplot(x^4+y^4=x^2-y^2) Ex3:implicitplot(x^2+y^2-1,x,y,unfactored) @@ -7822,7 +7822,7 @@ cdef class GiacMethods_base: Ex7:implicitplot(y^3=x^3-x^2,[x,y],xstep=0.1,ystep=0.1) Ex8:implicitplot((x+5)^2+(y+4)^2-1,x=-6..-4,y=-5..-3) Ex9:implicitplot((x+5)^2+(y+4)^2-1,[x=-6..-4,y=-5..-3]) - + ''' return GiacMethods['implicitplot'](self,*args) @@ -7832,7 +7832,7 @@ cdef class GiacMethods_base: import_graph(Str("path/to/graphname[.dot]")) Returns the graph constructed from instructions in the file 'path/to/graphname.dot' (in dot format), or "undef" on failure. Ex1:import_graph("K5.dot") - + ''' return GiacMethods['import_graph'](self,*args) @@ -7841,10 +7841,10 @@ cdef class GiacMethods_base: Help for inString: inString(Str(l),Elem(e)) Tests if e is in the string l (returns -1 or k if l[k]=e). - See also: 1/ contains + See also: 1/ contains Ex1:inString("abcd","b") Ex2:inString("abcd","e") - + ''' return GiacMethods['inString'](self,*args) @@ -7853,10 +7853,10 @@ cdef class GiacMethods_base: Help for in_ideal: in_ideal(Poly,Lst,LstVar,[order]) Checks whether a polynomial or list of polynomials belongs to an ideal given by a Grobner basis (2nd argument) with respect to a variable list. - See also: 1/ gbasis 2/ greduce + See also: 1/ gbasis 2/ greduce Ex1:in_ideal((x+y)^2,[y^2,x^2+2*x*y],[x,y]) Ex2:in_ideal(x+y,[y^2,x^2+2*x*y],[x,y]) - + ''' return GiacMethods['in_ideal'](self,*args) @@ -7865,9 +7865,9 @@ cdef class GiacMethods_base: Help for incidence_matrix: incidence_matrix(Graph(G)) Returns the incidence matrix of G whose rows are indexed by the vertices and columns by the edges (in order defined by the command 'edges'). - See also: 1/ incident_edges + See also: 1/ incident_edges Ex1:incidence_matrix(graph("tetrahedron")) - + ''' return GiacMethods['incidence_matrix'](self,*args) @@ -7876,9 +7876,9 @@ cdef class GiacMethods_base: Help for incident_edges: incident_edges(Graph(G),Vrtx(v)) Returns the list of all edges incident to the vertex v of G (or to the vertices in the list v). - See also: 1/ adjacency_matrix 2/ vertex_degree 3/ incidence_matrix 4/ neighbors + See also: 1/ adjacency_matrix 2/ vertex_degree 3/ incidence_matrix 4/ neighbors Ex1:incident_edges(cycle_graph(8),[1,5,7]) - + ''' return GiacMethods['incident_edges'](self,*args) @@ -7887,9 +7887,9 @@ cdef class GiacMethods_base: Help for incircle: incircle((Pnt or Cplx),(Pnt or Cplx),(Pnt or Cplx)) incircle(A,B,C) draws the incircle of the triangle ABC. - See also: 1/ excircle 2/ circumcircle + See also: 1/ excircle 2/ circumcircle Ex1:incircle(0,1,1+i) - + ''' return GiacMethods['incircle'](self,*args) @@ -7898,10 +7898,10 @@ cdef class GiacMethods_base: Help for increasing_power: increasing_power(:=Intg(0 or 1)) Pseudo-variable to control the display of polynomials. - See also: 1/ cas_setup + See also: 1/ cas_setup Ex1: increasing_power:=1 Ex2: increasing_power:=0 - + ''' return GiacMethods['increasing_power'](self,*args) @@ -7910,9 +7910,9 @@ cdef class GiacMethods_base: Help for independence_number: independence_number(Graph(G)) Returns the independence number of G. - See also: 1/ clique_number 2/ graph_complement 3/ maximum_clique 4/ maximum_independent_set + See also: 1/ clique_number 2/ graph_complement 3/ maximum_clique 4/ maximum_independent_set Ex1:independence_number(complete_graph(3,4)) - + ''' return GiacMethods['independence_number'](self,*args) @@ -7921,9 +7921,9 @@ cdef class GiacMethods_base: Help for indets: indets(Expr) List of variables in the expression. - See also: 1/ has 2/ lvar + See also: 1/ has 2/ lvar Ex1:indets(exp(x)*2*sin(y)) - + ''' return GiacMethods['indets'](self,*args) @@ -7932,12 +7932,12 @@ cdef class GiacMethods_base: Help for index: index(Vect,Expr) Index of the first position of an object in a list, a string or a set or returns an error message. - See also: 1/ find 2/ member + See also: 1/ find 2/ member Ex1:index([3,x,1,2,1,3],1) Ex2:index([0,1,3,2,4,2,5],2) Ex3:index(%{4,3,1,2%},1) Ex4:index("abracadabrant","c") - + ''' return GiacMethods['index'](self,*args) @@ -7946,9 +7946,9 @@ cdef class GiacMethods_base: Help for induced_subgraph: induced_subgraph(Graph(G),Lst(V)) Returns the subgraph of G induced by the vertices in list V. - See also: 1/ subgraph + See also: 1/ subgraph Ex1:induced_subgraph(cycle_graph(6),[1,2,6]) - + ''' return GiacMethods['induced_subgraph'](self,*args) @@ -7957,12 +7957,12 @@ cdef class GiacMethods_base: Help for inequationplot: inequationplot(Expr,[x=xrange,y=yrange],[xstep],[ystep]) Shows the graph of the solutions of inequalities with 2 variables. - See also: 1/ plotfunc 2/ plotcontour 3/ plotdensity 4/ plotimplicit + See also: 1/ plotfunc 2/ plotcontour 3/ plotdensity 4/ plotimplicit Ex1:inequationplot(x^2-y^2<3) Ex2:inequationplot(x^2-y^2<3,[x=-2..2,y=-2..2],xstep=0.1,ystep=0.1) Ex3:inequationplot(3-(x^2-y^2),[x=-2..2,y=-2..2],xstep=0.1,ystep=0.1) Ex4:inequationplot([x+y>3,x^2ln(a*b^n) for integers n. - See also: 1/ texpand + See also: 1/ texpand Ex1:lncollect(ln(x)+2*ln(y)) - + ''' return GiacMethods['lncollect'](self,*args) @@ -9904,9 +9904,9 @@ cdef class GiacMethods_base: Help for lnexpand: lnexpand(Expr) Expands logarithms. - See also: 1/ texpand 2/ expexpand 3/ trigexpand + See also: 1/ texpand 2/ expexpand 3/ trigexpand Ex1:lnexpand(ln(3*x)) - + ''' return GiacMethods['lnexpand'](self,*args) @@ -9915,10 +9915,10 @@ cdef class GiacMethods_base: Help for locus: locus(Pnt,Elem) locus(M,A) draws the locus of M (or locus(d,A) draws the envelope of d) when A:=element(C) (C is a curve). The example instructions below must be written in a geometric level on different lines. - See also: 1/ envelope 2/ trace + See also: 1/ envelope 2/ trace Ex1: A:=element(circle(i,1+i));M:=homothety(0,2,A);locus(M,A) Ex2: A:=element(line(x=0));d:=perpen_bisector(1,A);locus(d,A) - + ''' return GiacMethods['locus'](self,*args) @@ -9927,11 +9927,11 @@ cdef class GiacMethods_base: Help for log: log(Expr or Opt) Natural logarithm or option of the convert or convertir command (id trig2exp). - See also: 1/ exp 2/ convert 3/ trig2exp 4/ log10 + See also: 1/ exp 2/ convert 3/ trig2exp 4/ log10 Ex1:log(1) Ex2:log(e) Ex3: convert(cos(x),ln) - + ''' return GiacMethods['log'](self,*args) @@ -9940,9 +9940,9 @@ cdef class GiacMethods_base: Help for log10: log10(Expr) Common logarithm (base 10). - See also: 1/ alog10 2/ ln + See also: 1/ alog10 2/ ln Ex1:log10(10) - + ''' return GiacMethods['log10'](self,*args) @@ -9951,10 +9951,10 @@ cdef class GiacMethods_base: Help for logarithmic_regression: logarithmic_regression(Lst||Mtrx(A),[Lst]) Returns the coefficients a and b of y=a*ln(x)+b : it is the best logarithm which approx the points where the coordinates are the rows of A (or the 2 lists). - See also: 1/ exponential_regression + See also: 1/ exponential_regression Ex1:logarithmic_regression([[1.0,1.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]]) Ex2:logarithmic_regression([1.0,2.0,3.0,4.0],[1.0,4.0,9.0,16.0]) - + ''' return GiacMethods['logarithmic_regression'](self,*args) @@ -9963,10 +9963,10 @@ cdef class GiacMethods_base: Help for logarithmic_regression_plot: logarithmic_regression_plot(Lst||Mtrx(A),[Lst]) Returns the plot of y=a*ln(x)+b : it is the best logarithm which approx the points where the coordinates are the rows of A (or the 2 lists). - See also: 1/ exponential_regression_plot + See also: 1/ exponential_regression_plot Ex1:logarithmic_regression_plot([[1.0,1.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]]) Ex2:logarithmic_regression_plot([1.0,2.0,3.0,4.0],[1.0,4.0,9.0,16.0]) - + ''' return GiacMethods['logarithmic_regression_plot'](self,*args) @@ -9975,10 +9975,10 @@ cdef class GiacMethods_base: Help for logb: logb(Real) Logarithm with base b. - See also: 1/ log 2/ log10 + See also: 1/ log 2/ log10 Ex1:logb(5,2) Ex2:logb(7,10) - + ''' return GiacMethods['logb'](self,*args) @@ -9987,10 +9987,10 @@ cdef class GiacMethods_base: Help for logistic_regression: logistic_regression(Lst(L),Real(x0),Real(y0)) Returns y,y',C,y'max,xmax,R : y is a logistic function (sol of y'/y=a*y+b), such that y(x0)=y0 and where [y'(x0),y'(x0+1)...] is the best approximation of L. - See also: 1/ polynomial_regression 2/ power_regression 3/ linear_regression + See also: 1/ polynomial_regression 2/ power_regression 3/ linear_regression Ex1:logistic_regression(evalf([1,2,4,6,8,7,5]),1,2) Ex2:logistic_regression([0.0,1.0,2.0,3.0,4.0],0.0,1.0) - + ''' return GiacMethods['logistic_regression'](self,*args) @@ -9999,10 +9999,10 @@ cdef class GiacMethods_base: Help for logistic_regression_plot: logistic_regression_plot(Lst(L),Real(x0),Real(y0)) Returns the plot of a logistic function y such that y(x0)=y0 and where [y'(x0),y'(x0+1)...] is the best approximation of L. - See also: 1/ polynomial_regression_plot 2/ power_regression_plot 3/ linear_regression_plot + See also: 1/ polynomial_regression_plot 2/ power_regression_plot 3/ linear_regression_plot Ex1:logistic_regression_plot(evalf([1,2,4,6,8,7,5]),1,2) Ex2:logistic_regression_plot([0.0,1.0,2.0,3.0,4.0],0.0,1.0) - + ''' return GiacMethods['logistic_regression_plot'](self,*args) @@ -10011,10 +10011,10 @@ cdef class GiacMethods_base: Help for lower: lower(Mtrx||Strng) Returns the lower triangular matrix (under the diagonal, included) or writes a string in lowercase. - See also: 1/ diag 2/ upper + See also: 1/ diag 2/ upper Ex1:lower([[1,2,3],[4,5,6],[7,8,9]]) Ex2:lower("HELLO") - + ''' return GiacMethods['lower'](self,*args) @@ -10023,10 +10023,10 @@ cdef class GiacMethods_base: Help for lowest_common_ancestor: lowest_common_ancestor(Graph(T),Vrtx(r),Seq(u,v)||Lst([u1,v1],[u2,v2],...)) Returns the lowest common ancestor of nodes u and v in the tree graph T with root r, or the list of lowest common ancestors of all pairs [uk,vk]. - See also: 1/ is_tree 2/ tree_height + See also: 1/ is_tree 2/ tree_height Ex1: T:=random_tree(30); lowest_common_ancestor(T,15,10,20) Ex2: T:=random_tree(30); lowest_common_ancestor(T,15,[[10,20],[11,19]]) - + ''' return GiacMethods['lowest_common_ancestor'](self,*args) @@ -10035,9 +10035,9 @@ cdef class GiacMethods_base: Help for lowpass: lowpass(Lst(s),Real(c),[Intg(samplerate)]) Returns the result of applying a simple first-order lowpass RC filter with cutoff frequency c (the default samplerate is 44100) to the given signal s. - See also: 1/ highpass 2/ moving_average + See also: 1/ highpass 2/ moving_average Ex1: f:=unapply(periodic(sign(x),x,-1/880,1/880),x):;s:=createwav(apply(f,soundsec(1))):;playsnd(lowpass(s,1000)) - + ''' return GiacMethods['lowpass'](self,*args) @@ -10046,8 +10046,8 @@ cdef class GiacMethods_base: Help for lp_assume: lp_assume(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_assume'](self,*args) @@ -10056,8 +10056,8 @@ cdef class GiacMethods_base: Help for lp_bestprojection: lp_bestprojection(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_bestprojection'](self,*args) @@ -10066,8 +10066,8 @@ cdef class GiacMethods_base: Help for lp_binary: lp_binary(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_binary'](self,*args) @@ -10076,8 +10076,8 @@ cdef class GiacMethods_base: Help for lp_binaryvariables: lp_binaryvariables(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_binaryvariables'](self,*args) @@ -10086,8 +10086,8 @@ cdef class GiacMethods_base: Help for lp_breadthfirst: lp_breadthfirst(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_breadthfirst'](self,*args) @@ -10096,8 +10096,8 @@ cdef class GiacMethods_base: Help for lp_depthfirst: lp_depthfirst(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_depthfirst'](self,*args) @@ -10106,8 +10106,8 @@ cdef class GiacMethods_base: Help for lp_depthlimit: lp_depthlimit(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_depthlimit'](self,*args) @@ -10116,8 +10116,8 @@ cdef class GiacMethods_base: Help for lp_firstfractional: lp_firstfractional(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_firstfractional'](self,*args) @@ -10126,8 +10126,8 @@ cdef class GiacMethods_base: Help for lp_gaptolerance: lp_gaptolerance(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_gaptolerance'](self,*args) @@ -10136,8 +10136,8 @@ cdef class GiacMethods_base: Help for lp_hybrid: lp_hybrid(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_hybrid'](self,*args) @@ -10146,8 +10146,8 @@ cdef class GiacMethods_base: Help for lp_initialpoint: lp_initialpoint(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_initialpoint'](self,*args) @@ -10156,8 +10156,8 @@ cdef class GiacMethods_base: Help for lp_integer: lp_integer(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_integer'](self,*args) @@ -10166,8 +10166,8 @@ cdef class GiacMethods_base: Help for lp_integertolerance: lp_integertolerance(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_integertolerance'](self,*args) @@ -10176,8 +10176,8 @@ cdef class GiacMethods_base: Help for lp_integervariables: lp_integervariables(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_integervariables'](self,*args) @@ -10186,8 +10186,8 @@ cdef class GiacMethods_base: Help for lp_interiorpoint: lp_interiorpoint(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_interiorpoint'](self,*args) @@ -10196,8 +10196,8 @@ cdef class GiacMethods_base: Help for lp_iterationlimit: lp_iterationlimit(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_iterationlimit'](self,*args) @@ -10206,8 +10206,8 @@ cdef class GiacMethods_base: Help for lp_lastfractional: lp_lastfractional(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_lastfractional'](self,*args) @@ -10216,8 +10216,8 @@ cdef class GiacMethods_base: Help for lp_maxcuts: lp_maxcuts(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_maxcuts'](self,*args) @@ -10226,8 +10226,8 @@ cdef class GiacMethods_base: Help for lp_maximize: lp_maximize(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_maximize'](self,*args) @@ -10236,8 +10236,8 @@ cdef class GiacMethods_base: Help for lp_method: lp_method(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_method'](self,*args) @@ -10246,8 +10246,8 @@ cdef class GiacMethods_base: Help for lp_mostfractional: lp_mostfractional(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_mostfractional'](self,*args) @@ -10256,8 +10256,8 @@ cdef class GiacMethods_base: Help for lp_nodelimit: lp_nodelimit(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_nodelimit'](self,*args) @@ -10266,8 +10266,8 @@ cdef class GiacMethods_base: Help for lp_nodeselect: lp_nodeselect(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_nodeselect'](self,*args) @@ -10276,8 +10276,8 @@ cdef class GiacMethods_base: Help for lp_nonnegative: lp_nonnegative(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_nonnegative'](self,*args) @@ -10286,8 +10286,8 @@ cdef class GiacMethods_base: Help for lp_nonnegint: lp_nonnegint(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_nonnegint'](self,*args) @@ -10296,8 +10296,8 @@ cdef class GiacMethods_base: Help for lp_pseudocost: lp_pseudocost(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_pseudocost'](self,*args) @@ -10306,8 +10306,8 @@ cdef class GiacMethods_base: Help for lp_simplex: lp_simplex(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_simplex'](self,*args) @@ -10316,8 +10316,8 @@ cdef class GiacMethods_base: Help for lp_timelimit: lp_timelimit(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_timelimit'](self,*args) @@ -10326,8 +10326,8 @@ cdef class GiacMethods_base: Help for lp_variables: lp_variables(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_variables'](self,*args) @@ -10336,8 +10336,8 @@ cdef class GiacMethods_base: Help for lp_varselect: lp_varselect(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_varselect'](self,*args) @@ -10346,8 +10346,8 @@ cdef class GiacMethods_base: Help for lp_verbose: lp_verbose(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_verbose'](self,*args) @@ -10356,7 +10356,7 @@ cdef class GiacMethods_base: Help for lpsolve: lpsolve(Expr(o),[List(c)],[bounds],[options]) Solves a (mixed integer/binary) LP problem in general form. - See also: 1/ nlpsolve 2/ fsolve + See also: 1/ nlpsolve 2/ fsolve Ex1:lpsolve(2x+y-z+4,[x<=1,y>=2,x+3y-z=2,2x-y+z<=8,-x+y<=5]) Ex2:lpsolve(-4x-5y,[x+2y<=6,5x+4y<=20,0<=x,0<=y]) Ex3:lpsolve(-7x+2y,[4x-12y<=20,-x+3y<=3],x=-5..5,y=0..inf,lp_maximize=true) @@ -10372,7 +10372,7 @@ cdef class GiacMethods_base: Ex13:lpsolve(x1+x2,[2x1+5x2<=16,6x1+5x2<=30],assume=nonnegint,lp_maximize) Ex14:lpsolve(8x1+11x2+6x3+4x4,[5x1+7x2+4x3+3x4<=14],assume=lp_binary,lp_maximize) Ex15:lpsolve(x1+x2,[1867x1+1913x2=3618894],assume=nonnegint,lp_verbose=true) - + ''' return GiacMethods['lpsolve'](self,*args) @@ -10381,9 +10381,9 @@ cdef class GiacMethods_base: Help for lsmod: lsmod(NULL) Displays the installed dynamic libraries. - See also: 1/ insmod 2/ rmmod + See also: 1/ insmod 2/ rmmod Ex1:lsmod() - + ''' return GiacMethods['lsmod'](self,*args) @@ -10392,10 +10392,10 @@ cdef class GiacMethods_base: Help for lsq: lsq(Mtrx(A),(Mtrx || Vect)(B)) Returns the vector (resp matrix) X which is the minimum of the euclidean (resp Frobenius) norm of A*X-B corresponding to the linear system A*X=B when B is a vector (resp matrix). - See also: 1/ lu 2/ QR + See also: 1/ lu 2/ QR Ex1:lsq([[1,2],[3,4]],[5,11]) Ex2:lsq([[1,2],[3,4]],[[5,-1],[11,-1]]) - + ''' return GiacMethods['lsq'](self,*args) @@ -10404,10 +10404,10 @@ cdef class GiacMethods_base: Help for lu: lu(Mtrx) For a numerical matrix A, returns p permutation, L and U such that PA=LU (P=permu2mat(p)). - See also: 1/ qr 2/ cholesky 3/ LU + See also: 1/ qr 2/ cholesky 3/ LU Ex1:lu([[1,2],[3,4]]) Ex2:lu([[6,12,18],[5,14,31],[3,8,18]]) - + ''' return GiacMethods['lu'](self,*args) @@ -10416,10 +10416,10 @@ cdef class GiacMethods_base: Help for lvar: lvar(Expr) List of variables of an object (with rational dependence). - See also: 1/ lname 2/ has + See also: 1/ lname 2/ has Ex1:lvar(exp(x)*2*sin(y)) Ex2:lvar(exp(x)*2*sin(y)+ln(x)) - + ''' return GiacMethods['lvar'](self,*args) @@ -10428,9 +10428,9 @@ cdef class GiacMethods_base: Help for mRow: mRow(Expr(Xpr),Mtrx(A),Intg(n1)) Multiplies row n1 of the matrix A by Xpr. - See also: 1/ rowAdd 2/ mRowAdd + See also: 1/ rowAdd 2/ mRowAdd Ex1:mRow(12,[[1,2],[3,4],[5,6]],0) - + ''' return GiacMethods['mRow'](self,*args) @@ -10439,9 +10439,9 @@ cdef class GiacMethods_base: Help for mRowAdd: mRowAdd(Expr(Xpr),Mtrx(A),Intg(n1),Intg(n2)) Multiplies row n1 of the matrix A by Xpr, then adds it to the row n2. - See also: 1/ rowAdd 2/ mRow + See also: 1/ rowAdd 2/ mRow Ex1:mRowAdd(12,[[1,2],[3,4],[5,6]],0,2) - + ''' return GiacMethods['mRowAdd'](self,*args) @@ -10450,10 +10450,10 @@ cdef class GiacMethods_base: Help for magenta: magenta(Opt) Option of the display command to display with color. - See also: 1/ display + See also: 1/ display Ex1: F:=display(point(2+1.5*i),red) Ex2: F:=display(point(2+1.5*i),point_point+green) - + ''' return GiacMethods['magenta'](self,*args) @@ -10462,9 +10462,9 @@ cdef class GiacMethods_base: Help for make_directed: make_directed(Graph(G),[Mrtx(A)]) Returns the copy of undirected graph G in which every edge is converted to a pair of arcs [and with weights specified by matrix A]. - See also: 1/ is_directed 2/ make_weighted 3/ underlying_graph + See also: 1/ is_directed 2/ make_weighted 3/ underlying_graph Ex1:make_directed(cycle_graph(4),[[0,0,0,1],[2,0,1,3],[0,1,0,4],[5,0,4,0]]) - + ''' return GiacMethods['make_directed'](self,*args) @@ -10473,9 +10473,9 @@ cdef class GiacMethods_base: Help for make_weighted: make_weighted(Graph(G),[Mrtx(M)]) Returns a copy of G with edge/arc weights set as specified by matrix M. If M is omitted, a square matrix of ones is used. If G is undirected, M is assumed to be symmetric. - See also: 1/ get_edge_weight 2/ is_weighted 3/ make_directed 4/ set_edge_weight 5/ underlying_graph 6/ weight_matrix + See also: 1/ get_edge_weight 2/ is_weighted 3/ make_directed 4/ set_edge_weight 5/ underlying_graph 6/ weight_matrix Ex1:make_weighted(cycle_graph(3),[[0,2,3],[2,0,1],[3,1,0]]) - + ''' return GiacMethods['make_weighted'](self,*args) @@ -10484,12 +10484,12 @@ cdef class GiacMethods_base: Help for makelist: makelist(Fnc,InitVal,FinalVal,StepVal) Returns a list made with a function or with a constant. - See also: 1/ seq 2/ range 3/ makemat 4/ $ + See also: 1/ seq 2/ range 3/ makemat 4/ $ Ex1:makelist(x->x^2,1,10,2) Ex2:makelist(4,1,10) Ex3:makelist(4,5,10) Ex4:makelist(x->ifte(x<5,"A","B"),1,10) - + ''' return GiacMethods['makelist'](self,*args) @@ -10498,11 +10498,11 @@ cdef class GiacMethods_base: Help for makemat: makemat(Fnct(f),RowsNumb,ColsNumb) Creates a matrix. - See also: 1/ matrix + See also: 1/ matrix Ex1:makemat((j,k)->j+k,3,2) Ex2:makemat((j,k)->1/(j+k+1),2,3) Ex3:makemat(sqrt(2),2,3) - + ''' return GiacMethods['makemat'](self,*args) @@ -10511,9 +10511,9 @@ cdef class GiacMethods_base: Help for makesuite: makesuite(Vect||Lst) Returns a sequence made with a vector. - See also: 1/ makevector 2/ op + See also: 1/ makevector 2/ op Ex1:makesuite([1,2,3]) - + ''' return GiacMethods['makesuite'](self,*args) @@ -10522,9 +10522,9 @@ cdef class GiacMethods_base: Help for makevector: makevector(Seq) Returns a vector made with a sequence. - See also: 1/ makesuite + See also: 1/ makesuite Ex1:makevector(1,2,3) - + ''' return GiacMethods['makevector'](self,*args) @@ -10533,11 +10533,11 @@ cdef class GiacMethods_base: Help for map: map(Lst(l),Fnc(f)) Applies the function f at the elements of the list l or at a polynomial of internal format. - See also: 1/ apply 2/ set 3/ unapply + See also: 1/ apply 2/ set 3/ unapply Ex1:map([1,2,3],x->x^3) Ex2:map([1,2,3],unapply(x^3,x)) Ex3:map(%%%{1,[2,0]%%%}+%%%{2,[1,1]%%%},(a,b,c)->a*(b+2*c)) - + ''' return GiacMethods['map'](self,*args) @@ -10546,8 +10546,8 @@ cdef class GiacMethods_base: Help for maple2mupad: maple2mupad(Str("Name_Maplefile"),Str("Name_Mupadfile")) maple2mupad("file1","file2") translates file1(Maple) to file2(MuPAD). - See also: 1/ maple2xcas - + See also: 1/ maple2xcas + ''' return GiacMethods['maple2mupad'](self,*args) @@ -10556,8 +10556,8 @@ cdef class GiacMethods_base: Help for maple2xcas: maple2xcas(Str("NameMapleFile"),Str("NameXcasFile")) maple2xcas("file1","file2") translates file1(Maple) to file2(Xcas). - See also: 1/ maple2mupad - + See also: 1/ maple2mupad + ''' return GiacMethods['maple2xcas'](self,*args) @@ -10566,9 +10566,9 @@ cdef class GiacMethods_base: Help for maple_ifactors: maple_ifactors(Intg(n)) Returns 1 or -1 for the sign and the prime factors with their multiplicity of n in a matrix, such as ifactors in Maple. - See also: 1/ ifactors + See also: 1/ ifactors Ex1:maple_ifactors(120) - + ''' return GiacMethods['maple_ifactors'](self,*args) @@ -10577,10 +10577,10 @@ cdef class GiacMethods_base: Help for maple_mode: maple_mode(Intg(0) or 1 or 2 or 3) Switches to mode Xcas (0), Maple (1), Mupad (2), TI89 (3). - See also: 1/ python_compat + See also: 1/ python_compat Ex1:maple_mode(1) Ex2:maple_mode(0) - + ''' return GiacMethods['maple_mode'](self,*args) @@ -10589,9 +10589,9 @@ cdef class GiacMethods_base: Help for markov: markov(Mtrx(M),[Real(eps)]) Computation of the proper elements of a Markov chain transition matrix M, returns the list of sequence of positive recurrent states, the list of corresponding invariant probabilities, the list of other strongly connected components, the list of probabilities to end up in the sequence of recurrent states. - See also: 1/ randmarkov 2/ plotproba + See also: 1/ randmarkov 2/ plotproba Ex1:markov([[0,0,1/2,0,1/2],[0,0,1,0,0],[1/4,1/4,0,1/4,1/4],[0,0,1/2,0,1/2],[0,0,0,0,1]]) - + ''' return GiacMethods['markov'](self,*args) @@ -10600,9 +10600,9 @@ cdef class GiacMethods_base: Help for mat2list: mat2list(Mtrx) Returns the list of the terms of the matrix. - See also: 1/ list2mat 2/ flatten + See also: 1/ list2mat 2/ flatten Ex1:mat2list([[1,8],[4,9]]) - + ''' return GiacMethods['mat2list'](self,*args) @@ -10611,9 +10611,9 @@ cdef class GiacMethods_base: Help for mathml: mathml(Expr) Converts the expression into a string to display maths for the web. - See also: 1/ export_mathml 2/ latex + See also: 1/ export_mathml 2/ latex Ex1:mathml(1/2) - + ''' return GiacMethods['mathml'](self,*args) @@ -10622,9 +10622,9 @@ cdef class GiacMethods_base: Help for matpow: matpow(Mtrx,Intg(n)) Calculates the nth power of a matrix by jordanization. - See also: 1/ &^ 2/ ^ + See also: 1/ &^ 2/ ^ Ex1:matpow([[1,2],[3,4]],n) - + ''' return GiacMethods['matpow'](self,*args) @@ -10633,12 +10633,12 @@ cdef class GiacMethods_base: Help for matrix: matrix(Intg(p),Intg(q),(Fnc(f) or Val(a))) Makes a matrix m(j,k) with p rows and q cols, m(j,k)=f(j,k) or m(j,k)=a : the index start at 0 or 1 according to the mode (Xcas or Maple) (or option of apply) or make a matrix with a table. - See also: 1/ makemat 2/ makelist 3/ apply + See also: 1/ makemat 2/ makelist 3/ apply Ex1:matrix(2,3,(j,k)->1/(j+k+1)) Ex2:matrix(3,2,(j,k)->j+k) Ex3:matrix(2,3,4) - Ex4: A[0..2,0..2]:=1;A[0..1,1..2]:=2;a:=matrix(A) - + Ex4: A[0..2,0..2]:=1;A[0..1,1..2]:=2;a:=matrix(A) + ''' return GiacMethods['matrix'](self,*args) @@ -10647,12 +10647,12 @@ cdef class GiacMethods_base: Help for matrix_norm: matrix_norm(Mtrx,[2]||[inf]) Matrix norm induced by l1norm or by l2norm or by linfinty norm. - See also: 1/ l1norm 2/ l2 norm 3/ linfnorm 4/ frobenius_norm + See also: 1/ l1norm 2/ l2 norm 3/ linfnorm 4/ frobenius_norm Ex1:matrix_norm([[1,2,3],[3,-9,6],[4,5,6]]) Ex2:matrix_norm([[1,2,3],[3,-9,6],[4,5,6]],1) Ex3:matrix_norm([[1,2,3],[3,-9,6],[4,5,6]],2) Ex4:matrix_norm([[1,2,3],[3,-9,6],[4,5,6]],inf) - + ''' return GiacMethods['matrix_norm'](self,*args) @@ -10661,9 +10661,9 @@ cdef class GiacMethods_base: Help for max: max(Seq||Lst) Maximum of elements of a sequence or a list of reals. - See also: 1/ min + See also: 1/ min Ex1:max(25,35) - + ''' return GiacMethods['max'](self,*args) @@ -10672,9 +10672,9 @@ cdef class GiacMethods_base: Help for maxflow: maxflow(Graph(G),Vrtx(s),Vrtx(t)) Returns the optimal value for the max flow problem for network G with the source s and sink t along with an optimal flow (as a matrix). - See also: 1/ minimum_cut + See also: 1/ minimum_cut Ex1:maxflow(digraph(%{[[1,2],2],[[2,3],4],[[3,4],3],[[1,5],3],[[5,2],1],[[5,4],2]%}),1,4) - + ''' return GiacMethods['maxflow'](self,*args) @@ -10683,9 +10683,9 @@ cdef class GiacMethods_base: Help for maximal_independent_set: maximal_independent_set(Graph(G)) Returns a maximal set of mutually independent (non-adjacent) vertices in G. - See also: 1/ maximum_independent_set + See also: 1/ maximum_independent_set Ex1:maximal_independent_set(graph("petersen")) - + ''' return GiacMethods['maximal_independent_set'](self,*args) @@ -10702,7 +10702,7 @@ cdef class GiacMethods_base: Ex6:maximize(sqrt(x^2+y^2)-z,[x^2+y^2<=16,x+y+z=10],[x,y,z]) Ex7:maximize((1+x^2+3y+5x-4*x*y)/(1+x^2+y^2),x^2/4+y^2/3=9,[x,y]) Ex8:maximize(cos(x)^2+cos(y)^2,x+y=pi/4,[x,y],locus) - + ''' return GiacMethods['maximize'](self,*args) @@ -10711,9 +10711,9 @@ cdef class GiacMethods_base: Help for maximum_clique: maximum_clique(Graph(G)) Returns the maximum clique of undirected graph G as a list of vertices. - See also: 1/ clique_number 2/ is_clique 3/ maximum_independent_set + See also: 1/ clique_number 2/ is_clique 3/ maximum_independent_set Ex1:maximum_clique(graph_complement(complete_graph(3,4))) - + ''' return GiacMethods['maximum_clique'](self,*args) @@ -10722,9 +10722,9 @@ cdef class GiacMethods_base: Help for maximum_degree: maximum_degree(Graph(G)) Returns the largest degree among the vertices of G. - See also: 1/ minimum_degree 2/ vertex_degree + See also: 1/ minimum_degree 2/ vertex_degree Ex1:maximum_degree(digraph(trail(1,2,3,4,5,6,4,7,8,2))) - + ''' return GiacMethods['maximum_degree'](self,*args) @@ -10733,9 +10733,9 @@ cdef class GiacMethods_base: Help for maximum_independent_set: maximum_independent_set(Graph(G)) Returns the maximum independent vertex set of G. - See also: 1/ clique_number 2/ graph_complement 3/ independence_number 4/ maximum_clique + See also: 1/ clique_number 2/ graph_complement 3/ independence_number 4/ maximum_clique Ex1:maximum_independent_set(complete_graph(3,4)) - + ''' return GiacMethods['maximum_independent_set'](self,*args) @@ -10744,9 +10744,9 @@ cdef class GiacMethods_base: Help for maximum_matching: maximum_matching(Graph(G)) Returns the list of edges representing maximum matching in G. - See also: 1/ maximum_independent_set + See also: 1/ maximum_independent_set Ex1: G:=graph("soccerball"); draw_graph(highlight_edges(G,maximum_matching(G))) - + ''' return GiacMethods['maximum_matching'](self,*args) @@ -10755,11 +10755,11 @@ cdef class GiacMethods_base: Help for maxnorm: maxnorm(Vect or Mtrx) Norm with the max of a vector (or of a matrix): maxnorm([x1,x2,..,xn])=max(|x1|,..,|xn|). - See also: 1/ l2norm 2/ l1norm + See also: 1/ l2norm 2/ l1norm Ex1:maxnorm([1,2]) Ex2:maxnorm([1,2,3,-4]) Ex3:maxnorm([[1,2],[3,-4]]) - + ''' return GiacMethods['maxnorm'](self,*args) @@ -10768,11 +10768,11 @@ cdef class GiacMethods_base: Help for mean: mean(Lst||Mtrx,[Lst]) Mean of a list with the second argument as weight or of the columns of a matrix. - See also: 1/ stddev + See also: 1/ stddev Ex1:mean([1,2,3]) Ex2:mean([1,2,3],[1,2,3]) Ex3:mean([[1,2,3],[1,2,3]]) - + ''' return GiacMethods['mean'](self,*args) @@ -10781,10 +10781,10 @@ cdef class GiacMethods_base: Help for median: median(Lst||Mtrx,[Lst]) Returns the median of a list with the second argument as weight or of the columns of a matrix. - See also: 1/ quartiles + See also: 1/ quartiles Ex1:median([1,2,3,5,10,4]) Ex2:median([1,2,3,5,10,4],[1,2,3,1,2,3]) - + ''' return GiacMethods['median'](self,*args) @@ -10793,9 +10793,9 @@ cdef class GiacMethods_base: Help for median_line: median_line((Pnt or Cplx),(Pnt or Cplx),(Pnt or Cplx)) median_line(A,B,C) draws the median-line through A of the triangle ABC. - See also: 1/ midpoint 2/ perpen_bisector + See also: 1/ midpoint 2/ perpen_bisector Ex1:median_line(-1,1-i,i) - + ''' return GiacMethods['median_line'](self,*args) @@ -10804,10 +10804,10 @@ cdef class GiacMethods_base: Help for member: member(Elem(e),(Lst(l) or Set(l))) Tests if e is in the list or set l (=0, or k+1 with l[k]=e). - See also: 1/ contains 2/ est_element 3/ find 4/ index + See also: 1/ contains 2/ est_element 3/ find 4/ index Ex1:member(1,[4,3,1,2]) Ex2:member(1,%{4,3,1,2%}) - + ''' return GiacMethods['member'](self,*args) @@ -10819,7 +10819,7 @@ cdef class GiacMethods_base: Ex1:mgf(normald,1,0) Ex2:mgf(poisson,5) Ex3:mgf(binomial,n,p) - + ''' return GiacMethods['mgf'](self,*args) @@ -10828,13 +10828,13 @@ cdef class GiacMethods_base: Help for mid: mid(Lst(l) or Str(l),Intg(d),Intg(n)) Returns the extracted list of l with n elements (by default n=size(l)-d) and beginning at index d. - See also: 1/ head 2/ tail 3/ left 4/ right 5/ subMat + See also: 1/ head 2/ tail 3/ left 4/ right 5/ subMat Ex1:mid([0,1,2,3,4,5,6],2,3) Ex2:mid([0,1,2,3,4,5,6],2) Ex3:mid("azertyuiop",2,4) Ex4:mid("azertyuiop",2) Ex5:mid([[1,2],[3,4],[5,6]],1) - + ''' return GiacMethods['mid'](self,*args) @@ -10843,14 +10843,14 @@ cdef class GiacMethods_base: Help for middle_point: middle_point(Opt) Option of the plotarea command and of the area command. - See also: 1/ plotarea 2/ area + See also: 1/ plotarea 2/ area Ex1: plotarea(x^2,x=0..1,5,trapezoid) Ex2: plotarea(x^2,x=0..1,5,middle_point) Ex3: plotarea(x^2,x=0..1,5,right_rectangle) Ex4: plotarea(x^2,x=0..1,5,left_rectangle) Ex5: area(x^2,x=0..1,5,middle_point) Ex6: area(x^2,x=0..1,5,trapezoid) - + ''' return GiacMethods['middle_point'](self,*args) @@ -10859,9 +10859,9 @@ cdef class GiacMethods_base: Help for midpoint: midpoint((Pnt or Cplx),(Pnt or Cplx)) midpoint(A,B) draws the midpoint of the segment AB. - See also: 1/ median_line 2/ perpen_bisector + See also: 1/ median_line 2/ perpen_bisector Ex1:midpoint(-2,2i) - + ''' return GiacMethods['midpoint'](self,*args) @@ -10870,9 +10870,9 @@ cdef class GiacMethods_base: Help for min: min(Seq||Lst) Minimum of elements of a sequence or a list of reals. - See also: 1/ max + See also: 1/ max Ex1:min(25,35) - + ''' return GiacMethods['min'](self,*args) @@ -10881,10 +10881,10 @@ cdef class GiacMethods_base: Help for minimal_edge_coloring: minimal_edge_coloring(Graph(G),[sto]) Finds the minimal edge coloring of G and returns the sequence n,L where n is the class of G (1 for D colors and 2 for D+1 colors) and L is the list of colors of edges of G as returned by the edges command, or a copy of G with colored edges if the option 'sto' is specified. - See also: 1/ chromatic_index 2/ minimal_vertex_coloring 3/ edges + See also: 1/ chromatic_index 2/ minimal_vertex_coloring 3/ edges Ex1:minimal_edge_coloring(graph("petersen")) Ex2: G:=minimal_edge_coloring(graph("dodecahedron"),sto); draw_graph(G) - + ''' return GiacMethods['minimal_edge_coloring'](self,*args) @@ -10893,9 +10893,9 @@ cdef class GiacMethods_base: Help for minimal_spanning_tree: minimal_spanning_tree(Graph(G)) Returns the minimal spanning tree of undirected graph G. - See also: 1/ spanning_tree + See also: 1/ spanning_tree Ex1:minimal_spanning_tree(graph([[0,1,0,4,0,0],[1,0,1,0,4,0],[0,1,0,3,0,1],[4,0,3,0,1,0],[0,4,0,1,0,4],[0,0,1,0,4,0]])) - + ''' return GiacMethods['minimal_spanning_tree'](self,*args) @@ -10904,10 +10904,10 @@ cdef class GiacMethods_base: Help for minimal_vertex_coloring: minimal_vertex_coloring(Graph(G),[sto]) Computes the minimal vertex coloring for G and returns the colors in the order of vertices. If optional parameter "sto" is given, the colors are assigned to vertices and the modified copy of G is returned. - See also: 1/ chromatic_number 2/ is_vertex_colorable + See also: 1/ chromatic_number 2/ is_vertex_colorable Ex1:minimal_vertex_coloring(graph("petersen")) Ex2: draw_graph(minimal_vertex_coloring(graph("petersen"),sto)) - + ''' return GiacMethods['minimal_vertex_coloring'](self,*args) @@ -10926,7 +10926,7 @@ cdef class GiacMethods_base: Ex8:minimax(abs(x)*sqrt(abs(x)),x=-2..2,15) Ex9:minimax(min(1/cosh(3*sin(x)),sin(9x/10)),x=-3..4,30) Ex10:minimax(when(x==0,0,exp(-1/x^2)),x=-1..1,25) - + ''' return GiacMethods['minimax'](self,*args) @@ -10943,7 +10943,7 @@ cdef class GiacMethods_base: Ex6:minimize(sqrt(x^2+y^2)-z,[x^2+y^2<=16,x+y+z=10],[x,y,z]) Ex7:minimize((1+x^2+3y+5x-4*x*y)/(1+x^2+y^2),x^2/4+y^2/3=9,[x,y]) Ex8:minimize(cos(x)^2+cos(y)^2,x+y=pi/4,[x,y],locus) - + ''' return GiacMethods['minimize'](self,*args) @@ -10952,9 +10952,9 @@ cdef class GiacMethods_base: Help for minimum_cut: minimum_cut(Graph(G),Vrtx(s),Vrtx(t)) Returns the list of edges forming a minimum cut in a directed graph G with the source s and sink t. - See also: 1/ maxflow + See also: 1/ maxflow Ex1:minimum_cut(digraph(%{[[1,2],2],[[2,3],4],[[3,4],3],[[1,5],3],[[5,2],1],[[5,4],2]%}),1,4) - + ''' return GiacMethods['minimum_cut'](self,*args) @@ -10963,9 +10963,9 @@ cdef class GiacMethods_base: Help for minimum_degree: minimum_degree(Graph(G)) Returns the smallest degree among the vertices of G. - See also: 1/ maximum_degree 2/ vertex_degree + See also: 1/ maximum_degree 2/ vertex_degree Ex1:minimum_degree(digraph(trail(1,2,3,4,5,6,4,7,8,2))) - + ''' return GiacMethods['minimum_degree'](self,*args) @@ -10974,11 +10974,11 @@ cdef class GiacMethods_base: Help for mkisom: mkisom(Vect,(Sign(1) or -1)) Matrix of an isometry given by its proper elements. - See also: 1/ isom + See also: 1/ isom Ex1:mkisom([1,2],1) Ex2:mkisom([[1,0,0],pi/3],-1) Ex3:mkisom(pi,1) - + ''' return GiacMethods['mkisom'](self,*args) @@ -10987,9 +10987,9 @@ cdef class GiacMethods_base: Help for mksa: mksa(Unit) Converts units to the MKSA international unit system. - See also: 1/ convert 2/ ufactor + See also: 1/ convert 2/ ufactor Ex1:mksa(1_N) - + ''' return GiacMethods['mksa'](self,*args) @@ -10998,9 +10998,9 @@ cdef class GiacMethods_base: Help for modgcd: modgcd(Poly,Poly) GCD of 2 polynomials, with the modular algorithm. - See also: 1/ gcd 2/ heugcd 3/ ezgcd 4/ psrgcd + See also: 1/ gcd 2/ heugcd 3/ ezgcd 4/ psrgcd Ex1:modgcd(x^4-1,(x-1)^2) - + ''' return GiacMethods['modgcd'](self,*args) @@ -11009,11 +11009,11 @@ cdef class GiacMethods_base: Help for mods: mods(Intg,Intg) Returns the Euclidean symmetric remainder of two integers. - See also: 1/ irem 2/ iquo 3/ mod 4/ fracmod + See also: 1/ irem 2/ iquo 3/ mod 4/ fracmod Ex1:mods(8,3) Ex2:mods(10,4) Ex3:mods(11,7) - + ''' return GiacMethods['mods'](self,*args) @@ -11023,7 +11023,7 @@ cdef class GiacMethods_base: monotonic() Returns a real that increases as time passes Ex1:monotonic() - + ''' return GiacMethods['monotonic'](self,*args) @@ -11032,9 +11032,9 @@ cdef class GiacMethods_base: Help for montre_tortue: montre_tortue(NULL) Shows the turtle. - See also: 1/ cache_tortue + See also: 1/ cache_tortue Ex1:montre_tortue() - + ''' return GiacMethods['montre_tortue'](self,*args) @@ -11043,12 +11043,12 @@ cdef class GiacMethods_base: Help for moustache: moustache(Lst,[Lst],[x=a..b||y=a..b]) Box and Whisker plot for a statistical series. - See also: 1/ quartiles + See also: 1/ quartiles Ex1:moustache([-1,1,2,2.2,3,4,-2,5]) Ex2:moustache([1,2,3,5,10,4],x=1..2) Ex3:moustache([1,2,3,5,10,4],[1,2,3,1,2,3]) Ex4:moustache([[6,0,1,3,4,2,5],[0,1,3,4,2,5,6],[1,3,4,2,5,6,0],[3,4,2,5,6,0,1],[4,2,5,6,0,1,3],[2,5,6,0,1,3,4]]) - + ''' return GiacMethods['moustache'](self,*args) @@ -11057,9 +11057,9 @@ cdef class GiacMethods_base: Help for moving_average: moving_average(Lst(A),Intg(n)) Applies a moving average filter of length n to a signal sample A, and returns its result as an array of length nops(A)-n+1. - See also: 1/ lowpass + See also: 1/ lowpass Ex1: snd:=soundsec(2):;data:=0.5*threshold(3*sin(2*pi*220*snd),[-1.0,1.0])+randvector(length(snd),normald,0,0.05):;moving_average(data,25) - + ''' return GiacMethods['moving_average'](self,*args) @@ -11068,9 +11068,9 @@ cdef class GiacMethods_base: Help for moyal: moyal(Expr,Expr,VectVar) Moyal product of 2 symbols. - See also: 1/ + See also: 1/ Ex1:moyal(x^2+y^4,x^4-y^2,[x,y],5) - + ''' return GiacMethods['moyal'](self,*args) @@ -11079,11 +11079,11 @@ cdef class GiacMethods_base: Help for moyenne: moyenne(Lst||Mtrx,[Lst]) Mean of a list with the second argument as weight or of the columns of a matrix. - See also: 1/ stddev + See also: 1/ stddev Ex1:moyenne([1,2,3]) Ex2:moyenne([1,2,3],[1,2,3]) Ex3:moyenne([[1,2,3],[1,2,3]]) - + ''' return GiacMethods['moyenne'](self,*args) @@ -11092,7 +11092,7 @@ cdef class GiacMethods_base: Help for mul: mul(Expr||Lst,[Var||Lst],[Intg(a)],[Intg(b)],[Intg(p)]) Multiplies the values of the expression when the variable go from a to b with a step p (product(expression,var,begin,end,step) by default p=1) or product of the elements of a list or product element by element of 2 lists or matrices. - See also: 1/ sum + See also: 1/ sum Ex1:mul(n,n,1,10,2) Ex2:mul(1/n,n,1,10) Ex3:mul(1/n,n,11,1) @@ -11100,7 +11100,7 @@ cdef class GiacMethods_base: Ex5:mul([2,3,4,5]) Ex6:mul([2,3,4],[5,6,7]) Ex7:mul([[2,3,4],[5,6,7]],[[2,3,4],[5,6,7]]) - + ''' return GiacMethods['mul'](self,*args) @@ -11109,10 +11109,10 @@ cdef class GiacMethods_base: Help for mult_c_conjugate: mult_c_conjugate(Expr) Returns the expression after multiplication by the complex conjugate of the denominator (or of the numerator if no denominator). - See also: 1/ mult_conjugate + See also: 1/ mult_conjugate Ex1:mult_c_conjugate(1/(3+i*2)) Ex2:mult_c_conjugate(3+i*2) - + ''' return GiacMethods['mult_c_conjugate'](self,*args) @@ -11121,10 +11121,10 @@ cdef class GiacMethods_base: Help for mult_conjugate: mult_conjugate(Expr) Returns the expression after multiplication by the conjugate of the denominator (or of the numerator if no denominator). - See also: 1/ mult_c_conjugate + See also: 1/ mult_c_conjugate Ex1:mult_conjugate(sqrt(3)-sqrt(2)) Ex2:mult_conjugate(1/(sqrt(3)-sqrt(2))) - + ''' return GiacMethods['mult_conjugate'](self,*args) @@ -11133,12 +11133,12 @@ cdef class GiacMethods_base: Help for multinomial: multinomial(Intg(n),Vect(p),Vect(k)) Returns n!/(k0!*k1!*..;kj!)*(p0^k0*p1^k1..*pj^kj) (sum(p)=1 and sum(k)=n). - See also: 1/ binomial 2/ randvector 3/ ranm + See also: 1/ binomial 2/ randvector 3/ ranm Ex1:multinomial(10,[0.5,0.5],[3,7]) Ex2:multinomial(10,[0.2,0.3,0.5],[1,3,6]) Ex3: randvector(3,multinomial,[1/2,1/3,1/6]) Ex4: ranm(4,3,multinomial,[1/2,1/3,1/6]) - + ''' return GiacMethods['multinomial'](self,*args) @@ -11147,10 +11147,10 @@ cdef class GiacMethods_base: Help for multiplier_conjugue: multiplier_conjugue(Expr) Returns the expression after multiplication by the conjugate of the denominator (or of the numerator if no denominator). - See also: 1/ mult_c_conjugate + See also: 1/ mult_c_conjugate Ex1:multiplier_conjugue(sqrt(3)-sqrt(2)) Ex2:multiplier_conjugue(1/(sqrt(3)-sqrt(2))) - + ''' return GiacMethods['multiplier_conjugue'](self,*args) @@ -11159,10 +11159,10 @@ cdef class GiacMethods_base: Help for multiplier_conjugue_complexe: multiplier_conjugue_complexe(Expr) Returns the expression after multiplication by the complex conjugate of the denominator (or of the numerator if no denominator). - See also: 1/ mult_conjugate + See also: 1/ mult_conjugate Ex1:multiplier_conjugue_complexe(1/(3+i*2)) Ex2:multiplier_conjugue_complexe(3+i*2) - + ''' return GiacMethods['multiplier_conjugue_complexe'](self,*args) @@ -11171,11 +11171,11 @@ cdef class GiacMethods_base: Help for multiply: multiply(Intg or Lst, Intg or Lst) Returns the product of the 2 arguments. - See also: 1/ * + See also: 1/ * Ex1:multiply(41,-4) Ex2:multiply([4,1],[-4,2]) Ex3:multiply([[4,1],[-4,1]],[[4,1],[-4,1]]) - + ''' return GiacMethods['multiply'](self,*args) @@ -11184,8 +11184,8 @@ cdef class GiacMethods_base: Help for mupad2maple: mupad2maple(Str("NameMupadFile"),Str("NameMapleFile")) mupad2maple("file1","file2") translates file1(MuPAD) to file2(Maple). - See also: 1/ mupad2xcas - + See also: 1/ mupad2xcas + ''' return GiacMethods['mupad2maple'](self,*args) @@ -11194,8 +11194,8 @@ cdef class GiacMethods_base: Help for mupad2xcas: mupad2xcas(Str("NameMupadFile"),Str("NameXcasFile")) mupad2xcas("file1","file2") translates file1(MuPAD) to file2(Xcas). - See also: 1/ mupad2maple - + See also: 1/ mupad2maple + ''' return GiacMethods['mupad2xcas'](self,*args) @@ -11204,10 +11204,10 @@ cdef class GiacMethods_base: Help for mycielski: mycielski(Graph(G)) Returns the Mycielskian of undirected graph G. - See also: 1/ chromatic_number 2/ number_of_triangles + See also: 1/ chromatic_number 2/ number_of_triangles Ex1:mycielski(graph("petersen")) Ex2: is_isomorphic(mycielski(mycielski(path_graph(2))),graph("grotzsch")) - + ''' return GiacMethods['mycielski'](self,*args) @@ -11216,9 +11216,9 @@ cdef class GiacMethods_base: Help for nCr: nCr(Intg(n),Intg(r)) comb(n,r)=number of combinations of r objects taken among n : n!/(r!(n-r)!) (If n<0 comb(n,r)=n(n-1)..(n-r+1)/r!). - See also: 1/ factorial 2/ perm + See also: 1/ factorial 2/ perm Ex1:nCr(4,2) - + ''' return GiacMethods['nCr'](self,*args) @@ -11227,11 +11227,11 @@ cdef class GiacMethods_base: Help for nDeriv: nDeriv(Expr(Xpr),Var(Var),[Real(h)]) Returns an approximation of the derivative number at a point: (Xpr(var+h)-Xpr(var-h))/(2*h) (by default h=0.001). - See also: 1/ avgRC + See also: 1/ avgRC Ex1:nDeriv(f(x),x,h) Ex2:nDeriv(x^2,x,0.1) Ex3:nDeriv(x^2,x) - + ''' return GiacMethods['nDeriv'](self,*args) @@ -11240,11 +11240,11 @@ cdef class GiacMethods_base: Help for nInt: nInt(Expr(f(x)),Var(x),Real(a),Real(b)) Returns the approximate value of integrate(f(x),x,a,b) by Romberg's method. - See also: 1/ integrate 2/ gaussquad + See also: 1/ integrate 2/ gaussquad Ex1:nInt(exp(x^2),x,0,1) Ex2:nInt(x^2,x,0,1) Ex3:nInt(exp(-x^2),x,-1,1) - + ''' return GiacMethods['nInt'](self,*args) @@ -11253,9 +11253,9 @@ cdef class GiacMethods_base: Help for nPr: nPr(Intg(n),Intg(p)) perm(n,p)=number of arrangements of p objects taken among n : n!/(n-p)! - See also: 1/ comb 2/ factorial + See also: 1/ comb 2/ factorial Ex1:nPr(4,2) - + ''' return GiacMethods['nPr'](self,*args) @@ -11264,10 +11264,10 @@ cdef class GiacMethods_base: Help for nSolve: nSolve(Expr,Var,[Guess or Interval],[Method]) Numerical solution of an equation or a system of equations. - See also: 1/ solve 2/ fsolve 3/ csolve + See also: 1/ solve 2/ fsolve 3/ csolve Ex1:nSolve(cos(x)=x,x) Ex2:nSolve(cos(x)=x,x=1.3) - + ''' return GiacMethods['nSolve'](self,*args) @@ -11276,10 +11276,10 @@ cdef class GiacMethods_base: Help for ncols: ncols(Mtrx) Number of columns of a matrix. - See also: 1/ rowdim + See also: 1/ rowdim Ex1:ncols([[1,2,3],[4,5,6]]) Ex2:ncols([[1,2],[3,4],[5,6]]) - + ''' return GiacMethods['ncols'](self,*args) @@ -11288,11 +11288,11 @@ cdef class GiacMethods_base: Help for negbinomial: negbinomial(Intg(n),Intg(k),Real(p in 0..1)) Returns comb(n+k-1,k)*p^k*(1-p)^n. - See also: 1/ negbinomial_cdf 2/ negbinomial_icdf 3/ binomial + See also: 1/ negbinomial_cdf 2/ negbinomial_icdf 3/ binomial Ex1:negbinomial(4,0,0.5) Ex2:negbinomial(4,2,0.6) Ex3:negbinomial(4,6,0.3) - + ''' return GiacMethods['negbinomial'](self,*args) @@ -11301,11 +11301,11 @@ cdef class GiacMethods_base: Help for negbinomial_cdf: negbinomial_cdf(Intg(n),Real(p),Real(x),[Real(y)]) Returns Proba(X<=x) or Proba(x<=X<=y) when X follows the negbinomial(n,p) law. - See also: 1/ negbinomial 2/ negbinomial_icdf + See also: 1/ negbinomial 2/ negbinomial_icdf Ex1:negbinomial_cdf(4,0.5,2) Ex2:negbinomial_cdf(4,0.1,2) Ex3:negbinomial_cdf(4,0.5,2,3) - + ''' return GiacMethods['negbinomial_cdf'](self,*args) @@ -11314,10 +11314,10 @@ cdef class GiacMethods_base: Help for negbinomial_icdf: negbinomial_icdf(Intg(n),Real(p),Real(t)) Returns h such as Proba(X<=h)=t when X follows the negbinomial(n,p) law. - See also: 1/ negbinomial 2/ negbinomial_cdf + See also: 1/ negbinomial 2/ negbinomial_cdf Ex1:negbinomial_icdf(4,0.5,0.68) Ex2:negbinomial_icdf(4,0.1,0.95) - + ''' return GiacMethods['negbinomial_icdf'](self,*args) @@ -11326,9 +11326,9 @@ cdef class GiacMethods_base: Help for neighbors: neighbors(Graph(G),[Vrtx(v)]) Returns the list of vertices adjacent to vertex v of G. If v is omitted, a list of adjacency lists of all vertices in G is returned. - See also: 1/ adjacency_matrix 2/ vertex_degree 3/ in_degree 3/ out_degree + See also: 1/ adjacency_matrix 2/ vertex_degree 3/ in_degree 3/ out_degree Ex1:neighbors(digraph(trail(1,2,3,4,5,6,4,7,8,2)),4) - + ''' return GiacMethods['neighbors'](self,*args) @@ -11337,9 +11337,9 @@ cdef class GiacMethods_base: Help for network_transitivity: network_transitivity(Graph(G)) Returns the transitivity (also called triangle density or global clustering coefficient) of G. - See also: 1/ clustering_coefficient 2/ number_of_triangles + See also: 1/ clustering_coefficient 2/ number_of_triangles Ex1:network_transitivity(graph(%{[1,2],[2,3],[2,4],[3,4],[4,1]%})) - + ''' return GiacMethods['network_transitivity'](self,*args) @@ -11348,9 +11348,9 @@ cdef class GiacMethods_base: Help for newList: newList(Intg(n)) Returns the list made with n zeros. - See also: 1/ newMat 2/ makelist + See also: 1/ newMat 2/ makelist Ex1:newList(4) - + ''' return GiacMethods['newList'](self,*args) @@ -11359,9 +11359,9 @@ cdef class GiacMethods_base: Help for newMat: newMat(Intg(n),Intg(p)) Returns the list with n rows and p columns, made with zeros. - See also: 1/ newList 2/ makemat + See also: 1/ newList 2/ makemat Ex1:newMat(2,3) - + ''' return GiacMethods['newMat'](self,*args) @@ -11370,12 +11370,12 @@ cdef class GiacMethods_base: Help for newton: newton(Expr(f(x)),Var(x),[ApproxVal(a),NumIter(p)]) newton(f(x),x,a,p)=one root of f(x) by Newton method beginning with a and p iterations (by default p=20). - See also: 1/ rootof + See also: 1/ rootof Ex1:newton(x^2-2,x) Ex2:newton(x^2-2,x,2) Ex3:newton(x^2-2,x,-2) Ex4:newton(x^2-2,x,2,5,1e-7) - + ''' return GiacMethods['newton'](self,*args) @@ -11384,14 +11384,14 @@ cdef class GiacMethods_base: Help for newton_solver: newton_solver(Opt) Argument for fsolve giving the method for solving a numerical equation. - See also: 1/ fsolve + See also: 1/ fsolve Ex1: fsolve(cos(x)=x,x,0..1,bisection_solver) Ex2: fsolve(cos(x)=x,x,0..1,brent_solver) Ex3: fsolve(cos(x)=x,x,0..1,falsepos_solver) Ex4: fsolve(cos(x)=x,x,0,newton_solver) Ex5: fsolve(cos(x)=x,x,0,secant_solver) Ex6: fsolve(cos(x)=x,x,0,steffenson_solver) - + ''' return GiacMethods['newton_solver'](self,*args) @@ -11400,14 +11400,14 @@ cdef class GiacMethods_base: Help for newtonj_solver: newtonj_solver(Opt) Argument for fsolve giving the method for solving a system of numerical equations. - See also: 1/ fsolve + See also: 1/ fsolve Ex1: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],dnewton_solver) Ex2: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybrid_solver) Ex3: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybrids_solver) Ex4: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybridj_solver) Ex5: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybridsj_solver) Ex6: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],newtonj_solver) - + ''' return GiacMethods['newtonj_solver'](self,*args) @@ -11416,10 +11416,10 @@ cdef class GiacMethods_base: Help for nextperm: nextperm(Intg(n)) Returns the next permutation with the lexicographic order. - See also: 1/ prevperm 2/ is_permu + See also: 1/ prevperm 2/ is_permu Ex1:nextperm([0,2,1,3]) Ex2:nextperm([0,3,2,1]) - + ''' return GiacMethods['nextperm'](self,*args) @@ -11428,10 +11428,10 @@ cdef class GiacMethods_base: Help for nextprime: nextprime(Intg(a)) Next prime or pseudo-prime after a given integer. - See also: 1/ prevprime 2/ is_prime 3/ ithprime + See also: 1/ prevprime 2/ is_prime 3/ ithprime Ex1:nextprime(9856989898990) Ex2:nextprime(97160249868928888261606009) - + ''' return GiacMethods['nextprime'](self,*args) @@ -11440,7 +11440,7 @@ cdef class GiacMethods_base: Help for nlpsolve: nlpsolve(objective, [constr], [bd], [opts]) Solves a nonlinear programming problem of optimizing the objective obj under constraints constr (list of equations and/or inequations) and within bounds bd (sequence of x=a..b) with optional options (for example setting an initial point). - See also: 1/ lpsolve 2/ fsolve 3/ fMin 4/ fMax + See also: 1/ lpsolve 2/ fsolve 3/ fMin 4/ fMax Ex1:nlpsolve((x1-10)^3+(x2-20)^3,[(x1-5)^2+(x2-5)^2>=100,(x2-5)^2+(x1-6)^2<=82.81],nlp_initialpoint=[x1=20.1,x2=5.84]) Ex2:nlpsolve(sin(x1+x2)+(x1-x2)^2-1.5x1+2.5x2+1,x1=-1.5..4,x2=-3..3) Ex3:nlpsolve(ln(1+x1^2)-x2,[(1+x1^2)^2+x2^2=4]) @@ -11448,10 +11448,10 @@ cdef class GiacMethods_base: Ex5:nlpsolve(-x1*x2*x3,[72-x1-2x2-2x3>=0],x1=0..20,x2=0..11,x3=0..42) Ex6:nlpsolve(2-1/120*x1*x2*x3*x4*x5,[x1<=1,x2<=2,x3<=3,x4<=4,x5<=5],assume=nlp_nonnegative) Ex7:nlpsolve(sin(x)/x,x=1..30) - Ex8:nlpsolve(x^3+2x*y-2y^2,x=-10..10,y=-10..10,nlp_initialpoint=[x=3,y=4],maximize) + Ex8:nlpsolve(x^3+2x*y-2y^2,x=-10..10,y=-10..10,nlp_initialpoint=[x=3,y=4],maximize) Ex9:nlpsolve(w^3*(v-w)^2+(w-x-1)^2+(x-y-2)^2+(y-z-3)^2,[w+x+y+z<=5,3z+2v=3],assume=nlp_nonnegative) Ex10:nlpsolve(sin(x)*Psi(x),x=1..20,nlp_initialpoint=[x=16]) - + ''' return GiacMethods['nlpsolve'](self,*args) @@ -11461,7 +11461,7 @@ cdef class GiacMethods_base: nodisp(Expr) Displays Done in place of a value. Ex1:nodisp(A:=ranm(50,50)) - + ''' return GiacMethods['nodisp'](self,*args) @@ -11470,10 +11470,10 @@ cdef class GiacMethods_base: Help for non_recursive_normal: non_recursive_normal(Expr) Simplifies the expressions, but without simplification inside of non-rational expressions. - See also: 1/ normal + See also: 1/ normal Ex1:non_recursive_normal(sin(x+x)+sin(2*x)+x+x) Ex2:non_recursive_normal(sin(2*x)+sin(2*x)+x+x) - + ''' return GiacMethods['non_recursive_normal'](self,*args) @@ -11482,9 +11482,9 @@ cdef class GiacMethods_base: Help for nop: nop(NULL) No OPeration instruction. - See also: 1/ + See also: 1/ Ex1:nop() - + ''' return GiacMethods['nop'](self,*args) @@ -11493,11 +11493,11 @@ cdef class GiacMethods_base: Help for nops: nops(Lst or Str or Seq) Returns the size of a list, a string or a sequence. - See also: 1/ sizes 2/ dim 3/ degree + See also: 1/ sizes 2/ dim 3/ degree Ex1:nops([1,2,3]) Ex2:nops("bonjour") Ex3:nops(1,2,3) - + ''' return GiacMethods['nops'](self,*args) @@ -11506,12 +11506,12 @@ cdef class GiacMethods_base: Help for norm: norm(Vect or Mtrx) Returns the l2 norm of a vector = sqrt(x1^2+x2^2+...xn^2) or matrix norm induced by l2 norm. - See also: 1/ maxnorm 2/ l1norm + See also: 1/ maxnorm 2/ l1norm Ex1:norm([1,2]) Ex2:norm([1,2,3,-4]) Ex3:norm([[1,2],[3,-4]]) Ex4:norm([[1,2,3],[3,-9,6],[4,5,6]]) - + ''' return GiacMethods['norm'](self,*args) @@ -11520,11 +11520,11 @@ cdef class GiacMethods_base: Help for normal: normal(Expr) Simplifies the expression. - See also: 1/ simplify + See also: 1/ simplify Ex1:normal(2*x+y=1) Ex2:normal(2*x*2) Ex3:normal((2*x+1)^2) - + ''' return GiacMethods['normal'](self,*args) @@ -11533,11 +11533,11 @@ cdef class GiacMethods_base: Help for normal_cdf: normal_cdf(Real(mu),Real(sigma),Real(x0),[Real(y0)]) Returns the probability that a Normal random variable is less than x0 or between x0 and y0 (mu is the mean and sigma the standard deviation). - See also: 1/ UTPN 2/ normal_icdf 3/ normald + See also: 1/ UTPN 2/ normal_icdf 3/ normald Ex1:normal_cdf(1.96) Ex2:normal_cdf(1,2,2.96*sqrt(2)) Ex3:normal_cdf(1,2,1.4*sqrt(2),2.96*sqrt(2)) - + ''' return GiacMethods['normal_cdf'](self,*args) @@ -11546,10 +11546,10 @@ cdef class GiacMethods_base: Help for normal_icdf: normal_icdf(Real(mu),Real(sigma),Real(p)) Returns h such as the probability that a Normal random variable is less than h is p (mu is the mean and sigma the standard deviation and 0<=p<=1). - See also: 1/ normal_cdf 2/ normald + See also: 1/ normal_cdf 2/ normald Ex1:normal_icdf(0.95) Ex2:normal_icdf(1,2,0.95) - + ''' return GiacMethods['normal_icdf'](self,*args) @@ -11558,12 +11558,12 @@ cdef class GiacMethods_base: Help for normald: normald(Real(mu),Real(sigma),Real(x0)) Returns the probability density of the Normal law (mu is the mean and sigma the standard deviation). - See also: 1/ normal_cdf 2/ normal_icdf 3/ randvector 4/ ranm + See also: 1/ normal_cdf 2/ normal_icdf 3/ randvector 4/ ranm Ex1:normald(1) Ex2:normald(1,2,3.5) Ex3: randvector(3,normald,1,0.5) Ex4: ranm(4,3,normald,1,0.5) - + ''' return GiacMethods['normald'](self,*args) @@ -11572,11 +11572,11 @@ cdef class GiacMethods_base: Help for normald_cdf: normald_cdf(Real(mu),Real(sigma),Real(x0),[Real(y0)]) Returns the probability that a Normal random variable is less than x0 or between x0 and y0 (mu is the mean and sigma the standard deviation). - See also: 1/ UTPN 2/ normal_icdf 3/ normald + See also: 1/ UTPN 2/ normal_icdf 3/ normald Ex1:normald_cdf(1.96) Ex2:normald_cdf(1,2,2.96*sqrt(2)) Ex3:normald_cdf(1,2,1.4*sqrt(2),2.96*sqrt(2)) - + ''' return GiacMethods['normald_cdf'](self,*args) @@ -11585,10 +11585,10 @@ cdef class GiacMethods_base: Help for normald_icdf: normald_icdf(Real(mu),Real(sigma),Real(p)) Returns h such as the probability that a Normal random variable is less than h is p (mu is the mean and sigma the standard deviation and 0<=p<=1). - See also: 1/ normal_cdf 2/ normald + See also: 1/ normal_cdf 2/ normald Ex1:normald_icdf(0.95) Ex2:normald_icdf(1,2,0.95) - + ''' return GiacMethods['normald_icdf'](self,*args) @@ -11597,12 +11597,12 @@ cdef class GiacMethods_base: Help for normalize: normalize(Lst||Cplx) Returns the vector divided by its l2norm. It is also an option for plotfield. - See also: 1/ l2norm + See also: 1/ l2norm Ex1:normalize(3+4*i) Ex2:normalize([3,4]) Ex3: fieldplot(-t*y,[t,y],normalize) Ex4: fieldplot(-t*y,[t,y],normalize,xstep=0.5,ystep=0.5) - + ''' return GiacMethods['normalize'](self,*args) @@ -11611,10 +11611,10 @@ cdef class GiacMethods_base: Help for normalt: normalt(Lst,Real,[Real],Fnc,[Real]) Z-Test/normal law: arg1=[success,trial] or [mean,sample size] or data, arg2=proportion or data, arg3 optional if data=sigma, arg4 alternative '!=' or '>' or '<', arg5 optional alpha confidence level. - See also: 1/ studentt 2/ chisquaret 3/ kolmogorovt + See also: 1/ studentt 2/ chisquaret 3/ kolmogorovt Ex1:normalt([10,30],.5,.02,'!=',0.1) Ex2:normalt([0.48,50],0.5,0.1,'<') - + ''' return GiacMethods['normalt'](self,*args) @@ -11623,10 +11623,10 @@ cdef class GiacMethods_base: Help for normalvariate: normalvariate(Real(mu),Real(sigma)) Returns a random real with normal distribution N(mu,sigma). - See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randpoisson 8/ randgeometric 9/ randmultinomial + See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randpoisson 8/ randgeometric 9/ randmultinomial Ex1:normalvariate(0,1) Ex2:normalvariate(2,1) - + ''' return GiacMethods['normalvariate'](self,*args) @@ -11635,9 +11635,9 @@ cdef class GiacMethods_base: Help for nprimes: nprimes(Intg(n)) Counts the number of primes less than n. - See also: 1/ ithprime 2/ prevprime 3/ nextprime 4/ isprime + See also: 1/ ithprime 2/ prevprime 3/ nextprime 4/ isprime Ex1:nprimes(20) - + ''' return GiacMethods['nprimes'](self,*args) @@ -11646,10 +11646,10 @@ cdef class GiacMethods_base: Help for nrows: nrows(Mtrx) Number of rows of a matrix. - See also: 1/ ncols + See also: 1/ ncols Ex1:nrows([[1,2,3],[4,5,6]]) Ex2:nrows([[1,2],[3,4],[5,6]]) - + ''' return GiacMethods['nrows'](self,*args) @@ -11658,9 +11658,9 @@ cdef class GiacMethods_base: Help for nuage_points: nuage_points(Mtrx) Draws for k=0..nrows, the points (xk,yk) where xk=element row k column 0 and yk=element row k column j (j=1..ncols). - See also: 1/ polygonplot 2/ polygonscatterplot 3/ listplot + See also: 1/ polygonplot 2/ polygonscatterplot 3/ listplot Ex1:nuage_points([[1,2,3],[2,0,1],[-1,2,3]]) - + ''' return GiacMethods['nuage_points'](self,*args) @@ -11669,10 +11669,10 @@ cdef class GiacMethods_base: Help for nullspace: nullspace(Mtrx) Kernel of a linear map with matrix M. - See also: 1/ image 2/ rref 3/ Nullspace + See also: 1/ image 2/ rref 3/ Nullspace Ex1:nullspace([[1,2],[3,6]]) Ex2:nullspace([[1,2,3],[1,3,6],[2,5,9]]) - + ''' return GiacMethods['nullspace'](self,*args) @@ -11681,9 +11681,9 @@ cdef class GiacMethods_base: Help for number_of_edges: number_of_edges(Graph(G)) Returns the number of edges/arcs of G. - See also: 1/ edges 2/ number_of_vertices + See also: 1/ edges 2/ number_of_vertices Ex1:number_of_edges(complete_graph(5)) - + ''' return GiacMethods['number_of_edges'](self,*args) @@ -11692,10 +11692,10 @@ cdef class GiacMethods_base: Help for number_of_spanning_trees: number_of_spanning_trees(Graph(G)) Returns the number of spanning trees in undirected graph G. - See also: 1/ spanning_tree + See also: 1/ spanning_tree Ex1:number_of_spanning_trees(complete_graph(4)) Ex2:number_of_spanning_trees(graph(trail(1,2,3,4,1,3))) - + ''' return GiacMethods['number_of_spanning_trees'](self,*args) @@ -11704,9 +11704,9 @@ cdef class GiacMethods_base: Help for number_of_triangles: number_of_triangles(Graph(G)) Returns the number of 3-cliques if G is undirected resp. the number of directed cycles on 3 vertices if G is directed. - See also: 1/ is_clique 2/ maximal_clique + See also: 1/ is_clique 2/ maximal_clique Ex1:number_of_triangles(graph("tetrahedron")) - + ''' return GiacMethods['number_of_triangles'](self,*args) @@ -11715,9 +11715,9 @@ cdef class GiacMethods_base: Help for number_of_vertices: number_of_vertices(Graph(G)) Returns the number of vertices of G. - See also: 1/ graph_vertices 2/ number_of_edges + See also: 1/ graph_vertices 2/ number_of_edges Ex1:number_of_vertices(graph("petersen")) - + ''' return GiacMethods['number_of_vertices'](self,*args) @@ -11726,11 +11726,11 @@ cdef class GiacMethods_base: Help for numer: numer(Frac(a/b) or RatFrac) Returns the numerator of the simplified fraction. - See also: 1/ getNum 2/ getDenom 3/ denom 4/ f2nd + See also: 1/ getNum 2/ getDenom 3/ denom 4/ f2nd Ex1:numer(25/15) Ex2:numer((x^3-1)/(x^2-1)) Ex3:numer(1+(x^3-1)/x^2) - + ''' return GiacMethods['numer'](self,*args) @@ -11739,10 +11739,10 @@ cdef class GiacMethods_base: Help for octahedron: octahedron(Pnt(A),Pnt(B),Pnt(C)) Draws an octahedron with center A, vertex B and such that the plane ABC contains 4 vertices. - See also: 1/ icosahedron 2/ dodecahedron 3/ cube 4/ tetrahedron + See also: 1/ icosahedron 2/ dodecahedron 3/ cube 4/ tetrahedron Ex1:octahedron([0,0,0],[0,0,5],[0,5,0]) Ex2:octahedron(evalf([0,0,0],[3,2,4],[1,1,0])) - + ''' return GiacMethods['octahedron'](self,*args) @@ -11751,10 +11751,10 @@ cdef class GiacMethods_base: Help for odd: odd(Intg(n)) Returns 1 if the integer is odd, else returns 0. - See also: 1/ even + See also: 1/ even Ex1:odd(6) Ex2:odd(1251) - + ''' return GiacMethods['odd'](self,*args) @@ -11763,10 +11763,10 @@ cdef class GiacMethods_base: Help for odd_girth: odd_girth(Graph(G)) Returns the length of the shortest odd cycle in the undirected unweighted graph G. - See also: 1/ girth + See also: 1/ girth Ex1:odd_girth(graph("petersen")) Ex2:odd_girth(hypercube_graph(3)) - + ''' return GiacMethods['odd_girth'](self,*args) @@ -11775,9 +11775,9 @@ cdef class GiacMethods_base: Help for odd_graph: odd_graph(Intg(n)) Returns the odd graph of order n as Kneser graph K(2n-1,n-1), where n<=8. - See also: 1/ kneser_graph + See also: 1/ kneser_graph Ex1:odd_graph(3) - + ''' return GiacMethods['odd_graph'](self,*args) @@ -11786,7 +11786,7 @@ cdef class GiacMethods_base: Help for odeplot: odeplot(Expr,VectVar,VectInitCond) odeplot(f(t,y),[t,y],[t0,y0]) draws the solution of y'=f(t,y) and y(t0)=y0 or of the system [x'=g(t,x,y),y'=h(t,x,y)] with x(t0)=x0 and y(t0)=y0. - See also: 1/ interactive_plotode 2/ fieldplot 3/ odesolve 4/ desolve + See also: 1/ interactive_plotode 2/ fieldplot 3/ odesolve 4/ desolve Ex1:odeplot(sin(t*y),[t,y],[0,1]) Ex2:odeplot(sin(t*y),[t=-10..10,y],[0,1]) Ex3:odeplot(sin(t*y),[t=-3..3,y],[0,1],tstep=0.1,color=vert) @@ -11794,7 +11794,7 @@ cdef class GiacMethods_base: Ex5:odeplot([x-0.3*x*y, 0.3*x*y-y], [t,x,y],[0,0.3,0.7],plan) Ex6:odeplot([-y+b,-1+(x-a)^2+(y-b)^2],[t=-3..3,x,y],[0,a+1,b+0.5],plan) Ex7:odeplot(5*[-y,x],[t=0..1,x,y],[0,0.3,0.7],tstep=0.05,plan) - + ''' return GiacMethods['odeplot'](self,*args) @@ -11803,13 +11803,13 @@ cdef class GiacMethods_base: Help for odesolve: odesolve(Expr,VectVar,VectInitCond,FinalVal,[tstep=Val,curve]) odesolve(f(t,y),[t,y],[t0,y0],t1)=odesolve(t0..t1,f,y0)=y(t1) for y approx sol of y'=f(t,y) and y(t0)=y0 with y=vector for systems. - See also: 1/ plotode 2/ plotfield 3/ interactive_plotode 4/ desolve + See also: 1/ plotode 2/ plotfield 3/ interactive_plotode 4/ desolve Ex1:odesolve(sin(t*y),[t,y],[0,1],2) Ex2:odesolve(0..2,(t,y)->sin(t*y),1) Ex3:odesolve(0..pi,(t,v)->{[-v[1],v[0]]},[0,1]) Ex4:odesolve(sin(t*y),t=0..2,y,1,tstep=0.5) Ex5:odesolve(sin(t*y),t=0..2,y,1,tstep=0.5,curve) - + ''' return GiacMethods['odesolve'](self,*args) @@ -11818,13 +11818,13 @@ cdef class GiacMethods_base: Help for op: op(Op or Fnc) Returns the arguments of an operator as a sequence. - See also: 1/ sommet 2/ quote 3/ makesuite + See also: 1/ sommet 2/ quote 3/ makesuite Ex1:op(quote(gcd(45,126))) Ex2:op('gcd(45,126)') Ex3:op('1+2')[1] Ex4:op([1,2,3]) Ex5:op(set[1,2,3]) - + ''' return GiacMethods['op'](self,*args) @@ -11833,10 +11833,10 @@ cdef class GiacMethods_base: Help for open_polygon: open_polygon(LstPnt||LstCplx) Returns and draws the polygonal line where its vertices are the element of l. - See also: 1/ isopolygon 2/ quadrilateral + See also: 1/ isopolygon 2/ quadrilateral Ex1:open_polygon(i,1+i,2-i,-1,-1+i/2) Ex2:open_polygon(point(0,0,0),point(3,3,3),point(0,0,3),point(3,0,0)) - + ''' return GiacMethods['open_polygon'](self,*args) @@ -11845,11 +11845,11 @@ cdef class GiacMethods_base: Help for ord: ord(Char||LstChar) Returns the ASCII code of a character or of the first character of a string. - See also: 1/ asc 2/ char + See also: 1/ asc 2/ char Ex1:ord("A") Ex2:ord("ABC") Ex3:ord(["a","b","c"]) - + ''' return GiacMethods['ord'](self,*args) @@ -11860,7 +11860,7 @@ cdef class GiacMethods_base: Returns element order of g in (Z/nZ)^* or in a finite field. Ex1:order(3 % 7) Ex2: GF(3,5,g); order(g^2+g+1); - + ''' return GiacMethods['order'](self,*args) @@ -11869,10 +11869,10 @@ cdef class GiacMethods_base: Help for order_size: order_size(Expr) Remainder (O term) of a series expansion: limit(x^a*order_size(x),x=0)=0 if a>0. - See also: 1/ series + See also: 1/ series Ex1:order_size(x) Ex2: limit(sqrt(x)*order_size(x),x=0) - + ''' return GiacMethods['order_size'](self,*args) @@ -11881,12 +11881,12 @@ cdef class GiacMethods_base: Help for ordinate: ordinate(Pnt or Vect) Returns the ordinate of a point or a vector. - See also: 1/ abscissa 2/ affix 3/ cote 4/ coordinates + See also: 1/ abscissa 2/ affix 3/ cote 4/ coordinates Ex1:ordinate(point(1+2*i)) Ex2:ordinate(point(i)-point(1+2*i)) Ex3:ordinate(-1-i) Ex4:ordinate(point(1,2,3)) - + ''' return GiacMethods['ordinate'](self,*args) @@ -11895,11 +11895,11 @@ cdef class GiacMethods_base: Help for orthocenter: orthocenter((Pnt or Cplx),(Pnt or Cplx),(Pnt or Cplx)) Shows the orthocenter of a triangle or of the triangle made with 3 points. - See also: 1/ altitude 2/ triangle + See also: 1/ altitude 2/ triangle Ex1:orthocenter(1+i,2,i) Ex2:orthocenter(point(1+i),point(2),point(i)) Ex3:orthocenter(triangle(0,1,1+i)) - + ''' return GiacMethods['orthocenter'](self,*args) @@ -11908,10 +11908,10 @@ cdef class GiacMethods_base: Help for orthogonal: orthogonal((Pnt),(Line or Plan)) orthogonal(A,line(B,C)) draws the orthogonal plane of line BC through A and orthogonal(A,plane(B,C,D)) draws the orthogonal line of plane(B,C,D) through A. - See also: 1/ altitude 2/ perpendicular + See also: 1/ altitude 2/ perpendicular Ex1:orthogonal(point(0,0,0),line(point(1,0,0),point(0,1,0))) Ex2:orthogonal(point(0,0,0),plane(point(1,0,0),point(0,1,0),point(0,0,1))) - + ''' return GiacMethods['orthogonal'](self,*args) @@ -11920,14 +11920,14 @@ cdef class GiacMethods_base: Help for osculating_circle: osculating_circle(Curve,Point) Osculating circle at point M to the curve C. - See also: 1/ curvature 2/ evolute + See also: 1/ curvature 2/ evolute Ex1:osculating_circle(plot(x^2),point(1,1)) Ex2:osculating_circle([5*cos(t),5*sin(t)],t,0) Ex3:osculating_circle([t,t^2],t) Ex4:osculating_circle([t,t^2],t,1) Ex5:osculating_circle([3*exp(t/2)*cos(t),3*exp(t/2)*sin(t)],t) Ex6:osculating_circle([3*exp(t/2)*cos(t),3*exp(t/2)*sin(t)],t,7) - + ''' return GiacMethods['osculating_circle'](self,*args) @@ -11936,9 +11936,9 @@ cdef class GiacMethods_base: Help for p1oc2: p1oc2(Permut,Cycle) Returns the permutation product of p1 and c2. - See also: 1/ c1op2 2/ p1op2 + See also: 1/ c1op2 2/ p1op2 Ex1:p1oc2([0,2,1],[2,1,3]) - + ''' return GiacMethods['p1oc2'](self,*args) @@ -11947,9 +11947,9 @@ cdef class GiacMethods_base: Help for p1op2: p1op2(Permut,Permut) Returns the permutation product of p1 and p2. - See also: 1/ c1op2 2/ p1oc2 + See also: 1/ c1op2 2/ p1oc2 Ex1:p1op2([0,2,1],[1,0,3,2]) - + ''' return GiacMethods['p1op2'](self,*args) @@ -11961,7 +11961,7 @@ cdef class GiacMethods_base: Ex1:pa2b2(17) Ex2:pa2b2(209) Ex3:pa2b2(229) - + ''' return GiacMethods['pa2b2'](self,*args) @@ -11970,9 +11970,9 @@ cdef class GiacMethods_base: Help for pade: pade(Expr(Xpr), Var(x), (Intg(n) || Poly(N)), Intg(p)) Pade approximation P/Q=Xpr mod x^(n+1) or mod N with degree(P)3,x^20 (by default a=1) to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ bartlett_hann_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window + See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ bartlett_hann_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window Ex1: scatterplot(poisson_window(randvector(1000,0..1),0.5)) - + ''' return GiacMethods['poisson_window'](self,*args) @@ -12932,10 +12932,10 @@ cdef class GiacMethods_base: Help for polar: polar(Crcle,Pnt or Cplxe(A)) Returns the line of the conjugated points of A with respect to the circle. - See also: 1/ pole 2/ is_conjugate + See also: 1/ pole 2/ is_conjugate Ex1:polar(circle(0,1),point(1+i)/2) Ex2:polar(circle(0,1),point(1+i)) - + ''' return GiacMethods['polar'](self,*args) @@ -12944,12 +12944,12 @@ cdef class GiacMethods_base: Help for polar_coordinates: polar_coordinates(Pnt or Cplx or LstRectCoord) Returns the list of the norm and of the argument of the affix of a point (for 2D) or of a complex number or of the list of rectangular coordinates. - See also: 1/ abscissapoint 2/ ordinate 3/ rectangular_coordinates 4/ polar_point + See also: 1/ abscissapoint 2/ ordinate 3/ rectangular_coordinates 4/ polar_point Ex1:polar_coordinates(point(1+2*i)) Ex2:polar_coordinates(-1-i) Ex3:polar_coordinates([-1,2]) Ex4:polar_coordinates(point(1+2*i)-point(-1+i)) - + ''' return GiacMethods['polar_coordinates'](self,*args) @@ -12958,10 +12958,10 @@ cdef class GiacMethods_base: Help for polar_point: polar_point(Real(r),Real(t)) Returns the point (for 2D) with the arguments r and t as polar coordinates (i.e. with r*exp(i*t) as affix). - See also: 1/ abscissa 2/ ordinate 3/ polar_coordinates 4/ rectangular_coordinates 5/ point + See also: 1/ abscissa 2/ ordinate 3/ polar_coordinates 4/ rectangular_coordinates 5/ point Ex1:polar_point(1,pi/4) Ex2:polar_point(2,-pi/3) - + ''' return GiacMethods['polar_point'](self,*args) @@ -12970,10 +12970,10 @@ cdef class GiacMethods_base: Help for polarplot: polarplot(Expr,Var,VarMin,VarMax) plotpolar(f(x),x,a,b) draws the polar curve r=f(x) for x in [a,b]. - See also: 1/ plotparam 2/ plotfunc 3/ plotpolar + See also: 1/ plotparam 2/ plotfunc 3/ plotpolar Ex1:polarplot(sin(2*x),x,0,pi) Ex2:polarplot(sin(2*x),x,0,pi,tstep=0.1) - + ''' return GiacMethods['polarplot'](self,*args) @@ -12982,10 +12982,10 @@ cdef class GiacMethods_base: Help for pole: pole(Crcle,Line) Returns the point having the line as polar with respect to the circle . - See also: 1/ polar 2/ is_conjugate + See also: 1/ polar 2/ is_conjugate Ex1:pole(circle(0,1),line(i,1)) Ex2:pole(circle(0,1),line((1+i),2)) - + ''' return GiacMethods['pole'](self,*args) @@ -12994,12 +12994,12 @@ cdef class GiacMethods_base: Help for poly2symb: poly2symb(Lst,Var) Gives the polynomial (or its value) : the first argument is the vector of coefficients and the second argument is the variable (by default x). - See also: 1/ e2r 2/ symb2poly + See also: 1/ e2r 2/ symb2poly Ex1:poly2symb([1,2,3]) Ex2:poly2symb([1,2,3],x) Ex3:poly2symb([1,2,3],-1) Ex4:poly2symb([1,2,-1],y) - + ''' return GiacMethods['poly2symb'](self,*args) @@ -13008,10 +13008,10 @@ cdef class GiacMethods_base: Help for polyEval: polyEval(Vect,Real(x0)) Evaluates at a point x0, a polynomial given by its coefficients. - See also: 1/ proot 2/ pcoeff + See also: 1/ proot 2/ pcoeff Ex1:polyEval([1,0,-2],1) Ex2:polyEval([1,2,-25,-26,120],8) - + ''' return GiacMethods['polyEval'](self,*args) @@ -13020,10 +13020,10 @@ cdef class GiacMethods_base: Help for polygon: polygon(LstPnt||LstCplx) Returns and draws the polygon where its vertices are the elements of l. - See also: 1/ isopolygon 2/ quadrilateral 3/ convexhull 4/ hexagon + See also: 1/ isopolygon 2/ quadrilateral 3/ convexhull 4/ hexagon Ex1:polygon(i,1+i,2-i,-1,-1+i/2) Ex2:polygon(point(0,0,0),point(3,3,3),point(0,0,3),point(3,0,0)) - + ''' return GiacMethods['polygon'](self,*args) @@ -13032,11 +13032,11 @@ cdef class GiacMethods_base: Help for polygone_rempli: polygone_rempli(Intg(n)) The argument is an integer <-1 which gives the number of previous turtle positions drawing a polygon and created this full polygon. - See also: 1/ + See also: 1/ Ex1: repete(4,avance 40,tourne_droite);polygone_rempli -8 Ex2: repete(3,avance 40,tourne_droite 120);polygone_rempli -6 Ex3: repete(3,avance 40,avance 40,tourne_droite 120);polygone_rempli -9 - + ''' return GiacMethods['polygone_rempli'](self,*args) @@ -13045,9 +13045,9 @@ cdef class GiacMethods_base: Help for polygonplot: polygonplot(Mtrx) Draws the polygons joining for j fixed and for k=0..nrows, the points (xk,yk) where xk=element row k column 0 and yk=element row k column j, after the xk are sorted (we obtain ncols-1 polygons). - See also: 1/ scatterplot 2/ listplot 3/ polygonscatterplot + See also: 1/ scatterplot 2/ listplot 3/ polygonscatterplot Ex1:polygonplot([[1,2,3],[2,0,1],[-1,2,3]]) - + ''' return GiacMethods['polygonplot'](self,*args) @@ -13056,9 +13056,9 @@ cdef class GiacMethods_base: Help for polygonscatterplot: polygonscatterplot(Mtrx) Draws the points (xk,yk) and the polygons joining for j fixed and for k=0..nrows, the points (xk,yk) where xk=element row k column 0 et yk=element row k column j, after the xk are sorted (we obtain ncols-1 polygons). - See also: 1/ scatterplot 2/ polygonplot 3/ listplot + See also: 1/ scatterplot 2/ polygonplot 3/ listplot Ex1:polygonscatterplot([[1,2,3],[2,0,1],[-1,2,3]]) - + ''' return GiacMethods['polygonscatterplot'](self,*args) @@ -13067,9 +13067,9 @@ cdef class GiacMethods_base: Help for polyhedron: polyhedron(SeqPnt(A,B,C...)) Draws a convex polyhedron with vertices among the arguments. - See also: 1/ cube 2/ parallelepiped + See also: 1/ cube 2/ parallelepiped Ex1:polyhedron([0,0,0],[0,5,0],[0,0,5],[1,2,6]) - + ''' return GiacMethods['polyhedron'](self,*args) @@ -13078,13 +13078,13 @@ cdef class GiacMethods_base: Help for polynom: polynom(Opt) Option of the convert or convertir command and of the taylor and series commands (list=>n-poly or series=>poly). - See also: 1/ poly2symb 2/ taylor 3/ series 4/ convert + See also: 1/ poly2symb 2/ taylor 3/ series 4/ convert Ex1: convert([[10,[3,1]],[12,[2,2]]],polynom) Ex2: convert(taylor(sin(x)),polynom) Ex3: convert(series(sin(x),x=0,6),polynom) Ex4: taylor(sin(x),x=0,5,polynom) Ex5: series(sin(x),x=0,6,,polynom) - + ''' return GiacMethods['polynom'](self,*args) @@ -13093,11 +13093,11 @@ cdef class GiacMethods_base: Help for polynomial_regression: polynomial_regression(Lst||Mtrx(A),[Lst],Intg(n)) Returns the coefficients (an,...a1,a0) of y=an*x^n+..a1x+a0 : it is the best polynomial which approx the points where the coordinates are the rows of A (or the 2 lists) (n is the 2nd argument). - See also: 1/ linear_regression 2/ power_regression + See also: 1/ linear_regression 2/ power_regression Ex1:polynomial_regression([[1.0,1.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]],3) Ex2:polynomial_regression([[0.0,1.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]],3) Ex3:polynomial_regression([0.0,2.0,3.0,4.0],[1.0,4.0,9.0,16.0],3) - + ''' return GiacMethods['polynomial_regression'](self,*args) @@ -13106,11 +13106,11 @@ cdef class GiacMethods_base: Help for polynomial_regression_plot: polynomial_regression_plot(Lst||Mtrx(A),[Lst],Intg(n)) Returns the plot of y=an*x^n+..a1x+a0 : it is the best polynomial which approx the points where the coordinates are the rows of A (or the 2 lists) (n is the 2nd argument). - See also: 1/ linear_regression_plot 2/ power_regression_plot + See also: 1/ linear_regression_plot 2/ power_regression_plot Ex1:polynomial_regression_plot([[1.0,1.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]],3) Ex2:polynomial_regression_plot([[0.0,1.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]],3) Ex3:polynomial_regression_plot([0.0,2.0,3.0,4.0],[1.0,4.0,9.0,16.0],3) - + ''' return GiacMethods['polynomial_regression_plot'](self,*args) @@ -13119,11 +13119,11 @@ cdef class GiacMethods_base: Help for position: position(NULL or LstCoord) Returns the turtle position in pixels or puts the turtle at the position given by the argument with the same direction. - See also: 1/ cap 2/ initialise + See also: 1/ cap 2/ initialise Ex1:position() Ex2:position(50,70) Ex3:position([50,70]) - + ''' return GiacMethods['position'](self,*args) @@ -13132,9 +13132,9 @@ cdef class GiacMethods_base: Help for poslbdLMQ: poslbdLMQ(Poly(P)) Returns a lower bound on the values of the positive roots of P. Akritas-Strzebonski-Vigklas' Local Max Quadratic (LMQ) method is used. - See also: 1/ posubLMQ 2/ VAS_positive 3/ realroot + See also: 1/ posubLMQ 2/ VAS_positive 3/ realroot Ex1:poslbdLMQ(x^3-7*x+7) - + ''' return GiacMethods['poslbdLMQ'](self,*args) @@ -13143,9 +13143,9 @@ cdef class GiacMethods_base: Help for posubLMQ: posubLMQ(Poly(P)) Returns an upper bound on the values of the positive roots of P. Akritas-Strzebonski-Vigklas' Local Max Quadratic (LMQ) method is used. - See also: 1/ poslbdLMQ 2/ VAS_positive 3/ realroot + See also: 1/ poslbdLMQ 2/ VAS_positive 3/ realroot Ex1:posubLMQ(x^3-7*x+7) - + ''' return GiacMethods['posubLMQ'](self,*args) @@ -13154,9 +13154,9 @@ cdef class GiacMethods_base: Help for potential: potential(Vect(V),VectVar) Returns U such that derive(U,Vector_of_variable)=V. - See also: 1/ derive 2/ vpotential + See also: 1/ derive 2/ vpotential Ex1:potential([2*x*y+3,x^2-4*z,-4*y],[x,y,z]) - + ''' return GiacMethods['potential'](self,*args) @@ -13165,9 +13165,9 @@ cdef class GiacMethods_base: Help for pow2exp: pow2exp(Expr) Converts powers to exponentials. - See also: 1/ exp2pow + See also: 1/ exp2pow Ex1:pow2exp(a^b) - + ''' return GiacMethods['pow2exp'](self,*args) @@ -13176,11 +13176,11 @@ cdef class GiacMethods_base: Help for power_regression: power_regression(Lst|Mtrx(A),[Lst]) Returns the coefficients (m,b) of y=b*x^m : it is the best monomial which approx the points where the coordinates are the rows of A (or the 2 lists). - See also: 1/ polynomial_regression 2/ linear_regressiont + See also: 1/ polynomial_regression 2/ linear_regressiont Ex1:power_regression([[1.0,1.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]]) Ex2:power_regression([[1.0,2.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]]) Ex3:power_regression([1.0,2.0,3.0,4.0],[2.0,4.0,9.0,16.0]) - + ''' return GiacMethods['power_regression'](self,*args) @@ -13189,11 +13189,11 @@ cdef class GiacMethods_base: Help for power_regression_plot: power_regression_plot(Lst||Mtrx(A),[Lst]) Returns the plot of y=b*x^m : it is the best monomial which approx the points where the coordinates are the rows of A (or the 2 lists). - See also: 1/ polynomial_regression_plot 2/ linear_regression_plot + See also: 1/ polynomial_regression_plot 2/ linear_regression_plot Ex1:power_regression_plot([[1.0,1.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]]) Ex2:power_regression_plot([[1.0,2.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]]) Ex3:power_regression_plot([1.0,2.0,3.0,4.0],[2.0,4.0,9.0,16.0]) - + ''' return GiacMethods['power_regression_plot'](self,*args) @@ -13202,10 +13202,10 @@ cdef class GiacMethods_base: Help for powermod: powermod(Intg(a),Intg(n),Intg(p),[Expr(P(x))],[Var]) Computes a^n modulo p or modulo p,P(x) (fast algorithm). - See also: 1/ pow 2/ ^ + See also: 1/ pow 2/ ^ Ex1:powermod(17,452,19) Ex2:powermod(x+1,452,19,x^4+x+1,x) - + ''' return GiacMethods['powermod'](self,*args) @@ -13214,10 +13214,10 @@ cdef class GiacMethods_base: Help for powerpc: powerpc(Cercle,Pnt or Cplx) Returns the real number d^2-R^2 (d=distance between point and center, R=radius). - See also: 1/ radical_axis + See also: 1/ radical_axis Ex1:powerpc(circle(0,1+i),3+i) Ex2:powerpc(circle(0,point(1+i)),3+i) - + ''' return GiacMethods['powerpc'](self,*args) @@ -13226,10 +13226,10 @@ cdef class GiacMethods_base: Help for powexpand: powexpand(Expr) Expands the expression as a function of the exponent. - See also: 1/ + See also: 1/ Ex1:powexpand(2^(x+y)) Ex2:powexpand(3^(2*x)) - + ''' return GiacMethods['powexpand'](self,*args) @@ -13238,10 +13238,10 @@ cdef class GiacMethods_base: Help for powmod: powmod(Intg(a),Intg(n),Intg(p),[Expr(P(x))],[Var]) Computes a^n modulo p or modulo p,P(x) (fast algorithm). - See also: 1/ pow 2/ ^ + See also: 1/ pow 2/ ^ Ex1:powmod(17,452,19) Ex2:powmod(x+1,452,19,x^4+x+1,x) - + ''' return GiacMethods['powmod'](self,*args) @@ -13250,14 +13250,14 @@ cdef class GiacMethods_base: Help for prepend: prepend(Lst||Set||Str(L),Elem(n)) Adds an element to a set or at the beginning of a list or of a string (L:=prepend(L,a) or L.prepend(a)). - See also: 1/ append 2/ concat + See also: 1/ append 2/ concat Ex1:prepend([1,2],3) Ex2:prepend(set[1,2],3) Ex3: L:=[1,2];L:=prepend(L,3) - Ex4: L:=[1,2];L.prepend(L,3) + Ex4: L:=[1,2];L.prepend(L,3) Ex5: S:=set[1,2];S:=prepend(L,3) Ex6: S:=set[1,2];S.prepend(L,3) - + ''' return GiacMethods['prepend'](self,*args) @@ -13266,12 +13266,12 @@ cdef class GiacMethods_base: Help for preval: preval(Expr(F(Var)),Real(a),Real(b),[Var]) Returns F(b)-F(a). - See also: 1/ subst 2/ int + See also: 1/ subst 2/ int Ex1:preval(x^2-2,2,3) Ex2:preval(y^2-2,2,3,y) Ex3:preval(int(x),0,1) Ex4:preval(int(y,y),0,1,y) - + ''' return GiacMethods['preval'](self,*args) @@ -13280,10 +13280,10 @@ cdef class GiacMethods_base: Help for prevperm: prevperm(Intg(n)) Returns the previous permutation with the lexicographic order. - See also: 1/ nextperm 2/ is_permu + See also: 1/ nextperm 2/ is_permu Ex1:prevperm([0,1,3,2]) Ex2:prevperm([0,1,2,3]) - + ''' return GiacMethods['prevperm'](self,*args) @@ -13292,10 +13292,10 @@ cdef class GiacMethods_base: Help for prevprime: prevprime(Intg(a)) Previous prime or pseudo-prime before a given integer a. - See also: 1/ nextprime 2/ is_prime 3/ ithprime + See also: 1/ nextprime 2/ is_prime 3/ ithprime Ex1:prevprime(9856989898999) Ex2:prevprime(97160249868928888261606009) - + ''' return GiacMethods['prevprime'](self,*args) @@ -13304,10 +13304,10 @@ cdef class GiacMethods_base: Help for primpart: primpart(Poly(P),[Var]) Returns the polynomial P divided by the gcd of its coefficients. - See also: 1/ content + See also: 1/ content Ex1:primpart(2x^2+10x+6) Ex2:primpart(2t^2+10t+6,t) - + ''' return GiacMethods['primpart'](self,*args) @@ -13316,10 +13316,10 @@ cdef class GiacMethods_base: Help for printf: printf(Expr) 2d printing. - See also: 1/ print + See also: 1/ print Ex1:printf(sqrt(2)) Ex2:printf("%gen+%gen=%gen",a,b,a+b) - + ''' return GiacMethods['printf'](self,*args) @@ -13328,9 +13328,9 @@ cdef class GiacMethods_base: Help for prism: prism(LstPnt([A,B,C,D]),Pnt(A1)) Draws a prism with plane base ABCD...and with edges parallel to AA1 (the faces are parallelograms). - See also: 1/ cube 2/ polyhedron + See also: 1/ cube 2/ polyhedron Ex1:prism([[0,0,0],[5,0,0],[0,5,0],[-5,5,0]],[0,0,5]) - + ''' return GiacMethods['prism'](self,*args) @@ -13339,9 +13339,9 @@ cdef class GiacMethods_base: Help for prism_graph: prism_graph(Intg(n)) Returns the generalized Petersen graph GP(n,1). - See also: 1/ antiprism_graph 2/ web_graph + See also: 1/ antiprism_graph 2/ web_graph Ex1:prism_graph(5) - + ''' return GiacMethods['prism_graph'](self,*args) @@ -13350,7 +13350,7 @@ cdef class GiacMethods_base: Help for product: product(Expr||Lst,[Var||Lst],[Intg(a)],[Intg(b)],[Intg(p)]) Multiplies the values of the expression when the variable go from a to b with a step p (product(expression,var,begin,end,step) by default p=1) or product of the elements of a list or product element by element of 2 lists or matrices. - See also: 1/ sum + See also: 1/ sum Ex1:product(n,n,1,10,2) Ex2:product(1/n,n,1,10) Ex3:product(1/n,n,11,1) @@ -13358,7 +13358,7 @@ cdef class GiacMethods_base: Ex5:product([2,3,4,5]) Ex6:product([2,3,4],[5,6,7]) Ex7:product([[2,3,4],[5,6,7]],[[2,3,4],[5,6,7]]) - + ''' return GiacMethods['product'](self,*args) @@ -13367,11 +13367,11 @@ cdef class GiacMethods_base: Help for projection: projection(Curve,Pnt) projection(C,A) is the orthogonal projection of A on the curve C. - See also: 1/ perpendicular + See also: 1/ perpendicular Ex1: H:=projection(line(i,1-i),1+i) Ex2: K:=projection(circle(0,1),1+i) Ex3: J:=projection(circle(0,1),point(1+2*i)) - + ''' return GiacMethods['projection'](self,*args) @@ -13380,12 +13380,12 @@ cdef class GiacMethods_base: Help for proot: proot(Vect||Poly,[Intg(n)]) Returns all computed roots of a polynomial given by its coefficients (may not work if roots are not simple). - See also: 1/ pcoeff 2/ peval 3/ realroot 4/ complexroot 5/ rationalroot 6/ crationalroot + See also: 1/ pcoeff 2/ peval 3/ realroot 4/ complexroot 5/ rationalroot 6/ crationalroot Ex1:proot([1,0,-2]) Ex2:proot(x^2-2) Ex3:proot([1,2,-25,-26,120]) Ex4:proot(x^4+5x-3,30) - + ''' return GiacMethods['proot'](self,*args) @@ -13394,10 +13394,10 @@ cdef class GiacMethods_base: Help for propFrac: propFrac(Frac or RatFrac) Simplifies and writes the fraction (or rational fraction) A/B as Q+R/B with R=0 or, the (-n)th previous question if n<0 (by default n=-1 for the previous question). - See also: 1/ ans + See also: 1/ ans Ex1:quest() Ex2:quest(2) Ex3:quest(-2) - + ''' return GiacMethods['quest'](self,*args) @@ -13604,11 +13604,11 @@ cdef class GiacMethods_base: Help for quo: quo((Vect or Poly),(Vect or Poly),[Var]) Euclidean quotient of 2 polynomials. - See also: 1/ rem 2/ quorem 3/ Quo 4/ iquo + See also: 1/ rem 2/ quorem 3/ Quo 4/ iquo Ex1:quo([1,2,3,4],[-1,2]) Ex2:quo(x^3+2x^2+3x+4,-x+2) Ex3:quo(t^3+2t^2+3t+4,-t+2,t) - + ''' return GiacMethods['quo'](self,*args) @@ -13617,12 +13617,12 @@ cdef class GiacMethods_base: Help for quorem: quorem((Vect or Poly),(Vect or Poly),[Var]) Euclidean quotient and remainder of 2 polynomials. - See also: 1/ rem 2/ quo 3/ iquorem + See also: 1/ rem 2/ quo 3/ iquorem Ex1:quorem([1,2,3,4],[-1,2]) Ex2:quorem(x^3+2x^2+3x+4,-x+2) Ex3:quorem(t^3+2t^2+3t+4,-t+2,t) Ex4:quorem(t^4-1,(t+1)^2,t) - + ''' return GiacMethods['quorem'](self,*args) @@ -13631,11 +13631,11 @@ cdef class GiacMethods_base: Help for quote: quote(Expr) Returns its argument unevaluated (and also a:=quote(a) purges a). - See also: 1/ + See also: 1/ Ex1:quote(1+2) Ex2:quote(1/x+1/(x-1)) Ex3:quote((x+1)*(x-1)) - + ''' return GiacMethods['quote'](self,*args) @@ -13644,12 +13644,12 @@ cdef class GiacMethods_base: Help for r2e: r2e(Lst,Var) Gives the polynomial (or its value) : the first argument is the vector of coefficients and the second argument is the variable (by default x). - See also: 1/ e2r 2/ symb2poly + See also: 1/ e2r 2/ symb2poly Ex1:r2e([1,2,3]) Ex2:r2e([1,2,3],x) Ex3:r2e([1,2,3],-1) Ex4:r2e([1,2,-1],y) - + ''' return GiacMethods['r2e'](self,*args) @@ -13658,10 +13658,10 @@ cdef class GiacMethods_base: Help for radical_axis: radical_axis(Crcle,Crcle) Returns the line of points with same powerpc with respect to the 2 circles. - See also: 1/ powerpc + See also: 1/ powerpc Ex1:radical_axis(circle(0,1+i),circle(1,1+i)) Ex2:radical_axis(circle(0,point(1+i)),circle(1,point(1+i))) - + ''' return GiacMethods['radical_axis'](self,*args) @@ -13670,9 +13670,9 @@ cdef class GiacMethods_base: Help for radius: radius(Crcle) radius(C) gives the radius of the circle C. - See also: 1/ center 2/ circle + See also: 1/ center 2/ circle Ex1:radius(incircle(-1,1-i,i)) - + ''' return GiacMethods['radius'](self,*args) @@ -13681,9 +13681,9 @@ cdef class GiacMethods_base: Help for ramene: ramene(Str(fich_name)) Reads variables and their values from the file fich_name. - See also: 1/ write 2/ readrgb 3/ readwav 4/ csv2gen + See also: 1/ write 2/ readrgb 3/ readwav 4/ csv2gen Ex1:ramene("toto") - + ''' return GiacMethods['ramene'](self,*args) @@ -13692,7 +13692,7 @@ cdef class GiacMethods_base: Help for rand: rand(Intg(n) or Interval(p..n) or NULL,[Intg(b1) or Lst(L)],[Intg(b2)]) rand(n)=a random integer (resp rand(p,n)=a real or rand(p..n)=a real function) with uniform distribution in 0..n-1 (resp in [p;n])(rand()=rand(0,1)=a real in [0,1[) or rand(n,b1,b2)=n integers between b1 and b2 or rand(n,L)=list of n elements of L. - See also: 1/ srand 2/ randpoly 3/ ranm 4/ randvector 5/ hasard + See also: 1/ srand 2/ randpoly 3/ ranm 4/ randvector 5/ hasard Ex1:rand(4) Ex2:rand() Ex3:rand(0,2) @@ -13704,7 +13704,7 @@ cdef class GiacMethods_base: Ex9: L:=["r","r","r","b","n"];L3:=L.rand(3) Ex10: L:=["r","r","r","b","n"];a:=rand(L) Ex11: L:=["r","r","r","b","n"];a:=L.rand() - + ''' return GiacMethods['rand'](self,*args) @@ -13713,7 +13713,7 @@ cdef class GiacMethods_base: Help for randMat: randMat(Intg(n), [Intg(m)],[Interval or quote(DistribLaw)]) Returns a list of size n or an n*m matrix that contains random integers in the range -99 through 99 with uniform distribution or contains random numbers according to the law put between quotes. - See also: 1/ idn 2/ randPoly 3/ rand 4/ randvector + See also: 1/ idn 2/ randPoly 3/ rand 4/ randvector Ex1:randMat(3) Ex2:randMat(3,2) Ex3:randMat(3,2,6) @@ -13727,7 +13727,7 @@ cdef class GiacMethods_base: Ex11:randMat(3,2,1..2) Ex12:randMat(3,5,multinomial,[1/2,1/3,1/6],["R","V","B"]) Ex13: GF(2,8,g);ranm(3,3,g) - + ''' return GiacMethods['randMat'](self,*args) @@ -13736,10 +13736,10 @@ cdef class GiacMethods_base: Help for randNorm: randNorm(Real(mu),Real(sigma)) Returns a random real with normal distribution N(mu,sigma). - See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randpoisson 8/ randgeometric 9/ randmultinomial + See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randpoisson 8/ randgeometric 9/ randmultinomial Ex1:randNorm(0,1) Ex2:randNorm(2,1) - + ''' return GiacMethods['randNorm'](self,*args) @@ -13748,14 +13748,14 @@ cdef class GiacMethods_base: Help for randPoly: randPoly([Var(Var)],Intg(n),[law]) Returns a polynomial with variable var (or x), of degree n and where the coefficients are random integers in the range -99 through 99 with uniform distribution or according to a law. - See also: 1/ ranm 2/ randvector + See also: 1/ ranm 2/ randvector Ex1:randPoly(5) Ex2:randPoly(t,8) Ex3:randPoly(t,8,-1..1) Ex4:randPoly([x,y],[10,3]) Ex5:randPoly([x,y],[10,3],1 mod 7) Ex6: GF(2,8,g);randpoly(t,8,g);randpoly([x,y],[2,3],g) - + ''' return GiacMethods['randPoly'](self,*args) @@ -13764,10 +13764,10 @@ cdef class GiacMethods_base: Help for randbetad: randbetad(Real(a),Real(b)) Returns a random real according to the Beta distribution with parameters a>0 and b>0. - See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector + See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector Ex1:randbetad(1,2) Ex2:randbetad(1.5,4) - + ''' return GiacMethods['randbetad'](self,*args) @@ -13776,10 +13776,10 @@ cdef class GiacMethods_base: Help for randbinomial: randbinomial(Intg(n),Real(p)) Returns a random integer with binomial distribution B(n,p) i.e. the number of successes in n independant tests where for each test, the success of probability is p. - See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randnorm 7/ randpoisson 8/ randgeometric 9/ randmultinomial + See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randnorm 7/ randpoisson 8/ randgeometric 9/ randmultinomial Ex1:randbinomial(10,0.4) Ex2:randbinomial(100,0.8) - + ''' return GiacMethods['randbinomial'](self,*args) @@ -13788,10 +13788,10 @@ cdef class GiacMethods_base: Help for randchisquare: randchisquare(Intg(n)) Returns a random integer with chi^2 distribution, χ^2(n). - See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randnorm 8/ randgeometric 9/ randmultinomial + See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randnorm 8/ randgeometric 9/ randmultinomial Ex1:randchisquare(5) Ex2:randchisquare(2) - + ''' return GiacMethods['randchisquare'](self,*args) @@ -13800,10 +13800,10 @@ cdef class GiacMethods_base: Help for randexp: randexp(Real(a)) Returns a random real according to the exponential distribution with parameter a>0. - See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector + See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector Ex1:randexp(1) Ex2:randexp(2) - + ''' return GiacMethods['randexp'](self,*args) @@ -13812,10 +13812,10 @@ cdef class GiacMethods_base: Help for randfisher: randfisher(Intg(n),Intg(m)) Returns a random integer with Fisher-Snedecor distribution F(n,m). - See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randnorm 8/ randgeometric 9/ randmultinomial + See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randnorm 8/ randgeometric 9/ randmultinomial Ex1:randfisher(5,2) Ex2:randfisher(2,4) - + ''' return GiacMethods['randfisher'](self,*args) @@ -13824,10 +13824,10 @@ cdef class GiacMethods_base: Help for randgammad: randgammad(Real(a),Real(b)) Returns a random real according to the Gamma distribution with parameters a>0 and b>0. - See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector + See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector Ex1:randgammad(1,2) Ex2:randgammad(1.5,4) - + ''' return GiacMethods['randgammad'](self,*args) @@ -13836,9 +13836,9 @@ cdef class GiacMethods_base: Help for randgeometric: randgeometric(Real(p)) Returns a random integer following the geometric distribution with parameter p. - See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randnorm 7/ randpoisson 8/ randbinomial 9/ randmultinomial + See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randnorm 7/ randpoisson 8/ randbinomial 9/ randmultinomial Ex1:randgeometric(0.4) - + ''' return GiacMethods['randgeometric'](self,*args) @@ -13847,10 +13847,10 @@ cdef class GiacMethods_base: Help for randint: randint(Intg(n1),Intg(n2)) randint(n1,n2)=an integer in [n1, n2] or [n2,n1]. - See also: 1/ rand + See also: 1/ rand Ex1:randint(1,10) Ex2:randint(-1,-10) - + ''' return GiacMethods['randint'](self,*args) @@ -13859,10 +13859,10 @@ cdef class GiacMethods_base: Help for randmarkov: randmarkov(Mtrx(M) || Vctr(v),Intg(i0),[Intg(n)]) Returns a random sequence of n states (Markov chain) starting from i0, with probability transition matrix M, or returns a stochastic matrix with p recurrent loops v=[n1,..,np] and i0 transient states. - See also: 1/ markov 2/ plotproba + See also: 1/ markov 2/ plotproba Ex1:randmarkov([[0,0,1/2,0,1/2],[0,0,1,0,0],[1/4,1/4,0,1/4,1/4],[0,0,1/2,0,1/2],[0,0,0,0,1]],2,20) Ex2:randmarkov([1,2,1,3],4) - + ''' return GiacMethods['randmarkov'](self,*args) @@ -13871,7 +13871,7 @@ cdef class GiacMethods_base: Help for randmatrix: randmatrix(Intg(n), [Intg(m)],[Interval or quote(DistribLaw)]) Returns a list of size n or an n*m matrix that contains random integers in the range -99 through 99 with uniform distribution or contains random numbers according to the law put between quotes. - See also: 1/ idn 2/ randPoly 3/ rand 4/ randvector + See also: 1/ idn 2/ randPoly 3/ rand 4/ randvector Ex1:randmatrix(3) Ex2:randmatrix(3,2) Ex3:randmatrix(3,2,6) @@ -13885,7 +13885,7 @@ cdef class GiacMethods_base: Ex11:randmatrix(3,2,1..2) Ex12:randmatrix(3,5,multinomial,[1/2,1/3,1/6],["R","V","B"]) Ex13: GF(2,8,g);ranm(3,3,g) - + ''' return GiacMethods['randmatrix'](self,*args) @@ -13894,10 +13894,10 @@ cdef class GiacMethods_base: Help for randmultinomial: randmultinomial(List(P),[List(K)]) Returns a random index or list element according to a multinomial distribution probability list P. - See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randnorm 7/ randpoisson 8/ randgeometric 9/ randbinomial + See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randnorm 7/ randpoisson 8/ randgeometric 9/ randbinomial Ex1:randmultinomial([1/2,1/3,1/6]) Ex2:randmultinomial([1/2,1/3,1/6],["R","V","B"]) - + ''' return GiacMethods['randmultinomial'](self,*args) @@ -13906,10 +13906,10 @@ cdef class GiacMethods_base: Help for randnorm: randnorm(Real(mu),Real(sigma)) Returns a random real with normal distribution N(mu,sigma). - See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randpoisson 8/ randgeometric 9/ randmultinomial + See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randpoisson 8/ randgeometric 9/ randmultinomial Ex1:randnorm(0,1) Ex2:randnorm(2,1) - + ''' return GiacMethods['randnorm'](self,*args) @@ -13918,7 +13918,7 @@ cdef class GiacMethods_base: Help for random: random(Intg(n) or Interval(p..n) or NULL,[Intg(b1) or Lst(L)],[Intg(b2)]) rand(n)=a random integer (resp rand(p,n)=a real or rand(p..n)=a real function) with uniform distribution in 0..n-1 (resp in [p;n])(rand()=rand(0,1)=a real in [0,1[) or rand(n,b1,b2)=n integers between b1 and b2 or rand(n,L)=list of n elements of L. - See also: 1/ srand 2/ randpoly 3/ ranm 4/ randvector 5/ hasard + See also: 1/ srand 2/ randpoly 3/ ranm 4/ randvector 5/ hasard Ex1:random(4) Ex2:random() Ex3:random(0,2) @@ -13930,7 +13930,7 @@ cdef class GiacMethods_base: Ex9: L:=["r","r","r","b","n"];L3:=L.rand(3) Ex10: L:=["r","r","r","b","n"];a:=rand(L) Ex11: L:=["r","r","r","b","n"];a:=L.rand() - + ''' return GiacMethods['random'](self,*args) @@ -13939,10 +13939,10 @@ cdef class GiacMethods_base: Help for random_bipartite_graph: random_bipartite_graph(Intg(n)||Lst(a,b),Real(p)||Intg(m)) Returns a random undirected unweighted bipartite graph with n vertices where each possible edge is present with probability p or where m edges are created at random. When the first argument is list [a,b] of integers, two groups of vertices with sizes a and b are created. - See also: 1/ random_digraph 2/ random_graph 3/ random_planar_graph 4/ random_regular_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree + See also: 1/ random_digraph 2/ random_graph 3/ random_planar_graph 4/ random_regular_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree Ex1:random_bipartite_graph(10,0.5) Ex2:random_bipartite_graph([2,3],1.0) - + ''' return GiacMethods['random_bipartite_graph'](self,*args) @@ -13951,10 +13951,10 @@ cdef class GiacMethods_base: Help for random_digraph: random_digraph(Intg(n)||Lst(V),Real(p)||Intg(m)) Returns a random directed unweighted graph with n vertices (list V of labels may me specified) where two vertices are connected with probability p or where m edges are created at random. - See also: 1/ random_bipartite_graph 2/ random_graph 3/ random_planar_graph 4/ random_regular_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree + See also: 1/ random_bipartite_graph 2/ random_graph 3/ random_planar_graph 4/ random_regular_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree Ex1:random_digraph(8,0.5) Ex2:random_digraph(8,10) - + ''' return GiacMethods['random_digraph'](self,*args) @@ -13963,10 +13963,10 @@ cdef class GiacMethods_base: Help for random_graph: random_graph(Intg(n)||Lst(V),Real(p)||Intg(m)) Returns a random undirected unweighted graph with n vertices (list V of labels may be specified) where two vertices are connected with probability p or where m edges are created at random. - See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_planar_graph 4/ random_regular_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree + See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_planar_graph 4/ random_regular_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree Ex1:random_graph(8,0.5) Ex2:random_graph(8,10) - + ''' return GiacMethods['random_graph'](self,*args) @@ -13975,11 +13975,11 @@ cdef class GiacMethods_base: Help for random_network: random_network(Intg(a),Intg(b),[Real(p)],[opts]) Returns a random network with b grid frames of size a*a in which every edge appears with the probability p (by default 0.5). - See also: 1/ is_network 2/ maxflow + See also: 1/ is_network 2/ maxflow Ex1:random_network(3,3) Ex2:random_network(3,3,acyclic) Ex3:random_network(3,4,0.75) - + ''' return GiacMethods['random_network'](self,*args) @@ -13988,8 +13988,8 @@ cdef class GiacMethods_base: Help for random_planar_graph: random_planar_graph(Intg(n)||Lst(V),Real(p),[Intg(c)]) Returns a random planar graph with n vertices, which can also be specified as a list V of their labels, obtained by trying to remove each edge of a random triangulated graph with probability 0<=p<1 [c is connectivity level : 0 - any, 1 - connected, 2 - biconnected, 3 - triconnected (by default, c=1)]. - See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_graph 4/ random_regular_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree - + See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_graph 4/ random_regular_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree + ''' return GiacMethods['random_planar_graph'](self,*args) @@ -13998,9 +13998,9 @@ cdef class GiacMethods_base: Help for random_regular_graph: random_regular_graph(Intg(n)||Lst(V),Intg(d),[connected]) Returns a random d-regular graph with n vertices, which may be specified as list V of their labels. - See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_graph 4/ random_planar_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree + See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_graph 4/ random_planar_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree Ex1:random_regular_graph(100,80,connected) - + ''' return GiacMethods['random_regular_graph'](self,*args) @@ -14009,9 +14009,9 @@ cdef class GiacMethods_base: Help for random_sequence_graph: random_sequence_graph(Lst(L)) Returns a random undirected graph with degree sequence L. - See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_graph 4/ random_planar_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree + See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_graph 4/ random_planar_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree Ex1:random_sequence_graph([1,3,3,2,1,2,2,2,3,3]) - + ''' return GiacMethods['random_sequence_graph'](self,*args) @@ -14020,9 +14020,9 @@ cdef class GiacMethods_base: Help for random_tournament: random_tournament(Intg(n)||Lst(V)) Returns a random tournament graph with n vertices, which may be specified as list V of their labels. - See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_graph 4/ random_planar_graph 5/ random_regular_graph 6/ random_sequence_graph 7/ random_tree + See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_graph 4/ random_planar_graph 5/ random_regular_graph 6/ random_sequence_graph 7/ random_tree Ex1:random_tournament(5) - + ''' return GiacMethods['random_tournament'](self,*args) @@ -14031,8 +14031,8 @@ cdef class GiacMethods_base: Help for random_tree: random_tree(Intg(n)||Lst(V),[Intg(d)||root[=Vrtx(v)]]) Returns a random tree graph with n vertices, which may be specified as list V of their labels [with the upper bound d (positive integer) for the degree of graph or 'root' for rooted trees]. - See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_graph 4/ random_planar_graph 5/ random_regular_graph 6/ random_sequence_graph 7/ random_tournament - + See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_graph 4/ random_planar_graph 5/ random_regular_graph 6/ random_sequence_graph 7/ random_tournament + ''' return GiacMethods['random_tree'](self,*args) @@ -14041,7 +14041,7 @@ cdef class GiacMethods_base: Help for random_variable: random_variable(Lst(W)||Mtrx(M)||Fnc(f),[params]) Returns a random variable from a probability density function f or from list of weights (discrete variable). - See also: 1/ randvector 2/ randmatrix 3/ rand + See also: 1/ randvector 2/ randmatrix 3/ rand Ex1:random_variable(fisher,2,3) Ex2:random_variable([["apple",1/3],["orange",1/4],["pear",1/5],["plum",13/60]]) Ex3:random_variable(k->1-(k/10)^2,range=-10..10) @@ -14052,7 +14052,7 @@ cdef class GiacMethods_base: Ex8:random_variable(weibull,mean=12.5,variance=1) Ex9:random_variable(uniform,mean=10,stddev=2) Ex10:random_variable(uniform,e..pi) - + ''' return GiacMethods['random_variable'](self,*args) @@ -14061,13 +14061,13 @@ cdef class GiacMethods_base: Help for randperm: randperm(Intg(n)||Lst(L)) Returns a random permutation of [0,1,2,..,n-1] or of the list L. - See also: 1/ permu2cycles 2/ is_permu 3/ permu2mat + See also: 1/ permu2cycles 2/ is_permu 3/ permu2mat Ex1:randperm(4) Ex2:randperm(7) Ex3:randperm([1,3,5,7,9]) Ex4: L:=[1,3,5,7,9];L:=randperm(L) Ex5: L:=[1,3,5,7,9];L.randperm() - + ''' return GiacMethods['randperm'](self,*args) @@ -14076,10 +14076,10 @@ cdef class GiacMethods_base: Help for randpoisson: randpoisson(Real(λ)) Returns a random integer with poisson distribution P(λ). - See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randnorm 8/ randgeometric 9/ randmultinomial + See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randnorm 8/ randgeometric 9/ randmultinomial Ex1:randpoisson(5.4) Ex2:randpoisson(2.8) - + ''' return GiacMethods['randpoisson'](self,*args) @@ -14088,14 +14088,14 @@ cdef class GiacMethods_base: Help for randpoly: randpoly([Var(Var)],Intg(n),[law]) Returns a polynomial with variable var (or x), of degree n and where the coefficients are random integers in the range -99 through 99 with uniform distribution or according to a law. - See also: 1/ ranm 2/ randvector + See also: 1/ ranm 2/ randvector Ex1:randpoly(5) Ex2:randpoly(t,8) Ex3:randpoly(t,8,-1..1) Ex4:randpoly([x,y],[10,3]) Ex5:randpoly([x,y],[10,3],1 mod 7) Ex6: GF(2,8,g);randpoly(t,8,g);randpoly([x,y],[2,3],g) - + ''' return GiacMethods['randpoly'](self,*args) @@ -14104,10 +14104,10 @@ cdef class GiacMethods_base: Help for randseed: randseed() srand returns an integer and initializes the sequence of random numbers. - See also: 1/ RandSeed + See also: 1/ RandSeed Ex1:randseed(12) Ex2: srand - + ''' return GiacMethods['randseed'](self,*args) @@ -14116,10 +14116,10 @@ cdef class GiacMethods_base: Help for randstudent: randstudent(Intg(n)) Returns a random integer with Student distribution S(n). - See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randnorm 8/ randgeometric 9/ randmultinomial + See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randnorm 8/ randgeometric 9/ randmultinomial Ex1:randstudent(5) Ex2:randstudent(2) - + ''' return GiacMethods['randstudent'](self,*args) @@ -14128,7 +14128,7 @@ cdef class GiacMethods_base: Help for randvar: randvar(Lst(W)||Mtrx(M)||Fnc(f),[params]) Returns a random variable from a probability density function f or from list of weights (discrete variable). - See also: 1/ randvector 2/ randmatrix 3/ rand + See also: 1/ randvector 2/ randmatrix 3/ rand Ex1:randvar(fisher,2,3) Ex2:randvar([["apple",1/3],["orange",1/4],["pear",1/5],["plum",13/60]]) Ex3:randvar(k->1-(k/10)^2,range=-10..10) @@ -14139,7 +14139,7 @@ cdef class GiacMethods_base: Ex8:randvar(weibull,mean=12.5,variance=1) Ex9:randvar(uniform,mean=10,stddev=2) Ex10:randvar(uniform,e..pi) - + ''' return GiacMethods['randvar'](self,*args) @@ -14148,7 +14148,7 @@ cdef class GiacMethods_base: Help for randvector: randvector(Intg(n), [Intg(m)],[Interval or quote(DistribLaw)]) Returns a list of size n that contains random integers in the range -99 through 99 (or in 0..m-1) with uniform distribution or contains random numbers according to the law put between quotes. - See also: 1/ idn 2/ randPoly 3/ rand 4/ ranm + See also: 1/ idn 2/ randPoly 3/ rand 4/ ranm Ex1:randvector(3) Ex2:randvector(3,6) Ex3:randvector(3,normald,0,1) @@ -14159,7 +14159,7 @@ cdef class GiacMethods_base: Ex8:randvector(3,'rand(3)') Ex9:randvector(3,1..2) Ex10: GF(2,8,g);randvector(3,g) - + ''' return GiacMethods['randvector'](self,*args) @@ -14168,10 +14168,10 @@ cdef class GiacMethods_base: Help for randweibulld: randweibulld(Real(a),Real(b)) Returns a random real according to the Weibull distribution with parameters a>0 and b>0. - See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector + See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector Ex1:randweibulld(1,2) Ex2:randweibulld(1.5,4) - + ''' return GiacMethods['randweibulld'](self,*args) @@ -14180,10 +14180,10 @@ cdef class GiacMethods_base: Help for rank: rank(Mtrx) Returns the rank of the matrix. - See also: 1/ det 2/ image + See also: 1/ det 2/ image Ex1:rank([[1,1,2],[2,1,3],[3,1,4]]) Ex2:rank([[1,1,2],[2,1,3],[3,1,5]]) - + ''' return GiacMethods['rank'](self,*args) @@ -14192,7 +14192,7 @@ cdef class GiacMethods_base: Help for ranm: ranm(Intg(n), [Intg(m)],[Interval or quote(DistribLaw)]) Returns a list of size n or an n*m matrix that contains random integers in the range -99 through 99 with uniform distribution or contains random numbers according to the law put between quotes. - See also: 1/ idn 2/ randPoly 3/ rand 4/ randvector + See also: 1/ idn 2/ randPoly 3/ rand 4/ randvector Ex1:ranm(3) Ex2:ranm(3,2) Ex3:ranm(3,2,6) @@ -14206,7 +14206,7 @@ cdef class GiacMethods_base: Ex11:ranm(3,2,1..2) Ex12:ranm(3,5,multinomial,[1/2,1/3,1/6],["R","V","B"]) Ex13: GF(2,8,g);ranm(3,3,g) - + ''' return GiacMethods['ranm'](self,*args) @@ -14215,7 +14215,7 @@ cdef class GiacMethods_base: Help for ranv: ranv(Intg(n), [Intg(m)],[Interval or quote(DistribLaw)]) Returns a list of size n that contains random integers in the range -99 through 99 (or in 0..m-1) with uniform distribution or contains random numbers according to the law put between quotes. - See also: 1/ idn 2/ randPoly 3/ rand 4/ ranm + See also: 1/ idn 2/ randPoly 3/ rand 4/ ranm Ex1:ranv(3) Ex2:ranv(3,6) Ex3:ranv(3,normald,0,1) @@ -14226,7 +14226,7 @@ cdef class GiacMethods_base: Ex8:ranv(3,'rand(3)') Ex9:ranv(3,1..2) Ex10: GF(2,8,g);randvector(3,g) - + ''' return GiacMethods['ranv'](self,*args) @@ -14235,9 +14235,9 @@ cdef class GiacMethods_base: Help for rassembler_trigo: rassembler_trigo(Expr) Collects trigonometric expressions. - See also: 1/ texpand 2/ tlin + See also: 1/ texpand 2/ tlin Ex1:rassembler_trigo(sin(x)+cos(x)) - + ''' return GiacMethods['rassembler_trigo'](self,*args) @@ -14246,11 +14246,11 @@ cdef class GiacMethods_base: Help for rat_jordan: rat_jordan(Mtrx) Returns the list made by the transition matrix and the rational Jordan form of a matrix. - See also: 1/ egv 2/ egvl 3/ jordan 4/ companion + See also: 1/ egv 2/ egvl 3/ jordan 4/ companion Ex1:rat_jordan([[0,2],[1,0]]) Ex2:rat_jordan([[-2,-2,1],[-2,1,-2],[1,-2,-2]]) Ex3:rat_jordan([[1,1,-1,2,-1],[2,0,1,-4,-1],[0,1,1,1,1],[0,1,2,0,1],[0,0,-3,3,-1]]) - + ''' return GiacMethods['rat_jordan'](self,*args) @@ -14259,11 +14259,11 @@ cdef class GiacMethods_base: Help for rational: rational(Opt) DOM_RAT or rational is the type of a rational, as returned by the type command. It is also an option of the assume command. - See also: 1/ type 2/ assume 3/ DOM_INT 4/ DOM_FLOAT + See also: 1/ type 2/ assume 3/ DOM_INT 4/ DOM_FLOAT Ex1: assume(a,rational) Ex2: assume(a,DOM_RAT) Ex3: a:=1/2;type(a) - + ''' return GiacMethods['rational'](self,*args) @@ -14272,9 +14272,9 @@ cdef class GiacMethods_base: Help for rationalroot: rationalroot(Poly(P)) Returns the list of rational roots of P without indicating the multiplicity. - See also: 1/ proot 2/ froot 3/ complexroot 4/ realroot 5/ crationalroot + See also: 1/ proot 2/ froot 3/ complexroot 4/ realroot 5/ crationalroot Ex1:rationalroot(2*x^3-9*x^2+13*x-6) - + ''' return GiacMethods['rationalroot'](self,*args) @@ -14283,11 +14283,11 @@ cdef class GiacMethods_base: Help for ratnormal: ratnormal(Expr) Rewrites as an irreducible rational fraction. - See also: 1/ normal 2/ simplify 3/ factor 4/ expand + See also: 1/ normal 2/ simplify 3/ factor 4/ expand Ex1:ratnormal((x^2-1)/(x^3-1)) Ex2:ratnormal(c/d+b/d+a/d) Ex3:ratnormal((x^2-1)/(x^3-1)+(x-1)/(x^3-1)+1) - + ''' return GiacMethods['ratnormal'](self,*args) @@ -14296,10 +14296,10 @@ cdef class GiacMethods_base: Help for rdiv: rdiv(Expr(a),Expr(b)) Division of a by b (prefixed version of /). - See also: 1/ / + See also: 1/ / Ex1:rdiv(3,5) Ex2:rdiv(3.2,5.4) - + ''' return GiacMethods['rdiv'](self,*args) @@ -14308,11 +14308,11 @@ cdef class GiacMethods_base: Help for re: re(Cplx or LstCplx) Returns the real part of a complex number. - See also: 1/ im 2/ conj + See also: 1/ im 2/ conj Ex1:re(1+2*i) Ex2:re((1+2*i)^2) Ex3:re([1+2*i,(1+2*i)^2]) - + ''' return GiacMethods['re'](self,*args) @@ -14321,9 +14321,9 @@ cdef class GiacMethods_base: Help for read: read(Str(fich_name)) Reads variables and their values from the file fich_name. - See also: 1/ write 2/ readrgb 3/ readwav 4/ csv2gen + See also: 1/ write 2/ readrgb 3/ readwav 4/ csv2gen Ex1:read("toto") - + ''' return GiacMethods['read'](self,*args) @@ -14332,10 +14332,10 @@ cdef class GiacMethods_base: Help for readrgb: readrgb(Str(s),[Intg(w)],[Intg(h)]) Reads a picture file, using it's natural dimensions, or using specified dimensions. - See also: 1/ writergb 2/ readwav + See also: 1/ writergb 2/ readwav Ex1:readrgb("image.png") Ex2:readrgb("image.png",50,50) - + ''' return GiacMethods['readrgb'](self,*args) @@ -14344,9 +14344,9 @@ cdef class GiacMethods_base: Help for readwav: readwav(Str(s)) Reads a WAV sound file. - See also: 1/ writewav 2/ readrgb + See also: 1/ writewav 2/ readrgb Ex1:readwav("pop.wav") - + ''' return GiacMethods['readwav'](self,*args) @@ -14355,11 +14355,11 @@ cdef class GiacMethods_base: Help for real: real(Cplx or LstCplx) Returns the real part of a complex number. - See also: 1/ im 2/ conj + See also: 1/ im 2/ conj Ex1:real(1+2*i) Ex2:real((1+2*i)^2) Ex3:real([1+2*i,(1+2*i)^2]) - + ''' return GiacMethods['real'](self,*args) @@ -14368,14 +14368,14 @@ cdef class GiacMethods_base: Help for realroot: realroot([sturm],Poly(P),[Real(l)],[Cplx(a)],[Cplx(b)]) Returns the list of intervals of length <=l containing the real roots of P inside a..b with their multiplicity. By default the Vincent-Akritas-Strzebonski (VAS) method is used. realroot(sturm,P) uses Sturm's method. - See also: 1/ proot 2/ froot 3/ complexroot 4/ rationalroot 5/ crationalroot 6/ sturmab 7/ VAS + See also: 1/ proot 2/ froot 3/ complexroot 4/ rationalroot 5/ crationalroot 6/ sturmab 7/ VAS Ex1:realroot(x^3+7,0.1) Ex2:realroot(x^3-7*x+7) Ex3:realroot(sturm,x^3-7*x+7) Ex4:realroot(x^5-2*x^4+x^3+1) Ex5:realroot(x^5-2*x^4+x^3+1,0.1) Ex6:realroot(x^3+x+8,1e-5,-4,4) - + ''' return GiacMethods['realroot'](self,*args) @@ -14384,10 +14384,10 @@ cdef class GiacMethods_base: Help for reciprocation: reciprocation(Crcle,Lst(Pnt,Line)) Returns the list where the points (resp lines) are replaced with their polars (resp poles) with respect to the circle C. - See also: 1/ pole 2/ polar + See also: 1/ pole 2/ polar Ex1:reciprocation(circle(0,1),[point((1+i)/2), line(1,-1+i)]) Ex2:reciprocation(circle(0,1),[line(1+i,2),point(1+i*2)]) - + ''' return GiacMethods['reciprocation'](self,*args) @@ -14396,9 +14396,9 @@ cdef class GiacMethods_base: Help for rect: rect(Expr(x)) Returns the value of the rectangle function at x. - See also: 1/ boxcar 2/ tri 3/ Heaviside + See also: 1/ boxcar 2/ tri 3/ Heaviside Ex1:rect(x/2) - + ''' return GiacMethods['rect'](self,*args) @@ -14407,12 +14407,12 @@ cdef class GiacMethods_base: Help for rectangle: rectangle(Pnt(A)||Cplx,Pnt(B)||Cplx,Real(k)||Pnt(P)||Lst(P,k),[Var(D)],[Var(C)]) Returns and draws the rectangle ABCD, AD=k*AB; if k>0 ABCD is direct else indirect (in the plane ABP AD=AP or AD=k*AB). - See also: 1/ quadrilateral 2/ square + See also: 1/ quadrilateral 2/ square Ex1:rectangle(-i,1,2) Ex2:rectangle(-i,1,-2,D,C) Ex3:rectangle(point(0,0,0),point(3,3,3),point(0,0,3),D,C) Ex4:rectangle(point(0,0,0),point(3,3,3),2,D,C) - + ''' return GiacMethods['rectangle'](self,*args) @@ -14421,14 +14421,14 @@ cdef class GiacMethods_base: Help for rectangle_droit: rectangle_droit(Opt) Option of the plotarea command and of the area command. - See also: 1/ plotarea 2/ area + See also: 1/ plotarea 2/ area Ex1: plotarea(x^2,x=0..1,5,trapezoid) Ex2: plotarea(x^2,x=0..1,5,middle_point) Ex3: plotarea(x^2,x=0..1,5,right_rectangle) Ex4: plotarea(x^2,x=0..1,5,left_rectangle) Ex5: area(x^2,x=0..1,5,middle_point) Ex6: area(x^2,x=0..1,5,trapezoid) - + ''' return GiacMethods['rectangle_droit'](self,*args) @@ -14437,14 +14437,14 @@ cdef class GiacMethods_base: Help for rectangle_gauche: rectangle_gauche(Opt) Option of the plotarea command and of the area command. - See also: 1/ plotarea 2/ area + See also: 1/ plotarea 2/ area Ex1: plotarea(x^2,x=0..1,5,trapezoid) Ex2: plotarea(x^2,x=0..1,5,middle_point) Ex3: plotarea(x^2,x=0..1,5,right_rectangle) Ex4: plotarea(x^2,x=0..1,5,left_rectangle) Ex5: area(x^2,x=0..1,5,middle_point) Ex6: area(x^2,x=0..1,5,trapezoid) - + ''' return GiacMethods['rectangle_gauche'](self,*args) @@ -14453,11 +14453,11 @@ cdef class GiacMethods_base: Help for rectangle_plein: rectangle_plein(Real(a),[Real(b)]) Draws a full direct rectangle (resp square) with sides a,b (resp a) from the turtle position and on the left (by default b=a). - See also: 1/ triangle_plein + See also: 1/ triangle_plein Ex1: rectangle_plein 20 Ex2:rectangle_plein(20) Ex3:rectangle_plein(20,40) - + ''' return GiacMethods['rectangle_plein'](self,*args) @@ -14466,10 +14466,10 @@ cdef class GiacMethods_base: Help for rectangular_coordinates: rectangular_coordinates(LstPolCoord) Returns the list of the abscissa and of the ordinate of a point given by the list of its polar coordinates. - See also: 1/ abscissa 2/ ordinate 3/ rectangular_coordinates 4/ polar_point + See also: 1/ abscissa 2/ ordinate 3/ rectangular_coordinates 4/ polar_point Ex1:rectangular_coordinates([1,pi/4]) Ex2:rectangular_coordinates(polar_point(1,pi/4)) - + ''' return GiacMethods['rectangular_coordinates'](self,*args) @@ -14478,10 +14478,10 @@ cdef class GiacMethods_base: Help for recule: recule(NULL or Real(n)) The turtle takes n steps back (by default n=10). - See also: 1/ avance 2/ saute + See also: 1/ avance 2/ saute Ex1: recule 30 Ex2:recule(30) - + ''' return GiacMethods['recule'](self,*args) @@ -14490,10 +14490,10 @@ cdef class GiacMethods_base: Help for red: red(Opt) Option of the display command to display with color. - See also: 1/ display + See also: 1/ display Ex1: F:=display(point(2+1.5*i),red) Ex2: F:=display(point(2+1.5*i),point_point+green) - + ''' return GiacMethods['red'](self,*args) @@ -14502,12 +14502,12 @@ cdef class GiacMethods_base: Help for reduced_conic: reduced_conic(Expr,[LstVar]) Returns the origin and the matrix of a base in which the conic given by its equation is reduced, 0 or 1 (0 if the conic is degenerate) and the equation of the conic in this base and also its parametric equation. - See also: 1/ gauss 2/ conic + See also: 1/ gauss 2/ conic Ex1:reduced_conic(x^2+2*x-2*y+1) Ex2:reduced_conic(a*x^2-2*x*y+a*y^2-2*x+2*y+3,[x,y]) Ex3:reduced_conic(2*u^2+2*u*v+2*v^2+5*u+3,[u,v]) Ex4:reduced_conic((x+y)^2-2*x+1,x,y) - + ''' return GiacMethods['reduced_conic'](self,*args) @@ -14516,12 +14516,12 @@ cdef class GiacMethods_base: Help for reduced_quadric: reduced_quadric(Expr, [LstVar]) Returns the origin and the matrix of a basis in which the quadric (given by its equation) is reduced, the list of its eigenvalues, the equation of the quadric in this basis and its parametric equation. - See also: 1/ gauss 2/ quadric + See also: 1/ gauss 2/ quadric Ex1:reduced_quadric(4*x^2+y^2+z^2-4*x*y+4*x*z-2*y*z+8*x-4*y+4*z+2) Ex2:reduced_quadric(x^2+3*y^2-3*z^2-8*y*z+2*z*x-4*x*y-1,x,y,z) Ex3:reduced_quadric((u+v)*(v-w)+3*u-5*v,[u,v,w]) Ex4:reduced_quadric(7*x^2+4*y^2+4*z^2+4*x*y-4*x*z-2*y*z-4*x+5*y+4*z-18,[x,y,z]) - + ''' return GiacMethods['reduced_quadric'](self,*args) @@ -14530,10 +14530,10 @@ cdef class GiacMethods_base: Help for ref: ref(Mtrx(M)) Gaussian reduction of AX=b (M=A|(-b)). - See also: 1/ rref 2/ det + See also: 1/ rref 2/ det Ex1:ref([[3,1,-2],[3,2,2]]) Ex2:ref([[2,1,1,-1],[1,1,2,-1],[1,2,1,-4]]) - + ''' return GiacMethods['ref'](self,*args) @@ -14542,11 +14542,11 @@ cdef class GiacMethods_base: Help for reflection: reflection((Pnt(A) or Line(D)),(Pnt(C) or Curve(C))) reflection(D,C) (or reflection(A,C))=symmetry of C with the symmetry-line D (or sym-point A). - See also: 1/ rotation 2/ translation + See also: 1/ rotation 2/ translation Ex1:reflection(line(0,1+i),A) Ex2:reflection(B,A) Ex3:reflection(line(0,1+i),circle(i,1+i)) - + ''' return GiacMethods['reflection'](self,*args) @@ -14555,9 +14555,9 @@ cdef class GiacMethods_base: Help for regroup: regroup(Expr) Collects terms in an expression. - See also: 1/ simplify 2/ normal + See also: 1/ simplify 2/ normal Ex1:regroup(x+3*x+5*4/x) - + ''' return GiacMethods['regroup'](self,*args) @@ -14566,9 +14566,9 @@ cdef class GiacMethods_base: Help for relabel_vertices: relabel_vertices(Graph(G),Lst(L)) Returns a copy of G with vertex labels changed to those in the list L. - See also: 1/ graph_vertices 2/ isomorphic_copy 3/ permute_vertices + See also: 1/ graph_vertices 2/ isomorphic_copy 3/ permute_vertices Ex1:relabel_vertices(graph([a,b,c]),["first","second","third"]) - + ''' return GiacMethods['relabel_vertices'](self,*args) @@ -14577,10 +14577,10 @@ cdef class GiacMethods_base: Help for reliability_polynomial: reliability_polynomial(Graph(G),[Var(p)]) Returns the reliability polynomial [or its value at point p] of undirected graph G. If G is weighted, all weights must be positive integers and are interpreted as edge multiplicities. - See also: 1/ chromatic_polynomial 2/ flow_polynomial 3/ tutte_polynomial + See also: 1/ chromatic_polynomial 2/ flow_polynomial 3/ tutte_polynomial Ex1:reliability_polynomial(graph("petersen")) Ex2:reliability_polynomial(graph("petersen"),0.5) - + ''' return GiacMethods['reliability_polynomial'](self,*args) @@ -14589,11 +14589,11 @@ cdef class GiacMethods_base: Help for rem: rem((Vect or Poly),(Vect or Poly),[Var]) Euclidean remainder of 2 polynomials. - See also: 1/ quo 2/ quorem 3/ Rem 4/ irem + See also: 1/ quo 2/ quorem 3/ Rem 4/ irem Ex1:rem([1,2,3,4],[-1,2]) Ex2:rem(x^3+2x^2+3x+4,-x+2) Ex3:rem(t^3+2t^2+3t+4,-t+2,t) - + ''' return GiacMethods['rem'](self,*args) @@ -14602,12 +14602,12 @@ cdef class GiacMethods_base: Help for remain: remain(Intg(a),Intg(b)) Euclidean remainder of 2 integers. - See also: 1/ iquo 2/ smod 3/ rem 4/ mod + See also: 1/ iquo 2/ smod 3/ rem 4/ mod Ex1:remain(125,15) Ex2:remain(125,41) Ex3:remain(-7,3) Ex4:remain(25+12*i,5+7*i) - + ''' return GiacMethods['remain'](self,*args) @@ -14616,10 +14616,10 @@ cdef class GiacMethods_base: Help for remove: remove(FncBool(f)||a,Lst(l)) Remove the occurrences a of l or the elements a such that f(a)=true. - See also: 1/ select 2/ suppress + See also: 1/ select 2/ suppress Ex1:remove(x->x>=5,[1,2,6,7]) Ex2:remove(5,[1,2,5,6,7,5]) - + ''' return GiacMethods['remove'](self,*args) @@ -14628,10 +14628,10 @@ cdef class GiacMethods_base: Help for reorder: reorder(Expr, LstVar) Reorders the variables in E according to the order of the 2nd argument. - See also: 1/ + See also: 1/ Ex1:reorder(-2) Ex2:reorder(x^2+2*x+y^2,[y,x]) - + ''' return GiacMethods['reorder'](self,*args) @@ -14640,10 +14640,10 @@ cdef class GiacMethods_base: Help for resample: resample(Lst(clip),[Intg(s),[Intg(q)]]) Returns a copy of the input audio clip resampled to the rate s (by default 44100), optionally with quality level q (from 0 to 4, by default 2). - See also: 1/ samplerate 2/ playsnd 3/ readwav 4/ writewav + See also: 1/ samplerate 2/ playsnd 3/ readwav 4/ writewav Ex1:resample(readwav("/some/file"),48000) Ex2:resample(readwav("/some/file"),48000,3) - + ''' return GiacMethods['resample'](self,*args) @@ -14652,12 +14652,12 @@ cdef class GiacMethods_base: Help for residue: residue(Expr,Var(v),Cplx(a)) Returns the residue in a of the expression with v as variable. - See also: 1/ series + See also: 1/ series Ex1:residue(1/z,z,0) Ex2:residue(5/z,z=0) Ex3:residue(cos(z)/(z*(z-b)),z,0) Ex4:residue(c/(z*(z-b)),z=b) - + ''' return GiacMethods['residue'](self,*args) @@ -14666,12 +14666,12 @@ cdef class GiacMethods_base: Help for resoudre: resoudre(Expr,[Var]) Solves a (or a set of) polynomial equation. - See also: 1/ linsolve 2/ proot 3/ fsolve 4/ csolve 5/ nSolve + See also: 1/ linsolve 2/ proot 3/ fsolve 4/ csolve 5/ nSolve Ex1:resoudre(x^2-3=1) Ex2:resoudre(x^3-3*y,y) Ex3:resoudre([y-z=0,z-x=0,x-y=0,x-1+y+z=0],[x,y,z]) Ex4:resoudre([x^2-y^2=0,x^2-z^2=0],[x,y,z]) - + ''' return GiacMethods['resoudre'](self,*args) @@ -14680,12 +14680,12 @@ cdef class GiacMethods_base: Help for resoudre_dans_C: resoudre_dans_C(LstEq,LstVar) Returns the list of complex solutions of an equation or a matrix where the rows are ℂ-solutions of a system of polynomial equations. - See also: 1/ cZeros 2/ solve 3/ fslove + See also: 1/ cZeros 2/ solve 3/ fslove Ex1:resoudre_dans_C(x^4-1,x) Ex2:resoudre_dans_C(x^4-y^4 and x+y=2,[x,y]) Ex3:resoudre_dans_C(x^4-y^4 and x+y=0 and x^2=2*x,[x,y]) Ex4:resoudre_dans_C(u*v-u=v and v^2=u,[u,v]) - + ''' return GiacMethods['resoudre_dans_C'](self,*args) @@ -14694,17 +14694,17 @@ cdef class GiacMethods_base: Help for resoudre_systeme_lineaire: resoudre_systeme_lineaire(LstLinEq,LstVar) Linear equations system solver. - See also: 1/ solve 2/ proot 3/ simult 4/ gaussjord 5/ pivot 6/ ref 7/ conjugate_gradient + See also: 1/ solve 2/ proot 3/ simult 4/ gaussjord 5/ pivot 6/ ref 7/ conjugate_gradient Ex1:resoudre_systeme_lineaire([x+y+z=1,x-y=2,2*x-z=3],[x,y,z]) Ex2:resoudre_systeme_lineaire([m*x+y=a,x+m*y=b],[x,y]) Ex3:resoudre_systeme_lineaire([x+y-z-1,x-y+1,x-y-z-1]%2,[x,y,z]) Ex4:resoudre_systeme_lineaire([[3,4],[1,2]],[0,1]) - Ex5: p,l,u:=lu([[3,4],[1,2]]); linsolve(p,l,u,[0,1]) + Ex5: p,l,u:=lu([[3,4],[1,2]]); linsolve(p,l,u,[0,1]) Ex6:resoudre_systeme_lineaire([2*x+y+z=1,x+y+2*z=1,x+2*y+z=4],[x,y,z]) Ex7:resoudre_systeme_lineaire([[2,1,1],[1,1,2],[1,2,1]],[1,1,4]) Ex8: p,l,u:=lu([[2,1,1],[1,1,2],[1,2,1]]);linsolve(p,l,u,[1,1,4]) Ex9: a:=[[100,2],[2,100]];linsolve(evalf(a),[0,1]); - + ''' return GiacMethods['resoudre_systeme_lineaire'](self,*args) @@ -14713,10 +14713,10 @@ cdef class GiacMethods_base: Help for resultant: resultant(Poly,Poly,Var) Resultant of two polynomials. - See also: 1/ sylvester 2/ gcd + See also: 1/ sylvester 2/ gcd Ex1:resultant(x^2-1,x^3-1,x) Ex2:resultant(x^3-p*x+q,3*x^2-p,x) - + ''' return GiacMethods['resultant'](self,*args) @@ -14729,7 +14729,7 @@ cdef class GiacMethods_base: Ex2: L:=[1,2,3,4];L:=revlist(L) Ex3: L:=[1,2,3,4];L.revlist() Ex4: L:=[1,2,3,4];L.reverse() - + ''' return GiacMethods['reverse'](self,*args) @@ -14738,9 +14738,9 @@ cdef class GiacMethods_base: Help for reverse_graph: reverse_graph(Graph(G)) Returns the copy of G with the directions of all edges reversed. - See also: 1/ digraph + See also: 1/ digraph Ex1:reverse_graph(digraph(%{[1,2],[1,3],[2,3]%})) - + ''' return GiacMethods['reverse_graph'](self,*args) @@ -14749,9 +14749,9 @@ cdef class GiacMethods_base: Help for reverse_rsolve: reverse_rsolve(Vect(v)) If v=[v_0 ... v_(2n-1)], returns [b_n,...,b_0] such that b_n*v_{n+k}+...+b_0*v_k=0 for k=0..n-1. - See also: 1/ rsolve + See also: 1/ rsolve Ex1:reverse_rsolve([1,-1,3,3]) - + ''' return GiacMethods['reverse_rsolve'](self,*args) @@ -14760,9 +14760,9 @@ cdef class GiacMethods_base: Help for revert: revert(Expr) Returns the inverse expansion of a series expansion at 0. - See also: 1/ series + See also: 1/ series Ex1:revert(x+x^2+x^4) - + ''' return GiacMethods['revert'](self,*args) @@ -14771,8 +14771,8 @@ cdef class GiacMethods_base: Help for revlex: revlex(Opt) Option of the gbasis or greduce command to specify an order for monomials (complete degree then inverse lexicographic order). - See also: 1/ gbasis 2/ greduce - + See also: 1/ gbasis 2/ greduce + ''' return GiacMethods['revlex'](self,*args) @@ -14785,7 +14785,7 @@ cdef class GiacMethods_base: Ex2: L:=[1,2,3,4];L:=revlist(L) Ex3: L:=[1,2,3,4];L.revlist() Ex4: L:=[1,2,3,4];L.reverse() - + ''' return GiacMethods['revlist'](self,*args) @@ -14794,14 +14794,14 @@ cdef class GiacMethods_base: Help for rgb: rgb(Opt) Option of the display (or affichage) command to defined colors RGB. - See also: 1/ display 2/ filled + See also: 1/ display 2/ filled Ex1: redcolor:=rgb(0.99,0,0);display(square(0,2+i),filled+redcolor) Ex2: greencolor:=rgb(0,0.99,0);display(square(0,2+i),filled+greencolor) Ex3: bluecolor:=rgb(0,0,0.99);display(square(0,2+i),filled+bluecolor) Ex4: greycolor:=rgb(0.5,0.5,0.5);display(square(0,2+i),filled+greycolor) Ex5: F:=display(square(0,2+i),filled+rgb(rand(),rand(),rand())) Ex6: L:=rand(),rand(),rand();affichage(square(0,2+i),rgb(L)+rempli);legend(0.2,[L]) - + ''' return GiacMethods['rgb'](self,*args) @@ -14810,13 +14810,13 @@ cdef class GiacMethods_base: Help for rhombus: rhombus(Pnt(A)||Cplx,Pnt(B)||Cplx,Angle(a)||Pnt(P)||Lst(P,a)),[Var(C)],[Var(D)]) Returns and draws the rhombus ABCD such that the angle (AB,AD)=a (or in the plane ABP angle(AB,AD)=angle(AB,AP) or such that angle(AB,AD)=a). - See also: 1/ square 2/ quadrilateral + See also: 1/ square 2/ quadrilateral Ex1:rhombus(i,1+i,pi/4) Ex2:rhombus(i,1+i,pi/4,C,D) Ex3:rhombus(point(0,0,0),point(3,3,3),[point(0,0,3),pi/4]) Ex4:rhombus(point(0,0,0),point(3,3,3),point(0,0,3),C,D) Ex5:rhombus(point(0,0,0),point(3,3,3),[point(0,0,3),pi/4],C,D) - + ''' return GiacMethods['rhombus'](self,*args) @@ -14825,10 +14825,10 @@ cdef class GiacMethods_base: Help for rhombus_point: rhombus_point(Opt) Option of the display command for a point. - See also: 1/ display + See also: 1/ display Ex1: F:=display(point(2+1.5*i),point_point) Ex2: F:=display(point(2+1.5*i),rhombus_point) - + ''' return GiacMethods['rhombus_point'](self,*args) @@ -14837,12 +14837,12 @@ cdef class GiacMethods_base: Help for rhs: rhs(Equal(a=b) or Interval(a..b) or Str,Intg) Returns the right part of an equality, of an interval, of a list or of a string. - See also: 1/ left 2/ mid 3/ tail 4/ head + See also: 1/ left 2/ mid 3/ tail 4/ head Ex1:rhs(a=b) Ex2:rhs(x^2+1=5) Ex3:rhs(1..5) Ex4:rhs("abcdefg",3) - + ''' return GiacMethods['rhs'](self,*args) @@ -14851,9 +14851,9 @@ cdef class GiacMethods_base: Help for riemann_window: riemann_window(Lst,[Interval(n1..n2)]) Applies the Riemann windowing function to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ bartlett_hann_window 12/ triangle_window 13/ tukey_window 14/ welch_window + See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ bartlett_hann_window 12/ triangle_window 13/ tukey_window 14/ welch_window Ex1: scatterplot(riemann_window(randvector(1000,0..1))) - + ''' return GiacMethods['riemann_window'](self,*args) @@ -14862,12 +14862,12 @@ cdef class GiacMethods_base: Help for right: right(Equal(a=b) or Interval(a..b) or Str,Intg) Returns the right part of an equality, of an interval, of a list or of a string. - See also: 1/ left 2/ mid 3/ tail 4/ head + See also: 1/ left 2/ mid 3/ tail 4/ head Ex1:right(a=b) Ex2:right(x^2+1=5) Ex3:right(1..5) Ex4:right("abcdefg",3) - + ''' return GiacMethods['right'](self,*args) @@ -14876,14 +14876,14 @@ cdef class GiacMethods_base: Help for right_rectangle: right_rectangle(Opt) Option of the plotarea command and of the area command. - See also: 1/ plotarea 2/ area + See also: 1/ plotarea 2/ area Ex1: plotarea(x^2,x=0..1,5,trapezoid) Ex2: plotarea(x^2,x=0..1,5,middle_point) Ex3: plotarea(x^2,x=0..1,5,right_rectangle) Ex4: plotarea(x^2,x=0..1,5,left_rectangle) Ex5: area(x^2,x=0..1,5,middle_point) Ex6: area(x^2,x=0..1,5,trapezoid) - + ''' return GiacMethods['right_rectangle'](self,*args) @@ -14892,13 +14892,13 @@ cdef class GiacMethods_base: Help for right_triangle: right_triangle((Pnt(A) or Cplx),(Pnt(B) or Cplx),(Real(k) or Pnt(P) or Lst(P,k)),[Var(C)]) Draws the A_rectangular triangle ABC with AC=k*AB (or in the plane ABP AC=AP or AC=k*AB). - See also: 1/ triangle + See also: 1/ triangle Ex1:right_triangle(1,i,tan(pi/3)) Ex2:right_triangle(1,i,1/2,C) Ex3:right_triangle(point(0,0,0),point(3,3,3),point(0,0,3)) Ex4:right_triangle(point(0,0,0),point(3,3,3),[point(0,0,3),1/2],C) Ex5:right_triangle(point(0,0,0),point(3,3,3),[point(0,0,3),1/2],C) - + ''' return GiacMethods['right_triangle'](self,*args) @@ -14907,11 +14907,11 @@ cdef class GiacMethods_base: Help for risch: risch(Expr,[Var]) Returns a primitive of the expression calculated with the Risch algorithm. - See also: 1/ int + See also: 1/ int Ex1:risch(ln(x),x) Ex2:risch(ln(x)) Ex3:risch(exp(x^2),x) - + ''' return GiacMethods['risch'](self,*args) @@ -14920,9 +14920,9 @@ cdef class GiacMethods_base: Help for rm_a_z: rm_a_z(NULL) Erases all the variable name made up of only one lowercase a..z character. - See also: 1/ rm_all_vars + See also: 1/ rm_all_vars Ex1:rm_a_z() - + ''' return GiacMethods['rm_a_z'](self,*args) @@ -14931,9 +14931,9 @@ cdef class GiacMethods_base: Help for rm_all_vars: rm_all_vars(NULL) Erases all the variable names. - See also: 1/ rm_a_z + See also: 1/ rm_a_z Ex1:rm_all_vars() - + ''' return GiacMethods['rm_all_vars'](self,*args) @@ -14942,9 +14942,9 @@ cdef class GiacMethods_base: Help for rmbreakpoint: rmbreakpoint(Intg) Removes a breakpoint. - See also: 1/ breakpoint + See also: 1/ breakpoint Ex1:rmbreakpoint(1) - + ''' return GiacMethods['rmbreakpoint'](self,*args) @@ -14953,9 +14953,9 @@ cdef class GiacMethods_base: Help for rmmod: rmmod(Str(pwd)) Removes the installed dynamic libraries. - See also: 1/ lsmod 2/ insmod + See also: 1/ lsmod 2/ insmod Ex1:rmmod("/home/parisse/giac/src/libprogfr.so") - + ''' return GiacMethods['rmmod'](self,*args) @@ -14964,9 +14964,9 @@ cdef class GiacMethods_base: Help for rmwatch: rmwatch(Var) Clears a variables from the table of displayed variables in step/step. - See also: 1/ watch + See also: 1/ watch Ex1:rmwatch(a) - + ''' return GiacMethods['rmwatch'](self,*args) @@ -14975,11 +14975,11 @@ cdef class GiacMethods_base: Help for romberg: romberg(Expr(f(x)),Var(x),Real(a),Real(b)) Returns the approximate value of integrate(f(x),x,a,b) by Romberg's method. - See also: 1/ integrate 2/ gaussquad + See also: 1/ integrate 2/ gaussquad Ex1:romberg(exp(x^2),x,0,1) Ex2:romberg(x^2,x,0,1) Ex3:romberg(exp(-x^2),x,-1,1) - + ''' return GiacMethods['romberg'](self,*args) @@ -14988,12 +14988,12 @@ cdef class GiacMethods_base: Help for rombergm: rombergm(Opt) Option of the area command. - See also: 1/ area + See also: 1/ area Ex1: area(x^2,x=0..1,5,simpson) Ex2: area(x^2,x=0..1,5,rombergt) Ex3: area(x^2,x=0..1,5,rombergm) Ex4:rombergm(area(x^2,x=0..1,5,gauss15)) - + ''' return GiacMethods['rombergm'](self,*args) @@ -15002,12 +15002,12 @@ cdef class GiacMethods_base: Help for rombergt: rombergt(Opt) Option of the area command. - See also: 1/ area + See also: 1/ area Ex1: area(x^2,x=0..1,5,simpson) Ex2: area(x^2,x=0..1,5,rombergt) Ex3: area(x^2,x=0..1,5,rombergm) Ex4:rombergt(area(x^2,x=0..1,5,gauss15)) - + ''' return GiacMethods['rombergt'](self,*args) @@ -15016,12 +15016,12 @@ cdef class GiacMethods_base: Help for rond: rond(Real(r),[Real(a)],[Real(b)]) Draws a circle (resp a arc) with radius r (resp and with angle (0,a) or (a,b)), tangent at the turtle position. - See also: 1/ disque + See also: 1/ disque Ex1: rond 30 Ex2:rond(40) Ex3:rond(40,90) Ex4:rond(40,10,100) - + ''' return GiacMethods['rond'](self,*args) @@ -15030,12 +15030,12 @@ cdef class GiacMethods_base: Help for root: root(Expr(a),Expr(b)) Returns b^(1/a) (root(2,3)=sqrt(3)). - See also: 1/ + See also: 1/ Ex1:root(3,2) Ex2:root(1/3,2) Ex3:root(3,1.2) Ex4:root(3.2,1.2) - + ''' return GiacMethods['root'](self,*args) @@ -15044,11 +15044,11 @@ cdef class GiacMethods_base: Help for rootof: rootof(LstPoly(P),LstPoly(Q)) Polynomial in terms of a root of an irreducible polynomial on Q. Returns P(a) with a the greatest root of Q. - See also: 1/ + See also: 1/ Ex1: normal(1/rootof([1,0],[1,0,10,0,1])) Ex2: normal(1/rootof([1,0,0],[1,1,0,-1])) - Ex3: rootof(x^4+x+1):='j'; normal(j^5); - + Ex3: rootof(x^4+x+1):='j'; normal(j^5); + ''' return GiacMethods['rootof'](self,*args) @@ -15057,10 +15057,10 @@ cdef class GiacMethods_base: Help for roots: roots(Poly,[Var]) Returns a matrix having 2 columns and where the rows are the roots of the polynomial with their multiplicity (for 1 variable). - See also: 1/ proot 2/ cZeros + See also: 1/ proot 2/ cZeros Ex1:roots(t^3-1,t) Ex2:roots(x^5-2*x^4+x^3) - + ''' return GiacMethods['roots'](self,*args) @@ -15069,7 +15069,7 @@ cdef class GiacMethods_base: Help for rotate: rotate(Lst||Str(L),[Intg(n)]) Returns the list where the last element [or the tail beginning with the n-th element] is moved to the first element (by default n=-1);L:=rotate(L,n) or L.rotate(n). - See also: 1/ tail 2/ mid 3/ shift + See also: 1/ tail 2/ mid 3/ shift Ex1:rotate([0,1,2,3],2) Ex2:rotate([[1,2,3],[4,5,6],[7,8,9]]) Ex3:rotate([0,1,2,3,4]) @@ -15078,7 +15078,7 @@ cdef class GiacMethods_base: Ex6: L:=[0,1,2,3,4];L.rotate() Ex7: L:=[0,1,2,3];L:=rotate([0,1,2,3],2) Ex8: L:=[0,1,2,3];L.rotate(2) - + ''' return GiacMethods['rotate'](self,*args) @@ -15087,13 +15087,13 @@ cdef class GiacMethods_base: Help for rotation: rotation((Pnt(B) or Cplx or Dr3),Angle(a1),(Pnt(A) or Curve)) rotation(B,a1,A) (resp rotation(d,a1,A)) is the transformation of A by rotation with center B (resp of axis d) and angle a1. - See also: 1/ translation 2/ reflection + See also: 1/ translation 2/ reflection Ex1:rotation(point(1+i),pi/2,point(i)) Ex2:rotation(1+i,pi/3,line(i,1)) Ex3:rotation(line(x=y,y=z),pi/2,point(1,-1,2)) Ex4: r:=rotation(1+i,pi/2);r(i) Ex5: r:=rotation(line(x=y,y=z),pi/2);r(point(1,-1,2)) - + ''' return GiacMethods['rotation'](self,*args) @@ -15102,13 +15102,13 @@ cdef class GiacMethods_base: Help for round: round(Real or Cplx,[Intg(n)]) Rounds the real or complex to the nearest integer (resp the nearest decimal number) or to the nearest element of ℤ[i], (resp with n decimals). - See also: 1/ floor 2/ ceil + See also: 1/ floor 2/ ceil Ex1:round(2.5) Ex2:round(-2.4) Ex3:round(-2.5+i*2.4) Ex4:round(1.237,2) Ex5:round(sqrt(2)+i*sqrt(5),4) - + ''' return GiacMethods['round'](self,*args) @@ -15117,11 +15117,11 @@ cdef class GiacMethods_base: Help for row: row(Mtrx(A),Intg(n)||Interval(n1..n2)) Returns row n or the sequence of the rows n1..n2 of the matrix A, or optional argument of count,count_eq,count_inf,count_sup. - See also: 1/ col 2/ count 3/ count_eq 4/ count_inf 5/ count_sup + See also: 1/ col 2/ count 3/ count_eq 4/ count_inf 5/ count_sup Ex1:row([[1,2,3],[4,5,6],[7,8,9]],1) Ex2:row([[1,2,3],[4,5,6],[7,8,9]],0..1) Ex3: count_eq(3,[[1,2,3],[4,3,2],[3,2,1]],row) - + ''' return GiacMethods['row'](self,*args) @@ -15130,9 +15130,9 @@ cdef class GiacMethods_base: Help for rowAdd: rowAdd(Mtrx(A),Intg(n1),Intg(n2)) Returns the matrix obtained from A by replacing the n2-th row by the sum of the n1-th and n2-th rows. - See also: 1/ rowSwap + See also: 1/ rowSwap Ex1:rowAdd([[1,2],[3,4],[5,6]],1,2) - + ''' return GiacMethods['rowAdd'](self,*args) @@ -15141,10 +15141,10 @@ cdef class GiacMethods_base: Help for rowDim: rowDim(Mtrx) Number of rows of a matrix. - See also: 1/ ncols + See also: 1/ ncols Ex1:rowDim([[1,2,3],[4,5,6]]) Ex2:rowDim([[1,2],[3,4],[5,6]]) - + ''' return GiacMethods['rowDim'](self,*args) @@ -15153,10 +15153,10 @@ cdef class GiacMethods_base: Help for rowNorm: rowNorm(Vect or Mtrx) Returns the max of the l1_norm of the rows of a matrix: rowNorm(a_{j,k})=max_j(sum_k(|a_{j,k}|)). - See also: 1/ norm + See also: 1/ norm Ex1:rowNorm([[1,2],[3,-4]]) Ex2:rowNorm([[1,2,3,-4],[-5,3,2,1]]) - + ''' return GiacMethods['rowNorm'](self,*args) @@ -15165,9 +15165,9 @@ cdef class GiacMethods_base: Help for rowSwap: rowSwap(Mtrx(A),Intg(n1),Intg(n2)) Returns the matrix obtained from A by swapping the n1-th row and the n2-th row. - See also: 1/ rowAdd 2/ colSwap + See also: 1/ rowAdd 2/ colSwap Ex1:rowSwap([[1,2],[3,4],[5,6]],1,2) - + ''' return GiacMethods['rowSwap'](self,*args) @@ -15176,10 +15176,10 @@ cdef class GiacMethods_base: Help for rowdim: rowdim(Mtrx) Number of rows of a matrix. - See also: 1/ ncols + See also: 1/ ncols Ex1:rowdim([[1,2,3],[4,5,6]]) Ex2:rowdim([[1,2],[3,4],[5,6]]) - + ''' return GiacMethods['rowdim'](self,*args) @@ -15188,10 +15188,10 @@ cdef class GiacMethods_base: Help for rownorm: rownorm(Vect or Mtrx) Returns the max of the l1_norm of the rows of a matrix: rowNorm(a_{j,k})=max_j(sum_k(|a_{j,k}|)). - See also: 1/ norm + See also: 1/ norm Ex1:rownorm([[1,2],[3,-4]]) Ex2:rownorm([[1,2,3,-4],[-5,3,2,1]]) - + ''' return GiacMethods['rownorm'](self,*args) @@ -15200,10 +15200,10 @@ cdef class GiacMethods_base: Help for rowspace: rowspace(Mtrx(A), [Var(d)]) Returns a matrix where the rows are a basis of the vector space generated by the rows of the matrix A [d is the dimension of this space]. - See also: 1/ colspace + See also: 1/ colspace Ex1:rowspace([[1,2,3],[1,2,3],[1,2,4],[1,2,5]]) Ex2:rowspace([[1,2,3],[1,3,6],[2,5,9]],d) - + ''' return GiacMethods['rowspace'](self,*args) @@ -15212,9 +15212,9 @@ cdef class GiacMethods_base: Help for rowswap: rowswap(Mtrx(A),Intg(n1),Intg(n2)) Returns the matrix obtained from A by swapping the n1-th row and the n2-th row. - See also: 1/ rowAdd 2/ colSwap + See also: 1/ rowAdd 2/ colSwap Ex1:rowswap([[1,2],[3,4],[5,6]],1,2) - + ''' return GiacMethods['rowswap'](self,*args) @@ -15223,12 +15223,12 @@ cdef class GiacMethods_base: Help for rref: rref(Mtrx(M),[Intg(k)]||Opt) Row reduction to echelon form of AX=b (M=A|(-b)) [Reduction on columns 0..k-1]. - See also: 1/ ker 2/ image 3/ det 4/ Rref 5/ pivot 6/ ref 7/ keep_pivot + See also: 1/ ker 2/ image 3/ det 4/ Rref 5/ pivot 6/ ref 7/ keep_pivot Ex1:rref([[3,1,-2],[3,2,2]]) Ex2:rref([[2,1,1,-1],[1,1,2,-1],[1,2,1,-4]]) Ex3:rref([[2,1,1,-1],[1,1,2,-1],[1,2,1,-4]],2) Ex4:rref([[1,1,0,0,-a1],[0,1,1,0,-a2],[0,0,1,1,-a3],[1,0,0,1,-a4]],keep_pivot) - + ''' return GiacMethods['rref'](self,*args) @@ -15237,13 +15237,13 @@ cdef class GiacMethods_base: Help for rsolve: rsolve((Expr or LstExpr),(Var or LstVar),(InitVal or LstInitVal)) Gives the value of a recurrent sequence or of a system of recurrent sequences. - See also: 1/ seqsolve 2/ plotseq 3/ tableseq 4/ reverse_rsolve + See also: 1/ seqsolve 2/ plotseq 3/ tableseq 4/ reverse_rsolve Ex1:rsolve(u(n+1)=2*u(n)+n,u(n),u(0)=1) Ex2:rsolve(u(n+1)=2*u(n)+n,u(n),u(1)^2=1) Ex3:rsolve(u(n+1)=(u(n)-1)/(u(n)-2),u(n),u(0)=4) Ex4:rsolve(u(n+2)=u(n)+2*u(n+1)+n+1,u(n),[u(0)=0,u(1)=1]) Ex5:rsolve([u(n+1)=3*v(n)+u(n),v(n+1)=v(n)+u(n)],[u(n),v(n)],[u(0)=1,v(0)=2]) - + ''' return GiacMethods['rsolve'](self,*args) @@ -15252,10 +15252,10 @@ cdef class GiacMethods_base: Help for same: same(Expr,Expr) Equality test. - See also: 1/ + See also: 1/ Ex1:same(a,b) Ex2:same((2-1)^2,2^2-2*2+1) - + ''' return GiacMethods['same'](self,*args) @@ -15264,14 +15264,14 @@ cdef class GiacMethods_base: Help for sample: sample(Lst(L),Intg(n)) sample(L,n)= rand(n,L)=list of the n extracted elements of L without replacement. - See also: 1/ rand + See also: 1/ rand Ex1:sample([1,2,3,4,5,6],6) Ex2:sample([1,2,3,4,5,6],3) Ex3:sample(["r","r","r","b","n"],3) Ex4: L:=[1,2,3,4,5,6];L:=sample(L,3) Ex5: L:=[1,2,3,4,5,6];L.sample(3) - Ex6: - + Ex6: + ''' return GiacMethods['sample'](self,*args) @@ -15280,9 +15280,9 @@ cdef class GiacMethods_base: Help for samplerate: samplerate(Lst(clip)) Returns the sampling rate of an audio clip, in Hertz. - See also: 1/ bit_depth 2/ channels 3/ channel_data 4/ duration + See also: 1/ bit_depth 2/ channels 3/ channel_data 4/ duration Ex1:samplerate(readwav("/some/file")) - + ''' return GiacMethods['samplerate'](self,*args) @@ -15291,13 +15291,13 @@ cdef class GiacMethods_base: Help for sans_factoriser: sans_factoriser(Opt.) Option of the plotimplicit command. - See also: 1/ plotimplicit + See also: 1/ plotimplicit Ex1: plotimplicit(x^2+y^2-1,x,y,unfactored) Ex2: plotimplicit(x^2+y^2-1,[x,y],unfactored) Ex3: plotimplicit(x^2+y^2+z^2-1,x,y,z,xstep=0.2,ystep=0.2,zstep=0.2,unfactored) Ex4: plotimplicit(x^2+y^2+z^2-1,[x,y,z],xstep=0.2,ystep=0.2,zstep=0.2,unfactored) Ex5: plotimplicit(x^2+y^2+z^2-1,x=0..1,y=0..1,z=0..1,xstep=0.2,ystep=0.2,zstep=0.2,unfactored) - + ''' return GiacMethods['sans_factoriser'](self,*args) @@ -15306,10 +15306,10 @@ cdef class GiacMethods_base: Help for saute: saute(NULL or Real(n)) The turtle takes n steps forward without traces (by default n=10). - See also: 1/ avance 2/ recule + See also: 1/ avance 2/ recule Ex1: saute 30 Ex2:saute(30) - + ''' return GiacMethods['saute'](self,*args) @@ -15318,11 +15318,11 @@ cdef class GiacMethods_base: Help for scalarProduct: scalarProduct(Vect(v1),Vect(v2)) Scalar product. - See also: 1/ * 2/ cross 3/ .* 4/ hadamard + See also: 1/ * 2/ cross 3/ .* 4/ hadamard Ex1:scalarProduct([1,2],[3,4]) Ex2:scalarProduct([3,2,4],[3,2,4]) Ex3:scalarProduct([[1,2],[3,4]],[[3,2],[4,5]]) - + ''' return GiacMethods['scalarProduct'](self,*args) @@ -15331,11 +15331,11 @@ cdef class GiacMethods_base: Help for scalar_product: scalar_product(Vect(v1),Vect(v2)) Scalar product. - See also: 1/ * 2/ cross 3/ .* 4/ hadamard + See also: 1/ * 2/ cross 3/ .* 4/ hadamard Ex1:scalar_product([1,2],[3,4]) Ex2:scalar_product([3,2,4],[3,2,4]) Ex3:scalar_product([[1,2],[3,4]],[[3,2],[4,5]]) - + ''' return GiacMethods['scalar_product'](self,*args) @@ -15344,9 +15344,9 @@ cdef class GiacMethods_base: Help for scatterplot: scatterplot(Mtrx) Draws for k=0..nrows, the points (xk,yk) where xk=element row k column 0 and yk=element row k column j (j=1..ncols). - See also: 1/ polygonplot 2/ polygonscatterplot 3/ listplot + See also: 1/ polygonplot 2/ polygonscatterplot 3/ listplot Ex1:scatterplot([[1,2,3],[2,0,1],[-1,2,3]]) - + ''' return GiacMethods['scatterplot'](self,*args) @@ -15355,10 +15355,10 @@ cdef class GiacMethods_base: Help for schur: schur(Mtrx(A)) Matrix reduction to Hessenberg form. Returns [P,B] such that B=inv(P)*A*P:SCHUR(A)=hessenberg(A,-1). - See also: 1/ hessenberg + See also: 1/ hessenberg Ex1:schur([[1,2,3],[4,5,6],[7,8,1]]) Ex2:schur([[1,2,3,4],[4,5,6,7],[7,8,9,0],[0,1,2,3]]) - + ''' return GiacMethods['schur'](self,*args) @@ -15367,9 +15367,9 @@ cdef class GiacMethods_base: Help for sec: sec(Expr) Secant: sec(x)=1/cos(x). - See also: 1/ cos 2/ asec + See also: 1/ cos 2/ asec Ex1:sec(pi/3) - + ''' return GiacMethods['sec'](self,*args) @@ -15378,14 +15378,14 @@ cdef class GiacMethods_base: Help for secant_solver: secant_solver(Opt) Argument for fsolve giving the method for solving a numerical equation. - See also: 1/ fsolve + See also: 1/ fsolve Ex1: fsolve(cos(x)=x,x,0..1,bisection_solver) Ex2: fsolve(cos(x)=x,x,0..1,brent_solver) Ex3: fsolve(cos(x)=x,x,0..1,falsepos_solver) Ex4: fsolve(cos(x)=x,x,0,newton_solver) Ex5: fsolve(cos(x)=x,x,0,secant_solver) Ex6: fsolve(cos(x)=x,x,0,steffenson_solver) - + ''' return GiacMethods['secant_solver'](self,*args) @@ -15394,7 +15394,7 @@ cdef class GiacMethods_base: Help for segment: segment((Pnt or Cplx or Lst([xM,yM])),(Pnt or Cplx or Lst([xN,yN]),[Var],[Var] or Opt) segment(A,B) draws the segment AB and segment([xM,yM],[xN,yN]) draws the vector as origin [xM,yM], of coordinates [xN,yN] (i.e draws segment(M,point(M+N)) or Option of the arc command. - See also: 1/ line 2/ arc + See also: 1/ line 2/ arc Ex1:segment(i,1+i) Ex2:segment(point(i),point(1+i)) Ex3:segment(point(i),point(1+i),A,B) @@ -15402,7 +15402,7 @@ cdef class GiacMethods_base: Ex5:segment([-1,0],point([-1,0]+[2,1])) Ex6: arc(i,1,pi/4,segment) Ex7: affichage( arc(i,1,pi/4,segment),1+rempli) - + ''' return GiacMethods['segment'](self,*args) @@ -15411,9 +15411,9 @@ cdef class GiacMethods_base: Help for seidel_spectrum: seidel_spectrum(Graph(G)) Returns the Seidel spectrum of G as a list of lists with two elements, each containing an eigenvalue and its multiplicity. - See also: 1/ graph_spectrum + See also: 1/ graph_spectrum Ex1:seidel_spectrum(graph("clebsch")) - + ''' return GiacMethods['seidel_spectrum'](self,*args) @@ -15422,9 +15422,9 @@ cdef class GiacMethods_base: Help for seidel_switch: seidel_switch(Graph(G),Lst(V)) Returns a copy of G in which the edges between vertices in list V and vertices not in V are inverted (replaced with a set of edges from V to other vertices which are not present in G). - See also: 1/ neighbors 2/ graph_complement + See also: 1/ neighbors 2/ graph_complement Ex1:seidel_switch(cycle_graph(5),[1,2]) - + ''' return GiacMethods['seidel_switch'](self,*args) @@ -15433,10 +15433,10 @@ cdef class GiacMethods_base: Help for select: select(FncBool(f),Lst(l)) Selects the elements e of l such that f(e)=true. - See also: 1/ remove 2/ range + See also: 1/ remove 2/ range Ex1:select(x->x>=5,[1,2,6,7]) Ex2:select(x->isprime(x),range(20)).^2 - + ''' return GiacMethods['select'](self,*args) @@ -15445,9 +15445,9 @@ cdef class GiacMethods_base: Help for semi_augment: semi_augment(Mtrx(A),Mtrx(B)) Returns a matrix made with A and B, with n1+n2 rows and p columns if dim(A)=[n1,p] and dim(B)=[n2,p]. - See also: 1/ augment + See also: 1/ augment Ex1:semi_augment([[68,-21],[56,59],[1,2]],[[68,-21],[56,59]]) - + ''' return GiacMethods['semi_augment'](self,*args) @@ -15455,8 +15455,8 @@ cdef class GiacMethods_base: r'''From Giac's documentation: Help for seq: seq(Expr(Xpr),Var(Var)=Int(a..b),[Real(p)]||Expr(Xpr),Var(Var),Real(a),Real(b),[Real(p)]) - Returns the sequence (2 or 3 arg) or the list (4 or 5 arg) obtained when var goes from a to b (step p) in Xpr (or the Xpr is repeated n times or returns the sequence of reals from a to b (step p)). And also seq(expression,variable,list) is equivalent to map(list,unapply(expression,variable)) - See also: 1/ $ 2/ makelist 3/ range 4/ map 5/ unapply + Returns the sequence (2 or 3 arg) or the list (4 or 5 arg) obtained when var goes from a to b (step p) in Xpr (or the Xpr is repeated n times or returns the sequence of reals from a to b (step p)). And also seq(expression,variable,list) is equivalent to map(list,unapply(expression,variable)) + See also: 1/ $ 2/ makelist 3/ range 4/ map 5/ unapply Ex1:seq(0.3,4) Ex2:seq(t,4) Ex3:seq(0,0) @@ -15466,9 +15466,9 @@ cdef class GiacMethods_base: Ex7:seq(2^k,k,0,8) Ex8:seq(2^k,k,0,8,2) Ex9:seq(x^3,x,[1,2,3]) - Ex10: [seq(0.3..2,0.2)] + Ex10: [seq(0.3..2,0.2)] Ex11: a:=(1,2,3);eval(seq(a,4)) - + ''' return GiacMethods['seq'](self,*args) @@ -15477,11 +15477,11 @@ cdef class GiacMethods_base: Help for seqplot: seqplot(Expr(f(Var)),Var=[a,xm,xM],Intg(p)) For seeing the pth terms of the sequence u(0)=a,u(n)=f(u(n-1)). - See also: 1/ seqsolve 2/ rsolve + See also: 1/ seqsolve 2/ rsolve Ex1:seqplot(sqrt(2+x),6,5) Ex2:seqplot(sqrt(2+t),t=6,5) Ex3:seqplot(sqrt(2+x),x=[6,1,7],5,affichage=epaisseur_ligne_2) - + ''' return GiacMethods['seqplot'](self,*args) @@ -15490,14 +15490,14 @@ cdef class GiacMethods_base: Help for seqsolve: seqsolve((Expr or LstExpr),(Var or LstVar),(InitVal or LstInitVal)) Gives the value of a recurrent sequence (u_{n+1}=f(u_n) or u_{n+k}=f(u_n,u_{n+1}...u_{n+k-1})) or of a system of recurrent sequences. - See also: 1/ rsolve 2/ plotseq 3/ tableseq + See also: 1/ rsolve 2/ plotseq 3/ tableseq Ex1:seqsolve(2x+n,[x,n],1) Ex2:seqsolve(2x+n*3^n,[x,n],1) Ex3:seqsolve(x+y,[x,y,n],[1,1]) Ex4:seqsolve(x+2*y+n+1,[x,y,n],[0,1]) Ex5:seqsolve([x+2*y,n+1+x],[x,y,n],[0,1]) Ex6:seqsolve([x+2*y+n+1,x],[x,y,n],[0,1]) - + ''' return GiacMethods['seqsolve'](self,*args) @@ -15506,9 +15506,9 @@ cdef class GiacMethods_base: Help for sequence_graph: sequence_graph(Lst(L)) Returns an undirected graph with the degree sequence equal to the list L. - See also: 1/ degree_sequence 2/ is_graphic_sequence + See also: 1/ degree_sequence 2/ is_graphic_sequence Ex1:sequence_graph(degree_sequence(sequence_graph([3,2,4,2,3,4,5,7]))) - + ''' return GiacMethods['sequence_graph'](self,*args) @@ -15517,13 +15517,13 @@ cdef class GiacMethods_base: Help for series: series(Expr,Equal(var=limit_point),[Order],[Dir(1,0,-1)]) Series expansion at finite or infinite points. - See also: 1/ limit 2/ taylor 3/ pad 4/ polynom 5/ truncate + See also: 1/ limit 2/ taylor 3/ pad 4/ polynom 5/ truncate Ex1:series(sin(x)/x,x=0) Ex2:series(sin(x),x=0,6,polynom) Ex3:series(ln(x+x^2)-ln(x),x=0,1) Ex4:series((x^4+x+2)/(x^2+1),x=0,5) Ex5: series("h",8); ln(1+h); - Ex6:series(1/(1+x+y),[x,y],[0,0],5) + Ex6:series(1/(1+x+y),[x,y],[0,0],5) Ex7:series(sin(x*y),[x,y],[1,pi/2],3) Ex8:series(sin((1+h*t)*(pi/2+k*t)),t=0,3,polynom)(t=1) Ex9:series(y^2/x^3,[x,y],[1,-1],3) @@ -15531,7 +15531,7 @@ cdef class GiacMethods_base: Ex11:series(subst(sin(x+y)+cos(y*x),[x,y],h*[x,y]),h=0,6,polynom) Ex12:series(subst(sin(x+y)+cos(y*x),[x,y],h*[x,y]),h=0,6,polynom)(h=1) Ex13: truncate(series(sin(x),x=0,6),6) - + ''' return GiacMethods['series'](self,*args) @@ -15540,9 +15540,9 @@ cdef class GiacMethods_base: Help for set_edge_attribute: set_edge_attribute(Graph(G),Edge(e),Seq(tag1=value1,tag2=value2,..)) Stores the attributes to edge e and returns the modified copy of G. - See also: 1/ discard_edge_attribute 2/ get_edge_attribute 3/ list_edge_attributes + See also: 1/ discard_edge_attribute 2/ get_edge_attribute 3/ list_edge_attributes Ex1:set_edge_attribute(cycle_graph(3),[1,2],"cost"=12.4) - + ''' return GiacMethods['set_edge_attribute'](self,*args) @@ -15551,9 +15551,9 @@ cdef class GiacMethods_base: Help for set_edge_weight: set_edge_weight(Graph(G),Edge(e),Real(w)) Sets the weight of the edge e in the weighted graph G to w and returns the modified copy of G. - See also: 1/ is_weighted 2/ get_edge_weight 3/ make_weighted 4/ weight_matrix + See also: 1/ is_weighted 2/ get_edge_weight 3/ make_weighted 4/ weight_matrix Ex1:set_edge_weight(graph(%{[1,2],[2,3]%}),[1,2],5) - + ''' return GiacMethods['set_edge_weight'](self,*args) @@ -15562,9 +15562,9 @@ cdef class GiacMethods_base: Help for set_graph_attribute: set_graph_attribute(Graph(G),Seq(tag1=value1,tag2=value2,..)) Stores the attributes where each tag is a string, and returns the modified copy of G. - See also: 1/ discard_graph_attribute 2/ get_graph_attribute 3/ list_graph_attributes + See also: 1/ discard_graph_attribute 2/ get_graph_attribute 3/ list_graph_attributes Ex1:set_graph_attribute(cycle_graph(3),"name"="cycle graph") - + ''' return GiacMethods['set_graph_attribute'](self,*args) @@ -15573,9 +15573,9 @@ cdef class GiacMethods_base: Help for set_pixel: set_pixel(Intg(x),Intg(y),Intg(col)) Pixel on and adds to the list of pixels. Run show_pixels() to display - See also: 1/ clear 2/ show_pixels 3/ draw_line 4/ draw_rectangle 5/ draw_polygon + See also: 1/ clear 2/ show_pixels 3/ draw_line 4/ draw_rectangle 5/ draw_polygon Ex1: clear(); set_pixel(4); draw_pixel(1,2,red); show_pixels(); - + ''' return GiacMethods['set_pixel'](self,*args) @@ -15584,9 +15584,9 @@ cdef class GiacMethods_base: Help for set_vertex_attribute: set_vertex_attribute(Graph(G),Vrtx(v),Seq(tag1=value1,tag2=value2,..)) Stores the attributes to vertex v and returns the modified copy of G. - See also: 1/ discard_vertex_attribute 2/ get_vertex_attribute 3/ list_vertex_attributes + See also: 1/ discard_vertex_attribute 2/ get_vertex_attribute 3/ list_vertex_attributes Ex1:set_vertex_attribute(cycle_graph(3),1,"supply"=27) - + ''' return GiacMethods['set_vertex_attribute'](self,*args) @@ -15595,9 +15595,9 @@ cdef class GiacMethods_base: Help for set_vertex_positions: set_vertex_positions(Graph(G),Lst(vp)) Sets the coordinates, given in the list vp, to the vertices of G and returns the modified copy of G. - See also: 1/ draw_graph + See also: 1/ draw_graph Ex1: G:=graph([1,2,3,4,5,6],%{[1,2],[1,4],[4,5],[2,5],[2,3],[3,6],[5,6]%}); G:=set_vertex_positions(G,[[0,0],[0.5,0],[1,0],[0,0.5],[0.5,0.5],[1,0.5]]) - + ''' return GiacMethods['set_vertex_positions'](self,*args) @@ -15606,13 +15606,13 @@ cdef class GiacMethods_base: Help for shift: shift(Lst,[Intg(n)]) Returns the list where the last element [or the tail beginning with the n-th element] is moved to the first element and then completed with 0s (by default n=-1);L:=shift(L,2) o L.shift(2). - See also: 1/ rotate 2/ tail + See also: 1/ rotate 2/ tail Ex1:shift([0,1,2,3],2) Ex2:shift([0,1,2,3]) Ex3:shift([0,1,2,3,4]) Ex4: L:=[0,1,2,3];L:=shift(L,2) Ex5: L:=[0,1,2,3];L.shift(2) - + ''' return GiacMethods['shift'](self,*args) @@ -15621,14 +15621,14 @@ cdef class GiacMethods_base: Help for shift_phase: shift_phase(Expr) shift_phase returns the expressions where the phase of the evaluated trigonometric expressions is increased by pi/2. - See also: 1/ series + See also: 1/ series Ex1:shift_phase(sin(x)) Ex2:shift_phase('sin(x+pi/2)') Ex3:shift_phase(x+sin(x)) Ex4:shift_phase(x+sin(x)) Ex5:shift_phase(cos(t)) Ex6:shift_phase(tan(u)) - + ''' return GiacMethods['shift_phase'](self,*args) @@ -15637,9 +15637,9 @@ cdef class GiacMethods_base: Help for shortest_path: shortest_path(Graph(G),Vrtx(s),Vrtx(t)||Lst(T)) Returns the shortest path from vertex s to vertex t in G. If such path does not exist, returns an empty list. If vector T of vertices from G is given, the list of shortest paths from s to each t int T is returned. - See also: 1/ dijkstra 2/ vertex_distance + See also: 1/ dijkstra 2/ vertex_distance Ex1:shortest_path(cycle_graph(6),1,5) - + ''' return GiacMethods['shortest_path'](self,*args) @@ -15648,9 +15648,9 @@ cdef class GiacMethods_base: Help for show_pixels: show_pixels(NULL) Displays the list of pixels. - See also: 1/ set_pixel 2/ clear + See also: 1/ set_pixel 2/ clear Ex1:show_pixels() - + ''' return GiacMethods['show_pixels'](self,*args) @@ -15659,13 +15659,13 @@ cdef class GiacMethods_base: Help for shuffle: shuffle(Intg(n)||Lst(L)) Returns a random permutation of [0,1,2,..,n-1] or of the list L. - See also: 1/ permu2cycles 2/ is_permu 3/ permu2mat + See also: 1/ permu2cycles 2/ is_permu 3/ permu2mat Ex1:shuffle(4) Ex2:shuffle(7) Ex3:shuffle([1,3,5,7,9]) Ex4: L:=[1,3,5,7,9];L:=randperm(L) Ex5: L:=[1,3,5,7,9];L.randperm() - + ''' return GiacMethods['shuffle'](self,*args) @@ -15674,13 +15674,13 @@ cdef class GiacMethods_base: Help for sierpinski_graph: sierpinski_graph(Intg(n),Intg(k),[triangle]) Returns Sierpiński (triangle) graph S(n,k) (resp. ST(n,k)). - See also: 1/ graph + See also: 1/ graph Ex1:sierpinski_graph(2,4) Ex2:sierpinski_graph(4,3) Ex3:sierpinski_graph(3,4) Ex4:sierpinski_graph(3,2) Ex5:sierpinski_graph(3,3,at_triangle) - + ''' return GiacMethods['sierpinski_graph'](self,*args) @@ -15689,10 +15689,10 @@ cdef class GiacMethods_base: Help for sign: sign(Expr) Returns the sign (-1,0,+1) of its argument. - See also: 1/ abs + See also: 1/ abs Ex1:sign(-4) Ex2:sign(4-5) - + ''' return GiacMethods['sign'](self,*args) @@ -15701,9 +15701,9 @@ cdef class GiacMethods_base: Help for signature: signature(Permut) Returns the signature of a permutation. - See also: 1/ permu2cycles 2/ is_permu + See also: 1/ permu2cycles 2/ is_permu Ex1:signature([1,0,3,4,2]) - + ''' return GiacMethods['signature'](self,*args) @@ -15712,10 +15712,10 @@ cdef class GiacMethods_base: Help for signe: signe(Str(s)) Writes the string s with the font 20 at the point [10,10]. - See also: 1/ ecris + See also: 1/ ecris Ex1:signe("Thomas") Ex2:signe(Thomas) - + ''' return GiacMethods['signe'](self,*args) @@ -15724,12 +15724,12 @@ cdef class GiacMethods_base: Help for similarity: similarity(Pnt or Dr3,Real,Angle,Pnt) similarity(B,k,a1,A)=transformation of A in the similarity (center B or axis d, coeff k,angle a1) (or also homothety(B,k*exp(i*a1),A)). - See also: 1/ homothety + See also: 1/ homothety Ex1:similarity(1+i,2,pi/3,i) Ex2:similarity(line(x=y,y=z),2,pi/3,point(-1,2,1)) Ex3: s:=similarity(1+i,2,pi/3);s(i) Ex4: s:=similarity(line(x=y,y=z),2,pi/3),s(point(-1,2,1)) - + ''' return GiacMethods['similarity'](self,*args) @@ -15738,10 +15738,10 @@ cdef class GiacMethods_base: Help for simp2: simp2(Intg(A) or Poly(A),Intg(B) or Poly(B)) Returns the list [A/gcd(A,B),B/gcd(A,B)]. - See also: 1/ gcd + See also: 1/ gcd Ex1:simp2(12,18) Ex2:simp2(x^3-1,x^2-1) - + ''' return GiacMethods['simp2'](self,*args) @@ -15755,7 +15755,7 @@ cdef class GiacMethods_base: Ex3:simplex_reduce([[-3,2],[1,1]],[3,4],[1,2]) Ex4:simplex_reduce([[-3,2,1,0,3],[1,1,0,1,4],[-1,-2,0,0,0]]) Ex5:simplex_reduce([[2,1,1,1,0,0,2],[1,2,3,0,1,0,5],[2,2,1,0,0,1,6],[-3,-1,-3,1,-1,2,0]]) - + ''' return GiacMethods['simplex_reduce'](self,*args) @@ -15764,11 +15764,11 @@ cdef class GiacMethods_base: Help for simplifier: simplifier(Expr) Simplifies an expression. - See also: 1/ normal + See also: 1/ normal Ex1:simplifier(4*atan(1/5)-atan(1/239)) Ex2:simplifier(texpand((sin(3*x)+sin(7*x))/sin(5*x))) Ex3:simplifier(texpand((cos(3*x)+cos(7*x))/cos(5*x))) - + ''' return GiacMethods['simplifier'](self,*args) @@ -15777,11 +15777,11 @@ cdef class GiacMethods_base: Help for simplify: simplify(Expr) Simplifies an expression. - See also: 1/ normal + See also: 1/ normal Ex1:simplify(4*atan(1/5)-atan(1/239)) Ex2:simplify(texpand((sin(3*x)+sin(7*x))/sin(5*x))) Ex3:simplify(texpand((cos(3*x)+cos(7*x))/cos(5*x))) - + ''' return GiacMethods['simplify'](self,*args) @@ -15790,12 +15790,12 @@ cdef class GiacMethods_base: Help for simpson: simpson(Opt) Option of the area command. - See also: 1/ area + See also: 1/ area Ex1: area(x^2,x=0..1,5,simpson) Ex2: area(x^2,x=0..1,5,rombergt) Ex3: area(x^2,x=0..1,5,rombergm) Ex4:simpson(area(x^2,x=0..1,5,gauss15)) - + ''' return GiacMethods['simpson'](self,*args) @@ -15804,10 +15804,10 @@ cdef class GiacMethods_base: Help for simult: simult(Mtrx(A),Mtrx(B)) Returns the matrix where the column of index k is solution of A*X=column of index k of B (=B[0..nr-1,k..k] with nr=number of rows of B). - See also: 1/ rref 2/ linsolve + See also: 1/ rref 2/ linsolve Ex1:simult([[3,1],[3,2]],[[-2],[2]]) Ex2:simult([[3,1],[3,2]],[[-2,1],[2,-1]]) - + ''' return GiacMethods['simult'](self,*args) @@ -15816,10 +15816,10 @@ cdef class GiacMethods_base: Help for sin: sin(Expr or Opt) Sine or option of the convert or convertir command (id trigsin). - See also: 1/ asin 2/ convert 3/ trigsin + See also: 1/ asin 2/ convert 3/ trigsin Ex1:sin(0) Ex2: convert(cos(x)^4+sin(x)^2,sin) - + ''' return GiacMethods['sin'](self,*args) @@ -15828,9 +15828,9 @@ cdef class GiacMethods_base: Help for sin2costan: sin2costan(Expr) Replaces sin(x) by cos(x)*tan(x) in the argument. - See also: 1/ tan2sincos 2/ cos2sintan 3/ tan2sincos2 4/ tan2cossin2 + See also: 1/ tan2sincos 2/ cos2sintan 3/ tan2sincos2 4/ tan2cossin2 Ex1:sin2costan(sin(x)) - + ''' return GiacMethods['sin2costan'](self,*args) @@ -15839,9 +15839,9 @@ cdef class GiacMethods_base: Help for sinc: sinc(Expr(x)) Returns the value of the cardinal sine function at x. - See also: 1/ sin + See also: 1/ sin Ex1:sinc(pi*x) - + ''' return GiacMethods['sinc'](self,*args) @@ -15850,11 +15850,11 @@ cdef class GiacMethods_base: Help for sincos: sincos(Expr or Opt) Transforms the complex exponential into sine and cosine (id exp2trig) or option of the convert or convertir command (id sincos). - See also: 1/ trig2trig 2/ trig2exp 3/ atrig2ln 4/ convert + See also: 1/ trig2trig 2/ trig2exp 3/ atrig2ln 4/ convert Ex1:sincos(exp(i*x)) Ex2:sincos(exp(-i*x)) Ex3: convert(exp(i*x),sincos) - + ''' return GiacMethods['sincos'](self,*args) @@ -15863,7 +15863,7 @@ cdef class GiacMethods_base: Help for single_inter: single_inter(Curve,Curve,[Pnt(A)||LstPnt(L)]) Gives one of the points of intersection of 2 curves or surfaces (or the intersection near A or not in L). - See also: 1/ intersect 2/ head + See also: 1/ intersect 2/ head Ex1:single_inter(line(i,1-i),line(0,1)) Ex2:single_inter(line(i,1-i),circle(0,1)) Ex3:single_inter(line(i,1+2*i),circle(0,1),[point(i)]) @@ -15871,7 +15871,7 @@ cdef class GiacMethods_base: Ex5:single_inter(circle(1,sqrt(2)),circle(0,1)) Ex6:single_inter(plane(x=y),plane(y=z)) Ex7:single_inter(line(x=y+1,y=2*z),plane(y=z)) - + ''' return GiacMethods['single_inter'](self,*args) @@ -15880,9 +15880,9 @@ cdef class GiacMethods_base: Help for sinh: sinh(Expr) Hyperbolic sine. - See also: 1/ asinh + See also: 1/ asinh Ex1:sinh(0) - + ''' return GiacMethods['sinh'](self,*args) @@ -15891,9 +15891,9 @@ cdef class GiacMethods_base: Help for sizes: sizes(Lst or Str or Seq) Returns the list of sizes of a list of lists. - See also: 1/ size 2/ dim + See also: 1/ size 2/ dim Ex1:sizes([[1,2,3],[1,2],[1]]) - + ''' return GiacMethods['sizes'](self,*args) @@ -15902,7 +15902,7 @@ cdef class GiacMethods_base: Help for slope: slope(Line||Pnt||Cplx,[Pnt||Cplx]) Returns the slope of the line defined in the argument or is an attribute of line. - See also: 1/ line 2/ tangent 3/ LinTan 4/ slopeatraw 5/ slopeat + See also: 1/ line 2/ tangent 3/ LinTan 4/ slopeatraw 5/ slopeat Ex1:slope(line(1,2i)) Ex2:slope(segment(1,2i)) Ex3:slope(1,2i) @@ -15911,7 +15911,7 @@ cdef class GiacMethods_base: Ex6:slope(tangent(plotfunc(sin(x)),pi/4)) Ex7:slope(LineTan(sin(x),pi/4)) Ex8: line(point(1,2),slope=-1) - + ''' return GiacMethods['slope'](self,*args) @@ -15920,11 +15920,11 @@ cdef class GiacMethods_base: Help for slopeat: slopeat(Line, Pnt||Cplx(z0)) slopeat(d,z0) displays at the point(z0), with a legend, the value of the slope of the line or segment d. - See also: 1/ slope 2/ slopeatraw + See also: 1/ slope 2/ slopeatraw Ex1: A:=point(0);B:=point(1+i);slopeat(droite(A,B),(1+i)/2) Ex2: s:=segment(1-i,i);slopeat(s,point(0.4)) Ex3: t:=tangent(plotfunc(sin(x)),pi/4);slopeat(t,0) - + ''' return GiacMethods['slopeat'](self,*args) @@ -15933,12 +15933,12 @@ cdef class GiacMethods_base: Help for slopeatraw: slopeatraw(Line, Pnt||Cplx(z0)) slopeatraw(d,z0) displays at point(z0), the value of the slope of the line or segment d. - See also: 1/ slope 2/ slopeat + See also: 1/ slope 2/ slopeat Ex1: A:=point(0);B:=point(1+i);slopeatraw(droite(A,B),(1+i)/2) Ex2: s:=segment(1-i,i);slopeatraw(s,point(0.4)) Ex3:slopeatraw(tangent(plotfunc(sin(x)),pi/4),0) Ex4:slopeatraw((LineTan sin(x),pi/4),i) - + ''' return GiacMethods['slopeatraw'](self,*args) @@ -15947,10 +15947,10 @@ cdef class GiacMethods_base: Help for smith: smith(Mtrx(A)) Smith normal form of a matrix with polynomial coefficients : returns U,D,V such that U and V are invertible, D is diagonal, and U*A*V=D. - See also: 1/ hermite 2/ ismith 3/ ihermite + See also: 1/ hermite 2/ ismith 3/ ihermite Ex1: n:=10; A:=ranm(n,n) % 17; U,D,V:=smith(x*idn(n)-A);normal(U*(x*idn(n)-A)*V-D); diag(D); Ex2: GF(3,5,g); n:=3; A:=ranm(n,n,g); U,D,V:=smith(x*idn(n)-A);normal(U*(x*idn(n)-A)*V-D); diag(D); - + ''' return GiacMethods['smith'](self,*args) @@ -15959,11 +15959,11 @@ cdef class GiacMethods_base: Help for smod: smod(Intg,Intg) Returns the Euclidean symmetric remainder of two integers. - See also: 1/ irem 2/ iquo 3/ mod 4/ fracmod + See also: 1/ irem 2/ iquo 3/ mod 4/ fracmod Ex1:smod(8,3) Ex2:smod(10,4) Ex3:smod(11,7) - + ''' return GiacMethods['smod'](self,*args) @@ -15972,12 +15972,12 @@ cdef class GiacMethods_base: Help for snedecor: snedecor(Intg(n),Intg(m),Real(x0)) Returns the probability density of the Fisher-Snedecor law (n and m are the numbers of degrees of freedom). - See also: 1/ fisher_cdf 2/ fisher_icdf 3/ randvector 4/ ranm + See also: 1/ fisher_cdf 2/ fisher_icdf 3/ randvector 4/ ranm Ex1:snedecor(4,10,2.1) Ex2:snedecor(4,4,2.1) Ex3: randvector(5,fisher,4,6) Ex4: ranm(2,3,fisher,4,6) - + ''' return GiacMethods['snedecor'](self,*args) @@ -15986,10 +15986,10 @@ cdef class GiacMethods_base: Help for snedecor_cdf: snedecor_cdf(Intg(n),Intg(m),Real(x0)) Returns the probability that a Fisher-Snedecor random variable is less than x0 (n and m are the numbers of degrees of freedom). - See also: 1/ UTPF 2/ fisher_icdf 3/ fisherd + See also: 1/ UTPF 2/ fisher_icdf 3/ fisherd Ex1:snedecor_cdf(4,4,2.1) Ex2:snedecor_cdf(4,10,3.5) - + ''' return GiacMethods['snedecor_cdf'](self,*args) @@ -15998,10 +15998,10 @@ cdef class GiacMethods_base: Help for snedecor_icdf: snedecor_icdf(Intg(n),Intg(m),Real(p)) Returns h such as the probability that a Fisher-Snedecor random variable is less than h is p (n and m are the numbers of degrees of freedom and 0<=p<=1). - See also: 1/ fisher_cdf 2/ fisherd + See also: 1/ fisher_cdf 2/ fisherd Ex1:snedecor_icdf(4,10,0.95) Ex2:snedecor_icdf(4,10,0.05) - + ''' return GiacMethods['snedecor_icdf'](self,*args) @@ -16010,12 +16010,12 @@ cdef class GiacMethods_base: Help for snedecord: snedecord(Intg(n),Intg(m),Real(x0)) Returns the probability density of the Fisher-Snedecor law (n and m are the numbers of degrees of freedom). - See also: 1/ fisher_cdf 2/ fisher_icdf 3/ randvector 4/ ranm + See also: 1/ fisher_cdf 2/ fisher_icdf 3/ randvector 4/ ranm Ex1:snedecord(4,10,2.1) Ex2:snedecord(4,4,2.1) Ex3: randvector(5,fisher,4,6) Ex4: ranm(2,3,fisher,4,6) - + ''' return GiacMethods['snedecord'](self,*args) @@ -16024,10 +16024,10 @@ cdef class GiacMethods_base: Help for snedecord_cdf: snedecord_cdf(Intg(n),Intg(m),Real(x0)) Returns the probability that a Fisher-Snedecor random variable is less than x0 (n and m are the numbers of degrees of freedom). - See also: 1/ UTPF 2/ fisher_icdf 3/ fisherd + See also: 1/ UTPF 2/ fisher_icdf 3/ fisherd Ex1:snedecord_cdf(4,4,2.1) Ex2:snedecord_cdf(4,10,3.5) - + ''' return GiacMethods['snedecord_cdf'](self,*args) @@ -16036,10 +16036,10 @@ cdef class GiacMethods_base: Help for snedecord_icdf: snedecord_icdf(Intg(n),Intg(m),Real(p)) Returns h such as the probability that a Fisher-Snedecor random variable is less than h is p (n and m are the numbers of degrees of freedom and 0<=p<=1). - See also: 1/ fisher_cdf 2/ fisherd + See also: 1/ fisher_cdf 2/ fisherd Ex1:snedecord_icdf(4,10,0.95) Ex2:snedecord_icdf(4,10,0.05) - + ''' return GiacMethods['snedecord_icdf'](self,*args) @@ -16048,10 +16048,10 @@ cdef class GiacMethods_base: Help for solid_line: solid_line(Opt) Option of the display command for a line. - See also: 1/ display + See also: 1/ display Ex1: display(line(y=x),green+dash_line+line_width_2) Ex2: d:=display(line(2+i,1),cap_round_line) - + ''' return GiacMethods['solid_line'](self,*args) @@ -16060,12 +16060,12 @@ cdef class GiacMethods_base: Help for solve: solve(Expr,[Var]) Solves a (or a set of) polynomial equation. - See also: 1/ linsolve 2/ proot 3/ fsolve 4/ csolve 5/ nSolve + See also: 1/ linsolve 2/ proot 3/ fsolve 4/ csolve 5/ nSolve Ex1:solve(x^2-3=1) Ex2:solve(x^3-3*y,y) Ex3:solve([y-z=0,z-x=0,x-y=0,x-1+y+z=0],[x,y,z]) Ex4:solve([x^2-y^2=0,x^2-z^2=0],[x,y,z]) - + ''' return GiacMethods['solve'](self,*args) @@ -16074,7 +16074,7 @@ cdef class GiacMethods_base: Help for somme: somme(Expr,Var,VarMin(a),VarMax(b),[VarStep(p)]) Discrete sum (with 2 or 4 arguments return then sum from a to b if a<=b or of the opposite of the sum from b+1 to a-1 if a>b+1 or 0 if a=b+1) or the discrete primitive or sum of the elements of a list or a sequence. - See also: 1/ + + See also: 1/ + Ex1:somme(1/n^2,n,1,17) Ex2:somme(1/n^2,n=1..17) Ex3:somme(1/n^2,n,17,1) @@ -16085,7 +16085,7 @@ cdef class GiacMethods_base: Ex8:somme([[1,2,3,4,5,6,7,8,9],[1,2,3,4,5,6,7,8,9]]) Ex9:somme(1/(x*(x+1)),x) Ex10:somme(cos(n*x),n) - + ''' return GiacMethods['somme'](self,*args) @@ -16094,10 +16094,10 @@ cdef class GiacMethods_base: Help for sommet: sommet(Op or Fnct) Returns the top of an operator. - See also: 1/ feuille 2/ quote + See also: 1/ feuille 2/ quote Ex1:sommet(quote(gcd(45,123))) Ex2:sommet('gcd(45,123)') - + ''' return GiacMethods['sommet'](self,*args) @@ -16106,13 +16106,13 @@ cdef class GiacMethods_base: Help for sort: sort(LstReal or Seq [Fnc]) Returns the sorted list (or sequence) with increasing order according to the second argument which defines a weak strict ordering or sorts and collects equal terms in sums and products. - See also: 1/ SortA 2/ SortD + See also: 1/ SortA 2/ SortD Ex1:sort([3,2,2,4,1,0]) Ex2:sort(3,2.1,2,4,1,0) Ex3:sort([3,4,2],(x,y)->x>y) Ex4:sort([[1,2],[2,3],[4,3]],(x,y)->when(x[1]==y[1],x[0]>y[0],x[1]>y[1])) Ex5:sort(y*x*2+x*y) - + ''' return GiacMethods['sort'](self,*args) @@ -16121,11 +16121,11 @@ cdef class GiacMethods_base: Help for sorta: sorta(LstReal||Seq×||Mtrx) Sorts the list in increasing order or sorts the columns of the matrix so the first row is in increasing order. - See also: 1/ SortA 2/ sortd 3/ sort + See also: 1/ SortA 2/ sortd 3/ sort Ex1:sorta(3,4,2) Ex2:sorta([3,4,2]) Ex3:sorta([[3,4,2],[6,4,5]]) - + ''' return GiacMethods['sorta'](self,*args) @@ -16134,11 +16134,11 @@ cdef class GiacMethods_base: Help for sortd: sortd(LstReal||Seq||Mtrx) Sorts the list in decreasing order or sorts the columns of the matrix so the first row is in decreasing order. - See also: 1/ SortD 2/ sorta 3/ sort + See also: 1/ SortD 2/ sorta 3/ sort Ex1:sortd(3,4,2) Ex2:sortd([3,4,2]) Ex3:sortd([[3,4,2],[6,4,5]]) - + ''' return GiacMethods['sortd'](self,*args) @@ -16147,13 +16147,13 @@ cdef class GiacMethods_base: Help for sorted: sorted(LstReal or Seq [Fnc]) Returns the sorted list (or sequence) with increasing order according to the second argument which defines a weak strict ordering or sorts and collects equal terms in sums and products. - See also: 1/ SortA 2/ SortD + See also: 1/ SortA 2/ SortD Ex1:sorted([3,2,2,4,1,0]) Ex2:sorted(3,2.1,2,4,1,0) Ex3:sorted([3,4,2],(x,y)->x>y) Ex4:sorted([[1,2],[2,3],[4,3]],(x,y)->when(x[1]==y[1],x[0]>y[0],x[1]>y[1])) Ex5:sorted(y*x*2+x*y) - + ''' return GiacMethods['sorted'](self,*args) @@ -16162,10 +16162,10 @@ cdef class GiacMethods_base: Help for soundsec: soundsec(Intg(n),[Intg(N)]) Generates a vector coding n seconds of time/N (default N=44100). - See also: 1/ readwav 2/ writewav 3/ playsnd + See also: 1/ readwav 2/ writewav 3/ playsnd Ex1:soundsec(1) Ex2:soundsec(1,22100) - + ''' return GiacMethods['soundsec'](self,*args) @@ -16174,10 +16174,10 @@ cdef class GiacMethods_base: Help for spanning_tree: spanning_tree(Graph(G),[Vrtx(r)]) Returns a spanning tree of undirected graph G [with the vertex r as the root node]. - See also: 1/ number_of_spanning_trees 2/ minimal_spanning_tree + See also: 1/ number_of_spanning_trees 2/ minimal_spanning_tree Ex1:spanning_tree(graph("petersen")) Ex2:spanning_tree(graph("petersen"),5) - + ''' return GiacMethods['spanning_tree'](self,*args) @@ -16186,10 +16186,10 @@ cdef class GiacMethods_base: Help for sphere: sphere((Pnt or Vect),(Pnt or Real)) sphere(A,B) (resp sphere(A,r)) draws the sphere with diameter AB (resp center A and radius r) in 3D space. - See also: 1/ circle + See also: 1/ circle Ex1:sphere([0,0,0],[2,2,2]) Ex2:sphere([1,1,1],1) - + ''' return GiacMethods['sphere'](self,*args) @@ -16198,9 +16198,9 @@ cdef class GiacMethods_base: Help for spline: spline(Lst(lx),Lst(ly),Var(x),Intg(d)) Natural spline through the points given by the lx and ly lists, variable x, degree d. - See also: 1/ lagrange + See also: 1/ lagrange Ex1:spline([0,1,2],[1,3,0],x,3) - + ''' return GiacMethods['spline'](self,*args) @@ -16209,10 +16209,10 @@ cdef class GiacMethods_base: Help for split: split(Expr(Xpr),Lst(var1,var2)) Splits the two variables var1,var2 of the expression Xpr (without denominator) or returns [0]. - See also: 1/ factor + See also: 1/ factor Ex1:split(x^3*y^2-y^2+x^3-1,[x,y]) Ex2:split(x^3*y^2-y^2+x^3+1,[x,y]) - + ''' return GiacMethods['split'](self,*args) @@ -16221,8 +16221,8 @@ cdef class GiacMethods_base: Help for spring: spring(Opt) Option for the draw_graph command. - See also: 1/ planar 2/ tree 3/ draw_graph - + See also: 1/ planar 2/ tree 3/ draw_graph + ''' return GiacMethods['spring'](self,*args) @@ -16231,10 +16231,10 @@ cdef class GiacMethods_base: Help for sq: sq(Seq) Is the name of the function (ℝ^n -> ℝ)=sum of the squares of the arguments. - See also: 1/ sqrt + See also: 1/ sqrt Ex1:sq(5) Ex2:sq(1,2,3) - + ''' return GiacMethods['sq'](self,*args) @@ -16243,10 +16243,10 @@ cdef class GiacMethods_base: Help for sqrfree: sqrfree(Expr) Factorization of the its argument gathering the terms with the same exponent. - See also: 1/ factor + See also: 1/ factor Ex1:sqrfree(x^4-2*x^2+1) Ex2:sqrfree((x-2)^7*(x+2)^7*(x^4-2*x^2+1)) - + ''' return GiacMethods['sqrfree'](self,*args) @@ -16255,10 +16255,10 @@ cdef class GiacMethods_base: Help for sqrt: sqrt(Expr) Square root. - See also: 1/ surd 2/ ^ + See also: 1/ surd 2/ ^ Ex1:sqrt(50) Ex2:sqrt(x^2) - + ''' return GiacMethods['sqrt'](self,*args) @@ -16267,12 +16267,12 @@ cdef class GiacMethods_base: Help for square: square((Pnt(A) or Cplx),(Pnt(B) or Cplx),[Pnt(P),Var(C),Var(D)]) Returns and draws the square of side AB (ABCD is direct) (in the plane ABP). - See also: 1/ rhombus 2/ quadrilateral + See also: 1/ rhombus 2/ quadrilateral Ex1:square(i,1+i) Ex2:square(i,1+i,C,D) Ex3:square(point(0,0,0),point(3,3,3),point(0,0,3)) Ex4:square(point(0,0,0),point(3,3,3),point(0,0,3),C,D) - + ''' return GiacMethods['square'](self,*args) @@ -16281,10 +16281,10 @@ cdef class GiacMethods_base: Help for square_point: square_point(Opt) Option of the display command for a point. - See also: 1/ display + See also: 1/ display Ex1: F:=display(point(2+1.5*i),point_point) Ex2: F:=display(point(2+1.5*i),rhombus_point) - + ''' return GiacMethods['square_point'](self,*args) @@ -16293,10 +16293,10 @@ cdef class GiacMethods_base: Help for srand: srand() srand returns an integer and initializes the sequence of random numbers. - See also: 1/ RandSeed + See also: 1/ RandSeed Ex1:srand(12) Ex2: srand - + ''' return GiacMethods['srand'](self,*args) @@ -16305,9 +16305,9 @@ cdef class GiacMethods_base: Help for sst: sst(NULL) Steps 1 instruction. - See also: 1/ + See also: 1/ Ex1:sst() - + ''' return GiacMethods['sst'](self,*args) @@ -16316,9 +16316,9 @@ cdef class GiacMethods_base: Help for sst_in: sst_in(NULL) Enters into a function in step-by-step mode. - See also: 1/ + See also: 1/ Ex1:sst_in() - + ''' return GiacMethods['sst_in'](self,*args) @@ -16327,9 +16327,9 @@ cdef class GiacMethods_base: Help for st_ordering: st_ordering(Graph(G),Vrtx(s),Vrtx(t)) Returns ST numbering for the biconnected graph G with source s and sink (target) t. - See also: 1/ is_biconnected + See also: 1/ is_biconnected Ex1:st_ordering(graph("petersen"),1,2) - + ''' return GiacMethods['st_ordering'](self,*args) @@ -16338,9 +16338,9 @@ cdef class GiacMethods_base: Help for star_graph: star_graph(Intg(n)) Returns the complete bipartite graph complete_graph(1,n). - See also: 1/ complete_graph 2/ wheel_graph + See also: 1/ complete_graph 2/ wheel_graph Ex1:star_graph(5) - + ''' return GiacMethods['star_graph'](self,*args) @@ -16349,10 +16349,10 @@ cdef class GiacMethods_base: Help for star_point: star_point(Opt) Option of the display command for a point. - See also: 1/ display + See also: 1/ display Ex1: F:=display(point(2+1.5*i),point_point) Ex2: F:=display(point(2+1.5*i),rhombus_point) - + ''' return GiacMethods['star_point'](self,*args) @@ -16361,11 +16361,11 @@ cdef class GiacMethods_base: Help for stdDev: stdDev(Lst||Mtrx,[Lst]) Returns an unbiased estimate of the population standard deviation of the sample (first argument) with an optional list of weight as second argument. - See also: 1/ mean 2/ stddev + See also: 1/ mean 2/ stddev Ex1:stdDev([1,2,3]) Ex2:stdDev([1,2,3],[1,2,1]) Ex3:stdDev([[1,2,3],[5,6,7]]) - + ''' return GiacMethods['stdDev'](self,*args) @@ -16374,11 +16374,11 @@ cdef class GiacMethods_base: Help for stddev: stddev(Lst||Mtrx,[Lst]) Returns the standard deviation of the elements of its argument with an optional second argument as weight or the list of standard deviations of the columns of a matrix. - See also: 1/ mean 2/ variance 3/ stddevp + See also: 1/ mean 2/ variance 3/ stddevp Ex1:stddev([1,2,3]) Ex2:stddev([1,2,3],[1,2,1]) Ex3:stddev([[1,2,3],[5,6,7]]) - + ''' return GiacMethods['stddev'](self,*args) @@ -16387,11 +16387,11 @@ cdef class GiacMethods_base: Help for stddevp: stddevp(Lst||Mtrx,[Lst]) Returns an unbiased estimate of the population standard deviation of the sample (first argument) with an optional list of weight as second argument. - See also: 1/ mean 2/ stddev + See also: 1/ mean 2/ stddev Ex1:stddevp([1,2,3]) Ex2:stddevp([1,2,3],[1,2,1]) Ex3:stddevp([[1,2,3],[5,6,7]]) - + ''' return GiacMethods['stddevp'](self,*args) @@ -16400,14 +16400,14 @@ cdef class GiacMethods_base: Help for steffenson_solver: steffenson_solver(Opt) Argument for fsolve giving the method for solving a numerical equation. - See also: 1/ fsolve + See also: 1/ fsolve Ex1: fsolve(cos(x)=x,x,0..1,bisection_solver) Ex2: fsolve(cos(x)=x,x,0..1,brent_solver) Ex3: fsolve(cos(x)=x,x,0..1,falsepos_solver) Ex4: fsolve(cos(x)=x,x,0,newton_solver) Ex5: fsolve(cos(x)=x,x,0,secant_solver) Ex6: fsolve(cos(x)=x,x,0,steffenson_solver) - + ''' return GiacMethods['steffenson_solver'](self,*args) @@ -16416,9 +16416,9 @@ cdef class GiacMethods_base: Help for stereo2mono: stereo2mono(Lst(clip)) Returns an audio clip with all channels in the input clip downmixed to a single one. - See also: 1/ channel_data 2/ mean 3/ createwav + See also: 1/ channel_data 2/ mean 3/ createwav Ex1:stereo2mono(readwav("/some/file")) - + ''' return GiacMethods['stereo2mono'](self,*args) @@ -16427,12 +16427,12 @@ cdef class GiacMethods_base: Help for str: str(Expr or Opt) Returns the evaluated expression as a string or is an option of the convert or convertir command (id string). - See also: 1/ expr 2/ format 3/ convert + See also: 1/ expr 2/ format 3/ convert Ex1:str(1.23) Ex2:str(a:=12) Ex3:str(quote(a:=12)) Ex4: convert(quote(a:=12),string) - + ''' return GiacMethods['str'](self,*args) @@ -16441,9 +16441,9 @@ cdef class GiacMethods_base: Help for strongly_connected_components: strongly_connected_components(Graph(G)) Returns the list of strongly connected components in digraph G. - See also: 1/ connected_components 2/ is_connected 3/ is_strongly_connected + See also: 1/ connected_components 2/ is_connected 3/ is_strongly_connected Ex1:strongly_connected_components(digraph([1,2,3],%{[1,2],[1,3],[2,3],[3,2]%})) - + ''' return GiacMethods['strongly_connected_components'](self,*args) @@ -16452,10 +16452,10 @@ cdef class GiacMethods_base: Help for student: student(Intg(n),Real(x0)) Returns the probability density of the Student law (n is the number of degrees of freedom). - See also: 1/ student_cdf 2/ student_icdf + See also: 1/ student_cdf 2/ student_icdf Ex1:student(3,5.2) Ex2:student(1,5.2) - + ''' return GiacMethods['student'](self,*args) @@ -16464,10 +16464,10 @@ cdef class GiacMethods_base: Help for student_cdf: student_cdf(Intg(n),Real(x0)) Returns the probability that a Student random variable is less than x0 (n is the number of degrees of freedom). - See also: 1/ UTPT 2/ student_icdf 3/ studentd + See also: 1/ UTPT 2/ student_icdf 3/ studentd Ex1:student_cdf(3,2.35) Ex2:student_cdf(3,-3.2) - + ''' return GiacMethods['student_cdf'](self,*args) @@ -16476,10 +16476,10 @@ cdef class GiacMethods_base: Help for student_icdf: student_icdf(Intg(n),Real(p)) Returns h such as the probability that a Student random variable is less than h is p (n is the number of degrees of freedom and 0<=p<=1). - See also: 1/ student_cdf 2/ studentd + See also: 1/ student_cdf 2/ studentd Ex1:student_icdf(3,0.95) Ex2:student_icdf(3,0.05) - + ''' return GiacMethods['student_icdf'](self,*args) @@ -16488,10 +16488,10 @@ cdef class GiacMethods_base: Help for studentd: studentd(Intg(n),Real(x0)) Returns the probability density of the Student law (n is the number of degrees of freedom). - See also: 1/ student_cdf 2/ student_icdf + See also: 1/ student_cdf 2/ student_icdf Ex1:studentd(3,5.2) Ex2:studentd(1,5.2) - + ''' return GiacMethods['studentd'](self,*args) @@ -16500,10 +16500,10 @@ cdef class GiacMethods_base: Help for studentt: studentt(Lst,Real,[Real],Fnc,[Real]) T-Test/Student law: arg1=[success,trial] or [mean,sample size] or data, arg2=proportion or data, arg3 optional if data=sigma, arg4 alternative '!=' or '>' or '<', arg5 optional alpha confidence level. - See also: 1/ normalt 2/ chisquaret 3/ kolmogorovt + See also: 1/ normalt 2/ chisquaret 3/ kolmogorovt Ex1:studentt([10,20],.5,.02,'!=',0.1) Ex2:studentt([0.48,20],0.5,0.1,'<') - + ''' return GiacMethods['studentt'](self,*args) @@ -16512,13 +16512,13 @@ cdef class GiacMethods_base: Help for sturm: sturm(Poly,[Var],[Cplx(a)],[Cplx(b)]) Sturm sequence corresponding to a polynomial or number of sign changes of this polynomial in ]a;b]. - See also: 1/ sturmseq 2/ sturmab + See also: 1/ sturmseq 2/ sturmab Ex1:sturm(x^3-1,x) Ex2:sturm(x^5-x^3,x) Ex3:sturm((x^5-x^3)/(x+2),x) Ex4:sturm(x^5-x^3,x,-2,5) Ex5:sturm(x^3-1,x,-2-i,5+3i) - + ''' return GiacMethods['sturm'](self,*args) @@ -16527,10 +16527,10 @@ cdef class GiacMethods_base: Help for sturmab: sturmab(Poly,Var,Cplx(a),Cplx(b)) Number of sign changes of a polynomial in ]a;b] or of complex roots in a..b if a or b is non-real. - See also: 1/ sturm 2/ sturmseq 3/ realroot + See also: 1/ sturm 2/ sturmseq 3/ realroot Ex1:sturmab(x^3-1,x,-2,5) Ex2:sturmab(x^3-1,x,-2-i,5+3i) - + ''' return GiacMethods['sturmab'](self,*args) @@ -16539,11 +16539,11 @@ cdef class GiacMethods_base: Help for sturmseq: sturmseq(Poly,[Var]) Sturm sequence corresponding to a polynomial or to a rational fraction. - See also: 1/ sturm 2/ sturmab + See also: 1/ sturm 2/ sturmab Ex1:sturmseq(x^3-1,x) Ex2:sturmseq(x^5-x^3,x) Ex3:sturmseq((x^5-x^3)/(x+2),x) - + ''' return GiacMethods['sturmseq'](self,*args) @@ -16552,10 +16552,10 @@ cdef class GiacMethods_base: Help for style: style(Opt) Local option (Maple compatibility) of a graphic command to plot a line with dots with style=point. - See also: 1/ line_width + See also: 1/ line_width Ex1: segment(0,point(1,1),style=point) Ex2: line(y=x,style=point,display=green+line_width_2) - + ''' return GiacMethods['style'](self,*args) @@ -16564,9 +16564,9 @@ cdef class GiacMethods_base: Help for subMat: subMat(Mtrx(A),Intg(n1),Intg(n2),Intg(n3),Intg(n4).) Extracts a sub matrix with first element=A[n1,n2] and last element=A[n3,n4]. - See also: 1/ mid + See also: 1/ mid Ex1:subMat([[1,2],[3,4],[5,6]],1,0,2,1) - + ''' return GiacMethods['subMat'](self,*args) @@ -16575,9 +16575,9 @@ cdef class GiacMethods_base: Help for subdivide_edges: subdivide_edges(Graph(G),Lst(E),[Intg(r)]) Inserts r (by default 1) new vertices to each edge/arc in G contained in the list E (which may be a single edge/arc) and returns the modified copy of G. New vertices are labelled with smallest available integers. - See also: 1/ edges + See also: 1/ edges Ex1:subdivide_edges(complete_graph(2,3),[[1,3],[1,4]],2) - + ''' return GiacMethods['subdivide_edges'](self,*args) @@ -16586,9 +16586,9 @@ cdef class GiacMethods_base: Help for subgraph: subgraph(Graph(G),Lst(E)) Returns the subgraph of G defined by the edges in list E. - See also: 1/ induced_subgraph 2/ highlight_subgraph + See also: 1/ induced_subgraph 2/ highlight_subgraph Ex1:subgraph(complete_graph(5),[[1,2],[2,3],[3,4],[4,1]]) - + ''' return GiacMethods['subgraph'](self,*args) @@ -16597,11 +16597,11 @@ cdef class GiacMethods_base: Help for subs: subs(Expr or Var=value,Var=value or Expr) Equivalent of subst except in maple_mode where the arguments are switched over, in maple_mode choose the second example. - See also: 1/ subst 2/ maple_mode 3/ algsubs 4/ () + See also: 1/ subst 2/ maple_mode 3/ algsubs 4/ () Ex1:subs(1/(4+x^2),x=2) Ex2:subs(x=2,1/(4+x^2)) Ex3: f:=1/(4+x^2);f(x=2) - + ''' return GiacMethods['subs'](self,*args) @@ -16614,7 +16614,7 @@ cdef class GiacMethods_base: Ex2:subsop([[1,2],[3,4]],[1,1]=5) Ex3:subsop([[1,2],[3,4]],1=[10,8]) Ex4:subsop([0,1,2,3],'1=NULL') - + ''' return GiacMethods['subsop'](self,*args) @@ -16623,7 +16623,7 @@ cdef class GiacMethods_base: Help for subst: subst(Expr,Var(v)=value(a)) Substitutes a value for a variable in an expression. - See also: 1/ eval 2/ algsubs 3/ subs 4/ () + See also: 1/ eval 2/ algsubs 3/ subs 4/ () Ex1:subst(1/(4+x^2),x=2) Ex2:subst(1/(x^2+y^2),x=2,y=3) Ex3:subst(1/(x^2+y^2+z^2),[x=2,y=3,z=1]) @@ -16631,7 +16631,7 @@ cdef class GiacMethods_base: Ex5:subst('integrate(sin(x^2)*x,x)',x=sqrt(t)) Ex6:subst('sum(x^(n+1)/((n+p+1)*(n+1)),n,0,inf)',n=k-1) Ex7: f:=1/(x^2+y^2;f(x=2,y=3) - + ''' return GiacMethods['subst'](self,*args) @@ -16640,7 +16640,7 @@ cdef class GiacMethods_base: Help for substituer: substituer(Expr,Var(v)=value(a)) Substitutes a value for a variable in an expression. - See also: 1/ eval 2/ algsubs 3/ subs 4/ () + See also: 1/ eval 2/ algsubs 3/ subs 4/ () Ex1:substituer(1/(4+x^2),x=2) Ex2:substituer(1/(x^2+y^2),x=2,y=3) Ex3:substituer(1/(x^2+y^2+z^2),[x=2,y=3,z=1]) @@ -16648,7 +16648,7 @@ cdef class GiacMethods_base: Ex5:substituer('integrate(sin(x^2)*x,x)',x=sqrt(t)) Ex6:substituer('sum(x^(n+1)/((n+p+1)*(n+1)),n,0,inf)',n=k-1) Ex7: f:=1/(x^2+y^2;f(x=2,y=3) - + ''' return GiacMethods['substituer'](self,*args) @@ -16657,12 +16657,12 @@ cdef class GiacMethods_base: Help for subtype: subtype(Expr) Returns 1 for a sequence,2 for a set, 10 for a polynomial and 0 otherwise. - See also: 1/ DOM_LIST 2/ type + See also: 1/ DOM_LIST 2/ type Ex1:subtype(1,2,3) Ex2:subtype(set[1,2,3]) Ex3:subtype(poly1[1,2,3]) Ex4:subtype([1,2,3]) - + ''' return GiacMethods['subtype'](self,*args) @@ -16671,7 +16671,7 @@ cdef class GiacMethods_base: Help for sum: sum(Expr,Var,VarMin(a),VarMax(b),[VarStep(p)]) Discrete sum (with 2 or 4 arguments return then sum from a to b if a<=b or of the opposite of the sum from b+1 to a-1 if a>b+1 or 0 if a=b+1) or the discrete primitive or sum of the elements of a list or a sequence. - See also: 1/ + + See also: 1/ + Ex1:sum(1/n^2,n,1,17) Ex2:sum(1/n^2,n=1..17) Ex3:sum(1/n^2,n,17,1) @@ -16682,7 +16682,7 @@ cdef class GiacMethods_base: Ex8:sum([[1,2,3,4,5,6,7,8,9],[1,2,3,4,5,6,7,8,9]]) Ex9:sum(1/(x*(x+1)),x) Ex10:sum(cos(n*x),n) - + ''' return GiacMethods['sum'](self,*args) @@ -16691,11 +16691,11 @@ cdef class GiacMethods_base: Help for sum_riemann: sum_riemann(Expr(Xpr),Lst(var1,var2)) Returns an equivalent when var1=+infinity of the sum of Xpr(var1,var2) for var2 from 1 to var1 when the sum is a Riemann sum. - See also: 1/ + See also: 1/ Ex1:sum_riemann(1/(n+k),[n,k]) Ex2:sum_riemann(n/(n^2+k),[n,k]) Ex3:sum_riemann(n/(n^2+k^2),[n,k]) - + ''' return GiacMethods['sum_riemann'](self,*args) @@ -16704,12 +16704,12 @@ cdef class GiacMethods_base: Help for suppress: suppress(Vect(L)||Str(l),Intg(n)) Returns L without the element of index n; L:=suppress(L,n) or L.suppress(n). - See also: 1/ tail 2/ mid 3/ remove 4/ insert + See also: 1/ tail 2/ mid 3/ remove 4/ insert Ex1:suppress([0,1,2,3],2) Ex2:suppress("0123",2) Ex3: L:=[0,1,2,3];L:=suppress(L,2) Ex4: L:=[0,1,2,3];L.suppress(2) - + ''' return GiacMethods['suppress'](self,*args) @@ -16718,10 +16718,10 @@ cdef class GiacMethods_base: Help for surd: surd(Expr,Intg(n)) Power 1/n. - See also: 1/ sqrt 2/ ^ + See also: 1/ sqrt 2/ ^ Ex1:surd(8,3) Ex2:surd(-8,3) - + ''' return GiacMethods['surd'](self,*args) @@ -16731,7 +16731,7 @@ cdef class GiacMethods_base: svd(Mtrx(A)) For a square numerical real matrix A, returns U orthogonal, S vector of singular values, Q orthogonal such that A=U*diag(S)*tran(Q). Ex1:svd([[1,2],[3,4]]) - + ''' return GiacMethods['svd'](self,*args) @@ -16740,9 +16740,9 @@ cdef class GiacMethods_base: Help for swapcol: swapcol(Mtrx(A),Intg(n1),Intg(n2)) Returns the matrix obtained from A by swapping the n1-th column and the n2-th column. - See also: 1/ rowSwap + See also: 1/ rowSwap Ex1:swapcol([[1,2],[3,4],[5,6]],0,1) - + ''' return GiacMethods['swapcol'](self,*args) @@ -16751,9 +16751,9 @@ cdef class GiacMethods_base: Help for swaprow: swaprow(Mtrx(A),Intg(n1),Intg(n2)) Returns the matrix obtained from A by swapping the n1-th row and the n2-th row. - See also: 1/ rowAdd 2/ colSwap + See also: 1/ rowAdd 2/ colSwap Ex1:swaprow([[1,2],[3,4],[5,6]],1,2) - + ''' return GiacMethods['swaprow'](self,*args) @@ -16762,11 +16762,11 @@ cdef class GiacMethods_base: Help for switch_axes: switch_axes([Intg(0 or 1)]) switch_axes() puts or erases the axes of the graphic-screen. - See also: 1/ gl_showaxes 2/ axes + See also: 1/ gl_showaxes 2/ axes Ex1:switch_axes() Ex2:switch_axes(0) Ex3:switch_axes(1) - + ''' return GiacMethods['switch_axes'](self,*args) @@ -16775,10 +16775,10 @@ cdef class GiacMethods_base: Help for sylvester: sylvester(Poly,Poly,Var) Sylvester matrix of two polynomials. - See also: 1/ resultant + See also: 1/ resultant Ex1:sylvester(x^2-1,x^3-1,x) Ex2:sylvester(x^3-p*x+q,3*x^2-p,x) - + ''' return GiacMethods['sylvester'](self,*args) @@ -16787,14 +16787,14 @@ cdef class GiacMethods_base: Help for symb2poly: symb2poly(Expr, LstVar or [Var]) Returns the coefficients of a polynomial with respect to the 2nd argument or if the second argument is a list the internal format of the polynomial. - See also: 1/ poly2symb 2/ r2e + See also: 1/ poly2symb 2/ r2e Ex1:symb2poly(x*3+2.1) Ex2:symb2poly(3*x*y+2*y+1,y) Ex3:symb2poly(3*x*y+2*y+1,x,y) Ex4:symb2poly(3*x*y+2*y+1,[x,y]) Ex5:symb2poly(-x^4+x*3*y+2+y^2*z,[x,y,z]) Ex6:symb2poly(-x^4+x*3*y+2+y^2*z,[x,y,z]) - + ''' return GiacMethods['symb2poly'](self,*args) @@ -16803,12 +16803,12 @@ cdef class GiacMethods_base: Help for symbol: symbol(Opt) DOM_SYMBOLIC or symbol is the type of a symbolic variable, as returned by the type command. It is also an option of the assume command. - See also: 1/ type 2/ assume 3/ DOM_INT 4/ DOM_FLOAT + See also: 1/ type 2/ assume 3/ DOM_INT 4/ DOM_FLOAT Ex1: assume(a,symbol) Ex2: assume(a,DOM_SYMBOLIC) Ex3: a:=sqrt(2);type(a) Ex4: type(2x+1) - + ''' return GiacMethods['symbol'](self,*args) @@ -16817,9 +16817,9 @@ cdef class GiacMethods_base: Help for syst2mat: syst2mat(LstLinEq,LstVar) Returns the matrix M=A|(-b) associate to the system Y=AX+b. - See also: 1/ linsolve 2/ rref + See also: 1/ linsolve 2/ rref Ex1:syst2mat([x-y=1,x+2*y],[x,y]) - + ''' return GiacMethods['syst2mat'](self,*args) @@ -16828,9 +16828,9 @@ cdef class GiacMethods_base: Help for tCollect: tCollect(Expr) Collects trigonometric expressions. - See also: 1/ texpand 2/ tlin + See also: 1/ texpand 2/ tlin Ex1:tCollect(sin(x)+cos(x)) - + ''' return GiacMethods['tCollect'](self,*args) @@ -16839,11 +16839,11 @@ cdef class GiacMethods_base: Help for tExpand: tExpand(Expr) Expands transcendental expressions. - See also: 1/ tcollect 2/ tlin 3/ lin 4/ trigexpand + See also: 1/ tcollect 2/ tlin 3/ lin 4/ trigexpand Ex1:tExpand(sin(2*x)+exp(x+y)) Ex2:tExpand(cos(x+y)) Ex3:tExpand(cos(3*x)) - + ''' return GiacMethods['tExpand'](self,*args) @@ -16852,11 +16852,11 @@ cdef class GiacMethods_base: Help for table: table(SeqEqual(index=value)) Defines an array where the indices are strings or real numbers or defines a table with a matrix. - See also: 1/ matrix 2/ convert 3/ array + See also: 1/ matrix 2/ convert 3/ array Ex1:table(3=-10,"a"=10,"b"=20,"c"=30,"d"=40) - Ex2: A:=[[0,1],[2,3]];table(A) + Ex2: A:=[[0,1],[2,3]];table(A) Ex3: B:=table([1,2]=12,[2,5]=25);matrix(B) - + ''' return GiacMethods['table'](self,*args) @@ -16865,10 +16865,10 @@ cdef class GiacMethods_base: Help for tablefunc: tablefunc(Expr,Var) Table of values of a function : you must be in a spreadsheet. - See also: 1/ tabvar 2/ tableseq + See also: 1/ tabvar 2/ tableseq Ex1:tablefunc(sin(x),x) Ex2:tablefunc(x^2-x-2,x) - + ''' return GiacMethods['tablefunc'](self,*args) @@ -16877,10 +16877,10 @@ cdef class GiacMethods_base: Help for tableseq: tableseq(Expr,(Var or LstVar),(InitVal or LstInitVal)) Table of values of a sequence (in a spreadsheet.) - See also: 1/ tablefunc + See also: 1/ tablefunc Ex1:tableseq(cos(x),x,0.0) Ex2:tableseq(x+y,[x,y],[1,1]) - + ''' return GiacMethods['tableseq'](self,*args) @@ -16889,11 +16889,11 @@ cdef class GiacMethods_base: Help for tabsign: tabsign(Expr,Var) Table of signs of a function. - See also: 1/ tablefunc 2/ tabvar + See also: 1/ tablefunc 2/ tabvar Ex1:tabsign(x^2-x,x) Ex2:tabsign(x^2,x,-3,5) Ex3:tabsign(sin(x),x) - + ''' return GiacMethods['tabsign'](self,*args) @@ -16902,13 +16902,13 @@ cdef class GiacMethods_base: Help for tabvar: tabvar(Expr,Var) Table of variations of a function with its graph on DispG. - See also: 1/ tablefunc 2/ tabsign + See also: 1/ tablefunc 2/ tabsign Ex1:tabvar(sin(x),x) Ex2:tabvar(1/ln(x^2-1),x,diff=1) Ex3:tabvar(x^2+x+1,x) Ex4:tabvar(x^2,x,-3,5) Ex5:tabvar([sin(2t),cos(3t)]) - + ''' return GiacMethods['tabvar'](self,*args) @@ -16917,11 +16917,11 @@ cdef class GiacMethods_base: Help for tail: tail(Lst or Seq or Str) Returns the list (or sequence or string) without its first element. - See also: 1/ head 2/ mid 3/ left 4/ right 5/ back + See also: 1/ head 2/ mid 3/ left 4/ right 5/ back Ex1:tail([3,2,4,1,0]) Ex2:tail(3,2,4,1,0) Ex3:tail("bonjour") - + ''' return GiacMethods['tail'](self,*args) @@ -16930,11 +16930,11 @@ cdef class GiacMethods_base: Help for tan: tan(Expr) Tangent or option of the convert or convertir command (id halftan). - See also: 1/ atan or Opt 2/ convert 3/ halftan + See also: 1/ atan or Opt 2/ convert 3/ halftan Ex1:tan(0) Ex2:tan(pi/4) Ex3: convert(tan(x),tan) - + ''' return GiacMethods['tan'](self,*args) @@ -16943,9 +16943,9 @@ cdef class GiacMethods_base: Help for tan2cossin2: tan2cossin2(Expr) Replaces tan(x) by (1-cos(2*x))/sin(2*x) in the argument. - See also: 1/ tan2sincos2 2/ tan2sincos 3/ sin2costan 4/ cos2sintan + See also: 1/ tan2sincos2 2/ tan2sincos 3/ sin2costan 4/ cos2sintan Ex1:tan2cossin2(tan(x)) - + ''' return GiacMethods['tan2cossin2'](self,*args) @@ -16954,9 +16954,9 @@ cdef class GiacMethods_base: Help for tan2sincos: tan2sincos(Expr) Replaces tan(x) by sin(x)/cos(x) in the argument. - See also: 1/ sin2costan 2/ cos2sintan 3/ tan2sincos2 4/ tan2cossin2 + See also: 1/ sin2costan 2/ cos2sintan 3/ tan2sincos2 4/ tan2cossin2 Ex1:tan2sincos(tan(x)) - + ''' return GiacMethods['tan2sincos'](self,*args) @@ -16965,9 +16965,9 @@ cdef class GiacMethods_base: Help for tan2sincos2: tan2sincos2(Expr) Replaces tan(x) by sin(2*x)/(1+cos(2*x)) in the argument. - See also: 1/ tan2cossin2 2/ tan2sincos 3/ sin2costan 4/ cos2sintan + See also: 1/ tan2cossin2 2/ tan2sincos 3/ sin2costan 4/ cos2sintan Ex1:tan2sincos2(tan(x)) - + ''' return GiacMethods['tan2sincos2'](self,*args) @@ -16976,7 +16976,7 @@ cdef class GiacMethods_base: Help for tangent: tangent(Curve(C),Pnt(A)) tangent(C,A) draws the tangents (line or plane) to C through A. - See also: 1/ LineTan 2/ droite_tangente + See also: 1/ LineTan 2/ droite_tangente Ex1:tangent(circle(i,1+i),A) Ex2:tangent(plotfunc(sin(x)),3*pi/4) Ex3:tangent(plotfunc(sin(x)),point(3*pi/4+i*sqrt(2)/2)) @@ -16985,7 +16985,7 @@ cdef class GiacMethods_base: Ex6:tangent(plotparam(3*exp(t/2)*exp(i*t),t),7) Ex7:tangent(plotpolar(3*exp(t/2),t),7) Ex8: equation(tangente([2*cos(t),2*sin(t),3*t],t)) - + ''' return GiacMethods['tangent'](self,*args) @@ -16994,7 +16994,7 @@ cdef class GiacMethods_base: Help for tangente: tangente(Curve(C),Pnt(A)) tangent(C,A) draws the tangents (line or plane) to C through A. - See also: 1/ LineTan 2/ droite_tangente + See also: 1/ LineTan 2/ droite_tangente Ex1:tangente(circle(i,1+i),A) Ex2:tangente(plotfunc(sin(x)),3*pi/4) Ex3:tangente(plotfunc(sin(x)),point(3*pi/4+i*sqrt(2)/2)) @@ -17003,7 +17003,7 @@ cdef class GiacMethods_base: Ex6:tangente(plotparam(3*exp(t/2)*exp(i*t),t),7) Ex7:tangente(plotpolar(3*exp(t/2),t),7) Ex8: equation(tangente([2*cos(t),2*sin(t),3*t],t)) - + ''' return GiacMethods['tangente'](self,*args) @@ -17012,10 +17012,10 @@ cdef class GiacMethods_base: Help for tanh: tanh(Expr) Hyperbolic tangent. - See also: 1/ atanh 2/ hyp2exp + See also: 1/ atanh 2/ hyp2exp Ex1:tanh(0) Ex2:tanh(hyp2exp(tanh(1))) - + ''' return GiacMethods['tanh'](self,*args) @@ -17024,11 +17024,11 @@ cdef class GiacMethods_base: Help for taux_accroissement: taux_accroissement(Expr,Var,Val1,(Val1+Var or Val2)) Returns the rate of change of an expression when the variable goes from Val1 to Val2 (by default Var=x). - See also: 1/ diff 2/ limit + See also: 1/ diff 2/ limit Ex1:taux_accroissement(x^2,1,1+h) Ex2:taux_accroissement(x^2,1,2) Ex3:taux_accroissement(a^2,a,1,1+h) - + ''' return GiacMethods['taux_accroissement'](self,*args) @@ -17037,7 +17037,7 @@ cdef class GiacMethods_base: Help for taylor: taylor(Expr,[Var=limit_point],[Order]) Series expansion at finite or infinite points (by default x=0, and relative order=5). - See also: 1/ series 2/ limit 3/ pade 4/ polynom + See also: 1/ series 2/ limit 3/ pade 4/ polynom Ex1:taylor(sin(x)/x,x,0) Ex2:taylor(sin(x),x=0,5,polynom) Ex3:taylor(ln(y+y^2)-ln(y),y) @@ -17045,10 +17045,10 @@ cdef class GiacMethods_base: Ex5:taylor(ln(x+x^2)-ln(x),x=0,2) Ex6:taylor(ln(x+x^2)-ln(x),x=1,2) Ex7:taylor((x^4+x+2)/(x^2+1),x,5) - Ex8:taylor(sin(t*x+t*y)+cos(t*x*t*y),t=0,6,polynom)(h=1) + Ex8:taylor(sin(t*x+t*y)+cos(t*x*t*y),t=0,6,polynom)(h=1) Ex9:taylor(sin((1+h*t)*(pi/2+k*t)),t=0,3,polynom)(t=1) Ex10:taylor((-1+k*t)^2/(1+h*t)^3,t=0,3,polynom)(t=1) - + ''' return GiacMethods['taylor'](self,*args) @@ -17057,9 +17057,9 @@ cdef class GiacMethods_base: Help for tchebyshev1: tchebyshev1(Intg(n)) Returns the n-th Tchebyshev polynomial of first kind. - See also: 1/ tchebyshev2 2/ hermite + See also: 1/ tchebyshev2 2/ hermite Ex1:tchebyshev1(3) - + ''' return GiacMethods['tchebyshev1'](self,*args) @@ -17068,9 +17068,9 @@ cdef class GiacMethods_base: Help for tchebyshev2: tchebyshev2(Intg(n)) Returns the nt-h Tchebyshev polynomial of second kind. - See also: 1/ tchebyshev1 2/ hermite + See also: 1/ tchebyshev1 2/ hermite Ex1:tchebyshev2(3) - + ''' return GiacMethods['tchebyshev2'](self,*args) @@ -17079,10 +17079,10 @@ cdef class GiacMethods_base: Help for tcoeff: tcoeff(Poly||Lst) Returns the coefficient of the term of lowest degree of a polynomial (t=trailing). - See also: 1/ lcoeff + See also: 1/ lcoeff Ex1:tcoeff(-2*x^3+x^2+7*x) Ex2:tcoeff([-2,1,7,0]) - + ''' return GiacMethods['tcoeff'](self,*args) @@ -17091,9 +17091,9 @@ cdef class GiacMethods_base: Help for tcollect: tcollect(Expr) Collects trigonometric expressions. - See also: 1/ texpand 2/ tlin + See also: 1/ texpand 2/ tlin Ex1:tcollect(sin(x)+cos(x)) - + ''' return GiacMethods['tcollect'](self,*args) @@ -17102,8 +17102,8 @@ cdef class GiacMethods_base: Help for tdeg: tdeg(Opt) Option of the gbasis or greduce command to specify an order for monomials (complete degree then lexicographic order). - See also: 1/ gbasis 2/ greduce - + See also: 1/ gbasis 2/ greduce + ''' return GiacMethods['tdeg'](self,*args) @@ -17112,9 +17112,9 @@ cdef class GiacMethods_base: Help for tensor_product: tensor_product(Seq(G1,G2,..)) Returns the tensor product of the input graphs G1, G2, ... with vertices labelled as "u:v:..." where u, v, ... are vertices from G1, G2, ..., respectively. - See also: 1/ cartesian_product + See also: 1/ cartesian_product Ex1:tensor_product(graph(trail(1,2,3,4,5,2)),star_graph(3)) - + ''' return GiacMethods['tensor_product'](self,*args) @@ -17123,10 +17123,10 @@ cdef class GiacMethods_base: Help for tetrahedron: tetrahedron(Pnt(A),Pnt(B),Pnt(C),[Pnt(D)]) Draws the regular direct pyramid ABCD with vertices A,B and a face in the plane (A,B,C) when there is 3 arguments and the pyramid ABCD when there are 4 arguments. - See also: 1/ cube 2/ cylinder 3/ icosahedron 4/ dodecahedron 5/ octahedron + See also: 1/ cube 2/ cylinder 3/ icosahedron 4/ dodecahedron 5/ octahedron Ex1:tetrahedron([0,0,0],[3,0,0],[0,1,0]) Ex2:tetrahedron([0,0,0],[3,0,0],[0,3,0],[0,0,4]) - + ''' return GiacMethods['tetrahedron'](self,*args) @@ -17135,11 +17135,11 @@ cdef class GiacMethods_base: Help for texpand: texpand(Expr) Expands transcendental expressions. - See also: 1/ tcollect 2/ tlin 3/ lin 4/ trigexpand + See also: 1/ tcollect 2/ tlin 3/ lin 4/ trigexpand Ex1:texpand(sin(2*x)+exp(x+y)) Ex2:texpand(cos(x+y)) Ex3:texpand(cos(3*x)) - + ''' return GiacMethods['texpand'](self,*args) @@ -17148,10 +17148,10 @@ cdef class GiacMethods_base: Help for thickness: thickness(Opt) Option (Maple compatibility) of a graphic command to define the thickness of lines. - See also: 1/ line_width + See also: 1/ line_width Ex1: segment(0,point(1,1),thickness=5) Ex2: segment(0,point(1,1),epaisseur=5) - + ''' return GiacMethods['thickness'](self,*args) @@ -17160,10 +17160,10 @@ cdef class GiacMethods_base: Help for threshold: threshold(Lst,Real(bound)[=Expr(repl)] or Lst[Real(lower)[=Expr(rl)],Real(upper)[=Expr(ru)]],[Fnc(compare)],[abs[=true or false]]) Performs thresholding operations on a list of real or complex numbers. - See also: 1/ max 2/ min + See also: 1/ max 2/ min Ex1:threshold([1,3,2,4,5,4,3,2,3,1],3,'>=') Ex2:threshold([-10,-5,0,5,10],7=a,abs=true) - + ''' return GiacMethods['threshold'](self,*args) @@ -17172,10 +17172,10 @@ cdef class GiacMethods_base: Help for throw: throw(Str) Generates the display of an error in a program. - See also: 1/ try 2/ catch + See also: 1/ try 2/ catch Ex1:throw("Argument should be integer") Ex2:throw("je provoque une erreur") - + ''' return GiacMethods['throw'](self,*args) @@ -17184,10 +17184,10 @@ cdef class GiacMethods_base: Help for title: title(Opt) Global option of a graphic command to put a title in a graphic. - See also: 1/ line_width + See also: 1/ line_width Ex1: title="segment";segment(0,point(1,1),epaisseur=5) Ex2: titre="segment";segment(0,point(1,1),epaisseur=5) - + ''' return GiacMethods['title'](self,*args) @@ -17196,10 +17196,10 @@ cdef class GiacMethods_base: Help for titre: titre(Opt) Global option of a graphic command to put a title in a graphic. - See also: 1/ line_width + See also: 1/ line_width Ex1: title="segment";segment(0,point(1,1),epaisseur=5) Ex2: titre="segment";segment(0,point(1,1),epaisseur=5) - + ''' return GiacMethods['titre'](self,*args) @@ -17208,10 +17208,10 @@ cdef class GiacMethods_base: Help for tlin: tlin(ExprTrig) Trigonometric linearization. - See also: 1/ texpand 2/ lin + See also: 1/ texpand 2/ lin Ex1:tlin(sin(x)^3) Ex2:tlin(cos(x)*cos(y)) - + ''' return GiacMethods['tlin'](self,*args) @@ -17220,10 +17220,10 @@ cdef class GiacMethods_base: Help for tonnetz: tonnetz(Intg(a),Intg(b),Intg(c),[Intg(d)]) Returns the graph corresponding to the [a,b,c] resp. [a,b,c,d] tone network (tonnetz) used in neo-Riemannian music theory. - See also: 1/ is_regular 2/ clique_stats + See also: 1/ is_regular 2/ clique_stats Ex1:tonnetz(3,4,5) Ex2:tonnetz(2,3,3,4) - + ''' return GiacMethods['tonnetz'](self,*args) @@ -17232,9 +17232,9 @@ cdef class GiacMethods_base: Help for topologic_sort: topologic_sort(Graph(G)) Returns the list of vertices sorted according to the topological ordering in the directed acyclic graph G. - See also: 1/ digraph 2/ is_acyclic + See also: 1/ digraph 2/ is_acyclic Ex1:topologic_sort(digraph(%{[c,a],[c,b],[c,d],[a,d],[b,d],[a,b]%})) - + ''' return GiacMethods['topologic_sort'](self,*args) @@ -17243,9 +17243,9 @@ cdef class GiacMethods_base: Help for topological_sort: topological_sort(Graph(G)) Returns the list of vertices sorted according to the topological ordering in the directed acyclic graph G. - See also: 1/ digraph 2/ is_acyclic + See also: 1/ digraph 2/ is_acyclic Ex1:topological_sort(digraph(%{[c,a],[c,b],[c,d],[a,d],[b,d],[a,b]%})) - + ''' return GiacMethods['topological_sort'](self,*args) @@ -17254,9 +17254,9 @@ cdef class GiacMethods_base: Help for torus_grid_graph: torus_grid_graph(Intg(m),Intg(n)) Returns a torus grid graph on m*n vertices, where m,n>=3. - See also: 1/ grid_graph + See also: 1/ grid_graph Ex1:torus_grid_graph(6,12) - + ''' return GiacMethods['torus_grid_graph'](self,*args) @@ -17265,9 +17265,9 @@ cdef class GiacMethods_base: Help for total_degree: total_degree(Poly(P),Lst(Vars)) Total degree of the polynomial P with respect to the second argument. - See also: 1/ valuation 2/ size 3/ degree + See also: 1/ valuation 2/ size 3/ degree Ex1:total_degree(x^3*y+x*y,[x,y]) - + ''' return GiacMethods['total_degree'](self,*args) @@ -17276,10 +17276,10 @@ cdef class GiacMethods_base: Help for tourne_droite: tourne_droite(NULL or Real(n)) The turtle turns right by n degrees (by default n=90). - See also: 1/ tourne_gauche 2/ pas_de_cote + See also: 1/ tourne_gauche 2/ pas_de_cote Ex1: tourne_droite 60 Ex2:tourne_droite(60) - + ''' return GiacMethods['tourne_droite'](self,*args) @@ -17288,10 +17288,10 @@ cdef class GiacMethods_base: Help for tourne_gauche: tourne_gauche(NULL or Real(n)) The turtle turns left by n degrees (by defaults n=90). - See also: 1/ tourne_droite + See also: 1/ tourne_droite Ex1: tourne_gauche 60 Ex2:tourne_gauche(60) - + ''' return GiacMethods['tourne_gauche'](self,*args) @@ -17304,7 +17304,7 @@ cdef class GiacMethods_base: Ex2:tpsolve([7,10,8,8,9,6],[9,6,12,8,10],[[36,40,32,43,29],[28,27,29,40,38],[34,35,41,29,31],[41,42,35,27,36],[25,28,40,34,38],[31,30,43,38,40]]) Ex3:tpsolve([95,70,165,165],[195,150,30,45,75],[[15,M,45,M,0],[12,40,M,M,0],[0,15,25,25,0],[M,0,M,12,0]]) Ex4:tpsolve([1,1,1,1],[1,1,1,1],[[10,12,9,11],[5,10,7,8],[12,14,13,11],[8,15,11,9]]) - + ''' return GiacMethods['tpsolve'](self,*args) @@ -17313,12 +17313,12 @@ cdef class GiacMethods_base: Help for trace: trace(Mtrx or GeoObj) Returns the trace of a square matrix or draws the trace of a geometric object when the parameter changes (see Trace in Menu button of a geometric level and write only one instruction on each line). - See also: 1/ det 2/ lieu + See also: 1/ det 2/ lieu Ex1:trace([[1,2,3],[1,3,6],[2,5,7]]) Ex2:trace([[1+i,2,3],[1,3,6],[2,5,9-i]]) Ex3: assume(a=[0.7,-5,5,0.1]);trace(point(a-i*a)) Ex4: assume(a=[0.7,-5,5,0.1]);trace(inter_unique(droite(y=a*x+a),droite(y=2*a*x+1))) - + ''' return GiacMethods['trace'](self,*args) @@ -17327,9 +17327,9 @@ cdef class GiacMethods_base: Help for trail: trail(Seq(V)) Returns a trail of vertices from V (inert command). - See also: 1/ graph 2/ digraph + See also: 1/ graph 2/ digraph Ex1:trail(1,2,3,4,1) - + ''' return GiacMethods['trail'](self,*args) @@ -17338,10 +17338,10 @@ cdef class GiacMethods_base: Help for trail2edges: trail2edges(Trail(T)) Converts a trail T to the list of its edges. - See also: 1/ subgraph 2/ trail + See also: 1/ subgraph 2/ trail Ex1:trail2edges(trail(1,2,3,4,1,3)) Ex2:trail2edges([1,2,3,4,1,3]) - + ''' return GiacMethods['trail2edges'](self,*args) @@ -17350,10 +17350,10 @@ cdef class GiacMethods_base: Help for trames: trames(Opt) Option of animate and animate3d commands to give the number of pictures. - See also: 1/ animate 2/ animate3d + See also: 1/ animate 2/ animate3d Ex1: animate(sin(x*t),x=-pi..pi,t=-3..3,frames=30) Ex2: animate3d(x^2+t*y^2,[x=-2..2,y=-2..2],t=-3..3,frames=10) - + ''' return GiacMethods['trames'](self,*args) @@ -17362,11 +17362,11 @@ cdef class GiacMethods_base: Help for tran: tran(Mtrx) Transposes a matrix (without conjugation). - See also: 1/ conj 2/ trn + See also: 1/ conj 2/ trn Ex1:tran([[1,2,3],[1,3,6],[2,5,7]]) Ex2:tran([[1+i,2,3],[1,3,6],[2,5,9-i]]) Ex3:tran(conj([[1+i,2,3],[1,3,6],[2,5,9-i]])) - + ''' return GiacMethods['tran'](self,*args) @@ -17375,9 +17375,9 @@ cdef class GiacMethods_base: Help for transitive_closure: transitive_closure(Graph(G),[weighted[=true||false]]) Returns the [weighted, by default false] transitive closure of G. - See also: 1/ allpairs_distance 2/ is_connected 3/ shortest_path 4/ vertex_distance + See also: 1/ allpairs_distance 2/ is_connected 3/ shortest_path 4/ vertex_distance Ex1:transitive_closure(digraph([1,2,3,4,5,6],%{[1,2],[2,3],[2,4],[4,5],[3,5]%}),weighted) - + ''' return GiacMethods['transitive_closure'](self,*args) @@ -17386,12 +17386,12 @@ cdef class GiacMethods_base: Help for translation: translation(Vect, Pnt(C)) translation(B-A,C) (resp translation([a,b,c],C)) is the translation of C in the translation of vector AB (resp [a,b,c]). - See also: 1/ rotation 2/ reflection + See also: 1/ rotation 2/ reflection Ex1:translation(1+i,i) Ex2:translation([1,1,1],point([1,2,3])) Ex3: t:=translation(1+i);t(i) Ex4: t:=translation([1,1,1]);t(point([1,2,3])) - + ''' return GiacMethods['translation'](self,*args) @@ -17400,11 +17400,11 @@ cdef class GiacMethods_base: Help for transpose: transpose(Mtrx) Transposes a matrix (without conjugation). - See also: 1/ conj 2/ trn + See also: 1/ conj 2/ trn Ex1:transpose([[1,2,3],[1,3,6],[2,5,7]]) Ex2:transpose([[1+i,2,3],[1,3,6],[2,5,9-i]]) Ex3:transpose(conj([[1+i,2,3],[1,3,6],[2,5,9-i]])) - + ''' return GiacMethods['transpose'](self,*args) @@ -17413,14 +17413,14 @@ cdef class GiacMethods_base: Help for trapeze: trapeze(Opt) Option of the plotarea command and of the area command. - See also: 1/ plotarea 2/ area + See also: 1/ plotarea 2/ area Ex1: plotarea(x^2,x=0..1,5,trapezoid) Ex2: plotarea(x^2,x=0..1,5,middle_point) Ex3: plotarea(x^2,x=0..1,5,right_rectangle) Ex4: plotarea(x^2,x=0..1,5,left_rectangle) Ex5: area(x^2,x=0..1,5,middle_point) Ex6: area(x^2,x=0..1,5,trapezoid) - + ''' return GiacMethods['trapeze'](self,*args) @@ -17429,14 +17429,14 @@ cdef class GiacMethods_base: Help for trapezoid: trapezoid(Opt) Option of the plotarea command and of the area command. - See also: 1/ plotarea 2/ area + See also: 1/ plotarea 2/ area Ex1: plotarea(x^2,x=0..1,5,trapezoid) Ex2: plotarea(x^2,x=0..1,5,middle_point) Ex3: plotarea(x^2,x=0..1,5,right_rectangle) Ex4: plotarea(x^2,x=0..1,5,left_rectangle) Ex5: area(x^2,x=0..1,5,middle_point) Ex6: area(x^2,x=0..1,5,trapezoid) - + ''' return GiacMethods['trapezoid'](self,*args) @@ -17445,13 +17445,13 @@ cdef class GiacMethods_base: Help for traveling_salesman: traveling_salesman(Graph(G),[Mtrx(M)],[opts]) Returns a Hamiltonian cycle in an unweighted graph G or solves traveling salesman problem if G is weighted (matrix M can be used for edge weights), returning a sequence containing the minimal cost and the corresponding Hamiltonian cycle. - See also: 1/ is_hamiltonian + See also: 1/ is_hamiltonian Ex1:traveling_salesman(hypercube_graph(5)) Ex2:traveling_salesman(digraph(%{[[1,2],1],[[1,3],2],[[2,3],2],[[2,4],3],[[3,2],3],[[3,4],2],[[4,1],1]%})) Ex3: M:=randmatrix(4,4,99); traveling_salesman(graph("tetrahedron"),M) Ex4: G:=set_vertex_positions(complete_graph(42),[randvector(2,1000)$(k=1..42)]); traveling_salesman(G,vertex_distance) Ex5: G:=set_vertex_positions(complete_graph(120),[randvector(2,1000)$(k=1..120)]); c,T:=traveling_salesman(G,vertex_distance,approx) - + ''' return GiacMethods['traveling_salesman'](self,*args) @@ -17460,8 +17460,8 @@ cdef class GiacMethods_base: Help for tree: tree(Opt) Option for the draw_graph command. - See also: 1/ planar 2/ spring 3/ draw_graph - + See also: 1/ planar 2/ spring 3/ draw_graph + ''' return GiacMethods['tree'](self,*args) @@ -17470,9 +17470,9 @@ cdef class GiacMethods_base: Help for tree_height: tree_height(Graph(T),Vrtx(r)) Returns the height of the tree graph T with r as the root node. - See also: 1/ is_tree 2/ random_tree + See also: 1/ is_tree 2/ random_tree Ex1:tree_height(graph(%{[1,2],[2,3],[2,4],[4,5]%}),1) - + ''' return GiacMethods['tree_height'](self,*args) @@ -17481,9 +17481,9 @@ cdef class GiacMethods_base: Help for tri: tri(Expr(x)) Returns the value of the triangle function at x. - See also: 1/ rect 2/ Heaviside + See also: 1/ rect 2/ Heaviside Ex1:tri(x-1) - + ''' return GiacMethods['tri'](self,*args) @@ -17492,11 +17492,11 @@ cdef class GiacMethods_base: Help for triangle: triangle((Pnt or Cplx),(Pnt or Cplx),(Pnt or Cplx)) triangle(A,B,C) draws the triangle ABC. - See also: 1/ equilateral_triangle 2/ isosceles_triangle 3/ right_triangle + See also: 1/ equilateral_triangle 2/ isosceles_triangle 3/ right_triangle Ex1:triangle(point(1+i),1,0) Ex2:triangle(0,1,1+i) Ex3:triangle(point(0,0,0),point(3,3,3),point(0,3,3)) - + ''' return GiacMethods['triangle'](self,*args) @@ -17509,7 +17509,7 @@ cdef class GiacMethods_base: Ex2:triangle_paper(1,pi/3,sqrt(3)/2,x=-1..4,y=-2..2) Ex3:triangle_paper(papier_triangule(1,pi/3,sqrt(3)/2,x=-2..6,y=-4*sqrt(3)..4*sqrt(3))) Ex4:triangle_paper(0.5,3*pi/4,0.5) - + ''' return GiacMethods['triangle_paper'](self,*args) @@ -17518,12 +17518,12 @@ cdef class GiacMethods_base: Help for triangle_plein: triangle_plein(Real(a),[Real(b)],[Real(t)]) Draws a full direct triangle with sides a,b and with angle t, from the turtle position (by default t=90 or (b=a and t=60)). - See also: 1/ rectangle_plein + See also: 1/ rectangle_plein Ex1: triangle_plein 30 Ex2:triangle_plein(30) Ex3:triangle_plein(30,40) Ex4:triangle_plein(30,40,60) - + ''' return GiacMethods['triangle_plein'](self,*args) @@ -17532,10 +17532,10 @@ cdef class GiacMethods_base: Help for triangle_point: triangle_point(Opt) Option of the display command for a point. - See also: 1/ display + See also: 1/ display Ex1: F:=display(point(2+1.5*i),point_point) Ex2: F:=display(point(2+1.5*i),rhombus_point) - + ''' return GiacMethods['triangle_point'](self,*args) @@ -17544,9 +17544,9 @@ cdef class GiacMethods_base: Help for triangle_window: triangle_window(Lst,[Intg(d)],[Interval(n1..n2)]) Applies the triangular windowing function with parameter d in {-1,0,1} (by default L=0) to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ bartlett_hann_window 13/ tukey_window 14/ welch_window + See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ bartlett_hann_window 13/ tukey_window 14/ welch_window Ex1: scatterplot(triangle_window(randvector(1000,0..1),1)) - + ''' return GiacMethods['triangle_window'](self,*args) @@ -17555,9 +17555,9 @@ cdef class GiacMethods_base: Help for trig2exp: trig2exp(Expr) Replaces in the argument the trigonometric functions by complex exponentials without linearisation. - See also: 1/ exp2trig 2/ atrig2ln + See also: 1/ exp2trig 2/ atrig2ln Ex1:trig2exp(sin(x)) - + ''' return GiacMethods['trig2exp'](self,*args) @@ -17566,9 +17566,9 @@ cdef class GiacMethods_base: Help for trigcos: trigcos(Expr) Simplifies the argument with the formulas sin(x)^2+cos(x)^2=1 and tan(x)=sin(x)/cos(x) privileging cosine. - See also: 1/ trigsin 2/ trigtan + See also: 1/ trigsin 2/ trigtan Ex1:trigcos(sin(x)^4+sin(x)^2) - + ''' return GiacMethods['trigcos'](self,*args) @@ -17577,9 +17577,9 @@ cdef class GiacMethods_base: Help for trigexpand: trigexpand(Expr) Expands trigonometric functions. - See also: 1/ texpand 2/ lnexpand 3/ expexpand + See also: 1/ texpand 2/ lnexpand 3/ expexpand Ex1:trigexpand(sin(3*x)) - + ''' return GiacMethods['trigexpand'](self,*args) @@ -17588,10 +17588,10 @@ cdef class GiacMethods_base: Help for triginterp: triginterp(List,Var=xmin..xmax) Returns a trigonometric polynomial interpolation (with respect to variable x) of the points with ordinate given in list y and the abscissa equally spaced between a and b. - See also: 1/ lagrange 2/ thiele + See also: 1/ lagrange 2/ thiele Ex1:triginterp([11,10,17,24,32,26,23,19],x=0..21) Ex2:triginterp([11,10,17,24,32,26,23,19],0,21,x) - + ''' return GiacMethods['triginterp'](self,*args) @@ -17600,9 +17600,9 @@ cdef class GiacMethods_base: Help for trigsimplify: trigsimplify(Expr) Simplifies a trigonometric expression. - See also: 1/ simplify + See also: 1/ simplify Ex1:trigsimplify(3*sin(x)-4*sin(x)^3) - + ''' return GiacMethods['trigsimplify'](self,*args) @@ -17611,9 +17611,9 @@ cdef class GiacMethods_base: Help for trigsin: trigsin(Expr) Simplifies the argument with the formulas sin(x)^2+cos(x)^2=1 and tan(x)=sin(x)/cos(x) privileging sine. - See also: 1/ trigcos 2/ trigtan + See also: 1/ trigcos 2/ trigtan Ex1:trigsin(cos(x)^4+sin(x)^2) - + ''' return GiacMethods['trigsin'](self,*args) @@ -17622,9 +17622,9 @@ cdef class GiacMethods_base: Help for trigtan: trigtan(Expr) Simplifies the argument with the formulas sin(x)^2+cos(x)^2=1 and tan(x)=sin(x)/cos(x) privileging tangent. - See also: 1/ trigsin 2/ trigcos + See also: 1/ trigsin 2/ trigcos Ex1:trigtan(cos(x)^4+sin(x)^2) - + ''' return GiacMethods['trigtan'](self,*args) @@ -17633,9 +17633,9 @@ cdef class GiacMethods_base: Help for trn: trn(Mtrx) Returns the adjoint matrix of A =tran(conj(A)). - See also: 1/ tran 2/ conj + See also: 1/ tran 2/ conj Ex1:trn([[1,2+i],[3,4]]) - + ''' return GiacMethods['trn'](self,*args) @@ -17644,9 +17644,9 @@ cdef class GiacMethods_base: Help for true: true() Boolean equal to true or 1. - See also: 1/ false + See also: 1/ false Ex1: a:=true - + ''' return GiacMethods['true'](self,*args) @@ -17655,13 +17655,13 @@ cdef class GiacMethods_base: Help for trunc: trunc(Real||LstReal,Int(n)) Truncates value to n decimal places (by default n=0). Accepts complex numbers.(type=DOM_COMPLEX or DOM_FLOAT). - See also: 1/ fPart 2/ floor 3/ iPart + See also: 1/ fPart 2/ floor 3/ iPart Ex1:trunc(4.3) Ex2:trunc(sqrt(2),3) Ex3:trunc([4.3333,sqrt(2)]) Ex4:trunc([4.3333,sqrt(2)],2) Ex5:trunc(sqrt(2)+i*sqrt(5),4) - + ''' return GiacMethods['trunc'](self,*args) @@ -17670,9 +17670,9 @@ cdef class GiacMethods_base: Help for truncate: truncate(Poly(P),Intg(n)) Truncates the polynomial P at order n. - See also: 1/ series + See also: 1/ series Ex1:truncate((x^2+x)^2,3) - + ''' return GiacMethods['truncate'](self,*args) @@ -17681,9 +17681,9 @@ cdef class GiacMethods_base: Help for truncate_graph: truncate_graph(Graph(G)) Returns the graph obtained by truncating the biconnected planar graph G. - See also: 1/ is_biconnected 2/ is_planar 3/ plane_dual + See also: 1/ is_biconnected 2/ is_planar 3/ plane_dual Ex1:truncate_graph(graph("tetrahedron")) - + ''' return GiacMethods['truncate_graph'](self,*args) @@ -17692,9 +17692,9 @@ cdef class GiacMethods_base: Help for tsimplify: tsimplify(Expr) Lowers the number of non rational variables. - See also: 1/ simplify + See also: 1/ simplify Ex1:tsimplify(exp(2*x)+exp(x)) - + ''' return GiacMethods['tsimplify'](self,*args) @@ -17703,9 +17703,9 @@ cdef class GiacMethods_base: Help for tuer: tuer(NULL) Stop step-by-step execution of a program (with debug). - See also: 1/ + See also: 1/ Ex1:tuer() - + ''' return GiacMethods['tuer'](self,*args) @@ -17714,9 +17714,9 @@ cdef class GiacMethods_base: Help for tukey_window: tukey_window(Lst,[Real(a)],[Interval(n1..n2)]) Applies the Tukey windowing function with parameter a in [0,1] (by default a=0.5) to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ bartlett_hann_window 14/ welch_window + See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ bartlett_hann_window 14/ welch_window Ex1: scatterplot(tukey_window(randvector(1000,0..1),0.4)) - + ''' return GiacMethods['tukey_window'](self,*args) @@ -17725,10 +17725,10 @@ cdef class GiacMethods_base: Help for tutte_polynomial: tutte_polynomial(Graph(G),[Var(x),Var(y)]) Returns the Tutte polynomial [or its value at point (x,y)] of undirected graph G. If G is weighted, all weights must be positive integers and are interpreted as edge multiplicities. - See also: 1/ chromatic_polynomial 2/ flow_polynomial 3/ reliability_polynomial 4/ delete_edge 5/ contract_edge + See also: 1/ chromatic_polynomial 2/ flow_polynomial 3/ reliability_polynomial 4/ delete_edge 5/ contract_edge Ex1:tutte_polynomial(graph("tetrahedron")) Ex2:tutte_polynomial(graph("tetrahedron"),1,1) - + ''' return GiacMethods['tutte_polynomial'](self,*args) @@ -17737,9 +17737,9 @@ cdef class GiacMethods_base: Help for two_edge_connected_components: two_edge_connected_components(Graph(G)) Returns the list of two-edge-connected components of undirected graph G, each of them represented by the list of its vertices. - See also: 1/ is_two_edge_connected 2/ connected_components + See also: 1/ is_two_edge_connected 2/ connected_components Ex1:two_edge_connected_components(graph(trail(1,2,3,4,5,3,1),trail(5,6,7,8,6))) - + ''' return GiacMethods['two_edge_connected_components'](self,*args) @@ -17748,9 +17748,9 @@ cdef class GiacMethods_base: Help for ufactor: ufactor(Unit,Unit) Factors a unit in a unit object. - See also: 1/ convert 2/ mksa 3/ usimplify + See also: 1/ convert 2/ mksa 3/ usimplify Ex1:ufactor(100_C,1_A) - + ''' return GiacMethods['ufactor'](self,*args) @@ -17759,10 +17759,10 @@ cdef class GiacMethods_base: Help for ugamma: ugamma(Real(a),Real(x),[1]) Calculates ugamma function at a point (a,x):if a and x>=0 ugamma(a,x)=int(e^{-t}*t^{a-1},t=x..inf),(ugamma(a,x)+igamma(a,x)=Gamma(a)). - See also: 1/ Psi 2/ Beta 3/ Gamma 4/ igamma + See also: 1/ Psi 2/ Beta 3/ Gamma 4/ igamma Ex1:ugamma(5.0,2.0) Ex2:ugamma(-5.1,2.1) - + ''' return GiacMethods['ugamma'](self,*args) @@ -17771,10 +17771,10 @@ cdef class GiacMethods_base: Help for unapply: unapply(Expr,Var) Returns a function defined by an expression. - See also: 1/ apply + See also: 1/ apply Ex1:unapply(2*x^2,x) Ex2: f(x):=x*exp(x);g:=unapply(diff(f(x),x),x) - + ''' return GiacMethods['unapply'](self,*args) @@ -17783,10 +17783,10 @@ cdef class GiacMethods_base: Help for unarchive: unarchive(Str(namefich),Seq(Var)) Reads the value of a variable or of a list of variables which are in the file given as argument (file created with archive). - See also: 1/ archive 2/ Archive 3/ Unarchiv + See also: 1/ archive 2/ Archive 3/ Unarchiv Ex1:unarchive("toto") Ex2:unarchive("aa.txt") - + ''' return GiacMethods['unarchive'](self,*args) @@ -17795,9 +17795,9 @@ cdef class GiacMethods_base: Help for underlying_graph: underlying_graph(Graph(G)) Returns the graph obtained by stripping directions and weights from arcs (pairs of arcs connecting the same vertices are merged to a single edge). - See also: 1/ is_directed 2/ is_weighted 3/ make_directed 4/ make_weighted + See also: 1/ is_directed 2/ is_weighted 3/ make_directed 4/ make_weighted Ex1:underlying_graph(digraph(trail(1,2,3,4,1))) - + ''' return GiacMethods['underlying_graph'](self,*args) @@ -17806,13 +17806,13 @@ cdef class GiacMethods_base: Help for unfactored: unfactored(Opt.) Option of the plotimplicit command. - See also: 1/ plotimplicit + See also: 1/ plotimplicit Ex1: plotimplicit(x^2+y^2-1,x,y,unfactored) Ex2: plotimplicit(x^2+y^2-1,[x,y],unfactored) Ex3: plotimplicit(x^2+y^2+z^2-1,x,y,z,xstep=0.2,ystep=0.2,zstep=0.2,unfactored) Ex4: plotimplicit(x^2+y^2+z^2-1,[x,y,z],xstep=0.2,ystep=0.2,zstep=0.2,unfactored) Ex5: plotimplicit(x^2+y^2+z^2-1,x=0..1,y=0..1,z=0..1,xstep=0.2,ystep=0.2,zstep=0.2,unfactored) - + ''' return GiacMethods['unfactored'](self,*args) @@ -17821,12 +17821,12 @@ cdef class GiacMethods_base: Help for uniform: uniform(Real(a),Real(b),Real(x)) Returns the probability density at x of the uniform law on [a,b]. - See also: 1/ uniform_cdf 2/ uniform_icdf 3/ randvector 4/ ranm + See also: 1/ uniform_cdf 2/ uniform_icdf 3/ randvector 4/ ranm Ex1:uniform(2,5,4) Ex2:uniform(1.2,3.5,3) Ex3: randvector(3,uniform,1.2,3.5) Ex4: ranm(4,3,uniform,1.2,3.5) - + ''' return GiacMethods['uniform'](self,*args) @@ -17835,10 +17835,10 @@ cdef class GiacMethods_base: Help for uniform_cdf: uniform_cdf(Real(a),Real(b),Real(x0),[Real(y0)]) Returns the probability that a uniform random variable on [a,b] is less than x0 (or between x0 and y0). - See also: 1/ uniformd 2/ uniform_icdf + See also: 1/ uniformd 2/ uniform_icdf Ex1:uniform_cdf(3.2,5.7,4.4) Ex2:uniform_cdf(3.2,5.7,4.4,5.4) - + ''' return GiacMethods['uniform_cdf'](self,*args) @@ -17847,10 +17847,10 @@ cdef class GiacMethods_base: Help for uniform_icdf: uniform_icdf(Real(a),Real(b),Real(p)) Returns h such that the probability that a uniform random variable on [a,b] is less than h is p (0<=p<=1). - See also: 1/ uniform_cdf 2/ uniformd + See also: 1/ uniform_cdf 2/ uniformd Ex1:uniform_icdf(4.2,10.3,0.95) Ex2:uniform_icdf(3.2,5.7,0.48) - + ''' return GiacMethods['uniform_icdf'](self,*args) @@ -17859,12 +17859,12 @@ cdef class GiacMethods_base: Help for uniformd: uniformd(Real(a),Real(b),Real(x)) Returns the probability density at x of the uniform law on [a,b]. - See also: 1/ uniform_cdf 2/ uniform_icdf 3/ randvector 4/ ranm + See also: 1/ uniform_cdf 2/ uniform_icdf 3/ randvector 4/ ranm Ex1:uniformd(2,5,4) Ex2:uniformd(1.2,3.5,3) Ex3: randvector(3,uniform,1.2,3.5) Ex4: ranm(4,3,uniform,1.2,3.5) - + ''' return GiacMethods['uniformd'](self,*args) @@ -17873,10 +17873,10 @@ cdef class GiacMethods_base: Help for uniformd_cdf: uniformd_cdf(Real(a),Real(b),Real(x0),[Real(y0)]) Returns the probability that a uniform random variable on [a,b] is less than x0 (or between x0 and y0). - See also: 1/ uniformd 2/ uniform_icdf + See also: 1/ uniformd 2/ uniform_icdf Ex1:uniformd_cdf(3.2,5.7,4.4) Ex2:uniformd_cdf(3.2,5.7,4.4,5.4) - + ''' return GiacMethods['uniformd_cdf'](self,*args) @@ -17885,10 +17885,10 @@ cdef class GiacMethods_base: Help for uniformd_icdf: uniformd_icdf(Real(a),Real(b),Real(p)) Returns h such that the probability that a uniform random variable on [a,b] is less than h is p (0<=p<=1). - See also: 1/ uniform_cdf 2/ uniformd + See also: 1/ uniform_cdf 2/ uniformd Ex1:uniformd_icdf(4.2,10.3,0.95) Ex2:uniformd_icdf(3.2,5.7,0.48) - + ''' return GiacMethods['uniformd_icdf'](self,*args) @@ -17897,12 +17897,12 @@ cdef class GiacMethods_base: Help for unitV: unitV(Lst||Cplx) Returns the vector divided by its l2norm. It is also an option for plotfield. - See also: 1/ l2norm + See also: 1/ l2norm Ex1:unitV(3+4*i) Ex2:unitV([3,4]) Ex3: fieldplot(-t*y,[t,y],normalize) Ex4: fieldplot(-t*y,[t,y],normalize,xstep=0.5,ystep=0.5) - + ''' return GiacMethods['unitV'](self,*args) @@ -17911,9 +17911,9 @@ cdef class GiacMethods_base: Help for unquote: unquote(Expr) Evaluates a quoted expression (for example purge(c);a:=c;unquote(a):=3; put 3 in the variables a and c). - See also: 1/ quote + See also: 1/ quote Ex1:unquote(a) - + ''' return GiacMethods['unquote'](self,*args) @@ -17922,10 +17922,10 @@ cdef class GiacMethods_base: Help for upper: upper(Mtrx||Strng) Returns the upper triangular matrix (over the diagonal, included) or writes a string in uppercase. - See also: 1/ diag 2/ lower + See also: 1/ diag 2/ lower Ex1:upper([[1,2,3],[4,5,6],[7,8,9]]) Ex2:upper("hello") - + ''' return GiacMethods['upper'](self,*args) @@ -17934,10 +17934,10 @@ cdef class GiacMethods_base: Help for user_operator: user_operator(Str(R),Fnc(f),Opt(Binary||Unary||Delete)) Defines a binary operator and returns 0 (failure) or 1(success). - See also: 1/ + See also: 1/ Ex1:user_operator("R",(x,y)->x*y+x+y,Binary) Ex2:user_operator("R",(x,y)->x*y+x+y,Delete) - + ''' return GiacMethods['user_operator'](self,*args) @@ -17946,9 +17946,9 @@ cdef class GiacMethods_base: Help for usimplify: usimplify(Unit) Simplifies a unit in a unit object. - See also: 1/ convert 2/ mksa 3/ ufactor + See also: 1/ convert 2/ mksa 3/ ufactor Ex1:usimplify(100_(W*s)) - + ''' return GiacMethods['usimplify'](self,*args) @@ -17957,12 +17957,12 @@ cdef class GiacMethods_base: Help for valuation: valuation(Poly(P)) Returns the valuation (degree of the term of lowest degree) of the polynomial P. - See also: 1/ degree 2/ tcoeff + See also: 1/ degree 2/ tcoeff Ex1:valuation(x^4+x^3) Ex2:valuation([1,1,0,0,0]) Ex3:valuation(x^5+3*x^2) Ex4:valuation([5,0,0,3,0,0]) - + ''' return GiacMethods['valuation'](self,*args) @@ -17971,9 +17971,9 @@ cdef class GiacMethods_base: Help for vandermonde: vandermonde(Vect(V)) Returns the Vandermonde matrix=[V^0,V^1,..]. - See also: 1/ det + See also: 1/ det Ex1:vandermonde([1,2,a]) - + ''' return GiacMethods['vandermonde'](self,*args) @@ -17982,10 +17982,10 @@ cdef class GiacMethods_base: Help for variables_are_files: variables_are_files(:=Intg(0 or 1)) Pseudo-variable to specify if you want to save the variables as file "nameofthevariable.cas". - See also: 1/ cas_setup + See also: 1/ cas_setup Ex1: variables_are_files:=1 Ex2: variables_are_files:=0 - + ''' return GiacMethods['variables_are_files'](self,*args) @@ -17994,11 +17994,11 @@ cdef class GiacMethods_base: Help for variance: variance(Lst||Mtrx,[Lst]) Returns the variance of a list with the second argument as weights or the list of variances of the columns of a matrix. - See also: 1/ stddev 2/ mean + See also: 1/ stddev 2/ mean Ex1:variance([3,4,2]) Ex2:variance([1,2,3],[1,2,1]) Ex3:variance([[1,2,3],[5,6,7]]) - + ''' return GiacMethods['variance'](self,*args) @@ -18007,9 +18007,9 @@ cdef class GiacMethods_base: Help for version: version(NULL) Returns the giac version number; for example, you are using : giac 0.4.0 - See also: 1/ + See also: 1/ Ex1:version() - + ''' return GiacMethods['version'](self,*args) @@ -18018,11 +18018,11 @@ cdef class GiacMethods_base: Help for vertex_connectivity: vertex_connectivity(Graph(G)) Returns the largest integer k such that undirected connected graph G remains connected when fewer than k vertices are removed. - See also: 1/ edge_connectivity 2/ is_connected + See also: 1/ edge_connectivity 2/ is_connected Ex1:vertex_connectivity(graph("petersen")) Ex2:vertex_connectivity(graph("clebsch")) Ex3:vertex_connectivity(complete_graph(5)) - + ''' return GiacMethods['vertex_connectivity'](self,*args) @@ -18031,9 +18031,9 @@ cdef class GiacMethods_base: Help for vertex_degree: vertex_degree(Graph(G),Vrtx(v)) Returns the degree of the vertex v in G (i.e. the number of edges incident to v). - See also: 1/ degree_sequence 2/ is_regular 3/ maximum_degree 4/ minimum_degree 5/ vertex_in_degree 6/ vertex_out_degree + See also: 1/ degree_sequence 2/ is_regular 3/ maximum_degree 4/ minimum_degree 5/ vertex_in_degree 6/ vertex_out_degree Ex1:vertex_degree(digraph(trail(1,2,3,4,2)),2) - + ''' return GiacMethods['vertex_degree'](self,*args) @@ -18042,10 +18042,10 @@ cdef class GiacMethods_base: Help for vertex_distance: vertex_distance(Graph(G),Vrtx(s),Vrtx(t)||Lst(T)) Returns the number of edges in the shortest path from vertex s to vertex t in G. If such path does not exist, returns +infinity. For vector T of vertices from G returns the list of distances from s to each vertex t in T. - See also: 1/ allpairs_distance 2/ graph_diameter 3/ dijkstra 4/ shortest_path + See also: 1/ allpairs_distance 2/ graph_diameter 3/ dijkstra 4/ shortest_path Ex1:vertex_distance(graph("petersen"),1,4) Ex2:vertex_distance(graph("petersen"),1,[2,4]) - + ''' return GiacMethods['vertex_distance'](self,*args) @@ -18054,9 +18054,9 @@ cdef class GiacMethods_base: Help for vertex_in_degree: vertex_in_degree(Graph(G),Vrtx(v)) Returns the number of arcs in G entering the vertex v. - See also: 1/ degree_sequence 2/ is_regular 3/ maximum_degree 4/ minimum_degree 5/ vertex_degree 6/ vertex_out_degree + See also: 1/ degree_sequence 2/ is_regular 3/ maximum_degree 4/ minimum_degree 5/ vertex_degree 6/ vertex_out_degree Ex1:vertex_in_degree(digraph(trail(1,2,3,4,2)),2) - + ''' return GiacMethods['vertex_in_degree'](self,*args) @@ -18065,9 +18065,9 @@ cdef class GiacMethods_base: Help for vertex_out_degree: vertex_out_degree(Graph(G),Vrtx(v)) Returns the number of arcs in G emanating from the vertex v. - See also: 1/ degree_sequence 2/ is_regular 3/ maximum_degree 4/ minimum_degree 5/ vertex_degree 6/ vertex_in_degree + See also: 1/ degree_sequence 2/ is_regular 3/ maximum_degree 4/ minimum_degree 5/ vertex_degree 6/ vertex_in_degree Ex1:vertex_out_degree(digraph(trail(1,2,3,4,2)),2) - + ''' return GiacMethods['vertex_out_degree'](self,*args) @@ -18076,11 +18076,11 @@ cdef class GiacMethods_base: Help for vertices: vertices(Polygon or Polyedr(P)) Returns the list of the vertices of the polygon or polyhedron P. - See also: 1/ isosceles_triangle 2/ polyhedron + See also: 1/ isosceles_triangle 2/ polyhedron Ex1:vertices(isosceles_triangle(0,1,pi/4)) Ex2:vertices(polyhedron([0,0,0],[0,5,0],[0,0,5],[1,2,6])) Ex3:vertices(isosceles_triangle(0,1,pi/4))[2] - + ''' return GiacMethods['vertices'](self,*args) @@ -18089,11 +18089,11 @@ cdef class GiacMethods_base: Help for vertices_abc: vertices_abc(Polygon or Polyedr(P)) Returns the list of the vertices of the polygon or polyhedron P. - See also: 1/ isosceles_triangle 2/ polyhedron + See also: 1/ isosceles_triangle 2/ polyhedron Ex1:vertices_abc(isosceles_triangle(0,1,pi/4)) Ex2:vertices_abc(polyhedron([0,0,0],[0,5,0],[0,0,5],[1,2,6])) Ex3:vertices_abc(isosceles_triangle(0,1,pi/4))[2] - + ''' return GiacMethods['vertices_abc'](self,*args) @@ -18102,11 +18102,11 @@ cdef class GiacMethods_base: Help for vertices_abca: vertices_abca(Polygon or Polyedr(P)) Returns the closed list [A,B,...A] of the vertices of the polygon or polyhedron P. - See also: 1/ isosceles_triangle 2/ polyhedron + See also: 1/ isosceles_triangle 2/ polyhedron Ex1:vertices_abca(isosceles_triangle(0,1,pi/4)) Ex2:vertices_abca(polyhedron([0,0,0],[0,5,0],[0,0,5],[1,2,6])) Ex3:vertices_abca(isosceles_triangle(0,1,pi/4))[2] - + ''' return GiacMethods['vertices_abca'](self,*args) @@ -18115,9 +18115,9 @@ cdef class GiacMethods_base: Help for vpotential: vpotential(Vect(V),LstVar) Returns U such that curl(U)=V. - See also: 1/ curl 2/ potential + See also: 1/ curl 2/ potential Ex1:vpotential([2*x*y+3,x^2-4*z,-2*y*z],[x,y,z]) - + ''' return GiacMethods['vpotential'](self,*args) @@ -18126,9 +18126,9 @@ cdef class GiacMethods_base: Help for web_graph: web_graph(Intg(a),Intg(b)) Returns a web graph on a*b vertices, where a>=3 and b>=2. - See also: 1/ prism_graph 2/ wheel_graph + See also: 1/ prism_graph 2/ wheel_graph Ex1:web_graph(5,3) - + ''' return GiacMethods['web_graph'](self,*args) @@ -18137,11 +18137,11 @@ cdef class GiacMethods_base: Help for weibull: weibull(Real(k),Real(lambda),Real(theta),Real(x)) Returns the density of probability at x of the Weibull law with parameters k, lambda, theta (by default theta=0). - See also: 1/ weibull_cdf 2/ weibull_icdf + See also: 1/ weibull_cdf 2/ weibull_icdf Ex1:weibull(2.1,1.2,1.3) Ex2:weibull(2.1,1.2,0.0,1.3) Ex3:weibull(2.1,1.2,0.5,1.8) - + ''' return GiacMethods['weibull'](self,*args) @@ -18150,13 +18150,13 @@ cdef class GiacMethods_base: Help for weibull_cdf: weibull_cdf(Real(k),Real(lambda),Real(theta),Real(x0)) Returns the probability that a Weibull random variable of parameters k, lambda, theta is less than x0. - See also: 1/ weibulld 2/ weibull_icdf + See also: 1/ weibulld 2/ weibull_icdf Ex1:weibull_cdf(2.1,1.2,1.9) Ex2:weibull_cdf(2.1,1.2,0.0,1.9) Ex3:weibull_cdf(2.2,1.5,0.4,1.9) Ex4:weibull_cdf(2.2,1.5,0.4,1.2) Ex5:weibull_cdf(2.2,1.5,0.4,1.2,1.9) - + ''' return GiacMethods['weibull_cdf'](self,*args) @@ -18165,10 +18165,10 @@ cdef class GiacMethods_base: Help for weibull_icdf: weibull_icdf(Real(k),Real(lambda),Real(theta),Real(p)) Returns h such that the probability that a Weibull random variable of parameters k, lambda, theta is less than h is p (0<=p<=1). - See also: 1/ weibull_cdf 2/ weibull + See also: 1/ weibull_cdf 2/ weibull Ex1:weibull_icdf(4.2,1.3,0.0,0.95) Ex2:weibull_icdf(2.2,1.5,0.4,0.632) - + ''' return GiacMethods['weibull_icdf'](self,*args) @@ -18177,11 +18177,11 @@ cdef class GiacMethods_base: Help for weibulld: weibulld(Real(k),Real(lambda),Real(theta),Real(x)) Returns the density of probability at x of the Weibull law with parameters k, lambda, theta (by default theta=0). - See also: 1/ weibull_cdf 2/ weibull_icdf + See also: 1/ weibull_cdf 2/ weibull_icdf Ex1:weibulld(2.1,1.2,1.3) Ex2:weibulld(2.1,1.2,0.0,1.3) Ex3:weibulld(2.1,1.2,0.5,1.8) - + ''' return GiacMethods['weibulld'](self,*args) @@ -18190,13 +18190,13 @@ cdef class GiacMethods_base: Help for weibulld_cdf: weibulld_cdf(Real(k),Real(lambda),Real(theta),Real(x0)) Returns the probability that a Weibull random variable of parameters k, lambda, theta is less than x0. - See also: 1/ weibulld 2/ weibull_icdf + See also: 1/ weibulld 2/ weibull_icdf Ex1:weibulld_cdf(2.1,1.2,1.9) Ex2:weibulld_cdf(2.1,1.2,0.0,1.9) Ex3:weibulld_cdf(2.2,1.5,0.4,1.9) Ex4:weibulld_cdf(2.2,1.5,0.4,1.2) Ex5:weibulld_cdf(2.2,1.5,0.4,1.2,1.9) - + ''' return GiacMethods['weibulld_cdf'](self,*args) @@ -18205,10 +18205,10 @@ cdef class GiacMethods_base: Help for weibulld_icdf: weibulld_icdf(Real(k),Real(lambda),Real(theta),Real(p)) Returns h such that the probability that a Weibull random variable of parameters k, lambda, theta is less than h is p (0<=p<=1). - See also: 1/ weibull_cdf 2/ weibull + See also: 1/ weibull_cdf 2/ weibull Ex1:weibulld_icdf(4.2,1.3,0.0,0.95) Ex2:weibulld_icdf(2.2,1.5,0.4,0.632) - + ''' return GiacMethods['weibulld_icdf'](self,*args) @@ -18217,10 +18217,10 @@ cdef class GiacMethods_base: Help for weibullvariate: weibullvariate(Real(a),Real(b)) Returns a random real according to the Weibull distribution with parameters a>0 and b>0. - See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector + See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector Ex1:weibullvariate(1,2) Ex2:weibullvariate(1.5,4) - + ''' return GiacMethods['weibullvariate'](self,*args) @@ -18229,9 +18229,9 @@ cdef class GiacMethods_base: Help for weight_matrix: weight_matrix(Graph(G)) Returns the weight matrix of G. - See also: 1/ set_edge_weight 2/ get_edge_weights 3/ is_weighted 4/ make_weighted 5/ assign_edge_weights + See also: 1/ set_edge_weight 2/ get_edge_weights 3/ is_weighted 4/ make_weighted 5/ assign_edge_weights Ex1:weight_matrix(graph(%{[[1,2],2],[[2,3],1]%}) - + ''' return GiacMethods['weight_matrix'](self,*args) @@ -18240,8 +18240,8 @@ cdef class GiacMethods_base: Help for weighted: weighted(Opt) Option for graph and digraph commands. - See also: 1/ directed 2/ graph 3/ digraph - + See also: 1/ directed 2/ graph 3/ digraph + ''' return GiacMethods['weighted'](self,*args) @@ -18250,8 +18250,8 @@ cdef class GiacMethods_base: Help for weights: weights(Opt) Option for the edges command. - See also: 1/ edges - + See also: 1/ edges + ''' return GiacMethods['weights'](self,*args) @@ -18260,9 +18260,9 @@ cdef class GiacMethods_base: Help for welch_window: welch_window(Lst,[Interval(n1..n2)]) Applies the Welch windowing function to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ bartlett_hann_window + See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ bartlett_hann_window Ex1: scatterplot(welch_window(randvector(1000,0..1))) - + ''' return GiacMethods['welch_window'](self,*args) @@ -18271,9 +18271,9 @@ cdef class GiacMethods_base: Help for wheel_graph: wheel_graph(Intg(n)) Returns a wheel graph with n+1 vertices. - See also: 1/ star_graph 2/ web_graph + See also: 1/ star_graph 2/ web_graph Ex1:wheel_graph(5) - + ''' return GiacMethods['wheel_graph'](self,*args) @@ -18282,11 +18282,11 @@ cdef class GiacMethods_base: Help for widget_size: widget_size(Intg(n)) Changes the character sizes of the display on the xcas screen (size=n) and with more parameters define the general configuration. - See also: 1/ cas_setup + See also: 1/ cas_setup Ex1:widget_size(20) Ex2:widget_size(8) Ex3:widget_size(20,58,49,697,563,1,1,0) - + ''' return GiacMethods['widget_size'](self,*args) @@ -18295,10 +18295,10 @@ cdef class GiacMethods_base: Help for wilcoxonp: wilcoxonp(Intg,[Intg]) Distribution of the Wilcoxon or Mann-Whitney test for one or two samples. - See also: 1/ wilcoxont 2/ wilcoxons + See also: 1/ wilcoxont 2/ wilcoxons Ex1:wilcoxonp(4) Ex2:wilcoxonp(7,5) - + ''' return GiacMethods['wilcoxonp'](self,*args) @@ -18307,10 +18307,10 @@ cdef class GiacMethods_base: Help for wilcoxons: wilcoxons(List,List || Real) Rank statistic of Wilcoxon or Mann-Whitney for 1 sample and one median or 2 samples. - See also: 1/ wilcoxont 2/ wilcoxonp + See also: 1/ wilcoxont 2/ wilcoxonp Ex1:wilcoxons([1, 3, 4, 5, 7, 8, 8, 12, 15, 17] , [2, 6, 10, 11, 13, 14, 15, 18, 19, 20]) Ex2:wilcoxons([1, 3, 4, 5, 7, 8, 8, 12, 15, 17] , 10) - + ''' return GiacMethods['wilcoxons'](self,*args) @@ -18319,12 +18319,12 @@ cdef class GiacMethods_base: Help for wilcoxont: wilcoxont(List,List || Real,[Func],[Real]) Wilcoxon or Mann-Whitney test for one sample and a median or 2 samples. - See also: 1/ wilcoxonp 2/ wilcoxons 3/ studentt 4/ normalt + See also: 1/ wilcoxonp 2/ wilcoxons 3/ studentt 4/ normalt Ex1:wilcoxont([1, 3, 4, 5, 7, 8, 8, 12, 15, 17] , [2, 6, 10, 11, 13, 14, 15, 18, 19, 20]) Ex2:wilcoxont([1, 3, 4, 5, 7, 8, 8, 12, 15, 17] , [2, 6, 10, 11, 13, 14, 15, 18, 19, 20],0.01) Ex3:wilcoxont([1, 3, 4, 5, 7, 8, 8, 12, 15, 17] , 10,'>') Ex4:wilcoxont([1, 3, 4, 5, 7, 8, 8, 12, 15, 17] , 10,'>',0.05) - + ''' return GiacMethods['wilcoxont'](self,*args) @@ -18333,11 +18333,11 @@ cdef class GiacMethods_base: Help for writergb: writergb(Str(s),Lst) Write a PNG picture file named s either from a list [[number_channels,width,height],red,green,alpha,blue] where red,green,alpha,blue are matrices of pixels color or from a matrix of grey pixels or from 3 matrices of RGB colored pixels. - See also: 1/ readrgb + See also: 1/ readrgb Ex1:writergb("image.png",[[255,0],[0,255]]) Ex2:writergb("image.png",[[255,0],[0,0]],[[0,255],[0,0]],[[0,0],[255,0]]) Ex3: a:=readrgb("rgb_image.png");writergb("brg_image.png",[a[0],a[4],a[1],a[3],a[2]]) - + ''' return GiacMethods['writergb'](self,*args) @@ -18346,10 +18346,10 @@ cdef class GiacMethods_base: Help for writewav: writewav(Str(s),Lst(l)) Writes a WAV sound file. - See also: 1/ readwav + See also: 1/ readwav Ex1:writewav("la.wav",2^14*(sin(2*pi*440*soundsec(1)))) Ex2:writewav("beep.wav",[[1,16,44100,80000],[65000$10000,0$10000,65000$10000,0$10000]]) - + ''' return GiacMethods['writewav'](self,*args) @@ -18358,10 +18358,10 @@ cdef class GiacMethods_base: Help for xcas_mode: xcas_mode(Intg(0) or 1 or 2 or 3) Switches to mode Xcas (0), Maple (1), Mupad (2), TI89 (3). - See also: 1/ python_compat + See also: 1/ python_compat Ex1:xcas_mode(1) Ex2:xcas_mode(0) - + ''' return GiacMethods['xcas_mode'](self,*args) @@ -18370,9 +18370,9 @@ cdef class GiacMethods_base: Help for xml_print: xml_print(Str) Indents a XML code given in a string (pretty print). - See also: 1/ export_mathml + See also: 1/ export_mathml Ex1:xml_print(export_mathml(a+2*b)) - + ''' return GiacMethods['xml_print'](self,*args) @@ -18382,7 +18382,7 @@ cdef class GiacMethods_base: xyztrange(SeqReal) xyztrange puts or erases the axes on the graphic-screen (cf button Cfg). Ex1:xyztrange(-5.0,5.0,-5.0,2.0,-10.0,10.0,-1.0,6.0,-5.0,5.0,-1.2384,2.0,1,0.0,1.0) - + ''' return GiacMethods['xyztrange'](self,*args) @@ -18391,12 +18391,12 @@ cdef class GiacMethods_base: Help for zeros: zeros(Expr,[Var]) Returns the zeros (real or complex according to the mode) of the expression (or the matrix where the lines are the solutions of the system : expression1=0,expression2=0...). - See also: 1/ + See also: 1/ Ex1:zeros(x^2+4) Ex2:zeros(ln(x)^2-4) Ex3:zeros(ln(y)^2-2,y) Ex4:zeros([x^2-1,x^2-y^2],[x,y]) - + ''' return GiacMethods['zeros'](self,*args) @@ -18405,10 +18405,10 @@ cdef class GiacMethods_base: Help for ztrans: ztrans(Expr,[Var],[ZtransVar]) z transform of a sequence. - See also: 1/ invztrans 2/ laplace 3/ invlaplace + See also: 1/ invztrans 2/ laplace 3/ invlaplace Ex1:ztrans(a^x) Ex2:ztrans(a^n,n,z) - + ''' return GiacMethods['ztrans'](self,*args) @@ -18417,10 +18417,10 @@ cdef class GiacMethods_base: Help for type: type(Expr) Returns n in [1..12] that defines the type of the argument. - See also: 1/ DOM_FLOAT 2/ DOM_INT 3/ DOM_COMPLEX 4/ DOM_IDENT 5/ DOM_LIST 6/ DOM_SYMBOLIC 7/ DOM_RAT 8/ DOM_STRING 9/ DOM_FUNC 10/ subtype + See also: 1/ DOM_FLOAT 2/ DOM_INT 3/ DOM_COMPLEX 4/ DOM_IDENT 5/ DOM_LIST 6/ DOM_SYMBOLIC 7/ DOM_RAT 8/ DOM_STRING 9/ DOM_FUNC 10/ subtype Ex1:type("abc") Ex2:type([1,2,3]) - + ''' return GiacMethods['type'](self,*args) @@ -18429,12 +18429,12 @@ cdef class GiacMethods_base: Help for zip: zip(Fnc2d(f),Lst(l1),Lst(l2),[Val(default)]) Returns a list whose j-th entry is f(l1[j],l2[j]): without default value its length is the minimum of the lengths of the two input lists and otherwise the shorter list is padded with the default value. - See also: 1/ + See also: 1/ Ex1:zip('+',[a,b,c,d], [1,2,3,4]) Ex2:zip('+',[a,b,c,d], [1,2,3]) Ex3:zip('+',[a,b,c,d], [1,2,3],5) Ex4:zip(sum,[a,b,c,d], [1,2,3,4]) - + ''' return GiacMethods['zip'](self,*args) diff --git a/src/sage/libs/giac/giac.pyx b/src/sage/libs/giac/giac.pyx index 4e451dba5e7..76053fbe760 100644 --- a/src/sage/libs/giac/giac.pyx +++ b/src/sage/libs/giac/giac.pyx @@ -154,7 +154,9 @@ from sage.ext.stdsage cimport PY_NEW from sage.libs.gmp.mpz cimport mpz_t, mpz_init_set -from sage.rings.all import ZZ, QQ, IntegerModRing +from sage.rings.integer_ring import Z as ZZ +from sage.rings.rational_field import Q as QQ +from sage.rings.finite_rings.integer_mod_ring import IntegerModRing from sage.rings.integer cimport Integer from sage.rings.rational cimport Rational from sage.structure.element cimport Matrix diff --git a/src/sage/libs/lcalc/lcalc_Lfunction.pyx b/src/sage/libs/lcalc/lcalc_Lfunction.pyx index efb738714cc..a59a2207867 100644 --- a/src/sage/libs/lcalc/lcalc_Lfunction.pyx +++ b/src/sage/libs/lcalc/lcalc_Lfunction.pyx @@ -272,7 +272,7 @@ cdef class Lfunction: def find_zeros(self, T1, T2, stepsize): """ - Finds zeros on critical line between ``T1`` and ``T2`` using step size + Finds zeros on critical line between ``T1`` and ``T2`` using step size of stepsize. This function might miss zeros if step size is too large. This function computes the zeros of the L-function by using change in signs of areal valued function whose zeros coincide with diff --git a/src/sage/libs/linkages/padics/API.pxi b/src/sage/libs/linkages/padics/API.pxi index 41db95ef8ae..529fc49a95b 100644 --- a/src/sage/libs/linkages/padics/API.pxi +++ b/src/sage/libs/linkages/padics/API.pxi @@ -201,8 +201,8 @@ cdef inline long cremove(celement out, celement a, long prec, PowComputer_class - ``a`` -- the element whose valuation and unit are desired. - ``prec`` -- a long, used if `a = 0`. - ``prime_pow`` -- the PowComputer for the ring. - - ``reduce_relative`` -- a bint: whether the final result - should be reduced at precision ``prec`` (case ``False``) + - ``reduce_relative`` -- a bint: whether the final result + should be reduced at precision ``prec`` (case ``False``) or ``prec - valuation`` (case ``True``) OUTPUT: diff --git a/src/sage/libs/linkages/padics/Polynomial_shared.pxi b/src/sage/libs/linkages/padics/Polynomial_shared.pxi index 738ab9bf457..495dc6b0848 100644 --- a/src/sage/libs/linkages/padics/Polynomial_shared.pxi +++ b/src/sage/libs/linkages/padics/Polynomial_shared.pxi @@ -128,14 +128,14 @@ cdef inline long cremove(celement out, celement a, long prec, PowComputer_ prime INPUT: - ``out`` -- a ``celement`` to store the unit part - + - ``a`` -- the ``celement`` whose valuation and unit are desired - + - ``prec`` -- a ``long``, the return value if ``a`` is zero - + - ``prime_pow`` -- the ``PowComputer`` for the ring - - ``reduce_relative`` -- a bint: whether the final result + - ``reduce_relative`` -- a bint: whether the final result should be reduced at precision ``prec`` (case ``False``) or ``prec - valuation`` (case ``True``) diff --git a/src/sage/libs/linkages/padics/fmpz_poly_unram.pxi b/src/sage/libs/linkages/padics/fmpz_poly_unram.pxi index 60fb9439388..8b1b80cf0a9 100644 --- a/src/sage/libs/linkages/padics/fmpz_poly_unram.pxi +++ b/src/sage/libs/linkages/padics/fmpz_poly_unram.pxi @@ -194,7 +194,7 @@ cdef inline long cremove(celement out, celement a, long prec, PowComputer_ prime - ``a`` -- the element whose valuation and unit are desired. - ``prec`` -- a long, used if `a = 0`. - ``prime_pow`` -- the PowComputer for the ring. - - ``reduce_relative`` -- a bint: whether the final result + - ``reduce_relative`` -- a bint: whether the final result should be reduced at precision ``prec`` (case ``False``) or ``prec - valuation`` (case ``True``) diff --git a/src/sage/libs/linkages/padics/mpz.pxi b/src/sage/libs/linkages/padics/mpz.pxi index a7200b0c4fa..2844a3934f5 100644 --- a/src/sage/libs/linkages/padics/mpz.pxi +++ b/src/sage/libs/linkages/padics/mpz.pxi @@ -367,7 +367,7 @@ cdef inline int csetone(mpz_t out, PowComputer_ prime_pow) except -1: - ``prime_pow`` -- the PowComputer for the ring. """ mpz_set_ui(out, 1) - + cdef inline int csetzero(mpz_t out, PowComputer_ prime_pow) except -1: """ Sets to 0. @@ -378,7 +378,7 @@ cdef inline int csetzero(mpz_t out, PowComputer_ prime_pow) except -1: - ``prime_pow`` -- the PowComputer for the ring. """ mpz_set_ui(out, 0) - + cdef inline bint cisone(mpz_t out, PowComputer_ prime_pow) except -1: """ Returns whether this element is equal to 1. diff --git a/src/sage/libs/linkages/padics/relaxed/API.pxi b/src/sage/libs/linkages/padics/relaxed/API.pxi index 29a051b808c..4e9ea075bb2 100644 --- a/src/sage/libs/linkages/padics/relaxed/API.pxi +++ b/src/sage/libs/linkages/padics/relaxed/API.pxi @@ -362,7 +362,7 @@ cdef inline void element_get_slice(celement res, celement x, long start, long le .. NOTE:: This function only sets up a pointer to the requested slice - (the slice is not copied). Hence any future modification + (the slice is not copied). Hence any future modification of the slice ``res`` will affect the container ``x``. """ pass diff --git a/src/sage/libs/pari/convert_sage.pyx b/src/sage/libs/pari/convert_sage.pyx index 62fe5185cfb..83b949d004f 100644 --- a/src/sage/libs/pari/convert_sage.pyx +++ b/src/sage/libs/pari/convert_sage.pyx @@ -30,7 +30,9 @@ from sage.ext.stdsage cimport PY_NEW from sage.libs.gmp.mpz cimport mpz_fits_slong_p, mpz_sgn, mpz_get_ui, mpz_set, mpz_set_si, mpz_set_ui from sage.libs.gmp.mpq cimport mpq_denref, mpq_numref from sage.rings.integer cimport smallInteger -from sage.rings.all import RealField, ComplexField, QuadraticField +from sage.rings.real_mpfr import RealField +from sage.rings.complex_mpfr import ComplexField +from sage.rings.number_field.number_field import QuadraticField from sage.matrix.args cimport (MatrixArgs, MA_ENTRIES_SEQ_SEQ, MA_ENTRIES_SEQ_FLAT, MA_ENTRIES_CALLABLE, MA_ENTRIES_UNKNOWN, MA_ENTRIES_SCALAR) diff --git a/src/sage/numerical/backends/cvxopt_backend.pyx b/src/sage/numerical/backends/cvxopt_backend.pyx index 10358c3a8f9..22bdfd20ea6 100644 --- a/src/sage/numerical/backends/cvxopt_backend.pyx +++ b/src/sage/numerical/backends/cvxopt_backend.pyx @@ -137,7 +137,7 @@ cdef class CVXOPTBackend(GenericBackend): This amounts to adding a new column to the matrix. By default, the variable is both positive and real. Variable types are always continuous, and thus the parameters - ``binary``, ``integer``, and ``continuous`` have no effect. + ``binary``, ``integer``, and ``continuous`` have no effect. INPUT: diff --git a/src/sage/numerical/backends/cvxopt_sdp_backend.pyx b/src/sage/numerical/backends/cvxopt_sdp_backend.pyx index c654f7f21a2..bb999559ee2 100644 --- a/src/sage/numerical/backends/cvxopt_sdp_backend.pyx +++ b/src/sage/numerical/backends/cvxopt_sdp_backend.pyx @@ -20,7 +20,7 @@ AUTHORS: #***************************************************************************** from sage.numerical.sdp import SDPSolverException -from sage.matrix.all import Matrix +from sage.matrix.constructor import Matrix from .matrix_sdp_backend cimport MatrixSDPBackend diff --git a/src/sage/numerical/backends/generic_backend.pyx b/src/sage/numerical/backends/generic_backend.pyx index 64d47f7bc2b..1057fb3b519 100644 --- a/src/sage/numerical/backends/generic_backend.pyx +++ b/src/sage/numerical/backends/generic_backend.pyx @@ -1555,7 +1555,7 @@ def default_mip_solver(solver=None): - a string indicating one of the available solvers (see :class:`MixedIntegerLinearProgram`); - - a callable (typically a subclass of + - a callable (typically a subclass of :class:`sage.numerical.backends.generic_backend.GenericBackend`); - ``None`` (default), in which case the current default solver @@ -1759,7 +1759,8 @@ cpdef GenericBackend get_solver(constraint_generation = False, solver = None, ba if base_ring is not None: base_ring = base_ring.fraction_field() - from sage.rings.all import QQ, RDF + from sage.rings.rational_field import Q as QQ + from sage.rings.real_double import RDF if base_ring is QQ: solver = "Ppl" elif solver in ["Interactivelp", "Ppl"] and not base_ring.is_exact(): diff --git a/src/sage/numerical/backends/matrix_sdp_backend.pyx b/src/sage/numerical/backends/matrix_sdp_backend.pyx index 52f5ae602e0..7668c64ecc1 100644 --- a/src/sage/numerical/backends/matrix_sdp_backend.pyx +++ b/src/sage/numerical/backends/matrix_sdp_backend.pyx @@ -20,7 +20,7 @@ other classes implementing solvers. # http://www.gnu.org/licenses/ #***************************************************************************** -from sage.matrix.all import Matrix +from sage.matrix.constructor import Matrix from .generic_sdp_backend cimport GenericSDPBackend cdef class MatrixSDPBackend(GenericSDPBackend): diff --git a/src/sage/numerical/gauss_legendre.pyx b/src/sage/numerical/gauss_legendre.pyx index 0b8dd4361e3..034131d9c22 100644 --- a/src/sage/numerical/gauss_legendre.pyx +++ b/src/sage/numerical/gauss_legendre.pyx @@ -63,7 +63,7 @@ def nodes_uncached(degree, prec): - ``degree`` -- integer. The number of nodes. Must be 3 or even. - - ``prec`` -- integer (minimal value 53). Binary precision with which the + - ``prec`` -- integer (minimal value 53). Binary precision with which the nodes and weights are computed. OUTPUT: @@ -166,13 +166,13 @@ def nodes(degree, prec): Compute the integration nodes and weights for the Gauss-Legendre quadrature scheme, caching the output - Works by calling ``nodes_uncached``. + Works by calling ``nodes_uncached``. INPUT: - ``degree`` -- integer. The number of nodes. Must be 3 or even. - - ``prec`` -- integer (minimal value 53). Binary precision with which the + - ``prec`` -- integer (minimal value 53). Binary precision with which the nodes and weights are computed. OUTPUT: @@ -271,10 +271,10 @@ def integrate_vector_N(f, prec, N=3): Integrate a one-argument vector-valued function numerically using Gauss-Legendre, setting the number of nodes. - This function uses the Gauss-Legendre quadrature scheme to approximate the + This function uses the Gauss-Legendre quadrature scheme to approximate the integral `\int_0^1 f(t) \, dt`. It is different from ``integrate_vector`` by using a specific number of nodes rather than targeting a specified error - bound on the result. + bound on the result. INPUT: @@ -284,9 +284,9 @@ def integrate_vector_N(f, prec, N=3): - ``N`` -- integer (default: 3). Number of nodes to use. - OUTPUT: + OUTPUT: - Vector approximating value of the integral. + Vector approximating value of the integral. EXAMPLES:: @@ -300,14 +300,14 @@ def integrate_vector_N(f, prec, N=3): .. NOTE:: - The nodes and weights are calculated in the real field with ``prec`` + The nodes and weights are calculated in the real field with ``prec`` bits of precision. If the vector space in which ``f`` takes values is over a field which is incompatible with this field (e.g. a finite - field) then a TypeError occurs. + field) then a TypeError occurs. """ - # We use nodes_uncached, because caching takes up memory, and numerics in - # Bruin-DisneyHogg-Gao suggest that caching provides little benefit in the - # use in the Riemann surfaces module. + # We use nodes_uncached, because caching takes up memory, and numerics in + # Bruin-DisneyHogg-Gao suggest that caching provides little benefit in the + # use in the Riemann surfaces module. nodelist = nodes_uncached(N, prec) I = nodelist[0][1]*f(nodelist[0][0]) for i in range(1,len(nodelist)): diff --git a/src/sage/numerical/interactive_simplex_method.py b/src/sage/numerical/interactive_simplex_method.py index 0210d9aea87..209fd1fc724 100644 --- a/src/sage/numerical/interactive_simplex_method.py +++ b/src/sage/numerical/interactive_simplex_method.py @@ -183,10 +183,10 @@ from sage.misc.abstract_method import abstract_method from sage.geometry.all import Polyhedron -from sage.matrix.all import (column_matrix, - identity_matrix, - matrix, - random_matrix) +from sage.matrix.special import column_matrix +from sage.matrix.special import identity_matrix +from sage.matrix.constructor import Matrix as matrix +from sage.matrix.special import random_matrix from sage.misc.latex import LatexExpr, latex from sage.misc.cachefunc import cached_function, cached_method from sage.misc.prandom import randint, random @@ -195,7 +195,11 @@ from sage.modules.all import random_vector, vector from sage.misc.lazy_import import lazy_import lazy_import("sage.plot.all", ["Graphics", "arrow", "line", "point", "rainbow", "text"]) -from sage.rings.all import Infinity, PolynomialRing, QQ, RDF, ZZ +from sage.rings.infinity import Infinity +from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing +from sage.rings.rational_field import Q as QQ +from sage.rings.real_double import RDF +from sage.rings.integer_ring import Z as ZZ from sage.structure.all import SageObject from sage.symbolic.ring import SR diff --git a/src/sage/numerical/linear_tensor_element.pyx b/src/sage/numerical/linear_tensor_element.pyx index f04949d6c02..c77aa290e21 100644 --- a/src/sage/numerical/linear_tensor_element.pyx +++ b/src/sage/numerical/linear_tensor_element.pyx @@ -54,10 +54,10 @@ cdef class LinearTensor(ModuleElement): Constructor taking a dictionary as its argument. INPUT: - + - ``parent`` -- the parent :class:`~sage.numerical.linear_tensor.LinearTensorParent_class`. - + - ``f`` -- A linear function tensored by a free module is represented as a dictionary. The values are the coefficient (free module elements) of the variable represented by the @@ -70,7 +70,7 @@ cdef class LinearTensor(ModuleElement): sage: LT = MixedIntegerLinearProgram().linear_functions_parent().tensor(RDF^2) sage: LT({0: [1,2], 3: [-7,-8]}) (1.0, 2.0)*x_0 + (-7.0, -8.0)*x_3 - + sage: TestSuite(LT).run(skip=['_test_an_element', '_test_elements_eq_reflexive', ....: '_test_elements_eq_symmetric', '_test_elements_eq_transitive', ....: '_test_elements_neq', '_test_additive_associativity', @@ -191,7 +191,7 @@ cdef class LinearTensor(ModuleElement): OUTPUT: String. - + EXAMPLES:: sage: from sage.numerical.linear_functions import LinearFunctionsParent @@ -221,7 +221,7 @@ cdef class LinearTensor(ModuleElement): term = '{1}*x_{0}'.format(key, coeff) terms.append(term) return ' + '.join(terms) - + def _repr_matrix(self): """ Return a matrix-like string representation. @@ -266,7 +266,7 @@ cdef class LinearTensor(ModuleElement): Return sum. INPUT: - + - ``b`` -- a :class:`LinearTensor`. OUTPUT: @@ -310,7 +310,7 @@ cdef class LinearTensor(ModuleElement): Return difference. INPUT: - + - ``b`` -- a :class:`LinearTensor`. OUTPUT: @@ -402,7 +402,7 @@ cdef class LinearTensor(ModuleElement): Arithmetic performed after coercions. Result lives in Tensor product of Vector space of dimension 2 over Real Double Field and Linear functions over Real Double Field Tensor product of Vector space of dimension 2 over Real Double Field and Linear functions over Real Double Field - + sage: operator.le(10, lt) (10.0, 10.0) <= (1.0, 2.0)*x_0 sage: lt <= 1 diff --git a/src/sage/numerical/sdp.pyx b/src/sage/numerical/sdp.pyx index 207298d7ece..6350afb4eb6 100644 --- a/src/sage/numerical/sdp.pyx +++ b/src/sage/numerical/sdp.pyx @@ -231,7 +231,7 @@ from sage.structure.parent cimport Parent from sage.structure.element cimport Element from sage.misc.cachefunc import cached_method from sage.numerical.linear_functions import is_LinearFunction, is_LinearConstraint -from sage.matrix.all import Matrix +from sage.matrix.constructor import Matrix from sage.structure.element import is_Matrix From 572896dfe19ab88967deefbebcc9be55d669a8d2 Mon Sep 17 00:00:00 2001 From: Alex Chandler Date: Sun, 29 Jan 2023 16:04:15 -0800 Subject: [PATCH 314/751] src/sage/{numerical,tests}: Manual fixes to imports --- src/sage/numerical/linear_functions.pyx | 2 +- .../premierspas_doctest.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/numerical/linear_functions.pyx b/src/sage/numerical/linear_functions.pyx index a5c0c0336d0..5549ff436f5 100644 --- a/src/sage/numerical/linear_functions.pyx +++ b/src/sage/numerical/linear_functions.pyx @@ -1064,7 +1064,7 @@ cdef class LinearFunction(LinearFunctionOrConstraint): sage: f._coeff_formatter(sqrt5) 'sqrt5*' - sage: from sage.rings.all import AA + sage: from sage.rings.qqbar import AA sage: sqrt5 = AA(5).sqrt() sage: p = MixedIntegerLinearProgram(solver='interactivelp', base_ring=AA) sage: LF = p.linear_functions_parent() diff --git a/src/sage/tests/books/computational-mathematics-with-sagemath/premierspas_doctest.py b/src/sage/tests/books/computational-mathematics-with-sagemath/premierspas_doctest.py index fae01daa748..42121f2f815 100644 --- a/src/sage/tests/books/computational-mathematics-with-sagemath/premierspas_doctest.py +++ b/src/sage/tests/books/computational-mathematics-with-sagemath/premierspas_doctest.py @@ -117,7 +117,7 @@ Sage example in ./premierspas.tex, line 1217:: - sage: from sage.all import pi + sage: from sage.symbolic.constants import pi Sage example in ./premierspas.tex, line 1224:: From 965dfc61eddd9cbe290d8449543ec77afc867c73 Mon Sep 17 00:00:00 2001 From: Alex Chandler Date: Sun, 29 Jan 2023 17:09:33 -0800 Subject: [PATCH 315/751] sage -fiximports src/sage/stats --- src/sage/stats/distributions/discrete_gaussian_lattice.py | 5 ++++- src/sage/stats/distributions/discrete_gaussian_polynomial.py | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/sage/stats/distributions/discrete_gaussian_lattice.py b/src/sage/stats/distributions/discrete_gaussian_lattice.py index 695c8fc3615..5a05a0cb2c8 100644 --- a/src/sage/stats/distributions/discrete_gaussian_lattice.py +++ b/src/sage/stats/distributions/discrete_gaussian_lattice.py @@ -58,7 +58,10 @@ from sage.functions.log import exp from sage.functions.other import ceil -from sage.rings.all import RealField, RR, ZZ, QQ +from sage.rings.real_mpfr import RealField +from sage.rings.real_mpfr import RR +from sage.rings.integer_ring import Z as ZZ +from sage.rings.rational_field import Q as QQ from .discrete_gaussian_integer import DiscreteGaussianDistributionIntegerSampler from sage.structure.sage_object import SageObject from sage.matrix.constructor import matrix, identity_matrix diff --git a/src/sage/stats/distributions/discrete_gaussian_polynomial.py b/src/sage/stats/distributions/discrete_gaussian_polynomial.py index 698727f48d0..fb4c4453ca3 100644 --- a/src/sage/stats/distributions/discrete_gaussian_polynomial.py +++ b/src/sage/stats/distributions/discrete_gaussian_polynomial.py @@ -54,7 +54,8 @@ # policies, either expressed or implied, of the FreeBSD Project. #*****************************************************************************/ -from sage.rings.all import RR, ZZ +from sage.rings.real_mpfr import RR +from sage.rings.integer_ring import Z as ZZ from .discrete_gaussian_integer import DiscreteGaussianDistributionIntegerSampler from sage.structure.sage_object import SageObject From 21b94bab1a499941c94a2dc00300a2c7bac79bde Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 29 Jan 2023 17:12:46 -0800 Subject: [PATCH 316/751] src/sage/libs/giac/auto-methods.pxi: Back out whitespace changes in this autogenerated file --- src/sage/libs/giac/auto-methods.pxi | 5810 +++++++++++++-------------- 1 file changed, 2905 insertions(+), 2905 deletions(-) diff --git a/src/sage/libs/giac/auto-methods.pxi b/src/sage/libs/giac/auto-methods.pxi index 776900bcf4f..9af4c0023bf 100644 --- a/src/sage/libs/giac/auto-methods.pxi +++ b/src/sage/libs/giac/auto-methods.pxi @@ -14,10 +14,10 @@ cdef class GiacMethods_base: Help for Airy_Ai: Airy_Ai(Real) Returns the value of Ai the Airy function solution of w''-xw=0. Ai(x)=Ai(0)f(z)+Ai'(0)g(z)(f and g are taylor's series sol of w''-xw=0). - See also: 1/ Airy_Bi + See also: 1/ Airy_Bi Ex1:Airy_Ai(0) Ex2:Airy_Ai(1.5) - + ''' return GiacMethods['Airy_Ai'](self,*args) @@ -26,10 +26,10 @@ cdef class GiacMethods_base: Help for Airy_Bi: Airy_Bi(Real) Returns the value of Ai the Airy function solution of w''-xw=0. Bi(x)=sqrt(3)(Bi(0)f(z)-Bi'(0)g(z))(f and g are taylor's series sol of w''-xw=0). - See also: 1/ Airy_Ai + See also: 1/ Airy_Ai Ex1:Airy_Bi(1.5) Ex2:Airy_Bi(0) - + ''' return GiacMethods['Airy_Bi'](self,*args) @@ -38,9 +38,9 @@ cdef class GiacMethods_base: Help for Archive: Archive(SeqVar) Protects the variables given as argument in an archive file. - See also: 1/ Unarchiv 2/ archive 3/ unarchive + See also: 1/ Unarchiv 2/ archive 3/ unarchive Ex1:Archive(a,b) - + ''' return GiacMethods['Archive'](self,*args) @@ -49,10 +49,10 @@ cdef class GiacMethods_base: Help for BesselJ: BesselJ(Int(p),Real(x)) BesselJ(p,x) returns the Bessel function of the first kind Jp(x). - See also: 1/ besselJ 2/ BesselY 3/ besselY + See also: 1/ besselJ 2/ BesselY 3/ besselY Ex1:BesselJ(2,sqrt(2)) Ex2:BesselJ(-2,sqrt(2)) - + ''' return GiacMethods['BesselJ'](self,*args) @@ -61,10 +61,10 @@ cdef class GiacMethods_base: Help for BesselY: BesselY(Int(p),Real(x)) BesselY(p,x) returns the Bessel function of the second kind Yp(x). - See also: 1/ besselY 2/ BesselJ 3/ besselJ + See also: 1/ besselY 2/ BesselJ 3/ besselJ Ex1:BesselY(BesselJ(2,sqrt(2))) Ex2:BesselY(BesselJ(-2,sqrt(2))) - + ''' return GiacMethods['BesselY'](self,*args) @@ -73,12 +73,12 @@ cdef class GiacMethods_base: Help for Beta: Beta(Expr,Expr,[Expr],[1]) Beta(a,b)=int(t^(a-1)*(1-t)^(b-1),t=0..1), Beta(a,b,p)=int(t^(a-1)*(1-t)^(b-1),t=0..p), Beta(a,b,p,1)=Beta(a,b,p)/Beta(a,b).(Beta(x,y) returns Gamma(x)*Gamma(y)/Gamma(x+y)). - See also: 1/ Gamma 2/ igamma + See also: 1/ Gamma 2/ igamma Ex1:Beta(x,y) Ex2:Beta(3,2) Ex3:Beta(3,2,0.5) Ex4:Beta(3,2,0.5,1) - + ''' return GiacMethods['Beta'](self,*args) @@ -87,10 +87,10 @@ cdef class GiacMethods_base: Help for BlockDiagonal: BlockDiagonal(Lst(l)||Mtrx(A)) Returns either the diagonal matrix with diagonal l or the diagonal of A. - See also: 1/ identity 2/ diag + See also: 1/ identity 2/ diag Ex1:BlockDiagonal([[1,2],[3,4]]) Ex2:BlockDiagonal([1,2,3]) - + ''' return GiacMethods['BlockDiagonal'](self,*args) @@ -99,9 +99,9 @@ cdef class GiacMethods_base: Help for Ci: Ci(Expr) Cosine integral int(cos(t)/t,t=-inf..x). - See also: 1/ Ei 2/ Si 3/ Li + See also: 1/ Ei 2/ Si 3/ Li Ex1:Ci(1.0) - + ''' return GiacMethods['Ci'](self,*args) @@ -110,11 +110,11 @@ cdef class GiacMethods_base: Help for Circle: Circle(Real(xc),Real(yc),Real(r),[Intg(option)]) Draws the circle with center (xc,yc) and radius r (by default option=1 and option=0 is to remove this circle). - See also: 1/ circle + See also: 1/ circle Ex1:Circle(0,1,1) Ex2:Circle(0,1,1,0) Ex3:Circle(0,1,1,1) - + ''' return GiacMethods['Circle'](self,*args) @@ -123,9 +123,9 @@ cdef class GiacMethods_base: Help for Col: Col(NULL) Returns the index of the column of the lightened cell in the matrixwriter. - See also: 1/ Row + See also: 1/ Row Ex1:Col() - + ''' return GiacMethods['Col'](self,*args) @@ -134,9 +134,9 @@ cdef class GiacMethods_base: Help for CopyVar: CopyVar(Var(var1),Var(var2)) Copies the storage without evaluation of var1 into var2. - See also: 1/ + See also: 1/ Ex1:CopyVar(A,B) - + ''' return GiacMethods['CopyVar'](self,*args) @@ -145,11 +145,11 @@ cdef class GiacMethods_base: Help for Dirac: Dirac(Real) Function derivative of Heaviside. - See also: 1/ Heaviside + See also: 1/ Heaviside Ex1:Dirac(1) Ex2:Dirac(-1) Ex3: int(Dirac(x)*(x-1)^2,x,-1,2) - + ''' return GiacMethods['Dirac'](self,*args) @@ -158,9 +158,9 @@ cdef class GiacMethods_base: Help for Ei: Ei(Expr) Exponential integral int(exp(t)/t,t=-inf..x). - See also: 1/ Si 2/ Ci 3/ Li + See also: 1/ Si 2/ Ci 3/ Li Ex1:Ei(1.0) - + ''' return GiacMethods['Ei'](self,*args) @@ -169,10 +169,10 @@ cdef class GiacMethods_base: Help for Factor: Factor(Expr) Factors a polynomial without evaluation. - See also: 1/ factor 2/ ifactor 3/ normal + See also: 1/ factor 2/ ifactor 3/ normal Ex1:Factor(x^4-1) Ex2:Factor(x^4+12*x^3+54*x^2+108*x+81) - + ''' return GiacMethods['Factor'](self,*args) @@ -187,7 +187,7 @@ cdef class GiacMethods_base: Ex4:GF(2,w^8+w^7+w^5+w+1) Ex5:GF(2,8,['a','G']) Ex6: G:=GF(2,a^8+a^6+a^3+a^2+1,['a','G'],undef) - + ''' return GiacMethods['GF'](self,*args) @@ -196,12 +196,12 @@ cdef class GiacMethods_base: Help for Gamma: Gamma(Real(a),[Real(b)]) Calculates Gamma at a point a (Gamma(n+1)=n! for n integer) if a>0, Gamma(a)=int(e^{-t}*t^{a-1},t=0..inf)) and Gamma(a)=Gamma(a+1)/a and Gamma(a,b)=ugamma(a,b). - See also: 1/ Psi 2/ Beta 3/ ugamma 4/ igamma + See also: 1/ Psi 2/ Beta 3/ ugamma 4/ igamma Ex1:Gamma(5) Ex2:Gamma(1/2) Ex3:Gamma(gamma(-5.1)) Ex4:Gamma(-5.1,2.1) - + ''' return GiacMethods['Gamma'](self,*args) @@ -210,11 +210,11 @@ cdef class GiacMethods_base: Help for Heaviside: Heaviside(Real) Function equal to 0 if x<0 and 1 if x>=0. - See also: 1/ Dirac 2/ laplace + See also: 1/ Dirac 2/ laplace Ex1:Heaviside(1) Ex2:Heaviside(-1) Ex3:Heaviside(0) - + ''' return GiacMethods['Heaviside'](self,*args) @@ -223,9 +223,9 @@ cdef class GiacMethods_base: Help for JordanBlock: JordanBlock(Expr(a),Intg(n)) Returns an n*n matrix with a on the diagonal, 1 above and 0 everywhere else. - See also: 1/ jordan + See also: 1/ jordan Ex1:JordanBlock(7,3) - + ''' return GiacMethods['JordanBlock'](self,*args) @@ -234,10 +234,10 @@ cdef class GiacMethods_base: Help for LU: LU(Mtrx(A),Var(L),Var(U),Var(P)) For a numerical matrix A, stores in L a lower triangular matrix, in U an upper triangular matrix and in P a permutation matrix such that P*A=L*U. - See also: 1/ lu 2/ QR + See also: 1/ lu 2/ QR Ex1:LU([[1,2],[3,4]],L,U,P) Ex2:LU([[6,12,18],[5,14,31],[3,8,18]],L,U,P) - + ''' return GiacMethods['LU'](self,*args) @@ -249,7 +249,7 @@ cdef class GiacMethods_base: Ex1:LambertW(1.0) Ex2:LambertW(ln(4)) Ex3:LambertW(-0.1,-1) - + ''' return GiacMethods['LambertW'](self,*args) @@ -258,9 +258,9 @@ cdef class GiacMethods_base: Help for Li: Li(Expr) Logarithm integral Li(x)=Ei(ln(x)) primitive of 1/ln(x). - See also: 1/ Si 2/ Ci 3/ Ei + See also: 1/ Si 2/ Ci 3/ Ei Ex1:Li(2.0) - + ''' return GiacMethods['Li'](self,*args) @@ -269,9 +269,9 @@ cdef class GiacMethods_base: Help for Line: Line(Expr(a),Expr(b),Expr(c),Expr(d)) Draws the segment [a+i*b,c+i*d]. - See also: 1/ segment + See also: 1/ segment Ex1:Line(-1,-2,1,2) - + ''' return GiacMethods['Line'](self,*args) @@ -280,9 +280,9 @@ cdef class GiacMethods_base: Help for LineHorz: LineHorz(Expr(a)) Draws the horizontal line y=a. - See also: 1/ Line 2/ LineVert + See also: 1/ Line 2/ LineVert Ex1:LineHorz(-1) - + ''' return GiacMethods['LineHorz'](self,*args) @@ -291,13 +291,13 @@ cdef class GiacMethods_base: Help for LineTan: LineTan(Expr(f(x)),[Var],Expr(a)) Draws the tangent to y=f(x) at x=a. Do not use parentheses or put the parenthesis around the entire expression. - See also: 1/ tangent 2/ droite_tangente + See also: 1/ tangent 2/ droite_tangente Ex1: LineTan sin(x),pi/4 Ex2: LineTan sin(t),t=pi/4) Ex3: LineTan sin(t),t,pi/4 Ex4: LineTan x^2-x,1 Ex5: (LineTan sin(t),t,pi/4) - + ''' return GiacMethods['LineTan'](self,*args) @@ -306,9 +306,9 @@ cdef class GiacMethods_base: Help for LineVert: LineVert(Expr(a)) Draws the vertical line x=a. - See also: 1/ Line 2/ LineHorz + See also: 1/ Line 2/ LineHorz Ex1:LineVert(2) - + ''' return GiacMethods['LineVert'](self,*args) @@ -317,10 +317,10 @@ cdef class GiacMethods_base: Help for Phi: Phi(Intg(n)) Euler's function (euler(n)=card({p1 sum(1/n^a,n,1,+infinity). - See also: 1/ sum + See also: 1/ sum Ex1:Zeta(2) - + ''' return GiacMethods['Zeta'](self,*args) @@ -507,10 +507,10 @@ cdef class GiacMethods_base: Help for a2q: a2q(Mtrx,VectVar) a2q(A,X)=the quadratic form q associated to A, X=vector of variables. - See also: 1/ q2a + See also: 1/ q2a Ex1:a2q([[1,2],[4,4]],[x,y]) Ex2:a2q([[1,3],[3,4]],[x,y]) - + ''' return GiacMethods['a2q'](self,*args) @@ -519,13 +519,13 @@ cdef class GiacMethods_base: Help for abcuv: abcuv(Poly(a),Poly(b),Poly(c),[Var]) Returns [u,v] such that au+bv=c for 3 polynomials a,b,c. - See also: 1/ egcd 2/ iabcuv + See also: 1/ egcd 2/ iabcuv Ex1:abcuv(x^2+2*x+1,x^2-1,x+1) Ex2:abcuv(X^2+2*X+1,X^2-1,X+1,X) Ex3:abcuv(x^2+2*x+1,x^2-1,x^3+1) Ex4:abcuv(X^2+2*X+1,X^2-1,X^3+1,X) Ex5:abcuv([1,2,1],[1,0,-1],[1,0,0,1]) - + ''' return GiacMethods['abcuv'](self,*args) @@ -534,10 +534,10 @@ cdef class GiacMethods_base: Help for about: about(Var(a)) Returns the hypothesis made with assume on the variable a. - See also: 1/ assume 2/ purge + See also: 1/ assume 2/ purge Ex1:about(a) Ex2:about(n) - + ''' return GiacMethods['about'](self,*args) @@ -546,12 +546,12 @@ cdef class GiacMethods_base: Help for abs: abs(Cplx||LstCplx) Returns the absolute value or the norm of its argument. - See also: 1/ arg + See also: 1/ arg Ex1:abs(-4) Ex2:abs(1+2*i) Ex3:abs((1+2*i)^2) Ex4:abs([-2,1+i,-4]) - + ''' return GiacMethods['abs'](self,*args) @@ -560,12 +560,12 @@ cdef class GiacMethods_base: Help for abscissa: abscissa(Pnt or Vect) Returns the abscissa of a point or a vector. - See also: 1/ ordinate 2/ affix 3/ cote 4/ coordinates + See also: 1/ ordinate 2/ affix 3/ cote 4/ coordinates Ex1:abscissa(point(1+2*i)) Ex2:abscissa(point(i)-point(1+2*i)) Ex3:abscissa(-1-i) Ex4:abscissa(point(1,2,3)) - + ''' return GiacMethods['abscissa'](self,*args) @@ -574,9 +574,9 @@ cdef class GiacMethods_base: Help for accumulate_head_tail: accumulate_head_tail(Lst(l),Intg(p),Intg(q)) Returns the list where the first p and the last q elements of l are replaced by their sum. - See also: 1/ + See also: 1/ Ex1:accumulate_head_tail([0,1,2,3,4,5,6,7,8,9],3,2) - + ''' return GiacMethods['accumulate_head_tail'](self,*args) @@ -585,9 +585,9 @@ cdef class GiacMethods_base: Help for acos: acos(Expr) Arccosine. - See also: 1/ cos 2/ acosh + See also: 1/ cos 2/ acosh Ex1:acos(0) - + ''' return GiacMethods['acos'](self,*args) @@ -596,10 +596,10 @@ cdef class GiacMethods_base: Help for acos2asin: acos2asin(Expr) Replaces arccos(x) by pi/2-arcsin(x) in the argument. - See also: 1/ acos2atan + See also: 1/ acos2atan Ex1:acos2asin(acos(x)+asin(x)) Ex2:acos2asin(2*acos(x)) - + ''' return GiacMethods['acos2asin'](self,*args) @@ -608,10 +608,10 @@ cdef class GiacMethods_base: Help for acos2atan: acos2atan(Expr) Replaces arccos(x) by pi/2-arctan(x/sqrt(1-x^2)) in the argument. - See also: 1/ acos2asin + See also: 1/ acos2asin Ex1:acos2atan(2*acos(x)) Ex2:acos2atan(acos(sqrt(1-x^2))+acos(x)) - + ''' return GiacMethods['acos2atan'](self,*args) @@ -620,9 +620,9 @@ cdef class GiacMethods_base: Help for acosh: acosh(Expr) Hyperbolic arccosine. - See also: 1/ cosh 2/ acos + See also: 1/ cosh 2/ acos Ex1:acosh(1) - + ''' return GiacMethods['acosh'](self,*args) @@ -631,9 +631,9 @@ cdef class GiacMethods_base: Help for acot: acot(Expr) Arccotangent. - See also: 1/ atan 2/ arccos + See also: 1/ atan 2/ arccos Ex1:acot(0) - + ''' return GiacMethods['acot'](self,*args) @@ -642,10 +642,10 @@ cdef class GiacMethods_base: Help for acsc: acsc(Expr) Arccosecant: acsc(x)=asin(1/x). - See also: 1/ asin 2/ csc + See also: 1/ asin 2/ csc Ex1:acsc(1) Ex2:acsc(2) - + ''' return GiacMethods['acsc'](self,*args) @@ -654,8 +654,8 @@ cdef class GiacMethods_base: Help for acyclic: acyclic(Opt) Option for the random_network command. - See also: 1/ random_network - + See also: 1/ random_network + ''' return GiacMethods['acyclic'](self,*args) @@ -664,7 +664,7 @@ cdef class GiacMethods_base: Help for add: add(Expr,Var,VarMin(a),VarMax(b),[VarStep(p)]) Discrete sum (with 2 or 4 arguments return then sum from a to b if a<=b or of the opposite of the sum from b+1 to a-1 if a>b+1 or 0 if a=b+1) or the discrete primitive or sum of the elements of a list or a sequence. - See also: 1/ + + See also: 1/ + Ex1:add(1/n^2,n,1,17) Ex2:add(1/n^2,n=1..17) Ex3:add(1/n^2,n,17,1) @@ -675,7 +675,7 @@ cdef class GiacMethods_base: Ex8:add([[1,2,3,4,5,6,7,8,9],[1,2,3,4,5,6,7,8,9]]) Ex9:add(1/(x*(x+1)),x) Ex10:add(cos(n*x),n) - + ''' return GiacMethods['add'](self,*args) @@ -684,9 +684,9 @@ cdef class GiacMethods_base: Help for add_arc: add_arc(Graph(G),Edge(e)||Trail(T)||Lst(E)) Returns a modified copy of digraph G with added arc e (or trail T or list of arcs E). - See also: 1/ add_edge 2/ delete_arc 3/ digraph 4/ edges 5/ has_arc 6/ trail + See also: 1/ add_edge 2/ delete_arc 3/ digraph 4/ edges 5/ has_arc 6/ trail Ex1:add_arc(digraph(trail(1,2,3,4,5,1)),[[1,3],[2,4]]) - + ''' return GiacMethods['add_arc'](self,*args) @@ -695,9 +695,9 @@ cdef class GiacMethods_base: Help for add_edge: add_edge(Graph(G),Edge(e)||Trail(T)||Lst(E)) Returns a modified copy of undirected graph G with added edge e (or trail T or list of edges E). - See also: 1/ add_arc 2/ delete_edge 3/ edges 4/ graph 5/ has_edge 6/ trail + See also: 1/ add_arc 2/ delete_edge 3/ edges 4/ graph 5/ has_edge 6/ trail Ex1:add_edge(graph(trail(1,2,3,4)),[4,1]) - + ''' return GiacMethods['add_edge'](self,*args) @@ -706,9 +706,9 @@ cdef class GiacMethods_base: Help for add_vertex: add_vertex(Graph(G),Vrtx(v)||Lst(V)) Returns a modified copy of G with added vertex v [or vertices from list V]. - See also: 1/ add_arc 2/ add_edge 3/ delete_vertex + See also: 1/ add_arc 2/ add_edge 3/ delete_vertex Ex1:add_vertex(cycle_graph(5),["a","b"]) - + ''' return GiacMethods['add_vertex'](self,*args) @@ -717,10 +717,10 @@ cdef class GiacMethods_base: Help for additionally: additionally(Expr) Makes an additionally assumption on a variable. - See also: 1/ purge 2/ about 3/ assume + See also: 1/ purge 2/ about 3/ assume Ex1: assume(n,integer);additionally(n>5) Ex2: assume(n,integer);assume(n>=2,additionally) - + ''' return GiacMethods['additionally'](self,*args) @@ -729,9 +729,9 @@ cdef class GiacMethods_base: Help for addtable: addtable(fourier||laplace,f(x),F(s),Var(x),Var(s)) Stores an unknown Fourier/Laplace transform pair (f,F). - See also: 1/ fourier 2/ laplace + See also: 1/ fourier 2/ laplace Ex1:addtable(fourier,y(x),Y(s),x,s) - + ''' return GiacMethods['addtable'](self,*args) @@ -740,9 +740,9 @@ cdef class GiacMethods_base: Help for adjacency_matrix: adjacency_matrix(Graph(G)) Returns the adjacency matrix of G (rows and columns are indexed by the vertices). - See also: 1/ neighbors + See also: 1/ neighbors Ex1:adjacency_matrix(graph(trail(1,2,3,4,2,5,1,3))) - + ''' return GiacMethods['adjacency_matrix'](self,*args) @@ -751,9 +751,9 @@ cdef class GiacMethods_base: Help for adjoint_matrix: adjoint_matrix(Mtrx) Returns the characteristic polynomial of A and the comatrix of A-xI. - See also: 1/ pcar + See also: 1/ pcar Ex1:adjoint_matrix([[1,i],[2,3]]) - + ''' return GiacMethods['adjoint_matrix'](self,*args) @@ -762,11 +762,11 @@ cdef class GiacMethods_base: Help for affix: affix(Pnt||Vect) Complex number equal to the affix of a point or of a vector. - See also: 1/ point 2/ vector + See also: 1/ point 2/ vector Ex1:affix(point(i)) Ex2:affix(point(i)-point(1+2*i)) Ex3:affix([1,2]) - + ''' return GiacMethods['affix'](self,*args) @@ -775,11 +775,11 @@ cdef class GiacMethods_base: Help for algsubs: algsubs(Equal(Xpr1=Xpr2),Expr(Xpr)) Substitutes in the expression Xpr, the algebraic expression Xpr1 by the algebraic expression Xpr2. - See also: 1/ subst 2/ subs + See also: 1/ subst 2/ subs Ex1:algsubs(x^2=u,1+x^2+x^4) Ex2:algsubs(a*b/c=d, 2*a*b^2/c) Ex3:algsubs(2a=p^2-q^2,algsubs(2c=p^2+q^2,c^2-a^2)) - + ''' return GiacMethods['algsubs'](self,*args) @@ -788,9 +788,9 @@ cdef class GiacMethods_base: Help for algvar: algvar(Expr) List of the variables by ascending algebraic extension order. - See also: 1/ lvar 2/ lname + See also: 1/ lvar 2/ lname Ex1:algvar(sqrt(x)+y) - + ''' return GiacMethods['algvar'](self,*args) @@ -799,10 +799,10 @@ cdef class GiacMethods_base: Help for all_trig_solutions: all_trig_solutions(:=Intg(0 or 1)) Pseudo-variable to return the general solution (all_trig_solutions:=1) or principal solution (all_trig_solutions:=0). - See also: 1/ cas_setup + See also: 1/ cas_setup Ex1: all_trig_solutions:=1 Ex2: all_trig_solutions:=0 - + ''' return GiacMethods['all_trig_solutions'](self,*args) @@ -811,9 +811,9 @@ cdef class GiacMethods_base: Help for allpairs_distance: allpairs_distance(Graph(G)) Returns a square matrix D of order equal to the number of vertices in G such that D(i,j) is the distance between i-th and j-th vertex of the (weighted) graph G. - See also: 1/ dijkstra 2/ graph_diameter 3/ vertex_distance + See also: 1/ dijkstra 2/ graph_diameter 3/ vertex_distance Ex1:allpairs_distance(graph(%{[1,2],[1,3],[1,4],[1,5],[2,3],[3,4],[4,5],[5,2]%})) - + ''' return GiacMethods['allpairs_distance'](self,*args) @@ -822,9 +822,9 @@ cdef class GiacMethods_base: Help for alog10: alog10(Expr) Function x->10^x. - See also: 1/ log10 + See also: 1/ log10 Ex1:alog10(3) - + ''' return GiacMethods['alog10'](self,*args) @@ -833,9 +833,9 @@ cdef class GiacMethods_base: Help for altitude: altitude((Pnt or Cplx),(Pnt or Cplx),(Pnt or Cplx)) altitude(A,B,C) draws the altitude through A of the triangle ABC. - See also: 1/ perpendicular 2/ orthogonal 3/ orthocenter 4/ common_perpendicular + See also: 1/ perpendicular 2/ orthogonal 3/ orthocenter 4/ common_perpendicular Ex1:altitude(-1,1-i,i) - + ''' return GiacMethods['altitude'](self,*args) @@ -844,13 +844,13 @@ cdef class GiacMethods_base: Help for angle: angle((Pnt or Cplx),(Pnt or Cplx),(Pnt or Cplx)) angle(A,B,C) is the value of the measure of the angle (AB,AC). - See also: 1/ triangle 2/ bissector 3/ legend 4/ labels 5/ angleat 6/ angleatraw + See also: 1/ triangle 2/ bissector 3/ legend 4/ labels 5/ angleat 6/ angleatraw Ex1:angle(point(0),point(i),point(1)) Ex2:angle(0,1,i) Ex3:angle(0,1,i,"") Ex4:angle(0,1,i,"a") Ex5:angle(i,1,1+i,"b") - + ''' return GiacMethods['angle'](self,*args) @@ -859,10 +859,10 @@ cdef class GiacMethods_base: Help for angle_radian: angle_radian(:=Intg(0 or 1)) Pseudo-variable to work with radians (angle_radian:=1) or degrees (angle_radian:=0). - See also: 1/ cas_setup + See also: 1/ cas_setup Ex1: angle_radian:=1 Ex2: angle_radian:=0 - + ''' return GiacMethods['angle_radian'](self,*args) @@ -871,9 +871,9 @@ cdef class GiacMethods_base: Help for angleat: angleat(Pnt(A),Pnt(B),Pnt(C),(Pnt or Cplx(z0))) angleat(A,B,C,z0) displays at point(z0) with a legend, the value of the measure of the angle (AB,AC). - See also: 1/ angle 2/ angleatraw 3/ legend + See also: 1/ angle 2/ angleatraw 3/ legend Ex1: A:=point(0);B:=point(1);C:=point(i);angleat(A,B,C,-2-i) - + ''' return GiacMethods['angleat'](self,*args) @@ -882,9 +882,9 @@ cdef class GiacMethods_base: Help for angleatraw: angleatraw(Pnt(A)),Pnt(B),Pnt(C),(Pnt or Cplx(z0))) angleatraw(A,B,C,z0) displays at point(z0), the value of the measure of the angle (AB,AC). - See also: 1/ angle 2/ angleat + See also: 1/ angle 2/ angleat Ex1: A:=point(0);B:=point(1);C:=point(i);angleatraw(A,B,C,-2-i) - + ''' return GiacMethods['angleatraw'](self,*args) @@ -893,11 +893,11 @@ cdef class GiacMethods_base: Help for ans: ans(Intg(n)) Returns the (n+1)th answer of the command history if n>=0 or, the (-n)th previous answer if n<0 (by default n=-1 for the previous answer). - See also: 1/ quest + See also: 1/ quest Ex1:ans() Ex2:ans(2) Ex3:ans(-2) - + ''' return GiacMethods['ans'](self,*args) @@ -906,9 +906,9 @@ cdef class GiacMethods_base: Help for antiprism_graph: antiprism_graph(Intg(n)) Returns the antiprism graph of order n. - See also: 1/ prism_graph + See also: 1/ prism_graph Ex1:antiprism_graph(5) - + ''' return GiacMethods['antiprism_graph'](self,*args) @@ -917,14 +917,14 @@ cdef class GiacMethods_base: Help for append: append((Lst||Set||Str(L),Elem)) Append an element to a set or at the end of a list or of a string (L:=append(L,a) or L.append(a)). - See also: 1/ concat 2/ prepend + See also: 1/ concat 2/ prepend Ex1:append([1,2,4],6) Ex2:append(%{1,2,4%},6) Ex3: L:=[1,2,4];L:=append(L,6) Ex4: L:=[1,2,4];L.append(6) Ex5: S:=set[1,2,4];S:=append(S,6) Ex6: S:=set[1,2,4];S.append(6) - + ''' return GiacMethods['append'](self,*args) @@ -933,10 +933,10 @@ cdef class GiacMethods_base: Help for apply: apply(Fnc(f),Lst(l)) Applies the function f at the elements of the list l (option matrix for a matrix). - See also: 1/ map 2/ unapply 3/ matrix + See also: 1/ map 2/ unapply 3/ matrix Ex1:apply(x->x^3,[1,2,3]) Ex2:apply(x->x+1,[[1,2,3],[1,2,3]],matrix) - + ''' return GiacMethods['apply'](self,*args) @@ -945,14 +945,14 @@ cdef class GiacMethods_base: Help for approx: approx(Expr,[Int]) Numerical evaluation of the first argument (we can give the number of digits as second argument). - See also: 1/ evalb 2/ eval + See also: 1/ evalb 2/ eval Ex1:approx(2/3) Ex2:approx(2/3,2) Ex3:approx(2*sin(1)) Ex4:approx(2*sin(1),40) Ex5:approx(sqrt(2)+pi) Ex6:approx(sqrt(2)+pi,30) - + ''' return GiacMethods['approx'](self,*args) @@ -961,12 +961,12 @@ cdef class GiacMethods_base: Help for arc: arc(Pnt, Pnt, Real,[Var(C)],[Var(r)],[Opt(segment)]) Draws a circular arc given by 2 vertices and the central angle [Xcas will put the center in C and the radius in r]. - See also: 1/ circle 2/ segment 3/ plotparam + See also: 1/ circle 2/ segment 3/ plotparam Ex1:arc(0,1,pi/4) Ex2:arc(i,1,pi/4,C,r) Ex3:arc(i,1,pi/4,segment) Ex4:arc(i,1,pi/4,segment,affichage=1+rempli) - + ''' return GiacMethods['arc'](self,*args) @@ -975,11 +975,11 @@ cdef class GiacMethods_base: Help for arcLen: arcLen(Expr(Xpr) or Lst([Xpr1,Xpr2]),Var,Real(a),Real(b)) Returns the length of the arc of the curve defined by y=Xpr(or by x=Xpr1,y=Xpr2) when the parameter values are between a and b. - See also: 1/ int + See also: 1/ int Ex1:arcLen(t^2,t,1,2) Ex2:arcLen([t,t^2],t,1,2) Ex3:arcLen([cos(t),sin(t)],t,1,2) - + ''' return GiacMethods['arcLen'](self,*args) @@ -988,9 +988,9 @@ cdef class GiacMethods_base: Help for arccos: arccos(Expr) Arccosine. - See also: 1/ cos 2/ acosh + See also: 1/ cos 2/ acosh Ex1:arccos(0) - + ''' return GiacMethods['arccos'](self,*args) @@ -999,9 +999,9 @@ cdef class GiacMethods_base: Help for arccosh: arccosh(Expr) Hyperbolic arccosine. - See also: 1/ cosh 2/ acos + See also: 1/ cosh 2/ acos Ex1:arccosh(1) - + ''' return GiacMethods['arccosh'](self,*args) @@ -1010,11 +1010,11 @@ cdef class GiacMethods_base: Help for arclen: arclen(Expr(Xpr) or Lst([Xpr1,Xpr2]),Var,Real(a),Real(b)) Returns the length of the arc of the curve defined by y=Xpr(or by x=Xpr1,y=Xpr2) when the parameter values are between a and b. - See also: 1/ int + See also: 1/ int Ex1:arclen(t^2,t,1,2) Ex2:arclen([t,t^2],t,1,2) Ex3:arclen([cos(t),sin(t)],t,1,2) - + ''' return GiacMethods['arclen'](self,*args) @@ -1023,9 +1023,9 @@ cdef class GiacMethods_base: Help for arcsin: arcsin(Expr) Arcsine. - See also: 1/ sin + See also: 1/ sin Ex1:arcsin(0) - + ''' return GiacMethods['arcsin'](self,*args) @@ -1034,9 +1034,9 @@ cdef class GiacMethods_base: Help for arcsinh: arcsinh(Expr) Hyperbolic arcsine. - See also: 1/ sinh 2/ asin + See also: 1/ sinh 2/ asin Ex1:arcsinh(0) - + ''' return GiacMethods['arcsinh'](self,*args) @@ -1045,9 +1045,9 @@ cdef class GiacMethods_base: Help for arctan: arctan(Expr) Arctangent. - See also: 1/ tan 2/ atanh + See also: 1/ tan 2/ atanh Ex1:arctan(0) - + ''' return GiacMethods['arctan'](self,*args) @@ -1056,9 +1056,9 @@ cdef class GiacMethods_base: Help for arctanh: arctanh(Expr) Hyperbolic arctangent. - See also: 1/ atan 2/ tanh + See also: 1/ atan 2/ tanh Ex1:arctanh(0) - + ''' return GiacMethods['arctanh'](self,*args) @@ -1067,7 +1067,7 @@ cdef class GiacMethods_base: Help for area: area(Polygone || Expr,x=a..b,[n],[Method]) Algebraic area of a circle, a circular arc or of a (star) polygon (e.g. triangle, square, ...) or of the area below a curve, optionally with a quadrature method (trapezoid,left_rectangle,right_rectangle,middle_point,simpson,rombergt,rombergm). - See also: 1/ trapezoid 2/ perimeter 3/ areaatraw 4/ areaat 5/ areaplot + See also: 1/ trapezoid 2/ perimeter 3/ areaatraw 4/ areaat 5/ areaplot Ex1:area(triangle(0,1,i)) Ex2:area(square(0,2)) Ex3:area(circle(0,2)) @@ -1075,7 +1075,7 @@ cdef class GiacMethods_base: Ex5:area(x^2,x=0..1,5,trapezoid) Ex6:area(x^2,x=0..1,5,simpson) Ex7:area(x^2,x=0..1,5,rombergm) - + ''' return GiacMethods['area'](self,*args) @@ -1084,13 +1084,13 @@ cdef class GiacMethods_base: Help for areaat: areaat(Polygone, Pnt||Cplx(z0)) Displays at point(z0), with a legend, the algebraic area of a circle or of a (star) polygon (e.g. triangle, square, ...) - See also: 1/ area 2/ areaatraw 3/ polygon 4/ perimeteratraw 5/ areaplot + See also: 1/ area 2/ areaatraw 3/ polygon 4/ perimeteratraw 5/ areaplot Ex1: t:=triangle(0,1,i);areaat(t,(1+i)/2) Ex2: c:=square(0,2);areaat(c,1+i) Ex3: c2:=circle(0,2);areaat(c2,1+i) Ex4: p:=polygon(0,1,i);areaat(p,1+i) Ex5: A:=point(0);B:=point(1+i);c:=carre(A,B);areaat(c,i) - + ''' return GiacMethods['areaat'](self,*args) @@ -1099,13 +1099,13 @@ cdef class GiacMethods_base: Help for areaatraw: areaatraw(Polygone, Pnt||Cplx(z0)) Displays at point(z0), the algebraic area of a circle or of a (star-)polygon (e.g. triangle, square, ...) - See also: 1/ area 2/ areaat 3/ polygon 4/ perimeteratraw 5/ areaplot + See also: 1/ area 2/ areaat 3/ polygon 4/ perimeteratraw 5/ areaplot Ex1:areaatraw(triangle(0,1,i),(1+i)/2) Ex2:areaatraw(square(0,2),1+i) Ex3:areaatraw(circle(0,2),1+i) Ex4:areaatraw(polygon(0,1,i),1+i) Ex5: A:=point(0);B:=point(1+i);c:=carre(A,B);areaatraw(c,i) - + ''' return GiacMethods['areaatraw'](self,*args) @@ -1114,11 +1114,11 @@ cdef class GiacMethods_base: Help for areaplot: areaplot(Expr,x=a..b,[n],[Method]) Displays the area below a curve, optionally with a quadrature method (trapezoid,left_rectangle,right_rectangle,middle_point). - See also: 1/ integrate 2/ plot 3/ area 4/ areaat 5/ areaatraw + See also: 1/ integrate 2/ plot 3/ area 4/ areaat 5/ areaatraw Ex1:areaplot(sin(x),x=0..pi) Ex2:areaplot(x^2,x=0..1,5,trapezoid) Ex3:areaplot(x^2,x=0..1,5,middle_point) - + ''' return GiacMethods['areaplot'](self,*args) @@ -1127,11 +1127,11 @@ cdef class GiacMethods_base: Help for arg: arg(Expr) Returns the argument of a complex number. - See also: 1/ abs + See also: 1/ abs Ex1:arg(1+i) Ex2:arg(1+2*i) Ex3:arg((1+2*i)^2) - + ''' return GiacMethods['arg'](self,*args) @@ -1140,10 +1140,10 @@ cdef class GiacMethods_base: Help for array: array(Opt) Option for convert for definitions of sparse matrices. - See also: 1/ convert 2/ table + See also: 1/ convert 2/ table Ex1: A[0..2,0..2]:=1;A[0..1,1..2]:=2;convert(A,array) Ex2: B[0..1,1..2]:=1;B[2,2]:=2;convert(B,array) - + ''' return GiacMethods['array'](self,*args) @@ -1152,9 +1152,9 @@ cdef class GiacMethods_base: Help for arrivals: arrivals(Graph(G),[Vrtx(v)]) Returns the list of vertices in digraph G which are connected by v with arcs such that heads are in v. If v is omitted, a list of arrivals is computed for every vertex in G. - See also: 1/ in_degree + See also: 1/ in_degree Ex1:arrivals(digraph(%{[1,2],[1,3],[2,3]%}),1) - + ''' return GiacMethods['arrivals'](self,*args) @@ -1163,10 +1163,10 @@ cdef class GiacMethods_base: Help for articulation_points: articulation_points(Graph(G)) Returns the list of articulation points (cut vertices) of G. - See also: 1/ biconnected_components 2/ is_biconnected 3/ is_connected 4/ is_triconnected + See also: 1/ biconnected_components 2/ is_biconnected 3/ is_connected 4/ is_triconnected Ex1:articulation_points(path_graph(5)) Ex2:articulation_points(cycle_graph(5)) - + ''' return GiacMethods['articulation_points'](self,*args) @@ -1175,9 +1175,9 @@ cdef class GiacMethods_base: Help for asin: asin(Expr) Arcsine. - See also: 1/ sin + See also: 1/ sin Ex1:asin(0) - + ''' return GiacMethods['asin'](self,*args) @@ -1186,10 +1186,10 @@ cdef class GiacMethods_base: Help for asin2acos: asin2acos(Expr) Replaces arcsin(x) by pi/2-arccos(x) in the argument. - See also: 1/ asin2atan + See also: 1/ asin2atan Ex1:asin2acos(acos(x)+asin(x)) Ex2:asin2acos(2*asin(x)) - + ''' return GiacMethods['asin2acos'](self,*args) @@ -1198,10 +1198,10 @@ cdef class GiacMethods_base: Help for asin2atan: asin2atan(Expr) Replaces arcsin(x) by arctan(x/sqrt(1-x^2)) in the argument. - See also: 1/ asin2acos + See also: 1/ asin2acos Ex1:asin2atan(2*asin(x)) Ex2:asin2atan(asin(sqrt(1-x^2))+asin(x)) - + ''' return GiacMethods['asin2atan'](self,*args) @@ -1210,9 +1210,9 @@ cdef class GiacMethods_base: Help for asinh: asinh(Expr) Hyperbolic arcsine. - See also: 1/ sinh 2/ asin + See also: 1/ sinh 2/ asin Ex1:asinh(0) - + ''' return GiacMethods['asinh'](self,*args) @@ -1221,10 +1221,10 @@ cdef class GiacMethods_base: Help for assign_edge_weights: assign_edge_weights(Graph(G),Seq(m,n)||Intrv(a..b)) Assigns random edge weights to the edges of G and returns a modified copy of G. If integers n and m such that n>=m are specified, weights are integers randomly chosen in [m,n]. If an interval a..b is specified, weights are uniformly distributed in the interval [a,b). - See also: 1/ set_edge_weight 2/ get_edge_weight 3/ weight_matrix 4/ random_digraph 5/ random_tournament + See also: 1/ set_edge_weight 2/ get_edge_weight 3/ weight_matrix 4/ random_digraph 5/ random_tournament Ex1:assign_edge_weights(digraph(trail(1,2,3,4,1)),1,9) Ex2:assign_edge_weights(digraph(trail(1,2,3,4,1)),0..1) - + ''' return GiacMethods['assign_edge_weights'](self,*args) @@ -1233,7 +1233,7 @@ cdef class GiacMethods_base: Help for assume: assume(Expr) Makes an assumption on a variable. - See also: 1/ purge 2/ about 3/ additionally + See also: 1/ purge 2/ about 3/ additionally Ex1:assume(a>0) Ex2:assume(a=0.3) Ex3:assume(a:=[pi/4,0,pi/2]) @@ -1244,7 +1244,7 @@ cdef class GiacMethods_base: Ex8:assume((a>=2 and a<4) or a>6) Ex9:assume(a>=2);additionally(a<6) Ex10:assume(a) - + ''' return GiacMethods['assume'](self,*args) @@ -1253,10 +1253,10 @@ cdef class GiacMethods_base: Help for at: at(Lst(l)||Mtrx(m),Index(j)||Lst([j,k])) at(l,j) (or at(m,[j,k])) is the element of the list l (or matrix m) for index=j (or for index j,k). - See also: 1/ of + See also: 1/ of Ex1:at([10,11,12],1) Ex2:at([[1,2],[3,4]],[1,0]) - + ''' return GiacMethods['at'](self,*args) @@ -1265,9 +1265,9 @@ cdef class GiacMethods_base: Help for atan: atan(Expr) Arctangent. - See also: 1/ tan 2/ atanh + See also: 1/ tan 2/ atanh Ex1:atan(0) - + ''' return GiacMethods['atan'](self,*args) @@ -1276,8 +1276,8 @@ cdef class GiacMethods_base: Help for atan2acos: atan2acos(Expr) Replaces arctan(x) by pi/2-arccos(x/sqrt(1+x^2)) in the argument. - See also: 1/ atan2acos(atan(x)) - + See also: 1/ atan2acos(atan(x)) + ''' return GiacMethods['atan2acos'](self,*args) @@ -1286,8 +1286,8 @@ cdef class GiacMethods_base: Help for atan2asin: atan2asin(Expr) Replaces arctan(x) by arcsin(x/sqrt(1+x^2)) in the argument. - See also: 1/ atan2asin(atan(x)) - + See also: 1/ atan2asin(atan(x)) + ''' return GiacMethods['atan2asin'](self,*args) @@ -1296,9 +1296,9 @@ cdef class GiacMethods_base: Help for atanh: atanh(Expr) Hyperbolic arctangent. - See also: 1/ atan 2/ tanh + See also: 1/ atan 2/ tanh Ex1:atanh(0) - + ''' return GiacMethods['atanh'](self,*args) @@ -1307,11 +1307,11 @@ cdef class GiacMethods_base: Help for atrig2ln: atrig2ln(Expr) Rewrites the expression containing inverse trigonometric functions into logarithmic functions. - See also: 1/ trig2exp 2/ exp2trig + See also: 1/ trig2exp 2/ exp2trig Ex1:atrig2ln(atan(x)) Ex2:atrig2ln(asin(x)) Ex3:atrig2ln(acos(x)) - + ''' return GiacMethods['atrig2ln'](self,*args) @@ -1320,13 +1320,13 @@ cdef class GiacMethods_base: Help for augment: augment(Lst,Lst||Seq,Seq||Str,Str||Mtrx,Mtrx) Concatenates two lists or two strings or two sequences or 2 matrices; L:=concat(L,L1) or L.concat(L1). - See also: 1/ append 2/ cat 3/ semi_augment 4/ border 5/ + + See also: 1/ append 2/ cat 3/ semi_augment 4/ border 5/ + Ex1:augment([1,2],[3,4,5]) Ex2:augment("bon","jour") Ex3:augment([[1,2],[3,4]],[[4,5,6],[6,7,8]]) Ex4: L:=[1,2];L.concat([3,4,5]) Ex5: S:="abcd";S.concat("efghi") - + ''' return GiacMethods['augment'](self,*args) @@ -1335,9 +1335,9 @@ cdef class GiacMethods_base: Help for auto_correlation: auto_correlation(Lst) Returns the cross-correlation of the given signal with itself. - See also: 1/ cross_correlation 2/ correlation + See also: 1/ cross_correlation 2/ correlation Ex1:auto_correlation([1,-1,0,2,1]) - + ''' return GiacMethods['auto_correlation'](self,*args) @@ -1346,14 +1346,14 @@ cdef class GiacMethods_base: Help for autosimplify: autosimplify(Cmds) The argument is a command that Xcas will use to rewrite answers (initial value is regroup and for no simplification it is nop or 0). - See also: 1/ simplify 2/ factor 3/ regroup + See also: 1/ simplify 2/ factor 3/ regroup Ex1:autosimplify(nop) Ex2:autosimplify(0) Ex3:autosimplify(regroup) Ex4:autosimplify(1) Ex5:autosimplify(factor) Ex6:autosimplify(simplify) - + ''' return GiacMethods['autosimplify'](self,*args) @@ -1362,10 +1362,10 @@ cdef class GiacMethods_base: Help for avance: avance(NULL or Real(n)) The turtle takes n steps forward (by default n=10). - See also: 1/ recule 2/ saute + See also: 1/ recule 2/ saute Ex1: avance 30 Ex2:avance(30) - + ''' return GiacMethods['avance'](self,*args) @@ -1374,11 +1374,11 @@ cdef class GiacMethods_base: Help for avgRC: avgRC(Expr(Xpr),Var(Var),[Real(h)]) Returns (Xpr(var+h)-Xpr(Var))/h (by default h=0.001). - See also: 1/ nDeriv + See also: 1/ nDeriv Ex1:avgRC(f(x),x,h) Ex2:avgRC(x^2,x,0.1) Ex3:avgRC(x^2,x) - + ''' return GiacMethods['avgRC'](self,*args) @@ -1387,10 +1387,10 @@ cdef class GiacMethods_base: Help for axes: axes(Opt) Global option (Maple compatibility) of a graphic command to put or not the axes. - See also: 1/ line_width 2/ gl_showaxes 3/ switch_axes + See also: 1/ line_width 2/ gl_showaxes 3/ switch_axes Ex1: axes=0;segment(0,point(1,1)) Ex2: axes=1;segment(0,point(1,1),epaisseur=5) - + ''' return GiacMethods['axes'](self,*args) @@ -1400,7 +1400,7 @@ cdef class GiacMethods_base: axis(xmin,xmax,ymin,ymax,[zmin,zmaz]) Defines the graphic display Ex1:axis(-2,4,-1,6) - + ''' return GiacMethods['axis'](self,*args) @@ -1409,11 +1409,11 @@ cdef class GiacMethods_base: Help for back: back(Vect or Seq or Str) Returns the last element of a vector or a sequence or a string. - See also: 1/ inter 2/ head 3/ mid 4/ left 5/ right + See also: 1/ inter 2/ head 3/ mid 4/ left 5/ right Ex1:back(1,2,3) Ex2:back([1,2,3]) Ex3:back("bonjour") - + ''' return GiacMethods['back'](self,*args) @@ -1422,10 +1422,10 @@ cdef class GiacMethods_base: Help for backward: backward(NULL or Real(n)) The turtle takes n steps back (by default n=10). - See also: 1/ avance 2/ saute + See also: 1/ avance 2/ saute Ex1: recule 30 Ex2:backward(30) - + ''' return GiacMethods['backward'](self,*args) @@ -1434,9 +1434,9 @@ cdef class GiacMethods_base: Help for baisse_crayon: baisse_crayon(NULL) Presses the pencil down so that the turtle move with traces. - See also: 1/ leve_crayon 2/ crayon + See also: 1/ leve_crayon 2/ crayon Ex1:baisse_crayon() - + ''' return GiacMethods['baisse_crayon'](self,*args) @@ -1445,8 +1445,8 @@ cdef class GiacMethods_base: Help for bandwidth: bandwidth(Opt) Option for the kernel_density command. - See also: 1/ kernel_density 2/ bins - + See also: 1/ kernel_density 2/ bins + ''' return GiacMethods['bandwidth'](self,*args) @@ -1455,11 +1455,11 @@ cdef class GiacMethods_base: Help for bar_plot: bar_plot(Mtrx) Draws a barplot of a one variable statistical series. - See also: 1/ camembert 2/ histogram 3/ frequencies + See also: 1/ camembert 2/ histogram 3/ frequencies Ex1:bar_plot([["France",6],["Allemagne",12],["Suisse",5]]) Ex2:bar_plot([3/2,2/3,5/4,4/5,7/6,6/7,9/8,8/9,11/10]) Ex3:bar_plot([[2,"xyz","abc"],["A",2,5],["B",5,6],["C",7,7]]) - + ''' return GiacMethods['bar_plot'](self,*args) @@ -1468,11 +1468,11 @@ cdef class GiacMethods_base: Help for barplot: barplot(Mtrx) Draws a barplot of a one variable statistical series. - See also: 1/ camembert 2/ histogram 3/ frequencies + See also: 1/ camembert 2/ histogram 3/ frequencies Ex1:barplot([["France",6],["Allemagne",12],["Suisse",5]]) Ex2:barplot([3/2,2/3,5/4,4/5,7/6,6/7,9/8,8/9,11/10]) Ex3:barplot([[2,"xyz","abc"],["A",2,5],["B",5,6],["C",7,7]]) - + ''' return GiacMethods['barplot'](self,*args) @@ -1481,9 +1481,9 @@ cdef class GiacMethods_base: Help for bartlett_hann_window: bartlett_hann_window(Lst,[Interval(n1..n2)]) Applies the Bartlett-Hann windowing function to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window + See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window Ex1: scatterplot(bartlett_hann_window(randvector(1000,0..1))) - + ''' return GiacMethods['bartlett_hann_window'](self,*args) @@ -1492,11 +1492,11 @@ cdef class GiacMethods_base: Help for barycenter: barycenter([Pnt,Real],[Pnt,Real],[Pnt,Real]) barycenter([point1,coeff1],...) draws the barycenter of point1 with weight coeff1... - See also: 1/ isobarycenter 2/ midpoint + See also: 1/ isobarycenter 2/ midpoint Ex1:barycenter([point(-1),1],[point(1+i),2],[point(1-i),1]) Ex2:barycenter([[point(-1),1],[point(1+i),2],[point(1-i),1]]) Ex3:barycenter([point(-1),point(1+i),point(1-i)],[1,2,1]) - + ''' return GiacMethods['barycenter'](self,*args) @@ -1505,11 +1505,11 @@ cdef class GiacMethods_base: Help for base: base(Opt) Option for convert : convert(p,base,b)= [a0,a1,..an] or convert([a0,a1,..an],base,b)=p with p=a0+a1*b+....an*b^(n-1). - See also: 1/ convert 2/ horner 3/ revlist + See also: 1/ convert 2/ horner 3/ revlist Ex1: convert(123,base,8) Ex2: convert([3,7,1],base,8) Ex3: horner(revlist([3,7,1]),8) - + ''' return GiacMethods['base'](self,*args) @@ -1518,9 +1518,9 @@ cdef class GiacMethods_base: Help for basis: basis(Lst(vector1,..,vectorn)) Extracts a basis from a spanning set of vectors. - See also: 1/ ker 2/ ibasis + See also: 1/ ker 2/ ibasis Ex1:basis([[1,2,3],[4,5,6],[7,8,9],[10,11,12]]) - + ''' return GiacMethods['basis'](self,*args) @@ -1529,11 +1529,11 @@ cdef class GiacMethods_base: Help for batons: batons(Mtrx) Draws for k=0..nrows, the segments (xk,0)-(xk,yk) where xk=element row k column 0 and yk=element row k column j (j=1..ncols). - See also: 1/ polygonplot 2/ scatterplot 3/ listplot + See also: 1/ polygonplot 2/ scatterplot 3/ listplot Ex1:batons([1,3],[2,5],[3,2]) Ex2:batons([[1,3],[2,5],[3,2]]) Ex3:batons([1,2,3],[3,5,2]) - + ''' return GiacMethods['batons'](self,*args) @@ -1542,9 +1542,9 @@ cdef class GiacMethods_base: Help for bellman_ford: bellman_ford(Graph(G),Vrtx(s),Vrtx(t)||Lst(T)) Returns the length of the shortest path resp. paths from s to vertex t resp. vertices in T in weighted graph G. - See also: 1/ dijkstra 2/ shortest_path + See also: 1/ dijkstra 2/ shortest_path Ex1:bellman_ford(graph(%{[[1,2],-1],[[2,3],-3],[[3,4],-7],[[4,5],-3],[[5,6],-3],[[1,6],-3]%}),1,4) - + ''' return GiacMethods['bellman_ford'](self,*args) @@ -1553,10 +1553,10 @@ cdef class GiacMethods_base: Help for bernoulli: bernoulli(Intg||(Intg,Var)) bernoulli(n) is the n-th number of Bernoulli and bernoulli(n,x) is the n-th polynomial of Bernoulli and the second argument is the variable. - See also: 1/ + See also: 1/ Ex1:bernoulli(6) Ex2:bernoulli(6,x) - + ''' return GiacMethods['bernoulli'](self,*args) @@ -1565,10 +1565,10 @@ cdef class GiacMethods_base: Help for besselJ: besselJ(Real(x),Int(p)) besselJ(x,p) returns the Bessel function of the first kind Jp(x). - See also: 1/ BesselJ 2/ BesselY 3/ besselY + See also: 1/ BesselJ 2/ BesselY 3/ besselY Ex1:besselJ(sqrt(2),2) Ex2:besselJ(sqrt(2),-2) - + ''' return GiacMethods['besselJ'](self,*args) @@ -1577,10 +1577,10 @@ cdef class GiacMethods_base: Help for besselY: besselY(Real(x),Int(p)) besselY(x,p) returns the Bessel function of the second kind Yp(x). - See also: 1/ BesselY 2/ BesselJ 3/ besselJ + See also: 1/ BesselY 2/ BesselJ 3/ besselJ Ex1:besselY(sqrt(2),2) Ex2:besselY(sqrt(2),-2) - + ''' return GiacMethods['besselY'](self,*args) @@ -1589,9 +1589,9 @@ cdef class GiacMethods_base: Help for betad: betad(Real(a>0),Real(b>0),Real(0<=x<=1)) Returns the probability density of the Beta law (=Gamma(a+b)*x^(a-1)*(1-x)^(b-1)/(Gamma(a)*Gamma(b))). - See also: 1/ betad_cdf 2/ betad_icdf + See also: 1/ betad_cdf 2/ betad_icdf Ex1:betad(2.2,1.5,0.8) - + ''' return GiacMethods['betad'](self,*args) @@ -1600,10 +1600,10 @@ cdef class GiacMethods_base: Help for betad_cdf: betad_cdf(Real(a>0),Real(b>0),Real(0<=x0<=1),[Real(0<=y0<=1)]) Returns the probability that a Beta random variable (with a and b as parameters) is less than x0 or between x0 and y0. - See also: 1/ betad 2/ betad_icdf + See also: 1/ betad 2/ betad_icdf Ex1:betad_cdf(2,1,0.2) Ex2:betad_cdf(2,1,0.1,0.3) - + ''' return GiacMethods['betad_cdf'](self,*args) @@ -1612,10 +1612,10 @@ cdef class GiacMethods_base: Help for betad_icdf: betad_icdf(Real(a>0),Real(b>0),Real(0<=p<=1)) Returns h such that the probability that a Beta random variable is less than h is p (0<=p<=1). - See also: 1/ betad_cdf 2/ betad + See also: 1/ betad_cdf 2/ betad Ex1:betad_icdf(2,1,0.95) Ex2:betad_icdf(2,1,0.5) - + ''' return GiacMethods['betad_icdf'](self,*args) @@ -1624,10 +1624,10 @@ cdef class GiacMethods_base: Help for betavariate: betavariate(Real(a),Real(b)) Returns a random real according to the Beta distribution with parameters a>0 and b>0. - See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector + See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector Ex1:betavariate(1,2) Ex2:betavariate(1.5,4) - + ''' return GiacMethods['betavariate'](self,*args) @@ -1636,12 +1636,12 @@ cdef class GiacMethods_base: Help for bezier: bezier(Lst,[plot]) Bezier curve defined by control points. - See also: 1/ parameq + See also: 1/ parameq Ex1:bezier(1,1+i,2+i,3-i,plot) Ex2:bezier(point([0,0,0]),point([1,1,0]),point([0,1,1]),plot) Ex3: parameq(bezier(1,1+i,2+i,3-i)) Ex4: parameq(bezier(point([0,0,0]),point([1,1,0]),point([0,1,1]))) - + ''' return GiacMethods['bezier'](self,*args) @@ -1650,11 +1650,11 @@ cdef class GiacMethods_base: Help for bezout_entiers: bezout_entiers(Intg,Intg) Extended greatest common divisor of 2 integers. - See also: 1/ gcd 2/ iabcuv 3/ egcd + See also: 1/ gcd 2/ iabcuv 3/ egcd Ex1:bezout_entiers(45,75) Ex2:bezout_entiers(21,28) Ex3:bezout_entiers(30,49) - + ''' return GiacMethods['bezout_entiers'](self,*args) @@ -1663,9 +1663,9 @@ cdef class GiacMethods_base: Help for biconnected_components: biconnected_components(Graph(G)) Returns the biconnected components of G as a list of lists of vertices. - See also: 1/ articulation_points 2/ is_biconnected 3/ is_connected 4/ trail + See also: 1/ articulation_points 2/ is_biconnected 3/ is_connected 4/ trail Ex1:biconnected_components(graph(trail(1,2,3,4,2),trail(4,5,6,7,5))) - + ''' return GiacMethods['biconnected_components'](self,*args) @@ -1674,7 +1674,7 @@ cdef class GiacMethods_base: Help for binomial: binomial(Intg(n),Intg(k),[Real(p in 0..1)]) Returns comb(n,k)*p^k*(1-p)^(n-k) or comb(n,k) if no 3rd argument. - See also: 1/ binomial_cdf 2/ binomial_icdf 3/ multinomial 4/ randvector 5/ ranm + See also: 1/ binomial_cdf 2/ binomial_icdf 3/ multinomial 4/ randvector 5/ ranm Ex1:binomial(4,2) Ex2:binomial(4,0,0.5) Ex3:binomial(4,2,0.5) @@ -1682,7 +1682,7 @@ cdef class GiacMethods_base: Ex5: assume(p>=0 and p<=1);binomial(4,p,2) Ex6: randvector(6,binomial,4,0.2) Ex7: ranm(4,6,binomial,4,0.7) - + ''' return GiacMethods['binomial'](self,*args) @@ -1691,11 +1691,11 @@ cdef class GiacMethods_base: Help for binomial_cdf: binomial_cdf(Intg(n),Real(p),Real(x),[Real(y)]) Returns Proba(X<=x) or Proba(x<=X<=y) when X follows the B(n,p) law. - See also: 1/ binomial 2/ binomial_icdf + See also: 1/ binomial 2/ binomial_icdf Ex1:binomial_cdf(4,0.5,2) Ex2:binomial_cdf(4,0.1,2) Ex3:binomial_cdf(4,0.5,2,3) - + ''' return GiacMethods['binomial_cdf'](self,*args) @@ -1704,10 +1704,10 @@ cdef class GiacMethods_base: Help for binomial_icdf: binomial_icdf(Intg(n),Real(p),Real(t)) Returns h such as Proba(X<=h)=t when X follows the B(n,p) law. - See also: 1/ binomial 2/ binomial_cdf + See also: 1/ binomial 2/ binomial_cdf Ex1:binomial_icdf(4,0.5,0.68) Ex2:binomial_icdf(4,0.1,0.95) - + ''' return GiacMethods['binomial_icdf'](self,*args) @@ -1716,8 +1716,8 @@ cdef class GiacMethods_base: Help for bins: bins(Opt) Option for the kernel_density command. - See also: 1/ kernel_density 2/ bandwidth - + See also: 1/ kernel_density 2/ bandwidth + ''' return GiacMethods['bins'](self,*args) @@ -1726,8 +1726,8 @@ cdef class GiacMethods_base: Help for bipartite: bipartite(Opt) Option for the draw_graph command - See also: 1/ draw_graph - + See also: 1/ draw_graph + ''' return GiacMethods['bipartite'](self,*args) @@ -1736,9 +1736,9 @@ cdef class GiacMethods_base: Help for bipartite_matching: bipartite_matching(Graph(G)) Returns the list of edges in a maximum matching of the undirected unweighted bipartite graph G. - See also: 1/ is_bipartite 2/ maximum_matching + See also: 1/ is_bipartite 2/ maximum_matching Ex1:bipartite_matching(graph("desargues")) - + ''' return GiacMethods['bipartite_matching'](self,*args) @@ -1747,14 +1747,14 @@ cdef class GiacMethods_base: Help for bisection_solver: bisection_solver(Opt) Argument for fsolve giving the method for solving a numerical equation. - See also: 1/ fsolve + See also: 1/ fsolve Ex1: fsolve(cos(x)=x,x,0..1,bisection_solver) Ex2: fsolve(cos(x)=x,x,0..1,brent_solver) Ex3: fsolve(cos(x)=x,x,0..1,falsepos_solver) Ex4: fsolve(cos(x)=x,x,0,newton_solver) Ex5: fsolve(cos(x)=x,x,0,secant_solver) Ex6: fsolve(cos(x)=x,x,0,steffenson_solver) - + ''' return GiacMethods['bisection_solver'](self,*args) @@ -1763,9 +1763,9 @@ cdef class GiacMethods_base: Help for bisector: bisector((Pnt(A) or Cplx),(Pnt(B) or Cplx),(Pnt(C) or Cplx)) Draws the bisector of the angle (AB,AC) given by 3 points A,B,C. - See also: 1/ angle 2/ exbisector + See also: 1/ angle 2/ exbisector Ex1:bisector(0,1,i) - + ''' return GiacMethods['bisector'](self,*args) @@ -1774,9 +1774,9 @@ cdef class GiacMethods_base: Help for bit_depth: bit_depth(Lst(clip)) Returns the bit depth of an audio clip. - See also: 1/ channels 2/ channel_data 3/ duration 4/ samplerate + See also: 1/ channels 2/ channel_data 3/ duration 4/ samplerate Ex1:bit_depth(readwav("/some/file")) - + ''' return GiacMethods['bit_depth'](self,*args) @@ -1785,9 +1785,9 @@ cdef class GiacMethods_base: Help for bitand: bitand(Intg,Intg) Logical bit and. - See also: 1/ bitxor 2/ bitor + See also: 1/ bitxor 2/ bitor Ex1:bitand(0x12,0x38) - + ''' return GiacMethods['bitand'](self,*args) @@ -1796,9 +1796,9 @@ cdef class GiacMethods_base: Help for bitor: bitor(Intg,Intg) Inclusive logical bit or. - See also: 1/ bitxor 2/ bitand + See also: 1/ bitxor 2/ bitand Ex1:bitor(0x12,0x38) - + ''' return GiacMethods['bitor'](self,*args) @@ -1807,9 +1807,9 @@ cdef class GiacMethods_base: Help for bitxor: bitxor(Intg,Intg) Exclusive logical bit or. - See also: 1/ bitor 2/ bitand + See also: 1/ bitor 2/ bitand Ex1:bitxor(0x12,0x38) - + ''' return GiacMethods['bitxor'](self,*args) @@ -1818,9 +1818,9 @@ cdef class GiacMethods_base: Help for blackman_harris_window: blackman_harris_window(Lst,[Interval(n1..n2)]) Applies the Blackman-Harris windowing function to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ bartlett_hann_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window + See also: 1/ bartlett_hann_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window Ex1: scatterplot(blackman_harris_window(randvector(1000,0..1))) - + ''' return GiacMethods['blackman_harris_window'](self,*args) @@ -1829,9 +1829,9 @@ cdef class GiacMethods_base: Help for blackman_window: blackman_window(Lst,[Real(a)],[Interval(n1..n2)]) Applies the Blackman windowing function with parameter a (by default a=0.16) to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ bartlett_harris_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window + See also: 1/ blackman_harris_window 2/ bartlett_harris_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window Ex1: scatterplot(blackman_window(randvector(1000,0..1))) - + ''' return GiacMethods['blackman_window'](self,*args) @@ -1840,10 +1840,10 @@ cdef class GiacMethods_base: Help for blockmatrix: blockmatrix(Intg(n),Intg(m),Lst) Returns the matrix obtained from the list divided into n lists of dimension m. - See also: 1/ list2mat + See also: 1/ list2mat Ex1:blockmatrix(2,3,[idn(2),idn(2),idn(2),idn(2),idn(2),idn(2)]) Ex2:blockmatrix(2,2,[idn(2),newMat(2,3),newMat(3,2),idn(3)]) - + ''' return GiacMethods['blockmatrix'](self,*args) @@ -1852,9 +1852,9 @@ cdef class GiacMethods_base: Help for bohman_window: bohman_window(Lst,[Interval(n1..n2)]) Applies the Bohman windowing function to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ blackman_window 3/ bartlett_hann_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window + See also: 1/ blackman_harris_window 2/ blackman_window 3/ bartlett_hann_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window Ex1: scatterplot(bohman_window(randvector(1000,0..1))) - + ''' return GiacMethods['bohman_window'](self,*args) @@ -1863,10 +1863,10 @@ cdef class GiacMethods_base: Help for border: border(Mtrx(A),Lst(b)) Returns the matrix obtained by augmenting A with b as the last column, if nrows(A)=size(b), border(A,b)=tran(append(tran(A),b)). - See also: 1/ tran 2/ append 3/ augment + See also: 1/ tran 2/ append 3/ augment Ex1:border([[1,2,3,4],[4,5,6,8],[7,8,9,10]],[1,3,5]) Ex2:border([[1,2,3],[4,5,6],[7,8,9]],[1,0,1]) - + ''' return GiacMethods['border'](self,*args) @@ -1875,9 +1875,9 @@ cdef class GiacMethods_base: Help for boxcar: boxcar(Real(a),Real(b),Expr(x)) Returns the value at x of the boxcar function corresponding to a and b. - See also: 1/ rect 2/ Heaviside + See also: 1/ rect 2/ Heaviside Ex1:boxcar(1,2,x) - + ''' return GiacMethods['boxcar'](self,*args) @@ -1886,12 +1886,12 @@ cdef class GiacMethods_base: Help for boxwhisker: boxwhisker(Lst,[Lst],[x=a..b||y=a..b]) Box and Whisker plot for a statistical series. - See also: 1/ quartiles + See also: 1/ quartiles Ex1:boxwhisker([-1,1,2,2.2,3,4,-2,5]) Ex2:boxwhisker([1,2,3,5,10,4],x=1..2) Ex3:boxwhisker([1,2,3,5,10,4],[1,2,3,1,2,3]) Ex4:boxwhisker([[6,0,1,3,4,2,5],[0,1,3,4,2,5,6],[1,3,4,2,5,6,0],[3,4,2,5,6,0,1],[4,2,5,6,0,1,3],[2,5,6,0,1,3,4]]) - + ''' return GiacMethods['boxwhisker'](self,*args) @@ -1900,14 +1900,14 @@ cdef class GiacMethods_base: Help for brent_solver: brent_solver(Opt) Argument for fsolve giving the method for solving a numerical equation. - See also: 1/ fsolve + See also: 1/ fsolve Ex1: fsolve(cos(x)=x,x,0..1,bisection_solver) Ex2: fsolve(cos(x)=x,x,0..1,brent_solver) Ex3: fsolve(cos(x)=x,x,0..1,falsepos_solver) Ex4: fsolve(cos(x)=x,x,0,newton_solver) Ex5: fsolve(cos(x)=x,x,0,secant_solver) Ex6: fsolve(cos(x)=x,x,0,steffenson_solver) - + ''' return GiacMethods['brent_solver'](self,*args) @@ -1916,10 +1916,10 @@ cdef class GiacMethods_base: Help for bvpsolve: bvpsolve(Expr(f(x,y,y')),Lst(x=a..b,y),Lst(y(a),y(b),[y'(1)]),[options]) Returns an approximation of the function y (and optionally of y') on the interval a..b. - See also: 1/ odesolve + See also: 1/ odesolve Ex1:bvpsolve((32+2x^3-y*diff(y(x),x))/8,[x=1..3,y],[17,43/3],20) Ex2:bvpsolve((x^2*diff(y(x),x)^2-9y^2+4x^6)/x^5,[x=1..2,y],[0,ln(256),1],10,output=spline) - + ''' return GiacMethods['bvpsolve'](self,*args) @@ -1928,11 +1928,11 @@ cdef class GiacMethods_base: Help for cFactor: cFactor(Expr) Factorization of the expression in ℂ (on the Gaussian integers if there are more than 2 variables). - See also: 1/ factor + See also: 1/ factor Ex1:cFactor(x^2*y+y) Ex2:cFactor(x^2*y^2+y^2+4*x^2+4) Ex3:cFactor(x^2*y^2+y^2+2*x^2+2) - + ''' return GiacMethods['cFactor'](self,*args) @@ -1941,12 +1941,12 @@ cdef class GiacMethods_base: Help for cSolve: cSolve(LstEq,LstVar) Returns the list of complex solutions of an equation or a matrix where the rows are ℂ-solutions of a system of polynomial equations. - See also: 1/ cZeros 2/ solve 3/ fslove + See also: 1/ cZeros 2/ solve 3/ fslove Ex1:cSolve(x^4-1,x) Ex2:cSolve(x^4-y^4 and x+y=2,[x,y]) Ex3:cSolve(x^4-y^4 and x+y=0 and x^2=2*x,[x,y]) Ex4:cSolve(u*v-u=v and v^2=u,[u,v]) - + ''' return GiacMethods['cSolve'](self,*args) @@ -1955,10 +1955,10 @@ cdef class GiacMethods_base: Help for cZeros: cZeros(Expr(Xpr)||LstExpr, [Var||LstVar]) Returns the list of complex solutions of Xpr=0 or the matrix where the rows are the solutions of the system : Xpr1=0,Xpr2=0... - See also: 1/ solve + See also: 1/ solve Ex1:cZeros(x^2-1) Ex2:cZeros([x^2-1,x^2-y^2],[x,y]) - + ''' return GiacMethods['cZeros'](self,*args) @@ -1967,11 +1967,11 @@ cdef class GiacMethods_base: Help for camembert: camembert(Mtrx) Draws pie chart of a one variable statistical series. - See also: 1/ bar_plot + See also: 1/ bar_plot Ex1:camembert([["France",6],["Allemagne",12],["Suisse",5]]) Ex2:camembert([3/2,2/3,5/4,4/5,7/6,6/7,9/8,8/9,11/10]) Ex3:camembert([[2,"xyz","abc"],["A",2,5],["B",5,6],["C",7,7]]) - + ''' return GiacMethods['camembert'](self,*args) @@ -1980,10 +1980,10 @@ cdef class GiacMethods_base: Help for canonical_form: canonical_form(Trinom(a*x^2+b*x+c),[Var]) Canonical_form of a 2nd degree polynomial. - See also: 1/ + See also: 1/ Ex1:canonical_form(2*x^2-12*x+1) Ex2:canonical_form(2*a^2-12*a+1,a) - + ''' return GiacMethods['canonical_form'](self,*args) @@ -1992,9 +1992,9 @@ cdef class GiacMethods_base: Help for canonical_labeling: canonical_labeling(Graph(G)) Returns the permutation representing the canonical labeling of G. - See also: 1/ isomorphic_copy 2/ relabel_vertices + See also: 1/ isomorphic_copy 2/ relabel_vertices Ex1:canonical_labeling(graph("petersen")) - + ''' return GiacMethods['canonical_labeling'](self,*args) @@ -2003,9 +2003,9 @@ cdef class GiacMethods_base: Help for cartesian_product: cartesian_product(Seq(G1,G2,..)) Returns the Cartesian product of graphs G1, G2, ... with vertices labelled as "u:v:..." where u, v, ... are vertices from G1, G2, ..., respectively. - See also: 1/ tensor_product + See also: 1/ tensor_product Ex1:cartesian_product(graph(trail(1,2,3,4,5,2)),star_graph(3)) - + ''' return GiacMethods['cartesian_product'](self,*args) @@ -2014,9 +2014,9 @@ cdef class GiacMethods_base: Help for cauchy: cauchy(Real(x0),Real(a),Real(x)) Returns the density of probability at x of the Cauchy law with parameters x0 and a (by default x0=0 and a=1). - See also: 1/ cauchy_cdf 2/ cauchy_icdf + See also: 1/ cauchy_cdf 2/ cauchy_icdf Ex1:cauchy(0.0,2.0,1.0) - + ''' return GiacMethods['cauchy'](self,*args) @@ -2025,10 +2025,10 @@ cdef class GiacMethods_base: Help for cauchy_cdf: cauchy_cdf(Real(x0),Real(a),Real(x),[Real(y)]) Returns the probability that a Cauchy random variable is less than x. - See also: 1/ cauchyd 2/ cauchy_icdf + See also: 1/ cauchyd 2/ cauchy_icdf Ex1:cauchy_cdf(0.0,2.0,2.1) Ex2:cauchy_cdf(2,3,-1.9,1.4) - + ''' return GiacMethods['cauchy_cdf'](self,*args) @@ -2037,9 +2037,9 @@ cdef class GiacMethods_base: Help for cauchy_icdf: cauchy_icdf(Real(x0),Real(a),Real(p)) Returns h such that the probability that a Cauchy random variable is less than h is p (0<=p<=1). - See also: 1/ cauchy_cdf 2/ cauchy + See also: 1/ cauchy_cdf 2/ cauchy Ex1:cauchy_icdf(0.0,2.0,0.95) - + ''' return GiacMethods['cauchy_icdf'](self,*args) @@ -2048,9 +2048,9 @@ cdef class GiacMethods_base: Help for cauchyd: cauchyd(Real(x0),Real(a),Real(x)) Returns the density of probability at x of the Cauchy law with parameters x0 and a (by default x0=0 and a=1). - See also: 1/ cauchy_cdf 2/ cauchy_icdf + See also: 1/ cauchy_cdf 2/ cauchy_icdf Ex1:cauchyd(0.0,2.0,1.0) - + ''' return GiacMethods['cauchyd'](self,*args) @@ -2059,10 +2059,10 @@ cdef class GiacMethods_base: Help for cauchyd_cdf: cauchyd_cdf(Real(x0),Real(a),Real(x),[Real(y)]) Returns the probability that a Cauchy random variable is less than x. - See also: 1/ cauchyd 2/ cauchy_icdf + See also: 1/ cauchyd 2/ cauchy_icdf Ex1:cauchyd_cdf(0.0,2.0,2.1) Ex2:cauchyd_cdf(2,3,-1.9,1.4) - + ''' return GiacMethods['cauchyd_cdf'](self,*args) @@ -2071,9 +2071,9 @@ cdef class GiacMethods_base: Help for cauchyd_icdf: cauchyd_icdf(Real(x0),Real(a),Real(p)) Returns h such that the probability that a Cauchy random variable is less than h is p (0<=p<=1). - See also: 1/ cauchy_cdf 2/ cauchy + See also: 1/ cauchy_cdf 2/ cauchy Ex1:cauchyd_icdf(0.0,2.0,0.95) - + ''' return GiacMethods['cauchyd_icdf'](self,*args) @@ -2082,12 +2082,12 @@ cdef class GiacMethods_base: Help for cdf: cdf(Func,FuncParams) Cumulative distribution function. - See also: 1/ icdf 2/ binomial_cdf 3/ normald_cdf 4/ plotcdf + See also: 1/ icdf 2/ binomial_cdf 3/ normald_cdf 4/ plotcdf Ex1:cdf(binomial,10,0.5,4) Ex2:cdf(normald,0.0,1.0,2.0) Ex3:cdf([1,3,4,3,5,6],4) Ex4:cdf([1,3,4,3,5,6],plot) - + ''' return GiacMethods['cdf'](self,*args) @@ -2096,10 +2096,10 @@ cdef class GiacMethods_base: Help for ceil: ceil(Real or Cplx) Returns the smallest integer >= to the argument. - See also: 1/ floor 2/ round + See also: 1/ floor 2/ round Ex1:ceil(-4.2) Ex2:ceil(4.3+2.4*i) - + ''' return GiacMethods['ceil'](self,*args) @@ -2108,10 +2108,10 @@ cdef class GiacMethods_base: Help for ceiling: ceiling(Real or Cplx) Returns the smallest integer >= to the argument. - See also: 1/ floor 2/ round + See also: 1/ floor 2/ round Ex1:ceiling(-4.2) Ex2:ceiling(4.3+2.4*i) - + ''' return GiacMethods['ceiling'](self,*args) @@ -2120,10 +2120,10 @@ cdef class GiacMethods_base: Help for center: center(Crcle) Shows the center of a circle. - See also: 1/ circle 2/ radius + See also: 1/ circle 2/ radius Ex1:center(circle(1+i,2)) Ex2:center(circumcircle(0,1,1+i)) - + ''' return GiacMethods['center'](self,*args) @@ -2132,10 +2132,10 @@ cdef class GiacMethods_base: Help for center2interval: center2interval(LstVal(l),[Real(a0)]) Returns the list of intervals beginning with a0 and with l as centers. - See also: 1/ interval2center + See also: 1/ interval2center Ex1:center2interval([2,5,9],1) Ex2:center2interval([2,5,8]) - + ''' return GiacMethods['center2interval'](self,*args) @@ -2144,10 +2144,10 @@ cdef class GiacMethods_base: Help for centered_cube: centered_cube(Pnt(A),Pnt(B),Pnt(C)) Draws the direct cube with center A, vertex B and such that the plane ABC contains an axis of symmetry of the cube. - See also: 1/ parallelepiped 2/ cube 3/ icosahedron 4/ dodecahedron 5/ octahedron 6/ centered_tetrahedron + See also: 1/ parallelepiped 2/ cube 3/ icosahedron 4/ dodecahedron 5/ octahedron 6/ centered_tetrahedron Ex1:centered_cube([0,0,0],[3,0,0],[0,0,1]) Ex2:centered_cube(evalf([0,0,0],[3,2,4],[1,1,0])) - + ''' return GiacMethods['centered_cube'](self,*args) @@ -2156,10 +2156,10 @@ cdef class GiacMethods_base: Help for centered_tetrahedron: centered_tetrahedron(Pnt(A),Pnt(B),Pnt(C)) Draws the regular direct pyramid with center A, vertex B and a vertex in the plane (A,B,C). - See also: 1/ cube 2/ tetrahedron 3/ icosahedron 4/ dodecahedron 5/ octahedron + See also: 1/ cube 2/ tetrahedron 3/ icosahedron 4/ dodecahedron 5/ octahedron Ex1:centered_tetrahedron([0,0,0],[3,0,0],[0,1,0]) Ex2:centered_tetrahedron(evalf([0,0,0],[3,2,4],[1,1,0])) - + ''' return GiacMethods['centered_tetrahedron'](self,*args) @@ -2168,11 +2168,11 @@ cdef class GiacMethods_base: Help for cfactor: cfactor(Expr) Factorization of the expression in ℂ (on the Gaussian integers if there are more than 2 variables). - See also: 1/ factor + See also: 1/ factor Ex1:cfactor(x^2*y+y) Ex2:cfactor(x^2*y^2+y^2+4*x^2+4) Ex3:cfactor(x^2*y^2+y^2+2*x^2+2) - + ''' return GiacMethods['cfactor'](self,*args) @@ -2181,10 +2181,10 @@ cdef class GiacMethods_base: Help for cfsolve: cfsolve(Expr,Var,[Guess or Interval],[Method]) Numerical solution of an equation or a system of equations on ℂ. - See also: 1/ fsolve 2/ nSolve 3/ csolve 4/ solve + See also: 1/ fsolve 2/ nSolve 3/ csolve 4/ solve Ex1:cfsolve(cos(x)=2) Ex2:cfsolve([x^2+y+2,x+y^2+2],[x,y]) - + ''' return GiacMethods['cfsolve'](self,*args) @@ -2193,10 +2193,10 @@ cdef class GiacMethods_base: Help for changebase: changebase(Mtrx(A),Mtrx(P)) Returns the matrix B=inv(P)*A*P. - See also: 1/ + See also: 1/ Ex1:changebase([[1,2],[1,3]],[[1,1],[0,1]]) Ex2:changebase([[1,2],[1,3]],[[1,0],[1,1]]) - + ''' return GiacMethods['changebase'](self,*args) @@ -2205,12 +2205,12 @@ cdef class GiacMethods_base: Help for channel_data: channel_data(Lst(clip),[Intg(chn) or matrix],[range=a..b]) Extracts the data from an audio clip (optionally specifying the channel and range). - See also: 1/ bit_depth 2/ channels 3/ duration 4/ samplerate + See also: 1/ bit_depth 2/ channels 3/ duration 4/ samplerate Ex1:channel_data(readwav("/some/file")) Ex2:channel_data(readwav("/some/file"),matrix) Ex3:channel_data(readwav("/some/file"),2) Ex4:channel_data(readwav("/some/file"),matrix,range=1.0..2.5) - + ''' return GiacMethods['channel_data'](self,*args) @@ -2219,9 +2219,9 @@ cdef class GiacMethods_base: Help for channels: channels(Lst(clip)) Returns the number of channels in audio clip. - See also: 1/ bit_depth 2/ channel_data 3/ duration 4/ samplerate + See also: 1/ bit_depth 2/ channel_data 3/ duration 4/ samplerate Ex1:channels(readwav("/some/file")) - + ''' return GiacMethods['channels'](self,*args) @@ -2230,10 +2230,10 @@ cdef class GiacMethods_base: Help for char: char(Intg or Lst(Intg)) Returns the string corresponding to the character code of the argument. - See also: 1/ asc 2/ ord + See also: 1/ asc 2/ ord Ex1:char(65) Ex2:char([65,66,67]) - + ''' return GiacMethods['char'](self,*args) @@ -2242,12 +2242,12 @@ cdef class GiacMethods_base: Help for charpoly: charpoly(Mtrx,[Var]) List of the coefficients of the characteristic polynomial of a matrix or characteristic polynomial of a matrix with the second argument as variable. - See also: 1/ jordan 2/ egv 3/ egvl 4/ companion 5/ rat_jordan 6/ pmin 7/ adjoint_matrix + See also: 1/ jordan 2/ egv 3/ egvl 4/ companion 5/ rat_jordan 6/ pmin 7/ adjoint_matrix Ex1:charpoly([[1,2],[3,4]]) Ex2:charpoly([[1,2],[3,4]],x) Ex3:charpoly([[1,2,3],[1,3,6],[2,5,7]]) Ex4:charpoly([[1,2,3],[1,3,6],[2,5,7]],z) - + ''' return GiacMethods['charpoly'](self,*args) @@ -2256,10 +2256,10 @@ cdef class GiacMethods_base: Help for chinrem: chinrem([Lst||Expr,Lst||Expr],[Lst||Expr,Lst||Expr]) Chinese remainder for polynomials written as lists or no. - See also: 1/ ichinrem + See also: 1/ ichinrem Ex1:chinrem([x+2,x^2+1],[x+1,x^2+x+1]) Ex2:chinrem([[1,2],[1,0,1]],[[1,1],[1,1,1]]) - + ''' return GiacMethods['chinrem'](self,*args) @@ -2268,12 +2268,12 @@ cdef class GiacMethods_base: Help for chisquare: chisquare(Intg(n),Real(x0)) Returns the probability density of the Chi^2 law at x0 (n is the number of degrees of freedom). - See also: 1/ chisquare_cdf 2/ chisquare_icdf 3/ randvector 4/ ranm + See also: 1/ chisquare_cdf 2/ chisquare_icdf 3/ randvector 4/ ranm Ex1:chisquare(2,3.2) Ex2:chisquare(4,10.5) Ex3: randvector(3,chisquare,2) Ex4: ranm(4,3,chisquare,2) - + ''' return GiacMethods['chisquare'](self,*args) @@ -2282,10 +2282,10 @@ cdef class GiacMethods_base: Help for chisquare_cdf: chisquare_cdf(Intg(n),Real(x0)) Returns the probability that a Chi^2 random variable is less than x0 (n is the number of degrees of freedom). - See also: 1/ UTPC 2/ chisquare_icdf 3/ chisquared + See also: 1/ UTPC 2/ chisquare_icdf 3/ chisquared Ex1:chisquare_cdf(2,6.1) Ex2:chisquare_cdf(4,6.1) - + ''' return GiacMethods['chisquare_cdf'](self,*args) @@ -2294,10 +2294,10 @@ cdef class GiacMethods_base: Help for chisquare_icdf: chisquare_icdf(Intg(n),Real(p)) Returns h such as the probability that a Chi^2 random variable is less than h is p (n is the number of degrees of freedom and 0<=p<=1). - See also: 1/ chisquare_cdf 2/ chisquared + See also: 1/ chisquare_cdf 2/ chisquared Ex1:chisquare_icdf(2,0.95) Ex2:chisquare_icdf(4,0.05) - + ''' return GiacMethods['chisquare_icdf'](self,*args) @@ -2306,12 +2306,12 @@ cdef class GiacMethods_base: Help for chisquared: chisquared(Intg(n),Real(x0)) Returns the probability density of the Chi^2 law at x0 (n is the number of degrees of freedom). - See also: 1/ chisquare_cdf 2/ chisquare_icdf 3/ randvector 4/ ranm + See also: 1/ chisquare_cdf 2/ chisquare_icdf 3/ randvector 4/ ranm Ex1:chisquared(2,3.2) Ex2:chisquared(4,10.5) Ex3: randvector(3,chisquare,2) Ex4: ranm(4,3,chisquare,2) - + ''' return GiacMethods['chisquared'](self,*args) @@ -2320,10 +2320,10 @@ cdef class GiacMethods_base: Help for chisquared_cdf: chisquared_cdf(Intg(n),Real(x0)) Returns the probability that a Chi^2 random variable is less than x0 (n is the number of degrees of freedom). - See also: 1/ UTPC 2/ chisquare_icdf 3/ chisquared + See also: 1/ UTPC 2/ chisquare_icdf 3/ chisquared Ex1:chisquared_cdf(2,6.1) Ex2:chisquared_cdf(4,6.1) - + ''' return GiacMethods['chisquared_cdf'](self,*args) @@ -2332,10 +2332,10 @@ cdef class GiacMethods_base: Help for chisquared_icdf: chisquared_icdf(Intg(n),Real(p)) Returns h such as the probability that a Chi^2 random variable is less than h is p (n is the number of degrees of freedom and 0<=p<=1). - See also: 1/ chisquare_cdf 2/ chisquared + See also: 1/ chisquare_cdf 2/ chisquared Ex1:chisquared_icdf(2,0.95) Ex2:chisquared_icdf(4,0.05) - + ''' return GiacMethods['chisquared_icdf'](self,*args) @@ -2344,7 +2344,7 @@ cdef class GiacMethods_base: Help for chisquaret: chisquaret(Data,[Func],[FuncParams]) Chi^2 test : fitness between 2 (or n) samples or between 1 sample and a distribution law (multinomial or given by a law). - See also: 1/ normalt 2/ studentt 3/ kolmogorovt + See also: 1/ normalt 2/ studentt 3/ kolmogorovt Ex1:chisquaret([57,54]) Ex2:chisquaret([1,1,1,1,1,0,0,1,0,0,1,1,1,0,1,1,0,1,1,0,0,0,0],[.4,.6]) Ex3:chisquaret([57,30],[.6,.4]) @@ -2354,7 +2354,7 @@ cdef class GiacMethods_base: Ex7:chisquaret(ranv(1000,normald,0,.2),normald) Ex8:chisquaret([11,16,17,22,14,10],[1/6,1/6,1/6,1/6,1/6,1/6]) Ex9:chisquaret([11,16,17,22,14,10],[(1/6)$6]) - + ''' return GiacMethods['chisquaret'](self,*args) @@ -2363,12 +2363,12 @@ cdef class GiacMethods_base: Help for choice: choice(Lst(L)) choice(L)=rand(L)=one extracted element of L. - See also: 1/ rand 2/ sample + See also: 1/ rand 2/ sample Ex1:choice([1,2,3,4,5,6]) Ex2:choice(["r","r","r","b","n"]) Ex3: L:=[1,2,3,4,5,6];L:=choice(L) Ex4: L:=[1,2,3,4,5,6];L.choice() - + ''' return GiacMethods['choice'](self,*args) @@ -2377,9 +2377,9 @@ cdef class GiacMethods_base: Help for cholesky: cholesky(Mtrx) For a numerical symmetric matrix A, returns L matrix such that A=L*tran(L). - See also: 1/ lu 2/ qr 3/ gauss + See also: 1/ lu 2/ qr 3/ gauss Ex1:cholesky([[3,1],[1,4]]) - + ''' return GiacMethods['cholesky'](self,*args) @@ -2388,10 +2388,10 @@ cdef class GiacMethods_base: Help for chr: chr(Intg or Lst(Intg)) Returns the string corresponding to the character code of the argument. - See also: 1/ asc 2/ ord + See also: 1/ asc 2/ ord Ex1:chr(65) Ex2:chr([65,66,67]) - + ''' return GiacMethods['chr'](self,*args) @@ -2400,13 +2400,13 @@ cdef class GiacMethods_base: Help for chrem: chrem(LstIntg(a,b,c....),LstIntg(p,q,r,....)) Chinese remainders for integers or for polynomials. - See also: 1/ gcd 2/ fracmod 3/ chinrem 4/ ichinrem + See also: 1/ gcd 2/ fracmod 3/ chinrem 4/ ichinrem Ex1:chrem(symbolique.) Ex2:chrem([2,3],[7,5]) Ex3:chrem([2,4,6],[3,5,7]) Ex4:chrem([2,4,6,7],[3,5,7,11]) Ex5:chrem([2*x+1,4*x+2,6*x-1,x+1],[3,5,7,11]) - + ''' return GiacMethods['chrem'](self,*args) @@ -2415,10 +2415,10 @@ cdef class GiacMethods_base: Help for chromatic_index: chromatic_index(Graph(G),[Lst(cols)]) Returns the number of colors in the minimal edge coloring of G. If an unassigned identifier cols is given, the coloring is stored to it. - See also: 1/ minimal_edge_coloring 2/ chromatic_number + See also: 1/ minimal_edge_coloring 2/ chromatic_number Ex1:chromatic_index(graph("petersen")) Ex2:chromatic_index(graph("dodecahedron"),colors) - + ''' return GiacMethods['chromatic_index'](self,*args) @@ -2428,7 +2428,7 @@ cdef class GiacMethods_base: chromatic_number(Graph(G)) Returns the chromatic number of G. Ex1:chromatic_number(graph("petersen")) - + ''' return GiacMethods['chromatic_number'](self,*args) @@ -2437,10 +2437,10 @@ cdef class GiacMethods_base: Help for chromatic_polynomial: chromatic_polynomial(Graph(G),[Var(t)]) Returns the chromatic polynomial [or its value at point t] of undirected unweighted graph G. - See also: 1/ flow_polynomial 2/ reliability_polynomial 3/ tutte_polynomial + See also: 1/ flow_polynomial 2/ reliability_polynomial 3/ tutte_polynomial Ex1:chromatic_polynomial(graph("petersen")) Ex2:chromatic_polynomial(graph("petersen"),3) - + ''' return GiacMethods['chromatic_polynomial'](self,*args) @@ -2449,7 +2449,7 @@ cdef class GiacMethods_base: Help for circle: circle((Pnt(M) or Cplx(M),(Pnt(N) or Cplx(zN)),[Real(a)],[Real(b)],[Var(A)],[Var(B)]) Define for 2-d a circle with a diameter MN (arg1=M or zM,arg2=N) or with center and radius (arg1=M or zM,arg2=zN) and (center=M and radius=abs(zN)) [or the arc AB, A angle a, B angle b, (MN=angle 0) or M(M+zN)=angle 0] or by its equation and for 3-d with a diameter and a third point. - See also: 1/ circumcircle 2/ incircle 3/ excircle 4/ center 5/ radius 6/ sphere 7/ Circle + See also: 1/ circumcircle 2/ incircle 3/ excircle 4/ center 5/ radius 6/ sphere 7/ Circle Ex1:circle(0,point(2*i)) Ex2:circle(i,i) Ex3:circle(i,1) @@ -2458,7 +2458,7 @@ cdef class GiacMethods_base: Ex6:circle(x^2+y^2-x-y) Ex7:circle(cercle(point([-1,0,0]),point([1,0,0]),point([0,2,0]))) Ex8:circle(cercle([-1,0,0],point([1,0,0]),[0,2,0])) - + ''' return GiacMethods['circle'](self,*args) @@ -2467,9 +2467,9 @@ cdef class GiacMethods_base: Help for circumcircle: circumcircle((Pnt or Cplx),(Pnt or Cplx),((Pnt or Cplx)) circumcircle(A,B,C)=circumcircle of the triangle ABC. - See also: 1/ circle 2/ incircle 3/ excircle + See also: 1/ circle 2/ incircle 3/ excircle Ex1:circumcircle(0,1,1+i) - + ''' return GiacMethods['circumcircle'](self,*args) @@ -2478,13 +2478,13 @@ cdef class GiacMethods_base: Help for classes: classes(Lst(l),[ClassMin],[ClassSize||Lst(Center)]) Returns the matrix [[class,number],...] obtained with class_min and class_size: see init of geo or argument 2 and 3 or with the list of centers. - See also: 1/ histogram 2/ cumulated_frequencies 3/ bar_plot 4/ frequencies + See also: 1/ histogram 2/ cumulated_frequencies 3/ bar_plot 4/ frequencies Ex1:classes([1,1.2,1.4,1.6,1.8,2,2.5]) Ex2:classes([1,1.2,1.4,1.6,1.8,2,2.5],1.2,0.5) Ex3:classes([1,1.2,1.4,1.6,1.8,2,2.5],1,[1.2,1.6,2,2.4]) Ex4:classes([1,1.2,1.4,1.6,1.8,2,2.5],1,[1.2,1.6,2.2]) Ex5:classes([0,0.5,1,1.5,2,2.5,3,3.5,4],[0..2,2..4,4..6]) - + ''' return GiacMethods['classes'](self,*args) @@ -2493,9 +2493,9 @@ cdef class GiacMethods_base: Help for clear: clear(NULL) Clears the list of pixels. - See also: 1/ set_pixel 2/ show_pixels + See also: 1/ set_pixel 2/ show_pixels Ex1:clear() - + ''' return GiacMethods['clear'](self,*args) @@ -2504,11 +2504,11 @@ cdef class GiacMethods_base: Help for clique_cover: clique_cover(Graph(G),[Intg(k)]) Returns a clique vertex cover of G [containing at most k cliques]. - See also: 1/ clique_cover_number 2/ maximal_cliques + See also: 1/ clique_cover_number 2/ maximal_cliques Ex1:clique_cover(graph("petersen")) Ex2:clique_cover(cycle_graph(5)) Ex3:clique_cover(graph_complement(complete_graph(3,4))) - + ''' return GiacMethods['clique_cover'](self,*args) @@ -2517,11 +2517,11 @@ cdef class GiacMethods_base: Help for clique_cover_number: clique_cover_number(Graph(G)) Returns the clique cover number of G. - See also: 1/ clique_cover 3/ maximal_cliques + See also: 1/ clique_cover 3/ maximal_cliques Ex1:clique_cover_number(graph("petersen")) Ex2:clique_cover_number(cycle_graph(5)) Ex3:clique_cover_number(graph_complement(complete_graph(3,4))) - + ''' return GiacMethods['clique_cover_number'](self,*args) @@ -2530,9 +2530,9 @@ cdef class GiacMethods_base: Help for clique_number: clique_number(Graph(G)) Returns the clique number of G, which is equal to the size of a maximum clique in G. - See also: 1/ maximum_clique + See also: 1/ maximum_clique Ex1:clique_number(graph_complement(complete_graph(3,4))) - + ''' return GiacMethods['clique_number'](self,*args) @@ -2541,11 +2541,11 @@ cdef class GiacMethods_base: Help for clique_stats: clique_stats(Graph(G),[Intg(k)||Intrv(m..n)]) Returns the list of numbers of maximal cliques of size s in G for each s. If parameter k is given, the number of k-cliques is returned. If an interval m..n is given, only cliques with size between m and n (inclusive) are counted (m also may be +infinity). - See also: 1/ maximum_clique 2/ clique_cover + See also: 1/ maximum_clique 2/ clique_cover Ex1:clique_stats(random_graph(50,0.5)) Ex2:clique_stats(random_graph(50,0.5),5) Ex3:clique_stats(random_graph(50,0.5),3..5) - + ''' return GiacMethods['clique_stats'](self,*args) @@ -2554,10 +2554,10 @@ cdef class GiacMethods_base: Help for clustering_coefficient: clustering_coefficient(Graph(G),[Vrtx(v)]) Returns the average clustering coefficient of undirected graph G, or the local clustering coefficient of the vertex v in G. - See also: 1/ network_transitivity 2/ number_of_triangles + See also: 1/ network_transitivity 2/ number_of_triangles Ex1:clustering_coefficient(graph(%{[1,2],[2,3],[2,4],[3,4],[4,1]%})) Ex2:clustering_coefficient(graph(%{[1,2],[2,3],[2,4],[3,4],[4,1]%}),2) - + ''' return GiacMethods['clustering_coefficient'](self,*args) @@ -2566,11 +2566,11 @@ cdef class GiacMethods_base: Help for coeff: coeff(Expr(P),[Var]) Returns the list of coefficients of a polynomial with respect to the 2nd argument or the coefficient of degree the 3rd argument. - See also: 1/ pcoeff 2/ fcoeff + See also: 1/ pcoeff 2/ fcoeff Ex1:coeff(x*3+2) Ex2:coeff(5*y^2-3,y) Ex3:coeff(5*y^2-3,y,2) - + ''' return GiacMethods['coeff'](self,*args) @@ -2579,11 +2579,11 @@ cdef class GiacMethods_base: Help for coeffs: coeffs(Expr(P),[Var]) Returns the list of coefficients of a polynomial with respect to the 2nd argument or the coefficient of degree the 3rd argument. - See also: 1/ pcoeff 2/ fcoeff + See also: 1/ pcoeff 2/ fcoeff Ex1:coeffs(x*3+2) Ex2:coeffs(5*y^2-3,y) Ex3:coeffs(5*y^2-3,y,2) - + ''' return GiacMethods['coeffs'](self,*args) @@ -2592,11 +2592,11 @@ cdef class GiacMethods_base: Help for col: col(Mtrx(A),Intg(n)||Interval(n1..n2)) Returns column n or the sequence of the columns n1..n2 of the matrix A, or optional argument of count,count_eq,count_inf,count_sup. - See also: 1/ row 2/ count 3/ count_eq 4/ count_inf 5/ count_sup + See also: 1/ row 2/ count 3/ count_eq 4/ count_inf 5/ count_sup Ex1:col([[1,2,3],[4,5,6],[7,8,9]],1) Ex2:col([[1,2,3],[4,5,6],[7,8,9]],0..1) Ex3: count_eq(3,[[3,2,3],[4,3,2],[3,2,1]],col) - + ''' return GiacMethods['col'](self,*args) @@ -2605,10 +2605,10 @@ cdef class GiacMethods_base: Help for colDim: colDim(Mtrx) Number of columns of a matrix. - See also: 1/ rowdim + See also: 1/ rowdim Ex1:colDim([[1,2,3],[4,5,6]]) Ex2:colDim([[1,2],[3,4],[5,6]]) - + ''' return GiacMethods['colDim'](self,*args) @@ -2617,10 +2617,10 @@ cdef class GiacMethods_base: Help for colNorm: colNorm(Vect or Mtrx) Returns the max of the l1_norm of the columns of a matrix: colNorm(a_{j,k})=max_k(sum_j(|a_{j,k}|)). - See also: 1/ norm + See also: 1/ norm Ex1:colNorm([[1,2],[3,-4]]) Ex2:colNorm([[1,2,3,-4],[-5,3,2,1]]) - + ''' return GiacMethods['colNorm'](self,*args) @@ -2629,9 +2629,9 @@ cdef class GiacMethods_base: Help for colSwap: colSwap(Mtrx(A),Intg(n1),Intg(n2)) Returns the matrix obtained from A by swapping the n1-th column and the n2-th column. - See also: 1/ rowSwap + See also: 1/ rowSwap Ex1:colSwap([[1,2],[3,4],[5,6]],0,1) - + ''' return GiacMethods['colSwap'](self,*args) @@ -2640,10 +2640,10 @@ cdef class GiacMethods_base: Help for coldim: coldim(Mtrx) Number of columns of a matrix. - See also: 1/ rowdim + See also: 1/ rowdim Ex1:coldim([[1,2,3],[4,5,6]]) Ex2:coldim([[1,2],[3,4],[5,6]]) - + ''' return GiacMethods['coldim'](self,*args) @@ -2652,11 +2652,11 @@ cdef class GiacMethods_base: Help for collect: collect(Poly or LstPoly) Integer factorization of a polynomial (or of a list of poly). - See also: 1/ factor 2/ factors + See also: 1/ factor 2/ factors Ex1:collect(x^2-4) Ex2:collect(x^2-2) Ex3:collect([x^2-2,x^2-4]) - + ''' return GiacMethods['collect'](self,*args) @@ -2665,10 +2665,10 @@ cdef class GiacMethods_base: Help for colnorm: colnorm(Vect or Mtrx) Returns the max of the l1_norm of the columns of a matrix: colNorm(a_{j,k})=max_k(sum_j(|a_{j,k}|)). - See also: 1/ norm + See also: 1/ norm Ex1:colnorm([[1,2],[3,-4]]) Ex2:colnorm([[1,2,3,-4],[-5,3,2,1]]) - + ''' return GiacMethods['colnorm'](self,*args) @@ -2677,7 +2677,7 @@ cdef class GiacMethods_base: Help for color: color([GeoObj or legende],Intg) Draws a geometrical object with colors black=0 red=1 green=2 yellow=3 blue=4, filled with the color in the interior of a closed curve,line_width_n (00 (by default a=1 for sine window) to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ bartlett_hann_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window + See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ bartlett_hann_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window Ex1: scatterplot(cosine_window(randvector(1000,0..1),1.5)) - + ''' return GiacMethods['cosine_window'](self,*args) @@ -3260,9 +3260,9 @@ cdef class GiacMethods_base: Help for cot: cot(Expr) Cotangent. - See also: 1/ acot 2/ tan + See also: 1/ acot 2/ tan Ex1:cot(pi/2) - + ''' return GiacMethods['cot'](self,*args) @@ -3271,10 +3271,10 @@ cdef class GiacMethods_base: Help for cote: cote(Vect) Third coordinate (z) of a 3-d point. - See also: 1/ abscissa 2/ ordinate 3/ coordinates + See also: 1/ abscissa 2/ ordinate 3/ coordinates Ex1:cote(point[1,2,3]) Ex2:cote(point(1,2,3)) - + ''' return GiacMethods['cote'](self,*args) @@ -3283,7 +3283,7 @@ cdef class GiacMethods_base: Help for count: count(Fnc(f)||LstIntg,(Lst||Mtrx)(l),[Opt(row||col)]) Returns f(l[0])+f(l[1])+...+f(l[size(l)-1]) or counts the number of occurrences if the argument is a vector of integers. - See also: 1/ count_eq 2/ count_inf 3/ count_sup + See also: 1/ count_eq 2/ count_inf 3/ count_sup Ex1:count(id,[-2/5,-1,0,1,2,3/5]) Ex2:count(1,[-2,-1,0,1,2,3]) Ex3:count([1,3,1,1,2,10,3]) @@ -3294,7 +3294,7 @@ cdef class GiacMethods_base: Ex8:count((x)->x>2,[[3,5/2],[4,1]],col) Ex9:count((x)->x>2 && x<4,[[3,9/2],[4,1]]) Ex10:count((x)->x<2 || x>4,[[3,9/2],[4,1]]) - + ''' return GiacMethods['count'](self,*args) @@ -3303,12 +3303,12 @@ cdef class GiacMethods_base: Help for count_eq: count_eq(Real(a),(Lst||Mtrx)(L),[Opt(row||col)]) Returns the number of elements of L equal to a. - See also: 1/ count 2/ count_inf 3/ count_sup + See also: 1/ count 2/ count_inf 3/ count_sup Ex1:count_eq(1,[-2,1,0,1,2,-3]) Ex2:count_eq(4,[[3,4],[4,1]]) Ex3:count_eq(4,[[3,4],[4,1]],row) Ex4:count_eq(4,[[3,4],[4,1]],col) - + ''' return GiacMethods['count_eq'](self,*args) @@ -3317,12 +3317,12 @@ cdef class GiacMethods_base: Help for count_inf: count_inf(Real(a),(Lst||Mtrx)(L),[Opt(row||col)]) Returns the number of elements of L strictly less than a. - See also: 1/ count 2/ count_eq 3/ count_sup + See also: 1/ count 2/ count_eq 3/ count_sup Ex1:count_inf(1,[-2,-1,0,1,2,3]) Ex2:count_inf(4,[[3,5],[4,1]]) Ex3:count_inf(4,[[3,5],[4,1]],row) Ex4:count_inf(4,[[3,5],[4,1]],col) - + ''' return GiacMethods['count_inf'](self,*args) @@ -3331,12 +3331,12 @@ cdef class GiacMethods_base: Help for count_sup: count_sup(Real(a),(Lst||Mtrx)(L),[Opt(row||col)]) Returns the number of elements of L strictly greater than a. - See also: 1/ count 2/ count_inf 3/ count_eq + See also: 1/ count 2/ count_inf 3/ count_eq Ex1:count_sup(1,[-2,-1,0,1,2,3]) Ex2:count_sup(3,[[3,5],[4,1]]) Ex3:count_sup(3,[[3,5],[4,1]],row) Ex4:count_sup(3,[[3,5],[4,1]],col) - + ''' return GiacMethods['count_sup'](self,*args) @@ -3345,7 +3345,7 @@ cdef class GiacMethods_base: Help for courbe_parametrique: courbe_parametrique(Cplx||Lst,Var||Lst(Var)) plotparam(a(x)+i*b(x),x=x0..x1) draws the curve X=a(x),Y=b(x) x=x0..x1 or plotparam([a(u,v),b(u,v),c(u,v)],[u=u0..u1,v=v0..v1]) draws the surface X=a(u,v),Y=b(u,v),Z=c(u,v) u=u0..u1 and v=v0..v1. - See also: 1/ plotfunc 2/ plotpolar 3/ arc + See also: 1/ plotfunc 2/ plotpolar 3/ arc Ex1:courbe_parametrique(sin(t)+i*cos(t),t) Ex2:courbe_parametrique(exp(i*t),t=0..pi/2,affichage=1) Ex3:courbe_parametrique(exp(i*t),t=0..pi/2,affichage=1+rempli) @@ -3354,7 +3354,7 @@ cdef class GiacMethods_base: Ex6:courbe_parametrique(sin(x)+i*cos(x),x=0..1,tstep=0.01) Ex7:courbe_parametrique([v*cos(u),v*sin(u),v],[u,v]) Ex8:courbe_parametrique([v*cos(u),v*sin(u),v],[u=0..pi,v=0..3],ustep=0.1,vstep=0.2) - + ''' return GiacMethods['courbe_parametrique'](self,*args) @@ -3363,10 +3363,10 @@ cdef class GiacMethods_base: Help for courbe_polaire: courbe_polaire(Expr,Var,VarMin,VarMax) plotpolar(f(x),x,a,b) draws the polar curve r=f(x) for x in [a,b]. - See also: 1/ plotparam 2/ plotfunc 3/ plotpolar + See also: 1/ plotparam 2/ plotfunc 3/ plotpolar Ex1:courbe_polaire(sin(2*x),x,0,pi) Ex2:courbe_polaire(sin(2*x),x,0,pi,tstep=0.1) - + ''' return GiacMethods['courbe_polaire'](self,*args) @@ -3375,9 +3375,9 @@ cdef class GiacMethods_base: Help for covariance: covariance(Lst||Mtrx,[Lst]) Returns the covariance of the elements of its argument. - See also: 1/ correlation 2/ covariance_correlation + See also: 1/ correlation 2/ covariance_correlation Ex1:covariance([[1,2],[1,1],[4,7]]) - + ''' return GiacMethods['covariance'](self,*args) @@ -3386,9 +3386,9 @@ cdef class GiacMethods_base: Help for covariance_correlation: covariance_correlation(Lst||Mtrx,[Lst]) Returns the list of the covariance and the correlation of the elements of its argument. - See also: 1/ covariance 2/ correlation + See also: 1/ covariance 2/ correlation Ex1:covariance_correlation([[1,2],[1,1],[4,7]]) - + ''' return GiacMethods['covariance_correlation'](self,*args) @@ -3397,11 +3397,11 @@ cdef class GiacMethods_base: Help for cpartfrac: cpartfrac(RatFrac) Performs partial fraction decomposition in ℂ of a fraction. - See also: 1/ factor 2/ normal + See also: 1/ factor 2/ normal Ex1:cpartfrac((x)/(4-x^2)) Ex2:cpartfrac((x^2-2*x+3)/(x^2-3*x+2)) Ex3:cpartfrac(a/(z*(z-b)),z) - + ''' return GiacMethods['cpartfrac'](self,*args) @@ -3410,9 +3410,9 @@ cdef class GiacMethods_base: Help for crationalroot: crationalroot(Poly(P)) Returns the list of complex rational roots of P without indicating the multiplicity. - See also: 1/ proot 2/ froot 3/ complexroot 4/ rationalroot 5/ realroot + See also: 1/ proot 2/ froot 3/ complexroot 4/ rationalroot 5/ realroot Ex1:crationalroot(2*x^3+(-5-7*i)*x^2+(-4+14*i)*x+8-4*i) - + ''' return GiacMethods['crationalroot'](self,*args) @@ -3421,12 +3421,12 @@ cdef class GiacMethods_base: Help for crayon: crayon(Color) Changes the color of the pencil (without parameter, returns the current color). - See also: 1/ leve_crayon 2/ baisse_crayon + See also: 1/ leve_crayon 2/ baisse_crayon Ex1: crayon vert Ex2:crayon(rouge) Ex3:crayon(5) Ex4:crayon(gomme) - + ''' return GiacMethods['crayon'](self,*args) @@ -3435,13 +3435,13 @@ cdef class GiacMethods_base: Help for createwav: createwav(Lst(data),[opts]) Returns an audio clip from data, optionally setting channel count, bit depth, sample rate, duration and normalization level. - See also: 1/ readwav 2/ writewav 3/ playsnd + See also: 1/ readwav 2/ writewav 3/ playsnd Ex1:createwav(duration=3.5) Ex2:createwav(sin(2*pi*440*soundsec(2)),samplerate=48000) Ex3:createwav(sin(2*pi*440*soundsec(2)),bit_depth=8) Ex4:createwav(10*sin(2*pi*440*soundsec(2)),normalize=-3) Ex5: t:=soundsec(3):;L,R:=sin(2*pi*440*t),sin(2*pi*445*t):;createwav([L,R]) - + ''' return GiacMethods['createwav'](self,*args) @@ -3450,10 +3450,10 @@ cdef class GiacMethods_base: Help for cross: cross(Vect(v1),Vect(v2)) Wedge product. - See also: 1/ dot + See also: 1/ dot Ex1:cross([1,2],[3,4]) Ex2:cross([1,2,3],[4,5,6]) - + ''' return GiacMethods['cross'](self,*args) @@ -3462,10 +3462,10 @@ cdef class GiacMethods_base: Help for crossP: crossP(Vect(v1),Vect(v2)) Wedge product. - See also: 1/ dot + See also: 1/ dot Ex1:crossP([1,2],[3,4]) Ex2:crossP([1,2,3],[4,5,6]) - + ''' return GiacMethods['crossP'](self,*args) @@ -3474,9 +3474,9 @@ cdef class GiacMethods_base: Help for cross_correlation: cross_correlation(cross_correlation(Lst(u),Lst(v))) Returns the cross_correlation of two signals u and v. - See also: 1/ auto_correlation 2/ correlation + See also: 1/ auto_correlation 2/ correlation Ex1:cross_correlation([1,2],[3,4,5]) - + ''' return GiacMethods['cross_correlation'](self,*args) @@ -3485,10 +3485,10 @@ cdef class GiacMethods_base: Help for cross_point: cross_point(Opt) Option of the display command for a point. - See also: 1/ display + See also: 1/ display Ex1: F:=display(point(2+1.5*i),point_point) Ex2: F:=display(point(2+1.5*i),rhombus_point) - + ''' return GiacMethods['cross_point'](self,*args) @@ -3497,11 +3497,11 @@ cdef class GiacMethods_base: Help for cross_ratio: cross_ratio(Pnt or Cplx(a),Pnt or Cplx(b),Pnt or Cplx(c),Pnt or Cplx(d)) Returns the complex number equal to ((c-a)/(c-b))/((d-a)/(d-b)). - See also: 1/ harmonic_conjugate 2/ is_conjugate + See also: 1/ harmonic_conjugate 2/ is_conjugate Ex1:cross_ratio(i,2+i,3/2+i,3+i) Ex2:cross_ratio(0,1+i,1,i) Ex3:cross_ratio(0,1,2,3) - + ''' return GiacMethods['cross_ratio'](self,*args) @@ -3510,10 +3510,10 @@ cdef class GiacMethods_base: Help for crossproduct: crossproduct(Vect(v1),Vect(v2)) Wedge product. - See also: 1/ dot + See also: 1/ dot Ex1:crossproduct([1,2],[3,4]) Ex2:crossproduct([1,2,3],[4,5,6]) - + ''' return GiacMethods['crossproduct'](self,*args) @@ -3522,9 +3522,9 @@ cdef class GiacMethods_base: Help for csc: csc(Expr) Cosecant: csc(x)=1/sin(x). - See also: 1/ sin 2/ acsc + See also: 1/ sin 2/ acsc Ex1:csc(pi/2) - + ''' return GiacMethods['csc'](self,*args) @@ -3533,12 +3533,12 @@ cdef class GiacMethods_base: Help for csolve: csolve(LstEq,LstVar) Returns the list of complex solutions of an equation or a matrix where the rows are ℂ-solutions of a system of polynomial equations. - See also: 1/ cZeros 2/ solve 3/ fslove + See also: 1/ cZeros 2/ solve 3/ fslove Ex1:csolve(x^4-1,x) Ex2:csolve(x^4-y^4 and x+y=2,[x,y]) Ex3:csolve(x^4-y^4 and x+y=0 and x^2=2*x,[x,y]) Ex4:csolve(u*v-u=v and v^2=u,[u,v]) - + ''' return GiacMethods['csolve'](self,*args) @@ -3547,9 +3547,9 @@ cdef class GiacMethods_base: Help for csv2gen: csv2gen(Strng(filename),Strng(sep),Strng(nl),Strng(decsep),Strng(eof),[string]) Reads a file (or string) in CSV format. - See also: 1/ read + See also: 1/ read Ex1:csv2gen("mat.txt",",",char(10),".") - + ''' return GiacMethods['csv2gen'](self,*args) @@ -3558,13 +3558,13 @@ cdef class GiacMethods_base: Help for cube: cube(Pnt(A),Pnt(B),Pnt(C)) Draws the direct cube with vertices A,B with a face in the plane (A,B,C). - See also: 1/ parallelepiped 2/ cylinder 3/ icosahedron 4/ dodecahedron 5/ octahedron 6/ tetrahedron 7/ centered_cube - Ex1:cube([0,0,0],[3,0,0],[0,0,1]) - Ex2: A,B,C:=point(1,0,0),point(1,1,0),point(0,1,0);c:=cube(A,B,C);A,B,C,D,E,F,G,H:=sommets(c); - Ex3: A,B,K:=point(1,0,0),point(1,1,0),point(0,2,0);c:=cube(A,B,C);A,B,C,D,E,F,G,H:=sommets(c); - Ex4: c:=cube([0,0,0],[1,0,0],[0,1,0]);c1,c2,c4,c3,c5,c6,c7,c8:=sommets(c); - Ex5: c:=cube([0,0,0],[0,2,0],[0,0,1]);c1,c2,c4,c3,c5,c6,c7,c8:=sommets(c); - + See also: 1/ parallelepiped 2/ cylinder 3/ icosahedron 4/ dodecahedron 5/ octahedron 6/ tetrahedron 7/ centered_cube + Ex1:cube([0,0,0],[3,0,0],[0,0,1]) + Ex2: A,B,C:=point(1,0,0),point(1,1,0),point(0,1,0);c:=cube(A,B,C);A,B,C,D,E,F,G,H:=sommets(c); + Ex3: A,B,K:=point(1,0,0),point(1,1,0),point(0,2,0);c:=cube(A,B,C);A,B,C,D,E,F,G,H:=sommets(c); + Ex4: c:=cube([0,0,0],[1,0,0],[0,1,0]);c1,c2,c4,c3,c5,c6,c7,c8:=sommets(c); + Ex5: c:=cube([0,0,0],[0,2,0],[0,0,1]);c1,c2,c4,c3,c5,c6,c7,c8:=sommets(c); + ''' return GiacMethods['cube'](self,*args) @@ -3573,11 +3573,11 @@ cdef class GiacMethods_base: Help for cumSum: cumSum(Lst(l)||Seq||Str) Returns the list (or the sequence or the string) lr where the elements are the cumulative sum of the list l: lr[k]=sum(l[j],j=0..k) (or lr=sum(l[j],j=0..k)$(k=0..size(l)-1)). - See also: 1/ sum + See also: 1/ sum Ex1:cumSum([0,1,2,3,4]) Ex2:cumSum(1.2,3,4.5,6) Ex3:cumSum("a","b","c","d") - + ''' return GiacMethods['cumSum'](self,*args) @@ -3586,11 +3586,11 @@ cdef class GiacMethods_base: Help for cumsum: cumsum(Lst(l)||Seq||Str) Returns the list (or the sequence or the string) lr where the elements are the cumulative sum of the list l: lr[k]=sum(l[j],j=0..k) (or lr=sum(l[j],j=0..k)$(k=0..size(l)-1)). - See also: 1/ sum + See also: 1/ sum Ex1:cumsum([0,1,2,3,4]) Ex2:cumsum(1.2,3,4.5,6) Ex3:cumsum("a","b","c","d") - + ''' return GiacMethods['cumsum'](self,*args) @@ -3599,13 +3599,13 @@ cdef class GiacMethods_base: Help for cumulated_frequencies: cumulated_frequencies(Lst || Mtrx) Draws the diagram of the cumulated frequencies (rows=[value,frequencies]) - See also: 1/ histogram 2/ classes 3/ bar_plot + See also: 1/ histogram 2/ classes 3/ bar_plot Ex1:cumulated_frequencies([1,2,1,1,2,1,2,4,3,3]) Ex2:cumulated_frequencies([(rand(6)+1)$(k=1..100)]) Ex3:cumulated_frequencies([[1,0.3],[2,0.5],[3,0.2]]) Ex4:cumulated_frequencies([[1..2,0.3],[2..3,0.5],[3..4,0.2]]) Ex5:cumulated_frequencies([[1..2,0.3,0.5],[2..3,0.5,0.2],[3..4,0.2,0.3]]) - + ''' return GiacMethods['cumulated_frequencies'](self,*args) @@ -3614,9 +3614,9 @@ cdef class GiacMethods_base: Help for curl: curl(Lst(A,B,C),Lst(x,y,z)) curl([A,B,C],[x,y,z])=[dC/dy-dB/dz,dA/dz-dC/dx,dB/dx-dA/dy]. - See also: 1/ derive 2/ divergence + See also: 1/ derive 2/ divergence Ex1:curl([2*x*y,x*z,y*z],[x,y,z]) - + ''' return GiacMethods['curl'](self,*args) @@ -3627,7 +3627,7 @@ cdef class GiacMethods_base: Content of the matrix editor or spreadsheet. Ex1:current_sheet(1,2) Ex2:current_sheet(A1..A5,B,G) - + ''' return GiacMethods['current_sheet'](self,*args) @@ -3636,7 +3636,7 @@ cdef class GiacMethods_base: Help for curvature: curvature(Curve,Point) Curvature of curve C at point M. - See also: 1/ osculating_circle 2/ evolute + See also: 1/ osculating_circle 2/ evolute Ex1:curvature(plot(x^2),point(1,1)) Ex2:curvature([5*cos(t),5*sin(t)],t) Ex3:curvature([t,t^2],t) @@ -3644,7 +3644,7 @@ cdef class GiacMethods_base: Ex5:curvature([3*exp(t/2)*cos(t),3*exp(t/2)*sin(t)],t) Ex6:curvature([3*exp(t/2)*cos(t),3*exp(t/2)*sin(t)],t,7) Ex7: trigcos(curvature([2*cos(t),2*sin(t),3*t],t)) - + ''' return GiacMethods['curvature'](self,*args) @@ -3653,8 +3653,8 @@ cdef class GiacMethods_base: Help for curve: curve(Expr) Reserved word. - See also: 1/ - + See also: 1/ + ''' return GiacMethods['curve'](self,*args) @@ -3663,10 +3663,10 @@ cdef class GiacMethods_base: Help for cyan: cyan(Opt) Option of the display command to display with color. - See also: 1/ display + See also: 1/ display Ex1: F:=display(point(2+1.5*i),red) Ex2: F:=display(point(2+1.5*i),point_point+green) - + ''' return GiacMethods['cyan'](self,*args) @@ -3675,9 +3675,9 @@ cdef class GiacMethods_base: Help for cycle2perm: cycle2perm(Cycle) Converts the cycle c to a permutation. - See also: 1/ cycles2permu 2/ permu2cycles + See also: 1/ cycles2permu 2/ permu2cycles Ex1:cycle2perm([1,3,5]) - + ''' return GiacMethods['cycle2perm'](self,*args) @@ -3686,10 +3686,10 @@ cdef class GiacMethods_base: Help for cycle_graph: cycle_graph(Intg(n)||Lst(V)) Returns a cyclic graph with n vertices (or with vertices from list V). - See also: 1/ graph 2/ path_graph + See also: 1/ graph 2/ path_graph Ex1:cycle_graph(4) Ex2:cycle_graph(["one","two","three","four","five"]) - + ''' return GiacMethods['cycle_graph'](self,*args) @@ -3698,9 +3698,9 @@ cdef class GiacMethods_base: Help for cycleinv: cycleinv(Cycle(c)) Returns the inverse cycle of the cycle c. - See also: 1/ perminv + See also: 1/ perminv Ex1:cycleinv([1,3,5]) - + ''' return GiacMethods['cycleinv'](self,*args) @@ -3709,9 +3709,9 @@ cdef class GiacMethods_base: Help for cycles2permu: cycles2permu(Lst(Cycle)) Converts a product of cycles into a permutation. - See also: 1/ permu2cycles 2/ cycle2perm + See also: 1/ permu2cycles 2/ cycle2perm Ex1:cycles2permu([[1,3,5],[3,4]]) - + ''' return GiacMethods['cycles2permu'](self,*args) @@ -3720,9 +3720,9 @@ cdef class GiacMethods_base: Help for cyclotomic: cyclotomic(Expr) N-th cyclotomic polynomial. - See also: 1/ none + See also: 1/ none Ex1:cyclotomic(20) - + ''' return GiacMethods['cyclotomic'](self,*args) @@ -3731,10 +3731,10 @@ cdef class GiacMethods_base: Help for cylinder: cylinder(Pnt(A),Vect(v),Real(r),[Real(h)]) Draws a cylinder with axis (A,v), with radius r [and with altitude h]. - See also: 1/ half_cone 2/ cone + See also: 1/ half_cone 2/ cone Ex1:cylinder([0,0,0],[0,1,0],2) Ex2:cylinder([0,0,0],[0,1,0],2,-3) - + ''' return GiacMethods['cylinder'](self,*args) @@ -3743,10 +3743,10 @@ cdef class GiacMethods_base: Help for dash_line: dash_line(Opt) Option of the display command for a line. - See also: 1/ display + See also: 1/ display Ex1: display(line(y=x),green+dash_line+line_width_2) Ex2: d:=display(line(2+i,1),cap_round_line) - + ''' return GiacMethods['dash_line'](self,*args) @@ -3755,10 +3755,10 @@ cdef class GiacMethods_base: Help for dashdot_line: dashdot_line(Opt) Option of the display command for a line. - See also: 1/ display + See also: 1/ display Ex1: display(line(y=x),green+dash_line+line_width_2) Ex2: d:=display(line(2+i,1),cap_round_line) - + ''' return GiacMethods['dashdot_line'](self,*args) @@ -3767,10 +3767,10 @@ cdef class GiacMethods_base: Help for dashdotdot_line: dashdotdot_line(Opt) Option of the display command for a line. - See also: 1/ display + See also: 1/ display Ex1: display(line(y=x),green+dash_line+line_width_2) Ex2: d:=display(line(2+i,1),cap_round_line) - + ''' return GiacMethods['dashdotdot_line'](self,*args) @@ -3781,7 +3781,7 @@ cdef class GiacMethods_base: dayofweek(d,m,y) returns the day of the given date (day,month,year) : 0 for sunday, 1 for monday ...6 for saturday. Ex1:dayofweek(21,4,2014) Ex2:dayofweek(15,10,1582) - + ''' return GiacMethods['dayofweek'](self,*args) @@ -3790,12 +3790,12 @@ cdef class GiacMethods_base: Help for deSolve: deSolve(Eq,[TimeVar],FncVar) Solves a differential equation or a differential linear system with constant coefficients. - See also: 1/ integrate 2/ diff 3/ odesolve 4/ plotode 5/ plotfiefd + See also: 1/ integrate 2/ diff 3/ odesolve 4/ plotode 5/ plotfiefd Ex1:deSolve(y'+x*y=0) Ex2:deSolve(y'+x*y=0,y) Ex3:deSolve(y'+x*y=0,[0,1]) Ex4:deSolve([y'+x*y=0,y(0)=1],y) - Ex5:deSolve([y'=[[1,2],[2,1]]*y+[x,x+1],y(0)=[1,2]]) + Ex5:deSolve([y'=[[1,2],[2,1]]*y+[x,x+1],y(0)=[1,2]]) Ex6:deSolve(y''+y=0,y) Ex7:deSolve([y''+y=sin(x),y(0)=1,y'(0)=2],y) Ex8:deSolve([y''+y=sin(x),y(0)=1,y'(0)=2],x,y) @@ -3807,7 +3807,7 @@ cdef class GiacMethods_base: Ex14:deSolve([z''+2*z'+z,z(0)=1,z'(0)=0],z(u)) Ex15:deSolve([z'=[[1,2],[2,1]]*z+[t,t+1],z(0)=[1,2]],t,z) Ex16:deSolve([z'=[[1,2],[2,1]]*z+[t,t+1],z(0)=[1,2]],z(t)) - + ''' return GiacMethods['deSolve'](self,*args) @@ -3816,10 +3816,10 @@ cdef class GiacMethods_base: Help for debut_enregistrement: debut_enregistrement(Var(nom_du_dessin)) Begins recording the commands making up the drawing; the name of the resulting procedure is the argument. - See also: 1/ fin_enregistrement + See also: 1/ fin_enregistrement Ex1:debut_enregistrement(maison) Ex2:debut_enregistrement(arbre) - + ''' return GiacMethods['debut_enregistrement'](self,*args) @@ -3828,11 +3828,11 @@ cdef class GiacMethods_base: Help for degree: degree(Poly(P),Var(Var)) Degree of the polynomial P with respect to the second argument. - See also: 1/ valuation 2/ size 3/ total_degree + See also: 1/ valuation 2/ size 3/ total_degree Ex1:degree(x^3+x) Ex2:degree([1,0,1,0]) Ex3:degree(x^3+x*y,y) - + ''' return GiacMethods['degree'](self,*args) @@ -3841,9 +3841,9 @@ cdef class GiacMethods_base: Help for degree_sequence: degree_sequence(Graph(G)) Returns the list of degrees of vertices of G (arc directions are ignored). - See also: 1/ is_graphic_sequence 2/ is_regular 2/ sequence_graph 3/ vertex_degree + See also: 1/ is_graphic_sequence 2/ is_regular 2/ sequence_graph 3/ vertex_degree Ex1:degree_sequence(graph(trail(1,2,3,4,2))) - + ''' return GiacMethods['degree_sequence'](self,*args) @@ -3852,11 +3852,11 @@ cdef class GiacMethods_base: Help for delcols: delcols(Mtrx(A),Interval(n1..n2)||n1) Returns the matrix where the columns n1..n2 (or n1) of the matrix A are deleted. - See also: 1/ delrows + See also: 1/ delrows Ex1:delcols([[1,2,3],[4,5,6],[7,8,9]],1..1) Ex2:delcols([[1,2,3],[4,5,6],[7,8,9]],0..1) Ex3:delcols([[1,2,3],[4,5,6],[7,8,9]],1) - + ''' return GiacMethods['delcols'](self,*args) @@ -3865,9 +3865,9 @@ cdef class GiacMethods_base: Help for delete_arc: delete_arc(Graph(G),Edge(e)||Trail(T)||Lst(E)) Returns a modified copy of digraph G with arc e (or trail T or list of arcs E) removed. - See also: 1/ add_arc 2/ delete_edge 3/ digraph 4/ edges 5/ has_arc 6/ trail + See also: 1/ add_arc 2/ delete_edge 3/ digraph 4/ edges 5/ has_arc 6/ trail Ex1:delete_arc(digraph(trail(1,2,3,4,5,1)),[5,1]) - + ''' return GiacMethods['delete_arc'](self,*args) @@ -3876,9 +3876,9 @@ cdef class GiacMethods_base: Help for delete_edge: delete_edge(Graph(G),Edge(e)||Trail(T)||Lst(E)) Returns a modified copy of undirected graph G with edge e (or trail T or list of edges E) removed. - See also: 1/ add_edge 2/ delete_arc 3/ edges 4/ graph 5/ has_edge 6/ trail + See also: 1/ add_edge 2/ delete_arc 3/ edges 4/ graph 5/ has_edge 6/ trail Ex1:delete_edge(cycle_graph(4),[1,2]) - + ''' return GiacMethods['delete_edge'](self,*args) @@ -3887,9 +3887,9 @@ cdef class GiacMethods_base: Help for delete_vertex: delete_vertex(Graph(G),Vrtx(v)||Lst(V)) Returns a modified copy of G with vertex v (or vertices from V) removed. - See also: 1/ add_vertex 2/ induced_subgraph + See also: 1/ add_vertex 2/ induced_subgraph Ex1:delete_vertex(cycle_graph(5),[1,4]) - + ''' return GiacMethods['delete_vertex'](self,*args) @@ -3898,11 +3898,11 @@ cdef class GiacMethods_base: Help for delrows: delrows(Mtrx(A),Interval(n1..n2)||n1) Returns the matrix where the rows n1..n2 (or n1) of the matrix A are deleted. - See also: 1/ delcols + See also: 1/ delcols Ex1:delrows([[1,2,3],[4,5,6],[7,8,9]],1..1) Ex2:delrows([[1,2,3],[4,5,6],[7,8,9]],0..1) Ex3:delrows([[1,2,3],[4,5,6],[7,8,9]],1) - + ''' return GiacMethods['delrows'](self,*args) @@ -3911,10 +3911,10 @@ cdef class GiacMethods_base: Help for deltalist: deltalist(Lst) Returns the list of the differences of two terms in succession. - See also: 1/ + See also: 1/ Ex1:deltalist([1,4,8,9]) Ex2:deltalist([1,8,4,9]) - + ''' return GiacMethods['deltalist'](self,*args) @@ -3923,11 +3923,11 @@ cdef class GiacMethods_base: Help for denom: denom(Frac(a/b) or RatFrac) Returns the denominator of the simplified fraction. - See also: 1/ getDenom 2/ getNum 3/ numer 4/ f2nd + See also: 1/ getDenom 2/ getNum 3/ numer 4/ f2nd Ex1:denom(25/15) Ex2:denom((x^3-1)/(x^2-1)) Ex3:denom(1+(x^3-1)/x^2) - + ''' return GiacMethods['denom'](self,*args) @@ -3936,10 +3936,10 @@ cdef class GiacMethods_base: Help for densityplot: densityplot(Expr,[x=xrange,y=yrange],[z],[xstep],[ystep]) Shows in the plane with colors the graph of an expression of 2 variables. - See also: 1/ plotfunc 2/ plotcontour + See also: 1/ plotfunc 2/ plotcontour Ex1:densityplot(x^2-y^2,[x=-2..2,y=-2..2],xstep=0.1,ystep=0.1) Ex2:densityplot(x^2-y^2,[x=-2..2,y=-2..2],z=-2..2,xstep=0.1,ystep=0.1) - + ''' return GiacMethods['densityplot'](self,*args) @@ -3948,9 +3948,9 @@ cdef class GiacMethods_base: Help for departures: departures(Graph(G),[Vrtx(v)]) Returns the list of vertices of digraph G which are connected by v with arcs such that tails are in v. If v is omitted, a list of departures is computed for every vertex in G. - See also: 1/ out_degree + See also: 1/ out_degree Ex1:departures(digraph(%{[1,2],[1,3],[2,3]%}),1) - + ''' return GiacMethods['departures'](self,*args) @@ -3959,7 +3959,7 @@ cdef class GiacMethods_base: Help for derive: derive(Expr or Fnc,[SeqVar or LstVar],[n]) Returns the derivative with respect to the 2nd argument. - See also: 1/ ' 2/ function_diff 3/ integrate 4/ taux_accroissement 5/ implicitdiff + See also: 1/ ' 2/ function_diff 3/ integrate 4/ taux_accroissement 5/ implicitdiff Ex1:derive(x^3-x) Ex2:derive(x^3-x,x,3) Ex3:derive(x^3-x,quote(x)$3) @@ -3968,7 +3968,7 @@ cdef class GiacMethods_base: Ex6:derive(x*y+z*y,y,z) Ex7:derive(x*y+z*y,[y,z]) Ex8: f(x):=sin(2x);g:=diff(f);h:=diff(diff(f)) - + ''' return GiacMethods['derive'](self,*args) @@ -3977,7 +3977,7 @@ cdef class GiacMethods_base: Help for deriver: deriver(Expr or Fnc,[SeqVar or LstVar],[n]) Returns the derivative with respect to the 2nd argument. - See also: 1/ ' 2/ function_diff 3/ integrate 4/ taux_accroissement 5/ implicitdiff + See also: 1/ ' 2/ function_diff 3/ integrate 4/ taux_accroissement 5/ implicitdiff Ex1:deriver(x^3-x) Ex2:deriver(x^3-x,x,3) Ex3:deriver(x^3-x,quote(x)$3) @@ -3986,7 +3986,7 @@ cdef class GiacMethods_base: Ex6:deriver(x*y+z*y,y,z) Ex7:deriver(x*y+z*y,[y,z]) Ex8: f(x):=sin(2x);g:=diff(f);h:=diff(diff(f)) - + ''' return GiacMethods['deriver'](self,*args) @@ -3995,12 +3995,12 @@ cdef class GiacMethods_base: Help for desolve: desolve(Eq,[TimeVar],FncVar) Solves a differential equation or a differential linear system with constant coefficients. - See also: 1/ integrate 2/ diff 3/ odesolve 4/ plotode 5/ plotfiefd + See also: 1/ integrate 2/ diff 3/ odesolve 4/ plotode 5/ plotfiefd Ex1:desolve(y'+x*y=0) Ex2:desolve(y'+x*y=0,y) Ex3:desolve(y'+x*y=0,[0,1]) Ex4:desolve([y'+x*y=0,y(0)=1],y) - Ex5:desolve([y'=[[1,2],[2,1]]*y+[x,x+1],y(0)=[1,2]]) + Ex5:desolve([y'=[[1,2],[2,1]]*y+[x,x+1],y(0)=[1,2]]) Ex6:desolve(y''+y=0,y) Ex7:desolve([y''+y=sin(x),y(0)=1,y'(0)=2],y) Ex8:desolve([y''+y=sin(x),y(0)=1,y'(0)=2],x,y) @@ -4012,7 +4012,7 @@ cdef class GiacMethods_base: Ex14:desolve([z''+2*z'+z,z(0)=1,z'(0)=0],z(u)) Ex15:desolve([z'=[[1,2],[2,1]]*z+[t,t+1],z(0)=[1,2]],t,z) Ex16:desolve([z'=[[1,2],[2,1]]*z+[t,t+1],z(0)=[1,2]],z(t)) - + ''' return GiacMethods['desolve'](self,*args) @@ -4021,11 +4021,11 @@ cdef class GiacMethods_base: Help for dessine_tortue: dessine_tortue([Intg(n)]) Draws the full (or not full if n=1) triangle representing the turtle. - See also: 1/ crayon + See also: 1/ crayon Ex1:dessine_tortue() Ex2:dessine_tortue(0) Ex3:dessine_tortue(1) - + ''' return GiacMethods['dessine_tortue'](self,*args) @@ -4034,10 +4034,10 @@ cdef class GiacMethods_base: Help for det: det(Mtrx) Determinant of a square matrix M. - See also: 1/ rref 2/ det_minor 3/ Det + See also: 1/ rref 2/ det_minor 3/ Det Ex1:det([[1,2],[3,4]]) Ex2:det([[1,2,3],[1,3,6],[2,5,7]]) - + ''' return GiacMethods['det'](self,*args) @@ -4046,9 +4046,9 @@ cdef class GiacMethods_base: Help for det_minor: det_minor(Mtrx(A)) Returns the determinant calculated with the calculus of minors. - See also: 1/ det + See also: 1/ det Ex1:det_minor([[1,2],[3,4]]) - + ''' return GiacMethods['det_minor'](self,*args) @@ -4057,13 +4057,13 @@ cdef class GiacMethods_base: Help for developper: developper(Expr) Full distribution of * and / over + and -. - See also: 1/ texpand 2/ normal 3/ simplify 4/ ratnormal + See also: 1/ texpand 2/ normal 3/ simplify 4/ ratnormal Ex1:developper((x+y)*(z+1)) Ex2:developper((a+b+c)/d) Ex3:developper((y+x)*(z+y)*(x+z)) Ex4:developper((x+3)^4) Ex5:developper((2*x-2*1)*(x^2-3*x+2)+(x^2-2*x+3)*(2*x-3*1)) - + ''' return GiacMethods['developper'](self,*args) @@ -4072,11 +4072,11 @@ cdef class GiacMethods_base: Help for developper_transcendant: developper_transcendant(Expr) Expands transcendental expressions. - See also: 1/ tcollect 2/ tlin 3/ lin 4/ trigexpand + See also: 1/ tcollect 2/ tlin 3/ lin 4/ trigexpand Ex1:developper_transcendant(sin(2*x)+exp(x+y)) Ex2:developper_transcendant(cos(x+y)) Ex3:developper_transcendant(cos(3*x)) - + ''' return GiacMethods['developper_transcendant'](self,*args) @@ -4085,13 +4085,13 @@ cdef class GiacMethods_base: Help for dfc: dfc(Real(x0),Int(n)||Real(eps)) Returns the continued fraction development at x0 of order n or with precision eps. - See also: 1/ dfc2f 2/ convert + See also: 1/ dfc2f 2/ convert Ex1:dfc(sqrt(2),5) Ex2:dfc(pi,4) Ex3:dfc(evalf(pi),1e-09) Ex4: convert(sqrt(2),confrac,'dev');dev Ex5: convert(9976/6961,confrac,'l');l - + ''' return GiacMethods['dfc'](self,*args) @@ -4100,10 +4100,10 @@ cdef class GiacMethods_base: Help for dfc2f: dfc2f(LstFrac_Cont)) Converts a continued fraction into a real. - See also: 1/ dfc 2/ convert + See also: 1/ dfc 2/ convert Ex1:dfc2f([1,1,1]) Ex2:dfc2f([1,2,[2]]) - + ''' return GiacMethods['dfc2f'](self,*args) @@ -4112,14 +4112,14 @@ cdef class GiacMethods_base: Help for diag: diag(Lst(l)||(Mtrx(A),[left||right||lu])||Lst(l),Lst(d),Lst(u)) With 1 argument returns either the diagonal matrix with diagonal l or the diagonal of A, with 2 arguments returns the large left (lower) triangular part of A or the large right (upper) triangular part of A or factors A into 3 parts : strict left (lower) triangular, diagonal, strict right (upper) triangular and with 3 arguments returns the tridiagonal matrix with diagonals l,d,u. - See also: 1/ identity 2/ lu 3/ BlockDiagonal 4/ upper 5/ lower + See also: 1/ identity 2/ lu 3/ BlockDiagonal 4/ upper 5/ lower Ex1:diag([[1,2],[3,4]]) Ex2:diag([1,2,3]) Ex3:diag([[1,2],[3,4]],left) Ex4:diag([[1,2],[3,4]],right) Ex5:diag([[1,2],[3,4]],lu) Ex6:diag([1,2],[3,4,5],[6,7]) - + ''' return GiacMethods['diag'](self,*args) @@ -4128,7 +4128,7 @@ cdef class GiacMethods_base: Help for diff: diff(Expr or Fnc,[SeqVar or LstVar],[n]) Returns the derivative with respect to the 2nd argument. - See also: 1/ ' 2/ function_diff 3/ integrate 4/ taux_accroissement 5/ implicitdiff + See also: 1/ ' 2/ function_diff 3/ integrate 4/ taux_accroissement 5/ implicitdiff Ex1:diff(x^3-x) Ex2:diff(x^3-x,x,3) Ex3:diff(x^3-x,quote(x)$3) @@ -4137,7 +4137,7 @@ cdef class GiacMethods_base: Ex6:diff(x*y+z*y,y,z) Ex7:diff(x*y+z*y,[y,z]) Ex8: f(x):=sin(2x);g:=diff(f);h:=diff(diff(f)) - + ''' return GiacMethods['diff'](self,*args) @@ -4146,10 +4146,10 @@ cdef class GiacMethods_base: Help for digraph: digraph([Lst(V)],[Set(E)],[Mtrx(A)],[options]) Create a directed (un)weighted graph from vertices V, edges E and/or adjacency or weight matrix A. All parameters are optional. - See also: 1/ graph 2/ trail + See also: 1/ graph 2/ trail Ex1:digraph(%{[1,2],[2,3],[3,4],[4,1]%}) Ex2:digraph([a,b,c,d],%{[[a,b],1.0],[[a,c],2.3],[[b,d],3.1],[[c,d],4]%}) - + ''' return GiacMethods['digraph'](self,*args) @@ -4158,9 +4158,9 @@ cdef class GiacMethods_base: Help for dijkstra: dijkstra(Graph(G),Vrtx(v),[Vrtx(w)||Lst(W)]) Returns the cheapest weighted path from vertex v to w (or to vertices from W) in undirected graph G. Output is in the form [[v1,v2,...,vk],d] (or list of these) where v1,v2,...,vk are vertices along each path and d is the weight of the path. - See also: 1/ allpairs_distance 2/ shortest_path + See also: 1/ allpairs_distance 2/ shortest_path Ex1:dijkstra(graph(%{[[1,2],1],[[2,3],3],[[3,4],7],[[4,5],3],[[5,6],3],[[1,6],3]%}),1,4) - + ''' return GiacMethods['dijkstra'](self,*args) @@ -4169,9 +4169,9 @@ cdef class GiacMethods_base: Help for dim: dim(Mtrx) Returns the list which gives the dimension of the matrix specified as argument. - See also: 1/ rowdim 2/ coldim 3/ sizes 4/ size + See also: 1/ rowdim 2/ coldim 3/ sizes 4/ size Ex1:dim([[1,2,3],[4,5,6]]) - + ''' return GiacMethods['dim'](self,*args) @@ -4180,8 +4180,8 @@ cdef class GiacMethods_base: Help for directed: directed(Opt) Option for graph and digraph commands. - See also: 1/ weighted 2/ graph 3/ digraph - + See also: 1/ weighted 2/ graph 3/ digraph + ''' return GiacMethods['directed'](self,*args) @@ -4190,9 +4190,9 @@ cdef class GiacMethods_base: Help for discard_edge_attribute: discard_edge_attribute(Graph(G),Edge(e),Seq(tag1=value1,tag2=value2,..)) Discards the attributes with tags tag1, tag2, ... assigned to edge e in G and returns the modified copy of G. - See also: 1/ get_edge_attribute 2/ set_edge_attribute 3/ list_edge_attributes + See also: 1/ get_edge_attribute 2/ set_edge_attribute 3/ list_edge_attributes Ex1:discard_edge_attribute(cycle_graph(3),[1,2],"cost") - + ''' return GiacMethods['discard_edge_attribute'](self,*args) @@ -4201,9 +4201,9 @@ cdef class GiacMethods_base: Help for discard_graph_attribute: discard_graph_attribute(Graph(G),Seq(tag1=value1,tag2=value2,..)) Discards the graph attributes with tags tag1, tag2, ... and returns the modified copy of G. - See also: 1/ get_graph_attribute 2/ set_graph_attribute 3/ list_graph_attributes + See also: 1/ get_graph_attribute 2/ set_graph_attribute 3/ list_graph_attributes Ex1:discard_graph_attribute(cycle_graph(3),"name") - + ''' return GiacMethods['discard_graph_attribute'](self,*args) @@ -4212,9 +4212,9 @@ cdef class GiacMethods_base: Help for discard_vertex_attribute: discard_vertex_attribute(Graph(G),Vrtx(v),Seq(tag1=value1,tag2=value2,..)) Discards the attributes with tags tag1, tag2, ... assigned to vertex v in G and returns the modified copy of G. - See also: 1/ get_vertex_attribute 2/ set_vertex_attribute 3/ list_vertex_attributes + See also: 1/ get_vertex_attribute 2/ set_vertex_attribute 3/ list_vertex_attributes Ex1:discard_vertex_attribute(cycle_graph(3),1,"supply") - + ''' return GiacMethods['discard_vertex_attribute'](self,*args) @@ -4223,9 +4223,9 @@ cdef class GiacMethods_base: Help for disjoint_union: disjoint_union(Seq(G1,G2,...)) Returns the disjoint union of the graphs G1, G2, ... Vertices in the resulting graph are labelled with "k:v", where k is index of the corresponding k-th graph Gk and v is vertex in Gk. - See also: 1/ graph_join 2/ graph_union + See also: 1/ graph_join 2/ graph_union Ex1:disjoint_union(is_connected(disjoint_union(cycle_graph(5),path_graph(4)))) - + ''' return GiacMethods['disjoint_union'](self,*args) @@ -4234,7 +4234,7 @@ cdef class GiacMethods_base: Help for display: display([GeoObj or legende],Intg) Draws a geometrical object with colors black=0 red=1 green=2 yellow=3 blue=4, filled with the color in the interior of a closed curve,line_width_n (0=0 or, the (-n)th previous question if n<0 (by default n=-1 for the previous question). - See also: 1/ ans + See also: 1/ ans Ex1:entry() Ex2:entry(2) Ex3:entry(-2) - + ''' return GiacMethods['entry'](self,*args) @@ -4916,10 +4916,10 @@ cdef class GiacMethods_base: Help for envelope: envelope(Expr(Xpr),Var(t)||[x,y,t]) Returns the envelope of the curves with equation Xpr=0 as t varies. - See also: 1/ tangent 2/ locus + See also: 1/ tangent 2/ locus Ex1:envelope(y+x*tan(t)-2*sin(t),t) Ex2:envelope(v+u*tan(t)-3*sin(t),[u,v,t]) - + ''' return GiacMethods['envelope'](self,*args) @@ -4928,9 +4928,9 @@ cdef class GiacMethods_base: Help for epsilon: epsilon(NULL) Returns the value of epsilon of the CAS configuration. - See also: 1/ epsilon2zero + See also: 1/ epsilon2zero Ex1:epsilon() - + ''' return GiacMethods['epsilon'](self,*args) @@ -4939,9 +4939,9 @@ cdef class GiacMethods_base: Help for epsilon2zero: epsilon2zero(Expr) Values < epsilon are replaced by zero. - See also: 1/ evalf + See also: 1/ evalf Ex1:epsilon2zero(1e-13+x+5) - + ''' return GiacMethods['epsilon2zero'](self,*args) @@ -4950,11 +4950,11 @@ cdef class GiacMethods_base: Help for equal: equal(Expr,Expr) Prefixed version of =. - See also: 1/ = 2/ equal2diff 3/ equal2list 4/ left 5/ right + See also: 1/ = 2/ equal2diff 3/ equal2list 4/ left 5/ right Ex1: 2*x=4 Ex2:equal(2*x,4) Ex3:equal(x^2-3x+2,0) - + ''' return GiacMethods['equal'](self,*args) @@ -4963,10 +4963,10 @@ cdef class GiacMethods_base: Help for equal2diff: equal2diff(Equal) A=B or equal(A,B) is converted into the difference A-B. - See also: 1/ left 2/ right 3/ equal2list 4/ equal 5/ = + See also: 1/ left 2/ right 3/ equal2list 4/ equal 5/ = Ex1:equal2diff(x=2) Ex2:equal2diff(equal(x,2)) - + ''' return GiacMethods['equal2diff'](self,*args) @@ -4975,10 +4975,10 @@ cdef class GiacMethods_base: Help for equal2list: equal2list(Equal) A=B or equal(A,B) is converted into the list [A,B]. - See also: 1/ left 2/ right 3/ equal2diff 4/ equal 5/ = + See also: 1/ left 2/ right 3/ equal2diff 4/ equal 5/ = Ex1:equal2list(x=2) Ex2:equal2list(equal(x,2)) - + ''' return GiacMethods['equal2list'](self,*args) @@ -4987,9 +4987,9 @@ cdef class GiacMethods_base: Help for equation: equation(GeoObj, VectParam) equation returns the cartesian equation of a curve. - See also: 1/ parameq + See also: 1/ parameq Ex1:equation(line(1-i,i),[x,y]) - + ''' return GiacMethods['equation'](self,*args) @@ -4998,12 +4998,12 @@ cdef class GiacMethods_base: Help for equilateral_triangle: equilateral_triangle((Pnt(A) or Cplx),(Pnt(B) or Cplx),[Pnt(P)],[Var(C)]) equilateral_triangle(A,B) (resp equilateral_triangle(A,B,P)) draws the direct equilateral triangle ABC with side AB (resp in the half-plane ABP). - See also: 1/ triangle + See also: 1/ triangle Ex1:equilateral_triangle(point(1+i),0) Ex2:equilateral_triangle(0,1+i,C) Ex3:equilateral_triangle(point(0,0,0),point(3,3,3),point(0,0,3)) Ex4:equilateral_triangle(point(0,0,0),point(3,3,3),point(0,0,3),C) - + ''' return GiacMethods['equilateral_triangle'](self,*args) @@ -5012,10 +5012,10 @@ cdef class GiacMethods_base: Help for erf: erf(Real(x0)) Returns the approximate value of 2/sqrt(pi)*int(exp(-t^2),t,0,x0). - See also: 1/ erfc + See also: 1/ erfc Ex1:erf(1) Ex2:erf(1/(sqrt(2)))*1/2 - + ''' return GiacMethods['erf'](self,*args) @@ -5024,10 +5024,10 @@ cdef class GiacMethods_base: Help for erfc: erfc(Real(x0)) Returns the approximate value of 2/sqrt(pi)*int(exp(-t^2),t,x0,+infinity). - See also: 1/ erf + See also: 1/ erf Ex1:erfc(1) Ex2:erfc(1/(sqrt(2)))*1/2 - + ''' return GiacMethods['erfc'](self,*args) @@ -5036,10 +5036,10 @@ cdef class GiacMethods_base: Help for error: error(Str) Generates the display of an error in a program. - See also: 1/ try 2/ catch + See also: 1/ try 2/ catch Ex1:error("Argument should be integer") Ex2:error("je provoque une erreur") - + ''' return GiacMethods['error'](self,*args) @@ -5048,10 +5048,10 @@ cdef class GiacMethods_base: Help for est_permu: est_permu(Lst) Returns 1 if the argument is a permutation and 0 otherwise. - See also: 1/ is_cycle 2/ permu2cycles + See also: 1/ is_cycle 2/ permu2cycles Ex1:est_permu([4,2,3,1]) Ex2:est_permu([4,2,3,1,0]) - + ''' return GiacMethods['est_permu'](self,*args) @@ -5060,10 +5060,10 @@ cdef class GiacMethods_base: Help for euler: euler(Intg(n)) Euler's function (euler(n)=card({p=0):; euler_lagrange(sqrt((1+y'^2)/y),t,y) - + ''' return GiacMethods['euler_lagrange'](self,*args) @@ -5100,7 +5100,7 @@ cdef class GiacMethods_base: Ex3: purge(a,b,c);eval_level(1);a:=b+1; b:=c+1;c:=3; Ex4: purge(a,b,c);eval_level(2);a:=b+1; b:=c+1;c:=3; Ex5: purge(a,b,c);eval_level(3);a:=b+1; b:=c+1;c:=3; - + ''' return GiacMethods['eval_level'](self,*args) @@ -5109,11 +5109,11 @@ cdef class GiacMethods_base: Help for evala: evala(Expr) Simplifies the expression. - See also: 1/ simplify + See also: 1/ simplify Ex1:evala(2*x+y=1) Ex2:evala(2*x*2) Ex3:evala((2*x+1)^2) - + ''' return GiacMethods['evala'](self,*args) @@ -5122,10 +5122,10 @@ cdef class GiacMethods_base: Help for evalb: evalb(Expr) Boolean evaluation of the argument. - See also: 1/ evalf 2/ eval + See also: 1/ evalf 2/ eval Ex1:evalb(a==2) Ex2:evalb(sqrt(2)+pi>a) - + ''' return GiacMethods['evalb'](self,*args) @@ -5134,10 +5134,10 @@ cdef class GiacMethods_base: Help for evalc: evalc(Expr) Returns a complex expression simplified to the format real+i*imag. - See also: 1/ normal + See also: 1/ normal Ex1:evalc(-3+4*i+exp(i)) Ex2:evalc(1/(x+y*i)) - + ''' return GiacMethods['evalc'](self,*args) @@ -5146,14 +5146,14 @@ cdef class GiacMethods_base: Help for evalf: evalf(Expr,[Int]) Numerical evaluation of the first argument (we can give the number of digits as second argument). - See also: 1/ evalb 2/ eval + See also: 1/ evalb 2/ eval Ex1:evalf(2/3) Ex2:evalf(2/3,2) Ex3:evalf(2*sin(1)) Ex4:evalf(2*sin(1),40) Ex5:evalf(sqrt(2)+pi) Ex6:evalf(sqrt(2)+pi,30) - + ''' return GiacMethods['evalf'](self,*args) @@ -5162,9 +5162,9 @@ cdef class GiacMethods_base: Help for evalm: evalm(Expr) Evaluates its argument. - See also: 1/ evalf + See also: 1/ evalf Ex1:evalm(2*sin(pi)) - + ''' return GiacMethods['evalm'](self,*args) @@ -5173,10 +5173,10 @@ cdef class GiacMethods_base: Help for even: even(Intg(n)) Returns 1 if the integer is even, else returns 0. - See also: 1/ odd + See also: 1/ odd Ex1:even(6) Ex2:even(1251) - + ''' return GiacMethods['even'](self,*args) @@ -5185,11 +5185,11 @@ cdef class GiacMethods_base: Help for evolute: evolute(Curve) Evolute of a curve C. - See also: 1/ curvature 2/ osculating_circle + See also: 1/ curvature 2/ osculating_circle Ex1:evolute(plot(x^2)) Ex2:evolute([t,t^2],t) Ex3:evolute([3*exp(t/2)*cos(t),3*exp(t/2)*sin(t)],t) - + ''' return GiacMethods['evolute'](self,*args) @@ -5198,12 +5198,12 @@ cdef class GiacMethods_base: Help for exact: exact(Expr) Converts the expression to a rational or real expression. - See also: 1/ + See also: 1/ Ex1:exact(-2) Ex2:exact(1.5) Ex3:exact(1.4141) Ex4:exact(0.156381102937) - + ''' return GiacMethods['exact'](self,*args) @@ -5212,9 +5212,9 @@ cdef class GiacMethods_base: Help for exbisector: exbisector((Pnt(A) or Cplx),(Pnt(B) or Cplx),(Pnt(C) or Cplx)) Draws the exterior bisector of the angle (AB,AC) given by 3 points A,B,C. - See also: 1/ angle 2/ bisector + See also: 1/ angle 2/ bisector Ex1:exbisector(0,1,i) - + ''' return GiacMethods['exbisector'](self,*args) @@ -5223,9 +5223,9 @@ cdef class GiacMethods_base: Help for excircle: excircle((Pnt or Cplx),(Pnt or Cplx),(Pnt or Cplx)) excircle(A,B,C) draws the A-excircle of the triangle ABC. - See also: 1/ incircle 2/ circumcircle + See also: 1/ incircle 2/ circumcircle Ex1:excircle(0,1,1+i) - + ''' return GiacMethods['excircle'](self,*args) @@ -5234,12 +5234,12 @@ cdef class GiacMethods_base: Help for execute: execute(Str) Instruction transforming a string into a command or into a number. - See also: 1/ string + See also: 1/ string Ex1:execute("ifactor(54)") Ex2:execute("123") Ex3:execute("0123") Ex4:execute(sin,x) - + ''' return GiacMethods['execute'](self,*args) @@ -5248,10 +5248,10 @@ cdef class GiacMethods_base: Help for exp: exp(Expr or Opt) Exponential or option of the convert or convertir command (id trig2exp). - See also: 1/ ln 2/ convert 3/ trig2exp + See also: 1/ ln 2/ convert 3/ trig2exp Ex1:exp(0) Ex2: convert(cos(x),exp) - + ''' return GiacMethods['exp'](self,*args) @@ -5260,10 +5260,10 @@ cdef class GiacMethods_base: Help for exp2list: exp2list(Expr) Returns the list made with the righthand member of (var=expr0 or var=expr1), to be used after solve in TI mode. - See also: 1/ list2exp + See also: 1/ list2exp Ex1:exp2list((x=2) or (x=0)) Ex2:exp2list((x=3 and y=9) or (x=-1 and y=1) ) - + ''' return GiacMethods['exp2list'](self,*args) @@ -5272,10 +5272,10 @@ cdef class GiacMethods_base: Help for exp2pow: exp2pow(Expr) Transforms exp(n*ln(x)) to x^n. - See also: 1/ pow2exp + See also: 1/ pow2exp Ex1:exp2pow(exp(3*ln(x))) Ex2:exp2pow(exp(x*ln(x))) - + ''' return GiacMethods['exp2pow'](self,*args) @@ -5284,10 +5284,10 @@ cdef class GiacMethods_base: Help for exp2trig: exp2trig(Expr) Transforms the complex exponential into sine and cosine. - See also: 1/ trig2exp 2/ atrig2ln + See also: 1/ trig2exp 2/ atrig2ln Ex1:exp2trig(exp(i*x)) Ex2:exp2trig(exp(-i*x)) - + ''' return GiacMethods['exp2trig'](self,*args) @@ -5296,13 +5296,13 @@ cdef class GiacMethods_base: Help for expand: expand(Expr) Full distribution of * and / over + and -. - See also: 1/ texpand 2/ normal 3/ simplify 4/ ratnormal + See also: 1/ texpand 2/ normal 3/ simplify 4/ ratnormal Ex1:expand((x+y)*(z+1)) Ex2:expand((a+b+c)/d) Ex3:expand((y+x)*(z+y)*(x+z)) Ex4:expand((x+3)^4) Ex5:expand((2*x-2*1)*(x^2-3*x+2)+(x^2-2*x+3)*(2*x-3*1)) - + ''' return GiacMethods['expand'](self,*args) @@ -5311,9 +5311,9 @@ cdef class GiacMethods_base: Help for expexpand: expexpand(Expr) Expands exponentials. - See also: 1/ texpand 2/ lnexpand 3/ trigexpand + See also: 1/ texpand 2/ lnexpand 3/ trigexpand Ex1:expexpand(exp(3*x)) - + ''' return GiacMethods['expexpand'](self,*args) @@ -5322,9 +5322,9 @@ cdef class GiacMethods_base: Help for expln: expln(Opt) Option of the convert or convertir command (id trig2exp). - See also: 1/ exp 2/ ln 3/ convert 4/ trig2exp + See also: 1/ exp 2/ ln 3/ convert 4/ trig2exp Ex1: convert(cos(x),expln) - + ''' return GiacMethods['expln'](self,*args) @@ -5333,12 +5333,12 @@ cdef class GiacMethods_base: Help for exponential: exponential(Real(lambda),Real(x)) Returns the probability density at x of the exponential law of parameter lambda. - See also: 1/ exponential_cdf 2/ exponential_icdf 3/ randvector 4/ ranm + See also: 1/ exponential_cdf 2/ exponential_icdf 3/ randvector 4/ ranm Ex1:exponential(2.1,3.5) Ex2:exponential(2.1,0.5) Ex3: randvector(3,exponential,1.2) Ex4: ranm(4,3,exponential,1.2) - + ''' return GiacMethods['exponential'](self,*args) @@ -5347,10 +5347,10 @@ cdef class GiacMethods_base: Help for exponential_cdf: exponential_cdf(Real(lambda),Real(x0),[Real(y0)]) Returns the probability that a exponential random variable of parameter lambda is less than x0 (or between x0 and y0). - See also: 1/ exponentiald 2/ exponential_icdf + See also: 1/ exponentiald 2/ exponential_icdf Ex1:exponential_cdf(4.2,2.1) Ex2:exponential_cdf(4.2,2.1,3.2) - + ''' return GiacMethods['exponential_cdf'](self,*args) @@ -5359,10 +5359,10 @@ cdef class GiacMethods_base: Help for exponential_icdf: exponential_icdf(Real(lambda),Real(x0),Real(p)) Returns h such that the probability that a exponential random variable of parameter lambda is less than h is p (0<=p<=1). - See also: 1/ exponential_cdf 2/ exponentiald + See also: 1/ exponential_cdf 2/ exponentiald Ex1:exponential_icdf(4.2,0.95) Ex2:exponential_icdf(4.2,0.6) - + ''' return GiacMethods['exponential_icdf'](self,*args) @@ -5371,10 +5371,10 @@ cdef class GiacMethods_base: Help for exponential_regression: exponential_regression(Lst||Mtrx(A),[Lst]) Returns the coefficients (a,b) of y=b*a^x : it is the best exponential which approx the points where the coordinates are the rows of A (or the 2 lists). - See also: 1/ logarithmic_regression + See also: 1/ logarithmic_regression Ex1:exponential_regression([[1.0,2.0],[0.0,1.0],[4.0,7.0]]) Ex2:exponential_regression([1.0,0.0,4.0],[2.0,1.0,7.0]) - + ''' return GiacMethods['exponential_regression'](self,*args) @@ -5383,10 +5383,10 @@ cdef class GiacMethods_base: Help for exponential_regression_plot: exponential_regression_plot(Lst||Mtrx(A),[Lst]) Returns the plot of y=b*a^x : it is the best exponential which approx the points where the coordinates are the rows of A (or the 2 lists). - See also: 1/ logarithmic_regression_plot + See also: 1/ logarithmic_regression_plot Ex1:exponential_regression_plot([[1.0,2.0],[0.0,1.0],[4.0,7.0]]) Ex2:exponential_regression_plot([1.0,0.0,4.0],[2.0,1.0,7.0]) - + ''' return GiacMethods['exponential_regression_plot'](self,*args) @@ -5395,12 +5395,12 @@ cdef class GiacMethods_base: Help for exponentiald: exponentiald(Real(lambda),Real(x)) Returns the probability density at x of the exponential law of parameter lambda. - See also: 1/ exponential_cdf 2/ exponential_icdf 3/ randvector 4/ ranm + See also: 1/ exponential_cdf 2/ exponential_icdf 3/ randvector 4/ ranm Ex1:exponentiald(2.1,3.5) Ex2:exponentiald(2.1,0.5) Ex3: randvector(3,exponential,1.2) Ex4: ranm(4,3,exponential,1.2) - + ''' return GiacMethods['exponentiald'](self,*args) @@ -5409,10 +5409,10 @@ cdef class GiacMethods_base: Help for exponentiald_cdf: exponentiald_cdf(Real(lambda),Real(x0),[Real(y0)]) Returns the probability that a exponential random variable of parameter lambda is less than x0 (or between x0 and y0). - See also: 1/ exponentiald 2/ exponential_icdf + See also: 1/ exponentiald 2/ exponential_icdf Ex1:exponentiald_cdf(4.2,2.1) Ex2:exponentiald_cdf(4.2,2.1,3.2) - + ''' return GiacMethods['exponentiald_cdf'](self,*args) @@ -5421,10 +5421,10 @@ cdef class GiacMethods_base: Help for exponentiald_icdf: exponentiald_icdf(Real(lambda),Real(x0),Real(p)) Returns h such that the probability that a exponential random variable of parameter lambda is less than h is p (0<=p<=1). - See also: 1/ exponential_cdf 2/ exponentiald + See also: 1/ exponential_cdf 2/ exponentiald Ex1:exponentiald_icdf(4.2,0.95) Ex2:exponentiald_icdf(4.2,0.6) - + ''' return GiacMethods['exponentiald_icdf'](self,*args) @@ -5433,9 +5433,9 @@ cdef class GiacMethods_base: Help for export_graph: export_graph(Graph(G),Str("path/to/graphname")) Writes G to the file 'graphname.dot' in directory 'path/to' in dot format, returns 1 on success and 0 on failure. - See also: 1/ import_graph + See also: 1/ import_graph Ex1:export_graph(complete_graph(5),"K5") - + ''' return GiacMethods['export_graph'](self,*args) @@ -5444,11 +5444,11 @@ cdef class GiacMethods_base: Help for export_mathml: export_mathml(Expr,[display||content]) Converts an expression to presentation or content MathML block. - See also: 1/ mathml 2/ latex + See also: 1/ mathml 2/ latex Ex1:export_mathml(a+2*b) Ex2:export_mathml(a+2*b,display) Ex3:export_mathml(a+2*b,content) - + ''' return GiacMethods['export_mathml'](self,*args) @@ -5457,10 +5457,10 @@ cdef class GiacMethods_base: Help for expovariate: expovariate(Real(a)) Returns a random real according to the exponential distribution with parameter a>0. - See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector + See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector Ex1:expovariate(1) Ex2:expovariate(2) - + ''' return GiacMethods['expovariate'](self,*args) @@ -5469,12 +5469,12 @@ cdef class GiacMethods_base: Help for expr: expr(Str) Instruction transforming a string into a command or into a number. - See also: 1/ string + See also: 1/ string Ex1:expr("ifactor(54)") Ex2:expr("123") Ex3:expr("0123") Ex4:expr(sin,x) - + ''' return GiacMethods['expr'](self,*args) @@ -5483,13 +5483,13 @@ cdef class GiacMethods_base: Help for extend: extend(Lst,Lst||Seq,Seq||Str,Str||Mtrx,Mtrx) Concatenates two lists or two strings or two sequences or 2 matrices; L:=concat(L,L1) or L.concat(L1). - See also: 1/ append 2/ cat 3/ semi_augment 4/ border 5/ + + See also: 1/ append 2/ cat 3/ semi_augment 4/ border 5/ + Ex1:extend([1,2],[3,4,5]) Ex2:extend("bon","jour") Ex3:extend([[1,2],[3,4]],[[4,5,6],[6,7,8]]) Ex4: L:=[1,2];L.concat([3,4,5]) Ex5: S:="abcd";S.concat("efghi") - + ''' return GiacMethods['extend'](self,*args) @@ -5498,11 +5498,11 @@ cdef class GiacMethods_base: Help for extract_measure: extract_measure(Var) extract_measure gives as answer the value calculated by the argument. - See also: 1/ angleatraw 2/ distanceatraw 3/ angleat 4/ distanceat 5/ slopeatraw 6/ areaatraw 7/ perimeteratraw 8/ slopeat 5/ areaat 10/ perimeterat + See also: 1/ angleatraw 2/ distanceatraw 3/ angleat 4/ distanceat 5/ slopeatraw 6/ areaatraw 7/ perimeteratraw 8/ slopeat 5/ areaat 10/ perimeterat Ex1:extract_measure(distanceatraw(0,1+i,(1+i)/2)) Ex2:extract_measure(angleatraw(0,1,1+i,1)) Ex3: A:=point(0);B:=point(1+i);a:=distanceatraw(A,B,(1+i)/2);extract_measure(a) - + ''' return GiacMethods['extract_measure'](self,*args) @@ -5556,7 +5556,7 @@ cdef class GiacMethods_base: Ex43:extrema(4x*y-x^4-y^4,[x,y]) Ex44:extrema(x*sin(y),[x,y]) Ex45:extrema(x^4+y^4,[x,y]) - Ex46:extrema(x^3*y-x*y^3,[x,y]) + Ex46:extrema(x^3*y-x*y^3,[x,y]) Ex47:extrema(x^2+y^2+z^2,x^4+y^4+z^4=1,[x,y,z]) Ex48:extrema(3x+3y+8z,[x^2+z^2=1,y^2+z^2=1],[x,y,z]) Ex49:extrema(2x^2+y^2,x^4-x^2+y^2=5,[x,y]) @@ -5565,10 +5565,10 @@ cdef class GiacMethods_base: Ex52:extrema(ln(x)+2*ln(y)+3*ln(z)+4*ln(u)+5*ln(v),x+y+z+u+v=1,[x,y,z,u,v]) Ex53:extrema(x*y*z,-2x^3+15x^2*y+11y^3-24y=0,[x,y,z]) Ex54:extrema(x+y-exp(x)-exp(y)-exp(x+y),[x,y]) - Ex55:extrema(x^2*sin(y)-4*x,[x,y]) + Ex55:extrema(x^2*sin(y)-4*x,[x,y]) Ex56:extrema((1+y*sinh(x))/(1+y^2+tanh(x)^2),[x,y]) Ex57:extrema((1+y*sinh(x))/(1+y^2+tanh(x)^2),y=x^2,[x,y]) - + ''' return GiacMethods['extrema'](self,*args) @@ -5577,11 +5577,11 @@ cdef class GiacMethods_base: Help for ezgcd: ezgcd(Poly,Poly) GCD of 2 polynomials with at least 2 variables, with the ezgcd algorithm. - See also: 1/ gcd 2/ modgcd 3/ heugcd 4/ psrgcd + See also: 1/ gcd 2/ modgcd 3/ heugcd 4/ psrgcd Ex1:ezgcd(x^2-2*xy+y^2-1,x-y) Ex2:ezgcd((x+1)^4-y^4,(x+1-y)^2) Ex3:ezgcd((x+y-1)*(x+y+1),(x+y+1)^2) - + ''' return GiacMethods['ezgcd'](self,*args) @@ -5590,10 +5590,10 @@ cdef class GiacMethods_base: Help for f2nd: f2nd(Frac or RatFrac) Returns the list built with the numerator and the denominator of the simplified fraction. - See also: 1/ simp2 2/ numer 3/ denom 4/ getNum 5/ getDenom + See also: 1/ simp2 2/ numer 3/ denom 4/ getNum 5/ getDenom Ex1:f2nd(42/12) Ex2:f2nd((x^2+2*x+1)/(x^2-1)) - + ''' return GiacMethods['f2nd'](self,*args) @@ -5602,10 +5602,10 @@ cdef class GiacMethods_base: Help for fMax: fMax(Expr,[Var]) Returns the abscissa of the maximum of the expression. - See also: 1/ fMin + See also: 1/ fMin Ex1:fMax(-x^2+2*x+1,x) Ex2:fMax(-x^2+2*x+1,x=1..2) - + ''' return GiacMethods['fMax'](self,*args) @@ -5614,12 +5614,12 @@ cdef class GiacMethods_base: Help for fMin: fMin(Expr,[Var]) Returns the abscissa of the minimum of the expression. - See also: 1/ fMax + See also: 1/ fMax Ex1:fMin(x^2-2*x+1,x) Ex2:fMin(x^2-2*x+1,x=1..2) Ex3:fMin((x-3)^2+(y-5)^2+1,[],[x,y],[1,1]) Ex4:fMin((x-3)^2+(y-5)^2+1,[x+y^2=1],[x,y],[1,1]) - + ''' return GiacMethods['fMin'](self,*args) @@ -5628,13 +5628,13 @@ cdef class GiacMethods_base: Help for fPart: fPart(Real||LstReal) Returns the fractional part (if x<0 then frac(x)+floor(x)+1=x else frac(x)+floor(x)=x). - See also: 1/ floor 2/ iPart 3/ trunc + See also: 1/ floor 2/ iPart 3/ trunc Ex1:fPart(1/2) Ex2:fPart(-1/2) Ex3:fPart(1.2) Ex4:fPart(-1.2) Ex5:fPart([3.4,sqrt(2)]) - + ''' return GiacMethods['fPart'](self,*args) @@ -5643,10 +5643,10 @@ cdef class GiacMethods_base: Help for faces: faces(Polygon or Polyedr(P)) Returns the list of the faces (1 face=matrix(n,3) where the n rows are the n vertices of the face) of the polyhedron P. - See also: 1/ polyhedron + See also: 1/ polyhedron Ex1:faces(polyhedron([0,0,0],[0,5,0],[0,0,5],[1,2,6])) Ex2:faces(polyhedron([0,0,0],[0,5,0],[0,0,5],[1,2,6]))[2] - + ''' return GiacMethods['faces'](self,*args) @@ -5655,10 +5655,10 @@ cdef class GiacMethods_base: Help for facteurs_premiers: facteurs_premiers(Intg(a) or LstIntg) Returns the list of prime factors of an integer (each factor is followed by its multiplicity). - See also: 1/ ifactor 2/ factors + See also: 1/ ifactor 2/ factors Ex1:facteurs_premiers(36) Ex2:facteurs_premiers([36,52]) - + ''' return GiacMethods['facteurs_premiers'](self,*args) @@ -5667,11 +5667,11 @@ cdef class GiacMethods_base: Help for factor: factor(Expr) Factors a polynomial. - See also: 1/ ifactor 2/ cfactor 3/ partfrac 4/ normal + See also: 1/ ifactor 2/ cfactor 3/ partfrac 4/ normal Ex1:factor(x^4-1) Ex2:factor(x^4-4,sqrt(2)) Ex3:factor(x^4+12*x^3+54*x^2+108*x+81) - + ''' return GiacMethods['factor'](self,*args) @@ -5680,10 +5680,10 @@ cdef class GiacMethods_base: Help for factor_xn: factor_xn(Poly(P)) Factors x^n in P (n=degree of polynomial P). - See also: 1/ ifactor 2/ partfrac 3/ normal + See also: 1/ ifactor 2/ partfrac 3/ normal Ex1:factor_xn(x^4-1) Ex2:factor_xn(x^4+12*x^3+54*x^2+108*x+81) - + ''' return GiacMethods['factor_xn'](self,*args) @@ -5692,10 +5692,10 @@ cdef class GiacMethods_base: Help for factorial: factorial(Intg(n)|| Real(a)) factorial(n)=n!. For non-integers, factorial(a)=a! = G(a + 1). This calculates the Gamma function. - See also: 1/ comb 2/ perm + See also: 1/ comb 2/ perm Ex1:factorial(4) Ex2:factorial(1.2) - + ''' return GiacMethods['factorial'](self,*args) @@ -5704,11 +5704,11 @@ cdef class GiacMethods_base: Help for factoriser: factoriser(Expr) Factors a polynomial. - See also: 1/ ifactor 2/ cfactor 3/ partfrac 4/ normal + See also: 1/ ifactor 2/ cfactor 3/ partfrac 4/ normal Ex1:factoriser(x^4-1) Ex2:factoriser(x^4-4,sqrt(2)) Ex3:factoriser(x^4+12*x^3+54*x^2+108*x+81) - + ''' return GiacMethods['factoriser'](self,*args) @@ -5717,10 +5717,10 @@ cdef class GiacMethods_base: Help for factoriser_entier: factoriser_entier(Intg(a)) Factorization of an integer into prime factors. - See also: 1/ factor 2/ ecm_factor + See also: 1/ factor 2/ ecm_factor Ex1:factoriser_entier(50) Ex2:factoriser_entier(123456789) - + ''' return GiacMethods['factoriser_entier'](self,*args) @@ -5729,11 +5729,11 @@ cdef class GiacMethods_base: Help for factoriser_sur_C: factoriser_sur_C(Expr) Factorization of the expression in ℂ (on the Gaussian integers if there are more than 2 variables). - See also: 1/ factor + See also: 1/ factor Ex1:factoriser_sur_C(x^2*y+y) Ex2:factoriser_sur_C(x^2*y^2+y^2+4*x^2+4) Ex3:factoriser_sur_C(x^2*y^2+y^2+2*x^2+2) - + ''' return GiacMethods['factoriser_sur_C'](self,*args) @@ -5742,10 +5742,10 @@ cdef class GiacMethods_base: Help for factors: factors(Poly or LstPoly) Returns the list of prime factors of a polynomial (each factor is followed by its multiplicity). - See also: 1/ factor 2/ ifactors + See also: 1/ factor 2/ ifactors Ex1:factors(x^4-1) Ex2:factors([x^2,x^2-1]) - + ''' return GiacMethods['factors'](self,*args) @@ -5754,9 +5754,9 @@ cdef class GiacMethods_base: Help for fadeev: fadeev(Opt) Option of the pcar or charpoly command to specify the algorithm. - See also: 1/ pcar + See also: 1/ pcar Ex1: pcar([[4,1,-2],[1,2,-1],[2,1,0]],fadeev) - + ''' return GiacMethods['fadeev'](self,*args) @@ -5765,9 +5765,9 @@ cdef class GiacMethods_base: Help for false: false() Boolean equal to false or 0. - See also: 1/ true + See also: 1/ true Ex1: a:=false - + ''' return GiacMethods['false'](self,*args) @@ -5776,14 +5776,14 @@ cdef class GiacMethods_base: Help for falsepos_solver: falsepos_solver(Opt) Argument for fsolve giving the method for solving a numerical equation. - See also: 1/ fsolve + See also: 1/ fsolve Ex1: fsolve(cos(x)=x,x,0..1,bisection_solver) Ex2: fsolve(cos(x)=x,x,0..1,brent_solver) Ex3: fsolve(cos(x)=x,x,0..1,falsepos_solver) Ex4: fsolve(cos(x)=x,x,0,newton_solver) Ex5: fsolve(cos(x)=x,x,0,secant_solver) Ex6: fsolve(cos(x)=x,x,0,steffenson_solver) - + ''' return GiacMethods['falsepos_solver'](self,*args) @@ -5792,9 +5792,9 @@ cdef class GiacMethods_base: Help for fclose: fclose(File(f)) Closes the file f. - See also: 1/ fprint 2/ fopen + See also: 1/ fprint 2/ fopen Ex1:fclose(f) - + ''' return GiacMethods['fclose'](self,*args) @@ -5803,9 +5803,9 @@ cdef class GiacMethods_base: Help for fcoeff: fcoeff(Lst(root||pole,order)) Returns the polynomial described by the list (root or pole, order). - See also: 1/ pcoeff 2/ froot 3/ proot + See also: 1/ pcoeff 2/ froot 3/ proot Ex1:fcoeff([1,2,0,1,3,-1]) - + ''' return GiacMethods['fcoeff'](self,*args) @@ -5814,13 +5814,13 @@ cdef class GiacMethods_base: Help for fdistrib: fdistrib(Expr) Full distribution of * and / over + and -. - See also: 1/ texpand 2/ normal 3/ simplify 4/ ratnormal + See also: 1/ texpand 2/ normal 3/ simplify 4/ ratnormal Ex1:fdistrib((x+y)*(z+1)) Ex2:fdistrib((a+b+c)/d) Ex3:fdistrib((y+x)*(z+y)*(x+z)) Ex4:fdistrib((x+3)^4) Ex5:fdistrib((2*x-2*1)*(x^2-3*x+2)+(x^2-2*x+3)*(2*x-3*1)) - + ''' return GiacMethods['fdistrib'](self,*args) @@ -5829,10 +5829,10 @@ cdef class GiacMethods_base: Help for fft: fft(Vect or (Vect(L),Intg(a),Intg(p)) Fast Fourier Transform in ℝ or in the field ℤ/pℤ, with a as primitive n-th root of 1 (n=size(L)). - See also: 1/ ifft + See also: 1/ ifft Ex1:fft([1,2,3,4,0,0,0,0]) Ex2:fft(ranm(128),22798,35969) - + ''' return GiacMethods['fft'](self,*args) @@ -5841,13 +5841,13 @@ cdef class GiacMethods_base: Help for fieldplot: fieldplot(Expr,VectVar,[Opt]) fieldplot(f(t,y),[t,y]) draws the plotfield of the diff equation y'=f(t,y). - See also: 1/ interactive_plotode 2/ odeplot 3/ odesolve 4/ desolve + See also: 1/ interactive_plotode 2/ odeplot 3/ odesolve 4/ desolve Ex1:fieldplot(sin(t*y),[t=-5..5,y=-3..3],xstep=0.5,ystep=0.5) Ex2:fieldplot(-t*y,[t,y]) Ex3:fieldplot(-t*y,[t,y],normalize) Ex4:fieldplot(-t*y,[t,y],normalize,xstep=0.5,ystep=0.5) Ex5:fieldplot(-t*y,[t=-6.868..6.868,y=-6.868..6.868],normalize) - + ''' return GiacMethods['fieldplot'](self,*args) @@ -5856,13 +5856,13 @@ cdef class GiacMethods_base: Help for find: find(Expr,Vect) List of positions of an object in a list, a string or a set. - See also: 1/ index 2/ member + See also: 1/ index 2/ member Ex1:find(1,[3,x,1,2,1,3]) Ex2:find(2,[0,1,3,2,4,2,5])[0] Ex3:find("a","abracadabrant") Ex4:find("ab","abracadabrant") Ex5:find(1,%{4,3,1,2%}) - + ''' return GiacMethods['find'](self,*args) @@ -5871,11 +5871,11 @@ cdef class GiacMethods_base: Help for find_cycles: find_cycles(Graph(G,[length=k||l..u])) Returns the list of elementary cycles of the digraph G. If option "length" is specified, only cycles of length k resp. of length between l and u are returned. - See also: 1/ is_acyclic + See also: 1/ is_acyclic Ex1:find_cycles(digraph(%{[1,2],[1,3],[3,1],[1,4],[2,3],[4,3],[4,5],[5,3],[5,6],[7,6],[8,6],[8,7]%})) Ex2:find_cycles(digraph(%{[1,2],[1,3],[3,1],[1,4],[2,3],[4,3],[4,5],[5,3],[5,6],[7,6],[8,6],[8,7]%}),length=3) Ex3:find_cycles(digraph(%{[1,2],[1,3],[3,1],[1,4],[2,3],[4,3],[4,5],[5,3],[5,6],[7,6],[8,6],[8,7]%}),length=3..4) - + ''' return GiacMethods['find_cycles'](self,*args) @@ -5884,9 +5884,9 @@ cdef class GiacMethods_base: Help for findhelp: findhelp(Cmd) Returns help about the command (if ? is infixed see when) . - See also: 1/ ifte 2/ when + See also: 1/ ifte 2/ when Ex1:findhelp(ifactor) - + ''' return GiacMethods['findhelp'](self,*args) @@ -5895,12 +5895,12 @@ cdef class GiacMethods_base: Help for fisher: fisher(Intg(n),Intg(m),Real(x0)) Returns the probability density of the Fisher-Snedecor law (n and m are the numbers of degrees of freedom). - See also: 1/ fisher_cdf 2/ fisher_icdf 3/ randvector 4/ ranm + See also: 1/ fisher_cdf 2/ fisher_icdf 3/ randvector 4/ ranm Ex1:fisher(4,10,2.1) Ex2:fisher(4,4,2.1) Ex3: randvector(5,fisher,4,6) Ex4: ranm(2,3,fisher,4,6) - + ''' return GiacMethods['fisher'](self,*args) @@ -5909,10 +5909,10 @@ cdef class GiacMethods_base: Help for fisher_cdf: fisher_cdf(Intg(n),Intg(m),Real(x0)) Returns the probability that a Fisher-Snedecor random variable is less than x0 (n and m are the numbers of degrees of freedom). - See also: 1/ UTPF 2/ fisher_icdf 3/ fisherd + See also: 1/ UTPF 2/ fisher_icdf 3/ fisherd Ex1:fisher_cdf(4,4,2.1) Ex2:fisher_cdf(4,10,3.5) - + ''' return GiacMethods['fisher_cdf'](self,*args) @@ -5921,10 +5921,10 @@ cdef class GiacMethods_base: Help for fisher_icdf: fisher_icdf(Intg(n),Intg(m),Real(p)) Returns h such as the probability that a Fisher-Snedecor random variable is less than h is p (n and m are the numbers of degrees of freedom and 0<=p<=1). - See also: 1/ fisher_cdf 2/ fisherd + See also: 1/ fisher_cdf 2/ fisherd Ex1:fisher_icdf(4,10,0.95) Ex2:fisher_icdf(4,10,0.05) - + ''' return GiacMethods['fisher_icdf'](self,*args) @@ -5933,12 +5933,12 @@ cdef class GiacMethods_base: Help for fisherd: fisherd(Intg(n),Intg(m),Real(x0)) Returns the probability density of the Fisher-Snedecor law (n and m are the numbers of degrees of freedom). - See also: 1/ fisher_cdf 2/ fisher_icdf 3/ randvector 4/ ranm + See also: 1/ fisher_cdf 2/ fisher_icdf 3/ randvector 4/ ranm Ex1:fisherd(4,10,2.1) Ex2:fisherd(4,4,2.1) Ex3: randvector(5,fisher,4,6) Ex4: ranm(2,3,fisher,4,6) - + ''' return GiacMethods['fisherd'](self,*args) @@ -5947,10 +5947,10 @@ cdef class GiacMethods_base: Help for fisherd_cdf: fisherd_cdf(Intg(n),Intg(m),Real(x0)) Returns the probability that a Fisher-Snedecor random variable is less than x0 (n and m are the numbers of degrees of freedom). - See also: 1/ UTPF 2/ fisher_icdf 3/ fisherd + See also: 1/ UTPF 2/ fisher_icdf 3/ fisherd Ex1:fisherd_cdf(4,4,2.1) Ex2:fisherd_cdf(4,10,3.5) - + ''' return GiacMethods['fisherd_cdf'](self,*args) @@ -5959,10 +5959,10 @@ cdef class GiacMethods_base: Help for fisherd_icdf: fisherd_icdf(Intg(n),Intg(m),Real(p)) Returns h such as the probability that a Fisher-Snedecor random variable is less than h is p (n and m are the numbers of degrees of freedom and 0<=p<=1). - See also: 1/ fisher_cdf 2/ fisherd + See also: 1/ fisher_cdf 2/ fisherd Ex1:fisherd_icdf(4,10,0.95) Ex2:fisherd_icdf(4,10,0.05) - + ''' return GiacMethods['fisherd_icdf'](self,*args) @@ -5971,11 +5971,11 @@ cdef class GiacMethods_base: Help for fitdistr: fitdistr(Lst(L),Fnc(D)) Returns the distribution of type D which fits most closely to the i.i.d. samples in the list L. - See also: 1/ normald 2/ poisson 3/ exponentiald 4/ geometric 5/ gammad 6/ betad 7/ cauchyd 8/ weibulld 9/ sample 10/ randvector 11/ randvar + See also: 1/ normald 2/ poisson 3/ exponentiald 4/ geometric 5/ gammad 6/ betad 7/ cauchyd 8/ weibulld 9/ sample 10/ randvector 11/ randvar Ex1:fitdistr(randvector(1000,weibulld,1/2,1),weibull) Ex2: X:=randvar(normal,stddev=9.5):;Y:=randvar(normal,stddev=1.5):;S:=sample(eval(X/Y,0),1000):;Z:=fitdistr(S,cauchy) Ex3: X:=randvar(normal,mean=5,variance=2):;S:=sample(exp(X),1000):;fitdistr(log(S),normal) - + ''' return GiacMethods['fitdistr'](self,*args) @@ -5984,9 +5984,9 @@ cdef class GiacMethods_base: Help for flatten: flatten(Lst) Recursively flatten a list containing lists. - See also: 1/ mat2list + See also: 1/ mat2list Ex1:flatten([[1,[2,3],4],[5,6]]) - + ''' return GiacMethods['flatten'](self,*args) @@ -5995,12 +5995,12 @@ cdef class GiacMethods_base: Help for float2rational: float2rational(Expr) Converts the expression to a rational or real expression. - See also: 1/ + See also: 1/ Ex1:float2rational(-2) Ex2:float2rational(1.5) Ex3:float2rational(1.4141) Ex4:float2rational(0.156381102937) - + ''' return GiacMethods['float2rational'](self,*args) @@ -6009,10 +6009,10 @@ cdef class GiacMethods_base: Help for floor: floor(Real or Cplx) Returns the greatest integer <= to the argument. - See also: 1/ round 2/ ceil 3/ iPart 4/ trunc + See also: 1/ round 2/ ceil 3/ iPart 4/ trunc Ex1:floor(-2.5) Ex2:floor(2.5-4.2*i) - + ''' return GiacMethods['floor'](self,*args) @@ -6021,10 +6021,10 @@ cdef class GiacMethods_base: Help for flow_polynomial: flow_polynomial(Graph(G),[Var(x)]) Returns the flow polynomial [or its value at point x] of undirected unweighted graph G. - See also: 1/ chromatic_polynomial 2/ reliability_polynomial 3/ tutte_polynomial + See also: 1/ chromatic_polynomial 2/ reliability_polynomial 3/ tutte_polynomial Ex1:flow_polynomial(graph("tetrahedron")) Ex2:flow_polynomial(graph("tetrahedron"),5) - + ''' return GiacMethods['flow_polynomial'](self,*args) @@ -6034,7 +6034,7 @@ cdef class GiacMethods_base: fmod(Real(a),Real(b)) Returns a mod b for a and b floats. Ex1:fmod(10.0,pi) - + ''' return GiacMethods['fmod'](self,*args) @@ -6043,9 +6043,9 @@ cdef class GiacMethods_base: Help for foldl: foldl(op,id,Seq(r1,r2,...)) Returns the composition of the binary operator or function op, with an identity or initial value id onto its arguments r1, r2, ..., associating from the left. - See also: 1/ apply 2/ foldr 3/ map + See also: 1/ apply 2/ foldr 3/ map Ex1:foldl(F,init,a,b,c) - + ''' return GiacMethods['foldl'](self,*args) @@ -6054,9 +6054,9 @@ cdef class GiacMethods_base: Help for foldr: foldr(op,id,Seq(r1,r2,...)) Returns the composition of the binary operator or function op, with an identity or initial value id onto its arguments r1, r2, ..., associating from the right. - See also: 1/ apply 2/ foldl 3/ map + See also: 1/ apply 2/ foldl 3/ map Ex1:foldr(F,init,a,b,c) - + ''' return GiacMethods['foldr'](self,*args) @@ -6065,13 +6065,13 @@ cdef class GiacMethods_base: Help for fonction_derivee: fonction_derivee(Fnc(f)) Returns the derivative function of the function f. - See also: 1/ diff 2/ ' 3/ @ + See also: 1/ diff 2/ ' 3/ @ Ex1:fonction_derivee(sin+id) Ex2:fonction_derivee(sq@sin+id) Ex3:fonction_derivee(ln)(x,y) Ex4:fonction_derivee(ln)([x,y]) - Ex5: (function_diff @@3)(ln)('x') - + Ex5: (function_diff @@3)(ln)('x') + ''' return GiacMethods['fonction_derivee'](self,*args) @@ -6080,10 +6080,10 @@ cdef class GiacMethods_base: Help for forward: forward(NULL or Real(n)) The turtle takes n steps forward (by default n=10). - See also: 1/ recule 2/ saute + See also: 1/ recule 2/ saute Ex1: avance 30 Ex2:forward(30) - + ''' return GiacMethods['forward'](self,*args) @@ -6092,7 +6092,7 @@ cdef class GiacMethods_base: Help for fourier: fourier(Expr(f(x)),[Var(x),[Var(s)]]) Returns the Fourier transform F(s) of f(x). - See also: 1/ ifourier 2/ fourier_cn 3/ fft + See also: 1/ ifourier 2/ fourier_cn 3/ fft Ex1:fourier(x/(x^3-19x+30),x,s) Ex2:fourier((x^2+1)/(x^2-1),x,s) Ex3:fourier(3x^2+2x+1,x,s) @@ -6109,7 +6109,7 @@ cdef class GiacMethods_base: Ex14:fourier(Gamma(1+i*x/3),x,s) Ex15:fourier(atan(x/4)/x,x,s) Ex16:fourier(piecewise(x<=-1,exp(x+1),x<=1,1,exp(2-2x)),x,s) - + ''' return GiacMethods['fourier'](self,*args) @@ -6118,10 +6118,10 @@ cdef class GiacMethods_base: Help for fourier_an: fourier_an(Expr(f(x)),Var(x),Period(T),Intg(n),Real(a)) Returns the n-th Fourier coefficient an=2/T*integrate(f(x)*cos(2*pi*n*x/T),a,a+T). - See also: 1/ fourier_cn 2/ fourier_bn 3/ assume + See also: 1/ fourier_cn 2/ fourier_bn 3/ assume Ex1:fourier_an(x^2,x,2,0,-1) Ex2:fourier_an(x^2,x,2,n,-1) - + ''' return GiacMethods['fourier_an'](self,*args) @@ -6130,10 +6130,10 @@ cdef class GiacMethods_base: Help for fourier_bn: fourier_bn(Expr(f(x)),Var(x),Period(T),Intg(n),Real(a)) Returns the n-th Fourier coefficient bn=2/T*integrate(f(x)*sin(2*pi*n*x/T),a,a+T). - See also: 1/ fourier_cn 2/ fourier_an 3/ assume + See also: 1/ fourier_cn 2/ fourier_an 3/ assume Ex1:fourier_bn(x^2,x,2,0,-1) Ex2:fourier_bn(x^2,x,2,n,-1) - + ''' return GiacMethods['fourier_bn'](self,*args) @@ -6142,10 +6142,10 @@ cdef class GiacMethods_base: Help for fourier_cn: fourier_cn(Expr(f(x)),Var(x),Period(T),Intg(n),Real(a)) Returns the n-th Fourier coefficient cn=1/T*integrate(f(x)*exp(-2*i*pi*n*x/T),a,a+T). - See also: 1/ fourier_an 2/ fourier_bn 3/ assume + See also: 1/ fourier_an 2/ fourier_bn 3/ assume Ex1:fourier_cn(x^2,x,2,0,-1) Ex2:fourier_cn(x^2,x,2,n,-1) - + ''' return GiacMethods['fourier_cn'](self,*args) @@ -6154,11 +6154,11 @@ cdef class GiacMethods_base: Help for fprint: fprint(File(f),Var,[Var,Var...]) Writes in the file f some data. - See also: 1/ fopen 2/ fclose + See also: 1/ fopen 2/ fclose Ex1:fprint(f,x+1,"2") Ex2:fprint(f,"blabla") Ex3:fprint(f,Unquoted,"blabla") - + ''' return GiacMethods['fprint'](self,*args) @@ -6167,13 +6167,13 @@ cdef class GiacMethods_base: Help for frac: frac(Real||LstReal) Returns the fractional part (if x<0 then frac(x)+floor(x)+1=x else frac(x)+floor(x)=x). - See also: 1/ floor 2/ iPart 3/ trunc + See also: 1/ floor 2/ iPart 3/ trunc Ex1:frac(1/2) Ex2:frac(-1/2) Ex3:frac(1.2) Ex4:frac(-1.2) Ex5:frac([3.4,sqrt(2)]) - + ''' return GiacMethods['frac'](self,*args) @@ -6182,9 +6182,9 @@ cdef class GiacMethods_base: Help for fracmod: fracmod(Expr(Xpr),Intg(n)) Returns the fraction a/b such as b*Xpr=a mod n, -sqrt(n)/20),Real(b>0),Real(x>=0)) Returns the probability density of the Gamma law (=x^(a-1)*exp(-b*x)*b^a/Gamma(a)). - See also: 1/ gammad_cdf; 2/ gammad_icdf + See also: 1/ gammad_cdf; 2/ gammad_icdf Ex1:gammad(2.2,1.5,0.8) - + ''' return GiacMethods['gammad'](self,*args) @@ -6318,10 +6318,10 @@ cdef class GiacMethods_base: Help for gammad_cdf: gammad_cdf(Real(a>0),Real(b>0),Real(x0>=0),[Real(y0>=0)]) Returns the probability that a Gamma random variable (with a and b as parameters) is less than x0 or between x0 and y0. - See also: 1/ gammad 2/ gammad_icdf + See also: 1/ gammad 2/ gammad_icdf Ex1:gammad_cdf(2,1,2.96) Ex2:gammad_cdf(2,1,1.4,2.96) - + ''' return GiacMethods['gammad_cdf'](self,*args) @@ -6330,10 +6330,10 @@ cdef class GiacMethods_base: Help for gammad_icdf: gammad_icdf(Real(a>0),Real(b>0),Real(0<=p<=1)) Returns h such that the probability that a Gamma random variable is less than h is p (0<=p<=1). - See also: 1/ gammad_cdf 2/ gammad + See also: 1/ gammad_cdf 2/ gammad Ex1:gammad_icdf(2,1,0.95) Ex2:gammad_icdf(2,1,0.5) - + ''' return GiacMethods['gammad_icdf'](self,*args) @@ -6342,10 +6342,10 @@ cdef class GiacMethods_base: Help for gammavariate: gammavariate(Real(a),Real(b)) Returns a random real according to the Gamma distribution with parameters a>0 and b>0. - See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector + See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector Ex1:gammavariate(1,2) Ex2:gammavariate(1.5,4) - + ''' return GiacMethods['gammavariate'](self,*args) @@ -6354,9 +6354,9 @@ cdef class GiacMethods_base: Help for gauss: gauss(Expr,VectVar) Splits a quadratic form as a sum/difference of squares. - See also: 1/ cholesky + See also: 1/ cholesky Ex1:gauss(x^2+2*a*x*y,[x,y]) - + ''' return GiacMethods['gauss'](self,*args) @@ -6365,12 +6365,12 @@ cdef class GiacMethods_base: Help for gauss15: gauss15(Opt) Option of the area command. - See also: 1/ area + See also: 1/ area Ex1: area(x^2,x=0..1,5,simpson) Ex2: area(x^2,x=0..1,5,rombergt) Ex3: area(x^2,x=0..1,5,rombergm) Ex4:gauss15(area(x^2,x=0..1,5,gauss15)) - + ''' return GiacMethods['gauss15'](self,*args) @@ -6379,12 +6379,12 @@ cdef class GiacMethods_base: Help for gauss_seidel_linsolve: gauss_seidel_linsolve([Real(omega)],Mtrx(A),Vect(b),Real(eps),[Int(maxiter)]) Resolution of a linear system A*X=b by the iterative Gauss-Seidel method (by defaut omega=1) or by relaxation method, with eps as error margin and a number of iterations less than maxiter. - See also: 1/ jacobi_linsolve 2/ linsolve + See also: 1/ jacobi_linsolve 2/ linsolve Ex1: a:=[[100,2],[2,100]];gauss_seidel_linsolve(a,[0,1],1e-12); - Ex2: a:=[[100,2],[2,100]];gauss_seidel_linsolve(table(a),[0,1],1e-12); + Ex2: a:=[[100,2],[2,100]];gauss_seidel_linsolve(table(a),[0,1],1e-12); Ex3: a:=[[100,2],[2,100]];gauss_seidel_linsolve(1.5,a,[0,1],1e-12); - Ex4: a:=[[100,2],[2,100]];gauss_seidel_linsolve(1.5,table(a),[0,1],1e-12); - + Ex4: a:=[[100,2],[2,100]];gauss_seidel_linsolve(1.5,table(a),[0,1],1e-12); + ''' return GiacMethods['gauss_seidel_linsolve'](self,*args) @@ -6393,9 +6393,9 @@ cdef class GiacMethods_base: Help for gaussian_window: gaussian_window(Lst,[Real(a)],[Interval(n1..n2)]) Applies the Gaussian windowing function with parameter 0= b (default a=0.2 and b=1/6.) - See also: 1/ gbasis 2/ gbasis_max_pairs 3/ gbasis_reinject + See also: 1/ gbasis 2/ gbasis_max_pairs 3/ gbasis_reinject Ex1:gbasis_reinject(0.1) Ex2:gbasis_reinject(0.1,0.05) - + ''' return GiacMethods['gbasis_reinject'](self,*args) @@ -6470,9 +6470,9 @@ cdef class GiacMethods_base: Help for gbasis_simult_primes: gbasis_simult_primes(Intg) Gbasis fine-tuning: maximal number of Groebner basis modulo a prime that are computed simultaneously to rebuild a Groebner basis over Q (default 16). Set it to a smaller value if short in memory. - See also: 1/ gbasis 2/ gbasis_max_pairs 3/ gbasis_reinject + See also: 1/ gbasis 2/ gbasis_max_pairs 3/ gbasis_reinject Ex1:gbasis_simult_primes(3) - + ''' return GiacMethods['gbasis_simult_primes'](self,*args) @@ -6481,13 +6481,13 @@ cdef class GiacMethods_base: Help for gcd: gcd((Intg(a) or Poly),(Intg(b) or Poly)) Returns the greatest common divisor of 2 polynomials of several variables or of 2 integers or of 2 rationals. - See also: 1/ lcm 2/ euler 2/ modgcd 3/ ezgcd 4/ psrgcd 5/ heugcd 6/ Gcd + See also: 1/ lcm 2/ euler 2/ modgcd 3/ ezgcd 4/ psrgcd 5/ heugcd 6/ Gcd Ex1:gcd(45,75) Ex2:gcd(15/7,50/9) Ex3:gcd(x^2-2*x+1,x^3-1) Ex4:gcd(t^2-2*t+1,t^2+t-2) Ex5:gcd((x^2-1)*(y^2-1)*z^2,x^3*y^3*z+(-(y^3))*z+x^3*z-z) - + ''' return GiacMethods['gcd'](self,*args) @@ -6496,12 +6496,12 @@ cdef class GiacMethods_base: Help for gcdex: gcdex((Poly or Lst),(Poly or Lst),[Var]) Extended greatest common divisor of 2 polynomials. - See also: 1/ gcd 2/ iegcd + See also: 1/ gcd 2/ iegcd Ex1:gcdex((x-1)^2,x^3-1) Ex2:gcdex((X-1)^2,X^3-1,X) Ex3:gcdex([1,-2,1],[1,0,0,-1]) Ex4:gcdex([1,-2,1],[1,-1,2]) - + ''' return GiacMethods['gcdex'](self,*args) @@ -6510,11 +6510,11 @@ cdef class GiacMethods_base: Help for genpoly: genpoly(Poly(P),Intg(b),Var) Returns the reconstruction of a n-variables polynomial Q(-b/2<=coef<=b/2) from an (n-1)-variable polynomial P and a base b (subst(Q,var=b)=P). - See also: 1/ + See also: 1/ Ex1:genpoly(15,4,x) Ex2:genpoly(7*y+5,6,x) Ex3:genpoly(7*y-5*z,10,x) - + ''' return GiacMethods['genpoly'](self,*args) @@ -6523,12 +6523,12 @@ cdef class GiacMethods_base: Help for geometric: geometric(Real(p),Intg(k)) Returns the value at k of the geometric law with parameter p (0cos(2*x)) Ex4:getType(1.414) - + ''' return GiacMethods['getType'](self,*args) @@ -6611,9 +6611,9 @@ cdef class GiacMethods_base: Help for get_edge_attribute: get_edge_attribute(Graph(G),Edge(e),Seq(tag1=value1,tag2=value2,..)) Returns the attributes tag1, tag2, ... assigned to edge e in G as a sequence of the corresponding values. - See also: 1/ discard_edge_attribute 2/ set_edge_attribute 3/ list_edge_attributes + See also: 1/ discard_edge_attribute 2/ set_edge_attribute 3/ list_edge_attributes Ex1:get_edge_attribute(cycle_graph(3),[1,2],"cost") - + ''' return GiacMethods['get_edge_attribute'](self,*args) @@ -6622,9 +6622,9 @@ cdef class GiacMethods_base: Help for get_edge_weight: get_edge_weight(Graph(G),Edge(e)) Returns the weight of the edge e in the weighted graph G. - See also: 1/ is_weighted 2/ make_weighted 3/ set_edge_weight 4/ weight_matrix + See also: 1/ is_weighted 2/ make_weighted 3/ set_edge_weight 4/ weight_matrix Ex1:get_edge_weight(graph(%{[[1,2],5],[[2,3],6]%}),[1,2]) - + ''' return GiacMethods['get_edge_weight'](self,*args) @@ -6633,9 +6633,9 @@ cdef class GiacMethods_base: Help for get_graph_attribute: get_graph_attribute(Graph(G),Seq(tag1=value1,tag2=value2,..)) Return the graph attributes tag1, tag2, ..., as a sequence of the corresponding values. - See also: 1/ discard_graph_attribute 2/ set_graph_attribute 3/ list_graph_attributes + See also: 1/ discard_graph_attribute 2/ set_graph_attribute 3/ list_graph_attributes Ex1:get_graph_attribute(cycle_graph(3),"name") - + ''' return GiacMethods['get_graph_attribute'](self,*args) @@ -6644,9 +6644,9 @@ cdef class GiacMethods_base: Help for get_vertex_attribute: get_vertex_attribute(Graph(G),Vrtx(v),Seq(tag1=value1,tag2=value2,..)) Returns the attributes tag1, tag2, ... assigned to vertex v in G as a sequence of the corresponding values. - See also: 1/ discard_vertex_attribute 2/ set_vertex_attribute 3/ list_vertex_attributes + See also: 1/ discard_vertex_attribute 2/ set_vertex_attribute 3/ list_vertex_attributes Ex1:get_vertex_attribute(cycle_graph(3),1,"supply") - + ''' return GiacMethods['get_vertex_attribute'](self,*args) @@ -6655,10 +6655,10 @@ cdef class GiacMethods_base: Help for girth: girth(Graph(G)) Returns the length of the shortest cycle in the undirected unweighted graph G. - See also: 1/ odd_girth + See also: 1/ odd_girth Ex1:girth(graph("petersen")) Ex2:girth(hypercube_graph(3)) - + ''' return GiacMethods['girth'](self,*args) @@ -6667,10 +6667,10 @@ cdef class GiacMethods_base: Help for gl_showaxes: gl_showaxes(Opt=Boolean) Option that shows or hides axes. - See also: 1/ switch_axes 2/ axes + See also: 1/ switch_axes 2/ axes Ex1: gl_showaxes=true;plot(sin(x)) - Ex2: gl_showaxes=false;plot(sin(x)) - + Ex2: gl_showaxes=false;plot(sin(x)) + ''' return GiacMethods['gl_showaxes'](self,*args) @@ -6679,9 +6679,9 @@ cdef class GiacMethods_base: Help for grad: grad(Expr(Xpr),LstVar) Returns the gradient of the expression Xpr. - See also: 1/ hessian + See also: 1/ hessian Ex1:grad(2*x^2*y-x*z^3,[x,y,z]) - + ''' return GiacMethods['grad'](self,*args) @@ -6690,10 +6690,10 @@ cdef class GiacMethods_base: Help for gramschmidt: gramschmidt(Basis(B),ScalarProd(Sp)) Returns an orthonormal basis of E with basis B for the scalar product Sp. - See also: 1/ + See also: 1/ Ex1:gramschmidt(-2) Ex2:gramschmidt([1,1+x],(p,q)->integrate(p*q,x,-1,1)) - + ''' return GiacMethods['gramschmidt'](self,*args) @@ -6702,7 +6702,7 @@ cdef class GiacMethods_base: Help for graph: graph([Lst(V)],[Set(E)],[Mtrx(A)],[options]) Create an (un)directed (un)weighted graph from vertices V, edges E, and/or adjacency or weight matrix A. All parameters are optional. - See also: 1/ digraph 2/ trail + See also: 1/ digraph 2/ trail Ex1:graph(5) Ex2:graph([a,b,c]) Ex3:graph([1,2,3],%{[1,2],[2,3],[3,1]%}) @@ -6710,7 +6710,7 @@ cdef class GiacMethods_base: Ex5:graph([a,b,c],[[0,2,0],[2,0,3],[0,3,0]]) Ex6:graph("petersen") Ex7:graph([[0,1,1,0],[1,0,0,1],[1,0,0,0],[0,1,0,0]]) - + ''' return GiacMethods['graph'](self,*args) @@ -6719,9 +6719,9 @@ cdef class GiacMethods_base: Help for graph_automorphisms: graph_automorphisms(Graph(G)) Returns the sequence of generators of Aut(G), the automorphism group of G. Each element is a permutation in the form of list of disjoint cycles. - See also: 1/ cycles2permu 2/ isomorphic_copy 3/ permute_vertices + See also: 1/ cycles2permu 2/ isomorphic_copy 3/ permute_vertices Ex1:graph_automorphisms(graph("petersen")) - + ''' return GiacMethods['graph_automorphisms'](self,*args) @@ -6730,10 +6730,10 @@ cdef class GiacMethods_base: Help for graph_charpoly: graph_charpoly(Graph(G),[Var(x)]) Returns the value p(x) of the characteristic polynomial p of G. If x is omitted, a list of coefficients of p is returned. - See also: 1/ graph_spectrum 2/ charpoly + See also: 1/ graph_spectrum 2/ charpoly Ex1:graph_charpoly(graph(%{[1,2],[2,3]%})) Ex2:graph_charpoly(graph("shrikhande")) - + ''' return GiacMethods['graph_charpoly'](self,*args) @@ -6742,9 +6742,9 @@ cdef class GiacMethods_base: Help for graph_complement: graph_complement(Graph(G)) Return the graph with the same vertex set as G, but whose edge (arc) set consists of the edges (arcs) not present in G. - See also: 1/ edges + See also: 1/ edges Ex1:graph_complement(cycle_graph(5)) - + ''' return GiacMethods['graph_complement'](self,*args) @@ -6753,9 +6753,9 @@ cdef class GiacMethods_base: Help for graph_diameter: graph_diameter(Graph(G)) Returns the maximum distance between a pair of vertices in G or +infinity if G is disconnected. - See also: 1/ allpairs_distance 2/ dijkstra 3/ shortest_path 4/ vertex_distance + See also: 1/ allpairs_distance 2/ dijkstra 3/ shortest_path 4/ vertex_distance Ex1:graph_diameter(graph("petersen")) - + ''' return GiacMethods['graph_diameter'](self,*args) @@ -6764,9 +6764,9 @@ cdef class GiacMethods_base: Help for graph_equal: graph_equal(Graph(G1),Graph(G2)) Returns true iff the input graphs G1 and G2 are equal, that is when the sets of vertices and edges of G1 and G2, as well as the orderings of vertices in both graphs, mutually coincide. If the graphs are weighted (they must both be (un)weighted and (un)directed), weights given to the same edge in two graphs must be equal. - See also: 1/ edges 2/ graph_vertices + See also: 1/ edges 2/ graph_vertices Ex1:graph_equal(graph([1,2,3],%{[1,2],[2,3],[3,1]%}),graph(trail(1,2,3,1))) - + ''' return GiacMethods['graph_equal'](self,*args) @@ -6775,9 +6775,9 @@ cdef class GiacMethods_base: Help for graph_join: graph_join(Graph(G),Graph(H)) Returns the graph obtained by connecting every vertex from G with every vertex from H. The vertex labels in the resulting graph are strings of form "1:u" and "2:v" where u and v are vertices from G and H, respectively. - See also: 1/ disjoint_union 2/ graph_union + See also: 1/ disjoint_union 2/ graph_union Ex1:graph_join(edges(graph_join(cycle_graph(3),graph(2)))) - + ''' return GiacMethods['graph_join'](self,*args) @@ -6786,9 +6786,9 @@ cdef class GiacMethods_base: Help for graph_power: graph_power(Graph(G),Intg(k)) Returns the k-th power of G, where two vertices are connected iff there exists a path of length at most k in the original graph. - See also: 1/ adjacency matrix 2/ graph_diameter 3/ shortest_path + See also: 1/ adjacency matrix 2/ graph_diameter 3/ shortest_path Ex1:graph_power(edges(graph_power(path_graph(5),3))) - + ''' return GiacMethods['graph_power'](self,*args) @@ -6797,10 +6797,10 @@ cdef class GiacMethods_base: Help for graph_rank: graph_rank(Graph(G),[Lst(E)]) Returns the graph rank of G. If optional set E of edges is given, the rank of the spanning subgraph of G with edge set E is returned. - See also: 1/ connected_components 2/ number_of_vertices + See also: 1/ connected_components 2/ number_of_vertices Ex1:graph_rank(graph(%{[1,2],[3,4],[4,5]%})) Ex2:graph_rank(graph(%{[1,2],[3,4],[4,5]%}),[[1,2],[3,4]) - + ''' return GiacMethods['graph_rank'](self,*args) @@ -6809,9 +6809,9 @@ cdef class GiacMethods_base: Help for graph_spectrum: graph_spectrum(Graph(G)) Returns the graph spectrum of G as a list of lists with two elements, each containing an eigenvalue and its multiplicity. - See also: 1/ graph_charpoly 2/ seidel_spectrum 3/ is_integer_graph + See also: 1/ graph_charpoly 2/ seidel_spectrum 3/ is_integer_graph Ex1:graph_spectrum(cycle_graph(5)) - + ''' return GiacMethods['graph_spectrum'](self,*args) @@ -6820,9 +6820,9 @@ cdef class GiacMethods_base: Help for graph_union: graph_union(Seq(G1,G2,...)) Returns the union of the graphs G1, G2, ... The set of vertices of the resulting graph is the union of the sets of vertices of the input graphs and the set of edges of the resulting graph is the union of sets of edges of the input graphs. If the input graphs are weighted, the weight of any common edge is the sum of the weights of that edge in G1, G2, ... - See also: 1/ disjoint_union 2/ graph_join + See also: 1/ disjoint_union 2/ graph_join Ex1:graph_union(edges(graph_union(cycle_graph(4),path_graph(5)))) - + ''' return GiacMethods['graph_union'](self,*args) @@ -6831,9 +6831,9 @@ cdef class GiacMethods_base: Help for graph_vertices: graph_vertices(Graph(G)) Return the list of vertices in G. - See also: 1/ add_vertex 2/ graph 3/ neighbors 4/ permute_vertices 5/ relabel_vertices + See also: 1/ add_vertex 2/ graph 3/ neighbors 4/ permute_vertices 5/ relabel_vertices Ex1:graph_vertices(graph(%{[a,c],[b,c],[a,b]%})) - + ''' return GiacMethods['graph_vertices'](self,*args) @@ -6842,11 +6842,11 @@ cdef class GiacMethods_base: Help for greduce: greduce(Poly,LstPoly,LstVar,[order]) Returns the remainder of the division of a polynomial by a Groebner basis. - See also: 1/ gbasis + See also: 1/ gbasis Ex1:greduce(x*y-1,[x^2-y^2,2*x*y-y^2,y^3],[x,y]) Ex2:greduce(x1^2*x3^2,[x3^3-1,-x2^2-x2*x3-x3^2,x1+x2+x3],[x1,x2,x3],tdeg) Ex3:greduce(x1^2*x3^2-x2,[x3^3-1,-x2^2-x2*x3-x3^2,x1+x2+x3],[x1,x2,x3]) - + ''' return GiacMethods['greduce'](self,*args) @@ -6855,9 +6855,9 @@ cdef class GiacMethods_base: Help for greedy_color: greedy_color(Graph(G),[Permu(p)]) Returns the list of vertex colors (positive integers) obtained by coloring vertices one at a time [in the order given by permutation p], assigning to it the smallest available color. - See also: 1/ is_vertex_colorable 2/ chromatic_number + See also: 1/ is_vertex_colorable 2/ chromatic_number Ex1:greedy_color(graph("petersen")) - + ''' return GiacMethods['greedy_color'](self,*args) @@ -6866,9 +6866,9 @@ cdef class GiacMethods_base: Help for grid_graph: grid_graph(Intg(m),Intg(n),[triangle]) Returns a [triangular] grid graph on m*n vertices, where m,n>=2. - See also: 1/ torus_grid_graph + See also: 1/ torus_grid_graph Ex1:grid_graph(5,8) - + ''' return GiacMethods['grid_graph'](self,*args) @@ -6877,9 +6877,9 @@ cdef class GiacMethods_base: Help for groupermu: groupermu(Permut(a),Permut(b)) Returns the group of permutations generated by a and b. - See also: 1/ + See also: 1/ Ex1:groupermu([1,2,0],[3,1,2,0]) - + ''' return GiacMethods['groupermu'](self,*args) @@ -6888,10 +6888,10 @@ cdef class GiacMethods_base: Help for hadamard: hadamard(Mtrx,Mtrx) Hadamard bound of a matrix or element by element multiplication of 2 matrices. - See also: 1/ .* 2/ * + See also: 1/ .* 2/ * Ex1:hadamard([[1,2],[3,4]]) Ex2:hadamard([[1,2],[3,4]],[[3,4],[5,6]]) - + ''' return GiacMethods['hadamard'](self,*args) @@ -6900,10 +6900,10 @@ cdef class GiacMethods_base: Help for half_cone: half_cone(Pnt(A),Vect(v),Real(t),[Real(h)]) Draws a half-cone with vertex A, direction v and with half_angle=t [and with altitude h]. - See also: 1/ cone 2/ cylinder + See also: 1/ cone 2/ cylinder Ex1:half_cone([0,0,0],[0,0,1],pi/6) Ex2:half_cone([0,0,0],[0,1,1],pi/6,-4) - + ''' return GiacMethods['half_cone'](self,*args) @@ -6912,10 +6912,10 @@ cdef class GiacMethods_base: Help for half_line: half_line((Pnt or Cplx),(Pnt or Cplx)) half_line(A,B) draws the half-line AB with A as origin. - See also: 1/ line + See also: 1/ line Ex1:half_line(i,1+i) Ex2:half_line(point(i),point(1+i)) - + ''' return GiacMethods['half_line'](self,*args) @@ -6927,7 +6927,7 @@ cdef class GiacMethods_base: Ex1:halftan(sin(x)) Ex2:halftan(cos(x)) Ex3:halftan(tan(x)) - + ''' return GiacMethods['halftan'](self,*args) @@ -6936,9 +6936,9 @@ cdef class GiacMethods_base: Help for halftan_hyp2exp: halftan_hyp2exp(ExprTrig) Transforms the trigonometric functions in tan(x/2) and hyperbolic functions to exp. - See also: 1/ hyp2exp 2/ halftan + See also: 1/ hyp2exp 2/ halftan Ex1:halftan_hyp2exp(sin(x)+sinh(x)) - + ''' return GiacMethods['halftan_hyp2exp'](self,*args) @@ -6947,9 +6947,9 @@ cdef class GiacMethods_base: Help for halt: halt(NULL) Puts a program in step-by-step debug mode. - See also: 1/ + See also: 1/ Ex1:halt() - + ''' return GiacMethods['halt'](self,*args) @@ -6959,7 +6959,7 @@ cdef class GiacMethods_base: hamdist(Intg,Intg) Bitwise Hamming distance. Ex1:hamdist(0x12,0x38) - + ''' return GiacMethods['hamdist'](self,*args) @@ -6968,9 +6968,9 @@ cdef class GiacMethods_base: Help for hamming_window: hamming_window(Lst,[Interval(n1..n2)]) Applies the Hamming windowing function to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ bartlett_hann_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window + See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ bartlett_hann_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window Ex1: scatterplot(hamming_window(randvector(1000,0..1))) - + ''' return GiacMethods['hamming_window'](self,*args) @@ -6979,9 +6979,9 @@ cdef class GiacMethods_base: Help for hann_poisson_window: hann_poisson_window(Lst,[Interval(n1..n2)]) Applies the Hann-Poisson windowing function with parameter a (by default a=1) to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ bartlett_hann_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window + See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ bartlett_hann_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window Ex1: scatterplot(hann_poisson_window(randvector(1000,0..1),2)) - + ''' return GiacMethods['hann_poisson_window'](self,*args) @@ -6990,9 +6990,9 @@ cdef class GiacMethods_base: Help for hann_window: hann_window(Lst,[Interval(n1..n2)]) Applies the Hann windowing function to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ bartlett_hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window + See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ bartlett_hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window Ex1: scatterplot(hann_window(randvector(1000,0..1))) - + ''' return GiacMethods['hann_window'](self,*args) @@ -7001,12 +7001,12 @@ cdef class GiacMethods_base: Help for harmonic_conjugate: harmonic_conjugate(Line or Pnt(A),Line or Pnt(B),Line or Pnt(C)) Returns the harmonic conjugate C with respect to A and B of 3 points or of 3 parallel or concurrent lines or the line of conjugates of a point with respect to 2 lines. - See also: 1/ is_harmonic 2/ harmonic_division + See also: 1/ is_harmonic 2/ harmonic_division Ex1:harmonic_conjugate(0,2,3/2) Ex2:harmonic_conjugate(0,1+i,2+2*i) Ex3:harmonic_conjugate(line(0,1+i),line(0,3+i),line(0,i)) Ex4:harmonic_conjugate(line(0,1+i),line(0,3+i),point(3/2+i)) - + ''' return GiacMethods['harmonic_conjugate'](self,*args) @@ -7015,12 +7015,12 @@ cdef class GiacMethods_base: Help for harmonic_division: harmonic_division(Pnt or Line,Pnt or Line,Pnt or Line,Var) Returns 4 points (resp lines) and affects the last argument, such that the 4 points (resp lines) are in a harmonic division and assigns the fourth point to the variable name. - See also: 1/ harmonic_conjugate 2/ is_harmonic + See also: 1/ harmonic_conjugate 2/ is_harmonic Ex1:harmonic_division(0,2,3/2,D) Ex2:harmonic_division(0,1+i,2+2*i,D) Ex3:harmonic_division(line(i,0),line(i,1+i),line(i,3+2*i),D) Ex4:harmonic_division(line(0,1+i),line(0,3+i),line(0,i),D) - + ''' return GiacMethods['harmonic_division'](self,*args) @@ -7029,10 +7029,10 @@ cdef class GiacMethods_base: Help for has: has(Expr,Var) Checks if a variable is in an expression. - See also: 1/ lname 2/ lvar + See also: 1/ lname 2/ lvar Ex1:has(x+y,x) Ex2:has(x+y,n) - + ''' return GiacMethods['has'](self,*args) @@ -7041,10 +7041,10 @@ cdef class GiacMethods_base: Help for has_arc: has_arc(Graph(G),Edge(e)) Returns true iff the arc e=[i,j] is contained in digraph G or, if e={i,j} is a set, iff G has both edges [i,j] and [j,i]. - See also: 1/ edges 2/ has_edge + See also: 1/ edges 2/ has_edge Ex1:has_arc(digraph(trail(1,2,3,4,1)),[4,2]) Ex2:has_arc(digraph(trail(1,2,3,4,1)),%{4,2%}) - + ''' return GiacMethods['has_arc'](self,*args) @@ -7053,9 +7053,9 @@ cdef class GiacMethods_base: Help for has_edge: has_edge(Graph(G),Edge(e)) Returns true iff the edge e=[i,j] is contained in undirected graph G. - See also: 1/ edges 2/ has_arc + See also: 1/ edges 2/ has_arc Ex1:has_edge(graph(trail(1,2,3,4,1)),[2,4]) - + ''' return GiacMethods['has_edge'](self,*args) @@ -7064,7 +7064,7 @@ cdef class GiacMethods_base: Help for hasard: hasard(Intg(n) or Interval(p..n) or NULL,[Intg(b1) or Lst(L)],[Intg(b2)]) (hasard n)=a random integer (resp (hasard p,n)=a real or hasard(p..n)=a real function) with uniform distribution in 0..n-1 (resp in [p;n])(hasard= (hasard 0,1)=a random real in [0,1[) or hasard(n,b1,b2)=n integers between b1 and b2 or hasard(n,L)=n elements of L. If hasard has only one argument, () are not necessary (compatibility with turtle language). - See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ srand + See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ srand Ex1: hasard 4 Ex2: hasard(4) Ex3:hasard(0,2) @@ -7072,7 +7072,7 @@ cdef class GiacMethods_base: Ex5: f:=hasard 0..2 Ex6:hasard(3,1,10) Ex7:hasard(3,["r","r","r","b","n"]) - + ''' return GiacMethods['hasard'](self,*args) @@ -7081,11 +7081,11 @@ cdef class GiacMethods_base: Help for head: head(Vect or Seq or Str) Shows the first element of a vector or a sequence or a string. - See also: 1/ back 2/ tail 3/ mid 4/ left 5/ right + See also: 1/ back 2/ tail 3/ mid 4/ left 5/ right Ex1:head(1,2,3) Ex2:head([1,2,3]) Ex3:head("bonjour") - + ''' return GiacMethods['head'](self,*args) @@ -7094,11 +7094,11 @@ cdef class GiacMethods_base: Help for heading: heading(NULL or Real) Returns the turtle cap in degrees or turns the turtle in the direction given by the argument. - See also: 1/ position 2/ initialise + See also: 1/ position 2/ initialise Ex1: cap Ex2:heading() Ex3:heading(cap 90) - + ''' return GiacMethods['heading'](self,*args) @@ -7107,8 +7107,8 @@ cdef class GiacMethods_base: Help for heapify: heapify(List) Partial ordering of a list as a heap. - See also: 1/ heappush 2/ heappop - + See also: 1/ heappush 2/ heappop + ''' return GiacMethods['heapify'](self,*args) @@ -7117,8 +7117,8 @@ cdef class GiacMethods_base: Help for heappop: heappop(List) Removes and returns the root node of a heap. - See also: 1/ heapify 2/ heappush - + See also: 1/ heapify 2/ heappush + ''' return GiacMethods['heappop'](self,*args) @@ -7127,8 +7127,8 @@ cdef class GiacMethods_base: Help for heappush: heappush(List,Object) Adds an object in a heap. - See also: 1/ heapify 2/ heappop - + See also: 1/ heapify 2/ heappop + ''' return GiacMethods['heappush'](self,*args) @@ -7137,10 +7137,10 @@ cdef class GiacMethods_base: Help for hermite: hermite(Intg(n)||Matr(A)) Returns the Hermite polynomial of degree n or the Hermite normal form for a matrix with polynomial coefficients (I,U such that I*A=U). - See also: 1/ legendre 2/ laguerre 3/ smith 4/ ihermite 5/ ismith + See also: 1/ legendre 2/ laguerre 3/ smith 4/ ihermite 5/ ismith Ex1:hermite(3) Ex2: n:=5; a:=ranm(n,n) % 17; l,u:=hermite(x-a);normal(l*(x-a)-u); - + ''' return GiacMethods['hermite'](self,*args) @@ -7149,13 +7149,13 @@ cdef class GiacMethods_base: Help for hessenberg: hessenberg(Mtrx(A),[Intg(n)]) Matrix reduction to Hessenberg form. Returns [P,B] such that B=inv(P)*A*P, by default n=0 the result is exact else the result is numeric. For n=-1 B is triangular, n=-2 P is orthogonal and if n is prime the result is mod n. - See also: 1/ SCHUR + See also: 1/ SCHUR Ex1:hessenberg([[1,2,3],[4,5,6],[7,8,1]]) Ex2:hessenberg([[1,2,3,4],[4,5,6,7],[7,8,9,0],[0,1,2,3]]) Ex3:hessenberg([[1,2,3],[4,5,6],[7,8,1]],-1) Ex4:hessenberg([[1,2,3],[4,5,6],[7,8,1]],-2) Ex5:hessenberg([[1,2,3],[4,5,6],[7,8,1]],3) - + ''' return GiacMethods['hessenberg'](self,*args) @@ -7164,9 +7164,9 @@ cdef class GiacMethods_base: Help for hessian: hessian(Expr(Xpr),LstVar) Returns the hessian of the expression Xpr. - See also: 1/ grad + See also: 1/ grad Ex1:hessian(2*x^2*y-x*z,[x,y,z]) - + ''' return GiacMethods['hessian'](self,*args) @@ -7175,9 +7175,9 @@ cdef class GiacMethods_base: Help for heugcd: heugcd(Poly,Poly) GCD of 2 polynomials, with the algorithm called heuristic pgcd. - See also: 1/ gcd 2/ modgcd 3/ ezgcd 4/ psrgcd + See also: 1/ gcd 2/ modgcd 3/ ezgcd 4/ psrgcd Ex1:heugcd(x^4-1,(x-1)^2) - + ''' return GiacMethods['heugcd'](self,*args) @@ -7186,12 +7186,12 @@ cdef class GiacMethods_base: Help for hexagon: hexagon(Pnt(A)||Cplx,Pnt(B)||Cplx,[Pnt(P)],[Var(C)],[Var(D)],[Var(E)],[Var(F)]) Returns and draws the hexagon of side AB (ABCDEF is direct) (in the plane ABP). - See also: 1/ isopolygon 2/ polygon + See also: 1/ isopolygon 2/ polygon Ex1:hexagon(i,1+i) Ex2:hexagon(i,1+i,C,D,E,F) Ex3:hexagon(point(0,0,0),point(3,3,3),point(0,0,3)) Ex4:hexagon(point(0,0,0),point(3,3,3),point(0,0,3),C,D,E,F) - + ''' return GiacMethods['hexagon'](self,*args) @@ -7200,9 +7200,9 @@ cdef class GiacMethods_base: Help for highlight_edges: highlight_edges(Graph(G),Edge(e)||Lst(E),[Color(c)||Lst(C)]) Changes color of edge e resp. colors of edges in E of the input graph V to c resp C (by default red) and returns the modified copy of G. - See also: 1/ highlight_vertex 2/ highlight_subgraph 3/ highlight_trail + See also: 1/ highlight_vertex 2/ highlight_subgraph 3/ highlight_trail Ex1: draw_graph(highlight_edges(cycle_graph(3),[1,2])) - + ''' return GiacMethods['highlight_edges'](self,*args) @@ -7211,9 +7211,9 @@ cdef class GiacMethods_base: Help for highlight_subgraph: highlight_subgraph(Graph(G),Graph(S)||Lst(S1,S2,..),Seq(c1,c2)) Changes colors of edges and vertices from the sugbraph S or list of subgraphs S1, S2, ... of G to c1 and c2, respectively (red and green by default), and returns the modified copy of G. - See also: 1/ highlight_edges 2/ highlight_vertex 3/ highlight_trail + See also: 1/ highlight_edges 2/ highlight_vertex 3/ highlight_trail Ex1: draw_graph(highlight_subgraph(cycle_graph(5),path_graph(3))) - + ''' return GiacMethods['highlight_subgraph'](self,*args) @@ -7222,9 +7222,9 @@ cdef class GiacMethods_base: Help for highlight_trail: highlight_trail(Graph(G),Trail(t)||Lst(T),[Color(c)||Lst(C)]) Changes colors of edges in G which lie along the trail t resp. trails in T to c resp. C (by default red) and returns the modified copy of G. - See also: 1/ highlight_edges 2/ highlight_subgraph 3/ highlight_vertex + See also: 1/ highlight_edges 2/ highlight_subgraph 3/ highlight_vertex Ex1: draw_graph(highlight_trail(cycle_graph(5),trail(1,2,3),green) - + ''' return GiacMethods['highlight_trail'](self,*args) @@ -7233,9 +7233,9 @@ cdef class GiacMethods_base: Help for highlight_vertex: highlight_vertex(Graph(G),Vrtx(v)||Lst(V),[Color(c)||Lst(C)]) Changes the color of vertex v resp. colors of vertices from V in G to c resp. C (green by default) and returns the modified copy of G. - See also: 1/ highlight_edges 2/ highlight_subgraph 3/ highlight_trail + See also: 1/ highlight_edges 2/ highlight_subgraph 3/ highlight_trail Ex1: draw_graph(highlight_vertex(cycle_graph(3),1)) - + ''' return GiacMethods['highlight_vertex'](self,*args) @@ -7244,9 +7244,9 @@ cdef class GiacMethods_base: Help for highpass: highpass(Lst(s),Real(c),[Intg(samplerate)]) Returns the result of applying a simple first-order highpass RC filter with cutoff frequency c (the default samplerate is 44100) to the given signal s. - See also: 1/ lowpass 2/ moving_average + See also: 1/ lowpass 2/ moving_average Ex1: f:=unapply(periodic(sign(x),x,-1/880,1/880),x):;s:=createwav(apply(f,soundsec(1))):;playsnd(highpass(s,5000)) - + ''' return GiacMethods['highpass'](self,*args) @@ -7255,9 +7255,9 @@ cdef class GiacMethods_base: Help for hilbert: hilbert(Intg(n)) Returns the order n Hilbert matrix : Hjk=1/(j+k+1) j,k=1..n. - See also: 1/ + See also: 1/ Ex1:hilbert(4) - + ''' return GiacMethods['hilbert'](self,*args) @@ -7266,7 +7266,7 @@ cdef class GiacMethods_base: Help for histogram: histogram(Lst(data),[Lst(eff) || Intg(nc) || Real(classmin)],[Real(classsize)]) Draws the histogram of data, optional arguments are eff (number of data for each data element) or nc the number of classes or the classes minimum and size. - See also: 1/ cumulated_frequencies 2/ classes 3/ bar_plot 4/ frequencies + See also: 1/ cumulated_frequencies 2/ classes 3/ bar_plot 4/ frequencies Ex1:histogram([1,2,1,1,2,1,2,4,3,3]) Ex2:histogram([1,2,1,1,2,1,2,4,3,3],0.5,1) Ex3:histogram(seq(rand(1000),k,0,100),0,100) @@ -7275,7 +7275,7 @@ cdef class GiacMethods_base: Ex6:histogram([[1.5..1.65,50],[1.65..1.7,20],[1.7..1.8,30]]) Ex7:histogram(seq(rand(1000),k,0,100),0,100) Ex8:histogram(seq(rand(1000),k,0,100),10) - + ''' return GiacMethods['histogram'](self,*args) @@ -7284,11 +7284,11 @@ cdef class GiacMethods_base: Help for hold: hold(Expr) Returns its argument unevaluated (and also a:=quote(a) purges a). - See also: 1/ + See also: 1/ Ex1:hold(1+2) Ex2:hold(1/x+1/(x-1)) Ex3:hold((x+1)*(x-1)) - + ''' return GiacMethods['hold'](self,*args) @@ -7299,7 +7299,7 @@ cdef class GiacMethods_base: Make P homogeneous by adding a variable (by default t) Ex1:homogeneize(x^2-1) Ex2:homogeneize(x^2-y,z) - + ''' return GiacMethods['homogeneize'](self,*args) @@ -7308,12 +7308,12 @@ cdef class GiacMethods_base: Help for homothety: homothety(Pnt(C),Real(k),Pnt(A)) homothety(C,k,A)=point A1 such as vect(C,A1)=k*vect(C,A) i.e in 2d it is the similarity with center C, coeff abs(k) and angle arg(k). - See also: 1/ similarity 2/ inversion + See also: 1/ similarity 2/ inversion Ex1:homothety(1+i,1/3,i) Ex2:homothety(point(1,1,1),1/3,point(0,1,0)) Ex3: h:=homothety(1+i,1/3);h(i) Ex4: h:=homothety(point(1,1,1),1/3);h(point(0,1,0)) - + ''' return GiacMethods['homothety'](self,*args) @@ -7322,12 +7322,12 @@ cdef class GiacMethods_base: Help for horner: horner(Poly(P),Real(a)) Returns the value of P(a) calculated with Horner's method. With horner(list_alpha_i,list_x_i,x), evals an interpolation polynomial from the divided differences of x. - See also: 1/ convert 2/ base 3/ revlist + See also: 1/ convert 2/ base 3/ revlist Ex1:horner(x^2+1,2) Ex2:horner([1,0,1],2) Ex3:horner(x^2+y*x+y^3-1,2,y) Ex4: X:=[0.0,1.0,2.0]; A:=lagrange(X,exp,lagrange); horner(A,X,1.5); - + ''' return GiacMethods['horner'](self,*args) @@ -7336,14 +7336,14 @@ cdef class GiacMethods_base: Help for hybrid_solver: hybrid_solver(Opt) Argument for fsolve giving the method for solving a system of numerical equations. - See also: 1/ fsolve + See also: 1/ fsolve Ex1: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],dnewton_solver) Ex2: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybrid_solver) Ex3: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybrids_solver) Ex4: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybridj_solver) Ex5: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybridsj_solver) Ex6: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],newtonj_solver) - + ''' return GiacMethods['hybrid_solver'](self,*args) @@ -7352,14 +7352,14 @@ cdef class GiacMethods_base: Help for hybridj_solver: hybridj_solver(Opt) Argument for fsolve giving the method for solving a system of numerical equations. - See also: 1/ fsolve + See also: 1/ fsolve Ex1: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],dnewton_solver) Ex2: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybrid_solver) Ex3: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybrids_solver) Ex4: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybridj_solver) Ex5: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybridsj_solver) Ex6: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],newtonj_solver) - + ''' return GiacMethods['hybridj_solver'](self,*args) @@ -7368,14 +7368,14 @@ cdef class GiacMethods_base: Help for hybrids_solver: hybrids_solver(Opt) Argument for fsolve giving the method for solving a system of numerical equations. - See also: 1/ fsolve + See also: 1/ fsolve Ex1: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],dnewton_solver) Ex2: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybrid_solver) Ex3: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybrids_solver) Ex4: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybridj_solver) Ex5: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybridsj_solver) Ex6: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],newtonj_solver) - + ''' return GiacMethods['hybrids_solver'](self,*args) @@ -7384,14 +7384,14 @@ cdef class GiacMethods_base: Help for hybridsj_solver: hybridsj_solver(Opt) Argument for fsolve giving the method for solving a system of numerical equations. - See also: 1/ fsolve + See also: 1/ fsolve Ex1: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],dnewton_solver) Ex2: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybrid_solver) Ex3: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybrids_solver) Ex4: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybridj_solver) Ex5: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybridsj_solver) Ex6: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],newtonj_solver) - + ''' return GiacMethods['hybridsj_solver'](self,*args) @@ -7400,9 +7400,9 @@ cdef class GiacMethods_base: Help for hyp2exp: hyp2exp(ExprHyperb) Transforms the hyperbolic functions to the exponential function. - See also: 1/ halftan_hyp2exp + See also: 1/ halftan_hyp2exp Ex1:hyp2exp(cosh(x)) - + ''' return GiacMethods['hyp2exp'](self,*args) @@ -7411,12 +7411,12 @@ cdef class GiacMethods_base: Help for hyperbola: hyperbola(Focus(F1),Focus(F2),(Pnt(M) or Real(a))) hyperbola(F1,F2,M)=hyperbola with foci F1,F2 through M or (|MF1-MF2|=2*a geo2d) and hyperbola(p(x,y)) draws the conic if deg(p)=2. - See also: 1/ ellipse 2/ parabola + See also: 1/ ellipse 2/ parabola Ex1:hyperbola(-1,1,point(1+i)) Ex2:hyperbola(-1,1,sqrt(5)-1) Ex3:hyperbola(point(-1,0,0),point(1,0,0),point(1,1,1)) Ex4:hyperbola(x^2-y^2+y+2) - + ''' return GiacMethods['hyperbola'](self,*args) @@ -7425,9 +7425,9 @@ cdef class GiacMethods_base: Help for hypercube_graph: hypercube_graph(Intg(n)) Constructs and returns the hypercube graph in dimension n (with 2^n vertices). - See also: 1/ graph + See also: 1/ graph Ex1:hypercube_graph(3) - + ''' return GiacMethods['hypercube_graph'](self,*args) @@ -7436,11 +7436,11 @@ cdef class GiacMethods_base: Help for iPart: iPart(Real||LstReal) Returns the argument without its fractional part (type=DOM_FLOAT). - See also: 1/ fPart 2/ floor 3/ trunc + See also: 1/ fPart 2/ floor 3/ trunc Ex1:iPart(4.3) Ex2:iPart(sqrt(2)) Ex3:iPart(4.3,sqrt(2)) - + ''' return GiacMethods['iPart'](self,*args) @@ -7449,11 +7449,11 @@ cdef class GiacMethods_base: Help for iabcuv: iabcuv(Intg(a),Intg(b),Intg(c)) Returns [u,v] such that au+bv=c for 3 integers a,b,c. - See also: 1/ iegcd 2/ abcuv + See also: 1/ iegcd 2/ abcuv Ex1:iabcuv(21,28,7) Ex2:iabcuv(21,28,14) Ex3:iabcuv(21,28,1) - + ''' return GiacMethods['iabcuv'](self,*args) @@ -7462,9 +7462,9 @@ cdef class GiacMethods_base: Help for ibasis: ibasis(Lst(Vect,..,Vect),Lst(Vect,..,Vect)) Basis of the intersection of two vector spaces. - See also: 1/ basis + See also: 1/ basis Ex1:ibasis([[1,0,0],[0,1,0]],[[1,1,1],[0,0,1]]) - + ''' return GiacMethods['ibasis'](self,*args) @@ -7473,13 +7473,13 @@ cdef class GiacMethods_base: Help for ibpdv: ibpdv(Expr(f(x)),Expr(v(x)),[Var(x)],[Real(a)],[Real(b)]) Integration by parts of f(x)=u(x)*v'(x) with f(x) as 1st argument and v(x) (or 0) as 2nd argument. You can specify a variable of integration and also calculate the integral (bounds a and b). - See also: 1/ ibpu 2/ int + See also: 1/ ibpu 2/ int Ex1:ibpdv(ln(x),x) Ex2:ibpdv(ln(x),x,x,1,3) Ex3:ibpdv(x*ln(x),x^2/2) Ex4:ibpdv([x*ln(x),-1],0) Ex5:ibpdv(ibpdv(ln(x),x,x,2,3),0,x,2,3) - + ''' return GiacMethods['ibpdv'](self,*args) @@ -7488,13 +7488,13 @@ cdef class GiacMethods_base: Help for ibpu: ibpu(Expr(f(x)),Expr(u(x)),[Var(x)],[Real(a)],[Real(b)]) Integration by parts of f(x)=u(x)*v'(x) with f(x) as 1st argument and u(x) (or 0) as 2nd argument. You can specify a variable of integration and also calculate the integral (bounds a and b). - See also: 1/ ibpdv 2/ int + See also: 1/ ibpdv 2/ int Ex1:ibpu(ln(x),ln(x)) Ex2:ibpu(ln(x),ln(x),x,1,3) Ex3:ibpu(x*ln(x),ln(x)) Ex4:ibpu([x*ln(x),-1],0) Ex5:ibpu(ibpu(ln(x),ln(x),x,2,3),0,x,2,3) - + ''' return GiacMethods['ibpu'](self,*args) @@ -7503,10 +7503,10 @@ cdef class GiacMethods_base: Help for icdf: icdf(Func,FuncParams) Inverse cumulative distribution function. - See also: 1/ cdf 2/ binomial_icdf 3/ normald_icdf + See also: 1/ cdf 2/ binomial_icdf 3/ normald_icdf Ex1:icdf(binomial,10,0.5,0.6) Ex2:icdf(normald,0.0,1.0,0.975) - + ''' return GiacMethods['icdf'](self,*args) @@ -7515,12 +7515,12 @@ cdef class GiacMethods_base: Help for ichinrem: ichinrem(LstIntg(a,p),LstIntg(b,q)) Chinese remainders for integers. - See also: 1/ gcd 2/ fracmod 3/ chinrem 4/ chrem + See also: 1/ gcd 2/ fracmod 3/ chinrem 4/ chrem Ex1:ichinrem([2,7],[3,5]) Ex2:ichinrem([2%7,3%5]) Ex3:ichinrem([2%7,3%5,1%9]) Ex4:ichinrem([(x+1)%2,(x+2)%3,(3*x-1)%5]) - + ''' return GiacMethods['ichinrem'](self,*args) @@ -7529,12 +7529,12 @@ cdef class GiacMethods_base: Help for ichrem: ichrem(LstIntg(a,p),LstIntg(b,q)) Chinese remainders for integers. - See also: 1/ gcd 2/ fracmod 3/ chinrem 4/ chrem + See also: 1/ gcd 2/ fracmod 3/ chinrem 4/ chrem Ex1:ichrem([2,7],[3,5]) Ex2:ichrem([2%7,3%5]) Ex3:ichrem([2%7,3%5,1%9]) Ex4:ichrem([(x+1)%2,(x+2)%3,(3*x-1)%5]) - + ''' return GiacMethods['ichrem'](self,*args) @@ -7543,10 +7543,10 @@ cdef class GiacMethods_base: Help for icomp: icomp(Intg(n),Intg(k),[zeros=true||false]) Returns the list of compositions of n into k parts. - See also: 1/ sum + See also: 1/ sum Ex1:icomp(4,2) Ex2:icomp(6,3,zeros=false) - + ''' return GiacMethods['icomp'](self,*args) @@ -7555,10 +7555,10 @@ cdef class GiacMethods_base: Help for icontent: icontent(Poly,[Var]) GCD of the integer coefficients of a polynomial. - See also: 1/ + See also: 1/ Ex1:icontent(24x^3+6x^2-12x+18) Ex2:icontent(24t^3+6t^2-12t+18,t) - + ''' return GiacMethods['icontent'](self,*args) @@ -7567,10 +7567,10 @@ cdef class GiacMethods_base: Help for icosahedron: icosahedron(Pnt(A),Pnt(B),Pnt(C)) Draws an icosahedron with center A, vertex B and such that the plane ABC contains one vertex among the 5 nearest vertices from B. - See also: 1/ octahedron 2/ dodecahedron 3/ cube 4/ tetrahedron + See also: 1/ octahedron 2/ dodecahedron 3/ cube 4/ tetrahedron Ex1:icosahedron([0,0,0],[sqrt(5),0,0],[1,2,0]) Ex2:icosahedron(evalf([0,0,0],[3,2,4],[1,1,0])) - + ''' return GiacMethods['icosahedron'](self,*args) @@ -7579,9 +7579,9 @@ cdef class GiacMethods_base: Help for id: id(Seq) The name of the identity function (ℝ^n -> ℝ^n). - See also: 1/ sq 2/ sqrt + See also: 1/ sq 2/ sqrt Ex1:id(1,2,3) - + ''' return GiacMethods['id'](self,*args) @@ -7590,10 +7590,10 @@ cdef class GiacMethods_base: Help for identity: identity(Intg(n)) Returns the identity matrix of specified dimension n. - See also: 1/ ranm + See also: 1/ ranm Ex1:identity(3) Ex2:identity(5) - + ''' return GiacMethods['identity'](self,*args) @@ -7602,10 +7602,10 @@ cdef class GiacMethods_base: Help for idivis: idivis(Intg(a) or LstIntg) Returns the list of divisors of an integer. - See also: 1/ divis 2/ ifactors + See also: 1/ divis 2/ ifactors Ex1:idivis(36) Ex2:idivis([36,49]) - + ''' return GiacMethods['idivis'](self,*args) @@ -7614,10 +7614,10 @@ cdef class GiacMethods_base: Help for idn: idn(Intg(n)) Returns the identity matrix of specified dimension n. - See also: 1/ ranm + See also: 1/ ranm Ex1:idn(3) Ex2:idn(5) - + ''' return GiacMethods['idn'](self,*args) @@ -7626,11 +7626,11 @@ cdef class GiacMethods_base: Help for iegcd: iegcd(Intg,Intg) Extended greatest common divisor of 2 integers. - See also: 1/ gcd 2/ iabcuv 3/ egcd + See also: 1/ gcd 2/ iabcuv 3/ egcd Ex1:iegcd(45,75) Ex2:iegcd(21,28) Ex3:iegcd(30,49) - + ''' return GiacMethods['iegcd'](self,*args) @@ -7639,10 +7639,10 @@ cdef class GiacMethods_base: Help for ifactor: ifactor(Intg(a)) Factorization of an integer into prime factors. - See also: 1/ factor 2/ ecm_factor + See also: 1/ factor 2/ ecm_factor Ex1:ifactor(50) Ex2:ifactor(123456789) - + ''' return GiacMethods['ifactor'](self,*args) @@ -7651,10 +7651,10 @@ cdef class GiacMethods_base: Help for ifactors: ifactors(Intg(a) or LstIntg) Returns the list of prime factors of an integer (each factor is followed by its multiplicity). - See also: 1/ ifactor 2/ factors + See also: 1/ ifactor 2/ factors Ex1:ifactors(36) Ex2:ifactors([36,52]) - + ''' return GiacMethods['ifactors'](self,*args) @@ -7663,7 +7663,7 @@ cdef class GiacMethods_base: Help for ifourier: ifourier(Expr(F(s)),[Var(s),[Var(x)]]) Returns the inverse Fourier transform f(x) of F(s). - See also: 1/ fourier 2/ fourier_cn 3/ ifft + See also: 1/ fourier 2/ fourier_cn 3/ ifft Ex1:ifourier(2*pi*(Dirac(s)-sign(s)*sin(s)),s,x) Ex2:ifourier(-2/(s^2-1),s,x) Ex3:ifourier(pi/(exp(pi*s/4)+exp(-pi*s/4)),s,x) @@ -7671,7 +7671,7 @@ cdef class GiacMethods_base: Ex5:ifourier(pi*ugamma(0,4*abs(s)),s,x) Ex6:ifourier(fourier(exp(-abs(x)),x,s)^2,s,x) Ex7:ifourier(sinc(s),s,x) - + ''' return GiacMethods['ifourier'](self,*args) @@ -7680,11 +7680,11 @@ cdef class GiacMethods_base: Help for igamma: igamma(Real(a),Real(x),[1]) Calculates of gamma at a point (a,x). If a and x>0, igamma(a,x)=int(e^{-t}*t^{a-1},t=0..x), (igamma(a,x,1)=igamma(a,x)/Gamma(a)). - See also: 1/ Psi 2/ Beta 3/ Gamma 3/ ugamma + See also: 1/ Psi 2/ Beta 3/ Gamma 3/ ugamma Ex1:igamma(5.0,2.0) Ex2:igamma(-5.1,2.1) Ex3:igamma(5.0,2.0,1) - + ''' return GiacMethods['igamma'](self,*args) @@ -7693,13 +7693,13 @@ cdef class GiacMethods_base: Help for igcd: igcd((Intg(a) or Poly),(Intg(b) or Poly)) Returns the greatest common divisor of 2 polynomials of several variables or of 2 integers or of 2 rationals. - See also: 1/ lcm 2/ euler 2/ modgcd 3/ ezgcd 4/ psrgcd 5/ heugcd 6/ Gcd + See also: 1/ lcm 2/ euler 2/ modgcd 3/ ezgcd 4/ psrgcd 5/ heugcd 6/ Gcd Ex1:igcd(45,75) Ex2:igcd(15/7,50/9) Ex3:igcd(x^2-2*x+1,x^3-1) Ex4:igcd(t^2-2*t+1,t^2+t-2) Ex5:igcd((x^2-1)*(y^2-1)*z^2,x^3*y^3*z+(-(y^3))*z+x^3*z-z) - + ''' return GiacMethods['igcd'](self,*args) @@ -7708,11 +7708,11 @@ cdef class GiacMethods_base: Help for igcdex: igcdex(Intg,Intg) Extended greatest common divisor of 2 integers. - See also: 1/ gcd 2/ iabcuv 3/ egcd + See also: 1/ gcd 2/ iabcuv 3/ egcd Ex1:igcdex(45,75) Ex2:igcdex(21,28) Ex3:igcdex(30,49) - + ''' return GiacMethods['igcdex'](self,*args) @@ -7721,10 +7721,10 @@ cdef class GiacMethods_base: Help for ihermite: ihermite(Mtrx(A)) Hermite normal form of a matrix with coefficients in ℤ : returns L,U such that L is invertible in ℤ, U is upper triangular and U=L*A. - See also: 1/ ismith + See also: 1/ ismith Ex1:ihermite([[9,-36,30], [-36,192,-180], [30,-180,180]]) Ex2:ihermite([[1,2,3],[4,5,6],[7,8,9]]) - + ''' return GiacMethods['ihermite'](self,*args) @@ -7733,11 +7733,11 @@ cdef class GiacMethods_base: Help for ilaplace: ilaplace(Expr,[Var],[IlapVar]) Inverse Laplace transform of a rational fraction. - See also: 1/ laplace 2/ ztrans 3/ invztrans 4/ Heaviside + See also: 1/ laplace 2/ ztrans 3/ invztrans 4/ Heaviside Ex1:ilaplace(1/(x^2+1)^2) Ex2:ilaplace(s/(s^4-1),s,x) Ex3:ilaplace(exp(-s)/s,s,x) - + ''' return GiacMethods['ilaplace'](self,*args) @@ -7746,11 +7746,11 @@ cdef class GiacMethods_base: Help for im: im(Cplx) Returns the imaginary part of a complex number. - See also: 1/ re 2/ conj + See also: 1/ re 2/ conj Ex1:im(1+2*i) Ex2:im((1+2*i)^2) Ex3:im([1+2*i,(1+2*i)^2]) - + ''' return GiacMethods['im'](self,*args) @@ -7759,11 +7759,11 @@ cdef class GiacMethods_base: Help for imag: imag(Cplx) Returns the imaginary part of a complex number. - See also: 1/ re 2/ conj + See also: 1/ re 2/ conj Ex1:imag(1+2*i) Ex2:imag((1+2*i)^2) Ex3:imag([1+2*i,(1+2*i)^2]) - + ''' return GiacMethods['imag'](self,*args) @@ -7772,10 +7772,10 @@ cdef class GiacMethods_base: Help for image: image(Mtrx(M)) Image of a linear map with matrix M. - See also: 1/ ker 2/ rref + See also: 1/ ker 2/ rref Ex1:image([[1,2],[3,6]]) Ex2:image([[1,2,3],[1,3,6],[2,5,9]]) - + ''' return GiacMethods['image'](self,*args) @@ -7784,7 +7784,7 @@ cdef class GiacMethods_base: Help for implicitdiff: implicitdiff(constr,[depvars],y,diffvars) Implicit differentiation. - See also: 1/ diff + See also: 1/ diff Ex1:implicitdiff(x^2*y+y^2=1,y,x) Ex2:implicitdiff(R=P*V/T,P,T) Ex3:implicitdiff([x^2+y=z,x+y*z=1],[y(x),z(x)],y,x) @@ -7803,7 +7803,7 @@ cdef class GiacMethods_base: Ex16:implicitdiff(x*y*z,-2x^3+15x^2*y+11y^3-24y=0,[x,z,y],order=1) Ex17:implicitdiff(x*y*z,-2x^3+15x^2*y+11y^3-24y=0,[x,z,y],order=2,[1,-1,0]) Ex18: pd:=implicitdiff(x*y*z,-2x^3+15x^2*y+11y^3-24y=0,[x,z,y],order=4,[0,z,0]);pd[4,0,0] - + ''' return GiacMethods['implicitdiff'](self,*args) @@ -7812,7 +7812,7 @@ cdef class GiacMethods_base: Help for implicitplot: implicitplot(Expr,Var1,Var2) plotimplicit(f(x,y),x,y) or plotimplicit(f(x,y),[x,y]) draws graph of f(x,y)=0. - See also: 1/ plotcontour 2/ unfactored 3/ plotinequation + See also: 1/ plotcontour 2/ unfactored 3/ plotinequation Ex1:implicitplot(x^2+y^2-1,x,y) Ex2:implicitplot(x^4+y^4=x^2-y^2) Ex3:implicitplot(x^2+y^2-1,x,y,unfactored) @@ -7822,7 +7822,7 @@ cdef class GiacMethods_base: Ex7:implicitplot(y^3=x^3-x^2,[x,y],xstep=0.1,ystep=0.1) Ex8:implicitplot((x+5)^2+(y+4)^2-1,x=-6..-4,y=-5..-3) Ex9:implicitplot((x+5)^2+(y+4)^2-1,[x=-6..-4,y=-5..-3]) - + ''' return GiacMethods['implicitplot'](self,*args) @@ -7832,7 +7832,7 @@ cdef class GiacMethods_base: import_graph(Str("path/to/graphname[.dot]")) Returns the graph constructed from instructions in the file 'path/to/graphname.dot' (in dot format), or "undef" on failure. Ex1:import_graph("K5.dot") - + ''' return GiacMethods['import_graph'](self,*args) @@ -7841,10 +7841,10 @@ cdef class GiacMethods_base: Help for inString: inString(Str(l),Elem(e)) Tests if e is in the string l (returns -1 or k if l[k]=e). - See also: 1/ contains + See also: 1/ contains Ex1:inString("abcd","b") Ex2:inString("abcd","e") - + ''' return GiacMethods['inString'](self,*args) @@ -7853,10 +7853,10 @@ cdef class GiacMethods_base: Help for in_ideal: in_ideal(Poly,Lst,LstVar,[order]) Checks whether a polynomial or list of polynomials belongs to an ideal given by a Grobner basis (2nd argument) with respect to a variable list. - See also: 1/ gbasis 2/ greduce + See also: 1/ gbasis 2/ greduce Ex1:in_ideal((x+y)^2,[y^2,x^2+2*x*y],[x,y]) Ex2:in_ideal(x+y,[y^2,x^2+2*x*y],[x,y]) - + ''' return GiacMethods['in_ideal'](self,*args) @@ -7865,9 +7865,9 @@ cdef class GiacMethods_base: Help for incidence_matrix: incidence_matrix(Graph(G)) Returns the incidence matrix of G whose rows are indexed by the vertices and columns by the edges (in order defined by the command 'edges'). - See also: 1/ incident_edges + See also: 1/ incident_edges Ex1:incidence_matrix(graph("tetrahedron")) - + ''' return GiacMethods['incidence_matrix'](self,*args) @@ -7876,9 +7876,9 @@ cdef class GiacMethods_base: Help for incident_edges: incident_edges(Graph(G),Vrtx(v)) Returns the list of all edges incident to the vertex v of G (or to the vertices in the list v). - See also: 1/ adjacency_matrix 2/ vertex_degree 3/ incidence_matrix 4/ neighbors + See also: 1/ adjacency_matrix 2/ vertex_degree 3/ incidence_matrix 4/ neighbors Ex1:incident_edges(cycle_graph(8),[1,5,7]) - + ''' return GiacMethods['incident_edges'](self,*args) @@ -7887,9 +7887,9 @@ cdef class GiacMethods_base: Help for incircle: incircle((Pnt or Cplx),(Pnt or Cplx),(Pnt or Cplx)) incircle(A,B,C) draws the incircle of the triangle ABC. - See also: 1/ excircle 2/ circumcircle + See also: 1/ excircle 2/ circumcircle Ex1:incircle(0,1,1+i) - + ''' return GiacMethods['incircle'](self,*args) @@ -7898,10 +7898,10 @@ cdef class GiacMethods_base: Help for increasing_power: increasing_power(:=Intg(0 or 1)) Pseudo-variable to control the display of polynomials. - See also: 1/ cas_setup + See also: 1/ cas_setup Ex1: increasing_power:=1 Ex2: increasing_power:=0 - + ''' return GiacMethods['increasing_power'](self,*args) @@ -7910,9 +7910,9 @@ cdef class GiacMethods_base: Help for independence_number: independence_number(Graph(G)) Returns the independence number of G. - See also: 1/ clique_number 2/ graph_complement 3/ maximum_clique 4/ maximum_independent_set + See also: 1/ clique_number 2/ graph_complement 3/ maximum_clique 4/ maximum_independent_set Ex1:independence_number(complete_graph(3,4)) - + ''' return GiacMethods['independence_number'](self,*args) @@ -7921,9 +7921,9 @@ cdef class GiacMethods_base: Help for indets: indets(Expr) List of variables in the expression. - See also: 1/ has 2/ lvar + See also: 1/ has 2/ lvar Ex1:indets(exp(x)*2*sin(y)) - + ''' return GiacMethods['indets'](self,*args) @@ -7932,12 +7932,12 @@ cdef class GiacMethods_base: Help for index: index(Vect,Expr) Index of the first position of an object in a list, a string or a set or returns an error message. - See also: 1/ find 2/ member + See also: 1/ find 2/ member Ex1:index([3,x,1,2,1,3],1) Ex2:index([0,1,3,2,4,2,5],2) Ex3:index(%{4,3,1,2%},1) Ex4:index("abracadabrant","c") - + ''' return GiacMethods['index'](self,*args) @@ -7946,9 +7946,9 @@ cdef class GiacMethods_base: Help for induced_subgraph: induced_subgraph(Graph(G),Lst(V)) Returns the subgraph of G induced by the vertices in list V. - See also: 1/ subgraph + See also: 1/ subgraph Ex1:induced_subgraph(cycle_graph(6),[1,2,6]) - + ''' return GiacMethods['induced_subgraph'](self,*args) @@ -7957,12 +7957,12 @@ cdef class GiacMethods_base: Help for inequationplot: inequationplot(Expr,[x=xrange,y=yrange],[xstep],[ystep]) Shows the graph of the solutions of inequalities with 2 variables. - See also: 1/ plotfunc 2/ plotcontour 3/ plotdensity 4/ plotimplicit + See also: 1/ plotfunc 2/ plotcontour 3/ plotdensity 4/ plotimplicit Ex1:inequationplot(x^2-y^2<3) Ex2:inequationplot(x^2-y^2<3,[x=-2..2,y=-2..2],xstep=0.1,ystep=0.1) Ex3:inequationplot(3-(x^2-y^2),[x=-2..2,y=-2..2],xstep=0.1,ystep=0.1) Ex4:inequationplot([x+y>3,x^2ln(a*b^n) for integers n. - See also: 1/ texpand + See also: 1/ texpand Ex1:lncollect(ln(x)+2*ln(y)) - + ''' return GiacMethods['lncollect'](self,*args) @@ -9904,9 +9904,9 @@ cdef class GiacMethods_base: Help for lnexpand: lnexpand(Expr) Expands logarithms. - See also: 1/ texpand 2/ expexpand 3/ trigexpand + See also: 1/ texpand 2/ expexpand 3/ trigexpand Ex1:lnexpand(ln(3*x)) - + ''' return GiacMethods['lnexpand'](self,*args) @@ -9915,10 +9915,10 @@ cdef class GiacMethods_base: Help for locus: locus(Pnt,Elem) locus(M,A) draws the locus of M (or locus(d,A) draws the envelope of d) when A:=element(C) (C is a curve). The example instructions below must be written in a geometric level on different lines. - See also: 1/ envelope 2/ trace + See also: 1/ envelope 2/ trace Ex1: A:=element(circle(i,1+i));M:=homothety(0,2,A);locus(M,A) Ex2: A:=element(line(x=0));d:=perpen_bisector(1,A);locus(d,A) - + ''' return GiacMethods['locus'](self,*args) @@ -9927,11 +9927,11 @@ cdef class GiacMethods_base: Help for log: log(Expr or Opt) Natural logarithm or option of the convert or convertir command (id trig2exp). - See also: 1/ exp 2/ convert 3/ trig2exp 4/ log10 + See also: 1/ exp 2/ convert 3/ trig2exp 4/ log10 Ex1:log(1) Ex2:log(e) Ex3: convert(cos(x),ln) - + ''' return GiacMethods['log'](self,*args) @@ -9940,9 +9940,9 @@ cdef class GiacMethods_base: Help for log10: log10(Expr) Common logarithm (base 10). - See also: 1/ alog10 2/ ln + See also: 1/ alog10 2/ ln Ex1:log10(10) - + ''' return GiacMethods['log10'](self,*args) @@ -9951,10 +9951,10 @@ cdef class GiacMethods_base: Help for logarithmic_regression: logarithmic_regression(Lst||Mtrx(A),[Lst]) Returns the coefficients a and b of y=a*ln(x)+b : it is the best logarithm which approx the points where the coordinates are the rows of A (or the 2 lists). - See also: 1/ exponential_regression + See also: 1/ exponential_regression Ex1:logarithmic_regression([[1.0,1.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]]) Ex2:logarithmic_regression([1.0,2.0,3.0,4.0],[1.0,4.0,9.0,16.0]) - + ''' return GiacMethods['logarithmic_regression'](self,*args) @@ -9963,10 +9963,10 @@ cdef class GiacMethods_base: Help for logarithmic_regression_plot: logarithmic_regression_plot(Lst||Mtrx(A),[Lst]) Returns the plot of y=a*ln(x)+b : it is the best logarithm which approx the points where the coordinates are the rows of A (or the 2 lists). - See also: 1/ exponential_regression_plot + See also: 1/ exponential_regression_plot Ex1:logarithmic_regression_plot([[1.0,1.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]]) Ex2:logarithmic_regression_plot([1.0,2.0,3.0,4.0],[1.0,4.0,9.0,16.0]) - + ''' return GiacMethods['logarithmic_regression_plot'](self,*args) @@ -9975,10 +9975,10 @@ cdef class GiacMethods_base: Help for logb: logb(Real) Logarithm with base b. - See also: 1/ log 2/ log10 + See also: 1/ log 2/ log10 Ex1:logb(5,2) Ex2:logb(7,10) - + ''' return GiacMethods['logb'](self,*args) @@ -9987,10 +9987,10 @@ cdef class GiacMethods_base: Help for logistic_regression: logistic_regression(Lst(L),Real(x0),Real(y0)) Returns y,y',C,y'max,xmax,R : y is a logistic function (sol of y'/y=a*y+b), such that y(x0)=y0 and where [y'(x0),y'(x0+1)...] is the best approximation of L. - See also: 1/ polynomial_regression 2/ power_regression 3/ linear_regression + See also: 1/ polynomial_regression 2/ power_regression 3/ linear_regression Ex1:logistic_regression(evalf([1,2,4,6,8,7,5]),1,2) Ex2:logistic_regression([0.0,1.0,2.0,3.0,4.0],0.0,1.0) - + ''' return GiacMethods['logistic_regression'](self,*args) @@ -9999,10 +9999,10 @@ cdef class GiacMethods_base: Help for logistic_regression_plot: logistic_regression_plot(Lst(L),Real(x0),Real(y0)) Returns the plot of a logistic function y such that y(x0)=y0 and where [y'(x0),y'(x0+1)...] is the best approximation of L. - See also: 1/ polynomial_regression_plot 2/ power_regression_plot 3/ linear_regression_plot + See also: 1/ polynomial_regression_plot 2/ power_regression_plot 3/ linear_regression_plot Ex1:logistic_regression_plot(evalf([1,2,4,6,8,7,5]),1,2) Ex2:logistic_regression_plot([0.0,1.0,2.0,3.0,4.0],0.0,1.0) - + ''' return GiacMethods['logistic_regression_plot'](self,*args) @@ -10011,10 +10011,10 @@ cdef class GiacMethods_base: Help for lower: lower(Mtrx||Strng) Returns the lower triangular matrix (under the diagonal, included) or writes a string in lowercase. - See also: 1/ diag 2/ upper + See also: 1/ diag 2/ upper Ex1:lower([[1,2,3],[4,5,6],[7,8,9]]) Ex2:lower("HELLO") - + ''' return GiacMethods['lower'](self,*args) @@ -10023,10 +10023,10 @@ cdef class GiacMethods_base: Help for lowest_common_ancestor: lowest_common_ancestor(Graph(T),Vrtx(r),Seq(u,v)||Lst([u1,v1],[u2,v2],...)) Returns the lowest common ancestor of nodes u and v in the tree graph T with root r, or the list of lowest common ancestors of all pairs [uk,vk]. - See also: 1/ is_tree 2/ tree_height + See also: 1/ is_tree 2/ tree_height Ex1: T:=random_tree(30); lowest_common_ancestor(T,15,10,20) Ex2: T:=random_tree(30); lowest_common_ancestor(T,15,[[10,20],[11,19]]) - + ''' return GiacMethods['lowest_common_ancestor'](self,*args) @@ -10035,9 +10035,9 @@ cdef class GiacMethods_base: Help for lowpass: lowpass(Lst(s),Real(c),[Intg(samplerate)]) Returns the result of applying a simple first-order lowpass RC filter with cutoff frequency c (the default samplerate is 44100) to the given signal s. - See also: 1/ highpass 2/ moving_average + See also: 1/ highpass 2/ moving_average Ex1: f:=unapply(periodic(sign(x),x,-1/880,1/880),x):;s:=createwav(apply(f,soundsec(1))):;playsnd(lowpass(s,1000)) - + ''' return GiacMethods['lowpass'](self,*args) @@ -10046,8 +10046,8 @@ cdef class GiacMethods_base: Help for lp_assume: lp_assume(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_assume'](self,*args) @@ -10056,8 +10056,8 @@ cdef class GiacMethods_base: Help for lp_bestprojection: lp_bestprojection(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_bestprojection'](self,*args) @@ -10066,8 +10066,8 @@ cdef class GiacMethods_base: Help for lp_binary: lp_binary(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_binary'](self,*args) @@ -10076,8 +10076,8 @@ cdef class GiacMethods_base: Help for lp_binaryvariables: lp_binaryvariables(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_binaryvariables'](self,*args) @@ -10086,8 +10086,8 @@ cdef class GiacMethods_base: Help for lp_breadthfirst: lp_breadthfirst(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_breadthfirst'](self,*args) @@ -10096,8 +10096,8 @@ cdef class GiacMethods_base: Help for lp_depthfirst: lp_depthfirst(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_depthfirst'](self,*args) @@ -10106,8 +10106,8 @@ cdef class GiacMethods_base: Help for lp_depthlimit: lp_depthlimit(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_depthlimit'](self,*args) @@ -10116,8 +10116,8 @@ cdef class GiacMethods_base: Help for lp_firstfractional: lp_firstfractional(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_firstfractional'](self,*args) @@ -10126,8 +10126,8 @@ cdef class GiacMethods_base: Help for lp_gaptolerance: lp_gaptolerance(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_gaptolerance'](self,*args) @@ -10136,8 +10136,8 @@ cdef class GiacMethods_base: Help for lp_hybrid: lp_hybrid(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_hybrid'](self,*args) @@ -10146,8 +10146,8 @@ cdef class GiacMethods_base: Help for lp_initialpoint: lp_initialpoint(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_initialpoint'](self,*args) @@ -10156,8 +10156,8 @@ cdef class GiacMethods_base: Help for lp_integer: lp_integer(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_integer'](self,*args) @@ -10166,8 +10166,8 @@ cdef class GiacMethods_base: Help for lp_integertolerance: lp_integertolerance(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_integertolerance'](self,*args) @@ -10176,8 +10176,8 @@ cdef class GiacMethods_base: Help for lp_integervariables: lp_integervariables(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_integervariables'](self,*args) @@ -10186,8 +10186,8 @@ cdef class GiacMethods_base: Help for lp_interiorpoint: lp_interiorpoint(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_interiorpoint'](self,*args) @@ -10196,8 +10196,8 @@ cdef class GiacMethods_base: Help for lp_iterationlimit: lp_iterationlimit(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_iterationlimit'](self,*args) @@ -10206,8 +10206,8 @@ cdef class GiacMethods_base: Help for lp_lastfractional: lp_lastfractional(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_lastfractional'](self,*args) @@ -10216,8 +10216,8 @@ cdef class GiacMethods_base: Help for lp_maxcuts: lp_maxcuts(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_maxcuts'](self,*args) @@ -10226,8 +10226,8 @@ cdef class GiacMethods_base: Help for lp_maximize: lp_maximize(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_maximize'](self,*args) @@ -10236,8 +10236,8 @@ cdef class GiacMethods_base: Help for lp_method: lp_method(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_method'](self,*args) @@ -10246,8 +10246,8 @@ cdef class GiacMethods_base: Help for lp_mostfractional: lp_mostfractional(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_mostfractional'](self,*args) @@ -10256,8 +10256,8 @@ cdef class GiacMethods_base: Help for lp_nodelimit: lp_nodelimit(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_nodelimit'](self,*args) @@ -10266,8 +10266,8 @@ cdef class GiacMethods_base: Help for lp_nodeselect: lp_nodeselect(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_nodeselect'](self,*args) @@ -10276,8 +10276,8 @@ cdef class GiacMethods_base: Help for lp_nonnegative: lp_nonnegative(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_nonnegative'](self,*args) @@ -10286,8 +10286,8 @@ cdef class GiacMethods_base: Help for lp_nonnegint: lp_nonnegint(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_nonnegint'](self,*args) @@ -10296,8 +10296,8 @@ cdef class GiacMethods_base: Help for lp_pseudocost: lp_pseudocost(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_pseudocost'](self,*args) @@ -10306,8 +10306,8 @@ cdef class GiacMethods_base: Help for lp_simplex: lp_simplex(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_simplex'](self,*args) @@ -10316,8 +10316,8 @@ cdef class GiacMethods_base: Help for lp_timelimit: lp_timelimit(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_timelimit'](self,*args) @@ -10326,8 +10326,8 @@ cdef class GiacMethods_base: Help for lp_variables: lp_variables(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_variables'](self,*args) @@ -10336,8 +10336,8 @@ cdef class GiacMethods_base: Help for lp_varselect: lp_varselect(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_varselect'](self,*args) @@ -10346,8 +10346,8 @@ cdef class GiacMethods_base: Help for lp_verbose: lp_verbose(Opt) Options for lpsolve command. - See also: 1/ lpsolve - + See also: 1/ lpsolve + ''' return GiacMethods['lp_verbose'](self,*args) @@ -10356,7 +10356,7 @@ cdef class GiacMethods_base: Help for lpsolve: lpsolve(Expr(o),[List(c)],[bounds],[options]) Solves a (mixed integer/binary) LP problem in general form. - See also: 1/ nlpsolve 2/ fsolve + See also: 1/ nlpsolve 2/ fsolve Ex1:lpsolve(2x+y-z+4,[x<=1,y>=2,x+3y-z=2,2x-y+z<=8,-x+y<=5]) Ex2:lpsolve(-4x-5y,[x+2y<=6,5x+4y<=20,0<=x,0<=y]) Ex3:lpsolve(-7x+2y,[4x-12y<=20,-x+3y<=3],x=-5..5,y=0..inf,lp_maximize=true) @@ -10372,7 +10372,7 @@ cdef class GiacMethods_base: Ex13:lpsolve(x1+x2,[2x1+5x2<=16,6x1+5x2<=30],assume=nonnegint,lp_maximize) Ex14:lpsolve(8x1+11x2+6x3+4x4,[5x1+7x2+4x3+3x4<=14],assume=lp_binary,lp_maximize) Ex15:lpsolve(x1+x2,[1867x1+1913x2=3618894],assume=nonnegint,lp_verbose=true) - + ''' return GiacMethods['lpsolve'](self,*args) @@ -10381,9 +10381,9 @@ cdef class GiacMethods_base: Help for lsmod: lsmod(NULL) Displays the installed dynamic libraries. - See also: 1/ insmod 2/ rmmod + See also: 1/ insmod 2/ rmmod Ex1:lsmod() - + ''' return GiacMethods['lsmod'](self,*args) @@ -10392,10 +10392,10 @@ cdef class GiacMethods_base: Help for lsq: lsq(Mtrx(A),(Mtrx || Vect)(B)) Returns the vector (resp matrix) X which is the minimum of the euclidean (resp Frobenius) norm of A*X-B corresponding to the linear system A*X=B when B is a vector (resp matrix). - See also: 1/ lu 2/ QR + See also: 1/ lu 2/ QR Ex1:lsq([[1,2],[3,4]],[5,11]) Ex2:lsq([[1,2],[3,4]],[[5,-1],[11,-1]]) - + ''' return GiacMethods['lsq'](self,*args) @@ -10404,10 +10404,10 @@ cdef class GiacMethods_base: Help for lu: lu(Mtrx) For a numerical matrix A, returns p permutation, L and U such that PA=LU (P=permu2mat(p)). - See also: 1/ qr 2/ cholesky 3/ LU + See also: 1/ qr 2/ cholesky 3/ LU Ex1:lu([[1,2],[3,4]]) Ex2:lu([[6,12,18],[5,14,31],[3,8,18]]) - + ''' return GiacMethods['lu'](self,*args) @@ -10416,10 +10416,10 @@ cdef class GiacMethods_base: Help for lvar: lvar(Expr) List of variables of an object (with rational dependence). - See also: 1/ lname 2/ has + See also: 1/ lname 2/ has Ex1:lvar(exp(x)*2*sin(y)) Ex2:lvar(exp(x)*2*sin(y)+ln(x)) - + ''' return GiacMethods['lvar'](self,*args) @@ -10428,9 +10428,9 @@ cdef class GiacMethods_base: Help for mRow: mRow(Expr(Xpr),Mtrx(A),Intg(n1)) Multiplies row n1 of the matrix A by Xpr. - See also: 1/ rowAdd 2/ mRowAdd + See also: 1/ rowAdd 2/ mRowAdd Ex1:mRow(12,[[1,2],[3,4],[5,6]],0) - + ''' return GiacMethods['mRow'](self,*args) @@ -10439,9 +10439,9 @@ cdef class GiacMethods_base: Help for mRowAdd: mRowAdd(Expr(Xpr),Mtrx(A),Intg(n1),Intg(n2)) Multiplies row n1 of the matrix A by Xpr, then adds it to the row n2. - See also: 1/ rowAdd 2/ mRow + See also: 1/ rowAdd 2/ mRow Ex1:mRowAdd(12,[[1,2],[3,4],[5,6]],0,2) - + ''' return GiacMethods['mRowAdd'](self,*args) @@ -10450,10 +10450,10 @@ cdef class GiacMethods_base: Help for magenta: magenta(Opt) Option of the display command to display with color. - See also: 1/ display + See also: 1/ display Ex1: F:=display(point(2+1.5*i),red) Ex2: F:=display(point(2+1.5*i),point_point+green) - + ''' return GiacMethods['magenta'](self,*args) @@ -10462,9 +10462,9 @@ cdef class GiacMethods_base: Help for make_directed: make_directed(Graph(G),[Mrtx(A)]) Returns the copy of undirected graph G in which every edge is converted to a pair of arcs [and with weights specified by matrix A]. - See also: 1/ is_directed 2/ make_weighted 3/ underlying_graph + See also: 1/ is_directed 2/ make_weighted 3/ underlying_graph Ex1:make_directed(cycle_graph(4),[[0,0,0,1],[2,0,1,3],[0,1,0,4],[5,0,4,0]]) - + ''' return GiacMethods['make_directed'](self,*args) @@ -10473,9 +10473,9 @@ cdef class GiacMethods_base: Help for make_weighted: make_weighted(Graph(G),[Mrtx(M)]) Returns a copy of G with edge/arc weights set as specified by matrix M. If M is omitted, a square matrix of ones is used. If G is undirected, M is assumed to be symmetric. - See also: 1/ get_edge_weight 2/ is_weighted 3/ make_directed 4/ set_edge_weight 5/ underlying_graph 6/ weight_matrix + See also: 1/ get_edge_weight 2/ is_weighted 3/ make_directed 4/ set_edge_weight 5/ underlying_graph 6/ weight_matrix Ex1:make_weighted(cycle_graph(3),[[0,2,3],[2,0,1],[3,1,0]]) - + ''' return GiacMethods['make_weighted'](self,*args) @@ -10484,12 +10484,12 @@ cdef class GiacMethods_base: Help for makelist: makelist(Fnc,InitVal,FinalVal,StepVal) Returns a list made with a function or with a constant. - See also: 1/ seq 2/ range 3/ makemat 4/ $ + See also: 1/ seq 2/ range 3/ makemat 4/ $ Ex1:makelist(x->x^2,1,10,2) Ex2:makelist(4,1,10) Ex3:makelist(4,5,10) Ex4:makelist(x->ifte(x<5,"A","B"),1,10) - + ''' return GiacMethods['makelist'](self,*args) @@ -10498,11 +10498,11 @@ cdef class GiacMethods_base: Help for makemat: makemat(Fnct(f),RowsNumb,ColsNumb) Creates a matrix. - See also: 1/ matrix + See also: 1/ matrix Ex1:makemat((j,k)->j+k,3,2) Ex2:makemat((j,k)->1/(j+k+1),2,3) Ex3:makemat(sqrt(2),2,3) - + ''' return GiacMethods['makemat'](self,*args) @@ -10511,9 +10511,9 @@ cdef class GiacMethods_base: Help for makesuite: makesuite(Vect||Lst) Returns a sequence made with a vector. - See also: 1/ makevector 2/ op + See also: 1/ makevector 2/ op Ex1:makesuite([1,2,3]) - + ''' return GiacMethods['makesuite'](self,*args) @@ -10522,9 +10522,9 @@ cdef class GiacMethods_base: Help for makevector: makevector(Seq) Returns a vector made with a sequence. - See also: 1/ makesuite + See also: 1/ makesuite Ex1:makevector(1,2,3) - + ''' return GiacMethods['makevector'](self,*args) @@ -10533,11 +10533,11 @@ cdef class GiacMethods_base: Help for map: map(Lst(l),Fnc(f)) Applies the function f at the elements of the list l or at a polynomial of internal format. - See also: 1/ apply 2/ set 3/ unapply + See also: 1/ apply 2/ set 3/ unapply Ex1:map([1,2,3],x->x^3) Ex2:map([1,2,3],unapply(x^3,x)) Ex3:map(%%%{1,[2,0]%%%}+%%%{2,[1,1]%%%},(a,b,c)->a*(b+2*c)) - + ''' return GiacMethods['map'](self,*args) @@ -10546,8 +10546,8 @@ cdef class GiacMethods_base: Help for maple2mupad: maple2mupad(Str("Name_Maplefile"),Str("Name_Mupadfile")) maple2mupad("file1","file2") translates file1(Maple) to file2(MuPAD). - See also: 1/ maple2xcas - + See also: 1/ maple2xcas + ''' return GiacMethods['maple2mupad'](self,*args) @@ -10556,8 +10556,8 @@ cdef class GiacMethods_base: Help for maple2xcas: maple2xcas(Str("NameMapleFile"),Str("NameXcasFile")) maple2xcas("file1","file2") translates file1(Maple) to file2(Xcas). - See also: 1/ maple2mupad - + See also: 1/ maple2mupad + ''' return GiacMethods['maple2xcas'](self,*args) @@ -10566,9 +10566,9 @@ cdef class GiacMethods_base: Help for maple_ifactors: maple_ifactors(Intg(n)) Returns 1 or -1 for the sign and the prime factors with their multiplicity of n in a matrix, such as ifactors in Maple. - See also: 1/ ifactors + See also: 1/ ifactors Ex1:maple_ifactors(120) - + ''' return GiacMethods['maple_ifactors'](self,*args) @@ -10577,10 +10577,10 @@ cdef class GiacMethods_base: Help for maple_mode: maple_mode(Intg(0) or 1 or 2 or 3) Switches to mode Xcas (0), Maple (1), Mupad (2), TI89 (3). - See also: 1/ python_compat + See also: 1/ python_compat Ex1:maple_mode(1) Ex2:maple_mode(0) - + ''' return GiacMethods['maple_mode'](self,*args) @@ -10589,9 +10589,9 @@ cdef class GiacMethods_base: Help for markov: markov(Mtrx(M),[Real(eps)]) Computation of the proper elements of a Markov chain transition matrix M, returns the list of sequence of positive recurrent states, the list of corresponding invariant probabilities, the list of other strongly connected components, the list of probabilities to end up in the sequence of recurrent states. - See also: 1/ randmarkov 2/ plotproba + See also: 1/ randmarkov 2/ plotproba Ex1:markov([[0,0,1/2,0,1/2],[0,0,1,0,0],[1/4,1/4,0,1/4,1/4],[0,0,1/2,0,1/2],[0,0,0,0,1]]) - + ''' return GiacMethods['markov'](self,*args) @@ -10600,9 +10600,9 @@ cdef class GiacMethods_base: Help for mat2list: mat2list(Mtrx) Returns the list of the terms of the matrix. - See also: 1/ list2mat 2/ flatten + See also: 1/ list2mat 2/ flatten Ex1:mat2list([[1,8],[4,9]]) - + ''' return GiacMethods['mat2list'](self,*args) @@ -10611,9 +10611,9 @@ cdef class GiacMethods_base: Help for mathml: mathml(Expr) Converts the expression into a string to display maths for the web. - See also: 1/ export_mathml 2/ latex + See also: 1/ export_mathml 2/ latex Ex1:mathml(1/2) - + ''' return GiacMethods['mathml'](self,*args) @@ -10622,9 +10622,9 @@ cdef class GiacMethods_base: Help for matpow: matpow(Mtrx,Intg(n)) Calculates the nth power of a matrix by jordanization. - See also: 1/ &^ 2/ ^ + See also: 1/ &^ 2/ ^ Ex1:matpow([[1,2],[3,4]],n) - + ''' return GiacMethods['matpow'](self,*args) @@ -10633,12 +10633,12 @@ cdef class GiacMethods_base: Help for matrix: matrix(Intg(p),Intg(q),(Fnc(f) or Val(a))) Makes a matrix m(j,k) with p rows and q cols, m(j,k)=f(j,k) or m(j,k)=a : the index start at 0 or 1 according to the mode (Xcas or Maple) (or option of apply) or make a matrix with a table. - See also: 1/ makemat 2/ makelist 3/ apply + See also: 1/ makemat 2/ makelist 3/ apply Ex1:matrix(2,3,(j,k)->1/(j+k+1)) Ex2:matrix(3,2,(j,k)->j+k) Ex3:matrix(2,3,4) - Ex4: A[0..2,0..2]:=1;A[0..1,1..2]:=2;a:=matrix(A) - + Ex4: A[0..2,0..2]:=1;A[0..1,1..2]:=2;a:=matrix(A) + ''' return GiacMethods['matrix'](self,*args) @@ -10647,12 +10647,12 @@ cdef class GiacMethods_base: Help for matrix_norm: matrix_norm(Mtrx,[2]||[inf]) Matrix norm induced by l1norm or by l2norm or by linfinty norm. - See also: 1/ l1norm 2/ l2 norm 3/ linfnorm 4/ frobenius_norm + See also: 1/ l1norm 2/ l2 norm 3/ linfnorm 4/ frobenius_norm Ex1:matrix_norm([[1,2,3],[3,-9,6],[4,5,6]]) Ex2:matrix_norm([[1,2,3],[3,-9,6],[4,5,6]],1) Ex3:matrix_norm([[1,2,3],[3,-9,6],[4,5,6]],2) Ex4:matrix_norm([[1,2,3],[3,-9,6],[4,5,6]],inf) - + ''' return GiacMethods['matrix_norm'](self,*args) @@ -10661,9 +10661,9 @@ cdef class GiacMethods_base: Help for max: max(Seq||Lst) Maximum of elements of a sequence or a list of reals. - See also: 1/ min + See also: 1/ min Ex1:max(25,35) - + ''' return GiacMethods['max'](self,*args) @@ -10672,9 +10672,9 @@ cdef class GiacMethods_base: Help for maxflow: maxflow(Graph(G),Vrtx(s),Vrtx(t)) Returns the optimal value for the max flow problem for network G with the source s and sink t along with an optimal flow (as a matrix). - See also: 1/ minimum_cut + See also: 1/ minimum_cut Ex1:maxflow(digraph(%{[[1,2],2],[[2,3],4],[[3,4],3],[[1,5],3],[[5,2],1],[[5,4],2]%}),1,4) - + ''' return GiacMethods['maxflow'](self,*args) @@ -10683,9 +10683,9 @@ cdef class GiacMethods_base: Help for maximal_independent_set: maximal_independent_set(Graph(G)) Returns a maximal set of mutually independent (non-adjacent) vertices in G. - See also: 1/ maximum_independent_set + See also: 1/ maximum_independent_set Ex1:maximal_independent_set(graph("petersen")) - + ''' return GiacMethods['maximal_independent_set'](self,*args) @@ -10702,7 +10702,7 @@ cdef class GiacMethods_base: Ex6:maximize(sqrt(x^2+y^2)-z,[x^2+y^2<=16,x+y+z=10],[x,y,z]) Ex7:maximize((1+x^2+3y+5x-4*x*y)/(1+x^2+y^2),x^2/4+y^2/3=9,[x,y]) Ex8:maximize(cos(x)^2+cos(y)^2,x+y=pi/4,[x,y],locus) - + ''' return GiacMethods['maximize'](self,*args) @@ -10711,9 +10711,9 @@ cdef class GiacMethods_base: Help for maximum_clique: maximum_clique(Graph(G)) Returns the maximum clique of undirected graph G as a list of vertices. - See also: 1/ clique_number 2/ is_clique 3/ maximum_independent_set + See also: 1/ clique_number 2/ is_clique 3/ maximum_independent_set Ex1:maximum_clique(graph_complement(complete_graph(3,4))) - + ''' return GiacMethods['maximum_clique'](self,*args) @@ -10722,9 +10722,9 @@ cdef class GiacMethods_base: Help for maximum_degree: maximum_degree(Graph(G)) Returns the largest degree among the vertices of G. - See also: 1/ minimum_degree 2/ vertex_degree + See also: 1/ minimum_degree 2/ vertex_degree Ex1:maximum_degree(digraph(trail(1,2,3,4,5,6,4,7,8,2))) - + ''' return GiacMethods['maximum_degree'](self,*args) @@ -10733,9 +10733,9 @@ cdef class GiacMethods_base: Help for maximum_independent_set: maximum_independent_set(Graph(G)) Returns the maximum independent vertex set of G. - See also: 1/ clique_number 2/ graph_complement 3/ independence_number 4/ maximum_clique + See also: 1/ clique_number 2/ graph_complement 3/ independence_number 4/ maximum_clique Ex1:maximum_independent_set(complete_graph(3,4)) - + ''' return GiacMethods['maximum_independent_set'](self,*args) @@ -10744,9 +10744,9 @@ cdef class GiacMethods_base: Help for maximum_matching: maximum_matching(Graph(G)) Returns the list of edges representing maximum matching in G. - See also: 1/ maximum_independent_set + See also: 1/ maximum_independent_set Ex1: G:=graph("soccerball"); draw_graph(highlight_edges(G,maximum_matching(G))) - + ''' return GiacMethods['maximum_matching'](self,*args) @@ -10755,11 +10755,11 @@ cdef class GiacMethods_base: Help for maxnorm: maxnorm(Vect or Mtrx) Norm with the max of a vector (or of a matrix): maxnorm([x1,x2,..,xn])=max(|x1|,..,|xn|). - See also: 1/ l2norm 2/ l1norm + See also: 1/ l2norm 2/ l1norm Ex1:maxnorm([1,2]) Ex2:maxnorm([1,2,3,-4]) Ex3:maxnorm([[1,2],[3,-4]]) - + ''' return GiacMethods['maxnorm'](self,*args) @@ -10768,11 +10768,11 @@ cdef class GiacMethods_base: Help for mean: mean(Lst||Mtrx,[Lst]) Mean of a list with the second argument as weight or of the columns of a matrix. - See also: 1/ stddev + See also: 1/ stddev Ex1:mean([1,2,3]) Ex2:mean([1,2,3],[1,2,3]) Ex3:mean([[1,2,3],[1,2,3]]) - + ''' return GiacMethods['mean'](self,*args) @@ -10781,10 +10781,10 @@ cdef class GiacMethods_base: Help for median: median(Lst||Mtrx,[Lst]) Returns the median of a list with the second argument as weight or of the columns of a matrix. - See also: 1/ quartiles + See also: 1/ quartiles Ex1:median([1,2,3,5,10,4]) Ex2:median([1,2,3,5,10,4],[1,2,3,1,2,3]) - + ''' return GiacMethods['median'](self,*args) @@ -10793,9 +10793,9 @@ cdef class GiacMethods_base: Help for median_line: median_line((Pnt or Cplx),(Pnt or Cplx),(Pnt or Cplx)) median_line(A,B,C) draws the median-line through A of the triangle ABC. - See also: 1/ midpoint 2/ perpen_bisector + See also: 1/ midpoint 2/ perpen_bisector Ex1:median_line(-1,1-i,i) - + ''' return GiacMethods['median_line'](self,*args) @@ -10804,10 +10804,10 @@ cdef class GiacMethods_base: Help for member: member(Elem(e),(Lst(l) or Set(l))) Tests if e is in the list or set l (=0, or k+1 with l[k]=e). - See also: 1/ contains 2/ est_element 3/ find 4/ index + See also: 1/ contains 2/ est_element 3/ find 4/ index Ex1:member(1,[4,3,1,2]) Ex2:member(1,%{4,3,1,2%}) - + ''' return GiacMethods['member'](self,*args) @@ -10819,7 +10819,7 @@ cdef class GiacMethods_base: Ex1:mgf(normald,1,0) Ex2:mgf(poisson,5) Ex3:mgf(binomial,n,p) - + ''' return GiacMethods['mgf'](self,*args) @@ -10828,13 +10828,13 @@ cdef class GiacMethods_base: Help for mid: mid(Lst(l) or Str(l),Intg(d),Intg(n)) Returns the extracted list of l with n elements (by default n=size(l)-d) and beginning at index d. - See also: 1/ head 2/ tail 3/ left 4/ right 5/ subMat + See also: 1/ head 2/ tail 3/ left 4/ right 5/ subMat Ex1:mid([0,1,2,3,4,5,6],2,3) Ex2:mid([0,1,2,3,4,5,6],2) Ex3:mid("azertyuiop",2,4) Ex4:mid("azertyuiop",2) Ex5:mid([[1,2],[3,4],[5,6]],1) - + ''' return GiacMethods['mid'](self,*args) @@ -10843,14 +10843,14 @@ cdef class GiacMethods_base: Help for middle_point: middle_point(Opt) Option of the plotarea command and of the area command. - See also: 1/ plotarea 2/ area + See also: 1/ plotarea 2/ area Ex1: plotarea(x^2,x=0..1,5,trapezoid) Ex2: plotarea(x^2,x=0..1,5,middle_point) Ex3: plotarea(x^2,x=0..1,5,right_rectangle) Ex4: plotarea(x^2,x=0..1,5,left_rectangle) Ex5: area(x^2,x=0..1,5,middle_point) Ex6: area(x^2,x=0..1,5,trapezoid) - + ''' return GiacMethods['middle_point'](self,*args) @@ -10859,9 +10859,9 @@ cdef class GiacMethods_base: Help for midpoint: midpoint((Pnt or Cplx),(Pnt or Cplx)) midpoint(A,B) draws the midpoint of the segment AB. - See also: 1/ median_line 2/ perpen_bisector + See also: 1/ median_line 2/ perpen_bisector Ex1:midpoint(-2,2i) - + ''' return GiacMethods['midpoint'](self,*args) @@ -10870,9 +10870,9 @@ cdef class GiacMethods_base: Help for min: min(Seq||Lst) Minimum of elements of a sequence or a list of reals. - See also: 1/ max + See also: 1/ max Ex1:min(25,35) - + ''' return GiacMethods['min'](self,*args) @@ -10881,10 +10881,10 @@ cdef class GiacMethods_base: Help for minimal_edge_coloring: minimal_edge_coloring(Graph(G),[sto]) Finds the minimal edge coloring of G and returns the sequence n,L where n is the class of G (1 for D colors and 2 for D+1 colors) and L is the list of colors of edges of G as returned by the edges command, or a copy of G with colored edges if the option 'sto' is specified. - See also: 1/ chromatic_index 2/ minimal_vertex_coloring 3/ edges + See also: 1/ chromatic_index 2/ minimal_vertex_coloring 3/ edges Ex1:minimal_edge_coloring(graph("petersen")) Ex2: G:=minimal_edge_coloring(graph("dodecahedron"),sto); draw_graph(G) - + ''' return GiacMethods['minimal_edge_coloring'](self,*args) @@ -10893,9 +10893,9 @@ cdef class GiacMethods_base: Help for minimal_spanning_tree: minimal_spanning_tree(Graph(G)) Returns the minimal spanning tree of undirected graph G. - See also: 1/ spanning_tree + See also: 1/ spanning_tree Ex1:minimal_spanning_tree(graph([[0,1,0,4,0,0],[1,0,1,0,4,0],[0,1,0,3,0,1],[4,0,3,0,1,0],[0,4,0,1,0,4],[0,0,1,0,4,0]])) - + ''' return GiacMethods['minimal_spanning_tree'](self,*args) @@ -10904,10 +10904,10 @@ cdef class GiacMethods_base: Help for minimal_vertex_coloring: minimal_vertex_coloring(Graph(G),[sto]) Computes the minimal vertex coloring for G and returns the colors in the order of vertices. If optional parameter "sto" is given, the colors are assigned to vertices and the modified copy of G is returned. - See also: 1/ chromatic_number 2/ is_vertex_colorable + See also: 1/ chromatic_number 2/ is_vertex_colorable Ex1:minimal_vertex_coloring(graph("petersen")) Ex2: draw_graph(minimal_vertex_coloring(graph("petersen"),sto)) - + ''' return GiacMethods['minimal_vertex_coloring'](self,*args) @@ -10926,7 +10926,7 @@ cdef class GiacMethods_base: Ex8:minimax(abs(x)*sqrt(abs(x)),x=-2..2,15) Ex9:minimax(min(1/cosh(3*sin(x)),sin(9x/10)),x=-3..4,30) Ex10:minimax(when(x==0,0,exp(-1/x^2)),x=-1..1,25) - + ''' return GiacMethods['minimax'](self,*args) @@ -10943,7 +10943,7 @@ cdef class GiacMethods_base: Ex6:minimize(sqrt(x^2+y^2)-z,[x^2+y^2<=16,x+y+z=10],[x,y,z]) Ex7:minimize((1+x^2+3y+5x-4*x*y)/(1+x^2+y^2),x^2/4+y^2/3=9,[x,y]) Ex8:minimize(cos(x)^2+cos(y)^2,x+y=pi/4,[x,y],locus) - + ''' return GiacMethods['minimize'](self,*args) @@ -10952,9 +10952,9 @@ cdef class GiacMethods_base: Help for minimum_cut: minimum_cut(Graph(G),Vrtx(s),Vrtx(t)) Returns the list of edges forming a minimum cut in a directed graph G with the source s and sink t. - See also: 1/ maxflow + See also: 1/ maxflow Ex1:minimum_cut(digraph(%{[[1,2],2],[[2,3],4],[[3,4],3],[[1,5],3],[[5,2],1],[[5,4],2]%}),1,4) - + ''' return GiacMethods['minimum_cut'](self,*args) @@ -10963,9 +10963,9 @@ cdef class GiacMethods_base: Help for minimum_degree: minimum_degree(Graph(G)) Returns the smallest degree among the vertices of G. - See also: 1/ maximum_degree 2/ vertex_degree + See also: 1/ maximum_degree 2/ vertex_degree Ex1:minimum_degree(digraph(trail(1,2,3,4,5,6,4,7,8,2))) - + ''' return GiacMethods['minimum_degree'](self,*args) @@ -10974,11 +10974,11 @@ cdef class GiacMethods_base: Help for mkisom: mkisom(Vect,(Sign(1) or -1)) Matrix of an isometry given by its proper elements. - See also: 1/ isom + See also: 1/ isom Ex1:mkisom([1,2],1) Ex2:mkisom([[1,0,0],pi/3],-1) Ex3:mkisom(pi,1) - + ''' return GiacMethods['mkisom'](self,*args) @@ -10987,9 +10987,9 @@ cdef class GiacMethods_base: Help for mksa: mksa(Unit) Converts units to the MKSA international unit system. - See also: 1/ convert 2/ ufactor + See also: 1/ convert 2/ ufactor Ex1:mksa(1_N) - + ''' return GiacMethods['mksa'](self,*args) @@ -10998,9 +10998,9 @@ cdef class GiacMethods_base: Help for modgcd: modgcd(Poly,Poly) GCD of 2 polynomials, with the modular algorithm. - See also: 1/ gcd 2/ heugcd 3/ ezgcd 4/ psrgcd + See also: 1/ gcd 2/ heugcd 3/ ezgcd 4/ psrgcd Ex1:modgcd(x^4-1,(x-1)^2) - + ''' return GiacMethods['modgcd'](self,*args) @@ -11009,11 +11009,11 @@ cdef class GiacMethods_base: Help for mods: mods(Intg,Intg) Returns the Euclidean symmetric remainder of two integers. - See also: 1/ irem 2/ iquo 3/ mod 4/ fracmod + See also: 1/ irem 2/ iquo 3/ mod 4/ fracmod Ex1:mods(8,3) Ex2:mods(10,4) Ex3:mods(11,7) - + ''' return GiacMethods['mods'](self,*args) @@ -11023,7 +11023,7 @@ cdef class GiacMethods_base: monotonic() Returns a real that increases as time passes Ex1:monotonic() - + ''' return GiacMethods['monotonic'](self,*args) @@ -11032,9 +11032,9 @@ cdef class GiacMethods_base: Help for montre_tortue: montre_tortue(NULL) Shows the turtle. - See also: 1/ cache_tortue + See also: 1/ cache_tortue Ex1:montre_tortue() - + ''' return GiacMethods['montre_tortue'](self,*args) @@ -11043,12 +11043,12 @@ cdef class GiacMethods_base: Help for moustache: moustache(Lst,[Lst],[x=a..b||y=a..b]) Box and Whisker plot for a statistical series. - See also: 1/ quartiles + See also: 1/ quartiles Ex1:moustache([-1,1,2,2.2,3,4,-2,5]) Ex2:moustache([1,2,3,5,10,4],x=1..2) Ex3:moustache([1,2,3,5,10,4],[1,2,3,1,2,3]) Ex4:moustache([[6,0,1,3,4,2,5],[0,1,3,4,2,5,6],[1,3,4,2,5,6,0],[3,4,2,5,6,0,1],[4,2,5,6,0,1,3],[2,5,6,0,1,3,4]]) - + ''' return GiacMethods['moustache'](self,*args) @@ -11057,9 +11057,9 @@ cdef class GiacMethods_base: Help for moving_average: moving_average(Lst(A),Intg(n)) Applies a moving average filter of length n to a signal sample A, and returns its result as an array of length nops(A)-n+1. - See also: 1/ lowpass + See also: 1/ lowpass Ex1: snd:=soundsec(2):;data:=0.5*threshold(3*sin(2*pi*220*snd),[-1.0,1.0])+randvector(length(snd),normald,0,0.05):;moving_average(data,25) - + ''' return GiacMethods['moving_average'](self,*args) @@ -11068,9 +11068,9 @@ cdef class GiacMethods_base: Help for moyal: moyal(Expr,Expr,VectVar) Moyal product of 2 symbols. - See also: 1/ + See also: 1/ Ex1:moyal(x^2+y^4,x^4-y^2,[x,y],5) - + ''' return GiacMethods['moyal'](self,*args) @@ -11079,11 +11079,11 @@ cdef class GiacMethods_base: Help for moyenne: moyenne(Lst||Mtrx,[Lst]) Mean of a list with the second argument as weight or of the columns of a matrix. - See also: 1/ stddev + See also: 1/ stddev Ex1:moyenne([1,2,3]) Ex2:moyenne([1,2,3],[1,2,3]) Ex3:moyenne([[1,2,3],[1,2,3]]) - + ''' return GiacMethods['moyenne'](self,*args) @@ -11092,7 +11092,7 @@ cdef class GiacMethods_base: Help for mul: mul(Expr||Lst,[Var||Lst],[Intg(a)],[Intg(b)],[Intg(p)]) Multiplies the values of the expression when the variable go from a to b with a step p (product(expression,var,begin,end,step) by default p=1) or product of the elements of a list or product element by element of 2 lists or matrices. - See also: 1/ sum + See also: 1/ sum Ex1:mul(n,n,1,10,2) Ex2:mul(1/n,n,1,10) Ex3:mul(1/n,n,11,1) @@ -11100,7 +11100,7 @@ cdef class GiacMethods_base: Ex5:mul([2,3,4,5]) Ex6:mul([2,3,4],[5,6,7]) Ex7:mul([[2,3,4],[5,6,7]],[[2,3,4],[5,6,7]]) - + ''' return GiacMethods['mul'](self,*args) @@ -11109,10 +11109,10 @@ cdef class GiacMethods_base: Help for mult_c_conjugate: mult_c_conjugate(Expr) Returns the expression after multiplication by the complex conjugate of the denominator (or of the numerator if no denominator). - See also: 1/ mult_conjugate + See also: 1/ mult_conjugate Ex1:mult_c_conjugate(1/(3+i*2)) Ex2:mult_c_conjugate(3+i*2) - + ''' return GiacMethods['mult_c_conjugate'](self,*args) @@ -11121,10 +11121,10 @@ cdef class GiacMethods_base: Help for mult_conjugate: mult_conjugate(Expr) Returns the expression after multiplication by the conjugate of the denominator (or of the numerator if no denominator). - See also: 1/ mult_c_conjugate + See also: 1/ mult_c_conjugate Ex1:mult_conjugate(sqrt(3)-sqrt(2)) Ex2:mult_conjugate(1/(sqrt(3)-sqrt(2))) - + ''' return GiacMethods['mult_conjugate'](self,*args) @@ -11133,12 +11133,12 @@ cdef class GiacMethods_base: Help for multinomial: multinomial(Intg(n),Vect(p),Vect(k)) Returns n!/(k0!*k1!*..;kj!)*(p0^k0*p1^k1..*pj^kj) (sum(p)=1 and sum(k)=n). - See also: 1/ binomial 2/ randvector 3/ ranm + See also: 1/ binomial 2/ randvector 3/ ranm Ex1:multinomial(10,[0.5,0.5],[3,7]) Ex2:multinomial(10,[0.2,0.3,0.5],[1,3,6]) Ex3: randvector(3,multinomial,[1/2,1/3,1/6]) Ex4: ranm(4,3,multinomial,[1/2,1/3,1/6]) - + ''' return GiacMethods['multinomial'](self,*args) @@ -11147,10 +11147,10 @@ cdef class GiacMethods_base: Help for multiplier_conjugue: multiplier_conjugue(Expr) Returns the expression after multiplication by the conjugate of the denominator (or of the numerator if no denominator). - See also: 1/ mult_c_conjugate + See also: 1/ mult_c_conjugate Ex1:multiplier_conjugue(sqrt(3)-sqrt(2)) Ex2:multiplier_conjugue(1/(sqrt(3)-sqrt(2))) - + ''' return GiacMethods['multiplier_conjugue'](self,*args) @@ -11159,10 +11159,10 @@ cdef class GiacMethods_base: Help for multiplier_conjugue_complexe: multiplier_conjugue_complexe(Expr) Returns the expression after multiplication by the complex conjugate of the denominator (or of the numerator if no denominator). - See also: 1/ mult_conjugate + See also: 1/ mult_conjugate Ex1:multiplier_conjugue_complexe(1/(3+i*2)) Ex2:multiplier_conjugue_complexe(3+i*2) - + ''' return GiacMethods['multiplier_conjugue_complexe'](self,*args) @@ -11171,11 +11171,11 @@ cdef class GiacMethods_base: Help for multiply: multiply(Intg or Lst, Intg or Lst) Returns the product of the 2 arguments. - See also: 1/ * + See also: 1/ * Ex1:multiply(41,-4) Ex2:multiply([4,1],[-4,2]) Ex3:multiply([[4,1],[-4,1]],[[4,1],[-4,1]]) - + ''' return GiacMethods['multiply'](self,*args) @@ -11184,8 +11184,8 @@ cdef class GiacMethods_base: Help for mupad2maple: mupad2maple(Str("NameMupadFile"),Str("NameMapleFile")) mupad2maple("file1","file2") translates file1(MuPAD) to file2(Maple). - See also: 1/ mupad2xcas - + See also: 1/ mupad2xcas + ''' return GiacMethods['mupad2maple'](self,*args) @@ -11194,8 +11194,8 @@ cdef class GiacMethods_base: Help for mupad2xcas: mupad2xcas(Str("NameMupadFile"),Str("NameXcasFile")) mupad2xcas("file1","file2") translates file1(MuPAD) to file2(Xcas). - See also: 1/ mupad2maple - + See also: 1/ mupad2maple + ''' return GiacMethods['mupad2xcas'](self,*args) @@ -11204,10 +11204,10 @@ cdef class GiacMethods_base: Help for mycielski: mycielski(Graph(G)) Returns the Mycielskian of undirected graph G. - See also: 1/ chromatic_number 2/ number_of_triangles + See also: 1/ chromatic_number 2/ number_of_triangles Ex1:mycielski(graph("petersen")) Ex2: is_isomorphic(mycielski(mycielski(path_graph(2))),graph("grotzsch")) - + ''' return GiacMethods['mycielski'](self,*args) @@ -11216,9 +11216,9 @@ cdef class GiacMethods_base: Help for nCr: nCr(Intg(n),Intg(r)) comb(n,r)=number of combinations of r objects taken among n : n!/(r!(n-r)!) (If n<0 comb(n,r)=n(n-1)..(n-r+1)/r!). - See also: 1/ factorial 2/ perm + See also: 1/ factorial 2/ perm Ex1:nCr(4,2) - + ''' return GiacMethods['nCr'](self,*args) @@ -11227,11 +11227,11 @@ cdef class GiacMethods_base: Help for nDeriv: nDeriv(Expr(Xpr),Var(Var),[Real(h)]) Returns an approximation of the derivative number at a point: (Xpr(var+h)-Xpr(var-h))/(2*h) (by default h=0.001). - See also: 1/ avgRC + See also: 1/ avgRC Ex1:nDeriv(f(x),x,h) Ex2:nDeriv(x^2,x,0.1) Ex3:nDeriv(x^2,x) - + ''' return GiacMethods['nDeriv'](self,*args) @@ -11240,11 +11240,11 @@ cdef class GiacMethods_base: Help for nInt: nInt(Expr(f(x)),Var(x),Real(a),Real(b)) Returns the approximate value of integrate(f(x),x,a,b) by Romberg's method. - See also: 1/ integrate 2/ gaussquad + See also: 1/ integrate 2/ gaussquad Ex1:nInt(exp(x^2),x,0,1) Ex2:nInt(x^2,x,0,1) Ex3:nInt(exp(-x^2),x,-1,1) - + ''' return GiacMethods['nInt'](self,*args) @@ -11253,9 +11253,9 @@ cdef class GiacMethods_base: Help for nPr: nPr(Intg(n),Intg(p)) perm(n,p)=number of arrangements of p objects taken among n : n!/(n-p)! - See also: 1/ comb 2/ factorial + See also: 1/ comb 2/ factorial Ex1:nPr(4,2) - + ''' return GiacMethods['nPr'](self,*args) @@ -11264,10 +11264,10 @@ cdef class GiacMethods_base: Help for nSolve: nSolve(Expr,Var,[Guess or Interval],[Method]) Numerical solution of an equation or a system of equations. - See also: 1/ solve 2/ fsolve 3/ csolve + See also: 1/ solve 2/ fsolve 3/ csolve Ex1:nSolve(cos(x)=x,x) Ex2:nSolve(cos(x)=x,x=1.3) - + ''' return GiacMethods['nSolve'](self,*args) @@ -11276,10 +11276,10 @@ cdef class GiacMethods_base: Help for ncols: ncols(Mtrx) Number of columns of a matrix. - See also: 1/ rowdim + See also: 1/ rowdim Ex1:ncols([[1,2,3],[4,5,6]]) Ex2:ncols([[1,2],[3,4],[5,6]]) - + ''' return GiacMethods['ncols'](self,*args) @@ -11288,11 +11288,11 @@ cdef class GiacMethods_base: Help for negbinomial: negbinomial(Intg(n),Intg(k),Real(p in 0..1)) Returns comb(n+k-1,k)*p^k*(1-p)^n. - See also: 1/ negbinomial_cdf 2/ negbinomial_icdf 3/ binomial + See also: 1/ negbinomial_cdf 2/ negbinomial_icdf 3/ binomial Ex1:negbinomial(4,0,0.5) Ex2:negbinomial(4,2,0.6) Ex3:negbinomial(4,6,0.3) - + ''' return GiacMethods['negbinomial'](self,*args) @@ -11301,11 +11301,11 @@ cdef class GiacMethods_base: Help for negbinomial_cdf: negbinomial_cdf(Intg(n),Real(p),Real(x),[Real(y)]) Returns Proba(X<=x) or Proba(x<=X<=y) when X follows the negbinomial(n,p) law. - See also: 1/ negbinomial 2/ negbinomial_icdf + See also: 1/ negbinomial 2/ negbinomial_icdf Ex1:negbinomial_cdf(4,0.5,2) Ex2:negbinomial_cdf(4,0.1,2) Ex3:negbinomial_cdf(4,0.5,2,3) - + ''' return GiacMethods['negbinomial_cdf'](self,*args) @@ -11314,10 +11314,10 @@ cdef class GiacMethods_base: Help for negbinomial_icdf: negbinomial_icdf(Intg(n),Real(p),Real(t)) Returns h such as Proba(X<=h)=t when X follows the negbinomial(n,p) law. - See also: 1/ negbinomial 2/ negbinomial_cdf + See also: 1/ negbinomial 2/ negbinomial_cdf Ex1:negbinomial_icdf(4,0.5,0.68) Ex2:negbinomial_icdf(4,0.1,0.95) - + ''' return GiacMethods['negbinomial_icdf'](self,*args) @@ -11326,9 +11326,9 @@ cdef class GiacMethods_base: Help for neighbors: neighbors(Graph(G),[Vrtx(v)]) Returns the list of vertices adjacent to vertex v of G. If v is omitted, a list of adjacency lists of all vertices in G is returned. - See also: 1/ adjacency_matrix 2/ vertex_degree 3/ in_degree 3/ out_degree + See also: 1/ adjacency_matrix 2/ vertex_degree 3/ in_degree 3/ out_degree Ex1:neighbors(digraph(trail(1,2,3,4,5,6,4,7,8,2)),4) - + ''' return GiacMethods['neighbors'](self,*args) @@ -11337,9 +11337,9 @@ cdef class GiacMethods_base: Help for network_transitivity: network_transitivity(Graph(G)) Returns the transitivity (also called triangle density or global clustering coefficient) of G. - See also: 1/ clustering_coefficient 2/ number_of_triangles + See also: 1/ clustering_coefficient 2/ number_of_triangles Ex1:network_transitivity(graph(%{[1,2],[2,3],[2,4],[3,4],[4,1]%})) - + ''' return GiacMethods['network_transitivity'](self,*args) @@ -11348,9 +11348,9 @@ cdef class GiacMethods_base: Help for newList: newList(Intg(n)) Returns the list made with n zeros. - See also: 1/ newMat 2/ makelist + See also: 1/ newMat 2/ makelist Ex1:newList(4) - + ''' return GiacMethods['newList'](self,*args) @@ -11359,9 +11359,9 @@ cdef class GiacMethods_base: Help for newMat: newMat(Intg(n),Intg(p)) Returns the list with n rows and p columns, made with zeros. - See also: 1/ newList 2/ makemat + See also: 1/ newList 2/ makemat Ex1:newMat(2,3) - + ''' return GiacMethods['newMat'](self,*args) @@ -11370,12 +11370,12 @@ cdef class GiacMethods_base: Help for newton: newton(Expr(f(x)),Var(x),[ApproxVal(a),NumIter(p)]) newton(f(x),x,a,p)=one root of f(x) by Newton method beginning with a and p iterations (by default p=20). - See also: 1/ rootof + See also: 1/ rootof Ex1:newton(x^2-2,x) Ex2:newton(x^2-2,x,2) Ex3:newton(x^2-2,x,-2) Ex4:newton(x^2-2,x,2,5,1e-7) - + ''' return GiacMethods['newton'](self,*args) @@ -11384,14 +11384,14 @@ cdef class GiacMethods_base: Help for newton_solver: newton_solver(Opt) Argument for fsolve giving the method for solving a numerical equation. - See also: 1/ fsolve + See also: 1/ fsolve Ex1: fsolve(cos(x)=x,x,0..1,bisection_solver) Ex2: fsolve(cos(x)=x,x,0..1,brent_solver) Ex3: fsolve(cos(x)=x,x,0..1,falsepos_solver) Ex4: fsolve(cos(x)=x,x,0,newton_solver) Ex5: fsolve(cos(x)=x,x,0,secant_solver) Ex6: fsolve(cos(x)=x,x,0,steffenson_solver) - + ''' return GiacMethods['newton_solver'](self,*args) @@ -11400,14 +11400,14 @@ cdef class GiacMethods_base: Help for newtonj_solver: newtonj_solver(Opt) Argument for fsolve giving the method for solving a system of numerical equations. - See also: 1/ fsolve + See also: 1/ fsolve Ex1: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],dnewton_solver) Ex2: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybrid_solver) Ex3: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybrids_solver) Ex4: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybridj_solver) Ex5: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],hybridsj_solver) Ex6: fsolve([x^2+y-2,x+y^2-2],[x,y],[2,2],newtonj_solver) - + ''' return GiacMethods['newtonj_solver'](self,*args) @@ -11416,10 +11416,10 @@ cdef class GiacMethods_base: Help for nextperm: nextperm(Intg(n)) Returns the next permutation with the lexicographic order. - See also: 1/ prevperm 2/ is_permu + See also: 1/ prevperm 2/ is_permu Ex1:nextperm([0,2,1,3]) Ex2:nextperm([0,3,2,1]) - + ''' return GiacMethods['nextperm'](self,*args) @@ -11428,10 +11428,10 @@ cdef class GiacMethods_base: Help for nextprime: nextprime(Intg(a)) Next prime or pseudo-prime after a given integer. - See also: 1/ prevprime 2/ is_prime 3/ ithprime + See also: 1/ prevprime 2/ is_prime 3/ ithprime Ex1:nextprime(9856989898990) Ex2:nextprime(97160249868928888261606009) - + ''' return GiacMethods['nextprime'](self,*args) @@ -11440,7 +11440,7 @@ cdef class GiacMethods_base: Help for nlpsolve: nlpsolve(objective, [constr], [bd], [opts]) Solves a nonlinear programming problem of optimizing the objective obj under constraints constr (list of equations and/or inequations) and within bounds bd (sequence of x=a..b) with optional options (for example setting an initial point). - See also: 1/ lpsolve 2/ fsolve 3/ fMin 4/ fMax + See also: 1/ lpsolve 2/ fsolve 3/ fMin 4/ fMax Ex1:nlpsolve((x1-10)^3+(x2-20)^3,[(x1-5)^2+(x2-5)^2>=100,(x2-5)^2+(x1-6)^2<=82.81],nlp_initialpoint=[x1=20.1,x2=5.84]) Ex2:nlpsolve(sin(x1+x2)+(x1-x2)^2-1.5x1+2.5x2+1,x1=-1.5..4,x2=-3..3) Ex3:nlpsolve(ln(1+x1^2)-x2,[(1+x1^2)^2+x2^2=4]) @@ -11448,10 +11448,10 @@ cdef class GiacMethods_base: Ex5:nlpsolve(-x1*x2*x3,[72-x1-2x2-2x3>=0],x1=0..20,x2=0..11,x3=0..42) Ex6:nlpsolve(2-1/120*x1*x2*x3*x4*x5,[x1<=1,x2<=2,x3<=3,x4<=4,x5<=5],assume=nlp_nonnegative) Ex7:nlpsolve(sin(x)/x,x=1..30) - Ex8:nlpsolve(x^3+2x*y-2y^2,x=-10..10,y=-10..10,nlp_initialpoint=[x=3,y=4],maximize) + Ex8:nlpsolve(x^3+2x*y-2y^2,x=-10..10,y=-10..10,nlp_initialpoint=[x=3,y=4],maximize) Ex9:nlpsolve(w^3*(v-w)^2+(w-x-1)^2+(x-y-2)^2+(y-z-3)^2,[w+x+y+z<=5,3z+2v=3],assume=nlp_nonnegative) Ex10:nlpsolve(sin(x)*Psi(x),x=1..20,nlp_initialpoint=[x=16]) - + ''' return GiacMethods['nlpsolve'](self,*args) @@ -11461,7 +11461,7 @@ cdef class GiacMethods_base: nodisp(Expr) Displays Done in place of a value. Ex1:nodisp(A:=ranm(50,50)) - + ''' return GiacMethods['nodisp'](self,*args) @@ -11470,10 +11470,10 @@ cdef class GiacMethods_base: Help for non_recursive_normal: non_recursive_normal(Expr) Simplifies the expressions, but without simplification inside of non-rational expressions. - See also: 1/ normal + See also: 1/ normal Ex1:non_recursive_normal(sin(x+x)+sin(2*x)+x+x) Ex2:non_recursive_normal(sin(2*x)+sin(2*x)+x+x) - + ''' return GiacMethods['non_recursive_normal'](self,*args) @@ -11482,9 +11482,9 @@ cdef class GiacMethods_base: Help for nop: nop(NULL) No OPeration instruction. - See also: 1/ + See also: 1/ Ex1:nop() - + ''' return GiacMethods['nop'](self,*args) @@ -11493,11 +11493,11 @@ cdef class GiacMethods_base: Help for nops: nops(Lst or Str or Seq) Returns the size of a list, a string or a sequence. - See also: 1/ sizes 2/ dim 3/ degree + See also: 1/ sizes 2/ dim 3/ degree Ex1:nops([1,2,3]) Ex2:nops("bonjour") Ex3:nops(1,2,3) - + ''' return GiacMethods['nops'](self,*args) @@ -11506,12 +11506,12 @@ cdef class GiacMethods_base: Help for norm: norm(Vect or Mtrx) Returns the l2 norm of a vector = sqrt(x1^2+x2^2+...xn^2) or matrix norm induced by l2 norm. - See also: 1/ maxnorm 2/ l1norm + See also: 1/ maxnorm 2/ l1norm Ex1:norm([1,2]) Ex2:norm([1,2,3,-4]) Ex3:norm([[1,2],[3,-4]]) Ex4:norm([[1,2,3],[3,-9,6],[4,5,6]]) - + ''' return GiacMethods['norm'](self,*args) @@ -11520,11 +11520,11 @@ cdef class GiacMethods_base: Help for normal: normal(Expr) Simplifies the expression. - See also: 1/ simplify + See also: 1/ simplify Ex1:normal(2*x+y=1) Ex2:normal(2*x*2) Ex3:normal((2*x+1)^2) - + ''' return GiacMethods['normal'](self,*args) @@ -11533,11 +11533,11 @@ cdef class GiacMethods_base: Help for normal_cdf: normal_cdf(Real(mu),Real(sigma),Real(x0),[Real(y0)]) Returns the probability that a Normal random variable is less than x0 or between x0 and y0 (mu is the mean and sigma the standard deviation). - See also: 1/ UTPN 2/ normal_icdf 3/ normald + See also: 1/ UTPN 2/ normal_icdf 3/ normald Ex1:normal_cdf(1.96) Ex2:normal_cdf(1,2,2.96*sqrt(2)) Ex3:normal_cdf(1,2,1.4*sqrt(2),2.96*sqrt(2)) - + ''' return GiacMethods['normal_cdf'](self,*args) @@ -11546,10 +11546,10 @@ cdef class GiacMethods_base: Help for normal_icdf: normal_icdf(Real(mu),Real(sigma),Real(p)) Returns h such as the probability that a Normal random variable is less than h is p (mu is the mean and sigma the standard deviation and 0<=p<=1). - See also: 1/ normal_cdf 2/ normald + See also: 1/ normal_cdf 2/ normald Ex1:normal_icdf(0.95) Ex2:normal_icdf(1,2,0.95) - + ''' return GiacMethods['normal_icdf'](self,*args) @@ -11558,12 +11558,12 @@ cdef class GiacMethods_base: Help for normald: normald(Real(mu),Real(sigma),Real(x0)) Returns the probability density of the Normal law (mu is the mean and sigma the standard deviation). - See also: 1/ normal_cdf 2/ normal_icdf 3/ randvector 4/ ranm + See also: 1/ normal_cdf 2/ normal_icdf 3/ randvector 4/ ranm Ex1:normald(1) Ex2:normald(1,2,3.5) Ex3: randvector(3,normald,1,0.5) Ex4: ranm(4,3,normald,1,0.5) - + ''' return GiacMethods['normald'](self,*args) @@ -11572,11 +11572,11 @@ cdef class GiacMethods_base: Help for normald_cdf: normald_cdf(Real(mu),Real(sigma),Real(x0),[Real(y0)]) Returns the probability that a Normal random variable is less than x0 or between x0 and y0 (mu is the mean and sigma the standard deviation). - See also: 1/ UTPN 2/ normal_icdf 3/ normald + See also: 1/ UTPN 2/ normal_icdf 3/ normald Ex1:normald_cdf(1.96) Ex2:normald_cdf(1,2,2.96*sqrt(2)) Ex3:normald_cdf(1,2,1.4*sqrt(2),2.96*sqrt(2)) - + ''' return GiacMethods['normald_cdf'](self,*args) @@ -11585,10 +11585,10 @@ cdef class GiacMethods_base: Help for normald_icdf: normald_icdf(Real(mu),Real(sigma),Real(p)) Returns h such as the probability that a Normal random variable is less than h is p (mu is the mean and sigma the standard deviation and 0<=p<=1). - See also: 1/ normal_cdf 2/ normald + See also: 1/ normal_cdf 2/ normald Ex1:normald_icdf(0.95) Ex2:normald_icdf(1,2,0.95) - + ''' return GiacMethods['normald_icdf'](self,*args) @@ -11597,12 +11597,12 @@ cdef class GiacMethods_base: Help for normalize: normalize(Lst||Cplx) Returns the vector divided by its l2norm. It is also an option for plotfield. - See also: 1/ l2norm + See also: 1/ l2norm Ex1:normalize(3+4*i) Ex2:normalize([3,4]) Ex3: fieldplot(-t*y,[t,y],normalize) Ex4: fieldplot(-t*y,[t,y],normalize,xstep=0.5,ystep=0.5) - + ''' return GiacMethods['normalize'](self,*args) @@ -11611,10 +11611,10 @@ cdef class GiacMethods_base: Help for normalt: normalt(Lst,Real,[Real],Fnc,[Real]) Z-Test/normal law: arg1=[success,trial] or [mean,sample size] or data, arg2=proportion or data, arg3 optional if data=sigma, arg4 alternative '!=' or '>' or '<', arg5 optional alpha confidence level. - See also: 1/ studentt 2/ chisquaret 3/ kolmogorovt + See also: 1/ studentt 2/ chisquaret 3/ kolmogorovt Ex1:normalt([10,30],.5,.02,'!=',0.1) Ex2:normalt([0.48,50],0.5,0.1,'<') - + ''' return GiacMethods['normalt'](self,*args) @@ -11623,10 +11623,10 @@ cdef class GiacMethods_base: Help for normalvariate: normalvariate(Real(mu),Real(sigma)) Returns a random real with normal distribution N(mu,sigma). - See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randpoisson 8/ randgeometric 9/ randmultinomial + See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randpoisson 8/ randgeometric 9/ randmultinomial Ex1:normalvariate(0,1) Ex2:normalvariate(2,1) - + ''' return GiacMethods['normalvariate'](self,*args) @@ -11635,9 +11635,9 @@ cdef class GiacMethods_base: Help for nprimes: nprimes(Intg(n)) Counts the number of primes less than n. - See also: 1/ ithprime 2/ prevprime 3/ nextprime 4/ isprime + See also: 1/ ithprime 2/ prevprime 3/ nextprime 4/ isprime Ex1:nprimes(20) - + ''' return GiacMethods['nprimes'](self,*args) @@ -11646,10 +11646,10 @@ cdef class GiacMethods_base: Help for nrows: nrows(Mtrx) Number of rows of a matrix. - See also: 1/ ncols + See also: 1/ ncols Ex1:nrows([[1,2,3],[4,5,6]]) Ex2:nrows([[1,2],[3,4],[5,6]]) - + ''' return GiacMethods['nrows'](self,*args) @@ -11658,9 +11658,9 @@ cdef class GiacMethods_base: Help for nuage_points: nuage_points(Mtrx) Draws for k=0..nrows, the points (xk,yk) where xk=element row k column 0 and yk=element row k column j (j=1..ncols). - See also: 1/ polygonplot 2/ polygonscatterplot 3/ listplot + See also: 1/ polygonplot 2/ polygonscatterplot 3/ listplot Ex1:nuage_points([[1,2,3],[2,0,1],[-1,2,3]]) - + ''' return GiacMethods['nuage_points'](self,*args) @@ -11669,10 +11669,10 @@ cdef class GiacMethods_base: Help for nullspace: nullspace(Mtrx) Kernel of a linear map with matrix M. - See also: 1/ image 2/ rref 3/ Nullspace + See also: 1/ image 2/ rref 3/ Nullspace Ex1:nullspace([[1,2],[3,6]]) Ex2:nullspace([[1,2,3],[1,3,6],[2,5,9]]) - + ''' return GiacMethods['nullspace'](self,*args) @@ -11681,9 +11681,9 @@ cdef class GiacMethods_base: Help for number_of_edges: number_of_edges(Graph(G)) Returns the number of edges/arcs of G. - See also: 1/ edges 2/ number_of_vertices + See also: 1/ edges 2/ number_of_vertices Ex1:number_of_edges(complete_graph(5)) - + ''' return GiacMethods['number_of_edges'](self,*args) @@ -11692,10 +11692,10 @@ cdef class GiacMethods_base: Help for number_of_spanning_trees: number_of_spanning_trees(Graph(G)) Returns the number of spanning trees in undirected graph G. - See also: 1/ spanning_tree + See also: 1/ spanning_tree Ex1:number_of_spanning_trees(complete_graph(4)) Ex2:number_of_spanning_trees(graph(trail(1,2,3,4,1,3))) - + ''' return GiacMethods['number_of_spanning_trees'](self,*args) @@ -11704,9 +11704,9 @@ cdef class GiacMethods_base: Help for number_of_triangles: number_of_triangles(Graph(G)) Returns the number of 3-cliques if G is undirected resp. the number of directed cycles on 3 vertices if G is directed. - See also: 1/ is_clique 2/ maximal_clique + See also: 1/ is_clique 2/ maximal_clique Ex1:number_of_triangles(graph("tetrahedron")) - + ''' return GiacMethods['number_of_triangles'](self,*args) @@ -11715,9 +11715,9 @@ cdef class GiacMethods_base: Help for number_of_vertices: number_of_vertices(Graph(G)) Returns the number of vertices of G. - See also: 1/ graph_vertices 2/ number_of_edges + See also: 1/ graph_vertices 2/ number_of_edges Ex1:number_of_vertices(graph("petersen")) - + ''' return GiacMethods['number_of_vertices'](self,*args) @@ -11726,11 +11726,11 @@ cdef class GiacMethods_base: Help for numer: numer(Frac(a/b) or RatFrac) Returns the numerator of the simplified fraction. - See also: 1/ getNum 2/ getDenom 3/ denom 4/ f2nd + See also: 1/ getNum 2/ getDenom 3/ denom 4/ f2nd Ex1:numer(25/15) Ex2:numer((x^3-1)/(x^2-1)) Ex3:numer(1+(x^3-1)/x^2) - + ''' return GiacMethods['numer'](self,*args) @@ -11739,10 +11739,10 @@ cdef class GiacMethods_base: Help for octahedron: octahedron(Pnt(A),Pnt(B),Pnt(C)) Draws an octahedron with center A, vertex B and such that the plane ABC contains 4 vertices. - See also: 1/ icosahedron 2/ dodecahedron 3/ cube 4/ tetrahedron + See also: 1/ icosahedron 2/ dodecahedron 3/ cube 4/ tetrahedron Ex1:octahedron([0,0,0],[0,0,5],[0,5,0]) Ex2:octahedron(evalf([0,0,0],[3,2,4],[1,1,0])) - + ''' return GiacMethods['octahedron'](self,*args) @@ -11751,10 +11751,10 @@ cdef class GiacMethods_base: Help for odd: odd(Intg(n)) Returns 1 if the integer is odd, else returns 0. - See also: 1/ even + See also: 1/ even Ex1:odd(6) Ex2:odd(1251) - + ''' return GiacMethods['odd'](self,*args) @@ -11763,10 +11763,10 @@ cdef class GiacMethods_base: Help for odd_girth: odd_girth(Graph(G)) Returns the length of the shortest odd cycle in the undirected unweighted graph G. - See also: 1/ girth + See also: 1/ girth Ex1:odd_girth(graph("petersen")) Ex2:odd_girth(hypercube_graph(3)) - + ''' return GiacMethods['odd_girth'](self,*args) @@ -11775,9 +11775,9 @@ cdef class GiacMethods_base: Help for odd_graph: odd_graph(Intg(n)) Returns the odd graph of order n as Kneser graph K(2n-1,n-1), where n<=8. - See also: 1/ kneser_graph + See also: 1/ kneser_graph Ex1:odd_graph(3) - + ''' return GiacMethods['odd_graph'](self,*args) @@ -11786,7 +11786,7 @@ cdef class GiacMethods_base: Help for odeplot: odeplot(Expr,VectVar,VectInitCond) odeplot(f(t,y),[t,y],[t0,y0]) draws the solution of y'=f(t,y) and y(t0)=y0 or of the system [x'=g(t,x,y),y'=h(t,x,y)] with x(t0)=x0 and y(t0)=y0. - See also: 1/ interactive_plotode 2/ fieldplot 3/ odesolve 4/ desolve + See also: 1/ interactive_plotode 2/ fieldplot 3/ odesolve 4/ desolve Ex1:odeplot(sin(t*y),[t,y],[0,1]) Ex2:odeplot(sin(t*y),[t=-10..10,y],[0,1]) Ex3:odeplot(sin(t*y),[t=-3..3,y],[0,1],tstep=0.1,color=vert) @@ -11794,7 +11794,7 @@ cdef class GiacMethods_base: Ex5:odeplot([x-0.3*x*y, 0.3*x*y-y], [t,x,y],[0,0.3,0.7],plan) Ex6:odeplot([-y+b,-1+(x-a)^2+(y-b)^2],[t=-3..3,x,y],[0,a+1,b+0.5],plan) Ex7:odeplot(5*[-y,x],[t=0..1,x,y],[0,0.3,0.7],tstep=0.05,plan) - + ''' return GiacMethods['odeplot'](self,*args) @@ -11803,13 +11803,13 @@ cdef class GiacMethods_base: Help for odesolve: odesolve(Expr,VectVar,VectInitCond,FinalVal,[tstep=Val,curve]) odesolve(f(t,y),[t,y],[t0,y0],t1)=odesolve(t0..t1,f,y0)=y(t1) for y approx sol of y'=f(t,y) and y(t0)=y0 with y=vector for systems. - See also: 1/ plotode 2/ plotfield 3/ interactive_plotode 4/ desolve + See also: 1/ plotode 2/ plotfield 3/ interactive_plotode 4/ desolve Ex1:odesolve(sin(t*y),[t,y],[0,1],2) Ex2:odesolve(0..2,(t,y)->sin(t*y),1) Ex3:odesolve(0..pi,(t,v)->{[-v[1],v[0]]},[0,1]) Ex4:odesolve(sin(t*y),t=0..2,y,1,tstep=0.5) Ex5:odesolve(sin(t*y),t=0..2,y,1,tstep=0.5,curve) - + ''' return GiacMethods['odesolve'](self,*args) @@ -11818,13 +11818,13 @@ cdef class GiacMethods_base: Help for op: op(Op or Fnc) Returns the arguments of an operator as a sequence. - See also: 1/ sommet 2/ quote 3/ makesuite + See also: 1/ sommet 2/ quote 3/ makesuite Ex1:op(quote(gcd(45,126))) Ex2:op('gcd(45,126)') Ex3:op('1+2')[1] Ex4:op([1,2,3]) Ex5:op(set[1,2,3]) - + ''' return GiacMethods['op'](self,*args) @@ -11833,10 +11833,10 @@ cdef class GiacMethods_base: Help for open_polygon: open_polygon(LstPnt||LstCplx) Returns and draws the polygonal line where its vertices are the element of l. - See also: 1/ isopolygon 2/ quadrilateral + See also: 1/ isopolygon 2/ quadrilateral Ex1:open_polygon(i,1+i,2-i,-1,-1+i/2) Ex2:open_polygon(point(0,0,0),point(3,3,3),point(0,0,3),point(3,0,0)) - + ''' return GiacMethods['open_polygon'](self,*args) @@ -11845,11 +11845,11 @@ cdef class GiacMethods_base: Help for ord: ord(Char||LstChar) Returns the ASCII code of a character or of the first character of a string. - See also: 1/ asc 2/ char + See also: 1/ asc 2/ char Ex1:ord("A") Ex2:ord("ABC") Ex3:ord(["a","b","c"]) - + ''' return GiacMethods['ord'](self,*args) @@ -11860,7 +11860,7 @@ cdef class GiacMethods_base: Returns element order of g in (Z/nZ)^* or in a finite field. Ex1:order(3 % 7) Ex2: GF(3,5,g); order(g^2+g+1); - + ''' return GiacMethods['order'](self,*args) @@ -11869,10 +11869,10 @@ cdef class GiacMethods_base: Help for order_size: order_size(Expr) Remainder (O term) of a series expansion: limit(x^a*order_size(x),x=0)=0 if a>0. - See also: 1/ series + See also: 1/ series Ex1:order_size(x) Ex2: limit(sqrt(x)*order_size(x),x=0) - + ''' return GiacMethods['order_size'](self,*args) @@ -11881,12 +11881,12 @@ cdef class GiacMethods_base: Help for ordinate: ordinate(Pnt or Vect) Returns the ordinate of a point or a vector. - See also: 1/ abscissa 2/ affix 3/ cote 4/ coordinates + See also: 1/ abscissa 2/ affix 3/ cote 4/ coordinates Ex1:ordinate(point(1+2*i)) Ex2:ordinate(point(i)-point(1+2*i)) Ex3:ordinate(-1-i) Ex4:ordinate(point(1,2,3)) - + ''' return GiacMethods['ordinate'](self,*args) @@ -11895,11 +11895,11 @@ cdef class GiacMethods_base: Help for orthocenter: orthocenter((Pnt or Cplx),(Pnt or Cplx),(Pnt or Cplx)) Shows the orthocenter of a triangle or of the triangle made with 3 points. - See also: 1/ altitude 2/ triangle + See also: 1/ altitude 2/ triangle Ex1:orthocenter(1+i,2,i) Ex2:orthocenter(point(1+i),point(2),point(i)) Ex3:orthocenter(triangle(0,1,1+i)) - + ''' return GiacMethods['orthocenter'](self,*args) @@ -11908,10 +11908,10 @@ cdef class GiacMethods_base: Help for orthogonal: orthogonal((Pnt),(Line or Plan)) orthogonal(A,line(B,C)) draws the orthogonal plane of line BC through A and orthogonal(A,plane(B,C,D)) draws the orthogonal line of plane(B,C,D) through A. - See also: 1/ altitude 2/ perpendicular + See also: 1/ altitude 2/ perpendicular Ex1:orthogonal(point(0,0,0),line(point(1,0,0),point(0,1,0))) Ex2:orthogonal(point(0,0,0),plane(point(1,0,0),point(0,1,0),point(0,0,1))) - + ''' return GiacMethods['orthogonal'](self,*args) @@ -11920,14 +11920,14 @@ cdef class GiacMethods_base: Help for osculating_circle: osculating_circle(Curve,Point) Osculating circle at point M to the curve C. - See also: 1/ curvature 2/ evolute + See also: 1/ curvature 2/ evolute Ex1:osculating_circle(plot(x^2),point(1,1)) Ex2:osculating_circle([5*cos(t),5*sin(t)],t,0) Ex3:osculating_circle([t,t^2],t) Ex4:osculating_circle([t,t^2],t,1) Ex5:osculating_circle([3*exp(t/2)*cos(t),3*exp(t/2)*sin(t)],t) Ex6:osculating_circle([3*exp(t/2)*cos(t),3*exp(t/2)*sin(t)],t,7) - + ''' return GiacMethods['osculating_circle'](self,*args) @@ -11936,9 +11936,9 @@ cdef class GiacMethods_base: Help for p1oc2: p1oc2(Permut,Cycle) Returns the permutation product of p1 and c2. - See also: 1/ c1op2 2/ p1op2 + See also: 1/ c1op2 2/ p1op2 Ex1:p1oc2([0,2,1],[2,1,3]) - + ''' return GiacMethods['p1oc2'](self,*args) @@ -11947,9 +11947,9 @@ cdef class GiacMethods_base: Help for p1op2: p1op2(Permut,Permut) Returns the permutation product of p1 and p2. - See also: 1/ c1op2 2/ p1oc2 + See also: 1/ c1op2 2/ p1oc2 Ex1:p1op2([0,2,1],[1,0,3,2]) - + ''' return GiacMethods['p1op2'](self,*args) @@ -11961,7 +11961,7 @@ cdef class GiacMethods_base: Ex1:pa2b2(17) Ex2:pa2b2(209) Ex3:pa2b2(229) - + ''' return GiacMethods['pa2b2'](self,*args) @@ -11970,9 +11970,9 @@ cdef class GiacMethods_base: Help for pade: pade(Expr(Xpr), Var(x), (Intg(n) || Poly(N)), Intg(p)) Pade approximation P/Q=Xpr mod x^(n+1) or mod N with degree(P)3,x^20 (by default a=1) to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ bartlett_hann_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window + See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ bartlett_hann_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ welch_window Ex1: scatterplot(poisson_window(randvector(1000,0..1),0.5)) - + ''' return GiacMethods['poisson_window'](self,*args) @@ -12932,10 +12932,10 @@ cdef class GiacMethods_base: Help for polar: polar(Crcle,Pnt or Cplxe(A)) Returns the line of the conjugated points of A with respect to the circle. - See also: 1/ pole 2/ is_conjugate + See also: 1/ pole 2/ is_conjugate Ex1:polar(circle(0,1),point(1+i)/2) Ex2:polar(circle(0,1),point(1+i)) - + ''' return GiacMethods['polar'](self,*args) @@ -12944,12 +12944,12 @@ cdef class GiacMethods_base: Help for polar_coordinates: polar_coordinates(Pnt or Cplx or LstRectCoord) Returns the list of the norm and of the argument of the affix of a point (for 2D) or of a complex number or of the list of rectangular coordinates. - See also: 1/ abscissapoint 2/ ordinate 3/ rectangular_coordinates 4/ polar_point + See also: 1/ abscissapoint 2/ ordinate 3/ rectangular_coordinates 4/ polar_point Ex1:polar_coordinates(point(1+2*i)) Ex2:polar_coordinates(-1-i) Ex3:polar_coordinates([-1,2]) Ex4:polar_coordinates(point(1+2*i)-point(-1+i)) - + ''' return GiacMethods['polar_coordinates'](self,*args) @@ -12958,10 +12958,10 @@ cdef class GiacMethods_base: Help for polar_point: polar_point(Real(r),Real(t)) Returns the point (for 2D) with the arguments r and t as polar coordinates (i.e. with r*exp(i*t) as affix). - See also: 1/ abscissa 2/ ordinate 3/ polar_coordinates 4/ rectangular_coordinates 5/ point + See also: 1/ abscissa 2/ ordinate 3/ polar_coordinates 4/ rectangular_coordinates 5/ point Ex1:polar_point(1,pi/4) Ex2:polar_point(2,-pi/3) - + ''' return GiacMethods['polar_point'](self,*args) @@ -12970,10 +12970,10 @@ cdef class GiacMethods_base: Help for polarplot: polarplot(Expr,Var,VarMin,VarMax) plotpolar(f(x),x,a,b) draws the polar curve r=f(x) for x in [a,b]. - See also: 1/ plotparam 2/ plotfunc 3/ plotpolar + See also: 1/ plotparam 2/ plotfunc 3/ plotpolar Ex1:polarplot(sin(2*x),x,0,pi) Ex2:polarplot(sin(2*x),x,0,pi,tstep=0.1) - + ''' return GiacMethods['polarplot'](self,*args) @@ -12982,10 +12982,10 @@ cdef class GiacMethods_base: Help for pole: pole(Crcle,Line) Returns the point having the line as polar with respect to the circle . - See also: 1/ polar 2/ is_conjugate + See also: 1/ polar 2/ is_conjugate Ex1:pole(circle(0,1),line(i,1)) Ex2:pole(circle(0,1),line((1+i),2)) - + ''' return GiacMethods['pole'](self,*args) @@ -12994,12 +12994,12 @@ cdef class GiacMethods_base: Help for poly2symb: poly2symb(Lst,Var) Gives the polynomial (or its value) : the first argument is the vector of coefficients and the second argument is the variable (by default x). - See also: 1/ e2r 2/ symb2poly + See also: 1/ e2r 2/ symb2poly Ex1:poly2symb([1,2,3]) Ex2:poly2symb([1,2,3],x) Ex3:poly2symb([1,2,3],-1) Ex4:poly2symb([1,2,-1],y) - + ''' return GiacMethods['poly2symb'](self,*args) @@ -13008,10 +13008,10 @@ cdef class GiacMethods_base: Help for polyEval: polyEval(Vect,Real(x0)) Evaluates at a point x0, a polynomial given by its coefficients. - See also: 1/ proot 2/ pcoeff + See also: 1/ proot 2/ pcoeff Ex1:polyEval([1,0,-2],1) Ex2:polyEval([1,2,-25,-26,120],8) - + ''' return GiacMethods['polyEval'](self,*args) @@ -13020,10 +13020,10 @@ cdef class GiacMethods_base: Help for polygon: polygon(LstPnt||LstCplx) Returns and draws the polygon where its vertices are the elements of l. - See also: 1/ isopolygon 2/ quadrilateral 3/ convexhull 4/ hexagon + See also: 1/ isopolygon 2/ quadrilateral 3/ convexhull 4/ hexagon Ex1:polygon(i,1+i,2-i,-1,-1+i/2) Ex2:polygon(point(0,0,0),point(3,3,3),point(0,0,3),point(3,0,0)) - + ''' return GiacMethods['polygon'](self,*args) @@ -13032,11 +13032,11 @@ cdef class GiacMethods_base: Help for polygone_rempli: polygone_rempli(Intg(n)) The argument is an integer <-1 which gives the number of previous turtle positions drawing a polygon and created this full polygon. - See also: 1/ + See also: 1/ Ex1: repete(4,avance 40,tourne_droite);polygone_rempli -8 Ex2: repete(3,avance 40,tourne_droite 120);polygone_rempli -6 Ex3: repete(3,avance 40,avance 40,tourne_droite 120);polygone_rempli -9 - + ''' return GiacMethods['polygone_rempli'](self,*args) @@ -13045,9 +13045,9 @@ cdef class GiacMethods_base: Help for polygonplot: polygonplot(Mtrx) Draws the polygons joining for j fixed and for k=0..nrows, the points (xk,yk) where xk=element row k column 0 and yk=element row k column j, after the xk are sorted (we obtain ncols-1 polygons). - See also: 1/ scatterplot 2/ listplot 3/ polygonscatterplot + See also: 1/ scatterplot 2/ listplot 3/ polygonscatterplot Ex1:polygonplot([[1,2,3],[2,0,1],[-1,2,3]]) - + ''' return GiacMethods['polygonplot'](self,*args) @@ -13056,9 +13056,9 @@ cdef class GiacMethods_base: Help for polygonscatterplot: polygonscatterplot(Mtrx) Draws the points (xk,yk) and the polygons joining for j fixed and for k=0..nrows, the points (xk,yk) where xk=element row k column 0 et yk=element row k column j, after the xk are sorted (we obtain ncols-1 polygons). - See also: 1/ scatterplot 2/ polygonplot 3/ listplot + See also: 1/ scatterplot 2/ polygonplot 3/ listplot Ex1:polygonscatterplot([[1,2,3],[2,0,1],[-1,2,3]]) - + ''' return GiacMethods['polygonscatterplot'](self,*args) @@ -13067,9 +13067,9 @@ cdef class GiacMethods_base: Help for polyhedron: polyhedron(SeqPnt(A,B,C...)) Draws a convex polyhedron with vertices among the arguments. - See also: 1/ cube 2/ parallelepiped + See also: 1/ cube 2/ parallelepiped Ex1:polyhedron([0,0,0],[0,5,0],[0,0,5],[1,2,6]) - + ''' return GiacMethods['polyhedron'](self,*args) @@ -13078,13 +13078,13 @@ cdef class GiacMethods_base: Help for polynom: polynom(Opt) Option of the convert or convertir command and of the taylor and series commands (list=>n-poly or series=>poly). - See also: 1/ poly2symb 2/ taylor 3/ series 4/ convert + See also: 1/ poly2symb 2/ taylor 3/ series 4/ convert Ex1: convert([[10,[3,1]],[12,[2,2]]],polynom) Ex2: convert(taylor(sin(x)),polynom) Ex3: convert(series(sin(x),x=0,6),polynom) Ex4: taylor(sin(x),x=0,5,polynom) Ex5: series(sin(x),x=0,6,,polynom) - + ''' return GiacMethods['polynom'](self,*args) @@ -13093,11 +13093,11 @@ cdef class GiacMethods_base: Help for polynomial_regression: polynomial_regression(Lst||Mtrx(A),[Lst],Intg(n)) Returns the coefficients (an,...a1,a0) of y=an*x^n+..a1x+a0 : it is the best polynomial which approx the points where the coordinates are the rows of A (or the 2 lists) (n is the 2nd argument). - See also: 1/ linear_regression 2/ power_regression + See also: 1/ linear_regression 2/ power_regression Ex1:polynomial_regression([[1.0,1.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]],3) Ex2:polynomial_regression([[0.0,1.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]],3) Ex3:polynomial_regression([0.0,2.0,3.0,4.0],[1.0,4.0,9.0,16.0],3) - + ''' return GiacMethods['polynomial_regression'](self,*args) @@ -13106,11 +13106,11 @@ cdef class GiacMethods_base: Help for polynomial_regression_plot: polynomial_regression_plot(Lst||Mtrx(A),[Lst],Intg(n)) Returns the plot of y=an*x^n+..a1x+a0 : it is the best polynomial which approx the points where the coordinates are the rows of A (or the 2 lists) (n is the 2nd argument). - See also: 1/ linear_regression_plot 2/ power_regression_plot + See also: 1/ linear_regression_plot 2/ power_regression_plot Ex1:polynomial_regression_plot([[1.0,1.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]],3) Ex2:polynomial_regression_plot([[0.0,1.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]],3) Ex3:polynomial_regression_plot([0.0,2.0,3.0,4.0],[1.0,4.0,9.0,16.0],3) - + ''' return GiacMethods['polynomial_regression_plot'](self,*args) @@ -13119,11 +13119,11 @@ cdef class GiacMethods_base: Help for position: position(NULL or LstCoord) Returns the turtle position in pixels or puts the turtle at the position given by the argument with the same direction. - See also: 1/ cap 2/ initialise + See also: 1/ cap 2/ initialise Ex1:position() Ex2:position(50,70) Ex3:position([50,70]) - + ''' return GiacMethods['position'](self,*args) @@ -13132,9 +13132,9 @@ cdef class GiacMethods_base: Help for poslbdLMQ: poslbdLMQ(Poly(P)) Returns a lower bound on the values of the positive roots of P. Akritas-Strzebonski-Vigklas' Local Max Quadratic (LMQ) method is used. - See also: 1/ posubLMQ 2/ VAS_positive 3/ realroot + See also: 1/ posubLMQ 2/ VAS_positive 3/ realroot Ex1:poslbdLMQ(x^3-7*x+7) - + ''' return GiacMethods['poslbdLMQ'](self,*args) @@ -13143,9 +13143,9 @@ cdef class GiacMethods_base: Help for posubLMQ: posubLMQ(Poly(P)) Returns an upper bound on the values of the positive roots of P. Akritas-Strzebonski-Vigklas' Local Max Quadratic (LMQ) method is used. - See also: 1/ poslbdLMQ 2/ VAS_positive 3/ realroot + See also: 1/ poslbdLMQ 2/ VAS_positive 3/ realroot Ex1:posubLMQ(x^3-7*x+7) - + ''' return GiacMethods['posubLMQ'](self,*args) @@ -13154,9 +13154,9 @@ cdef class GiacMethods_base: Help for potential: potential(Vect(V),VectVar) Returns U such that derive(U,Vector_of_variable)=V. - See also: 1/ derive 2/ vpotential + See also: 1/ derive 2/ vpotential Ex1:potential([2*x*y+3,x^2-4*z,-4*y],[x,y,z]) - + ''' return GiacMethods['potential'](self,*args) @@ -13165,9 +13165,9 @@ cdef class GiacMethods_base: Help for pow2exp: pow2exp(Expr) Converts powers to exponentials. - See also: 1/ exp2pow + See also: 1/ exp2pow Ex1:pow2exp(a^b) - + ''' return GiacMethods['pow2exp'](self,*args) @@ -13176,11 +13176,11 @@ cdef class GiacMethods_base: Help for power_regression: power_regression(Lst|Mtrx(A),[Lst]) Returns the coefficients (m,b) of y=b*x^m : it is the best monomial which approx the points where the coordinates are the rows of A (or the 2 lists). - See also: 1/ polynomial_regression 2/ linear_regressiont + See also: 1/ polynomial_regression 2/ linear_regressiont Ex1:power_regression([[1.0,1.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]]) Ex2:power_regression([[1.0,2.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]]) Ex3:power_regression([1.0,2.0,3.0,4.0],[2.0,4.0,9.0,16.0]) - + ''' return GiacMethods['power_regression'](self,*args) @@ -13189,11 +13189,11 @@ cdef class GiacMethods_base: Help for power_regression_plot: power_regression_plot(Lst||Mtrx(A),[Lst]) Returns the plot of y=b*x^m : it is the best monomial which approx the points where the coordinates are the rows of A (or the 2 lists). - See also: 1/ polynomial_regression_plot 2/ linear_regression_plot + See also: 1/ polynomial_regression_plot 2/ linear_regression_plot Ex1:power_regression_plot([[1.0,1.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]]) Ex2:power_regression_plot([[1.0,2.0],[2.0,4.0],[3.0,9.0],[4.0,16.0]]) Ex3:power_regression_plot([1.0,2.0,3.0,4.0],[2.0,4.0,9.0,16.0]) - + ''' return GiacMethods['power_regression_plot'](self,*args) @@ -13202,10 +13202,10 @@ cdef class GiacMethods_base: Help for powermod: powermod(Intg(a),Intg(n),Intg(p),[Expr(P(x))],[Var]) Computes a^n modulo p or modulo p,P(x) (fast algorithm). - See also: 1/ pow 2/ ^ + See also: 1/ pow 2/ ^ Ex1:powermod(17,452,19) Ex2:powermod(x+1,452,19,x^4+x+1,x) - + ''' return GiacMethods['powermod'](self,*args) @@ -13214,10 +13214,10 @@ cdef class GiacMethods_base: Help for powerpc: powerpc(Cercle,Pnt or Cplx) Returns the real number d^2-R^2 (d=distance between point and center, R=radius). - See also: 1/ radical_axis + See also: 1/ radical_axis Ex1:powerpc(circle(0,1+i),3+i) Ex2:powerpc(circle(0,point(1+i)),3+i) - + ''' return GiacMethods['powerpc'](self,*args) @@ -13226,10 +13226,10 @@ cdef class GiacMethods_base: Help for powexpand: powexpand(Expr) Expands the expression as a function of the exponent. - See also: 1/ + See also: 1/ Ex1:powexpand(2^(x+y)) Ex2:powexpand(3^(2*x)) - + ''' return GiacMethods['powexpand'](self,*args) @@ -13238,10 +13238,10 @@ cdef class GiacMethods_base: Help for powmod: powmod(Intg(a),Intg(n),Intg(p),[Expr(P(x))],[Var]) Computes a^n modulo p or modulo p,P(x) (fast algorithm). - See also: 1/ pow 2/ ^ + See also: 1/ pow 2/ ^ Ex1:powmod(17,452,19) Ex2:powmod(x+1,452,19,x^4+x+1,x) - + ''' return GiacMethods['powmod'](self,*args) @@ -13250,14 +13250,14 @@ cdef class GiacMethods_base: Help for prepend: prepend(Lst||Set||Str(L),Elem(n)) Adds an element to a set or at the beginning of a list or of a string (L:=prepend(L,a) or L.prepend(a)). - See also: 1/ append 2/ concat + See also: 1/ append 2/ concat Ex1:prepend([1,2],3) Ex2:prepend(set[1,2],3) Ex3: L:=[1,2];L:=prepend(L,3) - Ex4: L:=[1,2];L.prepend(L,3) + Ex4: L:=[1,2];L.prepend(L,3) Ex5: S:=set[1,2];S:=prepend(L,3) Ex6: S:=set[1,2];S.prepend(L,3) - + ''' return GiacMethods['prepend'](self,*args) @@ -13266,12 +13266,12 @@ cdef class GiacMethods_base: Help for preval: preval(Expr(F(Var)),Real(a),Real(b),[Var]) Returns F(b)-F(a). - See also: 1/ subst 2/ int + See also: 1/ subst 2/ int Ex1:preval(x^2-2,2,3) Ex2:preval(y^2-2,2,3,y) Ex3:preval(int(x),0,1) Ex4:preval(int(y,y),0,1,y) - + ''' return GiacMethods['preval'](self,*args) @@ -13280,10 +13280,10 @@ cdef class GiacMethods_base: Help for prevperm: prevperm(Intg(n)) Returns the previous permutation with the lexicographic order. - See also: 1/ nextperm 2/ is_permu + See also: 1/ nextperm 2/ is_permu Ex1:prevperm([0,1,3,2]) Ex2:prevperm([0,1,2,3]) - + ''' return GiacMethods['prevperm'](self,*args) @@ -13292,10 +13292,10 @@ cdef class GiacMethods_base: Help for prevprime: prevprime(Intg(a)) Previous prime or pseudo-prime before a given integer a. - See also: 1/ nextprime 2/ is_prime 3/ ithprime + See also: 1/ nextprime 2/ is_prime 3/ ithprime Ex1:prevprime(9856989898999) Ex2:prevprime(97160249868928888261606009) - + ''' return GiacMethods['prevprime'](self,*args) @@ -13304,10 +13304,10 @@ cdef class GiacMethods_base: Help for primpart: primpart(Poly(P),[Var]) Returns the polynomial P divided by the gcd of its coefficients. - See also: 1/ content + See also: 1/ content Ex1:primpart(2x^2+10x+6) Ex2:primpart(2t^2+10t+6,t) - + ''' return GiacMethods['primpart'](self,*args) @@ -13316,10 +13316,10 @@ cdef class GiacMethods_base: Help for printf: printf(Expr) 2d printing. - See also: 1/ print + See also: 1/ print Ex1:printf(sqrt(2)) Ex2:printf("%gen+%gen=%gen",a,b,a+b) - + ''' return GiacMethods['printf'](self,*args) @@ -13328,9 +13328,9 @@ cdef class GiacMethods_base: Help for prism: prism(LstPnt([A,B,C,D]),Pnt(A1)) Draws a prism with plane base ABCD...and with edges parallel to AA1 (the faces are parallelograms). - See also: 1/ cube 2/ polyhedron + See also: 1/ cube 2/ polyhedron Ex1:prism([[0,0,0],[5,0,0],[0,5,0],[-5,5,0]],[0,0,5]) - + ''' return GiacMethods['prism'](self,*args) @@ -13339,9 +13339,9 @@ cdef class GiacMethods_base: Help for prism_graph: prism_graph(Intg(n)) Returns the generalized Petersen graph GP(n,1). - See also: 1/ antiprism_graph 2/ web_graph + See also: 1/ antiprism_graph 2/ web_graph Ex1:prism_graph(5) - + ''' return GiacMethods['prism_graph'](self,*args) @@ -13350,7 +13350,7 @@ cdef class GiacMethods_base: Help for product: product(Expr||Lst,[Var||Lst],[Intg(a)],[Intg(b)],[Intg(p)]) Multiplies the values of the expression when the variable go from a to b with a step p (product(expression,var,begin,end,step) by default p=1) or product of the elements of a list or product element by element of 2 lists or matrices. - See also: 1/ sum + See also: 1/ sum Ex1:product(n,n,1,10,2) Ex2:product(1/n,n,1,10) Ex3:product(1/n,n,11,1) @@ -13358,7 +13358,7 @@ cdef class GiacMethods_base: Ex5:product([2,3,4,5]) Ex6:product([2,3,4],[5,6,7]) Ex7:product([[2,3,4],[5,6,7]],[[2,3,4],[5,6,7]]) - + ''' return GiacMethods['product'](self,*args) @@ -13367,11 +13367,11 @@ cdef class GiacMethods_base: Help for projection: projection(Curve,Pnt) projection(C,A) is the orthogonal projection of A on the curve C. - See also: 1/ perpendicular + See also: 1/ perpendicular Ex1: H:=projection(line(i,1-i),1+i) Ex2: K:=projection(circle(0,1),1+i) Ex3: J:=projection(circle(0,1),point(1+2*i)) - + ''' return GiacMethods['projection'](self,*args) @@ -13380,12 +13380,12 @@ cdef class GiacMethods_base: Help for proot: proot(Vect||Poly,[Intg(n)]) Returns all computed roots of a polynomial given by its coefficients (may not work if roots are not simple). - See also: 1/ pcoeff 2/ peval 3/ realroot 4/ complexroot 5/ rationalroot 6/ crationalroot + See also: 1/ pcoeff 2/ peval 3/ realroot 4/ complexroot 5/ rationalroot 6/ crationalroot Ex1:proot([1,0,-2]) Ex2:proot(x^2-2) Ex3:proot([1,2,-25,-26,120]) Ex4:proot(x^4+5x-3,30) - + ''' return GiacMethods['proot'](self,*args) @@ -13394,10 +13394,10 @@ cdef class GiacMethods_base: Help for propFrac: propFrac(Frac or RatFrac) Simplifies and writes the fraction (or rational fraction) A/B as Q+R/B with R=0 or, the (-n)th previous question if n<0 (by default n=-1 for the previous question). - See also: 1/ ans + See also: 1/ ans Ex1:quest() Ex2:quest(2) Ex3:quest(-2) - + ''' return GiacMethods['quest'](self,*args) @@ -13604,11 +13604,11 @@ cdef class GiacMethods_base: Help for quo: quo((Vect or Poly),(Vect or Poly),[Var]) Euclidean quotient of 2 polynomials. - See also: 1/ rem 2/ quorem 3/ Quo 4/ iquo + See also: 1/ rem 2/ quorem 3/ Quo 4/ iquo Ex1:quo([1,2,3,4],[-1,2]) Ex2:quo(x^3+2x^2+3x+4,-x+2) Ex3:quo(t^3+2t^2+3t+4,-t+2,t) - + ''' return GiacMethods['quo'](self,*args) @@ -13617,12 +13617,12 @@ cdef class GiacMethods_base: Help for quorem: quorem((Vect or Poly),(Vect or Poly),[Var]) Euclidean quotient and remainder of 2 polynomials. - See also: 1/ rem 2/ quo 3/ iquorem + See also: 1/ rem 2/ quo 3/ iquorem Ex1:quorem([1,2,3,4],[-1,2]) Ex2:quorem(x^3+2x^2+3x+4,-x+2) Ex3:quorem(t^3+2t^2+3t+4,-t+2,t) Ex4:quorem(t^4-1,(t+1)^2,t) - + ''' return GiacMethods['quorem'](self,*args) @@ -13631,11 +13631,11 @@ cdef class GiacMethods_base: Help for quote: quote(Expr) Returns its argument unevaluated (and also a:=quote(a) purges a). - See also: 1/ + See also: 1/ Ex1:quote(1+2) Ex2:quote(1/x+1/(x-1)) Ex3:quote((x+1)*(x-1)) - + ''' return GiacMethods['quote'](self,*args) @@ -13644,12 +13644,12 @@ cdef class GiacMethods_base: Help for r2e: r2e(Lst,Var) Gives the polynomial (or its value) : the first argument is the vector of coefficients and the second argument is the variable (by default x). - See also: 1/ e2r 2/ symb2poly + See also: 1/ e2r 2/ symb2poly Ex1:r2e([1,2,3]) Ex2:r2e([1,2,3],x) Ex3:r2e([1,2,3],-1) Ex4:r2e([1,2,-1],y) - + ''' return GiacMethods['r2e'](self,*args) @@ -13658,10 +13658,10 @@ cdef class GiacMethods_base: Help for radical_axis: radical_axis(Crcle,Crcle) Returns the line of points with same powerpc with respect to the 2 circles. - See also: 1/ powerpc + See also: 1/ powerpc Ex1:radical_axis(circle(0,1+i),circle(1,1+i)) Ex2:radical_axis(circle(0,point(1+i)),circle(1,point(1+i))) - + ''' return GiacMethods['radical_axis'](self,*args) @@ -13670,9 +13670,9 @@ cdef class GiacMethods_base: Help for radius: radius(Crcle) radius(C) gives the radius of the circle C. - See also: 1/ center 2/ circle + See also: 1/ center 2/ circle Ex1:radius(incircle(-1,1-i,i)) - + ''' return GiacMethods['radius'](self,*args) @@ -13681,9 +13681,9 @@ cdef class GiacMethods_base: Help for ramene: ramene(Str(fich_name)) Reads variables and their values from the file fich_name. - See also: 1/ write 2/ readrgb 3/ readwav 4/ csv2gen + See also: 1/ write 2/ readrgb 3/ readwav 4/ csv2gen Ex1:ramene("toto") - + ''' return GiacMethods['ramene'](self,*args) @@ -13692,7 +13692,7 @@ cdef class GiacMethods_base: Help for rand: rand(Intg(n) or Interval(p..n) or NULL,[Intg(b1) or Lst(L)],[Intg(b2)]) rand(n)=a random integer (resp rand(p,n)=a real or rand(p..n)=a real function) with uniform distribution in 0..n-1 (resp in [p;n])(rand()=rand(0,1)=a real in [0,1[) or rand(n,b1,b2)=n integers between b1 and b2 or rand(n,L)=list of n elements of L. - See also: 1/ srand 2/ randpoly 3/ ranm 4/ randvector 5/ hasard + See also: 1/ srand 2/ randpoly 3/ ranm 4/ randvector 5/ hasard Ex1:rand(4) Ex2:rand() Ex3:rand(0,2) @@ -13704,7 +13704,7 @@ cdef class GiacMethods_base: Ex9: L:=["r","r","r","b","n"];L3:=L.rand(3) Ex10: L:=["r","r","r","b","n"];a:=rand(L) Ex11: L:=["r","r","r","b","n"];a:=L.rand() - + ''' return GiacMethods['rand'](self,*args) @@ -13713,7 +13713,7 @@ cdef class GiacMethods_base: Help for randMat: randMat(Intg(n), [Intg(m)],[Interval or quote(DistribLaw)]) Returns a list of size n or an n*m matrix that contains random integers in the range -99 through 99 with uniform distribution or contains random numbers according to the law put between quotes. - See also: 1/ idn 2/ randPoly 3/ rand 4/ randvector + See also: 1/ idn 2/ randPoly 3/ rand 4/ randvector Ex1:randMat(3) Ex2:randMat(3,2) Ex3:randMat(3,2,6) @@ -13727,7 +13727,7 @@ cdef class GiacMethods_base: Ex11:randMat(3,2,1..2) Ex12:randMat(3,5,multinomial,[1/2,1/3,1/6],["R","V","B"]) Ex13: GF(2,8,g);ranm(3,3,g) - + ''' return GiacMethods['randMat'](self,*args) @@ -13736,10 +13736,10 @@ cdef class GiacMethods_base: Help for randNorm: randNorm(Real(mu),Real(sigma)) Returns a random real with normal distribution N(mu,sigma). - See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randpoisson 8/ randgeometric 9/ randmultinomial + See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randpoisson 8/ randgeometric 9/ randmultinomial Ex1:randNorm(0,1) Ex2:randNorm(2,1) - + ''' return GiacMethods['randNorm'](self,*args) @@ -13748,14 +13748,14 @@ cdef class GiacMethods_base: Help for randPoly: randPoly([Var(Var)],Intg(n),[law]) Returns a polynomial with variable var (or x), of degree n and where the coefficients are random integers in the range -99 through 99 with uniform distribution or according to a law. - See also: 1/ ranm 2/ randvector + See also: 1/ ranm 2/ randvector Ex1:randPoly(5) Ex2:randPoly(t,8) Ex3:randPoly(t,8,-1..1) Ex4:randPoly([x,y],[10,3]) Ex5:randPoly([x,y],[10,3],1 mod 7) Ex6: GF(2,8,g);randpoly(t,8,g);randpoly([x,y],[2,3],g) - + ''' return GiacMethods['randPoly'](self,*args) @@ -13764,10 +13764,10 @@ cdef class GiacMethods_base: Help for randbetad: randbetad(Real(a),Real(b)) Returns a random real according to the Beta distribution with parameters a>0 and b>0. - See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector + See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector Ex1:randbetad(1,2) Ex2:randbetad(1.5,4) - + ''' return GiacMethods['randbetad'](self,*args) @@ -13776,10 +13776,10 @@ cdef class GiacMethods_base: Help for randbinomial: randbinomial(Intg(n),Real(p)) Returns a random integer with binomial distribution B(n,p) i.e. the number of successes in n independant tests where for each test, the success of probability is p. - See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randnorm 7/ randpoisson 8/ randgeometric 9/ randmultinomial + See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randnorm 7/ randpoisson 8/ randgeometric 9/ randmultinomial Ex1:randbinomial(10,0.4) Ex2:randbinomial(100,0.8) - + ''' return GiacMethods['randbinomial'](self,*args) @@ -13788,10 +13788,10 @@ cdef class GiacMethods_base: Help for randchisquare: randchisquare(Intg(n)) Returns a random integer with chi^2 distribution, χ^2(n). - See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randnorm 8/ randgeometric 9/ randmultinomial + See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randnorm 8/ randgeometric 9/ randmultinomial Ex1:randchisquare(5) Ex2:randchisquare(2) - + ''' return GiacMethods['randchisquare'](self,*args) @@ -13800,10 +13800,10 @@ cdef class GiacMethods_base: Help for randexp: randexp(Real(a)) Returns a random real according to the exponential distribution with parameter a>0. - See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector + See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector Ex1:randexp(1) Ex2:randexp(2) - + ''' return GiacMethods['randexp'](self,*args) @@ -13812,10 +13812,10 @@ cdef class GiacMethods_base: Help for randfisher: randfisher(Intg(n),Intg(m)) Returns a random integer with Fisher-Snedecor distribution F(n,m). - See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randnorm 8/ randgeometric 9/ randmultinomial + See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randnorm 8/ randgeometric 9/ randmultinomial Ex1:randfisher(5,2) Ex2:randfisher(2,4) - + ''' return GiacMethods['randfisher'](self,*args) @@ -13824,10 +13824,10 @@ cdef class GiacMethods_base: Help for randgammad: randgammad(Real(a),Real(b)) Returns a random real according to the Gamma distribution with parameters a>0 and b>0. - See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector + See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector Ex1:randgammad(1,2) Ex2:randgammad(1.5,4) - + ''' return GiacMethods['randgammad'](self,*args) @@ -13836,9 +13836,9 @@ cdef class GiacMethods_base: Help for randgeometric: randgeometric(Real(p)) Returns a random integer following the geometric distribution with parameter p. - See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randnorm 7/ randpoisson 8/ randbinomial 9/ randmultinomial + See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randnorm 7/ randpoisson 8/ randbinomial 9/ randmultinomial Ex1:randgeometric(0.4) - + ''' return GiacMethods['randgeometric'](self,*args) @@ -13847,10 +13847,10 @@ cdef class GiacMethods_base: Help for randint: randint(Intg(n1),Intg(n2)) randint(n1,n2)=an integer in [n1, n2] or [n2,n1]. - See also: 1/ rand + See also: 1/ rand Ex1:randint(1,10) Ex2:randint(-1,-10) - + ''' return GiacMethods['randint'](self,*args) @@ -13859,10 +13859,10 @@ cdef class GiacMethods_base: Help for randmarkov: randmarkov(Mtrx(M) || Vctr(v),Intg(i0),[Intg(n)]) Returns a random sequence of n states (Markov chain) starting from i0, with probability transition matrix M, or returns a stochastic matrix with p recurrent loops v=[n1,..,np] and i0 transient states. - See also: 1/ markov 2/ plotproba + See also: 1/ markov 2/ plotproba Ex1:randmarkov([[0,0,1/2,0,1/2],[0,0,1,0,0],[1/4,1/4,0,1/4,1/4],[0,0,1/2,0,1/2],[0,0,0,0,1]],2,20) Ex2:randmarkov([1,2,1,3],4) - + ''' return GiacMethods['randmarkov'](self,*args) @@ -13871,7 +13871,7 @@ cdef class GiacMethods_base: Help for randmatrix: randmatrix(Intg(n), [Intg(m)],[Interval or quote(DistribLaw)]) Returns a list of size n or an n*m matrix that contains random integers in the range -99 through 99 with uniform distribution or contains random numbers according to the law put between quotes. - See also: 1/ idn 2/ randPoly 3/ rand 4/ randvector + See also: 1/ idn 2/ randPoly 3/ rand 4/ randvector Ex1:randmatrix(3) Ex2:randmatrix(3,2) Ex3:randmatrix(3,2,6) @@ -13885,7 +13885,7 @@ cdef class GiacMethods_base: Ex11:randmatrix(3,2,1..2) Ex12:randmatrix(3,5,multinomial,[1/2,1/3,1/6],["R","V","B"]) Ex13: GF(2,8,g);ranm(3,3,g) - + ''' return GiacMethods['randmatrix'](self,*args) @@ -13894,10 +13894,10 @@ cdef class GiacMethods_base: Help for randmultinomial: randmultinomial(List(P),[List(K)]) Returns a random index or list element according to a multinomial distribution probability list P. - See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randnorm 7/ randpoisson 8/ randgeometric 9/ randbinomial + See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randnorm 7/ randpoisson 8/ randgeometric 9/ randbinomial Ex1:randmultinomial([1/2,1/3,1/6]) Ex2:randmultinomial([1/2,1/3,1/6],["R","V","B"]) - + ''' return GiacMethods['randmultinomial'](self,*args) @@ -13906,10 +13906,10 @@ cdef class GiacMethods_base: Help for randnorm: randnorm(Real(mu),Real(sigma)) Returns a random real with normal distribution N(mu,sigma). - See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randpoisson 8/ randgeometric 9/ randmultinomial + See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randpoisson 8/ randgeometric 9/ randmultinomial Ex1:randnorm(0,1) Ex2:randnorm(2,1) - + ''' return GiacMethods['randnorm'](self,*args) @@ -13918,7 +13918,7 @@ cdef class GiacMethods_base: Help for random: random(Intg(n) or Interval(p..n) or NULL,[Intg(b1) or Lst(L)],[Intg(b2)]) rand(n)=a random integer (resp rand(p,n)=a real or rand(p..n)=a real function) with uniform distribution in 0..n-1 (resp in [p;n])(rand()=rand(0,1)=a real in [0,1[) or rand(n,b1,b2)=n integers between b1 and b2 or rand(n,L)=list of n elements of L. - See also: 1/ srand 2/ randpoly 3/ ranm 4/ randvector 5/ hasard + See also: 1/ srand 2/ randpoly 3/ ranm 4/ randvector 5/ hasard Ex1:random(4) Ex2:random() Ex3:random(0,2) @@ -13930,7 +13930,7 @@ cdef class GiacMethods_base: Ex9: L:=["r","r","r","b","n"];L3:=L.rand(3) Ex10: L:=["r","r","r","b","n"];a:=rand(L) Ex11: L:=["r","r","r","b","n"];a:=L.rand() - + ''' return GiacMethods['random'](self,*args) @@ -13939,10 +13939,10 @@ cdef class GiacMethods_base: Help for random_bipartite_graph: random_bipartite_graph(Intg(n)||Lst(a,b),Real(p)||Intg(m)) Returns a random undirected unweighted bipartite graph with n vertices where each possible edge is present with probability p or where m edges are created at random. When the first argument is list [a,b] of integers, two groups of vertices with sizes a and b are created. - See also: 1/ random_digraph 2/ random_graph 3/ random_planar_graph 4/ random_regular_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree + See also: 1/ random_digraph 2/ random_graph 3/ random_planar_graph 4/ random_regular_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree Ex1:random_bipartite_graph(10,0.5) Ex2:random_bipartite_graph([2,3],1.0) - + ''' return GiacMethods['random_bipartite_graph'](self,*args) @@ -13951,10 +13951,10 @@ cdef class GiacMethods_base: Help for random_digraph: random_digraph(Intg(n)||Lst(V),Real(p)||Intg(m)) Returns a random directed unweighted graph with n vertices (list V of labels may me specified) where two vertices are connected with probability p or where m edges are created at random. - See also: 1/ random_bipartite_graph 2/ random_graph 3/ random_planar_graph 4/ random_regular_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree + See also: 1/ random_bipartite_graph 2/ random_graph 3/ random_planar_graph 4/ random_regular_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree Ex1:random_digraph(8,0.5) Ex2:random_digraph(8,10) - + ''' return GiacMethods['random_digraph'](self,*args) @@ -13963,10 +13963,10 @@ cdef class GiacMethods_base: Help for random_graph: random_graph(Intg(n)||Lst(V),Real(p)||Intg(m)) Returns a random undirected unweighted graph with n vertices (list V of labels may be specified) where two vertices are connected with probability p or where m edges are created at random. - See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_planar_graph 4/ random_regular_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree + See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_planar_graph 4/ random_regular_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree Ex1:random_graph(8,0.5) Ex2:random_graph(8,10) - + ''' return GiacMethods['random_graph'](self,*args) @@ -13975,11 +13975,11 @@ cdef class GiacMethods_base: Help for random_network: random_network(Intg(a),Intg(b),[Real(p)],[opts]) Returns a random network with b grid frames of size a*a in which every edge appears with the probability p (by default 0.5). - See also: 1/ is_network 2/ maxflow + See also: 1/ is_network 2/ maxflow Ex1:random_network(3,3) Ex2:random_network(3,3,acyclic) Ex3:random_network(3,4,0.75) - + ''' return GiacMethods['random_network'](self,*args) @@ -13988,8 +13988,8 @@ cdef class GiacMethods_base: Help for random_planar_graph: random_planar_graph(Intg(n)||Lst(V),Real(p),[Intg(c)]) Returns a random planar graph with n vertices, which can also be specified as a list V of their labels, obtained by trying to remove each edge of a random triangulated graph with probability 0<=p<1 [c is connectivity level : 0 - any, 1 - connected, 2 - biconnected, 3 - triconnected (by default, c=1)]. - See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_graph 4/ random_regular_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree - + See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_graph 4/ random_regular_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree + ''' return GiacMethods['random_planar_graph'](self,*args) @@ -13998,9 +13998,9 @@ cdef class GiacMethods_base: Help for random_regular_graph: random_regular_graph(Intg(n)||Lst(V),Intg(d),[connected]) Returns a random d-regular graph with n vertices, which may be specified as list V of their labels. - See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_graph 4/ random_planar_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree + See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_graph 4/ random_planar_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree Ex1:random_regular_graph(100,80,connected) - + ''' return GiacMethods['random_regular_graph'](self,*args) @@ -14009,9 +14009,9 @@ cdef class GiacMethods_base: Help for random_sequence_graph: random_sequence_graph(Lst(L)) Returns a random undirected graph with degree sequence L. - See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_graph 4/ random_planar_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree + See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_graph 4/ random_planar_graph 5/ random_sequence_graph 6/ random_tournament 7/ random_tree Ex1:random_sequence_graph([1,3,3,2,1,2,2,2,3,3]) - + ''' return GiacMethods['random_sequence_graph'](self,*args) @@ -14020,9 +14020,9 @@ cdef class GiacMethods_base: Help for random_tournament: random_tournament(Intg(n)||Lst(V)) Returns a random tournament graph with n vertices, which may be specified as list V of their labels. - See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_graph 4/ random_planar_graph 5/ random_regular_graph 6/ random_sequence_graph 7/ random_tree + See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_graph 4/ random_planar_graph 5/ random_regular_graph 6/ random_sequence_graph 7/ random_tree Ex1:random_tournament(5) - + ''' return GiacMethods['random_tournament'](self,*args) @@ -14031,8 +14031,8 @@ cdef class GiacMethods_base: Help for random_tree: random_tree(Intg(n)||Lst(V),[Intg(d)||root[=Vrtx(v)]]) Returns a random tree graph with n vertices, which may be specified as list V of their labels [with the upper bound d (positive integer) for the degree of graph or 'root' for rooted trees]. - See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_graph 4/ random_planar_graph 5/ random_regular_graph 6/ random_sequence_graph 7/ random_tournament - + See also: 1/ random_bipartite_graph 2/ random_digraph 3/ random_graph 4/ random_planar_graph 5/ random_regular_graph 6/ random_sequence_graph 7/ random_tournament + ''' return GiacMethods['random_tree'](self,*args) @@ -14041,7 +14041,7 @@ cdef class GiacMethods_base: Help for random_variable: random_variable(Lst(W)||Mtrx(M)||Fnc(f),[params]) Returns a random variable from a probability density function f or from list of weights (discrete variable). - See also: 1/ randvector 2/ randmatrix 3/ rand + See also: 1/ randvector 2/ randmatrix 3/ rand Ex1:random_variable(fisher,2,3) Ex2:random_variable([["apple",1/3],["orange",1/4],["pear",1/5],["plum",13/60]]) Ex3:random_variable(k->1-(k/10)^2,range=-10..10) @@ -14052,7 +14052,7 @@ cdef class GiacMethods_base: Ex8:random_variable(weibull,mean=12.5,variance=1) Ex9:random_variable(uniform,mean=10,stddev=2) Ex10:random_variable(uniform,e..pi) - + ''' return GiacMethods['random_variable'](self,*args) @@ -14061,13 +14061,13 @@ cdef class GiacMethods_base: Help for randperm: randperm(Intg(n)||Lst(L)) Returns a random permutation of [0,1,2,..,n-1] or of the list L. - See also: 1/ permu2cycles 2/ is_permu 3/ permu2mat + See also: 1/ permu2cycles 2/ is_permu 3/ permu2mat Ex1:randperm(4) Ex2:randperm(7) Ex3:randperm([1,3,5,7,9]) Ex4: L:=[1,3,5,7,9];L:=randperm(L) Ex5: L:=[1,3,5,7,9];L.randperm() - + ''' return GiacMethods['randperm'](self,*args) @@ -14076,10 +14076,10 @@ cdef class GiacMethods_base: Help for randpoisson: randpoisson(Real(λ)) Returns a random integer with poisson distribution P(λ). - See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randnorm 8/ randgeometric 9/ randmultinomial + See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randnorm 8/ randgeometric 9/ randmultinomial Ex1:randpoisson(5.4) Ex2:randpoisson(2.8) - + ''' return GiacMethods['randpoisson'](self,*args) @@ -14088,14 +14088,14 @@ cdef class GiacMethods_base: Help for randpoly: randpoly([Var(Var)],Intg(n),[law]) Returns a polynomial with variable var (or x), of degree n and where the coefficients are random integers in the range -99 through 99 with uniform distribution or according to a law. - See also: 1/ ranm 2/ randvector + See also: 1/ ranm 2/ randvector Ex1:randpoly(5) Ex2:randpoly(t,8) Ex3:randpoly(t,8,-1..1) Ex4:randpoly([x,y],[10,3]) Ex5:randpoly([x,y],[10,3],1 mod 7) Ex6: GF(2,8,g);randpoly(t,8,g);randpoly([x,y],[2,3],g) - + ''' return GiacMethods['randpoly'](self,*args) @@ -14104,10 +14104,10 @@ cdef class GiacMethods_base: Help for randseed: randseed() srand returns an integer and initializes the sequence of random numbers. - See also: 1/ RandSeed + See also: 1/ RandSeed Ex1:randseed(12) Ex2: srand - + ''' return GiacMethods['randseed'](self,*args) @@ -14116,10 +14116,10 @@ cdef class GiacMethods_base: Help for randstudent: randstudent(Intg(n)) Returns a random integer with Student distribution S(n). - See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randnorm 8/ randgeometric 9/ randmultinomial + See also: 1/ rand 2/ randpoly 3/ ranm 4/ randvector 5/ randexp 6/ randbinomial 7/ randnorm 8/ randgeometric 9/ randmultinomial Ex1:randstudent(5) Ex2:randstudent(2) - + ''' return GiacMethods['randstudent'](self,*args) @@ -14128,7 +14128,7 @@ cdef class GiacMethods_base: Help for randvar: randvar(Lst(W)||Mtrx(M)||Fnc(f),[params]) Returns a random variable from a probability density function f or from list of weights (discrete variable). - See also: 1/ randvector 2/ randmatrix 3/ rand + See also: 1/ randvector 2/ randmatrix 3/ rand Ex1:randvar(fisher,2,3) Ex2:randvar([["apple",1/3],["orange",1/4],["pear",1/5],["plum",13/60]]) Ex3:randvar(k->1-(k/10)^2,range=-10..10) @@ -14139,7 +14139,7 @@ cdef class GiacMethods_base: Ex8:randvar(weibull,mean=12.5,variance=1) Ex9:randvar(uniform,mean=10,stddev=2) Ex10:randvar(uniform,e..pi) - + ''' return GiacMethods['randvar'](self,*args) @@ -14148,7 +14148,7 @@ cdef class GiacMethods_base: Help for randvector: randvector(Intg(n), [Intg(m)],[Interval or quote(DistribLaw)]) Returns a list of size n that contains random integers in the range -99 through 99 (or in 0..m-1) with uniform distribution or contains random numbers according to the law put between quotes. - See also: 1/ idn 2/ randPoly 3/ rand 4/ ranm + See also: 1/ idn 2/ randPoly 3/ rand 4/ ranm Ex1:randvector(3) Ex2:randvector(3,6) Ex3:randvector(3,normald,0,1) @@ -14159,7 +14159,7 @@ cdef class GiacMethods_base: Ex8:randvector(3,'rand(3)') Ex9:randvector(3,1..2) Ex10: GF(2,8,g);randvector(3,g) - + ''' return GiacMethods['randvector'](self,*args) @@ -14168,10 +14168,10 @@ cdef class GiacMethods_base: Help for randweibulld: randweibulld(Real(a),Real(b)) Returns a random real according to the Weibull distribution with parameters a>0 and b>0. - See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector + See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector Ex1:randweibulld(1,2) Ex2:randweibulld(1.5,4) - + ''' return GiacMethods['randweibulld'](self,*args) @@ -14180,10 +14180,10 @@ cdef class GiacMethods_base: Help for rank: rank(Mtrx) Returns the rank of the matrix. - See also: 1/ det 2/ image + See also: 1/ det 2/ image Ex1:rank([[1,1,2],[2,1,3],[3,1,4]]) Ex2:rank([[1,1,2],[2,1,3],[3,1,5]]) - + ''' return GiacMethods['rank'](self,*args) @@ -14192,7 +14192,7 @@ cdef class GiacMethods_base: Help for ranm: ranm(Intg(n), [Intg(m)],[Interval or quote(DistribLaw)]) Returns a list of size n or an n*m matrix that contains random integers in the range -99 through 99 with uniform distribution or contains random numbers according to the law put between quotes. - See also: 1/ idn 2/ randPoly 3/ rand 4/ randvector + See also: 1/ idn 2/ randPoly 3/ rand 4/ randvector Ex1:ranm(3) Ex2:ranm(3,2) Ex3:ranm(3,2,6) @@ -14206,7 +14206,7 @@ cdef class GiacMethods_base: Ex11:ranm(3,2,1..2) Ex12:ranm(3,5,multinomial,[1/2,1/3,1/6],["R","V","B"]) Ex13: GF(2,8,g);ranm(3,3,g) - + ''' return GiacMethods['ranm'](self,*args) @@ -14215,7 +14215,7 @@ cdef class GiacMethods_base: Help for ranv: ranv(Intg(n), [Intg(m)],[Interval or quote(DistribLaw)]) Returns a list of size n that contains random integers in the range -99 through 99 (or in 0..m-1) with uniform distribution or contains random numbers according to the law put between quotes. - See also: 1/ idn 2/ randPoly 3/ rand 4/ ranm + See also: 1/ idn 2/ randPoly 3/ rand 4/ ranm Ex1:ranv(3) Ex2:ranv(3,6) Ex3:ranv(3,normald,0,1) @@ -14226,7 +14226,7 @@ cdef class GiacMethods_base: Ex8:ranv(3,'rand(3)') Ex9:ranv(3,1..2) Ex10: GF(2,8,g);randvector(3,g) - + ''' return GiacMethods['ranv'](self,*args) @@ -14235,9 +14235,9 @@ cdef class GiacMethods_base: Help for rassembler_trigo: rassembler_trigo(Expr) Collects trigonometric expressions. - See also: 1/ texpand 2/ tlin + See also: 1/ texpand 2/ tlin Ex1:rassembler_trigo(sin(x)+cos(x)) - + ''' return GiacMethods['rassembler_trigo'](self,*args) @@ -14246,11 +14246,11 @@ cdef class GiacMethods_base: Help for rat_jordan: rat_jordan(Mtrx) Returns the list made by the transition matrix and the rational Jordan form of a matrix. - See also: 1/ egv 2/ egvl 3/ jordan 4/ companion + See also: 1/ egv 2/ egvl 3/ jordan 4/ companion Ex1:rat_jordan([[0,2],[1,0]]) Ex2:rat_jordan([[-2,-2,1],[-2,1,-2],[1,-2,-2]]) Ex3:rat_jordan([[1,1,-1,2,-1],[2,0,1,-4,-1],[0,1,1,1,1],[0,1,2,0,1],[0,0,-3,3,-1]]) - + ''' return GiacMethods['rat_jordan'](self,*args) @@ -14259,11 +14259,11 @@ cdef class GiacMethods_base: Help for rational: rational(Opt) DOM_RAT or rational is the type of a rational, as returned by the type command. It is also an option of the assume command. - See also: 1/ type 2/ assume 3/ DOM_INT 4/ DOM_FLOAT + See also: 1/ type 2/ assume 3/ DOM_INT 4/ DOM_FLOAT Ex1: assume(a,rational) Ex2: assume(a,DOM_RAT) Ex3: a:=1/2;type(a) - + ''' return GiacMethods['rational'](self,*args) @@ -14272,9 +14272,9 @@ cdef class GiacMethods_base: Help for rationalroot: rationalroot(Poly(P)) Returns the list of rational roots of P without indicating the multiplicity. - See also: 1/ proot 2/ froot 3/ complexroot 4/ realroot 5/ crationalroot + See also: 1/ proot 2/ froot 3/ complexroot 4/ realroot 5/ crationalroot Ex1:rationalroot(2*x^3-9*x^2+13*x-6) - + ''' return GiacMethods['rationalroot'](self,*args) @@ -14283,11 +14283,11 @@ cdef class GiacMethods_base: Help for ratnormal: ratnormal(Expr) Rewrites as an irreducible rational fraction. - See also: 1/ normal 2/ simplify 3/ factor 4/ expand + See also: 1/ normal 2/ simplify 3/ factor 4/ expand Ex1:ratnormal((x^2-1)/(x^3-1)) Ex2:ratnormal(c/d+b/d+a/d) Ex3:ratnormal((x^2-1)/(x^3-1)+(x-1)/(x^3-1)+1) - + ''' return GiacMethods['ratnormal'](self,*args) @@ -14296,10 +14296,10 @@ cdef class GiacMethods_base: Help for rdiv: rdiv(Expr(a),Expr(b)) Division of a by b (prefixed version of /). - See also: 1/ / + See also: 1/ / Ex1:rdiv(3,5) Ex2:rdiv(3.2,5.4) - + ''' return GiacMethods['rdiv'](self,*args) @@ -14308,11 +14308,11 @@ cdef class GiacMethods_base: Help for re: re(Cplx or LstCplx) Returns the real part of a complex number. - See also: 1/ im 2/ conj + See also: 1/ im 2/ conj Ex1:re(1+2*i) Ex2:re((1+2*i)^2) Ex3:re([1+2*i,(1+2*i)^2]) - + ''' return GiacMethods['re'](self,*args) @@ -14321,9 +14321,9 @@ cdef class GiacMethods_base: Help for read: read(Str(fich_name)) Reads variables and their values from the file fich_name. - See also: 1/ write 2/ readrgb 3/ readwav 4/ csv2gen + See also: 1/ write 2/ readrgb 3/ readwav 4/ csv2gen Ex1:read("toto") - + ''' return GiacMethods['read'](self,*args) @@ -14332,10 +14332,10 @@ cdef class GiacMethods_base: Help for readrgb: readrgb(Str(s),[Intg(w)],[Intg(h)]) Reads a picture file, using it's natural dimensions, or using specified dimensions. - See also: 1/ writergb 2/ readwav + See also: 1/ writergb 2/ readwav Ex1:readrgb("image.png") Ex2:readrgb("image.png",50,50) - + ''' return GiacMethods['readrgb'](self,*args) @@ -14344,9 +14344,9 @@ cdef class GiacMethods_base: Help for readwav: readwav(Str(s)) Reads a WAV sound file. - See also: 1/ writewav 2/ readrgb + See also: 1/ writewav 2/ readrgb Ex1:readwav("pop.wav") - + ''' return GiacMethods['readwav'](self,*args) @@ -14355,11 +14355,11 @@ cdef class GiacMethods_base: Help for real: real(Cplx or LstCplx) Returns the real part of a complex number. - See also: 1/ im 2/ conj + See also: 1/ im 2/ conj Ex1:real(1+2*i) Ex2:real((1+2*i)^2) Ex3:real([1+2*i,(1+2*i)^2]) - + ''' return GiacMethods['real'](self,*args) @@ -14368,14 +14368,14 @@ cdef class GiacMethods_base: Help for realroot: realroot([sturm],Poly(P),[Real(l)],[Cplx(a)],[Cplx(b)]) Returns the list of intervals of length <=l containing the real roots of P inside a..b with their multiplicity. By default the Vincent-Akritas-Strzebonski (VAS) method is used. realroot(sturm,P) uses Sturm's method. - See also: 1/ proot 2/ froot 3/ complexroot 4/ rationalroot 5/ crationalroot 6/ sturmab 7/ VAS + See also: 1/ proot 2/ froot 3/ complexroot 4/ rationalroot 5/ crationalroot 6/ sturmab 7/ VAS Ex1:realroot(x^3+7,0.1) Ex2:realroot(x^3-7*x+7) Ex3:realroot(sturm,x^3-7*x+7) Ex4:realroot(x^5-2*x^4+x^3+1) Ex5:realroot(x^5-2*x^4+x^3+1,0.1) Ex6:realroot(x^3+x+8,1e-5,-4,4) - + ''' return GiacMethods['realroot'](self,*args) @@ -14384,10 +14384,10 @@ cdef class GiacMethods_base: Help for reciprocation: reciprocation(Crcle,Lst(Pnt,Line)) Returns the list where the points (resp lines) are replaced with their polars (resp poles) with respect to the circle C. - See also: 1/ pole 2/ polar + See also: 1/ pole 2/ polar Ex1:reciprocation(circle(0,1),[point((1+i)/2), line(1,-1+i)]) Ex2:reciprocation(circle(0,1),[line(1+i,2),point(1+i*2)]) - + ''' return GiacMethods['reciprocation'](self,*args) @@ -14396,9 +14396,9 @@ cdef class GiacMethods_base: Help for rect: rect(Expr(x)) Returns the value of the rectangle function at x. - See also: 1/ boxcar 2/ tri 3/ Heaviside + See also: 1/ boxcar 2/ tri 3/ Heaviside Ex1:rect(x/2) - + ''' return GiacMethods['rect'](self,*args) @@ -14407,12 +14407,12 @@ cdef class GiacMethods_base: Help for rectangle: rectangle(Pnt(A)||Cplx,Pnt(B)||Cplx,Real(k)||Pnt(P)||Lst(P,k),[Var(D)],[Var(C)]) Returns and draws the rectangle ABCD, AD=k*AB; if k>0 ABCD is direct else indirect (in the plane ABP AD=AP or AD=k*AB). - See also: 1/ quadrilateral 2/ square + See also: 1/ quadrilateral 2/ square Ex1:rectangle(-i,1,2) Ex2:rectangle(-i,1,-2,D,C) Ex3:rectangle(point(0,0,0),point(3,3,3),point(0,0,3),D,C) Ex4:rectangle(point(0,0,0),point(3,3,3),2,D,C) - + ''' return GiacMethods['rectangle'](self,*args) @@ -14421,14 +14421,14 @@ cdef class GiacMethods_base: Help for rectangle_droit: rectangle_droit(Opt) Option of the plotarea command and of the area command. - See also: 1/ plotarea 2/ area + See also: 1/ plotarea 2/ area Ex1: plotarea(x^2,x=0..1,5,trapezoid) Ex2: plotarea(x^2,x=0..1,5,middle_point) Ex3: plotarea(x^2,x=0..1,5,right_rectangle) Ex4: plotarea(x^2,x=0..1,5,left_rectangle) Ex5: area(x^2,x=0..1,5,middle_point) Ex6: area(x^2,x=0..1,5,trapezoid) - + ''' return GiacMethods['rectangle_droit'](self,*args) @@ -14437,14 +14437,14 @@ cdef class GiacMethods_base: Help for rectangle_gauche: rectangle_gauche(Opt) Option of the plotarea command and of the area command. - See also: 1/ plotarea 2/ area + See also: 1/ plotarea 2/ area Ex1: plotarea(x^2,x=0..1,5,trapezoid) Ex2: plotarea(x^2,x=0..1,5,middle_point) Ex3: plotarea(x^2,x=0..1,5,right_rectangle) Ex4: plotarea(x^2,x=0..1,5,left_rectangle) Ex5: area(x^2,x=0..1,5,middle_point) Ex6: area(x^2,x=0..1,5,trapezoid) - + ''' return GiacMethods['rectangle_gauche'](self,*args) @@ -14453,11 +14453,11 @@ cdef class GiacMethods_base: Help for rectangle_plein: rectangle_plein(Real(a),[Real(b)]) Draws a full direct rectangle (resp square) with sides a,b (resp a) from the turtle position and on the left (by default b=a). - See also: 1/ triangle_plein + See also: 1/ triangle_plein Ex1: rectangle_plein 20 Ex2:rectangle_plein(20) Ex3:rectangle_plein(20,40) - + ''' return GiacMethods['rectangle_plein'](self,*args) @@ -14466,10 +14466,10 @@ cdef class GiacMethods_base: Help for rectangular_coordinates: rectangular_coordinates(LstPolCoord) Returns the list of the abscissa and of the ordinate of a point given by the list of its polar coordinates. - See also: 1/ abscissa 2/ ordinate 3/ rectangular_coordinates 4/ polar_point + See also: 1/ abscissa 2/ ordinate 3/ rectangular_coordinates 4/ polar_point Ex1:rectangular_coordinates([1,pi/4]) Ex2:rectangular_coordinates(polar_point(1,pi/4)) - + ''' return GiacMethods['rectangular_coordinates'](self,*args) @@ -14478,10 +14478,10 @@ cdef class GiacMethods_base: Help for recule: recule(NULL or Real(n)) The turtle takes n steps back (by default n=10). - See also: 1/ avance 2/ saute + See also: 1/ avance 2/ saute Ex1: recule 30 Ex2:recule(30) - + ''' return GiacMethods['recule'](self,*args) @@ -14490,10 +14490,10 @@ cdef class GiacMethods_base: Help for red: red(Opt) Option of the display command to display with color. - See also: 1/ display + See also: 1/ display Ex1: F:=display(point(2+1.5*i),red) Ex2: F:=display(point(2+1.5*i),point_point+green) - + ''' return GiacMethods['red'](self,*args) @@ -14502,12 +14502,12 @@ cdef class GiacMethods_base: Help for reduced_conic: reduced_conic(Expr,[LstVar]) Returns the origin and the matrix of a base in which the conic given by its equation is reduced, 0 or 1 (0 if the conic is degenerate) and the equation of the conic in this base and also its parametric equation. - See also: 1/ gauss 2/ conic + See also: 1/ gauss 2/ conic Ex1:reduced_conic(x^2+2*x-2*y+1) Ex2:reduced_conic(a*x^2-2*x*y+a*y^2-2*x+2*y+3,[x,y]) Ex3:reduced_conic(2*u^2+2*u*v+2*v^2+5*u+3,[u,v]) Ex4:reduced_conic((x+y)^2-2*x+1,x,y) - + ''' return GiacMethods['reduced_conic'](self,*args) @@ -14516,12 +14516,12 @@ cdef class GiacMethods_base: Help for reduced_quadric: reduced_quadric(Expr, [LstVar]) Returns the origin and the matrix of a basis in which the quadric (given by its equation) is reduced, the list of its eigenvalues, the equation of the quadric in this basis and its parametric equation. - See also: 1/ gauss 2/ quadric + See also: 1/ gauss 2/ quadric Ex1:reduced_quadric(4*x^2+y^2+z^2-4*x*y+4*x*z-2*y*z+8*x-4*y+4*z+2) Ex2:reduced_quadric(x^2+3*y^2-3*z^2-8*y*z+2*z*x-4*x*y-1,x,y,z) Ex3:reduced_quadric((u+v)*(v-w)+3*u-5*v,[u,v,w]) Ex4:reduced_quadric(7*x^2+4*y^2+4*z^2+4*x*y-4*x*z-2*y*z-4*x+5*y+4*z-18,[x,y,z]) - + ''' return GiacMethods['reduced_quadric'](self,*args) @@ -14530,10 +14530,10 @@ cdef class GiacMethods_base: Help for ref: ref(Mtrx(M)) Gaussian reduction of AX=b (M=A|(-b)). - See also: 1/ rref 2/ det + See also: 1/ rref 2/ det Ex1:ref([[3,1,-2],[3,2,2]]) Ex2:ref([[2,1,1,-1],[1,1,2,-1],[1,2,1,-4]]) - + ''' return GiacMethods['ref'](self,*args) @@ -14542,11 +14542,11 @@ cdef class GiacMethods_base: Help for reflection: reflection((Pnt(A) or Line(D)),(Pnt(C) or Curve(C))) reflection(D,C) (or reflection(A,C))=symmetry of C with the symmetry-line D (or sym-point A). - See also: 1/ rotation 2/ translation + See also: 1/ rotation 2/ translation Ex1:reflection(line(0,1+i),A) Ex2:reflection(B,A) Ex3:reflection(line(0,1+i),circle(i,1+i)) - + ''' return GiacMethods['reflection'](self,*args) @@ -14555,9 +14555,9 @@ cdef class GiacMethods_base: Help for regroup: regroup(Expr) Collects terms in an expression. - See also: 1/ simplify 2/ normal + See also: 1/ simplify 2/ normal Ex1:regroup(x+3*x+5*4/x) - + ''' return GiacMethods['regroup'](self,*args) @@ -14566,9 +14566,9 @@ cdef class GiacMethods_base: Help for relabel_vertices: relabel_vertices(Graph(G),Lst(L)) Returns a copy of G with vertex labels changed to those in the list L. - See also: 1/ graph_vertices 2/ isomorphic_copy 3/ permute_vertices + See also: 1/ graph_vertices 2/ isomorphic_copy 3/ permute_vertices Ex1:relabel_vertices(graph([a,b,c]),["first","second","third"]) - + ''' return GiacMethods['relabel_vertices'](self,*args) @@ -14577,10 +14577,10 @@ cdef class GiacMethods_base: Help for reliability_polynomial: reliability_polynomial(Graph(G),[Var(p)]) Returns the reliability polynomial [or its value at point p] of undirected graph G. If G is weighted, all weights must be positive integers and are interpreted as edge multiplicities. - See also: 1/ chromatic_polynomial 2/ flow_polynomial 3/ tutte_polynomial + See also: 1/ chromatic_polynomial 2/ flow_polynomial 3/ tutte_polynomial Ex1:reliability_polynomial(graph("petersen")) Ex2:reliability_polynomial(graph("petersen"),0.5) - + ''' return GiacMethods['reliability_polynomial'](self,*args) @@ -14589,11 +14589,11 @@ cdef class GiacMethods_base: Help for rem: rem((Vect or Poly),(Vect or Poly),[Var]) Euclidean remainder of 2 polynomials. - See also: 1/ quo 2/ quorem 3/ Rem 4/ irem + See also: 1/ quo 2/ quorem 3/ Rem 4/ irem Ex1:rem([1,2,3,4],[-1,2]) Ex2:rem(x^3+2x^2+3x+4,-x+2) Ex3:rem(t^3+2t^2+3t+4,-t+2,t) - + ''' return GiacMethods['rem'](self,*args) @@ -14602,12 +14602,12 @@ cdef class GiacMethods_base: Help for remain: remain(Intg(a),Intg(b)) Euclidean remainder of 2 integers. - See also: 1/ iquo 2/ smod 3/ rem 4/ mod + See also: 1/ iquo 2/ smod 3/ rem 4/ mod Ex1:remain(125,15) Ex2:remain(125,41) Ex3:remain(-7,3) Ex4:remain(25+12*i,5+7*i) - + ''' return GiacMethods['remain'](self,*args) @@ -14616,10 +14616,10 @@ cdef class GiacMethods_base: Help for remove: remove(FncBool(f)||a,Lst(l)) Remove the occurrences a of l or the elements a such that f(a)=true. - See also: 1/ select 2/ suppress + See also: 1/ select 2/ suppress Ex1:remove(x->x>=5,[1,2,6,7]) Ex2:remove(5,[1,2,5,6,7,5]) - + ''' return GiacMethods['remove'](self,*args) @@ -14628,10 +14628,10 @@ cdef class GiacMethods_base: Help for reorder: reorder(Expr, LstVar) Reorders the variables in E according to the order of the 2nd argument. - See also: 1/ + See also: 1/ Ex1:reorder(-2) Ex2:reorder(x^2+2*x+y^2,[y,x]) - + ''' return GiacMethods['reorder'](self,*args) @@ -14640,10 +14640,10 @@ cdef class GiacMethods_base: Help for resample: resample(Lst(clip),[Intg(s),[Intg(q)]]) Returns a copy of the input audio clip resampled to the rate s (by default 44100), optionally with quality level q (from 0 to 4, by default 2). - See also: 1/ samplerate 2/ playsnd 3/ readwav 4/ writewav + See also: 1/ samplerate 2/ playsnd 3/ readwav 4/ writewav Ex1:resample(readwav("/some/file"),48000) Ex2:resample(readwav("/some/file"),48000,3) - + ''' return GiacMethods['resample'](self,*args) @@ -14652,12 +14652,12 @@ cdef class GiacMethods_base: Help for residue: residue(Expr,Var(v),Cplx(a)) Returns the residue in a of the expression with v as variable. - See also: 1/ series + See also: 1/ series Ex1:residue(1/z,z,0) Ex2:residue(5/z,z=0) Ex3:residue(cos(z)/(z*(z-b)),z,0) Ex4:residue(c/(z*(z-b)),z=b) - + ''' return GiacMethods['residue'](self,*args) @@ -14666,12 +14666,12 @@ cdef class GiacMethods_base: Help for resoudre: resoudre(Expr,[Var]) Solves a (or a set of) polynomial equation. - See also: 1/ linsolve 2/ proot 3/ fsolve 4/ csolve 5/ nSolve + See also: 1/ linsolve 2/ proot 3/ fsolve 4/ csolve 5/ nSolve Ex1:resoudre(x^2-3=1) Ex2:resoudre(x^3-3*y,y) Ex3:resoudre([y-z=0,z-x=0,x-y=0,x-1+y+z=0],[x,y,z]) Ex4:resoudre([x^2-y^2=0,x^2-z^2=0],[x,y,z]) - + ''' return GiacMethods['resoudre'](self,*args) @@ -14680,12 +14680,12 @@ cdef class GiacMethods_base: Help for resoudre_dans_C: resoudre_dans_C(LstEq,LstVar) Returns the list of complex solutions of an equation or a matrix where the rows are ℂ-solutions of a system of polynomial equations. - See also: 1/ cZeros 2/ solve 3/ fslove + See also: 1/ cZeros 2/ solve 3/ fslove Ex1:resoudre_dans_C(x^4-1,x) Ex2:resoudre_dans_C(x^4-y^4 and x+y=2,[x,y]) Ex3:resoudre_dans_C(x^4-y^4 and x+y=0 and x^2=2*x,[x,y]) Ex4:resoudre_dans_C(u*v-u=v and v^2=u,[u,v]) - + ''' return GiacMethods['resoudre_dans_C'](self,*args) @@ -14694,17 +14694,17 @@ cdef class GiacMethods_base: Help for resoudre_systeme_lineaire: resoudre_systeme_lineaire(LstLinEq,LstVar) Linear equations system solver. - See also: 1/ solve 2/ proot 3/ simult 4/ gaussjord 5/ pivot 6/ ref 7/ conjugate_gradient + See also: 1/ solve 2/ proot 3/ simult 4/ gaussjord 5/ pivot 6/ ref 7/ conjugate_gradient Ex1:resoudre_systeme_lineaire([x+y+z=1,x-y=2,2*x-z=3],[x,y,z]) Ex2:resoudre_systeme_lineaire([m*x+y=a,x+m*y=b],[x,y]) Ex3:resoudre_systeme_lineaire([x+y-z-1,x-y+1,x-y-z-1]%2,[x,y,z]) Ex4:resoudre_systeme_lineaire([[3,4],[1,2]],[0,1]) - Ex5: p,l,u:=lu([[3,4],[1,2]]); linsolve(p,l,u,[0,1]) + Ex5: p,l,u:=lu([[3,4],[1,2]]); linsolve(p,l,u,[0,1]) Ex6:resoudre_systeme_lineaire([2*x+y+z=1,x+y+2*z=1,x+2*y+z=4],[x,y,z]) Ex7:resoudre_systeme_lineaire([[2,1,1],[1,1,2],[1,2,1]],[1,1,4]) Ex8: p,l,u:=lu([[2,1,1],[1,1,2],[1,2,1]]);linsolve(p,l,u,[1,1,4]) Ex9: a:=[[100,2],[2,100]];linsolve(evalf(a),[0,1]); - + ''' return GiacMethods['resoudre_systeme_lineaire'](self,*args) @@ -14713,10 +14713,10 @@ cdef class GiacMethods_base: Help for resultant: resultant(Poly,Poly,Var) Resultant of two polynomials. - See also: 1/ sylvester 2/ gcd + See also: 1/ sylvester 2/ gcd Ex1:resultant(x^2-1,x^3-1,x) Ex2:resultant(x^3-p*x+q,3*x^2-p,x) - + ''' return GiacMethods['resultant'](self,*args) @@ -14729,7 +14729,7 @@ cdef class GiacMethods_base: Ex2: L:=[1,2,3,4];L:=revlist(L) Ex3: L:=[1,2,3,4];L.revlist() Ex4: L:=[1,2,3,4];L.reverse() - + ''' return GiacMethods['reverse'](self,*args) @@ -14738,9 +14738,9 @@ cdef class GiacMethods_base: Help for reverse_graph: reverse_graph(Graph(G)) Returns the copy of G with the directions of all edges reversed. - See also: 1/ digraph + See also: 1/ digraph Ex1:reverse_graph(digraph(%{[1,2],[1,3],[2,3]%})) - + ''' return GiacMethods['reverse_graph'](self,*args) @@ -14749,9 +14749,9 @@ cdef class GiacMethods_base: Help for reverse_rsolve: reverse_rsolve(Vect(v)) If v=[v_0 ... v_(2n-1)], returns [b_n,...,b_0] such that b_n*v_{n+k}+...+b_0*v_k=0 for k=0..n-1. - See also: 1/ rsolve + See also: 1/ rsolve Ex1:reverse_rsolve([1,-1,3,3]) - + ''' return GiacMethods['reverse_rsolve'](self,*args) @@ -14760,9 +14760,9 @@ cdef class GiacMethods_base: Help for revert: revert(Expr) Returns the inverse expansion of a series expansion at 0. - See also: 1/ series + See also: 1/ series Ex1:revert(x+x^2+x^4) - + ''' return GiacMethods['revert'](self,*args) @@ -14771,8 +14771,8 @@ cdef class GiacMethods_base: Help for revlex: revlex(Opt) Option of the gbasis or greduce command to specify an order for monomials (complete degree then inverse lexicographic order). - See also: 1/ gbasis 2/ greduce - + See also: 1/ gbasis 2/ greduce + ''' return GiacMethods['revlex'](self,*args) @@ -14785,7 +14785,7 @@ cdef class GiacMethods_base: Ex2: L:=[1,2,3,4];L:=revlist(L) Ex3: L:=[1,2,3,4];L.revlist() Ex4: L:=[1,2,3,4];L.reverse() - + ''' return GiacMethods['revlist'](self,*args) @@ -14794,14 +14794,14 @@ cdef class GiacMethods_base: Help for rgb: rgb(Opt) Option of the display (or affichage) command to defined colors RGB. - See also: 1/ display 2/ filled + See also: 1/ display 2/ filled Ex1: redcolor:=rgb(0.99,0,0);display(square(0,2+i),filled+redcolor) Ex2: greencolor:=rgb(0,0.99,0);display(square(0,2+i),filled+greencolor) Ex3: bluecolor:=rgb(0,0,0.99);display(square(0,2+i),filled+bluecolor) Ex4: greycolor:=rgb(0.5,0.5,0.5);display(square(0,2+i),filled+greycolor) Ex5: F:=display(square(0,2+i),filled+rgb(rand(),rand(),rand())) Ex6: L:=rand(),rand(),rand();affichage(square(0,2+i),rgb(L)+rempli);legend(0.2,[L]) - + ''' return GiacMethods['rgb'](self,*args) @@ -14810,13 +14810,13 @@ cdef class GiacMethods_base: Help for rhombus: rhombus(Pnt(A)||Cplx,Pnt(B)||Cplx,Angle(a)||Pnt(P)||Lst(P,a)),[Var(C)],[Var(D)]) Returns and draws the rhombus ABCD such that the angle (AB,AD)=a (or in the plane ABP angle(AB,AD)=angle(AB,AP) or such that angle(AB,AD)=a). - See also: 1/ square 2/ quadrilateral + See also: 1/ square 2/ quadrilateral Ex1:rhombus(i,1+i,pi/4) Ex2:rhombus(i,1+i,pi/4,C,D) Ex3:rhombus(point(0,0,0),point(3,3,3),[point(0,0,3),pi/4]) Ex4:rhombus(point(0,0,0),point(3,3,3),point(0,0,3),C,D) Ex5:rhombus(point(0,0,0),point(3,3,3),[point(0,0,3),pi/4],C,D) - + ''' return GiacMethods['rhombus'](self,*args) @@ -14825,10 +14825,10 @@ cdef class GiacMethods_base: Help for rhombus_point: rhombus_point(Opt) Option of the display command for a point. - See also: 1/ display + See also: 1/ display Ex1: F:=display(point(2+1.5*i),point_point) Ex2: F:=display(point(2+1.5*i),rhombus_point) - + ''' return GiacMethods['rhombus_point'](self,*args) @@ -14837,12 +14837,12 @@ cdef class GiacMethods_base: Help for rhs: rhs(Equal(a=b) or Interval(a..b) or Str,Intg) Returns the right part of an equality, of an interval, of a list or of a string. - See also: 1/ left 2/ mid 3/ tail 4/ head + See also: 1/ left 2/ mid 3/ tail 4/ head Ex1:rhs(a=b) Ex2:rhs(x^2+1=5) Ex3:rhs(1..5) Ex4:rhs("abcdefg",3) - + ''' return GiacMethods['rhs'](self,*args) @@ -14851,9 +14851,9 @@ cdef class GiacMethods_base: Help for riemann_window: riemann_window(Lst,[Interval(n1..n2)]) Applies the Riemann windowing function to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ bartlett_hann_window 12/ triangle_window 13/ tukey_window 14/ welch_window + See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ bartlett_hann_window 12/ triangle_window 13/ tukey_window 14/ welch_window Ex1: scatterplot(riemann_window(randvector(1000,0..1))) - + ''' return GiacMethods['riemann_window'](self,*args) @@ -14862,12 +14862,12 @@ cdef class GiacMethods_base: Help for right: right(Equal(a=b) or Interval(a..b) or Str,Intg) Returns the right part of an equality, of an interval, of a list or of a string. - See also: 1/ left 2/ mid 3/ tail 4/ head + See also: 1/ left 2/ mid 3/ tail 4/ head Ex1:right(a=b) Ex2:right(x^2+1=5) Ex3:right(1..5) Ex4:right("abcdefg",3) - + ''' return GiacMethods['right'](self,*args) @@ -14876,14 +14876,14 @@ cdef class GiacMethods_base: Help for right_rectangle: right_rectangle(Opt) Option of the plotarea command and of the area command. - See also: 1/ plotarea 2/ area + See also: 1/ plotarea 2/ area Ex1: plotarea(x^2,x=0..1,5,trapezoid) Ex2: plotarea(x^2,x=0..1,5,middle_point) Ex3: plotarea(x^2,x=0..1,5,right_rectangle) Ex4: plotarea(x^2,x=0..1,5,left_rectangle) Ex5: area(x^2,x=0..1,5,middle_point) Ex6: area(x^2,x=0..1,5,trapezoid) - + ''' return GiacMethods['right_rectangle'](self,*args) @@ -14892,13 +14892,13 @@ cdef class GiacMethods_base: Help for right_triangle: right_triangle((Pnt(A) or Cplx),(Pnt(B) or Cplx),(Real(k) or Pnt(P) or Lst(P,k)),[Var(C)]) Draws the A_rectangular triangle ABC with AC=k*AB (or in the plane ABP AC=AP or AC=k*AB). - See also: 1/ triangle + See also: 1/ triangle Ex1:right_triangle(1,i,tan(pi/3)) Ex2:right_triangle(1,i,1/2,C) Ex3:right_triangle(point(0,0,0),point(3,3,3),point(0,0,3)) Ex4:right_triangle(point(0,0,0),point(3,3,3),[point(0,0,3),1/2],C) Ex5:right_triangle(point(0,0,0),point(3,3,3),[point(0,0,3),1/2],C) - + ''' return GiacMethods['right_triangle'](self,*args) @@ -14907,11 +14907,11 @@ cdef class GiacMethods_base: Help for risch: risch(Expr,[Var]) Returns a primitive of the expression calculated with the Risch algorithm. - See also: 1/ int + See also: 1/ int Ex1:risch(ln(x),x) Ex2:risch(ln(x)) Ex3:risch(exp(x^2),x) - + ''' return GiacMethods['risch'](self,*args) @@ -14920,9 +14920,9 @@ cdef class GiacMethods_base: Help for rm_a_z: rm_a_z(NULL) Erases all the variable name made up of only one lowercase a..z character. - See also: 1/ rm_all_vars + See also: 1/ rm_all_vars Ex1:rm_a_z() - + ''' return GiacMethods['rm_a_z'](self,*args) @@ -14931,9 +14931,9 @@ cdef class GiacMethods_base: Help for rm_all_vars: rm_all_vars(NULL) Erases all the variable names. - See also: 1/ rm_a_z + See also: 1/ rm_a_z Ex1:rm_all_vars() - + ''' return GiacMethods['rm_all_vars'](self,*args) @@ -14942,9 +14942,9 @@ cdef class GiacMethods_base: Help for rmbreakpoint: rmbreakpoint(Intg) Removes a breakpoint. - See also: 1/ breakpoint + See also: 1/ breakpoint Ex1:rmbreakpoint(1) - + ''' return GiacMethods['rmbreakpoint'](self,*args) @@ -14953,9 +14953,9 @@ cdef class GiacMethods_base: Help for rmmod: rmmod(Str(pwd)) Removes the installed dynamic libraries. - See also: 1/ lsmod 2/ insmod + See also: 1/ lsmod 2/ insmod Ex1:rmmod("/home/parisse/giac/src/libprogfr.so") - + ''' return GiacMethods['rmmod'](self,*args) @@ -14964,9 +14964,9 @@ cdef class GiacMethods_base: Help for rmwatch: rmwatch(Var) Clears a variables from the table of displayed variables in step/step. - See also: 1/ watch + See also: 1/ watch Ex1:rmwatch(a) - + ''' return GiacMethods['rmwatch'](self,*args) @@ -14975,11 +14975,11 @@ cdef class GiacMethods_base: Help for romberg: romberg(Expr(f(x)),Var(x),Real(a),Real(b)) Returns the approximate value of integrate(f(x),x,a,b) by Romberg's method. - See also: 1/ integrate 2/ gaussquad + See also: 1/ integrate 2/ gaussquad Ex1:romberg(exp(x^2),x,0,1) Ex2:romberg(x^2,x,0,1) Ex3:romberg(exp(-x^2),x,-1,1) - + ''' return GiacMethods['romberg'](self,*args) @@ -14988,12 +14988,12 @@ cdef class GiacMethods_base: Help for rombergm: rombergm(Opt) Option of the area command. - See also: 1/ area + See also: 1/ area Ex1: area(x^2,x=0..1,5,simpson) Ex2: area(x^2,x=0..1,5,rombergt) Ex3: area(x^2,x=0..1,5,rombergm) Ex4:rombergm(area(x^2,x=0..1,5,gauss15)) - + ''' return GiacMethods['rombergm'](self,*args) @@ -15002,12 +15002,12 @@ cdef class GiacMethods_base: Help for rombergt: rombergt(Opt) Option of the area command. - See also: 1/ area + See also: 1/ area Ex1: area(x^2,x=0..1,5,simpson) Ex2: area(x^2,x=0..1,5,rombergt) Ex3: area(x^2,x=0..1,5,rombergm) Ex4:rombergt(area(x^2,x=0..1,5,gauss15)) - + ''' return GiacMethods['rombergt'](self,*args) @@ -15016,12 +15016,12 @@ cdef class GiacMethods_base: Help for rond: rond(Real(r),[Real(a)],[Real(b)]) Draws a circle (resp a arc) with radius r (resp and with angle (0,a) or (a,b)), tangent at the turtle position. - See also: 1/ disque + See also: 1/ disque Ex1: rond 30 Ex2:rond(40) Ex3:rond(40,90) Ex4:rond(40,10,100) - + ''' return GiacMethods['rond'](self,*args) @@ -15030,12 +15030,12 @@ cdef class GiacMethods_base: Help for root: root(Expr(a),Expr(b)) Returns b^(1/a) (root(2,3)=sqrt(3)). - See also: 1/ + See also: 1/ Ex1:root(3,2) Ex2:root(1/3,2) Ex3:root(3,1.2) Ex4:root(3.2,1.2) - + ''' return GiacMethods['root'](self,*args) @@ -15044,11 +15044,11 @@ cdef class GiacMethods_base: Help for rootof: rootof(LstPoly(P),LstPoly(Q)) Polynomial in terms of a root of an irreducible polynomial on Q. Returns P(a) with a the greatest root of Q. - See also: 1/ + See also: 1/ Ex1: normal(1/rootof([1,0],[1,0,10,0,1])) Ex2: normal(1/rootof([1,0,0],[1,1,0,-1])) - Ex3: rootof(x^4+x+1):='j'; normal(j^5); - + Ex3: rootof(x^4+x+1):='j'; normal(j^5); + ''' return GiacMethods['rootof'](self,*args) @@ -15057,10 +15057,10 @@ cdef class GiacMethods_base: Help for roots: roots(Poly,[Var]) Returns a matrix having 2 columns and where the rows are the roots of the polynomial with their multiplicity (for 1 variable). - See also: 1/ proot 2/ cZeros + See also: 1/ proot 2/ cZeros Ex1:roots(t^3-1,t) Ex2:roots(x^5-2*x^4+x^3) - + ''' return GiacMethods['roots'](self,*args) @@ -15069,7 +15069,7 @@ cdef class GiacMethods_base: Help for rotate: rotate(Lst||Str(L),[Intg(n)]) Returns the list where the last element [or the tail beginning with the n-th element] is moved to the first element (by default n=-1);L:=rotate(L,n) or L.rotate(n). - See also: 1/ tail 2/ mid 3/ shift + See also: 1/ tail 2/ mid 3/ shift Ex1:rotate([0,1,2,3],2) Ex2:rotate([[1,2,3],[4,5,6],[7,8,9]]) Ex3:rotate([0,1,2,3,4]) @@ -15078,7 +15078,7 @@ cdef class GiacMethods_base: Ex6: L:=[0,1,2,3,4];L.rotate() Ex7: L:=[0,1,2,3];L:=rotate([0,1,2,3],2) Ex8: L:=[0,1,2,3];L.rotate(2) - + ''' return GiacMethods['rotate'](self,*args) @@ -15087,13 +15087,13 @@ cdef class GiacMethods_base: Help for rotation: rotation((Pnt(B) or Cplx or Dr3),Angle(a1),(Pnt(A) or Curve)) rotation(B,a1,A) (resp rotation(d,a1,A)) is the transformation of A by rotation with center B (resp of axis d) and angle a1. - See also: 1/ translation 2/ reflection + See also: 1/ translation 2/ reflection Ex1:rotation(point(1+i),pi/2,point(i)) Ex2:rotation(1+i,pi/3,line(i,1)) Ex3:rotation(line(x=y,y=z),pi/2,point(1,-1,2)) Ex4: r:=rotation(1+i,pi/2);r(i) Ex5: r:=rotation(line(x=y,y=z),pi/2);r(point(1,-1,2)) - + ''' return GiacMethods['rotation'](self,*args) @@ -15102,13 +15102,13 @@ cdef class GiacMethods_base: Help for round: round(Real or Cplx,[Intg(n)]) Rounds the real or complex to the nearest integer (resp the nearest decimal number) or to the nearest element of ℤ[i], (resp with n decimals). - See also: 1/ floor 2/ ceil + See also: 1/ floor 2/ ceil Ex1:round(2.5) Ex2:round(-2.4) Ex3:round(-2.5+i*2.4) Ex4:round(1.237,2) Ex5:round(sqrt(2)+i*sqrt(5),4) - + ''' return GiacMethods['round'](self,*args) @@ -15117,11 +15117,11 @@ cdef class GiacMethods_base: Help for row: row(Mtrx(A),Intg(n)||Interval(n1..n2)) Returns row n or the sequence of the rows n1..n2 of the matrix A, or optional argument of count,count_eq,count_inf,count_sup. - See also: 1/ col 2/ count 3/ count_eq 4/ count_inf 5/ count_sup + See also: 1/ col 2/ count 3/ count_eq 4/ count_inf 5/ count_sup Ex1:row([[1,2,3],[4,5,6],[7,8,9]],1) Ex2:row([[1,2,3],[4,5,6],[7,8,9]],0..1) Ex3: count_eq(3,[[1,2,3],[4,3,2],[3,2,1]],row) - + ''' return GiacMethods['row'](self,*args) @@ -15130,9 +15130,9 @@ cdef class GiacMethods_base: Help for rowAdd: rowAdd(Mtrx(A),Intg(n1),Intg(n2)) Returns the matrix obtained from A by replacing the n2-th row by the sum of the n1-th and n2-th rows. - See also: 1/ rowSwap + See also: 1/ rowSwap Ex1:rowAdd([[1,2],[3,4],[5,6]],1,2) - + ''' return GiacMethods['rowAdd'](self,*args) @@ -15141,10 +15141,10 @@ cdef class GiacMethods_base: Help for rowDim: rowDim(Mtrx) Number of rows of a matrix. - See also: 1/ ncols + See also: 1/ ncols Ex1:rowDim([[1,2,3],[4,5,6]]) Ex2:rowDim([[1,2],[3,4],[5,6]]) - + ''' return GiacMethods['rowDim'](self,*args) @@ -15153,10 +15153,10 @@ cdef class GiacMethods_base: Help for rowNorm: rowNorm(Vect or Mtrx) Returns the max of the l1_norm of the rows of a matrix: rowNorm(a_{j,k})=max_j(sum_k(|a_{j,k}|)). - See also: 1/ norm + See also: 1/ norm Ex1:rowNorm([[1,2],[3,-4]]) Ex2:rowNorm([[1,2,3,-4],[-5,3,2,1]]) - + ''' return GiacMethods['rowNorm'](self,*args) @@ -15165,9 +15165,9 @@ cdef class GiacMethods_base: Help for rowSwap: rowSwap(Mtrx(A),Intg(n1),Intg(n2)) Returns the matrix obtained from A by swapping the n1-th row and the n2-th row. - See also: 1/ rowAdd 2/ colSwap + See also: 1/ rowAdd 2/ colSwap Ex1:rowSwap([[1,2],[3,4],[5,6]],1,2) - + ''' return GiacMethods['rowSwap'](self,*args) @@ -15176,10 +15176,10 @@ cdef class GiacMethods_base: Help for rowdim: rowdim(Mtrx) Number of rows of a matrix. - See also: 1/ ncols + See also: 1/ ncols Ex1:rowdim([[1,2,3],[4,5,6]]) Ex2:rowdim([[1,2],[3,4],[5,6]]) - + ''' return GiacMethods['rowdim'](self,*args) @@ -15188,10 +15188,10 @@ cdef class GiacMethods_base: Help for rownorm: rownorm(Vect or Mtrx) Returns the max of the l1_norm of the rows of a matrix: rowNorm(a_{j,k})=max_j(sum_k(|a_{j,k}|)). - See also: 1/ norm + See also: 1/ norm Ex1:rownorm([[1,2],[3,-4]]) Ex2:rownorm([[1,2,3,-4],[-5,3,2,1]]) - + ''' return GiacMethods['rownorm'](self,*args) @@ -15200,10 +15200,10 @@ cdef class GiacMethods_base: Help for rowspace: rowspace(Mtrx(A), [Var(d)]) Returns a matrix where the rows are a basis of the vector space generated by the rows of the matrix A [d is the dimension of this space]. - See also: 1/ colspace + See also: 1/ colspace Ex1:rowspace([[1,2,3],[1,2,3],[1,2,4],[1,2,5]]) Ex2:rowspace([[1,2,3],[1,3,6],[2,5,9]],d) - + ''' return GiacMethods['rowspace'](self,*args) @@ -15212,9 +15212,9 @@ cdef class GiacMethods_base: Help for rowswap: rowswap(Mtrx(A),Intg(n1),Intg(n2)) Returns the matrix obtained from A by swapping the n1-th row and the n2-th row. - See also: 1/ rowAdd 2/ colSwap + See also: 1/ rowAdd 2/ colSwap Ex1:rowswap([[1,2],[3,4],[5,6]],1,2) - + ''' return GiacMethods['rowswap'](self,*args) @@ -15223,12 +15223,12 @@ cdef class GiacMethods_base: Help for rref: rref(Mtrx(M),[Intg(k)]||Opt) Row reduction to echelon form of AX=b (M=A|(-b)) [Reduction on columns 0..k-1]. - See also: 1/ ker 2/ image 3/ det 4/ Rref 5/ pivot 6/ ref 7/ keep_pivot + See also: 1/ ker 2/ image 3/ det 4/ Rref 5/ pivot 6/ ref 7/ keep_pivot Ex1:rref([[3,1,-2],[3,2,2]]) Ex2:rref([[2,1,1,-1],[1,1,2,-1],[1,2,1,-4]]) Ex3:rref([[2,1,1,-1],[1,1,2,-1],[1,2,1,-4]],2) Ex4:rref([[1,1,0,0,-a1],[0,1,1,0,-a2],[0,0,1,1,-a3],[1,0,0,1,-a4]],keep_pivot) - + ''' return GiacMethods['rref'](self,*args) @@ -15237,13 +15237,13 @@ cdef class GiacMethods_base: Help for rsolve: rsolve((Expr or LstExpr),(Var or LstVar),(InitVal or LstInitVal)) Gives the value of a recurrent sequence or of a system of recurrent sequences. - See also: 1/ seqsolve 2/ plotseq 3/ tableseq 4/ reverse_rsolve + See also: 1/ seqsolve 2/ plotseq 3/ tableseq 4/ reverse_rsolve Ex1:rsolve(u(n+1)=2*u(n)+n,u(n),u(0)=1) Ex2:rsolve(u(n+1)=2*u(n)+n,u(n),u(1)^2=1) Ex3:rsolve(u(n+1)=(u(n)-1)/(u(n)-2),u(n),u(0)=4) Ex4:rsolve(u(n+2)=u(n)+2*u(n+1)+n+1,u(n),[u(0)=0,u(1)=1]) Ex5:rsolve([u(n+1)=3*v(n)+u(n),v(n+1)=v(n)+u(n)],[u(n),v(n)],[u(0)=1,v(0)=2]) - + ''' return GiacMethods['rsolve'](self,*args) @@ -15252,10 +15252,10 @@ cdef class GiacMethods_base: Help for same: same(Expr,Expr) Equality test. - See also: 1/ + See also: 1/ Ex1:same(a,b) Ex2:same((2-1)^2,2^2-2*2+1) - + ''' return GiacMethods['same'](self,*args) @@ -15264,14 +15264,14 @@ cdef class GiacMethods_base: Help for sample: sample(Lst(L),Intg(n)) sample(L,n)= rand(n,L)=list of the n extracted elements of L without replacement. - See also: 1/ rand + See also: 1/ rand Ex1:sample([1,2,3,4,5,6],6) Ex2:sample([1,2,3,4,5,6],3) Ex3:sample(["r","r","r","b","n"],3) Ex4: L:=[1,2,3,4,5,6];L:=sample(L,3) Ex5: L:=[1,2,3,4,5,6];L.sample(3) - Ex6: - + Ex6: + ''' return GiacMethods['sample'](self,*args) @@ -15280,9 +15280,9 @@ cdef class GiacMethods_base: Help for samplerate: samplerate(Lst(clip)) Returns the sampling rate of an audio clip, in Hertz. - See also: 1/ bit_depth 2/ channels 3/ channel_data 4/ duration + See also: 1/ bit_depth 2/ channels 3/ channel_data 4/ duration Ex1:samplerate(readwav("/some/file")) - + ''' return GiacMethods['samplerate'](self,*args) @@ -15291,13 +15291,13 @@ cdef class GiacMethods_base: Help for sans_factoriser: sans_factoriser(Opt.) Option of the plotimplicit command. - See also: 1/ plotimplicit + See also: 1/ plotimplicit Ex1: plotimplicit(x^2+y^2-1,x,y,unfactored) Ex2: plotimplicit(x^2+y^2-1,[x,y],unfactored) Ex3: plotimplicit(x^2+y^2+z^2-1,x,y,z,xstep=0.2,ystep=0.2,zstep=0.2,unfactored) Ex4: plotimplicit(x^2+y^2+z^2-1,[x,y,z],xstep=0.2,ystep=0.2,zstep=0.2,unfactored) Ex5: plotimplicit(x^2+y^2+z^2-1,x=0..1,y=0..1,z=0..1,xstep=0.2,ystep=0.2,zstep=0.2,unfactored) - + ''' return GiacMethods['sans_factoriser'](self,*args) @@ -15306,10 +15306,10 @@ cdef class GiacMethods_base: Help for saute: saute(NULL or Real(n)) The turtle takes n steps forward without traces (by default n=10). - See also: 1/ avance 2/ recule + See also: 1/ avance 2/ recule Ex1: saute 30 Ex2:saute(30) - + ''' return GiacMethods['saute'](self,*args) @@ -15318,11 +15318,11 @@ cdef class GiacMethods_base: Help for scalarProduct: scalarProduct(Vect(v1),Vect(v2)) Scalar product. - See also: 1/ * 2/ cross 3/ .* 4/ hadamard + See also: 1/ * 2/ cross 3/ .* 4/ hadamard Ex1:scalarProduct([1,2],[3,4]) Ex2:scalarProduct([3,2,4],[3,2,4]) Ex3:scalarProduct([[1,2],[3,4]],[[3,2],[4,5]]) - + ''' return GiacMethods['scalarProduct'](self,*args) @@ -15331,11 +15331,11 @@ cdef class GiacMethods_base: Help for scalar_product: scalar_product(Vect(v1),Vect(v2)) Scalar product. - See also: 1/ * 2/ cross 3/ .* 4/ hadamard + See also: 1/ * 2/ cross 3/ .* 4/ hadamard Ex1:scalar_product([1,2],[3,4]) Ex2:scalar_product([3,2,4],[3,2,4]) Ex3:scalar_product([[1,2],[3,4]],[[3,2],[4,5]]) - + ''' return GiacMethods['scalar_product'](self,*args) @@ -15344,9 +15344,9 @@ cdef class GiacMethods_base: Help for scatterplot: scatterplot(Mtrx) Draws for k=0..nrows, the points (xk,yk) where xk=element row k column 0 and yk=element row k column j (j=1..ncols). - See also: 1/ polygonplot 2/ polygonscatterplot 3/ listplot + See also: 1/ polygonplot 2/ polygonscatterplot 3/ listplot Ex1:scatterplot([[1,2,3],[2,0,1],[-1,2,3]]) - + ''' return GiacMethods['scatterplot'](self,*args) @@ -15355,10 +15355,10 @@ cdef class GiacMethods_base: Help for schur: schur(Mtrx(A)) Matrix reduction to Hessenberg form. Returns [P,B] such that B=inv(P)*A*P:SCHUR(A)=hessenberg(A,-1). - See also: 1/ hessenberg + See also: 1/ hessenberg Ex1:schur([[1,2,3],[4,5,6],[7,8,1]]) Ex2:schur([[1,2,3,4],[4,5,6,7],[7,8,9,0],[0,1,2,3]]) - + ''' return GiacMethods['schur'](self,*args) @@ -15367,9 +15367,9 @@ cdef class GiacMethods_base: Help for sec: sec(Expr) Secant: sec(x)=1/cos(x). - See also: 1/ cos 2/ asec + See also: 1/ cos 2/ asec Ex1:sec(pi/3) - + ''' return GiacMethods['sec'](self,*args) @@ -15378,14 +15378,14 @@ cdef class GiacMethods_base: Help for secant_solver: secant_solver(Opt) Argument for fsolve giving the method for solving a numerical equation. - See also: 1/ fsolve + See also: 1/ fsolve Ex1: fsolve(cos(x)=x,x,0..1,bisection_solver) Ex2: fsolve(cos(x)=x,x,0..1,brent_solver) Ex3: fsolve(cos(x)=x,x,0..1,falsepos_solver) Ex4: fsolve(cos(x)=x,x,0,newton_solver) Ex5: fsolve(cos(x)=x,x,0,secant_solver) Ex6: fsolve(cos(x)=x,x,0,steffenson_solver) - + ''' return GiacMethods['secant_solver'](self,*args) @@ -15394,7 +15394,7 @@ cdef class GiacMethods_base: Help for segment: segment((Pnt or Cplx or Lst([xM,yM])),(Pnt or Cplx or Lst([xN,yN]),[Var],[Var] or Opt) segment(A,B) draws the segment AB and segment([xM,yM],[xN,yN]) draws the vector as origin [xM,yM], of coordinates [xN,yN] (i.e draws segment(M,point(M+N)) or Option of the arc command. - See also: 1/ line 2/ arc + See also: 1/ line 2/ arc Ex1:segment(i,1+i) Ex2:segment(point(i),point(1+i)) Ex3:segment(point(i),point(1+i),A,B) @@ -15402,7 +15402,7 @@ cdef class GiacMethods_base: Ex5:segment([-1,0],point([-1,0]+[2,1])) Ex6: arc(i,1,pi/4,segment) Ex7: affichage( arc(i,1,pi/4,segment),1+rempli) - + ''' return GiacMethods['segment'](self,*args) @@ -15411,9 +15411,9 @@ cdef class GiacMethods_base: Help for seidel_spectrum: seidel_spectrum(Graph(G)) Returns the Seidel spectrum of G as a list of lists with two elements, each containing an eigenvalue and its multiplicity. - See also: 1/ graph_spectrum + See also: 1/ graph_spectrum Ex1:seidel_spectrum(graph("clebsch")) - + ''' return GiacMethods['seidel_spectrum'](self,*args) @@ -15422,9 +15422,9 @@ cdef class GiacMethods_base: Help for seidel_switch: seidel_switch(Graph(G),Lst(V)) Returns a copy of G in which the edges between vertices in list V and vertices not in V are inverted (replaced with a set of edges from V to other vertices which are not present in G). - See also: 1/ neighbors 2/ graph_complement + See also: 1/ neighbors 2/ graph_complement Ex1:seidel_switch(cycle_graph(5),[1,2]) - + ''' return GiacMethods['seidel_switch'](self,*args) @@ -15433,10 +15433,10 @@ cdef class GiacMethods_base: Help for select: select(FncBool(f),Lst(l)) Selects the elements e of l such that f(e)=true. - See also: 1/ remove 2/ range + See also: 1/ remove 2/ range Ex1:select(x->x>=5,[1,2,6,7]) Ex2:select(x->isprime(x),range(20)).^2 - + ''' return GiacMethods['select'](self,*args) @@ -15445,9 +15445,9 @@ cdef class GiacMethods_base: Help for semi_augment: semi_augment(Mtrx(A),Mtrx(B)) Returns a matrix made with A and B, with n1+n2 rows and p columns if dim(A)=[n1,p] and dim(B)=[n2,p]. - See also: 1/ augment + See also: 1/ augment Ex1:semi_augment([[68,-21],[56,59],[1,2]],[[68,-21],[56,59]]) - + ''' return GiacMethods['semi_augment'](self,*args) @@ -15455,8 +15455,8 @@ cdef class GiacMethods_base: r'''From Giac's documentation: Help for seq: seq(Expr(Xpr),Var(Var)=Int(a..b),[Real(p)]||Expr(Xpr),Var(Var),Real(a),Real(b),[Real(p)]) - Returns the sequence (2 or 3 arg) or the list (4 or 5 arg) obtained when var goes from a to b (step p) in Xpr (or the Xpr is repeated n times or returns the sequence of reals from a to b (step p)). And also seq(expression,variable,list) is equivalent to map(list,unapply(expression,variable)) - See also: 1/ $ 2/ makelist 3/ range 4/ map 5/ unapply + Returns the sequence (2 or 3 arg) or the list (4 or 5 arg) obtained when var goes from a to b (step p) in Xpr (or the Xpr is repeated n times or returns the sequence of reals from a to b (step p)). And also seq(expression,variable,list) is equivalent to map(list,unapply(expression,variable)) + See also: 1/ $ 2/ makelist 3/ range 4/ map 5/ unapply Ex1:seq(0.3,4) Ex2:seq(t,4) Ex3:seq(0,0) @@ -15466,9 +15466,9 @@ cdef class GiacMethods_base: Ex7:seq(2^k,k,0,8) Ex8:seq(2^k,k,0,8,2) Ex9:seq(x^3,x,[1,2,3]) - Ex10: [seq(0.3..2,0.2)] + Ex10: [seq(0.3..2,0.2)] Ex11: a:=(1,2,3);eval(seq(a,4)) - + ''' return GiacMethods['seq'](self,*args) @@ -15477,11 +15477,11 @@ cdef class GiacMethods_base: Help for seqplot: seqplot(Expr(f(Var)),Var=[a,xm,xM],Intg(p)) For seeing the pth terms of the sequence u(0)=a,u(n)=f(u(n-1)). - See also: 1/ seqsolve 2/ rsolve + See also: 1/ seqsolve 2/ rsolve Ex1:seqplot(sqrt(2+x),6,5) Ex2:seqplot(sqrt(2+t),t=6,5) Ex3:seqplot(sqrt(2+x),x=[6,1,7],5,affichage=epaisseur_ligne_2) - + ''' return GiacMethods['seqplot'](self,*args) @@ -15490,14 +15490,14 @@ cdef class GiacMethods_base: Help for seqsolve: seqsolve((Expr or LstExpr),(Var or LstVar),(InitVal or LstInitVal)) Gives the value of a recurrent sequence (u_{n+1}=f(u_n) or u_{n+k}=f(u_n,u_{n+1}...u_{n+k-1})) or of a system of recurrent sequences. - See also: 1/ rsolve 2/ plotseq 3/ tableseq + See also: 1/ rsolve 2/ plotseq 3/ tableseq Ex1:seqsolve(2x+n,[x,n],1) Ex2:seqsolve(2x+n*3^n,[x,n],1) Ex3:seqsolve(x+y,[x,y,n],[1,1]) Ex4:seqsolve(x+2*y+n+1,[x,y,n],[0,1]) Ex5:seqsolve([x+2*y,n+1+x],[x,y,n],[0,1]) Ex6:seqsolve([x+2*y+n+1,x],[x,y,n],[0,1]) - + ''' return GiacMethods['seqsolve'](self,*args) @@ -15506,9 +15506,9 @@ cdef class GiacMethods_base: Help for sequence_graph: sequence_graph(Lst(L)) Returns an undirected graph with the degree sequence equal to the list L. - See also: 1/ degree_sequence 2/ is_graphic_sequence + See also: 1/ degree_sequence 2/ is_graphic_sequence Ex1:sequence_graph(degree_sequence(sequence_graph([3,2,4,2,3,4,5,7]))) - + ''' return GiacMethods['sequence_graph'](self,*args) @@ -15517,13 +15517,13 @@ cdef class GiacMethods_base: Help for series: series(Expr,Equal(var=limit_point),[Order],[Dir(1,0,-1)]) Series expansion at finite or infinite points. - See also: 1/ limit 2/ taylor 3/ pad 4/ polynom 5/ truncate + See also: 1/ limit 2/ taylor 3/ pad 4/ polynom 5/ truncate Ex1:series(sin(x)/x,x=0) Ex2:series(sin(x),x=0,6,polynom) Ex3:series(ln(x+x^2)-ln(x),x=0,1) Ex4:series((x^4+x+2)/(x^2+1),x=0,5) Ex5: series("h",8); ln(1+h); - Ex6:series(1/(1+x+y),[x,y],[0,0],5) + Ex6:series(1/(1+x+y),[x,y],[0,0],5) Ex7:series(sin(x*y),[x,y],[1,pi/2],3) Ex8:series(sin((1+h*t)*(pi/2+k*t)),t=0,3,polynom)(t=1) Ex9:series(y^2/x^3,[x,y],[1,-1],3) @@ -15531,7 +15531,7 @@ cdef class GiacMethods_base: Ex11:series(subst(sin(x+y)+cos(y*x),[x,y],h*[x,y]),h=0,6,polynom) Ex12:series(subst(sin(x+y)+cos(y*x),[x,y],h*[x,y]),h=0,6,polynom)(h=1) Ex13: truncate(series(sin(x),x=0,6),6) - + ''' return GiacMethods['series'](self,*args) @@ -15540,9 +15540,9 @@ cdef class GiacMethods_base: Help for set_edge_attribute: set_edge_attribute(Graph(G),Edge(e),Seq(tag1=value1,tag2=value2,..)) Stores the attributes to edge e and returns the modified copy of G. - See also: 1/ discard_edge_attribute 2/ get_edge_attribute 3/ list_edge_attributes + See also: 1/ discard_edge_attribute 2/ get_edge_attribute 3/ list_edge_attributes Ex1:set_edge_attribute(cycle_graph(3),[1,2],"cost"=12.4) - + ''' return GiacMethods['set_edge_attribute'](self,*args) @@ -15551,9 +15551,9 @@ cdef class GiacMethods_base: Help for set_edge_weight: set_edge_weight(Graph(G),Edge(e),Real(w)) Sets the weight of the edge e in the weighted graph G to w and returns the modified copy of G. - See also: 1/ is_weighted 2/ get_edge_weight 3/ make_weighted 4/ weight_matrix + See also: 1/ is_weighted 2/ get_edge_weight 3/ make_weighted 4/ weight_matrix Ex1:set_edge_weight(graph(%{[1,2],[2,3]%}),[1,2],5) - + ''' return GiacMethods['set_edge_weight'](self,*args) @@ -15562,9 +15562,9 @@ cdef class GiacMethods_base: Help for set_graph_attribute: set_graph_attribute(Graph(G),Seq(tag1=value1,tag2=value2,..)) Stores the attributes where each tag is a string, and returns the modified copy of G. - See also: 1/ discard_graph_attribute 2/ get_graph_attribute 3/ list_graph_attributes + See also: 1/ discard_graph_attribute 2/ get_graph_attribute 3/ list_graph_attributes Ex1:set_graph_attribute(cycle_graph(3),"name"="cycle graph") - + ''' return GiacMethods['set_graph_attribute'](self,*args) @@ -15573,9 +15573,9 @@ cdef class GiacMethods_base: Help for set_pixel: set_pixel(Intg(x),Intg(y),Intg(col)) Pixel on and adds to the list of pixels. Run show_pixels() to display - See also: 1/ clear 2/ show_pixels 3/ draw_line 4/ draw_rectangle 5/ draw_polygon + See also: 1/ clear 2/ show_pixels 3/ draw_line 4/ draw_rectangle 5/ draw_polygon Ex1: clear(); set_pixel(4); draw_pixel(1,2,red); show_pixels(); - + ''' return GiacMethods['set_pixel'](self,*args) @@ -15584,9 +15584,9 @@ cdef class GiacMethods_base: Help for set_vertex_attribute: set_vertex_attribute(Graph(G),Vrtx(v),Seq(tag1=value1,tag2=value2,..)) Stores the attributes to vertex v and returns the modified copy of G. - See also: 1/ discard_vertex_attribute 2/ get_vertex_attribute 3/ list_vertex_attributes + See also: 1/ discard_vertex_attribute 2/ get_vertex_attribute 3/ list_vertex_attributes Ex1:set_vertex_attribute(cycle_graph(3),1,"supply"=27) - + ''' return GiacMethods['set_vertex_attribute'](self,*args) @@ -15595,9 +15595,9 @@ cdef class GiacMethods_base: Help for set_vertex_positions: set_vertex_positions(Graph(G),Lst(vp)) Sets the coordinates, given in the list vp, to the vertices of G and returns the modified copy of G. - See also: 1/ draw_graph + See also: 1/ draw_graph Ex1: G:=graph([1,2,3,4,5,6],%{[1,2],[1,4],[4,5],[2,5],[2,3],[3,6],[5,6]%}); G:=set_vertex_positions(G,[[0,0],[0.5,0],[1,0],[0,0.5],[0.5,0.5],[1,0.5]]) - + ''' return GiacMethods['set_vertex_positions'](self,*args) @@ -15606,13 +15606,13 @@ cdef class GiacMethods_base: Help for shift: shift(Lst,[Intg(n)]) Returns the list where the last element [or the tail beginning with the n-th element] is moved to the first element and then completed with 0s (by default n=-1);L:=shift(L,2) o L.shift(2). - See also: 1/ rotate 2/ tail + See also: 1/ rotate 2/ tail Ex1:shift([0,1,2,3],2) Ex2:shift([0,1,2,3]) Ex3:shift([0,1,2,3,4]) Ex4: L:=[0,1,2,3];L:=shift(L,2) Ex5: L:=[0,1,2,3];L.shift(2) - + ''' return GiacMethods['shift'](self,*args) @@ -15621,14 +15621,14 @@ cdef class GiacMethods_base: Help for shift_phase: shift_phase(Expr) shift_phase returns the expressions where the phase of the evaluated trigonometric expressions is increased by pi/2. - See also: 1/ series + See also: 1/ series Ex1:shift_phase(sin(x)) Ex2:shift_phase('sin(x+pi/2)') Ex3:shift_phase(x+sin(x)) Ex4:shift_phase(x+sin(x)) Ex5:shift_phase(cos(t)) Ex6:shift_phase(tan(u)) - + ''' return GiacMethods['shift_phase'](self,*args) @@ -15637,9 +15637,9 @@ cdef class GiacMethods_base: Help for shortest_path: shortest_path(Graph(G),Vrtx(s),Vrtx(t)||Lst(T)) Returns the shortest path from vertex s to vertex t in G. If such path does not exist, returns an empty list. If vector T of vertices from G is given, the list of shortest paths from s to each t int T is returned. - See also: 1/ dijkstra 2/ vertex_distance + See also: 1/ dijkstra 2/ vertex_distance Ex1:shortest_path(cycle_graph(6),1,5) - + ''' return GiacMethods['shortest_path'](self,*args) @@ -15648,9 +15648,9 @@ cdef class GiacMethods_base: Help for show_pixels: show_pixels(NULL) Displays the list of pixels. - See also: 1/ set_pixel 2/ clear + See also: 1/ set_pixel 2/ clear Ex1:show_pixels() - + ''' return GiacMethods['show_pixels'](self,*args) @@ -15659,13 +15659,13 @@ cdef class GiacMethods_base: Help for shuffle: shuffle(Intg(n)||Lst(L)) Returns a random permutation of [0,1,2,..,n-1] or of the list L. - See also: 1/ permu2cycles 2/ is_permu 3/ permu2mat + See also: 1/ permu2cycles 2/ is_permu 3/ permu2mat Ex1:shuffle(4) Ex2:shuffle(7) Ex3:shuffle([1,3,5,7,9]) Ex4: L:=[1,3,5,7,9];L:=randperm(L) Ex5: L:=[1,3,5,7,9];L.randperm() - + ''' return GiacMethods['shuffle'](self,*args) @@ -15674,13 +15674,13 @@ cdef class GiacMethods_base: Help for sierpinski_graph: sierpinski_graph(Intg(n),Intg(k),[triangle]) Returns Sierpiński (triangle) graph S(n,k) (resp. ST(n,k)). - See also: 1/ graph + See also: 1/ graph Ex1:sierpinski_graph(2,4) Ex2:sierpinski_graph(4,3) Ex3:sierpinski_graph(3,4) Ex4:sierpinski_graph(3,2) Ex5:sierpinski_graph(3,3,at_triangle) - + ''' return GiacMethods['sierpinski_graph'](self,*args) @@ -15689,10 +15689,10 @@ cdef class GiacMethods_base: Help for sign: sign(Expr) Returns the sign (-1,0,+1) of its argument. - See also: 1/ abs + See also: 1/ abs Ex1:sign(-4) Ex2:sign(4-5) - + ''' return GiacMethods['sign'](self,*args) @@ -15701,9 +15701,9 @@ cdef class GiacMethods_base: Help for signature: signature(Permut) Returns the signature of a permutation. - See also: 1/ permu2cycles 2/ is_permu + See also: 1/ permu2cycles 2/ is_permu Ex1:signature([1,0,3,4,2]) - + ''' return GiacMethods['signature'](self,*args) @@ -15712,10 +15712,10 @@ cdef class GiacMethods_base: Help for signe: signe(Str(s)) Writes the string s with the font 20 at the point [10,10]. - See also: 1/ ecris + See also: 1/ ecris Ex1:signe("Thomas") Ex2:signe(Thomas) - + ''' return GiacMethods['signe'](self,*args) @@ -15724,12 +15724,12 @@ cdef class GiacMethods_base: Help for similarity: similarity(Pnt or Dr3,Real,Angle,Pnt) similarity(B,k,a1,A)=transformation of A in the similarity (center B or axis d, coeff k,angle a1) (or also homothety(B,k*exp(i*a1),A)). - See also: 1/ homothety + See also: 1/ homothety Ex1:similarity(1+i,2,pi/3,i) Ex2:similarity(line(x=y,y=z),2,pi/3,point(-1,2,1)) Ex3: s:=similarity(1+i,2,pi/3);s(i) Ex4: s:=similarity(line(x=y,y=z),2,pi/3),s(point(-1,2,1)) - + ''' return GiacMethods['similarity'](self,*args) @@ -15738,10 +15738,10 @@ cdef class GiacMethods_base: Help for simp2: simp2(Intg(A) or Poly(A),Intg(B) or Poly(B)) Returns the list [A/gcd(A,B),B/gcd(A,B)]. - See also: 1/ gcd + See also: 1/ gcd Ex1:simp2(12,18) Ex2:simp2(x^3-1,x^2-1) - + ''' return GiacMethods['simp2'](self,*args) @@ -15755,7 +15755,7 @@ cdef class GiacMethods_base: Ex3:simplex_reduce([[-3,2],[1,1]],[3,4],[1,2]) Ex4:simplex_reduce([[-3,2,1,0,3],[1,1,0,1,4],[-1,-2,0,0,0]]) Ex5:simplex_reduce([[2,1,1,1,0,0,2],[1,2,3,0,1,0,5],[2,2,1,0,0,1,6],[-3,-1,-3,1,-1,2,0]]) - + ''' return GiacMethods['simplex_reduce'](self,*args) @@ -15764,11 +15764,11 @@ cdef class GiacMethods_base: Help for simplifier: simplifier(Expr) Simplifies an expression. - See also: 1/ normal + See also: 1/ normal Ex1:simplifier(4*atan(1/5)-atan(1/239)) Ex2:simplifier(texpand((sin(3*x)+sin(7*x))/sin(5*x))) Ex3:simplifier(texpand((cos(3*x)+cos(7*x))/cos(5*x))) - + ''' return GiacMethods['simplifier'](self,*args) @@ -15777,11 +15777,11 @@ cdef class GiacMethods_base: Help for simplify: simplify(Expr) Simplifies an expression. - See also: 1/ normal + See also: 1/ normal Ex1:simplify(4*atan(1/5)-atan(1/239)) Ex2:simplify(texpand((sin(3*x)+sin(7*x))/sin(5*x))) Ex3:simplify(texpand((cos(3*x)+cos(7*x))/cos(5*x))) - + ''' return GiacMethods['simplify'](self,*args) @@ -15790,12 +15790,12 @@ cdef class GiacMethods_base: Help for simpson: simpson(Opt) Option of the area command. - See also: 1/ area + See also: 1/ area Ex1: area(x^2,x=0..1,5,simpson) Ex2: area(x^2,x=0..1,5,rombergt) Ex3: area(x^2,x=0..1,5,rombergm) Ex4:simpson(area(x^2,x=0..1,5,gauss15)) - + ''' return GiacMethods['simpson'](self,*args) @@ -15804,10 +15804,10 @@ cdef class GiacMethods_base: Help for simult: simult(Mtrx(A),Mtrx(B)) Returns the matrix where the column of index k is solution of A*X=column of index k of B (=B[0..nr-1,k..k] with nr=number of rows of B). - See also: 1/ rref 2/ linsolve + See also: 1/ rref 2/ linsolve Ex1:simult([[3,1],[3,2]],[[-2],[2]]) Ex2:simult([[3,1],[3,2]],[[-2,1],[2,-1]]) - + ''' return GiacMethods['simult'](self,*args) @@ -15816,10 +15816,10 @@ cdef class GiacMethods_base: Help for sin: sin(Expr or Opt) Sine or option of the convert or convertir command (id trigsin). - See also: 1/ asin 2/ convert 3/ trigsin + See also: 1/ asin 2/ convert 3/ trigsin Ex1:sin(0) Ex2: convert(cos(x)^4+sin(x)^2,sin) - + ''' return GiacMethods['sin'](self,*args) @@ -15828,9 +15828,9 @@ cdef class GiacMethods_base: Help for sin2costan: sin2costan(Expr) Replaces sin(x) by cos(x)*tan(x) in the argument. - See also: 1/ tan2sincos 2/ cos2sintan 3/ tan2sincos2 4/ tan2cossin2 + See also: 1/ tan2sincos 2/ cos2sintan 3/ tan2sincos2 4/ tan2cossin2 Ex1:sin2costan(sin(x)) - + ''' return GiacMethods['sin2costan'](self,*args) @@ -15839,9 +15839,9 @@ cdef class GiacMethods_base: Help for sinc: sinc(Expr(x)) Returns the value of the cardinal sine function at x. - See also: 1/ sin + See also: 1/ sin Ex1:sinc(pi*x) - + ''' return GiacMethods['sinc'](self,*args) @@ -15850,11 +15850,11 @@ cdef class GiacMethods_base: Help for sincos: sincos(Expr or Opt) Transforms the complex exponential into sine and cosine (id exp2trig) or option of the convert or convertir command (id sincos). - See also: 1/ trig2trig 2/ trig2exp 3/ atrig2ln 4/ convert + See also: 1/ trig2trig 2/ trig2exp 3/ atrig2ln 4/ convert Ex1:sincos(exp(i*x)) Ex2:sincos(exp(-i*x)) Ex3: convert(exp(i*x),sincos) - + ''' return GiacMethods['sincos'](self,*args) @@ -15863,7 +15863,7 @@ cdef class GiacMethods_base: Help for single_inter: single_inter(Curve,Curve,[Pnt(A)||LstPnt(L)]) Gives one of the points of intersection of 2 curves or surfaces (or the intersection near A or not in L). - See also: 1/ intersect 2/ head + See also: 1/ intersect 2/ head Ex1:single_inter(line(i,1-i),line(0,1)) Ex2:single_inter(line(i,1-i),circle(0,1)) Ex3:single_inter(line(i,1+2*i),circle(0,1),[point(i)]) @@ -15871,7 +15871,7 @@ cdef class GiacMethods_base: Ex5:single_inter(circle(1,sqrt(2)),circle(0,1)) Ex6:single_inter(plane(x=y),plane(y=z)) Ex7:single_inter(line(x=y+1,y=2*z),plane(y=z)) - + ''' return GiacMethods['single_inter'](self,*args) @@ -15880,9 +15880,9 @@ cdef class GiacMethods_base: Help for sinh: sinh(Expr) Hyperbolic sine. - See also: 1/ asinh + See also: 1/ asinh Ex1:sinh(0) - + ''' return GiacMethods['sinh'](self,*args) @@ -15891,9 +15891,9 @@ cdef class GiacMethods_base: Help for sizes: sizes(Lst or Str or Seq) Returns the list of sizes of a list of lists. - See also: 1/ size 2/ dim + See also: 1/ size 2/ dim Ex1:sizes([[1,2,3],[1,2],[1]]) - + ''' return GiacMethods['sizes'](self,*args) @@ -15902,7 +15902,7 @@ cdef class GiacMethods_base: Help for slope: slope(Line||Pnt||Cplx,[Pnt||Cplx]) Returns the slope of the line defined in the argument or is an attribute of line. - See also: 1/ line 2/ tangent 3/ LinTan 4/ slopeatraw 5/ slopeat + See also: 1/ line 2/ tangent 3/ LinTan 4/ slopeatraw 5/ slopeat Ex1:slope(line(1,2i)) Ex2:slope(segment(1,2i)) Ex3:slope(1,2i) @@ -15911,7 +15911,7 @@ cdef class GiacMethods_base: Ex6:slope(tangent(plotfunc(sin(x)),pi/4)) Ex7:slope(LineTan(sin(x),pi/4)) Ex8: line(point(1,2),slope=-1) - + ''' return GiacMethods['slope'](self,*args) @@ -15920,11 +15920,11 @@ cdef class GiacMethods_base: Help for slopeat: slopeat(Line, Pnt||Cplx(z0)) slopeat(d,z0) displays at the point(z0), with a legend, the value of the slope of the line or segment d. - See also: 1/ slope 2/ slopeatraw + See also: 1/ slope 2/ slopeatraw Ex1: A:=point(0);B:=point(1+i);slopeat(droite(A,B),(1+i)/2) Ex2: s:=segment(1-i,i);slopeat(s,point(0.4)) Ex3: t:=tangent(plotfunc(sin(x)),pi/4);slopeat(t,0) - + ''' return GiacMethods['slopeat'](self,*args) @@ -15933,12 +15933,12 @@ cdef class GiacMethods_base: Help for slopeatraw: slopeatraw(Line, Pnt||Cplx(z0)) slopeatraw(d,z0) displays at point(z0), the value of the slope of the line or segment d. - See also: 1/ slope 2/ slopeat + See also: 1/ slope 2/ slopeat Ex1: A:=point(0);B:=point(1+i);slopeatraw(droite(A,B),(1+i)/2) Ex2: s:=segment(1-i,i);slopeatraw(s,point(0.4)) Ex3:slopeatraw(tangent(plotfunc(sin(x)),pi/4),0) Ex4:slopeatraw((LineTan sin(x),pi/4),i) - + ''' return GiacMethods['slopeatraw'](self,*args) @@ -15947,10 +15947,10 @@ cdef class GiacMethods_base: Help for smith: smith(Mtrx(A)) Smith normal form of a matrix with polynomial coefficients : returns U,D,V such that U and V are invertible, D is diagonal, and U*A*V=D. - See also: 1/ hermite 2/ ismith 3/ ihermite + See also: 1/ hermite 2/ ismith 3/ ihermite Ex1: n:=10; A:=ranm(n,n) % 17; U,D,V:=smith(x*idn(n)-A);normal(U*(x*idn(n)-A)*V-D); diag(D); Ex2: GF(3,5,g); n:=3; A:=ranm(n,n,g); U,D,V:=smith(x*idn(n)-A);normal(U*(x*idn(n)-A)*V-D); diag(D); - + ''' return GiacMethods['smith'](self,*args) @@ -15959,11 +15959,11 @@ cdef class GiacMethods_base: Help for smod: smod(Intg,Intg) Returns the Euclidean symmetric remainder of two integers. - See also: 1/ irem 2/ iquo 3/ mod 4/ fracmod + See also: 1/ irem 2/ iquo 3/ mod 4/ fracmod Ex1:smod(8,3) Ex2:smod(10,4) Ex3:smod(11,7) - + ''' return GiacMethods['smod'](self,*args) @@ -15972,12 +15972,12 @@ cdef class GiacMethods_base: Help for snedecor: snedecor(Intg(n),Intg(m),Real(x0)) Returns the probability density of the Fisher-Snedecor law (n and m are the numbers of degrees of freedom). - See also: 1/ fisher_cdf 2/ fisher_icdf 3/ randvector 4/ ranm + See also: 1/ fisher_cdf 2/ fisher_icdf 3/ randvector 4/ ranm Ex1:snedecor(4,10,2.1) Ex2:snedecor(4,4,2.1) Ex3: randvector(5,fisher,4,6) Ex4: ranm(2,3,fisher,4,6) - + ''' return GiacMethods['snedecor'](self,*args) @@ -15986,10 +15986,10 @@ cdef class GiacMethods_base: Help for snedecor_cdf: snedecor_cdf(Intg(n),Intg(m),Real(x0)) Returns the probability that a Fisher-Snedecor random variable is less than x0 (n and m are the numbers of degrees of freedom). - See also: 1/ UTPF 2/ fisher_icdf 3/ fisherd + See also: 1/ UTPF 2/ fisher_icdf 3/ fisherd Ex1:snedecor_cdf(4,4,2.1) Ex2:snedecor_cdf(4,10,3.5) - + ''' return GiacMethods['snedecor_cdf'](self,*args) @@ -15998,10 +15998,10 @@ cdef class GiacMethods_base: Help for snedecor_icdf: snedecor_icdf(Intg(n),Intg(m),Real(p)) Returns h such as the probability that a Fisher-Snedecor random variable is less than h is p (n and m are the numbers of degrees of freedom and 0<=p<=1). - See also: 1/ fisher_cdf 2/ fisherd + See also: 1/ fisher_cdf 2/ fisherd Ex1:snedecor_icdf(4,10,0.95) Ex2:snedecor_icdf(4,10,0.05) - + ''' return GiacMethods['snedecor_icdf'](self,*args) @@ -16010,12 +16010,12 @@ cdef class GiacMethods_base: Help for snedecord: snedecord(Intg(n),Intg(m),Real(x0)) Returns the probability density of the Fisher-Snedecor law (n and m are the numbers of degrees of freedom). - See also: 1/ fisher_cdf 2/ fisher_icdf 3/ randvector 4/ ranm + See also: 1/ fisher_cdf 2/ fisher_icdf 3/ randvector 4/ ranm Ex1:snedecord(4,10,2.1) Ex2:snedecord(4,4,2.1) Ex3: randvector(5,fisher,4,6) Ex4: ranm(2,3,fisher,4,6) - + ''' return GiacMethods['snedecord'](self,*args) @@ -16024,10 +16024,10 @@ cdef class GiacMethods_base: Help for snedecord_cdf: snedecord_cdf(Intg(n),Intg(m),Real(x0)) Returns the probability that a Fisher-Snedecor random variable is less than x0 (n and m are the numbers of degrees of freedom). - See also: 1/ UTPF 2/ fisher_icdf 3/ fisherd + See also: 1/ UTPF 2/ fisher_icdf 3/ fisherd Ex1:snedecord_cdf(4,4,2.1) Ex2:snedecord_cdf(4,10,3.5) - + ''' return GiacMethods['snedecord_cdf'](self,*args) @@ -16036,10 +16036,10 @@ cdef class GiacMethods_base: Help for snedecord_icdf: snedecord_icdf(Intg(n),Intg(m),Real(p)) Returns h such as the probability that a Fisher-Snedecor random variable is less than h is p (n and m are the numbers of degrees of freedom and 0<=p<=1). - See also: 1/ fisher_cdf 2/ fisherd + See also: 1/ fisher_cdf 2/ fisherd Ex1:snedecord_icdf(4,10,0.95) Ex2:snedecord_icdf(4,10,0.05) - + ''' return GiacMethods['snedecord_icdf'](self,*args) @@ -16048,10 +16048,10 @@ cdef class GiacMethods_base: Help for solid_line: solid_line(Opt) Option of the display command for a line. - See also: 1/ display + See also: 1/ display Ex1: display(line(y=x),green+dash_line+line_width_2) Ex2: d:=display(line(2+i,1),cap_round_line) - + ''' return GiacMethods['solid_line'](self,*args) @@ -16060,12 +16060,12 @@ cdef class GiacMethods_base: Help for solve: solve(Expr,[Var]) Solves a (or a set of) polynomial equation. - See also: 1/ linsolve 2/ proot 3/ fsolve 4/ csolve 5/ nSolve + See also: 1/ linsolve 2/ proot 3/ fsolve 4/ csolve 5/ nSolve Ex1:solve(x^2-3=1) Ex2:solve(x^3-3*y,y) Ex3:solve([y-z=0,z-x=0,x-y=0,x-1+y+z=0],[x,y,z]) Ex4:solve([x^2-y^2=0,x^2-z^2=0],[x,y,z]) - + ''' return GiacMethods['solve'](self,*args) @@ -16074,7 +16074,7 @@ cdef class GiacMethods_base: Help for somme: somme(Expr,Var,VarMin(a),VarMax(b),[VarStep(p)]) Discrete sum (with 2 or 4 arguments return then sum from a to b if a<=b or of the opposite of the sum from b+1 to a-1 if a>b+1 or 0 if a=b+1) or the discrete primitive or sum of the elements of a list or a sequence. - See also: 1/ + + See also: 1/ + Ex1:somme(1/n^2,n,1,17) Ex2:somme(1/n^2,n=1..17) Ex3:somme(1/n^2,n,17,1) @@ -16085,7 +16085,7 @@ cdef class GiacMethods_base: Ex8:somme([[1,2,3,4,5,6,7,8,9],[1,2,3,4,5,6,7,8,9]]) Ex9:somme(1/(x*(x+1)),x) Ex10:somme(cos(n*x),n) - + ''' return GiacMethods['somme'](self,*args) @@ -16094,10 +16094,10 @@ cdef class GiacMethods_base: Help for sommet: sommet(Op or Fnct) Returns the top of an operator. - See also: 1/ feuille 2/ quote + See also: 1/ feuille 2/ quote Ex1:sommet(quote(gcd(45,123))) Ex2:sommet('gcd(45,123)') - + ''' return GiacMethods['sommet'](self,*args) @@ -16106,13 +16106,13 @@ cdef class GiacMethods_base: Help for sort: sort(LstReal or Seq [Fnc]) Returns the sorted list (or sequence) with increasing order according to the second argument which defines a weak strict ordering or sorts and collects equal terms in sums and products. - See also: 1/ SortA 2/ SortD + See also: 1/ SortA 2/ SortD Ex1:sort([3,2,2,4,1,0]) Ex2:sort(3,2.1,2,4,1,0) Ex3:sort([3,4,2],(x,y)->x>y) Ex4:sort([[1,2],[2,3],[4,3]],(x,y)->when(x[1]==y[1],x[0]>y[0],x[1]>y[1])) Ex5:sort(y*x*2+x*y) - + ''' return GiacMethods['sort'](self,*args) @@ -16121,11 +16121,11 @@ cdef class GiacMethods_base: Help for sorta: sorta(LstReal||Seq×||Mtrx) Sorts the list in increasing order or sorts the columns of the matrix so the first row is in increasing order. - See also: 1/ SortA 2/ sortd 3/ sort + See also: 1/ SortA 2/ sortd 3/ sort Ex1:sorta(3,4,2) Ex2:sorta([3,4,2]) Ex3:sorta([[3,4,2],[6,4,5]]) - + ''' return GiacMethods['sorta'](self,*args) @@ -16134,11 +16134,11 @@ cdef class GiacMethods_base: Help for sortd: sortd(LstReal||Seq||Mtrx) Sorts the list in decreasing order or sorts the columns of the matrix so the first row is in decreasing order. - See also: 1/ SortD 2/ sorta 3/ sort + See also: 1/ SortD 2/ sorta 3/ sort Ex1:sortd(3,4,2) Ex2:sortd([3,4,2]) Ex3:sortd([[3,4,2],[6,4,5]]) - + ''' return GiacMethods['sortd'](self,*args) @@ -16147,13 +16147,13 @@ cdef class GiacMethods_base: Help for sorted: sorted(LstReal or Seq [Fnc]) Returns the sorted list (or sequence) with increasing order according to the second argument which defines a weak strict ordering or sorts and collects equal terms in sums and products. - See also: 1/ SortA 2/ SortD + See also: 1/ SortA 2/ SortD Ex1:sorted([3,2,2,4,1,0]) Ex2:sorted(3,2.1,2,4,1,0) Ex3:sorted([3,4,2],(x,y)->x>y) Ex4:sorted([[1,2],[2,3],[4,3]],(x,y)->when(x[1]==y[1],x[0]>y[0],x[1]>y[1])) Ex5:sorted(y*x*2+x*y) - + ''' return GiacMethods['sorted'](self,*args) @@ -16162,10 +16162,10 @@ cdef class GiacMethods_base: Help for soundsec: soundsec(Intg(n),[Intg(N)]) Generates a vector coding n seconds of time/N (default N=44100). - See also: 1/ readwav 2/ writewav 3/ playsnd + See also: 1/ readwav 2/ writewav 3/ playsnd Ex1:soundsec(1) Ex2:soundsec(1,22100) - + ''' return GiacMethods['soundsec'](self,*args) @@ -16174,10 +16174,10 @@ cdef class GiacMethods_base: Help for spanning_tree: spanning_tree(Graph(G),[Vrtx(r)]) Returns a spanning tree of undirected graph G [with the vertex r as the root node]. - See also: 1/ number_of_spanning_trees 2/ minimal_spanning_tree + See also: 1/ number_of_spanning_trees 2/ minimal_spanning_tree Ex1:spanning_tree(graph("petersen")) Ex2:spanning_tree(graph("petersen"),5) - + ''' return GiacMethods['spanning_tree'](self,*args) @@ -16186,10 +16186,10 @@ cdef class GiacMethods_base: Help for sphere: sphere((Pnt or Vect),(Pnt or Real)) sphere(A,B) (resp sphere(A,r)) draws the sphere with diameter AB (resp center A and radius r) in 3D space. - See also: 1/ circle + See also: 1/ circle Ex1:sphere([0,0,0],[2,2,2]) Ex2:sphere([1,1,1],1) - + ''' return GiacMethods['sphere'](self,*args) @@ -16198,9 +16198,9 @@ cdef class GiacMethods_base: Help for spline: spline(Lst(lx),Lst(ly),Var(x),Intg(d)) Natural spline through the points given by the lx and ly lists, variable x, degree d. - See also: 1/ lagrange + See also: 1/ lagrange Ex1:spline([0,1,2],[1,3,0],x,3) - + ''' return GiacMethods['spline'](self,*args) @@ -16209,10 +16209,10 @@ cdef class GiacMethods_base: Help for split: split(Expr(Xpr),Lst(var1,var2)) Splits the two variables var1,var2 of the expression Xpr (without denominator) or returns [0]. - See also: 1/ factor + See also: 1/ factor Ex1:split(x^3*y^2-y^2+x^3-1,[x,y]) Ex2:split(x^3*y^2-y^2+x^3+1,[x,y]) - + ''' return GiacMethods['split'](self,*args) @@ -16221,8 +16221,8 @@ cdef class GiacMethods_base: Help for spring: spring(Opt) Option for the draw_graph command. - See also: 1/ planar 2/ tree 3/ draw_graph - + See also: 1/ planar 2/ tree 3/ draw_graph + ''' return GiacMethods['spring'](self,*args) @@ -16231,10 +16231,10 @@ cdef class GiacMethods_base: Help for sq: sq(Seq) Is the name of the function (ℝ^n -> ℝ)=sum of the squares of the arguments. - See also: 1/ sqrt + See also: 1/ sqrt Ex1:sq(5) Ex2:sq(1,2,3) - + ''' return GiacMethods['sq'](self,*args) @@ -16243,10 +16243,10 @@ cdef class GiacMethods_base: Help for sqrfree: sqrfree(Expr) Factorization of the its argument gathering the terms with the same exponent. - See also: 1/ factor + See also: 1/ factor Ex1:sqrfree(x^4-2*x^2+1) Ex2:sqrfree((x-2)^7*(x+2)^7*(x^4-2*x^2+1)) - + ''' return GiacMethods['sqrfree'](self,*args) @@ -16255,10 +16255,10 @@ cdef class GiacMethods_base: Help for sqrt: sqrt(Expr) Square root. - See also: 1/ surd 2/ ^ + See also: 1/ surd 2/ ^ Ex1:sqrt(50) Ex2:sqrt(x^2) - + ''' return GiacMethods['sqrt'](self,*args) @@ -16267,12 +16267,12 @@ cdef class GiacMethods_base: Help for square: square((Pnt(A) or Cplx),(Pnt(B) or Cplx),[Pnt(P),Var(C),Var(D)]) Returns and draws the square of side AB (ABCD is direct) (in the plane ABP). - See also: 1/ rhombus 2/ quadrilateral + See also: 1/ rhombus 2/ quadrilateral Ex1:square(i,1+i) Ex2:square(i,1+i,C,D) Ex3:square(point(0,0,0),point(3,3,3),point(0,0,3)) Ex4:square(point(0,0,0),point(3,3,3),point(0,0,3),C,D) - + ''' return GiacMethods['square'](self,*args) @@ -16281,10 +16281,10 @@ cdef class GiacMethods_base: Help for square_point: square_point(Opt) Option of the display command for a point. - See also: 1/ display + See also: 1/ display Ex1: F:=display(point(2+1.5*i),point_point) Ex2: F:=display(point(2+1.5*i),rhombus_point) - + ''' return GiacMethods['square_point'](self,*args) @@ -16293,10 +16293,10 @@ cdef class GiacMethods_base: Help for srand: srand() srand returns an integer and initializes the sequence of random numbers. - See also: 1/ RandSeed + See also: 1/ RandSeed Ex1:srand(12) Ex2: srand - + ''' return GiacMethods['srand'](self,*args) @@ -16305,9 +16305,9 @@ cdef class GiacMethods_base: Help for sst: sst(NULL) Steps 1 instruction. - See also: 1/ + See also: 1/ Ex1:sst() - + ''' return GiacMethods['sst'](self,*args) @@ -16316,9 +16316,9 @@ cdef class GiacMethods_base: Help for sst_in: sst_in(NULL) Enters into a function in step-by-step mode. - See also: 1/ + See also: 1/ Ex1:sst_in() - + ''' return GiacMethods['sst_in'](self,*args) @@ -16327,9 +16327,9 @@ cdef class GiacMethods_base: Help for st_ordering: st_ordering(Graph(G),Vrtx(s),Vrtx(t)) Returns ST numbering for the biconnected graph G with source s and sink (target) t. - See also: 1/ is_biconnected + See also: 1/ is_biconnected Ex1:st_ordering(graph("petersen"),1,2) - + ''' return GiacMethods['st_ordering'](self,*args) @@ -16338,9 +16338,9 @@ cdef class GiacMethods_base: Help for star_graph: star_graph(Intg(n)) Returns the complete bipartite graph complete_graph(1,n). - See also: 1/ complete_graph 2/ wheel_graph + See also: 1/ complete_graph 2/ wheel_graph Ex1:star_graph(5) - + ''' return GiacMethods['star_graph'](self,*args) @@ -16349,10 +16349,10 @@ cdef class GiacMethods_base: Help for star_point: star_point(Opt) Option of the display command for a point. - See also: 1/ display + See also: 1/ display Ex1: F:=display(point(2+1.5*i),point_point) Ex2: F:=display(point(2+1.5*i),rhombus_point) - + ''' return GiacMethods['star_point'](self,*args) @@ -16361,11 +16361,11 @@ cdef class GiacMethods_base: Help for stdDev: stdDev(Lst||Mtrx,[Lst]) Returns an unbiased estimate of the population standard deviation of the sample (first argument) with an optional list of weight as second argument. - See also: 1/ mean 2/ stddev + See also: 1/ mean 2/ stddev Ex1:stdDev([1,2,3]) Ex2:stdDev([1,2,3],[1,2,1]) Ex3:stdDev([[1,2,3],[5,6,7]]) - + ''' return GiacMethods['stdDev'](self,*args) @@ -16374,11 +16374,11 @@ cdef class GiacMethods_base: Help for stddev: stddev(Lst||Mtrx,[Lst]) Returns the standard deviation of the elements of its argument with an optional second argument as weight or the list of standard deviations of the columns of a matrix. - See also: 1/ mean 2/ variance 3/ stddevp + See also: 1/ mean 2/ variance 3/ stddevp Ex1:stddev([1,2,3]) Ex2:stddev([1,2,3],[1,2,1]) Ex3:stddev([[1,2,3],[5,6,7]]) - + ''' return GiacMethods['stddev'](self,*args) @@ -16387,11 +16387,11 @@ cdef class GiacMethods_base: Help for stddevp: stddevp(Lst||Mtrx,[Lst]) Returns an unbiased estimate of the population standard deviation of the sample (first argument) with an optional list of weight as second argument. - See also: 1/ mean 2/ stddev + See also: 1/ mean 2/ stddev Ex1:stddevp([1,2,3]) Ex2:stddevp([1,2,3],[1,2,1]) Ex3:stddevp([[1,2,3],[5,6,7]]) - + ''' return GiacMethods['stddevp'](self,*args) @@ -16400,14 +16400,14 @@ cdef class GiacMethods_base: Help for steffenson_solver: steffenson_solver(Opt) Argument for fsolve giving the method for solving a numerical equation. - See also: 1/ fsolve + See also: 1/ fsolve Ex1: fsolve(cos(x)=x,x,0..1,bisection_solver) Ex2: fsolve(cos(x)=x,x,0..1,brent_solver) Ex3: fsolve(cos(x)=x,x,0..1,falsepos_solver) Ex4: fsolve(cos(x)=x,x,0,newton_solver) Ex5: fsolve(cos(x)=x,x,0,secant_solver) Ex6: fsolve(cos(x)=x,x,0,steffenson_solver) - + ''' return GiacMethods['steffenson_solver'](self,*args) @@ -16416,9 +16416,9 @@ cdef class GiacMethods_base: Help for stereo2mono: stereo2mono(Lst(clip)) Returns an audio clip with all channels in the input clip downmixed to a single one. - See also: 1/ channel_data 2/ mean 3/ createwav + See also: 1/ channel_data 2/ mean 3/ createwav Ex1:stereo2mono(readwav("/some/file")) - + ''' return GiacMethods['stereo2mono'](self,*args) @@ -16427,12 +16427,12 @@ cdef class GiacMethods_base: Help for str: str(Expr or Opt) Returns the evaluated expression as a string or is an option of the convert or convertir command (id string). - See also: 1/ expr 2/ format 3/ convert + See also: 1/ expr 2/ format 3/ convert Ex1:str(1.23) Ex2:str(a:=12) Ex3:str(quote(a:=12)) Ex4: convert(quote(a:=12),string) - + ''' return GiacMethods['str'](self,*args) @@ -16441,9 +16441,9 @@ cdef class GiacMethods_base: Help for strongly_connected_components: strongly_connected_components(Graph(G)) Returns the list of strongly connected components in digraph G. - See also: 1/ connected_components 2/ is_connected 3/ is_strongly_connected + See also: 1/ connected_components 2/ is_connected 3/ is_strongly_connected Ex1:strongly_connected_components(digraph([1,2,3],%{[1,2],[1,3],[2,3],[3,2]%})) - + ''' return GiacMethods['strongly_connected_components'](self,*args) @@ -16452,10 +16452,10 @@ cdef class GiacMethods_base: Help for student: student(Intg(n),Real(x0)) Returns the probability density of the Student law (n is the number of degrees of freedom). - See also: 1/ student_cdf 2/ student_icdf + See also: 1/ student_cdf 2/ student_icdf Ex1:student(3,5.2) Ex2:student(1,5.2) - + ''' return GiacMethods['student'](self,*args) @@ -16464,10 +16464,10 @@ cdef class GiacMethods_base: Help for student_cdf: student_cdf(Intg(n),Real(x0)) Returns the probability that a Student random variable is less than x0 (n is the number of degrees of freedom). - See also: 1/ UTPT 2/ student_icdf 3/ studentd + See also: 1/ UTPT 2/ student_icdf 3/ studentd Ex1:student_cdf(3,2.35) Ex2:student_cdf(3,-3.2) - + ''' return GiacMethods['student_cdf'](self,*args) @@ -16476,10 +16476,10 @@ cdef class GiacMethods_base: Help for student_icdf: student_icdf(Intg(n),Real(p)) Returns h such as the probability that a Student random variable is less than h is p (n is the number of degrees of freedom and 0<=p<=1). - See also: 1/ student_cdf 2/ studentd + See also: 1/ student_cdf 2/ studentd Ex1:student_icdf(3,0.95) Ex2:student_icdf(3,0.05) - + ''' return GiacMethods['student_icdf'](self,*args) @@ -16488,10 +16488,10 @@ cdef class GiacMethods_base: Help for studentd: studentd(Intg(n),Real(x0)) Returns the probability density of the Student law (n is the number of degrees of freedom). - See also: 1/ student_cdf 2/ student_icdf + See also: 1/ student_cdf 2/ student_icdf Ex1:studentd(3,5.2) Ex2:studentd(1,5.2) - + ''' return GiacMethods['studentd'](self,*args) @@ -16500,10 +16500,10 @@ cdef class GiacMethods_base: Help for studentt: studentt(Lst,Real,[Real],Fnc,[Real]) T-Test/Student law: arg1=[success,trial] or [mean,sample size] or data, arg2=proportion or data, arg3 optional if data=sigma, arg4 alternative '!=' or '>' or '<', arg5 optional alpha confidence level. - See also: 1/ normalt 2/ chisquaret 3/ kolmogorovt + See also: 1/ normalt 2/ chisquaret 3/ kolmogorovt Ex1:studentt([10,20],.5,.02,'!=',0.1) Ex2:studentt([0.48,20],0.5,0.1,'<') - + ''' return GiacMethods['studentt'](self,*args) @@ -16512,13 +16512,13 @@ cdef class GiacMethods_base: Help for sturm: sturm(Poly,[Var],[Cplx(a)],[Cplx(b)]) Sturm sequence corresponding to a polynomial or number of sign changes of this polynomial in ]a;b]. - See also: 1/ sturmseq 2/ sturmab + See also: 1/ sturmseq 2/ sturmab Ex1:sturm(x^3-1,x) Ex2:sturm(x^5-x^3,x) Ex3:sturm((x^5-x^3)/(x+2),x) Ex4:sturm(x^5-x^3,x,-2,5) Ex5:sturm(x^3-1,x,-2-i,5+3i) - + ''' return GiacMethods['sturm'](self,*args) @@ -16527,10 +16527,10 @@ cdef class GiacMethods_base: Help for sturmab: sturmab(Poly,Var,Cplx(a),Cplx(b)) Number of sign changes of a polynomial in ]a;b] or of complex roots in a..b if a or b is non-real. - See also: 1/ sturm 2/ sturmseq 3/ realroot + See also: 1/ sturm 2/ sturmseq 3/ realroot Ex1:sturmab(x^3-1,x,-2,5) Ex2:sturmab(x^3-1,x,-2-i,5+3i) - + ''' return GiacMethods['sturmab'](self,*args) @@ -16539,11 +16539,11 @@ cdef class GiacMethods_base: Help for sturmseq: sturmseq(Poly,[Var]) Sturm sequence corresponding to a polynomial or to a rational fraction. - See also: 1/ sturm 2/ sturmab + See also: 1/ sturm 2/ sturmab Ex1:sturmseq(x^3-1,x) Ex2:sturmseq(x^5-x^3,x) Ex3:sturmseq((x^5-x^3)/(x+2),x) - + ''' return GiacMethods['sturmseq'](self,*args) @@ -16552,10 +16552,10 @@ cdef class GiacMethods_base: Help for style: style(Opt) Local option (Maple compatibility) of a graphic command to plot a line with dots with style=point. - See also: 1/ line_width + See also: 1/ line_width Ex1: segment(0,point(1,1),style=point) Ex2: line(y=x,style=point,display=green+line_width_2) - + ''' return GiacMethods['style'](self,*args) @@ -16564,9 +16564,9 @@ cdef class GiacMethods_base: Help for subMat: subMat(Mtrx(A),Intg(n1),Intg(n2),Intg(n3),Intg(n4).) Extracts a sub matrix with first element=A[n1,n2] and last element=A[n3,n4]. - See also: 1/ mid + See also: 1/ mid Ex1:subMat([[1,2],[3,4],[5,6]],1,0,2,1) - + ''' return GiacMethods['subMat'](self,*args) @@ -16575,9 +16575,9 @@ cdef class GiacMethods_base: Help for subdivide_edges: subdivide_edges(Graph(G),Lst(E),[Intg(r)]) Inserts r (by default 1) new vertices to each edge/arc in G contained in the list E (which may be a single edge/arc) and returns the modified copy of G. New vertices are labelled with smallest available integers. - See also: 1/ edges + See also: 1/ edges Ex1:subdivide_edges(complete_graph(2,3),[[1,3],[1,4]],2) - + ''' return GiacMethods['subdivide_edges'](self,*args) @@ -16586,9 +16586,9 @@ cdef class GiacMethods_base: Help for subgraph: subgraph(Graph(G),Lst(E)) Returns the subgraph of G defined by the edges in list E. - See also: 1/ induced_subgraph 2/ highlight_subgraph + See also: 1/ induced_subgraph 2/ highlight_subgraph Ex1:subgraph(complete_graph(5),[[1,2],[2,3],[3,4],[4,1]]) - + ''' return GiacMethods['subgraph'](self,*args) @@ -16597,11 +16597,11 @@ cdef class GiacMethods_base: Help for subs: subs(Expr or Var=value,Var=value or Expr) Equivalent of subst except in maple_mode where the arguments are switched over, in maple_mode choose the second example. - See also: 1/ subst 2/ maple_mode 3/ algsubs 4/ () + See also: 1/ subst 2/ maple_mode 3/ algsubs 4/ () Ex1:subs(1/(4+x^2),x=2) Ex2:subs(x=2,1/(4+x^2)) Ex3: f:=1/(4+x^2);f(x=2) - + ''' return GiacMethods['subs'](self,*args) @@ -16614,7 +16614,7 @@ cdef class GiacMethods_base: Ex2:subsop([[1,2],[3,4]],[1,1]=5) Ex3:subsop([[1,2],[3,4]],1=[10,8]) Ex4:subsop([0,1,2,3],'1=NULL') - + ''' return GiacMethods['subsop'](self,*args) @@ -16623,7 +16623,7 @@ cdef class GiacMethods_base: Help for subst: subst(Expr,Var(v)=value(a)) Substitutes a value for a variable in an expression. - See also: 1/ eval 2/ algsubs 3/ subs 4/ () + See also: 1/ eval 2/ algsubs 3/ subs 4/ () Ex1:subst(1/(4+x^2),x=2) Ex2:subst(1/(x^2+y^2),x=2,y=3) Ex3:subst(1/(x^2+y^2+z^2),[x=2,y=3,z=1]) @@ -16631,7 +16631,7 @@ cdef class GiacMethods_base: Ex5:subst('integrate(sin(x^2)*x,x)',x=sqrt(t)) Ex6:subst('sum(x^(n+1)/((n+p+1)*(n+1)),n,0,inf)',n=k-1) Ex7: f:=1/(x^2+y^2;f(x=2,y=3) - + ''' return GiacMethods['subst'](self,*args) @@ -16640,7 +16640,7 @@ cdef class GiacMethods_base: Help for substituer: substituer(Expr,Var(v)=value(a)) Substitutes a value for a variable in an expression. - See also: 1/ eval 2/ algsubs 3/ subs 4/ () + See also: 1/ eval 2/ algsubs 3/ subs 4/ () Ex1:substituer(1/(4+x^2),x=2) Ex2:substituer(1/(x^2+y^2),x=2,y=3) Ex3:substituer(1/(x^2+y^2+z^2),[x=2,y=3,z=1]) @@ -16648,7 +16648,7 @@ cdef class GiacMethods_base: Ex5:substituer('integrate(sin(x^2)*x,x)',x=sqrt(t)) Ex6:substituer('sum(x^(n+1)/((n+p+1)*(n+1)),n,0,inf)',n=k-1) Ex7: f:=1/(x^2+y^2;f(x=2,y=3) - + ''' return GiacMethods['substituer'](self,*args) @@ -16657,12 +16657,12 @@ cdef class GiacMethods_base: Help for subtype: subtype(Expr) Returns 1 for a sequence,2 for a set, 10 for a polynomial and 0 otherwise. - See also: 1/ DOM_LIST 2/ type + See also: 1/ DOM_LIST 2/ type Ex1:subtype(1,2,3) Ex2:subtype(set[1,2,3]) Ex3:subtype(poly1[1,2,3]) Ex4:subtype([1,2,3]) - + ''' return GiacMethods['subtype'](self,*args) @@ -16671,7 +16671,7 @@ cdef class GiacMethods_base: Help for sum: sum(Expr,Var,VarMin(a),VarMax(b),[VarStep(p)]) Discrete sum (with 2 or 4 arguments return then sum from a to b if a<=b or of the opposite of the sum from b+1 to a-1 if a>b+1 or 0 if a=b+1) or the discrete primitive or sum of the elements of a list or a sequence. - See also: 1/ + + See also: 1/ + Ex1:sum(1/n^2,n,1,17) Ex2:sum(1/n^2,n=1..17) Ex3:sum(1/n^2,n,17,1) @@ -16682,7 +16682,7 @@ cdef class GiacMethods_base: Ex8:sum([[1,2,3,4,5,6,7,8,9],[1,2,3,4,5,6,7,8,9]]) Ex9:sum(1/(x*(x+1)),x) Ex10:sum(cos(n*x),n) - + ''' return GiacMethods['sum'](self,*args) @@ -16691,11 +16691,11 @@ cdef class GiacMethods_base: Help for sum_riemann: sum_riemann(Expr(Xpr),Lst(var1,var2)) Returns an equivalent when var1=+infinity of the sum of Xpr(var1,var2) for var2 from 1 to var1 when the sum is a Riemann sum. - See also: 1/ + See also: 1/ Ex1:sum_riemann(1/(n+k),[n,k]) Ex2:sum_riemann(n/(n^2+k),[n,k]) Ex3:sum_riemann(n/(n^2+k^2),[n,k]) - + ''' return GiacMethods['sum_riemann'](self,*args) @@ -16704,12 +16704,12 @@ cdef class GiacMethods_base: Help for suppress: suppress(Vect(L)||Str(l),Intg(n)) Returns L without the element of index n; L:=suppress(L,n) or L.suppress(n). - See also: 1/ tail 2/ mid 3/ remove 4/ insert + See also: 1/ tail 2/ mid 3/ remove 4/ insert Ex1:suppress([0,1,2,3],2) Ex2:suppress("0123",2) Ex3: L:=[0,1,2,3];L:=suppress(L,2) Ex4: L:=[0,1,2,3];L.suppress(2) - + ''' return GiacMethods['suppress'](self,*args) @@ -16718,10 +16718,10 @@ cdef class GiacMethods_base: Help for surd: surd(Expr,Intg(n)) Power 1/n. - See also: 1/ sqrt 2/ ^ + See also: 1/ sqrt 2/ ^ Ex1:surd(8,3) Ex2:surd(-8,3) - + ''' return GiacMethods['surd'](self,*args) @@ -16731,7 +16731,7 @@ cdef class GiacMethods_base: svd(Mtrx(A)) For a square numerical real matrix A, returns U orthogonal, S vector of singular values, Q orthogonal such that A=U*diag(S)*tran(Q). Ex1:svd([[1,2],[3,4]]) - + ''' return GiacMethods['svd'](self,*args) @@ -16740,9 +16740,9 @@ cdef class GiacMethods_base: Help for swapcol: swapcol(Mtrx(A),Intg(n1),Intg(n2)) Returns the matrix obtained from A by swapping the n1-th column and the n2-th column. - See also: 1/ rowSwap + See also: 1/ rowSwap Ex1:swapcol([[1,2],[3,4],[5,6]],0,1) - + ''' return GiacMethods['swapcol'](self,*args) @@ -16751,9 +16751,9 @@ cdef class GiacMethods_base: Help for swaprow: swaprow(Mtrx(A),Intg(n1),Intg(n2)) Returns the matrix obtained from A by swapping the n1-th row and the n2-th row. - See also: 1/ rowAdd 2/ colSwap + See also: 1/ rowAdd 2/ colSwap Ex1:swaprow([[1,2],[3,4],[5,6]],1,2) - + ''' return GiacMethods['swaprow'](self,*args) @@ -16762,11 +16762,11 @@ cdef class GiacMethods_base: Help for switch_axes: switch_axes([Intg(0 or 1)]) switch_axes() puts or erases the axes of the graphic-screen. - See also: 1/ gl_showaxes 2/ axes + See also: 1/ gl_showaxes 2/ axes Ex1:switch_axes() Ex2:switch_axes(0) Ex3:switch_axes(1) - + ''' return GiacMethods['switch_axes'](self,*args) @@ -16775,10 +16775,10 @@ cdef class GiacMethods_base: Help for sylvester: sylvester(Poly,Poly,Var) Sylvester matrix of two polynomials. - See also: 1/ resultant + See also: 1/ resultant Ex1:sylvester(x^2-1,x^3-1,x) Ex2:sylvester(x^3-p*x+q,3*x^2-p,x) - + ''' return GiacMethods['sylvester'](self,*args) @@ -16787,14 +16787,14 @@ cdef class GiacMethods_base: Help for symb2poly: symb2poly(Expr, LstVar or [Var]) Returns the coefficients of a polynomial with respect to the 2nd argument or if the second argument is a list the internal format of the polynomial. - See also: 1/ poly2symb 2/ r2e + See also: 1/ poly2symb 2/ r2e Ex1:symb2poly(x*3+2.1) Ex2:symb2poly(3*x*y+2*y+1,y) Ex3:symb2poly(3*x*y+2*y+1,x,y) Ex4:symb2poly(3*x*y+2*y+1,[x,y]) Ex5:symb2poly(-x^4+x*3*y+2+y^2*z,[x,y,z]) Ex6:symb2poly(-x^4+x*3*y+2+y^2*z,[x,y,z]) - + ''' return GiacMethods['symb2poly'](self,*args) @@ -16803,12 +16803,12 @@ cdef class GiacMethods_base: Help for symbol: symbol(Opt) DOM_SYMBOLIC or symbol is the type of a symbolic variable, as returned by the type command. It is also an option of the assume command. - See also: 1/ type 2/ assume 3/ DOM_INT 4/ DOM_FLOAT + See also: 1/ type 2/ assume 3/ DOM_INT 4/ DOM_FLOAT Ex1: assume(a,symbol) Ex2: assume(a,DOM_SYMBOLIC) Ex3: a:=sqrt(2);type(a) Ex4: type(2x+1) - + ''' return GiacMethods['symbol'](self,*args) @@ -16817,9 +16817,9 @@ cdef class GiacMethods_base: Help for syst2mat: syst2mat(LstLinEq,LstVar) Returns the matrix M=A|(-b) associate to the system Y=AX+b. - See also: 1/ linsolve 2/ rref + See also: 1/ linsolve 2/ rref Ex1:syst2mat([x-y=1,x+2*y],[x,y]) - + ''' return GiacMethods['syst2mat'](self,*args) @@ -16828,9 +16828,9 @@ cdef class GiacMethods_base: Help for tCollect: tCollect(Expr) Collects trigonometric expressions. - See also: 1/ texpand 2/ tlin + See also: 1/ texpand 2/ tlin Ex1:tCollect(sin(x)+cos(x)) - + ''' return GiacMethods['tCollect'](self,*args) @@ -16839,11 +16839,11 @@ cdef class GiacMethods_base: Help for tExpand: tExpand(Expr) Expands transcendental expressions. - See also: 1/ tcollect 2/ tlin 3/ lin 4/ trigexpand + See also: 1/ tcollect 2/ tlin 3/ lin 4/ trigexpand Ex1:tExpand(sin(2*x)+exp(x+y)) Ex2:tExpand(cos(x+y)) Ex3:tExpand(cos(3*x)) - + ''' return GiacMethods['tExpand'](self,*args) @@ -16852,11 +16852,11 @@ cdef class GiacMethods_base: Help for table: table(SeqEqual(index=value)) Defines an array where the indices are strings or real numbers or defines a table with a matrix. - See also: 1/ matrix 2/ convert 3/ array + See also: 1/ matrix 2/ convert 3/ array Ex1:table(3=-10,"a"=10,"b"=20,"c"=30,"d"=40) - Ex2: A:=[[0,1],[2,3]];table(A) + Ex2: A:=[[0,1],[2,3]];table(A) Ex3: B:=table([1,2]=12,[2,5]=25);matrix(B) - + ''' return GiacMethods['table'](self,*args) @@ -16865,10 +16865,10 @@ cdef class GiacMethods_base: Help for tablefunc: tablefunc(Expr,Var) Table of values of a function : you must be in a spreadsheet. - See also: 1/ tabvar 2/ tableseq + See also: 1/ tabvar 2/ tableseq Ex1:tablefunc(sin(x),x) Ex2:tablefunc(x^2-x-2,x) - + ''' return GiacMethods['tablefunc'](self,*args) @@ -16877,10 +16877,10 @@ cdef class GiacMethods_base: Help for tableseq: tableseq(Expr,(Var or LstVar),(InitVal or LstInitVal)) Table of values of a sequence (in a spreadsheet.) - See also: 1/ tablefunc + See also: 1/ tablefunc Ex1:tableseq(cos(x),x,0.0) Ex2:tableseq(x+y,[x,y],[1,1]) - + ''' return GiacMethods['tableseq'](self,*args) @@ -16889,11 +16889,11 @@ cdef class GiacMethods_base: Help for tabsign: tabsign(Expr,Var) Table of signs of a function. - See also: 1/ tablefunc 2/ tabvar + See also: 1/ tablefunc 2/ tabvar Ex1:tabsign(x^2-x,x) Ex2:tabsign(x^2,x,-3,5) Ex3:tabsign(sin(x),x) - + ''' return GiacMethods['tabsign'](self,*args) @@ -16902,13 +16902,13 @@ cdef class GiacMethods_base: Help for tabvar: tabvar(Expr,Var) Table of variations of a function with its graph on DispG. - See also: 1/ tablefunc 2/ tabsign + See also: 1/ tablefunc 2/ tabsign Ex1:tabvar(sin(x),x) Ex2:tabvar(1/ln(x^2-1),x,diff=1) Ex3:tabvar(x^2+x+1,x) Ex4:tabvar(x^2,x,-3,5) Ex5:tabvar([sin(2t),cos(3t)]) - + ''' return GiacMethods['tabvar'](self,*args) @@ -16917,11 +16917,11 @@ cdef class GiacMethods_base: Help for tail: tail(Lst or Seq or Str) Returns the list (or sequence or string) without its first element. - See also: 1/ head 2/ mid 3/ left 4/ right 5/ back + See also: 1/ head 2/ mid 3/ left 4/ right 5/ back Ex1:tail([3,2,4,1,0]) Ex2:tail(3,2,4,1,0) Ex3:tail("bonjour") - + ''' return GiacMethods['tail'](self,*args) @@ -16930,11 +16930,11 @@ cdef class GiacMethods_base: Help for tan: tan(Expr) Tangent or option of the convert or convertir command (id halftan). - See also: 1/ atan or Opt 2/ convert 3/ halftan + See also: 1/ atan or Opt 2/ convert 3/ halftan Ex1:tan(0) Ex2:tan(pi/4) Ex3: convert(tan(x),tan) - + ''' return GiacMethods['tan'](self,*args) @@ -16943,9 +16943,9 @@ cdef class GiacMethods_base: Help for tan2cossin2: tan2cossin2(Expr) Replaces tan(x) by (1-cos(2*x))/sin(2*x) in the argument. - See also: 1/ tan2sincos2 2/ tan2sincos 3/ sin2costan 4/ cos2sintan + See also: 1/ tan2sincos2 2/ tan2sincos 3/ sin2costan 4/ cos2sintan Ex1:tan2cossin2(tan(x)) - + ''' return GiacMethods['tan2cossin2'](self,*args) @@ -16954,9 +16954,9 @@ cdef class GiacMethods_base: Help for tan2sincos: tan2sincos(Expr) Replaces tan(x) by sin(x)/cos(x) in the argument. - See also: 1/ sin2costan 2/ cos2sintan 3/ tan2sincos2 4/ tan2cossin2 + See also: 1/ sin2costan 2/ cos2sintan 3/ tan2sincos2 4/ tan2cossin2 Ex1:tan2sincos(tan(x)) - + ''' return GiacMethods['tan2sincos'](self,*args) @@ -16965,9 +16965,9 @@ cdef class GiacMethods_base: Help for tan2sincos2: tan2sincos2(Expr) Replaces tan(x) by sin(2*x)/(1+cos(2*x)) in the argument. - See also: 1/ tan2cossin2 2/ tan2sincos 3/ sin2costan 4/ cos2sintan + See also: 1/ tan2cossin2 2/ tan2sincos 3/ sin2costan 4/ cos2sintan Ex1:tan2sincos2(tan(x)) - + ''' return GiacMethods['tan2sincos2'](self,*args) @@ -16976,7 +16976,7 @@ cdef class GiacMethods_base: Help for tangent: tangent(Curve(C),Pnt(A)) tangent(C,A) draws the tangents (line or plane) to C through A. - See also: 1/ LineTan 2/ droite_tangente + See also: 1/ LineTan 2/ droite_tangente Ex1:tangent(circle(i,1+i),A) Ex2:tangent(plotfunc(sin(x)),3*pi/4) Ex3:tangent(plotfunc(sin(x)),point(3*pi/4+i*sqrt(2)/2)) @@ -16985,7 +16985,7 @@ cdef class GiacMethods_base: Ex6:tangent(plotparam(3*exp(t/2)*exp(i*t),t),7) Ex7:tangent(plotpolar(3*exp(t/2),t),7) Ex8: equation(tangente([2*cos(t),2*sin(t),3*t],t)) - + ''' return GiacMethods['tangent'](self,*args) @@ -16994,7 +16994,7 @@ cdef class GiacMethods_base: Help for tangente: tangente(Curve(C),Pnt(A)) tangent(C,A) draws the tangents (line or plane) to C through A. - See also: 1/ LineTan 2/ droite_tangente + See also: 1/ LineTan 2/ droite_tangente Ex1:tangente(circle(i,1+i),A) Ex2:tangente(plotfunc(sin(x)),3*pi/4) Ex3:tangente(plotfunc(sin(x)),point(3*pi/4+i*sqrt(2)/2)) @@ -17003,7 +17003,7 @@ cdef class GiacMethods_base: Ex6:tangente(plotparam(3*exp(t/2)*exp(i*t),t),7) Ex7:tangente(plotpolar(3*exp(t/2),t),7) Ex8: equation(tangente([2*cos(t),2*sin(t),3*t],t)) - + ''' return GiacMethods['tangente'](self,*args) @@ -17012,10 +17012,10 @@ cdef class GiacMethods_base: Help for tanh: tanh(Expr) Hyperbolic tangent. - See also: 1/ atanh 2/ hyp2exp + See also: 1/ atanh 2/ hyp2exp Ex1:tanh(0) Ex2:tanh(hyp2exp(tanh(1))) - + ''' return GiacMethods['tanh'](self,*args) @@ -17024,11 +17024,11 @@ cdef class GiacMethods_base: Help for taux_accroissement: taux_accroissement(Expr,Var,Val1,(Val1+Var or Val2)) Returns the rate of change of an expression when the variable goes from Val1 to Val2 (by default Var=x). - See also: 1/ diff 2/ limit + See also: 1/ diff 2/ limit Ex1:taux_accroissement(x^2,1,1+h) Ex2:taux_accroissement(x^2,1,2) Ex3:taux_accroissement(a^2,a,1,1+h) - + ''' return GiacMethods['taux_accroissement'](self,*args) @@ -17037,7 +17037,7 @@ cdef class GiacMethods_base: Help for taylor: taylor(Expr,[Var=limit_point],[Order]) Series expansion at finite or infinite points (by default x=0, and relative order=5). - See also: 1/ series 2/ limit 3/ pade 4/ polynom + See also: 1/ series 2/ limit 3/ pade 4/ polynom Ex1:taylor(sin(x)/x,x,0) Ex2:taylor(sin(x),x=0,5,polynom) Ex3:taylor(ln(y+y^2)-ln(y),y) @@ -17045,10 +17045,10 @@ cdef class GiacMethods_base: Ex5:taylor(ln(x+x^2)-ln(x),x=0,2) Ex6:taylor(ln(x+x^2)-ln(x),x=1,2) Ex7:taylor((x^4+x+2)/(x^2+1),x,5) - Ex8:taylor(sin(t*x+t*y)+cos(t*x*t*y),t=0,6,polynom)(h=1) + Ex8:taylor(sin(t*x+t*y)+cos(t*x*t*y),t=0,6,polynom)(h=1) Ex9:taylor(sin((1+h*t)*(pi/2+k*t)),t=0,3,polynom)(t=1) Ex10:taylor((-1+k*t)^2/(1+h*t)^3,t=0,3,polynom)(t=1) - + ''' return GiacMethods['taylor'](self,*args) @@ -17057,9 +17057,9 @@ cdef class GiacMethods_base: Help for tchebyshev1: tchebyshev1(Intg(n)) Returns the n-th Tchebyshev polynomial of first kind. - See also: 1/ tchebyshev2 2/ hermite + See also: 1/ tchebyshev2 2/ hermite Ex1:tchebyshev1(3) - + ''' return GiacMethods['tchebyshev1'](self,*args) @@ -17068,9 +17068,9 @@ cdef class GiacMethods_base: Help for tchebyshev2: tchebyshev2(Intg(n)) Returns the nt-h Tchebyshev polynomial of second kind. - See also: 1/ tchebyshev1 2/ hermite + See also: 1/ tchebyshev1 2/ hermite Ex1:tchebyshev2(3) - + ''' return GiacMethods['tchebyshev2'](self,*args) @@ -17079,10 +17079,10 @@ cdef class GiacMethods_base: Help for tcoeff: tcoeff(Poly||Lst) Returns the coefficient of the term of lowest degree of a polynomial (t=trailing). - See also: 1/ lcoeff + See also: 1/ lcoeff Ex1:tcoeff(-2*x^3+x^2+7*x) Ex2:tcoeff([-2,1,7,0]) - + ''' return GiacMethods['tcoeff'](self,*args) @@ -17091,9 +17091,9 @@ cdef class GiacMethods_base: Help for tcollect: tcollect(Expr) Collects trigonometric expressions. - See also: 1/ texpand 2/ tlin + See also: 1/ texpand 2/ tlin Ex1:tcollect(sin(x)+cos(x)) - + ''' return GiacMethods['tcollect'](self,*args) @@ -17102,8 +17102,8 @@ cdef class GiacMethods_base: Help for tdeg: tdeg(Opt) Option of the gbasis or greduce command to specify an order for monomials (complete degree then lexicographic order). - See also: 1/ gbasis 2/ greduce - + See also: 1/ gbasis 2/ greduce + ''' return GiacMethods['tdeg'](self,*args) @@ -17112,9 +17112,9 @@ cdef class GiacMethods_base: Help for tensor_product: tensor_product(Seq(G1,G2,..)) Returns the tensor product of the input graphs G1, G2, ... with vertices labelled as "u:v:..." where u, v, ... are vertices from G1, G2, ..., respectively. - See also: 1/ cartesian_product + See also: 1/ cartesian_product Ex1:tensor_product(graph(trail(1,2,3,4,5,2)),star_graph(3)) - + ''' return GiacMethods['tensor_product'](self,*args) @@ -17123,10 +17123,10 @@ cdef class GiacMethods_base: Help for tetrahedron: tetrahedron(Pnt(A),Pnt(B),Pnt(C),[Pnt(D)]) Draws the regular direct pyramid ABCD with vertices A,B and a face in the plane (A,B,C) when there is 3 arguments and the pyramid ABCD when there are 4 arguments. - See also: 1/ cube 2/ cylinder 3/ icosahedron 4/ dodecahedron 5/ octahedron + See also: 1/ cube 2/ cylinder 3/ icosahedron 4/ dodecahedron 5/ octahedron Ex1:tetrahedron([0,0,0],[3,0,0],[0,1,0]) Ex2:tetrahedron([0,0,0],[3,0,0],[0,3,0],[0,0,4]) - + ''' return GiacMethods['tetrahedron'](self,*args) @@ -17135,11 +17135,11 @@ cdef class GiacMethods_base: Help for texpand: texpand(Expr) Expands transcendental expressions. - See also: 1/ tcollect 2/ tlin 3/ lin 4/ trigexpand + See also: 1/ tcollect 2/ tlin 3/ lin 4/ trigexpand Ex1:texpand(sin(2*x)+exp(x+y)) Ex2:texpand(cos(x+y)) Ex3:texpand(cos(3*x)) - + ''' return GiacMethods['texpand'](self,*args) @@ -17148,10 +17148,10 @@ cdef class GiacMethods_base: Help for thickness: thickness(Opt) Option (Maple compatibility) of a graphic command to define the thickness of lines. - See also: 1/ line_width + See also: 1/ line_width Ex1: segment(0,point(1,1),thickness=5) Ex2: segment(0,point(1,1),epaisseur=5) - + ''' return GiacMethods['thickness'](self,*args) @@ -17160,10 +17160,10 @@ cdef class GiacMethods_base: Help for threshold: threshold(Lst,Real(bound)[=Expr(repl)] or Lst[Real(lower)[=Expr(rl)],Real(upper)[=Expr(ru)]],[Fnc(compare)],[abs[=true or false]]) Performs thresholding operations on a list of real or complex numbers. - See also: 1/ max 2/ min + See also: 1/ max 2/ min Ex1:threshold([1,3,2,4,5,4,3,2,3,1],3,'>=') Ex2:threshold([-10,-5,0,5,10],7=a,abs=true) - + ''' return GiacMethods['threshold'](self,*args) @@ -17172,10 +17172,10 @@ cdef class GiacMethods_base: Help for throw: throw(Str) Generates the display of an error in a program. - See also: 1/ try 2/ catch + See also: 1/ try 2/ catch Ex1:throw("Argument should be integer") Ex2:throw("je provoque une erreur") - + ''' return GiacMethods['throw'](self,*args) @@ -17184,10 +17184,10 @@ cdef class GiacMethods_base: Help for title: title(Opt) Global option of a graphic command to put a title in a graphic. - See also: 1/ line_width + See also: 1/ line_width Ex1: title="segment";segment(0,point(1,1),epaisseur=5) Ex2: titre="segment";segment(0,point(1,1),epaisseur=5) - + ''' return GiacMethods['title'](self,*args) @@ -17196,10 +17196,10 @@ cdef class GiacMethods_base: Help for titre: titre(Opt) Global option of a graphic command to put a title in a graphic. - See also: 1/ line_width + See also: 1/ line_width Ex1: title="segment";segment(0,point(1,1),epaisseur=5) Ex2: titre="segment";segment(0,point(1,1),epaisseur=5) - + ''' return GiacMethods['titre'](self,*args) @@ -17208,10 +17208,10 @@ cdef class GiacMethods_base: Help for tlin: tlin(ExprTrig) Trigonometric linearization. - See also: 1/ texpand 2/ lin + See also: 1/ texpand 2/ lin Ex1:tlin(sin(x)^3) Ex2:tlin(cos(x)*cos(y)) - + ''' return GiacMethods['tlin'](self,*args) @@ -17220,10 +17220,10 @@ cdef class GiacMethods_base: Help for tonnetz: tonnetz(Intg(a),Intg(b),Intg(c),[Intg(d)]) Returns the graph corresponding to the [a,b,c] resp. [a,b,c,d] tone network (tonnetz) used in neo-Riemannian music theory. - See also: 1/ is_regular 2/ clique_stats + See also: 1/ is_regular 2/ clique_stats Ex1:tonnetz(3,4,5) Ex2:tonnetz(2,3,3,4) - + ''' return GiacMethods['tonnetz'](self,*args) @@ -17232,9 +17232,9 @@ cdef class GiacMethods_base: Help for topologic_sort: topologic_sort(Graph(G)) Returns the list of vertices sorted according to the topological ordering in the directed acyclic graph G. - See also: 1/ digraph 2/ is_acyclic + See also: 1/ digraph 2/ is_acyclic Ex1:topologic_sort(digraph(%{[c,a],[c,b],[c,d],[a,d],[b,d],[a,b]%})) - + ''' return GiacMethods['topologic_sort'](self,*args) @@ -17243,9 +17243,9 @@ cdef class GiacMethods_base: Help for topological_sort: topological_sort(Graph(G)) Returns the list of vertices sorted according to the topological ordering in the directed acyclic graph G. - See also: 1/ digraph 2/ is_acyclic + See also: 1/ digraph 2/ is_acyclic Ex1:topological_sort(digraph(%{[c,a],[c,b],[c,d],[a,d],[b,d],[a,b]%})) - + ''' return GiacMethods['topological_sort'](self,*args) @@ -17254,9 +17254,9 @@ cdef class GiacMethods_base: Help for torus_grid_graph: torus_grid_graph(Intg(m),Intg(n)) Returns a torus grid graph on m*n vertices, where m,n>=3. - See also: 1/ grid_graph + See also: 1/ grid_graph Ex1:torus_grid_graph(6,12) - + ''' return GiacMethods['torus_grid_graph'](self,*args) @@ -17265,9 +17265,9 @@ cdef class GiacMethods_base: Help for total_degree: total_degree(Poly(P),Lst(Vars)) Total degree of the polynomial P with respect to the second argument. - See also: 1/ valuation 2/ size 3/ degree + See also: 1/ valuation 2/ size 3/ degree Ex1:total_degree(x^3*y+x*y,[x,y]) - + ''' return GiacMethods['total_degree'](self,*args) @@ -17276,10 +17276,10 @@ cdef class GiacMethods_base: Help for tourne_droite: tourne_droite(NULL or Real(n)) The turtle turns right by n degrees (by default n=90). - See also: 1/ tourne_gauche 2/ pas_de_cote + See also: 1/ tourne_gauche 2/ pas_de_cote Ex1: tourne_droite 60 Ex2:tourne_droite(60) - + ''' return GiacMethods['tourne_droite'](self,*args) @@ -17288,10 +17288,10 @@ cdef class GiacMethods_base: Help for tourne_gauche: tourne_gauche(NULL or Real(n)) The turtle turns left by n degrees (by defaults n=90). - See also: 1/ tourne_droite + See also: 1/ tourne_droite Ex1: tourne_gauche 60 Ex2:tourne_gauche(60) - + ''' return GiacMethods['tourne_gauche'](self,*args) @@ -17304,7 +17304,7 @@ cdef class GiacMethods_base: Ex2:tpsolve([7,10,8,8,9,6],[9,6,12,8,10],[[36,40,32,43,29],[28,27,29,40,38],[34,35,41,29,31],[41,42,35,27,36],[25,28,40,34,38],[31,30,43,38,40]]) Ex3:tpsolve([95,70,165,165],[195,150,30,45,75],[[15,M,45,M,0],[12,40,M,M,0],[0,15,25,25,0],[M,0,M,12,0]]) Ex4:tpsolve([1,1,1,1],[1,1,1,1],[[10,12,9,11],[5,10,7,8],[12,14,13,11],[8,15,11,9]]) - + ''' return GiacMethods['tpsolve'](self,*args) @@ -17313,12 +17313,12 @@ cdef class GiacMethods_base: Help for trace: trace(Mtrx or GeoObj) Returns the trace of a square matrix or draws the trace of a geometric object when the parameter changes (see Trace in Menu button of a geometric level and write only one instruction on each line). - See also: 1/ det 2/ lieu + See also: 1/ det 2/ lieu Ex1:trace([[1,2,3],[1,3,6],[2,5,7]]) Ex2:trace([[1+i,2,3],[1,3,6],[2,5,9-i]]) Ex3: assume(a=[0.7,-5,5,0.1]);trace(point(a-i*a)) Ex4: assume(a=[0.7,-5,5,0.1]);trace(inter_unique(droite(y=a*x+a),droite(y=2*a*x+1))) - + ''' return GiacMethods['trace'](self,*args) @@ -17327,9 +17327,9 @@ cdef class GiacMethods_base: Help for trail: trail(Seq(V)) Returns a trail of vertices from V (inert command). - See also: 1/ graph 2/ digraph + See also: 1/ graph 2/ digraph Ex1:trail(1,2,3,4,1) - + ''' return GiacMethods['trail'](self,*args) @@ -17338,10 +17338,10 @@ cdef class GiacMethods_base: Help for trail2edges: trail2edges(Trail(T)) Converts a trail T to the list of its edges. - See also: 1/ subgraph 2/ trail + See also: 1/ subgraph 2/ trail Ex1:trail2edges(trail(1,2,3,4,1,3)) Ex2:trail2edges([1,2,3,4,1,3]) - + ''' return GiacMethods['trail2edges'](self,*args) @@ -17350,10 +17350,10 @@ cdef class GiacMethods_base: Help for trames: trames(Opt) Option of animate and animate3d commands to give the number of pictures. - See also: 1/ animate 2/ animate3d + See also: 1/ animate 2/ animate3d Ex1: animate(sin(x*t),x=-pi..pi,t=-3..3,frames=30) Ex2: animate3d(x^2+t*y^2,[x=-2..2,y=-2..2],t=-3..3,frames=10) - + ''' return GiacMethods['trames'](self,*args) @@ -17362,11 +17362,11 @@ cdef class GiacMethods_base: Help for tran: tran(Mtrx) Transposes a matrix (without conjugation). - See also: 1/ conj 2/ trn + See also: 1/ conj 2/ trn Ex1:tran([[1,2,3],[1,3,6],[2,5,7]]) Ex2:tran([[1+i,2,3],[1,3,6],[2,5,9-i]]) Ex3:tran(conj([[1+i,2,3],[1,3,6],[2,5,9-i]])) - + ''' return GiacMethods['tran'](self,*args) @@ -17375,9 +17375,9 @@ cdef class GiacMethods_base: Help for transitive_closure: transitive_closure(Graph(G),[weighted[=true||false]]) Returns the [weighted, by default false] transitive closure of G. - See also: 1/ allpairs_distance 2/ is_connected 3/ shortest_path 4/ vertex_distance + See also: 1/ allpairs_distance 2/ is_connected 3/ shortest_path 4/ vertex_distance Ex1:transitive_closure(digraph([1,2,3,4,5,6],%{[1,2],[2,3],[2,4],[4,5],[3,5]%}),weighted) - + ''' return GiacMethods['transitive_closure'](self,*args) @@ -17386,12 +17386,12 @@ cdef class GiacMethods_base: Help for translation: translation(Vect, Pnt(C)) translation(B-A,C) (resp translation([a,b,c],C)) is the translation of C in the translation of vector AB (resp [a,b,c]). - See also: 1/ rotation 2/ reflection + See also: 1/ rotation 2/ reflection Ex1:translation(1+i,i) Ex2:translation([1,1,1],point([1,2,3])) Ex3: t:=translation(1+i);t(i) Ex4: t:=translation([1,1,1]);t(point([1,2,3])) - + ''' return GiacMethods['translation'](self,*args) @@ -17400,11 +17400,11 @@ cdef class GiacMethods_base: Help for transpose: transpose(Mtrx) Transposes a matrix (without conjugation). - See also: 1/ conj 2/ trn + See also: 1/ conj 2/ trn Ex1:transpose([[1,2,3],[1,3,6],[2,5,7]]) Ex2:transpose([[1+i,2,3],[1,3,6],[2,5,9-i]]) Ex3:transpose(conj([[1+i,2,3],[1,3,6],[2,5,9-i]])) - + ''' return GiacMethods['transpose'](self,*args) @@ -17413,14 +17413,14 @@ cdef class GiacMethods_base: Help for trapeze: trapeze(Opt) Option of the plotarea command and of the area command. - See also: 1/ plotarea 2/ area + See also: 1/ plotarea 2/ area Ex1: plotarea(x^2,x=0..1,5,trapezoid) Ex2: plotarea(x^2,x=0..1,5,middle_point) Ex3: plotarea(x^2,x=0..1,5,right_rectangle) Ex4: plotarea(x^2,x=0..1,5,left_rectangle) Ex5: area(x^2,x=0..1,5,middle_point) Ex6: area(x^2,x=0..1,5,trapezoid) - + ''' return GiacMethods['trapeze'](self,*args) @@ -17429,14 +17429,14 @@ cdef class GiacMethods_base: Help for trapezoid: trapezoid(Opt) Option of the plotarea command and of the area command. - See also: 1/ plotarea 2/ area + See also: 1/ plotarea 2/ area Ex1: plotarea(x^2,x=0..1,5,trapezoid) Ex2: plotarea(x^2,x=0..1,5,middle_point) Ex3: plotarea(x^2,x=0..1,5,right_rectangle) Ex4: plotarea(x^2,x=0..1,5,left_rectangle) Ex5: area(x^2,x=0..1,5,middle_point) Ex6: area(x^2,x=0..1,5,trapezoid) - + ''' return GiacMethods['trapezoid'](self,*args) @@ -17445,13 +17445,13 @@ cdef class GiacMethods_base: Help for traveling_salesman: traveling_salesman(Graph(G),[Mtrx(M)],[opts]) Returns a Hamiltonian cycle in an unweighted graph G or solves traveling salesman problem if G is weighted (matrix M can be used for edge weights), returning a sequence containing the minimal cost and the corresponding Hamiltonian cycle. - See also: 1/ is_hamiltonian + See also: 1/ is_hamiltonian Ex1:traveling_salesman(hypercube_graph(5)) Ex2:traveling_salesman(digraph(%{[[1,2],1],[[1,3],2],[[2,3],2],[[2,4],3],[[3,2],3],[[3,4],2],[[4,1],1]%})) Ex3: M:=randmatrix(4,4,99); traveling_salesman(graph("tetrahedron"),M) Ex4: G:=set_vertex_positions(complete_graph(42),[randvector(2,1000)$(k=1..42)]); traveling_salesman(G,vertex_distance) Ex5: G:=set_vertex_positions(complete_graph(120),[randvector(2,1000)$(k=1..120)]); c,T:=traveling_salesman(G,vertex_distance,approx) - + ''' return GiacMethods['traveling_salesman'](self,*args) @@ -17460,8 +17460,8 @@ cdef class GiacMethods_base: Help for tree: tree(Opt) Option for the draw_graph command. - See also: 1/ planar 2/ spring 3/ draw_graph - + See also: 1/ planar 2/ spring 3/ draw_graph + ''' return GiacMethods['tree'](self,*args) @@ -17470,9 +17470,9 @@ cdef class GiacMethods_base: Help for tree_height: tree_height(Graph(T),Vrtx(r)) Returns the height of the tree graph T with r as the root node. - See also: 1/ is_tree 2/ random_tree + See also: 1/ is_tree 2/ random_tree Ex1:tree_height(graph(%{[1,2],[2,3],[2,4],[4,5]%}),1) - + ''' return GiacMethods['tree_height'](self,*args) @@ -17481,9 +17481,9 @@ cdef class GiacMethods_base: Help for tri: tri(Expr(x)) Returns the value of the triangle function at x. - See also: 1/ rect 2/ Heaviside + See also: 1/ rect 2/ Heaviside Ex1:tri(x-1) - + ''' return GiacMethods['tri'](self,*args) @@ -17492,11 +17492,11 @@ cdef class GiacMethods_base: Help for triangle: triangle((Pnt or Cplx),(Pnt or Cplx),(Pnt or Cplx)) triangle(A,B,C) draws the triangle ABC. - See also: 1/ equilateral_triangle 2/ isosceles_triangle 3/ right_triangle + See also: 1/ equilateral_triangle 2/ isosceles_triangle 3/ right_triangle Ex1:triangle(point(1+i),1,0) Ex2:triangle(0,1,1+i) Ex3:triangle(point(0,0,0),point(3,3,3),point(0,3,3)) - + ''' return GiacMethods['triangle'](self,*args) @@ -17509,7 +17509,7 @@ cdef class GiacMethods_base: Ex2:triangle_paper(1,pi/3,sqrt(3)/2,x=-1..4,y=-2..2) Ex3:triangle_paper(papier_triangule(1,pi/3,sqrt(3)/2,x=-2..6,y=-4*sqrt(3)..4*sqrt(3))) Ex4:triangle_paper(0.5,3*pi/4,0.5) - + ''' return GiacMethods['triangle_paper'](self,*args) @@ -17518,12 +17518,12 @@ cdef class GiacMethods_base: Help for triangle_plein: triangle_plein(Real(a),[Real(b)],[Real(t)]) Draws a full direct triangle with sides a,b and with angle t, from the turtle position (by default t=90 or (b=a and t=60)). - See also: 1/ rectangle_plein + See also: 1/ rectangle_plein Ex1: triangle_plein 30 Ex2:triangle_plein(30) Ex3:triangle_plein(30,40) Ex4:triangle_plein(30,40,60) - + ''' return GiacMethods['triangle_plein'](self,*args) @@ -17532,10 +17532,10 @@ cdef class GiacMethods_base: Help for triangle_point: triangle_point(Opt) Option of the display command for a point. - See also: 1/ display + See also: 1/ display Ex1: F:=display(point(2+1.5*i),point_point) Ex2: F:=display(point(2+1.5*i),rhombus_point) - + ''' return GiacMethods['triangle_point'](self,*args) @@ -17544,9 +17544,9 @@ cdef class GiacMethods_base: Help for triangle_window: triangle_window(Lst,[Intg(d)],[Interval(n1..n2)]) Applies the triangular windowing function with parameter d in {-1,0,1} (by default L=0) to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ bartlett_hann_window 13/ tukey_window 14/ welch_window + See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ bartlett_hann_window 13/ tukey_window 14/ welch_window Ex1: scatterplot(triangle_window(randvector(1000,0..1),1)) - + ''' return GiacMethods['triangle_window'](self,*args) @@ -17555,9 +17555,9 @@ cdef class GiacMethods_base: Help for trig2exp: trig2exp(Expr) Replaces in the argument the trigonometric functions by complex exponentials without linearisation. - See also: 1/ exp2trig 2/ atrig2ln + See also: 1/ exp2trig 2/ atrig2ln Ex1:trig2exp(sin(x)) - + ''' return GiacMethods['trig2exp'](self,*args) @@ -17566,9 +17566,9 @@ cdef class GiacMethods_base: Help for trigcos: trigcos(Expr) Simplifies the argument with the formulas sin(x)^2+cos(x)^2=1 and tan(x)=sin(x)/cos(x) privileging cosine. - See also: 1/ trigsin 2/ trigtan + See also: 1/ trigsin 2/ trigtan Ex1:trigcos(sin(x)^4+sin(x)^2) - + ''' return GiacMethods['trigcos'](self,*args) @@ -17577,9 +17577,9 @@ cdef class GiacMethods_base: Help for trigexpand: trigexpand(Expr) Expands trigonometric functions. - See also: 1/ texpand 2/ lnexpand 3/ expexpand + See also: 1/ texpand 2/ lnexpand 3/ expexpand Ex1:trigexpand(sin(3*x)) - + ''' return GiacMethods['trigexpand'](self,*args) @@ -17588,10 +17588,10 @@ cdef class GiacMethods_base: Help for triginterp: triginterp(List,Var=xmin..xmax) Returns a trigonometric polynomial interpolation (with respect to variable x) of the points with ordinate given in list y and the abscissa equally spaced between a and b. - See also: 1/ lagrange 2/ thiele + See also: 1/ lagrange 2/ thiele Ex1:triginterp([11,10,17,24,32,26,23,19],x=0..21) Ex2:triginterp([11,10,17,24,32,26,23,19],0,21,x) - + ''' return GiacMethods['triginterp'](self,*args) @@ -17600,9 +17600,9 @@ cdef class GiacMethods_base: Help for trigsimplify: trigsimplify(Expr) Simplifies a trigonometric expression. - See also: 1/ simplify + See also: 1/ simplify Ex1:trigsimplify(3*sin(x)-4*sin(x)^3) - + ''' return GiacMethods['trigsimplify'](self,*args) @@ -17611,9 +17611,9 @@ cdef class GiacMethods_base: Help for trigsin: trigsin(Expr) Simplifies the argument with the formulas sin(x)^2+cos(x)^2=1 and tan(x)=sin(x)/cos(x) privileging sine. - See also: 1/ trigcos 2/ trigtan + See also: 1/ trigcos 2/ trigtan Ex1:trigsin(cos(x)^4+sin(x)^2) - + ''' return GiacMethods['trigsin'](self,*args) @@ -17622,9 +17622,9 @@ cdef class GiacMethods_base: Help for trigtan: trigtan(Expr) Simplifies the argument with the formulas sin(x)^2+cos(x)^2=1 and tan(x)=sin(x)/cos(x) privileging tangent. - See also: 1/ trigsin 2/ trigcos + See also: 1/ trigsin 2/ trigcos Ex1:trigtan(cos(x)^4+sin(x)^2) - + ''' return GiacMethods['trigtan'](self,*args) @@ -17633,9 +17633,9 @@ cdef class GiacMethods_base: Help for trn: trn(Mtrx) Returns the adjoint matrix of A =tran(conj(A)). - See also: 1/ tran 2/ conj + See also: 1/ tran 2/ conj Ex1:trn([[1,2+i],[3,4]]) - + ''' return GiacMethods['trn'](self,*args) @@ -17644,9 +17644,9 @@ cdef class GiacMethods_base: Help for true: true() Boolean equal to true or 1. - See also: 1/ false + See also: 1/ false Ex1: a:=true - + ''' return GiacMethods['true'](self,*args) @@ -17655,13 +17655,13 @@ cdef class GiacMethods_base: Help for trunc: trunc(Real||LstReal,Int(n)) Truncates value to n decimal places (by default n=0). Accepts complex numbers.(type=DOM_COMPLEX or DOM_FLOAT). - See also: 1/ fPart 2/ floor 3/ iPart + See also: 1/ fPart 2/ floor 3/ iPart Ex1:trunc(4.3) Ex2:trunc(sqrt(2),3) Ex3:trunc([4.3333,sqrt(2)]) Ex4:trunc([4.3333,sqrt(2)],2) Ex5:trunc(sqrt(2)+i*sqrt(5),4) - + ''' return GiacMethods['trunc'](self,*args) @@ -17670,9 +17670,9 @@ cdef class GiacMethods_base: Help for truncate: truncate(Poly(P),Intg(n)) Truncates the polynomial P at order n. - See also: 1/ series + See also: 1/ series Ex1:truncate((x^2+x)^2,3) - + ''' return GiacMethods['truncate'](self,*args) @@ -17681,9 +17681,9 @@ cdef class GiacMethods_base: Help for truncate_graph: truncate_graph(Graph(G)) Returns the graph obtained by truncating the biconnected planar graph G. - See also: 1/ is_biconnected 2/ is_planar 3/ plane_dual + See also: 1/ is_biconnected 2/ is_planar 3/ plane_dual Ex1:truncate_graph(graph("tetrahedron")) - + ''' return GiacMethods['truncate_graph'](self,*args) @@ -17692,9 +17692,9 @@ cdef class GiacMethods_base: Help for tsimplify: tsimplify(Expr) Lowers the number of non rational variables. - See also: 1/ simplify + See also: 1/ simplify Ex1:tsimplify(exp(2*x)+exp(x)) - + ''' return GiacMethods['tsimplify'](self,*args) @@ -17703,9 +17703,9 @@ cdef class GiacMethods_base: Help for tuer: tuer(NULL) Stop step-by-step execution of a program (with debug). - See also: 1/ + See also: 1/ Ex1:tuer() - + ''' return GiacMethods['tuer'](self,*args) @@ -17714,9 +17714,9 @@ cdef class GiacMethods_base: Help for tukey_window: tukey_window(Lst,[Real(a)],[Interval(n1..n2)]) Applies the Tukey windowing function with parameter a in [0,1] (by default a=0.5) to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ bartlett_hann_window 14/ welch_window + See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ bartlett_hann_window 14/ welch_window Ex1: scatterplot(tukey_window(randvector(1000,0..1),0.4)) - + ''' return GiacMethods['tukey_window'](self,*args) @@ -17725,10 +17725,10 @@ cdef class GiacMethods_base: Help for tutte_polynomial: tutte_polynomial(Graph(G),[Var(x),Var(y)]) Returns the Tutte polynomial [or its value at point (x,y)] of undirected graph G. If G is weighted, all weights must be positive integers and are interpreted as edge multiplicities. - See also: 1/ chromatic_polynomial 2/ flow_polynomial 3/ reliability_polynomial 4/ delete_edge 5/ contract_edge + See also: 1/ chromatic_polynomial 2/ flow_polynomial 3/ reliability_polynomial 4/ delete_edge 5/ contract_edge Ex1:tutte_polynomial(graph("tetrahedron")) Ex2:tutte_polynomial(graph("tetrahedron"),1,1) - + ''' return GiacMethods['tutte_polynomial'](self,*args) @@ -17737,9 +17737,9 @@ cdef class GiacMethods_base: Help for two_edge_connected_components: two_edge_connected_components(Graph(G)) Returns the list of two-edge-connected components of undirected graph G, each of them represented by the list of its vertices. - See also: 1/ is_two_edge_connected 2/ connected_components + See also: 1/ is_two_edge_connected 2/ connected_components Ex1:two_edge_connected_components(graph(trail(1,2,3,4,5,3,1),trail(5,6,7,8,6))) - + ''' return GiacMethods['two_edge_connected_components'](self,*args) @@ -17748,9 +17748,9 @@ cdef class GiacMethods_base: Help for ufactor: ufactor(Unit,Unit) Factors a unit in a unit object. - See also: 1/ convert 2/ mksa 3/ usimplify + See also: 1/ convert 2/ mksa 3/ usimplify Ex1:ufactor(100_C,1_A) - + ''' return GiacMethods['ufactor'](self,*args) @@ -17759,10 +17759,10 @@ cdef class GiacMethods_base: Help for ugamma: ugamma(Real(a),Real(x),[1]) Calculates ugamma function at a point (a,x):if a and x>=0 ugamma(a,x)=int(e^{-t}*t^{a-1},t=x..inf),(ugamma(a,x)+igamma(a,x)=Gamma(a)). - See also: 1/ Psi 2/ Beta 3/ Gamma 4/ igamma + See also: 1/ Psi 2/ Beta 3/ Gamma 4/ igamma Ex1:ugamma(5.0,2.0) Ex2:ugamma(-5.1,2.1) - + ''' return GiacMethods['ugamma'](self,*args) @@ -17771,10 +17771,10 @@ cdef class GiacMethods_base: Help for unapply: unapply(Expr,Var) Returns a function defined by an expression. - See also: 1/ apply + See also: 1/ apply Ex1:unapply(2*x^2,x) Ex2: f(x):=x*exp(x);g:=unapply(diff(f(x),x),x) - + ''' return GiacMethods['unapply'](self,*args) @@ -17783,10 +17783,10 @@ cdef class GiacMethods_base: Help for unarchive: unarchive(Str(namefich),Seq(Var)) Reads the value of a variable or of a list of variables which are in the file given as argument (file created with archive). - See also: 1/ archive 2/ Archive 3/ Unarchiv + See also: 1/ archive 2/ Archive 3/ Unarchiv Ex1:unarchive("toto") Ex2:unarchive("aa.txt") - + ''' return GiacMethods['unarchive'](self,*args) @@ -17795,9 +17795,9 @@ cdef class GiacMethods_base: Help for underlying_graph: underlying_graph(Graph(G)) Returns the graph obtained by stripping directions and weights from arcs (pairs of arcs connecting the same vertices are merged to a single edge). - See also: 1/ is_directed 2/ is_weighted 3/ make_directed 4/ make_weighted + See also: 1/ is_directed 2/ is_weighted 3/ make_directed 4/ make_weighted Ex1:underlying_graph(digraph(trail(1,2,3,4,1))) - + ''' return GiacMethods['underlying_graph'](self,*args) @@ -17806,13 +17806,13 @@ cdef class GiacMethods_base: Help for unfactored: unfactored(Opt.) Option of the plotimplicit command. - See also: 1/ plotimplicit + See also: 1/ plotimplicit Ex1: plotimplicit(x^2+y^2-1,x,y,unfactored) Ex2: plotimplicit(x^2+y^2-1,[x,y],unfactored) Ex3: plotimplicit(x^2+y^2+z^2-1,x,y,z,xstep=0.2,ystep=0.2,zstep=0.2,unfactored) Ex4: plotimplicit(x^2+y^2+z^2-1,[x,y,z],xstep=0.2,ystep=0.2,zstep=0.2,unfactored) Ex5: plotimplicit(x^2+y^2+z^2-1,x=0..1,y=0..1,z=0..1,xstep=0.2,ystep=0.2,zstep=0.2,unfactored) - + ''' return GiacMethods['unfactored'](self,*args) @@ -17821,12 +17821,12 @@ cdef class GiacMethods_base: Help for uniform: uniform(Real(a),Real(b),Real(x)) Returns the probability density at x of the uniform law on [a,b]. - See also: 1/ uniform_cdf 2/ uniform_icdf 3/ randvector 4/ ranm + See also: 1/ uniform_cdf 2/ uniform_icdf 3/ randvector 4/ ranm Ex1:uniform(2,5,4) Ex2:uniform(1.2,3.5,3) Ex3: randvector(3,uniform,1.2,3.5) Ex4: ranm(4,3,uniform,1.2,3.5) - + ''' return GiacMethods['uniform'](self,*args) @@ -17835,10 +17835,10 @@ cdef class GiacMethods_base: Help for uniform_cdf: uniform_cdf(Real(a),Real(b),Real(x0),[Real(y0)]) Returns the probability that a uniform random variable on [a,b] is less than x0 (or between x0 and y0). - See also: 1/ uniformd 2/ uniform_icdf + See also: 1/ uniformd 2/ uniform_icdf Ex1:uniform_cdf(3.2,5.7,4.4) Ex2:uniform_cdf(3.2,5.7,4.4,5.4) - + ''' return GiacMethods['uniform_cdf'](self,*args) @@ -17847,10 +17847,10 @@ cdef class GiacMethods_base: Help for uniform_icdf: uniform_icdf(Real(a),Real(b),Real(p)) Returns h such that the probability that a uniform random variable on [a,b] is less than h is p (0<=p<=1). - See also: 1/ uniform_cdf 2/ uniformd + See also: 1/ uniform_cdf 2/ uniformd Ex1:uniform_icdf(4.2,10.3,0.95) Ex2:uniform_icdf(3.2,5.7,0.48) - + ''' return GiacMethods['uniform_icdf'](self,*args) @@ -17859,12 +17859,12 @@ cdef class GiacMethods_base: Help for uniformd: uniformd(Real(a),Real(b),Real(x)) Returns the probability density at x of the uniform law on [a,b]. - See also: 1/ uniform_cdf 2/ uniform_icdf 3/ randvector 4/ ranm + See also: 1/ uniform_cdf 2/ uniform_icdf 3/ randvector 4/ ranm Ex1:uniformd(2,5,4) Ex2:uniformd(1.2,3.5,3) Ex3: randvector(3,uniform,1.2,3.5) Ex4: ranm(4,3,uniform,1.2,3.5) - + ''' return GiacMethods['uniformd'](self,*args) @@ -17873,10 +17873,10 @@ cdef class GiacMethods_base: Help for uniformd_cdf: uniformd_cdf(Real(a),Real(b),Real(x0),[Real(y0)]) Returns the probability that a uniform random variable on [a,b] is less than x0 (or between x0 and y0). - See also: 1/ uniformd 2/ uniform_icdf + See also: 1/ uniformd 2/ uniform_icdf Ex1:uniformd_cdf(3.2,5.7,4.4) Ex2:uniformd_cdf(3.2,5.7,4.4,5.4) - + ''' return GiacMethods['uniformd_cdf'](self,*args) @@ -17885,10 +17885,10 @@ cdef class GiacMethods_base: Help for uniformd_icdf: uniformd_icdf(Real(a),Real(b),Real(p)) Returns h such that the probability that a uniform random variable on [a,b] is less than h is p (0<=p<=1). - See also: 1/ uniform_cdf 2/ uniformd + See also: 1/ uniform_cdf 2/ uniformd Ex1:uniformd_icdf(4.2,10.3,0.95) Ex2:uniformd_icdf(3.2,5.7,0.48) - + ''' return GiacMethods['uniformd_icdf'](self,*args) @@ -17897,12 +17897,12 @@ cdef class GiacMethods_base: Help for unitV: unitV(Lst||Cplx) Returns the vector divided by its l2norm. It is also an option for plotfield. - See also: 1/ l2norm + See also: 1/ l2norm Ex1:unitV(3+4*i) Ex2:unitV([3,4]) Ex3: fieldplot(-t*y,[t,y],normalize) Ex4: fieldplot(-t*y,[t,y],normalize,xstep=0.5,ystep=0.5) - + ''' return GiacMethods['unitV'](self,*args) @@ -17911,9 +17911,9 @@ cdef class GiacMethods_base: Help for unquote: unquote(Expr) Evaluates a quoted expression (for example purge(c);a:=c;unquote(a):=3; put 3 in the variables a and c). - See also: 1/ quote + See also: 1/ quote Ex1:unquote(a) - + ''' return GiacMethods['unquote'](self,*args) @@ -17922,10 +17922,10 @@ cdef class GiacMethods_base: Help for upper: upper(Mtrx||Strng) Returns the upper triangular matrix (over the diagonal, included) or writes a string in uppercase. - See also: 1/ diag 2/ lower + See also: 1/ diag 2/ lower Ex1:upper([[1,2,3],[4,5,6],[7,8,9]]) Ex2:upper("hello") - + ''' return GiacMethods['upper'](self,*args) @@ -17934,10 +17934,10 @@ cdef class GiacMethods_base: Help for user_operator: user_operator(Str(R),Fnc(f),Opt(Binary||Unary||Delete)) Defines a binary operator and returns 0 (failure) or 1(success). - See also: 1/ + See also: 1/ Ex1:user_operator("R",(x,y)->x*y+x+y,Binary) Ex2:user_operator("R",(x,y)->x*y+x+y,Delete) - + ''' return GiacMethods['user_operator'](self,*args) @@ -17946,9 +17946,9 @@ cdef class GiacMethods_base: Help for usimplify: usimplify(Unit) Simplifies a unit in a unit object. - See also: 1/ convert 2/ mksa 3/ ufactor + See also: 1/ convert 2/ mksa 3/ ufactor Ex1:usimplify(100_(W*s)) - + ''' return GiacMethods['usimplify'](self,*args) @@ -17957,12 +17957,12 @@ cdef class GiacMethods_base: Help for valuation: valuation(Poly(P)) Returns the valuation (degree of the term of lowest degree) of the polynomial P. - See also: 1/ degree 2/ tcoeff + See also: 1/ degree 2/ tcoeff Ex1:valuation(x^4+x^3) Ex2:valuation([1,1,0,0,0]) Ex3:valuation(x^5+3*x^2) Ex4:valuation([5,0,0,3,0,0]) - + ''' return GiacMethods['valuation'](self,*args) @@ -17971,9 +17971,9 @@ cdef class GiacMethods_base: Help for vandermonde: vandermonde(Vect(V)) Returns the Vandermonde matrix=[V^0,V^1,..]. - See also: 1/ det + See also: 1/ det Ex1:vandermonde([1,2,a]) - + ''' return GiacMethods['vandermonde'](self,*args) @@ -17982,10 +17982,10 @@ cdef class GiacMethods_base: Help for variables_are_files: variables_are_files(:=Intg(0 or 1)) Pseudo-variable to specify if you want to save the variables as file "nameofthevariable.cas". - See also: 1/ cas_setup + See also: 1/ cas_setup Ex1: variables_are_files:=1 Ex2: variables_are_files:=0 - + ''' return GiacMethods['variables_are_files'](self,*args) @@ -17994,11 +17994,11 @@ cdef class GiacMethods_base: Help for variance: variance(Lst||Mtrx,[Lst]) Returns the variance of a list with the second argument as weights or the list of variances of the columns of a matrix. - See also: 1/ stddev 2/ mean + See also: 1/ stddev 2/ mean Ex1:variance([3,4,2]) Ex2:variance([1,2,3],[1,2,1]) Ex3:variance([[1,2,3],[5,6,7]]) - + ''' return GiacMethods['variance'](self,*args) @@ -18007,9 +18007,9 @@ cdef class GiacMethods_base: Help for version: version(NULL) Returns the giac version number; for example, you are using : giac 0.4.0 - See also: 1/ + See also: 1/ Ex1:version() - + ''' return GiacMethods['version'](self,*args) @@ -18018,11 +18018,11 @@ cdef class GiacMethods_base: Help for vertex_connectivity: vertex_connectivity(Graph(G)) Returns the largest integer k such that undirected connected graph G remains connected when fewer than k vertices are removed. - See also: 1/ edge_connectivity 2/ is_connected + See also: 1/ edge_connectivity 2/ is_connected Ex1:vertex_connectivity(graph("petersen")) Ex2:vertex_connectivity(graph("clebsch")) Ex3:vertex_connectivity(complete_graph(5)) - + ''' return GiacMethods['vertex_connectivity'](self,*args) @@ -18031,9 +18031,9 @@ cdef class GiacMethods_base: Help for vertex_degree: vertex_degree(Graph(G),Vrtx(v)) Returns the degree of the vertex v in G (i.e. the number of edges incident to v). - See also: 1/ degree_sequence 2/ is_regular 3/ maximum_degree 4/ minimum_degree 5/ vertex_in_degree 6/ vertex_out_degree + See also: 1/ degree_sequence 2/ is_regular 3/ maximum_degree 4/ minimum_degree 5/ vertex_in_degree 6/ vertex_out_degree Ex1:vertex_degree(digraph(trail(1,2,3,4,2)),2) - + ''' return GiacMethods['vertex_degree'](self,*args) @@ -18042,10 +18042,10 @@ cdef class GiacMethods_base: Help for vertex_distance: vertex_distance(Graph(G),Vrtx(s),Vrtx(t)||Lst(T)) Returns the number of edges in the shortest path from vertex s to vertex t in G. If such path does not exist, returns +infinity. For vector T of vertices from G returns the list of distances from s to each vertex t in T. - See also: 1/ allpairs_distance 2/ graph_diameter 3/ dijkstra 4/ shortest_path + See also: 1/ allpairs_distance 2/ graph_diameter 3/ dijkstra 4/ shortest_path Ex1:vertex_distance(graph("petersen"),1,4) Ex2:vertex_distance(graph("petersen"),1,[2,4]) - + ''' return GiacMethods['vertex_distance'](self,*args) @@ -18054,9 +18054,9 @@ cdef class GiacMethods_base: Help for vertex_in_degree: vertex_in_degree(Graph(G),Vrtx(v)) Returns the number of arcs in G entering the vertex v. - See also: 1/ degree_sequence 2/ is_regular 3/ maximum_degree 4/ minimum_degree 5/ vertex_degree 6/ vertex_out_degree + See also: 1/ degree_sequence 2/ is_regular 3/ maximum_degree 4/ minimum_degree 5/ vertex_degree 6/ vertex_out_degree Ex1:vertex_in_degree(digraph(trail(1,2,3,4,2)),2) - + ''' return GiacMethods['vertex_in_degree'](self,*args) @@ -18065,9 +18065,9 @@ cdef class GiacMethods_base: Help for vertex_out_degree: vertex_out_degree(Graph(G),Vrtx(v)) Returns the number of arcs in G emanating from the vertex v. - See also: 1/ degree_sequence 2/ is_regular 3/ maximum_degree 4/ minimum_degree 5/ vertex_degree 6/ vertex_in_degree + See also: 1/ degree_sequence 2/ is_regular 3/ maximum_degree 4/ minimum_degree 5/ vertex_degree 6/ vertex_in_degree Ex1:vertex_out_degree(digraph(trail(1,2,3,4,2)),2) - + ''' return GiacMethods['vertex_out_degree'](self,*args) @@ -18076,11 +18076,11 @@ cdef class GiacMethods_base: Help for vertices: vertices(Polygon or Polyedr(P)) Returns the list of the vertices of the polygon or polyhedron P. - See also: 1/ isosceles_triangle 2/ polyhedron + See also: 1/ isosceles_triangle 2/ polyhedron Ex1:vertices(isosceles_triangle(0,1,pi/4)) Ex2:vertices(polyhedron([0,0,0],[0,5,0],[0,0,5],[1,2,6])) Ex3:vertices(isosceles_triangle(0,1,pi/4))[2] - + ''' return GiacMethods['vertices'](self,*args) @@ -18089,11 +18089,11 @@ cdef class GiacMethods_base: Help for vertices_abc: vertices_abc(Polygon or Polyedr(P)) Returns the list of the vertices of the polygon or polyhedron P. - See also: 1/ isosceles_triangle 2/ polyhedron + See also: 1/ isosceles_triangle 2/ polyhedron Ex1:vertices_abc(isosceles_triangle(0,1,pi/4)) Ex2:vertices_abc(polyhedron([0,0,0],[0,5,0],[0,0,5],[1,2,6])) Ex3:vertices_abc(isosceles_triangle(0,1,pi/4))[2] - + ''' return GiacMethods['vertices_abc'](self,*args) @@ -18102,11 +18102,11 @@ cdef class GiacMethods_base: Help for vertices_abca: vertices_abca(Polygon or Polyedr(P)) Returns the closed list [A,B,...A] of the vertices of the polygon or polyhedron P. - See also: 1/ isosceles_triangle 2/ polyhedron + See also: 1/ isosceles_triangle 2/ polyhedron Ex1:vertices_abca(isosceles_triangle(0,1,pi/4)) Ex2:vertices_abca(polyhedron([0,0,0],[0,5,0],[0,0,5],[1,2,6])) Ex3:vertices_abca(isosceles_triangle(0,1,pi/4))[2] - + ''' return GiacMethods['vertices_abca'](self,*args) @@ -18115,9 +18115,9 @@ cdef class GiacMethods_base: Help for vpotential: vpotential(Vect(V),LstVar) Returns U such that curl(U)=V. - See also: 1/ curl 2/ potential + See also: 1/ curl 2/ potential Ex1:vpotential([2*x*y+3,x^2-4*z,-2*y*z],[x,y,z]) - + ''' return GiacMethods['vpotential'](self,*args) @@ -18126,9 +18126,9 @@ cdef class GiacMethods_base: Help for web_graph: web_graph(Intg(a),Intg(b)) Returns a web graph on a*b vertices, where a>=3 and b>=2. - See also: 1/ prism_graph 2/ wheel_graph + See also: 1/ prism_graph 2/ wheel_graph Ex1:web_graph(5,3) - + ''' return GiacMethods['web_graph'](self,*args) @@ -18137,11 +18137,11 @@ cdef class GiacMethods_base: Help for weibull: weibull(Real(k),Real(lambda),Real(theta),Real(x)) Returns the density of probability at x of the Weibull law with parameters k, lambda, theta (by default theta=0). - See also: 1/ weibull_cdf 2/ weibull_icdf + See also: 1/ weibull_cdf 2/ weibull_icdf Ex1:weibull(2.1,1.2,1.3) Ex2:weibull(2.1,1.2,0.0,1.3) Ex3:weibull(2.1,1.2,0.5,1.8) - + ''' return GiacMethods['weibull'](self,*args) @@ -18150,13 +18150,13 @@ cdef class GiacMethods_base: Help for weibull_cdf: weibull_cdf(Real(k),Real(lambda),Real(theta),Real(x0)) Returns the probability that a Weibull random variable of parameters k, lambda, theta is less than x0. - See also: 1/ weibulld 2/ weibull_icdf + See also: 1/ weibulld 2/ weibull_icdf Ex1:weibull_cdf(2.1,1.2,1.9) Ex2:weibull_cdf(2.1,1.2,0.0,1.9) Ex3:weibull_cdf(2.2,1.5,0.4,1.9) Ex4:weibull_cdf(2.2,1.5,0.4,1.2) Ex5:weibull_cdf(2.2,1.5,0.4,1.2,1.9) - + ''' return GiacMethods['weibull_cdf'](self,*args) @@ -18165,10 +18165,10 @@ cdef class GiacMethods_base: Help for weibull_icdf: weibull_icdf(Real(k),Real(lambda),Real(theta),Real(p)) Returns h such that the probability that a Weibull random variable of parameters k, lambda, theta is less than h is p (0<=p<=1). - See also: 1/ weibull_cdf 2/ weibull + See also: 1/ weibull_cdf 2/ weibull Ex1:weibull_icdf(4.2,1.3,0.0,0.95) Ex2:weibull_icdf(2.2,1.5,0.4,0.632) - + ''' return GiacMethods['weibull_icdf'](self,*args) @@ -18177,11 +18177,11 @@ cdef class GiacMethods_base: Help for weibulld: weibulld(Real(k),Real(lambda),Real(theta),Real(x)) Returns the density of probability at x of the Weibull law with parameters k, lambda, theta (by default theta=0). - See also: 1/ weibull_cdf 2/ weibull_icdf + See also: 1/ weibull_cdf 2/ weibull_icdf Ex1:weibulld(2.1,1.2,1.3) Ex2:weibulld(2.1,1.2,0.0,1.3) Ex3:weibulld(2.1,1.2,0.5,1.8) - + ''' return GiacMethods['weibulld'](self,*args) @@ -18190,13 +18190,13 @@ cdef class GiacMethods_base: Help for weibulld_cdf: weibulld_cdf(Real(k),Real(lambda),Real(theta),Real(x0)) Returns the probability that a Weibull random variable of parameters k, lambda, theta is less than x0. - See also: 1/ weibulld 2/ weibull_icdf + See also: 1/ weibulld 2/ weibull_icdf Ex1:weibulld_cdf(2.1,1.2,1.9) Ex2:weibulld_cdf(2.1,1.2,0.0,1.9) Ex3:weibulld_cdf(2.2,1.5,0.4,1.9) Ex4:weibulld_cdf(2.2,1.5,0.4,1.2) Ex5:weibulld_cdf(2.2,1.5,0.4,1.2,1.9) - + ''' return GiacMethods['weibulld_cdf'](self,*args) @@ -18205,10 +18205,10 @@ cdef class GiacMethods_base: Help for weibulld_icdf: weibulld_icdf(Real(k),Real(lambda),Real(theta),Real(p)) Returns h such that the probability that a Weibull random variable of parameters k, lambda, theta is less than h is p (0<=p<=1). - See also: 1/ weibull_cdf 2/ weibull + See also: 1/ weibull_cdf 2/ weibull Ex1:weibulld_icdf(4.2,1.3,0.0,0.95) Ex2:weibulld_icdf(2.2,1.5,0.4,0.632) - + ''' return GiacMethods['weibulld_icdf'](self,*args) @@ -18217,10 +18217,10 @@ cdef class GiacMethods_base: Help for weibullvariate: weibullvariate(Real(a),Real(b)) Returns a random real according to the Weibull distribution with parameters a>0 and b>0. - See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector + See also: 1/ rand 2/ randpoly 3/ randnorm 4/ randvector Ex1:weibullvariate(1,2) Ex2:weibullvariate(1.5,4) - + ''' return GiacMethods['weibullvariate'](self,*args) @@ -18229,9 +18229,9 @@ cdef class GiacMethods_base: Help for weight_matrix: weight_matrix(Graph(G)) Returns the weight matrix of G. - See also: 1/ set_edge_weight 2/ get_edge_weights 3/ is_weighted 4/ make_weighted 5/ assign_edge_weights + See also: 1/ set_edge_weight 2/ get_edge_weights 3/ is_weighted 4/ make_weighted 5/ assign_edge_weights Ex1:weight_matrix(graph(%{[[1,2],2],[[2,3],1]%}) - + ''' return GiacMethods['weight_matrix'](self,*args) @@ -18240,8 +18240,8 @@ cdef class GiacMethods_base: Help for weighted: weighted(Opt) Option for graph and digraph commands. - See also: 1/ directed 2/ graph 3/ digraph - + See also: 1/ directed 2/ graph 3/ digraph + ''' return GiacMethods['weighted'](self,*args) @@ -18250,8 +18250,8 @@ cdef class GiacMethods_base: Help for weights: weights(Opt) Option for the edges command. - See also: 1/ edges - + See also: 1/ edges + ''' return GiacMethods['weights'](self,*args) @@ -18260,9 +18260,9 @@ cdef class GiacMethods_base: Help for welch_window: welch_window(Lst,[Interval(n1..n2)]) Applies the Welch windowing function to the given signal u (or to the elements with indices between n1 and n2) and returns the result in a new list. - See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ bartlett_hann_window + See also: 1/ blackman_harris_window 2/ blackman_window 3/ bohman_window 4/ cosine_window 5/ gaussian_window 6/ hamming_window 7/ hann_poisson_window 8/ hann_window 9/ parzen_window 10/ poisson_window 11/ riemann_window 12/ triangle_window 13/ tukey_window 14/ bartlett_hann_window Ex1: scatterplot(welch_window(randvector(1000,0..1))) - + ''' return GiacMethods['welch_window'](self,*args) @@ -18271,9 +18271,9 @@ cdef class GiacMethods_base: Help for wheel_graph: wheel_graph(Intg(n)) Returns a wheel graph with n+1 vertices. - See also: 1/ star_graph 2/ web_graph + See also: 1/ star_graph 2/ web_graph Ex1:wheel_graph(5) - + ''' return GiacMethods['wheel_graph'](self,*args) @@ -18282,11 +18282,11 @@ cdef class GiacMethods_base: Help for widget_size: widget_size(Intg(n)) Changes the character sizes of the display on the xcas screen (size=n) and with more parameters define the general configuration. - See also: 1/ cas_setup + See also: 1/ cas_setup Ex1:widget_size(20) Ex2:widget_size(8) Ex3:widget_size(20,58,49,697,563,1,1,0) - + ''' return GiacMethods['widget_size'](self,*args) @@ -18295,10 +18295,10 @@ cdef class GiacMethods_base: Help for wilcoxonp: wilcoxonp(Intg,[Intg]) Distribution of the Wilcoxon or Mann-Whitney test for one or two samples. - See also: 1/ wilcoxont 2/ wilcoxons + See also: 1/ wilcoxont 2/ wilcoxons Ex1:wilcoxonp(4) Ex2:wilcoxonp(7,5) - + ''' return GiacMethods['wilcoxonp'](self,*args) @@ -18307,10 +18307,10 @@ cdef class GiacMethods_base: Help for wilcoxons: wilcoxons(List,List || Real) Rank statistic of Wilcoxon or Mann-Whitney for 1 sample and one median or 2 samples. - See also: 1/ wilcoxont 2/ wilcoxonp + See also: 1/ wilcoxont 2/ wilcoxonp Ex1:wilcoxons([1, 3, 4, 5, 7, 8, 8, 12, 15, 17] , [2, 6, 10, 11, 13, 14, 15, 18, 19, 20]) Ex2:wilcoxons([1, 3, 4, 5, 7, 8, 8, 12, 15, 17] , 10) - + ''' return GiacMethods['wilcoxons'](self,*args) @@ -18319,12 +18319,12 @@ cdef class GiacMethods_base: Help for wilcoxont: wilcoxont(List,List || Real,[Func],[Real]) Wilcoxon or Mann-Whitney test for one sample and a median or 2 samples. - See also: 1/ wilcoxonp 2/ wilcoxons 3/ studentt 4/ normalt + See also: 1/ wilcoxonp 2/ wilcoxons 3/ studentt 4/ normalt Ex1:wilcoxont([1, 3, 4, 5, 7, 8, 8, 12, 15, 17] , [2, 6, 10, 11, 13, 14, 15, 18, 19, 20]) Ex2:wilcoxont([1, 3, 4, 5, 7, 8, 8, 12, 15, 17] , [2, 6, 10, 11, 13, 14, 15, 18, 19, 20],0.01) Ex3:wilcoxont([1, 3, 4, 5, 7, 8, 8, 12, 15, 17] , 10,'>') Ex4:wilcoxont([1, 3, 4, 5, 7, 8, 8, 12, 15, 17] , 10,'>',0.05) - + ''' return GiacMethods['wilcoxont'](self,*args) @@ -18333,11 +18333,11 @@ cdef class GiacMethods_base: Help for writergb: writergb(Str(s),Lst) Write a PNG picture file named s either from a list [[number_channels,width,height],red,green,alpha,blue] where red,green,alpha,blue are matrices of pixels color or from a matrix of grey pixels or from 3 matrices of RGB colored pixels. - See also: 1/ readrgb + See also: 1/ readrgb Ex1:writergb("image.png",[[255,0],[0,255]]) Ex2:writergb("image.png",[[255,0],[0,0]],[[0,255],[0,0]],[[0,0],[255,0]]) Ex3: a:=readrgb("rgb_image.png");writergb("brg_image.png",[a[0],a[4],a[1],a[3],a[2]]) - + ''' return GiacMethods['writergb'](self,*args) @@ -18346,10 +18346,10 @@ cdef class GiacMethods_base: Help for writewav: writewav(Str(s),Lst(l)) Writes a WAV sound file. - See also: 1/ readwav + See also: 1/ readwav Ex1:writewav("la.wav",2^14*(sin(2*pi*440*soundsec(1)))) Ex2:writewav("beep.wav",[[1,16,44100,80000],[65000$10000,0$10000,65000$10000,0$10000]]) - + ''' return GiacMethods['writewav'](self,*args) @@ -18358,10 +18358,10 @@ cdef class GiacMethods_base: Help for xcas_mode: xcas_mode(Intg(0) or 1 or 2 or 3) Switches to mode Xcas (0), Maple (1), Mupad (2), TI89 (3). - See also: 1/ python_compat + See also: 1/ python_compat Ex1:xcas_mode(1) Ex2:xcas_mode(0) - + ''' return GiacMethods['xcas_mode'](self,*args) @@ -18370,9 +18370,9 @@ cdef class GiacMethods_base: Help for xml_print: xml_print(Str) Indents a XML code given in a string (pretty print). - See also: 1/ export_mathml + See also: 1/ export_mathml Ex1:xml_print(export_mathml(a+2*b)) - + ''' return GiacMethods['xml_print'](self,*args) @@ -18382,7 +18382,7 @@ cdef class GiacMethods_base: xyztrange(SeqReal) xyztrange puts or erases the axes on the graphic-screen (cf button Cfg). Ex1:xyztrange(-5.0,5.0,-5.0,2.0,-10.0,10.0,-1.0,6.0,-5.0,5.0,-1.2384,2.0,1,0.0,1.0) - + ''' return GiacMethods['xyztrange'](self,*args) @@ -18391,12 +18391,12 @@ cdef class GiacMethods_base: Help for zeros: zeros(Expr,[Var]) Returns the zeros (real or complex according to the mode) of the expression (or the matrix where the lines are the solutions of the system : expression1=0,expression2=0...). - See also: 1/ + See also: 1/ Ex1:zeros(x^2+4) Ex2:zeros(ln(x)^2-4) Ex3:zeros(ln(y)^2-2,y) Ex4:zeros([x^2-1,x^2-y^2],[x,y]) - + ''' return GiacMethods['zeros'](self,*args) @@ -18405,10 +18405,10 @@ cdef class GiacMethods_base: Help for ztrans: ztrans(Expr,[Var],[ZtransVar]) z transform of a sequence. - See also: 1/ invztrans 2/ laplace 3/ invlaplace + See also: 1/ invztrans 2/ laplace 3/ invlaplace Ex1:ztrans(a^x) Ex2:ztrans(a^n,n,z) - + ''' return GiacMethods['ztrans'](self,*args) @@ -18417,10 +18417,10 @@ cdef class GiacMethods_base: Help for type: type(Expr) Returns n in [1..12] that defines the type of the argument. - See also: 1/ DOM_FLOAT 2/ DOM_INT 3/ DOM_COMPLEX 4/ DOM_IDENT 5/ DOM_LIST 6/ DOM_SYMBOLIC 7/ DOM_RAT 8/ DOM_STRING 9/ DOM_FUNC 10/ subtype + See also: 1/ DOM_FLOAT 2/ DOM_INT 3/ DOM_COMPLEX 4/ DOM_IDENT 5/ DOM_LIST 6/ DOM_SYMBOLIC 7/ DOM_RAT 8/ DOM_STRING 9/ DOM_FUNC 10/ subtype Ex1:type("abc") Ex2:type([1,2,3]) - + ''' return GiacMethods['type'](self,*args) @@ -18429,12 +18429,12 @@ cdef class GiacMethods_base: Help for zip: zip(Fnc2d(f),Lst(l1),Lst(l2),[Val(default)]) Returns a list whose j-th entry is f(l1[j],l2[j]): without default value its length is the minimum of the lengths of the two input lists and otherwise the shorter list is padded with the default value. - See also: 1/ + See also: 1/ Ex1:zip('+',[a,b,c,d], [1,2,3,4]) Ex2:zip('+',[a,b,c,d], [1,2,3]) Ex3:zip('+',[a,b,c,d], [1,2,3],5) Ex4:zip(sum,[a,b,c,d], [1,2,3,4]) - + ''' return GiacMethods['zip'](self,*args) From bd50b49973d38726fee0fb92d99e62ab2ef31978 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 29 Jan 2023 17:48:32 -0800 Subject: [PATCH 317/751] git grep -l -E ' (Q as QQ|Z as ZZ)' | xargs sed -i.bak 's/ Q as QQ/ QQ/;s/ Z as ZZ/ ZZ/;' --- src/sage/matroids/lean_matrix.pyx | 4 ++-- src/sage/matroids/linear_matroid.pyx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sage/matroids/lean_matrix.pyx b/src/sage/matroids/lean_matrix.pyx index bb8f1012f19..70510e53797 100644 --- a/src/sage/matroids/lean_matrix.pyx +++ b/src/sage/matroids/lean_matrix.pyx @@ -37,10 +37,10 @@ from cysignals.signals cimport sig_on, sig_off from sage.data_structures.bitset_base cimport * from sage.matrix.matrix2 cimport Matrix -from sage.rings.integer_ring import Z as ZZ +from sage.rings.integer_ring import ZZ from sage.rings.finite_rings.finite_field_constructor import FiniteField from sage.rings.finite_rings.finite_field_constructor import FiniteField as GF -from sage.rings.rational_field import Q as QQ +from sage.rings.rational_field import QQ from sage.rings.integer cimport Integer from sage.rings.rational cimport Rational from sage.libs.gmp.mpq cimport * diff --git a/src/sage/matroids/linear_matroid.pyx b/src/sage/matroids/linear_matroid.pyx index e6ae08e0e79..a0e41b0046c 100644 --- a/src/sage/matroids/linear_matroid.pyx +++ b/src/sage/matroids/linear_matroid.pyx @@ -129,8 +129,8 @@ from sage.matrix.matrix2 cimport Matrix import sage.matrix.constructor from sage.matrix.constructor import matrix from copy import copy, deepcopy -from sage.rings.integer_ring import Z as ZZ -from sage.rings.rational_field import Q as QQ +from sage.rings.integer_ring import ZZ +from sage.rings.rational_field import QQ from sage.rings.finite_rings.finite_field_constructor import FiniteField from sage.rings.finite_rings.finite_field_constructor import FiniteField as GF import itertools From 8e77597c00f4f9c563f658940e0df422b174e25b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 29 Jan 2023 18:15:43 -0800 Subject: [PATCH 318/751] sage.{algebras,combinat}: Consolidate imports from the same module --- .../algebras/quatalg/quaternion_algebra.py | 12 ++--- .../combinat/binary_recurrence_sequences.py | 5 +- .../combinat/cluster_algebra_quiver/quiver.py | 3 +- .../quiver_mutation_type.py | 3 +- src/sage/combinat/combinat.py | 3 +- src/sage/combinat/designs/bibd.py | 3 +- src/sage/combinat/designs/block_design.py | 6 +-- .../combinat/designs/difference_matrices.py | 3 +- src/sage/combinat/matrices/hadamard_matrix.py | 23 ++++----- src/sage/combinat/necklace.py | 14 ++---- src/sage/combinat/partition.py | 6 +-- src/sage/combinat/partition_algebra.py | 16 +++---- src/sage/combinat/permutation.py | 48 +++++++++---------- src/sage/combinat/set_partition_ordered.py | 3 +- src/sage/combinat/sf/character.py | 8 ++-- src/sage/combinat/sf/elementary.py | 7 +-- src/sage/combinat/sf/homogeneous.py | 8 ++-- src/sage/combinat/sf/sfa.py | 3 +- src/sage/combinat/similarity_class_type.py | 27 ++++++----- src/sage/combinat/species/cycle_species.py | 9 ++-- src/sage/combinat/tableau.py | 23 +++++---- src/sage/combinat/words/lyndon_word.py | 18 +++---- 22 files changed, 114 insertions(+), 137 deletions(-) diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py index 0e4b1e979a8..768779a561c 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra.py +++ b/src/sage/algebras/quatalg/quaternion_algebra.py @@ -35,12 +35,12 @@ # https://www.gnu.org/licenses/ # **************************************************************************** -from sage.arith.misc import hilbert_conductor_inverse -from sage.arith.misc import hilbert_conductor -from sage.arith.misc import factor -from sage.arith.misc import GCD as gcd -from sage.arith.misc import kronecker as kronecker_symbol -from sage.arith.misc import valuation +from sage.arith.misc import (hilbert_conductor_inverse, + hilbert_conductor, + factor, + GCD as gcd, + kronecker as kronecker_symbol, + valuation) from sage.rings.real_mpfr import RR from sage.rings.integer import Integer from sage.rings.integer_ring import ZZ diff --git a/src/sage/combinat/binary_recurrence_sequences.py b/src/sage/combinat/binary_recurrence_sequences.py index ecfcc2ccd4e..b119bc3c193 100644 --- a/src/sage/combinat/binary_recurrence_sequences.py +++ b/src/sage/combinat/binary_recurrence_sequences.py @@ -66,10 +66,7 @@ from sage.rings.finite_rings.finite_field_constructor import GF from sage.rings.integer import Integer from sage.arith.functions import lcm -from sage.arith.misc import next_prime -from sage.arith.misc import is_prime -from sage.arith.misc import next_prime_power -from sage.arith.misc import legendre_symbol +from sage.arith.misc import is_prime, next_prime, next_prime_power, legendre_symbol from sage.functions.log import log from sage.misc.functional import sqrt diff --git a/src/sage/combinat/cluster_algebra_quiver/quiver.py b/src/sage/combinat/cluster_algebra_quiver/quiver.py index 52156babeb2..f5a43793612 100644 --- a/src/sage/combinat/cluster_algebra_quiver/quiver.py +++ b/src/sage/combinat/cluster_algebra_quiver/quiver.py @@ -558,8 +558,7 @@ def plot(self, circular=True, center=(0, 0), directed=True, mark=None, """ from sage.plot.colors import rainbow from sage.graphs.graph_generators import GraphGenerators - from sage.symbolic.constants import e - from sage.symbolic.constants import pi + from sage.symbolic.constants import e, pi from sage.rings.imaginary_unit import I graphs = GraphGenerators() # returns positions for graph vertices on two concentric cycles with radius 1 and 2 diff --git a/src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py b/src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py index 59ebbfc9c07..13349acbb42 100644 --- a/src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py +++ b/src/sage/combinat/cluster_algebra_quiver/quiver_mutation_type.py @@ -27,8 +27,7 @@ from sage.rings.infinity import infinity from sage.graphs.digraph import DiGraph from sage.graphs.graph import Graph -from sage.arith.misc import binomial -from sage.arith.misc import euler_phi +from sage.arith.misc import binomial, euler_phi from sage.misc.misc_c import prod from sage.matrix.constructor import matrix diff --git a/src/sage/combinat/combinat.py b/src/sage/combinat/combinat.py index fb125cf49aa..e94d4533356 100644 --- a/src/sage/combinat/combinat.py +++ b/src/sage/combinat/combinat.py @@ -167,12 +167,11 @@ from __future__ import annotations from typing import Iterator +from sage.arith.misc import bernoulli, factorial from sage.rings.integer_ring import ZZ from sage.rings.rational_field import QQ from sage.rings.integer import Integer from sage.rings.infinity import infinity -from sage.arith.misc import bernoulli -from sage.arith.misc import factorial from sage.rings.polynomial.polynomial_element import Polynomial from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.libs.pari.all import pari diff --git a/src/sage/combinat/designs/bibd.py b/src/sage/combinat/designs/bibd.py index 996ab02a584..ad25d270dfc 100644 --- a/src/sage/combinat/designs/bibd.py +++ b/src/sage/combinat/designs/bibd.py @@ -53,8 +53,7 @@ from sage.categories.sets_cat import EmptySetError from sage.misc.unknown import Unknown from .design_catalog import transversal_design # type:ignore -from sage.arith.misc import binomial -from sage.arith.misc import is_prime_power +from sage.arith.misc import binomial, is_prime_power from .group_divisible_designs import GroupDivisibleDesign from .designs_pyx import is_pairwise_balanced_design diff --git a/src/sage/combinat/designs/block_design.py b/src/sage/combinat/designs/block_design.py index 884cafd003e..6e1c58f0224 100644 --- a/src/sage/combinat/designs/block_design.py +++ b/src/sage/combinat/designs/block_design.py @@ -52,15 +52,13 @@ # (at your option) any later version. # https://www.gnu.org/licenses/ #***************************************************************************** +from sage.arith.misc import binomial, integer_floor, is_prime_power +from sage.categories.sets_cat import EmptySetError from sage.modules.free_module import VectorSpace from sage.rings.integer import Integer from sage.rings.integer_ring import ZZ -from sage.arith.misc import binomial -from sage.arith.misc import integer_floor -from sage.arith.misc import is_prime_power from .incidence_structures import IncidenceStructure from sage.rings.finite_rings.finite_field_constructor import FiniteField -from sage.categories.sets_cat import EmptySetError from sage.misc.unknown import Unknown from sage.matrix.matrix_space import MatrixSpace from sage.libs.gap.libgap import libgap diff --git a/src/sage/combinat/designs/difference_matrices.py b/src/sage/combinat/designs/difference_matrices.py index 72b935e0f94..9e27b4688c4 100644 --- a/src/sage/combinat/designs/difference_matrices.py +++ b/src/sage/combinat/designs/difference_matrices.py @@ -10,12 +10,11 @@ --------- """ +from sage.arith.misc import divisors, is_prime_power from sage.misc.unknown import Unknown from sage.misc.cachefunc import cached_function from sage.categories.sets_cat import EmptySetError from sage.rings.finite_rings.finite_field_constructor import FiniteField -from sage.arith.misc import is_prime_power -from sage.arith.misc import divisors from .designs_pyx import is_difference_matrix from .database import DM as DM_constructions diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 4b6ddf75321..d5fb2b29648 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -54,22 +54,23 @@ # https://www.gnu.org/licenses/ #***************************************************************************** +from math import sqrt from urllib.request import urlopen -from sage.combinat.designs.difference_family import skew_supplementary_difference_set +from sage.arith.misc import divisors, is_prime_power, is_square +from sage.combinat.designs.difference_family import skew_supplementary_difference_set +from sage.combinat.t_sequences import T_sequences_smallcases +from sage.cpython.string import bytes_to_str from sage.rings.integer_ring import ZZ -from sage.matrix.constructor import matrix, block_matrix, block_diagonal_matrix, diagonal_matrix -from sage.arith.misc import is_square -from sage.arith.misc import is_prime_power -from sage.arith.misc import divisors -from math import sqrt -from sage.matrix.constructor import identity_matrix as I -from sage.matrix.constructor import ones_matrix as J -from sage.matrix.constructor import zero_matrix +from sage.matrix.constructor import (block_matrix, + block_diagonal_matrix, + diagonal_matrix, + identity_matrix as I, + ones_matrix as J, + matrix, + zero_matrix) from sage.misc.unknown import Unknown -from sage.cpython.string import bytes_to_str from sage.modules.free_module_element import vector -from sage.combinat.t_sequences import T_sequences_smallcases def normalise_hadamard(H): diff --git a/src/sage/combinat/necklace.py b/src/sage/combinat/necklace.py index ef38833b29e..e6c4e6b03ec 100644 --- a/src/sage/combinat/necklace.py +++ b/src/sage/combinat/necklace.py @@ -22,18 +22,14 @@ # https://www.gnu.org/licenses/ # **************************************************************************** -from sage.combinat.composition import Composition +from sage.arith.misc import divisors, euler_phi, factorial, GCD as gcd from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets -from sage.structure.parent import Parent -from sage.structure.unique_representation import UniqueRepresentation -from sage.arith.misc import euler_phi -from sage.arith.misc import factorial -from sage.arith.misc import divisors -from sage.arith.misc import GCD as gcd -from sage.rings.integer_ring import ZZ +from sage.combinat.composition import Composition +from sage.combinat.misc import DoublyLinkedList from sage.rings.integer import Integer from sage.misc.misc_c import prod -from sage.combinat.misc import DoublyLinkedList +from sage.structure.parent import Parent +from sage.structure.unique_representation import UniqueRepresentation def Necklaces(content): diff --git a/src/sage/combinat/partition.py b/src/sage/combinat/partition.py index 367299a4e60..ddec0ba38fb 100644 --- a/src/sage/combinat/partition.py +++ b/src/sage/combinat/partition.py @@ -283,10 +283,9 @@ from copy import copy from itertools import accumulate +from sage.arith.misc import binomial, factorial, GCD as gcd, multinomial from sage.libs.pari.all import pari from sage.libs.flint.arith import number_of_partitions as flint_number_of_partitions - -from sage.arith.misc import multinomial from sage.structure.global_options import GlobalOptions from sage.structure.parent import Parent from sage.structure.unique_representation import UniqueRepresentation @@ -308,8 +307,6 @@ from sage.rings.integer_ring import ZZ from sage.rings.rational_field import QQ from sage.rings.semirings.non_negative_integer_semiring import NN -from sage.arith.misc import factorial -from sage.arith.misc import GCD as gcd from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.integer import Integer from sage.rings.infinity import infinity @@ -327,7 +324,6 @@ from sage.combinat.combinatorial_map import combinatorial_map from sage.groups.perm_gps.permgroup import PermutationGroup from sage.graphs.dot2tex_utils import have_dot2tex -from sage.arith.misc import binomial class Partition(CombinatorialElement): diff --git a/src/sage/combinat/partition_algebra.py b/src/sage/combinat/partition_algebra.py index 789a214f365..fe2bcbe7c10 100644 --- a/src/sage/combinat/partition_algebra.py +++ b/src/sage/combinat/partition_algebra.py @@ -15,19 +15,19 @@ # # https://www.gnu.org/licenses/ # **************************************************************************** -from .combinat import catalan_number -from sage.combinat.free_module import CombinatorialFreeModule +from sage.arith.misc import binomial, factorial from sage.categories.algebras_with_basis import AlgebrasWithBasis -from sage.combinat.set_partition import SetPartition, SetPartitions, SetPartitions_set -from sage.sets.set import Set, Set_generic +from sage.functions.all import ceil from sage.graphs.graph import Graph -from sage.arith.misc import factorial -from sage.arith.misc import binomial -from .permutation import Permutations from sage.rings.integer_ring import ZZ from sage.rings.rational_field import QQ +from sage.sets.set import Set, Set_generic + +from .combinat import catalan_number +from .free_module import CombinatorialFreeModule +from .permutation import Permutations +from .set_partition import SetPartition, SetPartitions, SetPartitions_set from .subset import Subsets -from sage.functions.all import ceil def _int_or_half_int(k): diff --git a/src/sage/combinat/permutation.py b/src/sage/combinat/permutation.py index 38a8270d1ca..b0f4fc7511c 100644 --- a/src/sage/combinat/permutation.py +++ b/src/sage/combinat/permutation.py @@ -239,38 +239,38 @@ # **************************************************************************** from __future__ import annotations from typing import Iterator +import itertools -from sage.structure.parent import Parent -from sage.structure.unique_representation import UniqueRepresentation -from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets +from sage.arith.misc import factorial, multinomial from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets -from sage.categories.sets_with_grading import SetsWithGrading -from sage.categories.finite_weyl_groups import FiniteWeylGroups from sage.categories.finite_permutation_groups import FinitePermutationGroups -from sage.structure.list_clone import ClonableArray -from sage.structure.global_options import GlobalOptions +from sage.categories.finite_weyl_groups import FiniteWeylGroups +from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets +from sage.categories.sets_with_grading import SetsWithGrading +from sage.graphs.digraph import DiGraph +from sage.groups.perm_gps.permgroup_element import PermutationGroupElement +from sage.groups.perm_gps.permgroup_named import SymmetricGroup from sage.libs.gap.libgap import libgap +from sage.matrix.matrix_space import MatrixSpace +from sage.misc.cachefunc import cached_method +from sage.misc.prandom import sample from sage.rings.integer import Integer from sage.rings.integer_ring import ZZ from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing -from sage.arith.misc import factorial -from sage.arith.misc import multinomial -from sage.matrix.matrix_space import MatrixSpace -from sage.combinat.tools import transitive_ideal -from sage.combinat.composition import Composition -from sage.groups.perm_gps.permgroup_named import SymmetricGroup -from sage.groups.perm_gps.permgroup_element import PermutationGroupElement -from sage.misc.prandom import sample -from sage.graphs.digraph import DiGraph -import itertools -from .combinat import CombinatorialElement, catalan_number -from sage.misc.cachefunc import cached_method +from sage.structure.global_options import GlobalOptions +from sage.structure.list_clone import ClonableArray +from sage.structure.parent import Parent +from sage.structure.unique_representation import UniqueRepresentation + from .backtrack import GenericBacktracker -from sage.combinat.combinatorial_map import combinatorial_map -from sage.combinat.rsk import RSK, RSK_inverse -from sage.combinat.permutation_cython import (left_action_product, - right_action_product, left_action_same_n, right_action_same_n, - map_to_list, next_perm) +from .combinat import CombinatorialElement, catalan_number +from .combinatorial_map import combinatorial_map +from .composition import Composition +from .permutation_cython import (left_action_product, right_action_product, + left_action_same_n, right_action_same_n, + map_to_list, next_perm) +from .rsk import RSK, RSK_inverse +from .tools import transitive_ideal class Permutation(CombinatorialElement): diff --git a/src/sage/combinat/set_partition_ordered.py b/src/sage/combinat/set_partition_ordered.py index 3c6dcbb383c..8d220d525e6 100644 --- a/src/sage/combinat/set_partition_ordered.py +++ b/src/sage/combinat/set_partition_ordered.py @@ -24,8 +24,7 @@ # # https://www.gnu.org/licenses/ # **************************************************************************** -from sage.arith.misc import factorial -from sage.arith.misc import multinomial +from sage.arith.misc import factorial, multinomial from sage.categories.cartesian_product import cartesian_product from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets diff --git a/src/sage/combinat/sf/character.py b/src/sage/combinat/sf/character.py index b57874ad832..6abf5147c4f 100644 --- a/src/sage/combinat/sf/character.py +++ b/src/sage/combinat/sf/character.py @@ -27,13 +27,11 @@ # https://www.gnu.org/licenses/ # **************************************************************************** -from sage.combinat.sf.sfa import SymmetricFunctionAlgebra_generic as SFA_generic -from sage.misc.cachefunc import cached_method +from sage.arith.misc import binomial, divisors, moebius from sage.categories.homset import Hom from sage.categories.morphism import SetMorphism -from sage.arith.misc import divisors -from sage.arith.misc import moebius -from sage.arith.misc import binomial +from sage.combinat.sf.sfa import SymmetricFunctionAlgebra_generic as SFA_generic +from sage.misc.cachefunc import cached_method from sage.rings.integer import Integer diff --git a/src/sage/combinat/sf/elementary.py b/src/sage/combinat/sf/elementary.py index 3ed3db345d5..2e30e1dbe58 100644 --- a/src/sage/combinat/sf/elementary.py +++ b/src/sage/combinat/sf/elementary.py @@ -17,13 +17,14 @@ # # http://www.gnu.org/licenses/ #***************************************************************************** -from . import multiplicative, classical +from sage.arith.misc import binomial, factorial from sage.combinat.partition import Partition from sage.misc.misc_c import prod -from sage.arith.misc import factorial -from sage.arith.misc import binomial from sage.rings.infinity import infinity +from . import multiplicative, classical + + ################################### # # # Elementary Symmetric Functions # diff --git a/src/sage/combinat/sf/homogeneous.py b/src/sage/combinat/sf/homogeneous.py index 42c6aeb55ad..2f92100559f 100644 --- a/src/sage/combinat/sf/homogeneous.py +++ b/src/sage/combinat/sf/homogeneous.py @@ -25,12 +25,12 @@ # Homogeneous Symmetric Functions # # # #################################### -from . import multiplicative, classical +from sage.arith.misc import binomial, factorial from sage.combinat.partition import Partition -from sage.rings.infinity import infinity from sage.misc.misc_c import prod -from sage.arith.misc import factorial -from sage.arith.misc import binomial +from sage.rings.infinity import infinity + +from . import multiplicative, classical class SymmetricFunctionAlgebra_homogeneous(multiplicative.SymmetricFunctionAlgebra_multiplicative): diff --git a/src/sage/combinat/sf/sfa.py b/src/sage/combinat/sf/sfa.py index 30a6086964d..31eef1bf2ab 100644 --- a/src/sage/combinat/sf/sfa.py +++ b/src/sage/combinat/sf/sfa.py @@ -1013,8 +1013,7 @@ def gessel_reutenauer(self, lam): m = lam.to_exp_dict() # == {i: m_i | i occurs in lam} p = self.realization_of().power() h = self.realization_of().complete() - from sage.arith.misc import moebius - from sage.arith.misc import squarefree_divisors + from sage.arith.misc import moebius, squarefree_divisors mu = moebius def component(i, g): # == h_g[L_i] diff --git a/src/sage/combinat/similarity_class_type.py b/src/sage/combinat/similarity_class_type.py index b2ca90a710b..64e128477df 100644 --- a/src/sage/combinat/similarity_class_type.py +++ b/src/sage/combinat/similarity_class_type.py @@ -189,23 +189,24 @@ class type, it is also possible to compute the number of classes of that type # **************************************************************************** from itertools import chain, product -from sage.misc.misc_c import prod -from sage.arith.misc import factorial -from sage.arith.misc import moebius -from sage.arith.misc import divisors -from sage.misc.inherit_comparison import InheritComparisonClasscallMetaclass -from sage.structure.element import Element, is_Matrix -from sage.structure.parent import Parent -from sage.structure.unique_representation import UniqueRepresentation + +from sage.arith.misc import divisors, factorial, moebius from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets -from sage.combinat.combinat import CombinatorialElement -from sage.combinat.partition import Partitions, Partition +from sage.misc.cachefunc import cached_in_parent_method, cached_function +from sage.misc.inherit_comparison import InheritComparisonClasscallMetaclass +from sage.misc.misc_c import prod from sage.rings.fraction_field import FractionField from sage.rings.integer_ring import ZZ -from sage.rings.rational_field import QQ -from sage.misc.cachefunc import cached_in_parent_method, cached_function -from sage.combinat.misc import IterableFunctionCall from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing +from sage.rings.rational_field import QQ +from sage.structure.element import Element, is_Matrix +from sage.structure.parent import Parent +from sage.structure.unique_representation import UniqueRepresentation + +from .combinat import CombinatorialElement +from .misc import IterableFunctionCall +from .partition import Partitions, Partition + @cached_function def fq(n, q=None): diff --git a/src/sage/combinat/species/cycle_species.py b/src/sage/combinat/species/cycle_species.py index fe5ee4a9f94..d9d18b4ec44 100644 --- a/src/sage/combinat/species/cycle_species.py +++ b/src/sage/combinat/species/cycle_species.py @@ -12,12 +12,13 @@ # http://www.gnu.org/licenses/ #***************************************************************************** +from sage.arith.misc import divisors, euler_phi +from sage.structure.unique_representation import UniqueRepresentation + +from .misc import accept_size from .species import GenericCombinatorialSpecies from .structure import GenericSpeciesStructure -from sage.structure.unique_representation import UniqueRepresentation -from sage.arith.misc import divisors -from sage.arith.misc import euler_phi -from sage.combinat.species.misc import accept_size + class CycleSpeciesStructure(GenericSpeciesStructure): def __repr__(self): diff --git a/src/sage/combinat/tableau.py b/src/sage/combinat/tableau.py index deb191ea1c8..8a3c53765b4 100644 --- a/src/sage/combinat/tableau.py +++ b/src/sage/combinat/tableau.py @@ -85,6 +85,12 @@ # https://www.gnu.org/licenses/ # **************************************************************************** from itertools import repeat + +from sage.arith.misc import binomial, factorial, multinomial +from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets +from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets +from sage.categories.sets_cat import Sets +from sage.groups.perm_gps.permgroup import PermutationGroup from sage.sets.disjoint_union_enumerated_sets import DisjointUnionEnumeratedSets from sage.sets.family import Family from sage.sets.non_negative_integers import NonNegativeIntegers @@ -97,24 +103,17 @@ from sage.misc.inherit_comparison import InheritComparisonClasscallMetaclass from sage.rings.finite_rings.integer_mod_ring import IntegerModRing from sage.rings.infinity import PlusInfinity -from sage.arith.misc import factorial -from sage.arith.misc import binomial -from sage.arith.misc import multinomial from sage.rings.integer import Integer -from sage.combinat.composition import Composition, Compositions -from sage.combinat.integer_vector import IntegerVectors, integer_vectors_nk_fast_iter import sage.libs.symmetrica.all as symmetrica import sage.misc.prandom as random -from sage.combinat import permutation -from sage.groups.perm_gps.permgroup import PermutationGroup from sage.misc.misc_c import prod from sage.misc.misc import powerset -from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets -from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets -from sage.categories.sets_cat import Sets -from sage.combinat.combinatorial_map import combinatorial_map -from sage.combinat.posets.posets import Poset +from . import permutation +from .combinatorial_map import combinatorial_map +from .composition import Composition, Compositions +from .integer_vector import IntegerVectors, integer_vectors_nk_fast_iter +from .posets.posets import Poset @richcmp_method diff --git a/src/sage/combinat/words/lyndon_word.py b/src/sage/combinat/words/lyndon_word.py index 3e2987fb811..1d5614cd277 100644 --- a/src/sage/combinat/words/lyndon_word.py +++ b/src/sage/combinat/words/lyndon_word.py @@ -12,20 +12,16 @@ # https://www.gnu.org/licenses/ # **************************************************************************** -from sage.structure.unique_representation import UniqueRepresentation -from sage.structure.parent import Parent - +from sage.arith.misc import divisors, GCD as gcd, moebius, multinomial +from sage.combinat.combinat_cython import lyndon_word_iterator from sage.combinat.composition import Composition, Compositions +from sage.combinat.necklace import _sfc from sage.rings.integer import Integer -from sage.arith.misc import divisors -from sage.arith.misc import GCD as gcd -from sage.arith.misc import moebius -from sage.arith.misc import multinomial +from sage.structure.parent import Parent +from sage.structure.unique_representation import UniqueRepresentation -from sage.combinat.necklace import _sfc -from sage.combinat.words.words import FiniteWords -from sage.combinat.words.finite_word import FiniteWord_class -from sage.combinat.combinat_cython import lyndon_word_iterator +from .finite_word import FiniteWord_class +from .words import FiniteWords def LyndonWords(e=None, k=None): From 2870ffb3f904535c305a7b34a34b85d49c62ff97 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 29 Jan 2023 18:54:53 -0800 Subject: [PATCH 319/751] src/sage/interfaces/sage0.py: Hide a legitimate .all import from relint --- src/sage/interfaces/sage0.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sage/interfaces/sage0.py b/src/sage/interfaces/sage0.py index a43a059e0ec..9eddb7019f7 100644 --- a/src/sage/interfaces/sage0.py +++ b/src/sage/interfaces/sage0.py @@ -159,7 +159,8 @@ def __init__(self, if python: command = 'python -u' prompt = re.compile(b'>>> ') - init_code.append('from sage.all import *') + environment = 'sage.all' + init_code.append(f'from {environment} import *') else: command = ' '.join([ 'sage-ipython', From 70e5c66306eedd1ca0a6f45f6ba277916eb64743 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 29 Jan 2023 18:59:42 -0800 Subject: [PATCH 320/751] sage.{functions,interfaces,symbolic}: Consolidate imports from the same module --- src/sage/functions/hypergeometric.py | 27 +++++++++++++-------------- src/sage/functions/piecewise.py | 8 ++++---- src/sage/symbolic/pynac_impl.pxi | 18 +++++------------- 3 files changed, 22 insertions(+), 31 deletions(-) diff --git a/src/sage/functions/hypergeometric.py b/src/sage/functions/hypergeometric.py index 47bff45ecdd..04ea78910b0 100644 --- a/src/sage/functions/hypergeometric.py +++ b/src/sage/functions/hypergeometric.py @@ -162,29 +162,28 @@ # https://www.gnu.org/licenses/ # **************************************************************************** +from functools import reduce + +from sage.arith.misc import binomial, factorial, rising_factorial +from sage.calculus.functional import derivative +from sage.libs.mpmath import utils as mpmath_utils +from sage.misc.latex import latex +from sage.misc.misc_c import prod +from sage.rings.infinity import Infinity from sage.rings.integer import Integer from sage.rings.integer_ring import ZZ from sage.rings.rational_field import QQ -from sage.rings.infinity import Infinity -from sage.arith.misc import binomial -from sage.arith.misc import rising_factorial -from sage.arith.misc import factorial +from sage.structure.element import get_coercion_model from sage.symbolic.constants import pi +from sage.symbolic.expression import Expression from sage.symbolic.function import BuiltinFunction from sage.symbolic.ring import SR -from sage.structure.element import get_coercion_model -from sage.misc.latex import latex -from sage.misc.misc_c import prod -from sage.libs.mpmath import utils as mpmath_utils -from sage.symbolic.expression import Expression -from sage.calculus.functional import derivative -from functools import reduce +from .error import erf from .gamma import gamma -from .other import sqrt, real_part -from .log import exp, log from .hyperbolic import cosh, sinh -from .error import erf +from .log import exp, log +from .other import sqrt, real_part def rational_param_as_tuple(x): diff --git a/src/sage/functions/piecewise.py b/src/sage/functions/piecewise.py index dacd79f2326..f73b016555c 100644 --- a/src/sage/functions/piecewise.py +++ b/src/sage/functions/piecewise.py @@ -1089,9 +1089,9 @@ def laplace(self, parameters, variable, x='x', s='t'): sage: f.laplace(t,s) (s + 1)*e^(-s)/s^2 + 2*e^(-s)/s - 1/s^2 """ - from sage.symbolic.assumptions import assume + from sage.symbolic.assumptions import assume, forget from sage.functions.log import exp - from sage.symbolic.assumptions import forget + x = SR.var(x) s = SR.var(s) assume(s>0) @@ -1363,9 +1363,9 @@ def fourier_series_partial_sum(self, parameters, variable, N, """ from sage.symbolic.constants import pi - from sage.functions.trig import sin - from sage.functions.trig import cos + from sage.functions.trig import cos, sin from sage.arith.srange import srange + if not L: L = (self.domain().sup() - self.domain().inf()) / 2 x = self.default_variable() diff --git a/src/sage/symbolic/pynac_impl.pxi b/src/sage/symbolic/pynac_impl.pxi index 53e4884a91a..c89c5f81539 100644 --- a/src/sage/symbolic/pynac_impl.pxi +++ b/src/sage/symbolic/pynac_impl.pxi @@ -35,6 +35,9 @@ Pynac interface from cpython cimport * from libc cimport math +from sage.arith.misc import bernoulli, factorial, GCD as gcd, is_prime +from sage.arith.functions import lcm +from sage.cpython.string cimport str_to_bytes, char_to_str from sage.ext.stdsage cimport PY_NEW from sage.libs.gmp.all cimport * from sage.libs.gsl.types cimport * @@ -42,19 +45,7 @@ from sage.libs.gsl.complex cimport * from sage.libs.gsl.gamma cimport gsl_sf_lngamma_complex_e from sage.libs.mpmath import utils as mpmath_utils from sage.libs.pari.all import pari - -from sage.cpython.string cimport str_to_bytes, char_to_str - -from sage.arith.misc import GCD as gcd -from sage.arith.functions import lcm -from sage.arith.misc import is_prime -from sage.arith.misc import factorial -from sage.arith.misc import bernoulli - -from sage.structure.coerce cimport coercion_model -from sage.structure.element cimport Element, parent from sage.misc.persist import loads, dumps - from sage.rings.integer_ring import ZZ from sage.rings.integer cimport Integer, smallInteger from sage.rings.rational cimport Rational @@ -62,7 +53,8 @@ from sage.rings.real_mpfr import RR, RealField from sage.rings.rational cimport rational_power_parts from sage.rings.real_double cimport RealDoubleElement from sage.rings.cc import CC - +from sage.structure.coerce cimport coercion_model +from sage.structure.element cimport Element, parent from sage.symbolic.function cimport Function From 7305a7c18999526cb4f1238dec15cf7589225ee6 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 29 Jan 2023 18:59:53 -0800 Subject: [PATCH 321/751] git grep -l -E ' (Q as QQ|Z as ZZ)' | xargs sed -i.bak 's/ Q as QQ/ QQ/;s/ Z as ZZ/ ZZ/;' --- src/sage/interfaces/axiom.py | 2 +- src/sage/interfaces/genus2reduction.py | 4 ++-- src/sage/interfaces/singular.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sage/interfaces/axiom.py b/src/sage/interfaces/axiom.py index 7e741b85f7e..cd016fa1866 100644 --- a/src/sage/interfaces/axiom.py +++ b/src/sage/interfaces/axiom.py @@ -837,7 +837,7 @@ def _sage_(self): if type == "Float": from sage.rings.real_mpfr import RealField - from sage.rings.integer_ring import Z as ZZ + from sage.rings.integer_ring import ZZ prec = max(self.mantissa().length()._sage_(), 53) R = RealField(prec) x,e,b = self.unparsed_input_form().lstrip('float(').rstrip(')').split(',') diff --git a/src/sage/interfaces/genus2reduction.py b/src/sage/interfaces/genus2reduction.py index ea3380196c6..69d0513ca94 100644 --- a/src/sage/interfaces/genus2reduction.py +++ b/src/sage/interfaces/genus2reduction.py @@ -34,8 +34,8 @@ # **************************************************************************** from sage.structure.sage_object import SageObject -from sage.rings.integer_ring import Z as ZZ -from sage.rings.rational_field import Q as QQ +from sage.rings.integer_ring import ZZ +from sage.rings.rational_field import QQ from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.libs.pari.all import pari diff --git a/src/sage/interfaces/singular.py b/src/sage/interfaces/singular.py index 2305501a30d..75629e5ced4 100644 --- a/src/sage/interfaces/singular.py +++ b/src/sage/interfaces/singular.py @@ -1656,7 +1656,7 @@ def sage_global_ring(self): br = ZZ is_extension = False elif charstr[0] in ['0', 'QQ']: - from sage.rings.rational_field import Q as QQ + from sage.rings.rational_field import QQ br = QQ elif charstr[0].startswith('Float'): from sage.rings.real_mpfr import RealField From 1ef141292c39c14b1f6c4e15f119b14241e39ad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 6 Feb 2023 11:01:17 +0100 Subject: [PATCH 322/751] Remove `# todo: not tested` comments --- .../drinfeld_modules/drinfeld_module.py | 68 +++++++++--------- .../finite_drinfeld_module.py | 72 +++++++++---------- .../function_field/drinfeld_modules/homset.py | 8 +-- .../drinfeld_modules/morphism.py | 10 +-- 4 files changed, 79 insertions(+), 79 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index d82632c6db2..22d0f3c399f 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -97,8 +97,8 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: Fq = GF(49) sage: FqX. = Fq[] sage: K. = Frac(FqX) - sage: psi = DrinfeldModule(FqX, [z, X+1]) # todo: not tested - sage: psi # todo: not tested + sage: psi = DrinfeldModule(FqX, [z, X+1]) + sage: psi .. NOTE:: @@ -155,9 +155,9 @@ class DrinfeldModule(Parent, UniqueRepresentation): The above Drinfeld module is finite; it can also be infinite:: - sage: L = Frac(FqX) # todo: not tested - sage: psi = DrinfeldModule(FqX, [L(X), 1, X^3 + X + 1]) # todo: not tested - sage: psi # todo: not tested + sage: L = Frac(FqX) + sage: psi = DrinfeldModule(FqX, [L(X), 1, X^3 + X + 1]) + sage: psi Drinfeld module defined by X |--> (X^3 + X + 1)*t^2 + t + X over base Ring morphism: From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 To: Fraction Field of Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 @@ -167,7 +167,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: phi.is_finite() True - sage: psi.is_finite() # todo: not tested + sage: psi.is_finite() False In those examples, we used a list of coefficients (``[z, 1, 1]``) to @@ -199,7 +199,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: phi.category() Category of Drinfeld modules defined over Finite Field in z of size 3^12 over its base - sage: phi.category() is psi.category() # todo: not tested + sage: phi.category() is psi.category() False sage: phi.category() is rho.category() True @@ -279,7 +279,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: phi.rank() 2 - sage: phi.height() # todo: not tested + sage: phi.height() 1 As well as the j-invariant if the rank is two:: @@ -433,7 +433,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): injective, see [Gos1998]_, cor. 4.5.2.):: sage: a = FqX.random_element() - sage: phi.invert(phi(a)) == a # todo: not tested + sage: phi.invert(phi(a)) == a True TESTS: @@ -539,7 +539,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: FqX. = Fq[] sage: K = Frac(Fq) sage: phi = DrinfeldModule(FqX, [Fq.gen(), K(1)]) - sage: phi.base().codomain() is K # todo: not tested + sage: phi.base().codomain() is K True :: @@ -550,7 +550,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: kT. = k[] sage: K = k.extension(T^3 + T + 1) sage: phi = DrinfeldModule(FqX, [Fq.gen(), K.gen()]) - sage: phi.base().codomain() is K # todo: not tested + sage: phi.base().codomain() is K True In particular, note that the field `K` may not be the smallest field @@ -562,7 +562,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: kT. = k[] sage: K = k.extension(T^3 + T + 1) sage: phi = DrinfeldModule(FqX, [K(k.gen()), 1]) - sage: phi.base().codomain() is K # todo: not tested + sage: phi.base().codomain() is K True :: @@ -571,7 +571,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: FqX. = Fq[] sage: K = Fq.extension(2) sage: phi = DrinfeldModule(FqX, [Fq.gen(), K(Fq.gen())]) - sage: phi.base().codomain() is K # todo: not tested + sage: phi.base().codomain() is K True """ @@ -606,8 +606,8 @@ def __classcall_private__(cls, function_ring, gen, name='t'): :: sage: K = Frac(FqX) - sage: phi = DrinfeldModule(FqX, [K(X), 1]) # todo: not tested - sage: isinstance(psi, FiniteDrinfeldModule) # todo: not tested + sage: phi = DrinfeldModule(FqX, [K(X), 1]) + sage: isinstance(psi, FiniteDrinfeldModule) False """ @@ -1012,14 +1012,14 @@ def height(self): sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: phi.height() == 1 # todo: not tested + sage: phi.height() == 1 True - sage: phi.is_ordinary() # todo: not tested + sage: phi.is_ordinary() True sage: L = Frac(FqX) - sage: phi = DrinfeldModule(FqX, [L(2), L(1)]) # todo: not tested - sage: phi.height() # todo: not tested + sage: phi = DrinfeldModule(FqX, [L(2), L(1)]) + sage: phi.height() Traceback (most recent call last): ... ValueError: height is defined for prime function field characteristic @@ -1028,9 +1028,9 @@ def height(self): sage: FqX. = Fq[] sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(FqX, [1, 0, z6]) - sage: phi.height() # todo: not tested + sage: phi.height() 2 - sage: phi.is_supersingular() # todo: not tested + sage: phi.is_supersingular() True """ @@ -1065,22 +1065,22 @@ def invert(self, ore_pol): sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) sage: a = FqX.random_element() - sage: phi.invert(phi(a)) == a # todo: not tested + sage: phi.invert(phi(a)) == a True - sage: phi.invert(phi(X)) == X # todo: not tested + sage: phi.invert(phi(X)) == X True - sage: phi.invert(phi(Fq.gen())) == Fq.gen() # todo: not tested + sage: phi.invert(phi(Fq.gen())) == Fq.gen() True When the input is not in the image of the Drinfeld module, an exception is raised:: sage: t = phi.ore_polring().gen() - sage: phi.invert(t + 1) # todo: not tested + sage: phi.invert(t + 1) Traceback (most recent call last): ... ValueError: input must be in the image of the Drinfeld module - sage: phi.invert(t^3 + t^2 + 1) # todo: not tested + sage: phi.invert(t^3 + t^2 + 1) Traceback (most recent call last): ... ValueError: input must be in the image of the Drinfeld module @@ -1095,19 +1095,19 @@ def invert(self, ore_pol): sage: a = FqX.random_element() sage: cat = phi.category() sage: phi_r1 = cat.random_object(1) - sage: phi_r1.invert(phi_r1(a)) == a # todo: not tested + sage: phi_r1.invert(phi_r1(a)) == a True sage: phi_r2 = cat.random_object(2) - sage: phi_r2.invert(phi_r2(a)) == a # todo: not tested + sage: phi_r2.invert(phi_r2(a)) == a True sage: phi_r3 = cat.random_object(3) - sage: phi_r3.invert(phi_r3(a)) == a # todo: not tested + sage: phi_r3.invert(phi_r3(a)) == a True sage: phi_r4 = cat.random_object(4) - sage: phi_r4.invert(phi_r4(a)) == a # todo: not tested + sage: phi_r4.invert(phi_r4(a)) == a True sage: phi_r5 = cat.random_object(5) - sage: phi_r5.invert(phi_r5(a)) == a # todo: not tested + sage: phi_r5.invert(phi_r5(a)) == a True """ deg = ore_pol.degree() @@ -1153,8 +1153,8 @@ def is_finite(self): sage: phi.is_finite() True sage: L = Frac(FqX) - sage: psi = DrinfeldModule(FqX, [L(2), L(1)]) # todo: not tested - sage: psi.is_finite() # todo: not tested + sage: psi = DrinfeldModule(FqX, [L(2), L(1)]) + sage: psi.is_finite() False """ from sage.rings.function_field.drinfeld_modules.finite_drinfeld_module import FiniteDrinfeldModule @@ -1327,7 +1327,7 @@ def velu(self, isog): sage: phi.velu(phi(X)) is phi True - sage: phi.velu(t^6) is phi # todo: not tested + sage: phi.velu(t^6) is phi True The following inputs do not define isogenies, and the method diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 46f6be20bd3..89fc6744209 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -73,8 +73,8 @@ class FiniteDrinfeldModule(DrinfeldModule): First of all, it is easy to create the Frobenius endomorphism:: - sage: frobenius_endomorphism = phi.frobenius_endomorphism() # todo: not tested - sage: frobenius_endomorphism # todo: not tested + sage: frobenius_endomorphism = phi.frobenius_endomorphism() + sage: frobenius_endomorphism Drinfeld Module morphism: From (gen): 5*t^2 + z6 To (gen): 5*t^2 + z6 @@ -82,27 +82,27 @@ class FiniteDrinfeldModule(DrinfeldModule): Its characteristic polynomial can be computed:: - sage: chi = phi.frobenius_charpoly() # todo: not tested - sage: chi # todo: not tested + sage: chi = phi.frobenius_charpoly() + sage: chi T^2 + (X + 2*z3^2 + 2*z3 + 1)*T + 2*X^2 + (z3^2 + z3 + 4)*X + 2*z3 - sage: frob_pol = frobenius_endomorphism.ore_polynomial() # todo: not tested - sage: chi(frob_pol, phi(X)) # todo: not tested + sage: frob_pol = frobenius_endomorphism.ore_polynomial() + sage: chi(frob_pol, phi(X)) 0 This makes it possible to compute the Frobenius trace and norm:: - sage: phi.frobenius_trace() # todo: not tested + sage: phi.frobenius_trace() 6*X + 5*z3^2 + 5*z3 + 6 - sage: phi.frobenius_trace() == -chi[1] # todo: not tested + sage: phi.frobenius_trace() == -chi[1] True - sage: phi.frobenius_norm() # todo: not tested + sage: phi.frobenius_norm() 2*X^2 + (z3^2 + z3 + 4)*X + 2*z3 And to decide if a Drinfeld module is ordinary or supersingular:: - sage: phi.is_ordinary() # todo: not tested + sage: phi.is_ordinary() True - sage: phi.is_supersingular() # todo: not tested + sage: phi.is_supersingular() False """ @@ -160,13 +160,13 @@ def frobenius_endomorphism(self): sage: FqX. = Fq[] sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(FqX, [1, 0, z6]) - sage: phi.frobenius_endomorphism() # todo: not tested + sage: phi.frobenius_endomorphism() Drinfeld Module morphism: From (gen): z6*t^2 + 1 To (gen): z6*t^2 + 1 Defn: t^2 sage: from sage.rings.function_field.drinfeld_modules.morphism import DrinfeldModuleMorphism - sage: isinstance(phi.frobenius_endomorphism(), DrinfeldModuleMorphism) # todo: not tested + sage: isinstance(phi.frobenius_endomorphism(), DrinfeldModuleMorphism) True """ t = self.ore_polring().gen() @@ -211,31 +211,31 @@ def frobenius_charpoly(self, var='T'): sage: FqX. = Fq[] sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(FqX, [1, 0, z6]) - sage: chi = phi.frobenius_charpoly() # todo: not tested - sage: chi # todo: not tested + sage: chi = phi.frobenius_charpoly() + sage: chi T^2 + ((3*z3^2 + z3 + 4)*X + 4*z3^2 + 6*z3 + 3)*T + (5*z3^2 + 2*z3)*X^2 + (4*z3^2 + 3*z3)*X + 5*z3^2 + 2*z3 :: - sage: frob_pol = phi.frobenius_endomorphism().ore_polynomial() # todo: not tested - sage: chi(frob_pol, phi(X)) # todo: not tested + sage: frob_pol = phi.frobenius_endomorphism().ore_polynomial() + sage: chi(frob_pol, phi(X)) 0 :: - sage: A = phi.frobenius_trace() # todo: not tested - sage: A # todo: not tested + sage: A = phi.frobenius_trace() + sage: A (4*z3^2 + 6*z3 + 3)*X + 3*z3^2 + z3 + 4 - sage: B = phi.frobenius_norm() # todo: not tested - sage: B # todo: not tested + sage: B = phi.frobenius_norm() + sage: B (5*z3^2 + 2*z3)*X^2 + (4*z3^2 + 3*z3)*X + 5*z3^2 + 2*z3 :: sage: n = 2 # Degree over Fq of the base codomain - sage: A.degree() <= n/2 # todo: not tested + sage: A.degree() <= n/2 True - sage: B.degree() == n # todo: not tested + sage: B.degree() == n True ALGORITHM: @@ -277,19 +277,19 @@ def frobenius_norm(self): sage: FqX. = Fq[] sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(FqX, [1, 0, z6]) - sage: B = phi.frobenius_norm() # todo: not tested - sage: B # todo: not tested + sage: B = phi.frobenius_norm() + sage: B (5*z3^2 + 2*z3)*X^2 + (4*z3^2 + 3*z3)*X + 5*z3^2 + 2*z3 :: sage: n = 2 # Degree over Fq of the base codomain - sage: B.degree() == n # todo: not tested + sage: B.degree() == n True :: - sage: B == phi.frobenius_charpoly()[0] # todo: not tested + sage: B == phi.frobenius_charpoly()[0] True ALGORITHM: @@ -344,19 +344,19 @@ def frobenius_trace(self): sage: FqX. = Fq[] sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(FqX, [1, 0, z6]) - sage: A = phi.frobenius_trace() # todo: not tested - sage: A # todo: not tested + sage: A = phi.frobenius_trace() + sage: A (4*z3^2 + 6*z3 + 3)*X + 3*z3^2 + z3 + 4 :: sage: n = 2 # Degree over Fq of the base codomain - sage: A.degree() <= n/2 # todo: not tested + sage: A.degree() <= n/2 True :: - sage: A == -phi.frobenius_charpoly()[1] # todo: not tested + sage: A == -phi.frobenius_charpoly()[1] True """ self._check_rank_two() @@ -389,10 +389,10 @@ def is_ordinary(self): sage: FqX. = Fq[] sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(FqX, [1, 0, z6]) - sage: phi.is_ordinary() # todo: not tested + sage: phi.is_ordinary() False - sage: phi_p = phi(phi.characteristic()) # todo: not tested - sage: phi_p # Purely inseparable # todo: not tested + sage: phi_p = phi(phi.characteristic()) + sage: phi_p # Purely inseparable z6*t^2 ALGORITHM: @@ -425,9 +425,9 @@ def is_supersingular(self): sage: FqX. = Fq[] sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(FqX, [1, 0, z6]) - sage: phi.is_supersingular() # todo: not tested + sage: phi.is_supersingular() True - sage: phi(phi.characteristic()) # Purely inseparable # todo: not tested + sage: phi(phi.characteristic()) # Purely inseparable z6*t^2 ALGORITHM: diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index 71604593ab2..690d35653b8 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -64,8 +64,8 @@ class DrinfeldModuleHomset(Homset): The domain and codomain must have the same Drinfeld modules category:: - sage: rho = DrinfeldModule(FqX, [Frac(FqX)(X), 1]) # todo: not tested - sage: Hom(phi, rho) # todo: not tested + sage: rho = DrinfeldModule(FqX, [Frac(FqX)(X), 1]) + sage: Hom(phi, rho) Traceback (most recent call last): ... ValueError: Drinfeld modules must be in the same category @@ -262,8 +262,8 @@ def __contains__(self, x): sage: identity_morphism = end(1) sage: identity_morphism in hom False - sage: frobenius_endomorphism = phi.frobenius_endomorphism() # todo: not tested - sage: frobenius_endomorphism in hom # todo: not tested + sage: frobenius_endomorphism = phi.frobenius_endomorphism() + sage: frobenius_endomorphism in hom False """ try: diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index a752b3ddb1c..6383a9b2aad 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -100,7 +100,7 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, sage: morphism.parent() == Hom(phi, psi) True - sage: phi.frobenius_endomorphism().parent() == End(phi) # todo: not tested + sage: phi.frobenius_endomorphism().parent() == End(phi) True sage: End(phi)(0).parent() == End(phi) True @@ -315,8 +315,8 @@ def is_isogeny(self): :: - sage: frobenius_endomorphism = phi.frobenius_endomorphism() # todo: not tested - sage: frobenius_endomorphism.is_isogeny() # todo: not tested + sage: frobenius_endomorphism = phi.frobenius_endomorphism() + sage: frobenius_endomorphism.is_isogeny() True """ return not self.is_zero() @@ -351,8 +351,8 @@ def is_isomorphism(self): :: - sage: frobenius_endomorphism = phi.frobenius_endomorphism() # todo: not tested - sage: frobenius_endomorphism.is_isomorphism() # todo: not tested + sage: frobenius_endomorphism = phi.frobenius_endomorphism() + sage: frobenius_endomorphism.is_isomorphism() False """ return self.is_isogeny() and self._ore_polynomial.degree() == 0 From 7cd5a2aa0d808df79aad8baa97de4a7222d97b6b Mon Sep 17 00:00:00 2001 From: Sandstorm831 Date: Mon, 6 Feb 2023 17:41:10 +0530 Subject: [PATCH 323/751] minor chagnges --- src/sage/combinat/posets/linear_extensions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/combinat/posets/linear_extensions.py b/src/sage/combinat/posets/linear_extensions.py index 4fb2f4e5a44..47c315a230a 100644 --- a/src/sage/combinat/posets/linear_extensions.py +++ b/src/sage/combinat/posets/linear_extensions.py @@ -40,7 +40,7 @@ class LinearExtensionOfPoset(ClonableArray, - metaclass=InheritComparisonClasscallMetaclass): + metaclass=InheritComparisonClasscallMetaclass): r""" A linear extension of a finite poset `P` of size `n` is a total ordering `\pi := \pi_0 \pi_1 \ldots \pi_{n-1}` of its elements From 050c2f65c74a85dc74f361d755de8066699b51de Mon Sep 17 00:00:00 2001 From: Kryzar Date: Mon, 6 Feb 2023 14:57:36 +0100 Subject: [PATCH 324/751] (minor) Typo --- src/sage/categories/drinfeld_modules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 5f78eab3a3f..0d364cf5b51 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -49,7 +49,7 @@ class DrinfeldModules(Category_over_base_ring): The monic polynomial that generates the kernel of the base morphism is called the `\mathbb{F}_q[X]`-characteristic of the - `\mathbb{F}_q[X]`-field `K`. It cal also be referred to as the + `\mathbb{F}_q[X]`-field `K`. It can also be referred to as the function-field characteristic of `K`. We say that `\mathbb{F}_q[X]` is the function ring of the category; From e24c36681ae0d4630b5dbebe395752175d4fb24a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Leudi=C3=A8re?= Date: Mon, 6 Feb 2023 15:27:46 +0100 Subject: [PATCH 325/751] Change X to T --- src/sage/categories/drinfeld_modules.py | 194 +++++----- .../function_field/drinfeld_modules/action.py | 40 +- .../drinfeld_modules/drinfeld_module.py | 352 +++++++++--------- .../finite_drinfeld_module.py | 98 ++--- .../function_field/drinfeld_modules/homset.py | 40 +- .../drinfeld_modules/morphism.py | 62 +-- 6 files changed, 393 insertions(+), 393 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 0d364cf5b51..142300e0971 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -33,28 +33,28 @@ class DrinfeldModules(Category_over_base_ring): This class represents the category of Drinfeld modules on a given base. - Let `\mathbb{F}_q[X]` be a polynomial ring with coefficients in a + Let `\mathbb{F}_q[T]` be a polynomial ring with coefficients in a finite field `\mathbb{F}_q` and let `K` be a field. Fix a ring - morphism `\gamma: \mathbb{F}_q[X] \to K`. We say that the field `K` - is an `\mathbb{F}_q[X]`-field, so that the *base of the category* is - defined as the `\mathbb{F}_q[X]`-field *K*. The base uniquely + morphism `\gamma: \mathbb{F}_q[T] \to K`. We say that the field `K` + is an `\mathbb{F}_q[T]`-field, so that the *base of the category* is + defined as the `\mathbb{F}_q[T]`-field *K*. The base uniquely defines the category, and we also refer to it as the *base ring* or *base field*. The *base morphism* is the morphism `\gamma: - \mathbb{F}_q[X] \to K`. + \mathbb{F}_q[T] \to K`. .. NOTE:: Equivalently, the base of the category could be defined as the - base morphism `\gamma: \mathbb{F}_q[X] \to K`. + base morphism `\gamma: \mathbb{F}_q[T] \to K`. The monic polynomial that generates the kernel of the base morphism - is called the `\mathbb{F}_q[X]`-characteristic of the - `\mathbb{F}_q[X]`-field `K`. It can also be referred to as the + is called the `\mathbb{F}_q[T]`-characteristic of the + `\mathbb{F}_q[T]`-field `K`. It can also be referred to as the function-field characteristic of `K`. - We say that `\mathbb{F}_q[X]` is the function ring of the category; + We say that `\mathbb{F}_q[T]` is the function ring of the category; `K\{\tau\}` is the Ore polynomial ring of the category. The constant - coefficient of the category is the image of `X` under the base + coefficient of the category is the image of `T` under the base morphism. INPUT: the base ring morphism @@ -66,10 +66,10 @@ class DrinfeldModules(Category_over_base_ring): Drinfeld module:: sage: Fq = GF(11) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 - sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: cat Category of Drinfeld modules defined over Finite Field in z of size 11^4 over its base @@ -92,25 +92,25 @@ class DrinfeldModules(Category_over_base_ring): sage: cat.base_morphism() Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field of size 11 + From: Univariate Polynomial Ring in T over Finite Field of size 11 To: Finite Field in z of size 11^4 over its base - Defn: X |--> z^3 + 7*z^2 + 6*z + 10 + Defn: T |--> z^3 + 7*z^2 + 6*z + 10 The so-called constant coefficient --- which is the same for all - Drinfeld modules in the category --- is simply the image of `X` by + Drinfeld modules in the category --- is simply the image of `T` by the base morphism:: sage: cat.constant_coefficient() z^3 + 7*z^2 + 6*z + 10 - sage: cat.base_morphism()(X) == cat.constant_coefficient() + sage: cat.base_morphism()(T) == cat.constant_coefficient() True Similarly, the function ring-characteristic of the category is - either `0` or the unique monic polynomial in `\mathbb{F}_q[X]` that + either `0` or the unique monic polynomial in `\mathbb{F}_q[T]` that generates the kernel of the base:: sage: cat.characteristic() - X^2 + 7*X + 2 + T^2 + 7*T + 2 sage: cat.base_morphism()(cat.characteristic()) 0 @@ -124,7 +124,7 @@ class DrinfeldModules(Category_over_base_ring): sage: cat.function_ring() is phi.function_ring() True sage: cat.function_ring() - Univariate Polynomial Ring in X over Finite Field of size 11 + Univariate Polynomial Ring in T over Finite Field of size 11 sage: cat.ore_polring() is phi.ore_polring() True sage: cat.ore_polring() @@ -137,7 +137,7 @@ class DrinfeldModules(Category_over_base_ring): sage: psi = cat.object([p_root, 1]) sage: psi - Drinfeld module defined by X |--> t + z^3 + 7*z^2 + 6*z + 10 over base Finite Field in z of size 11^4 over its base + Drinfeld module defined by T |--> t + z^3 + 7*z^2 + 6*z + 10 over base Finite Field in z of size 11^4 over its base sage: psi.category() is cat True @@ -154,7 +154,7 @@ class DrinfeldModules(Category_over_base_ring): sage: rho = cat.random_object(2) sage: rho # random - Drinfeld module defined by X |--> (7*z^3 + 7*z^2 + 10*z + 2)*t^2 + (9*z^3 + 5*z^2 + 2*z + 7)*t + z^3 + 7*z^2 + 6*z + 10 over Finite Field in z of size 11^4 + Drinfeld module defined by T |--> (7*z^3 + 7*z^2 + 10*z + 2)*t^2 + (9*z^3 + 5*z^2 + 2*z + 7)*t + z^3 + 7*z^2 + 6*z + 10 over Finite Field in z of size 11^4 sage: rho.rank() == 2 True sage: rho.category() is cat @@ -163,10 +163,10 @@ class DrinfeldModules(Category_over_base_ring): TESTS:: sage: Fq = GF(11) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(4) sage: from sage.categories.drinfeld_modules import DrinfeldModules - sage: base = Hom(FqX, K)(0) + sage: base = Hom(A, K)(0) sage: cat = DrinfeldModules(base) Traceback (most recent call last): ... @@ -179,7 +179,7 @@ class DrinfeldModules(Category_over_base_ring): :: - sage: base = Hom(FqX, FqX)(1) + sage: base = Hom(A, A)(1) sage: cat = DrinfeldModules(base) Traceback (most recent call last): ... @@ -220,23 +220,23 @@ def __init__(self, base_field, name='t'): TESTS:: sage: Fq = GF(11) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 - sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: ore_polring. = OrePolynomialRing(phi.base(), phi.base().frobenius_endomorphism()) sage: cat._ore_polring is ore_polring True sage: i = phi.base().coerce_map_from(K) - sage: base_morphism = Hom(FqX, K)(p_root) + sage: base_morphism = Hom(A, K)(p_root) sage: cat.base() == K.over(base_morphism) True sage: cat._base_morphism == i * base_morphism True - sage: cat._function_ring is FqX + sage: cat._function_ring is A True - sage: cat._constant_coefficient == base_morphism(X) + sage: cat._constant_coefficient == base_morphism(T) True sage: cat._characteristic(cat._constant_coefficient) 0 @@ -251,7 +251,7 @@ def __init__(self, base_field, name='t'): raise TypeError('input must be a field') self._base_field = base_field self._function_ring = base_morphism.domain() - # Check domain of base morphism is Fq[X] + # Check domain of base morphism is Fq[T] function_ring = self._function_ring if not isinstance(function_ring, PolynomialRing_general): raise NotImplementedError('function ring must be a polynomial ' @@ -262,8 +262,8 @@ def __init__(self, base_field, name='t'): raise TypeError('function ring base must be a finite field') # Shortcuts Fq = function_ring_base - FqX = function_ring - X = FqX.gen() + A = function_ring + T = A.gen() K = base_field # A ring extension # Build K{t} d = log(Fq.cardinality(), Fq.characteristic()) @@ -271,13 +271,13 @@ def __init__(self, base_field, name='t'): self._ore_polring = OrePolynomialRing(K, tau, names=name, polcast=False) # Create constant coefficient - self._constant_coefficient = base_morphism(X) + self._constant_coefficient = base_morphism(T) # Create characteristic self._characteristic = None if K.is_finite(): #FIXME: This minpoly is over Fp, not Fq - self._characteristic = FqX(K(base_morphism(X)).minpoly()) - elif FqX.is_subring(K): + self._characteristic = A(K(base_morphism(T)).minpoly()) + elif A.is_subring(K): self._characteristic = Integer(0) super().__init__(base=base_field) @@ -290,10 +290,10 @@ def _latex_(self): EXAMPLES:: sage: Fq = GF(11) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 - sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: latex(cat) \text{Category{ }of{ }Drinfeld{ }modules{ }defined{ }over{ }\Bold{F}_{11^{4}} @@ -310,10 +310,10 @@ def _repr_(self): EXAMPLES:: sage: Fq = GF(11) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 - sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: cat Category of Drinfeld modules defined over Finite Field in z of size 11^4 over its base @@ -329,10 +329,10 @@ def Homsets(self): EXAMPLES:: sage: Fq = GF(11) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 - sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: from sage.categories.homsets import Homsets sage: cat.Homsets() is Homsets() @@ -349,10 +349,10 @@ def Endsets(self): EXAMPLES:: sage: Fq = GF(11) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 - sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: from sage.categories.homsets import Homsets sage: cat.Endsets() is Homsets().Endsets() @@ -369,17 +369,17 @@ def base_morphism(self): EXAMPLES:: sage: Fq = GF(11) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 - sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: cat.base_morphism() Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field of size 11 + From: Univariate Polynomial Ring in T over Finite Field of size 11 To: Finite Field in z of size 11^4 over its base - Defn: X |--> z^3 + 7*z^2 + 6*z + 10 - sage: cat.constant_coefficient() == cat.base_morphism()(X) + Defn: T |--> z^3 + 7*z^2 + 6*z + 10 + sage: cat.constant_coefficient() == cat.base_morphism()(T) True """ return self._base_morphism @@ -393,17 +393,17 @@ def characteristic(self): EXAMPLES:: sage: Fq = GF(11) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 - sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: cat.characteristic() - X^2 + 7*X + 2 + T^2 + 7*T + 2 :: - sage: psi = DrinfeldModule(FqX, [Frac(FqX).gen(), 1]) # todo: not tested + sage: psi = DrinfeldModule(A, [Frac(A).gen(), 1]) # todo: not tested sage: psi.category().characteristic() # todo: not tested 0 """ @@ -421,14 +421,14 @@ def constant_coefficient(self): EXAMPLES:: sage: Fq = GF(11) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 - sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: cat.constant_coefficient() z^3 + 7*z^2 + 6*z + 10 - sage: cat.constant_coefficient() == cat.base()(X) + sage: cat.constant_coefficient() == cat.base()(T) True """ return self._constant_coefficient @@ -442,14 +442,14 @@ def function_ring(self): EXAMPLES:: sage: Fq = GF(11) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 - sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: cat.function_ring() - Univariate Polynomial Ring in X over Finite Field of size 11 - sage: cat.function_ring() is FqX + Univariate Polynomial Ring in T over Finite Field of size 11 + sage: cat.function_ring() is A True """ return self._function_ring @@ -467,14 +467,14 @@ def object(self, gen): EXAMPLES:: sage: Fq = GF(11) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 - sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: psi = cat.object([p_root, 0, 1]) sage: psi - Drinfeld module defined by X |--> t^2 + z^3 + 7*z^2 + 6*z + 10 over base Finite Field in z of size 11^4 over its base + Drinfeld module defined by T |--> t^2 + z^3 + 7*z^2 + 6*z + 10 over base Finite Field in z of size 11^4 over its base sage: t = phi.ore_polring().gen() sage: cat.object(t^3 + z^3 + 7*z^2 + 6*z + 10) is phi True @@ -482,8 +482,8 @@ def object(self, gen): from sage.rings.function_field.drinfeld_modules.drinfeld_module import DrinfeldModule # If gen is not in the Ore polring, an exception is raised gen = self._ore_polring(gen) - X = self._function_ring.gen() - if gen[0] != self._base_morphism(X): + T = self._function_ring.gen() + if gen[0] != self._base_morphism(T): raise ValueError('constant coefficient must equal that of the ' \ 'category') return DrinfeldModule(self._function_ring, gen) @@ -497,10 +497,10 @@ def ore_polring(self): EXAMPLES:: sage: Fq = GF(11) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 - sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: cat.ore_polring() Ore Polynomial Ring in t over Finite Field in z of size 11^4 over its base twisted by Frob @@ -521,13 +521,13 @@ def random_object(self, rank): EXAMPLES:: sage: Fq = GF(11) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 - sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: psi = cat.random_object(3) # random - Drinfeld module defined by X |--> (6*z^3 + 4*z^2 + 10*z + 9)*t^3 + (4*z^3 + 8*z^2 + 8*z)*t^2 + (10*z^3 + 3*z^2 + 6*z)*t + z^3 + 7*z^2 + 6*z + 10 over Finite Field in z of size 11^4 + Drinfeld module defined by T |--> (6*z^3 + 4*z^2 + 10*z + 9)*t^3 + (4*z^3 + 8*z^2 + 8*z)*t^2 + (10*z^3 + 3*z^2 + 6*z)*t + z^3 + 7*z^2 + 6*z + 10 over Finite Field in z of size 11^4 sage: psi.rank() == 3 True """ @@ -552,10 +552,10 @@ def super_categories(self): EXAMPLES:: sage: Fq = GF(11) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 - sage: phi = DrinfeldModule(FqX, [p_root, 0, 0, 1]) + sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: cat.super_categories() [] @@ -573,18 +573,18 @@ def base(self): EXAMPLES:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: phi.base() Finite Field in z12 of size 5^12 over its base The base can be infinite:: - sage: sigma = DrinfeldModule(FqX, [Frac(FqX).gen(), 1]) # todo: not tested + sage: sigma = DrinfeldModule(A, [Frac(A).gen(), 1]) # todo: not tested sage: sigma.base() # todo: not tested - Fraction Field of Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 over its base + Fraction Field of Univariate Polynomial Ring in T over Finite Field in z2 of size 5^2 over its base """ return self.category().base() @@ -597,19 +597,19 @@ def base_morphism(self): EXAMPLES:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: phi.base_morphism() Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + From: Univariate Polynomial Ring in T over Finite Field in z2 of size 5^2 To: Finite Field in z12 of size 5^12 over its base - Defn: X |--> 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + Defn: T |--> 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 The base codomain can be infinite:: - sage: sigma = DrinfeldModule(FqX, [Frac(FqX).gen(), 1]) # todo: not tested + sage: sigma = DrinfeldModule(A, [Frac(A).gen(), 1]) # todo: not tested sage: sigma.base_morphism() # todo: not tested """ return self.category().base_morphism() @@ -623,19 +623,19 @@ def characteristic(self): EXAMPLES:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: phi.characteristic() # todo: not tested - X^2 + (4*z2 + 2)*X + 2 + T^2 + (4*z2 + 2)*T + 2 sage: phi.base_morphism()(phi.characteristic()) 0 :: - sage: L = Frac(FqX) # todo: not tested - sage: psi = DrinfeldModule(FqX, [L(1), 0, 0, L(1)]) # todo: not tested + sage: L = Frac(A) # todo: not tested + sage: psi = DrinfeldModule(A, [L(1), 0, 0, L(1)]) # todo: not tested sage: psi.characteristic() # todo: not tested 0 """ @@ -650,11 +650,11 @@ def function_ring(self): EXAMPLES:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: phi.function_ring() is FqX + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) + sage: phi.function_ring() is A True """ return self.category().function_ring() @@ -668,20 +668,20 @@ def constant_coefficient(self): EXAMPLES:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: phi.constant_coefficient() == p_root True - Let `\mathbb{F}_q[X]` be the function ring, and let `\gamma` + Let `\mathbb{F}_q[T]` be the function ring, and let `\gamma` the base of the Drinfeld module. The constant coefficient - equals `\gamma(X)`:: + equals `\gamma(T)`:: sage: cat = phi.category() sage: base = cat.base() - sage: base(X) == phi.constant_coefficient() + sage: base(T) == phi.constant_coefficient() True Naturally, two Drinfeld modules in the same category have the @@ -690,7 +690,7 @@ def constant_coefficient(self): sage: t = phi.ore_polring().gen() sage: psi = cat.object(phi.constant_coefficient() + t^3) sage: psi - Drinfeld module defined by X |--> t^3 + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base + Drinfeld module defined by T |--> t^3 + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base Reciprocally, it is impossible to create two Drinfeld modules in this category if they do not share the same constant @@ -712,10 +712,10 @@ def ore_polring(self): EXAMPLES:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: ore_polring = phi.ore_polring() sage: ore_polring Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 over its base twisted by Frob^2 @@ -729,7 +729,7 @@ def ore_polring(self): The generator of the Drinfeld module is in the Ore polynomial ring:: - sage: phi(X) in ore_polring + sage: phi(T) in ore_polring True """ return self.category().ore_polring() diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index e8319a1f308..5bdf666218c 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -29,7 +29,7 @@ class DrinfeldModuleAction(Action): This class represents the module action induced by a Drinfeld module. - Let `\phi` be a Drinfeld module with base `\gamma: \mathbb{F}_q[X] + Let `\phi` be a Drinfeld module with base `\gamma: \mathbb{F}_q[T] \to K`. Let `L/K` be a field extension, let `x \in L`, let `a` be a function ring element; the action is defined as `(a, x) \mapsto \phi_a(x)`. @@ -46,23 +46,23 @@ class DrinfeldModuleAction(Action): EXAMPLES:: sage: Fq. = GF(11) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(2) - sage: phi = DrinfeldModule(FqX, [z, 0, 0, 1]) + sage: phi = DrinfeldModule(A, [z, 0, 0, 1]) sage: action = phi.action() sage: action - Action on Finite Field in z of size 11^2 over its base induced by Drinfeld module defined by X |--> t^3 + z over base Finite Field in z of size 11^2 over its base + Action on Finite Field in z of size 11^2 over its base induced by Drinfeld module defined by T |--> t^3 + z over base Finite Field in z of size 11^2 over its base The action on elements is computed as follows:: - sage: P = X + 1 + sage: P = T + 1 sage: a = z sage: action(P, a) ... 4*z + 2 sage: action(0, K.random_element()) 0 - sage: action(FqX.random_element(), 0) + sage: action(A.random_element(), 0) 0 Finally, given a Drinfeld module action, it is easy to recover the @@ -81,9 +81,9 @@ def __init__(self, drinfeld_module): TESTS:: sage: Fq. = GF(11) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(2) - sage: phi = DrinfeldModule(FqX, [z, 0, 0, 1]) + sage: phi = DrinfeldModule(A, [z, 0, 0, 1]) sage: action = phi.action() sage: action._drinfeld_module is phi True @@ -110,17 +110,17 @@ def _act_(self, pol, x): EXAMPLES:: sage: Fq. = GF(11) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(2) - sage: phi = DrinfeldModule(FqX, [z, 0, 0, 1]) + sage: phi = DrinfeldModule(A, [z, 0, 0, 1]) sage: action = phi.action() - sage: P = X + 1 + sage: P = T + 1 sage: a = z sage: action(P, a) 4*z + 2 sage: action(0, K.random_element()) 0 - sage: action(FqX.random_element(), 0) + sage: action(A.random_element(), 0) 0 """ if pol not in self._drinfeld_module.function_ring(): @@ -138,12 +138,12 @@ def _latex_(self): EXAMPLES:: sage: Fq. = GF(11) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(2) - sage: phi = DrinfeldModule(FqX, [z, 0, 0, 1]) + sage: phi = DrinfeldModule(A, [z, 0, 0, 1]) sage: action = phi.action() sage: latex(action) - \text{Action{ }on{ }}\Bold{F}_{11^{2}}\text{{ }induced{ }by{ }}\text{Drinfeld{ }module{ }defined{ }by{ }} X \mapsto t^{3} + z\text{{ }over{ }base{ }}\Bold{F}_{11^{2}} + \text{Action{ }on{ }}\Bold{F}_{11^{2}}\text{{ }induced{ }by{ }}\text{Drinfeld{ }module{ }defined{ }by{ }} T \mapsto t^{3} + z\text{{ }over{ }base{ }}\Bold{F}_{11^{2}} """ return f'\\text{{Action{{ }}on{{ }}}}' \ f'{latex(self._base_ring)}\\text{{{{ }}' \ @@ -158,12 +158,12 @@ def _repr_(self): EXAMPLES:: sage: Fq. = GF(11) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(2) - sage: phi = DrinfeldModule(FqX, [z, 0, 0, 1]) + sage: phi = DrinfeldModule(A, [z, 0, 0, 1]) sage: action = phi.action() sage: action - Action on Finite Field in z of size 11^2 over its base induced by Drinfeld module defined by X |--> t^3 + z over base Finite Field in z of size 11^2 over its base + Action on Finite Field in z of size 11^2 over its base induced by Drinfeld module defined by T |--> t^3 + z over base Finite Field in z of size 11^2 over its base """ return f'Action on {self._base_ring} induced by ' \ f'{self._drinfeld_module}' @@ -177,9 +177,9 @@ def drinfeld_module(self): EXAMPLES:: sage: Fq. = GF(11) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(2) - sage: phi = DrinfeldModule(FqX, [z, 0, 0, 1]) + sage: phi = DrinfeldModule(A, [z, 0, 0, 1]) sage: action = phi.action() sage: action.drinfeld_module() is phi True diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 22d0f3c399f..9f3784bbbc3 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -40,21 +40,21 @@ class DrinfeldModule(Parent, UniqueRepresentation): r""" - This class represents a Drinfeld `\mathbb{F}_q[X]`-module. + This class represents a Drinfeld `\mathbb{F}_q[T]`-module. - Let `\mathbb{F}_q[X]` be a polynomial ring with coefficients in a + Let `\mathbb{F}_q[T]` be a polynomial ring with coefficients in a finite field `\mathbb{F}_q` and let `K` be a field. Fix a ring - morphism `\gamma: \mathbb{F}_q[X] \to K`. We say that the field `K` - is an `\mathbb{F}_q[X]`-field, so that the *base of the Drinfeld - module* is defined as the `\mathbb{F}_q[X]`-field *K*. The base + morphism `\gamma: \mathbb{F}_q[T] \to K`. We say that the field `K` + is an `\mathbb{F}_q[T]`-field, so that the *base of the Drinfeld + module* is defined as the `\mathbb{F}_q[T]`-field *K*. The base uniquely defines the category, and we also refer to it as the *base ring* or *base field*. The *base morphism* is the morphism `\gamma: - \mathbb{F}_q[X] \to K`. + \mathbb{F}_q[T] \to K`. .. NOTE:: Equivalently, the base of the Drinfeld module could be defined as the - base morphism `\gamma: \mathbb{F}_q[X] \to K`. + base morphism `\gamma: \mathbb{F}_q[T] \to K`. .. NOTE:: @@ -62,42 +62,42 @@ class DrinfeldModule(Parent, UniqueRepresentation): See also :class:`sage.categories.drinfeld_modules`. The monic polynomial that generates the kernel of the base morphism - is called the `\mathbb{F}_q[X]`-characteristic of the - `\mathbb{F}_q[X]`-field `K`. It cal also be referred to as the + is called the `\mathbb{F}_q[T]`-characteristic of the + `\mathbb{F}_q[T]`-field `K`. It cal also be referred to as the function-field characteristic of `K`. Let `K\{\tau\}` be the ring of Ore polynomials with coefficients in `K` and Frobenius variable `\tau: x \mapsto x^q`. A Drinfeld - `\mathbb{F}_q[X]`-module over the `\mathbb{F}_q[X]`-field `K` is an - `\mathbb{F}_q`-algebra morphism `\phi: \mathbb{F}_q[X] \to + `\mathbb{F}_q[T]`-module over the `\mathbb{F}_q[T]`-field `K` is an + `\mathbb{F}_q`-algebra morphism `\phi: \mathbb{F}_q[T] \to K\{\tau\}` such that: 1. The image of `\phi` contains nonconstant Ore polynomials. - 2. For every element `a` in the `\mathbb{F}_q[X]`, the constant + 2. For every element `a` in the `\mathbb{F}_q[T]`, the constant coefficient `\phi(a)` is `\gamma(a)`. For `a` in the function ring, `\phi(a)` is denoted `\phi_a`. - The Drinfeld `\mathbb{F}_q[X]`-module `\phi` is uniquely determined - by the image `\phi_X` of `X` — this serves as input of the class. + The Drinfeld `\mathbb{F}_q[T]`-module `\phi` is uniquely determined + by the image `\phi_T` of `T` — this serves as input of the class. A Drinfeld module is said to be finite if the field `K` is. Despite an emphasis on this case, the base field can be any extension of `\mathbb{F}_q`:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) - sage: phi = DrinfeldModule(FqX, [z, 4, 1]) + sage: phi = DrinfeldModule(A, [z, 4, 1]) sage: phi - Drinfeld module defined by X |--> t^2 + 4*t + z over base Finite Field in z of size 5^12 over its base + Drinfeld module defined by T |--> t^2 + 4*t + z over base Finite Field in z of size 5^12 over its base :: sage: Fq = GF(49) - sage: FqX. = Fq[] - sage: K. = Frac(FqX) - sage: psi = DrinfeldModule(FqX, [z, X+1]) + sage: A. = Fq[] + sage: K. = Frac(A) + sage: psi = DrinfeldModule(A, [z, T+1]) sage: psi .. NOTE:: @@ -105,11 +105,11 @@ class DrinfeldModule(Parent, UniqueRepresentation): Finite Drinfeld modules are implemented in the class :class:`sage.rings.function_field.drinfeld_modules.finite_drinfeld_module`. - We say that `\mathbb{F}_q[X]` is the function ring of `\phi`; + We say that `\mathbb{F}_q[T]` is the function ring of `\phi`; `K\{\tau\}` is the Ore polynomial ring of `\phi`. Further, the - generator of `\phi` is `\phi_X` and its constant coefficient is the - constant coefficient of `\phi_X`. The - `\mathbb{F}_q[X]`-characteristic of the `\mathbb{F}_q[X]`-field `K` + generator of `\phi` is `\phi_T` and its constant coefficient is the + constant coefficient of `\phi_T`. The + `\mathbb{F}_q[T]`-characteristic of the `\mathbb{F}_q[T]`-field `K` can also be referred to as its function ring-characteristic. Finally, `K` is just referred to as the codomain base. @@ -119,7 +119,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): .. NOTE:: Drinfeld modules are defined in a larger setting, in which the - polynomial ring `\mathbb{F}_q[X]` is replaced by a more general + polynomial ring `\mathbb{F}_q[T]` is replaced by a more general function ring: the ring of functions in `k` that are regular outside `\infty`, where `k` is a function field over `\mathbb{F}_q` with transcendence degree `1` and `\infty` is a @@ -141,27 +141,27 @@ class DrinfeldModule(Parent, UniqueRepresentation): ring and the generator:: sage: Fq. = GF(3^2) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) - sage: phi = DrinfeldModule(FqX, [z, 1, 1]) + sage: phi = DrinfeldModule(A, [z, 1, 1]) sage: phi - Drinfeld module defined by X |--> t^2 + t + z over base Finite Field in z of size 3^12 over its base + Drinfeld module defined by T |--> t^2 + t + z over base Finite Field in z of size 3^12 over its base Note that the definition of the base morphism is implicit; it is defined as the `\mathbb{F}_q`-algebra morphism defined from - `\mathbb{F}_q[X]` to the base ring, and the base ring is a ring + `\mathbb{F}_q[T]` to the base ring, and the base ring is a ring extension over the base morphism whose underlying ring is the compositum of all the parents of the coefficients. The above Drinfeld module is finite; it can also be infinite:: - sage: L = Frac(FqX) - sage: psi = DrinfeldModule(FqX, [L(X), 1, X^3 + X + 1]) + sage: L = Frac(A) + sage: psi = DrinfeldModule(A, [L(T), 1, T^3 + T + 1]) sage: psi - Drinfeld module defined by X |--> (X^3 + X + 1)*t^2 + t + X over base Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - To: Fraction Field of Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 - Defn: X |--> X + Drinfeld module defined by T |--> (T^3 + T + 1)*t^2 + t + T over base Ring morphism: + From: Univariate Polynomial Ring in T over Finite Field in z2 of size 3^2 + To: Fraction Field of Univariate Polynomial Ring in T over Finite Field in z2 of size 3^2 + Defn: T |--> T :: @@ -171,23 +171,23 @@ class DrinfeldModule(Parent, UniqueRepresentation): False In those examples, we used a list of coefficients (``[z, 1, 1]``) to - represent the generator `\phi_X = z + t + t^2`. One can also use + represent the generator `\phi_T = z + t + t^2`. One can also use regular Ore polynomials:: sage: ore_polring = phi.ore_polring() sage: t = phi.ore_polring().gen() - sage: rho_X = z + t^3 - sage: rho = DrinfeldModule(FqX, rho_X) + sage: rho_T = z + t^3 + sage: rho = DrinfeldModule(A, rho_T) sage: rho - Drinfeld module defined by X |--> t^3 + z over base Finite Field in z of size 3^12 over its base - sage: rho(X) == rho_X + Drinfeld module defined by T |--> t^3 + z over base Finite Field in z of size 3^12 over its base + sage: rho(T) == rho_T True Images under the Drinfeld module are computed by calling the object:: - sage: phi(X) # phi_X, the generator of the Drinfeld module + sage: phi(T) # phi_T, the generator of the Drinfeld module t^2 + t + z - sage: phi(X^3 + X + 1) # phi_(X^3 +X + 1) + sage: phi(T^3 + T + 1) # phi_(T^3 +T + 1) t^6 + (z^11 + z^9 + 2*z^6 + 2*z^4 + 2*z + 1)*t^4 + (2*z^11 + 2*z^10 + z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^3)*t^3 + (2*z^11 + z^10 + z^9 + 2*z^7 + 2*z^6 + z^5 + z^4 + 2*z^3 + 2*z + 2)*t^2 + (2*z^11 + 2*z^8 + 2*z^6 + z^5 + z^4 + 2*z^2)*t + z^3 + z + 1 sage: phi(1) # phi_1 1 @@ -208,7 +208,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: cat = phi.category() sage: cat.object([z, 0, 0, 1]) - Drinfeld module defined by X |--> t^3 + z over base Finite Field in z of size 3^12 over its base + Drinfeld module defined by T |--> t^3 + z over base Finite Field in z of size 3^12 over its base .. RUBRIC:: The base ring of a Drinfeld module @@ -222,9 +222,9 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: phi.base_morphism() Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + From: Univariate Polynomial Ring in T over Finite Field in z2 of size 3^2 To: Finite Field in z of size 3^12 over its base - Defn: X |--> z + Defn: T |--> z Note that the base ring is *not* the field `K`. Rather, it is a ring extension (see :class:`sage.rings.ring_extension.RingExtension`) @@ -241,9 +241,9 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: phi.base_morphism() Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + From: Univariate Polynomial Ring in T over Finite Field in z2 of size 3^2 To: Finite Field in z of size 3^12 over its base - Defn: X |--> z + Defn: T |--> z :: @@ -252,28 +252,28 @@ class DrinfeldModule(Parent, UniqueRepresentation): :: - sage: phi.function_ring() # Fq[X] - Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + sage: phi.function_ring() # Fq[T] + Univariate Polynomial Ring in T over Finite Field in z2 of size 3^2 :: - sage: phi.gen() # phi_X + sage: phi.gen() # phi_T t^2 + t + z - sage: phi.gen() == phi(X) + sage: phi.gen() == phi(T) True :: - sage: phi.constant_coefficient() # Constant coefficient of phi_X + sage: phi.constant_coefficient() # Constant coefficient of phi_T z :: sage: phi.morphism() # The Drinfeld module as a morphism Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 3^2 + From: Univariate Polynomial Ring in T over Finite Field in z2 of size 3^2 To: Ore Polynomial Ring in t over Finite Field in z of size 3^12 over its base twisted by Frob^2 - Defn: X |--> t^2 + t + z + Defn: T |--> t^2 + t + z One can compute the rank and height:: @@ -287,9 +287,9 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: phi.j_invariant() # j-invariant 1 - A Drinfeld `\mathbb{F}_q[X]`-module can be seen as an Ore + A Drinfeld `\mathbb{F}_q[T]`-module can be seen as an Ore polynomial with positive degree and constant coefficient - `\gamma(X)`, where `\gamma` is the base morphism. This analogy is + `\gamma(T)`, where `\gamma` is the base morphism. This analogy is the motivation for the following methods:: sage: phi.coefficients() @@ -305,13 +305,13 @@ class DrinfeldModule(Parent, UniqueRepresentation): A morphism of Drinfeld modules `\phi \to \psi` is an Ore polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for every `a` in - the function ring. In our case, this is equivalent to `f \phi_X = - \psi_X f`. An isogeny is a nonzero morphism. + the function ring. In our case, this is equivalent to `f \phi_T = + \psi_T f`. An isogeny is a nonzero morphism. Use the ``in`` syntax to test if an Ore polynomial defines a morphism:: - sage: phi(X) in Hom(phi, phi) + sage: phi(T) in Hom(phi, phi) True sage: t^6 in Hom(phi, phi) True @@ -380,10 +380,10 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: ore_pol = (2*z^6 + z^3 + 2*z^2 + z + 2)*t + z^11 + 2*z^10 + 2*z^9 + 2*z^8 + z^7 + 2*z^6 + z^5 + z^3 + z^2 + z sage: psi = phi.velu(ore_pol) sage: psi - Drinfeld module defined by X |--> (2*z^11 + 2*z^9 + z^6 + 2*z^5 + 2*z^4 + 2*z^2 + 1)*t^2 + (2*z^11 + 2*z^10 + 2*z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z)*t + z over base Finite Field in z of size 3^12 over its base + Drinfeld module defined by T |--> (2*z^11 + 2*z^9 + z^6 + 2*z^5 + 2*z^4 + 2*z^2 + 1)*t^2 + (2*z^11 + 2*z^10 + 2*z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z)*t + z over base Finite Field in z of size 3^12 over its base sage: ore_pol in Hom(phi, psi) True - sage: ore_pol * phi(X) == psi(X) * ore_pol + sage: ore_pol * phi(T) == psi(T) * ore_pol True If the input does not define an isogeny, an exception is raised: @@ -399,8 +399,8 @@ class DrinfeldModule(Parent, UniqueRepresentation): .. RUBRIC:: The action of a Drinfeld module - The `\mathbb{F}_q[X]`-Drinfeld module `\phi` induces a special left - `\mathbb{F}_q[X]`-module structure on any field extension `L/K`. Let + The `\mathbb{F}_q[T]`-Drinfeld module `\phi` induces a special left + `\mathbb{F}_q[T]`-module structure on any field extension `L/K`. Let `x \in L` and `a` be in the function ring; the action is defined as `(a, x) \mapsto \phi_a(x)`. The method :meth:`action` returns an ``Action`` object representing the Drinfeld module action. @@ -411,18 +411,18 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: action = phi.action() sage: action - Action on Finite Field in z of size 3^12 over its base induced by Drinfeld module defined by X |--> t^2 + t + z over base Finite Field in z of size 3^12 over its base + Action on Finite Field in z of size 3^12 over its base induced by Drinfeld module defined by T |--> t^2 + t + z over base Finite Field in z of size 3^12 over its base The action on elements is computed by calling the action object:: - sage: P = X + 1 + sage: P = T + 1 sage: a = z sage: action(P, a) ... z^9 + 2*z^8 + 2*z^7 + 2*z^6 + 2*z^3 + z^2 sage: action(0, K.random_element()) 0 - sage: action(FqX.random_element(), 0) + sage: action(A.random_element(), 0) 0 .. RUBRIC:: Inverting the Drinfeld module @@ -432,7 +432,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): `a`, one can retrieve `a` (as a morphism, a Drinfeld module is injective, see [Gos1998]_, cor. 4.5.2.):: - sage: a = FqX.random_element() + sage: a = A.random_element() sage: phi.invert(phi(a)) == a True @@ -442,8 +442,8 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: Fq = GF(2) sage: K. = Fq.extension(2) - sage: FqX. = Fq[] - sage: DrinfeldModule(FqX, [K(1)]) + sage: A. = Fq[] + sage: DrinfeldModule(A, [K(1)]) Traceback (most recent call last): ... ValueError: generator must have positive degree @@ -452,20 +452,20 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: Fq = GF(2) sage: K. = Fq.extension(2) - sage: FqX. = Fq[] - sage: DrinfeldModule(FqX, [K(0), K(1)]) + sage: A. = Fq[] + sage: DrinfeldModule(A, [K(0), K(1)]) Traceback (most recent call last): ... ValueError: constant coefficient must be nonzero The coefficients of the generator must lie in an - `\mathbb{F}_q[X]`-field, where `\mathbb{F}_q[X]` is the function + `\mathbb{F}_q[T]`-field, where `\mathbb{F}_q[T]` is the function ring of the Drinfeld module:: sage: Fq = GF(2) sage: K. = Fq.extension(2) - sage: FqX. = Fq[] - sage: DrinfeldModule(FqX, [z, QQ(1)]) + sage: A. = Fq[] + sage: DrinfeldModule(A, [z, QQ(1)]) Traceback (most recent call last): ... ValueError: function ring base must coerce into base ring @@ -474,8 +474,8 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: Fq = GF(2) sage: K. = Fq.extension(2) - sage: FqX. = Fq[] - sage: DrinfeldModule(FqX, [1, QQ(1)]) + sage: A. = Fq[] + sage: DrinfeldModule(A, [1, QQ(1)]) Traceback (most recent call last): ... ValueError: function ring base must coerce into base ring @@ -485,7 +485,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: Fq = GF(2) sage: K. = Fq.extension(2) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: DrinfeldModule(K, [z, 1, 1]) Traceback (most recent call last): ... @@ -495,9 +495,9 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: Fq = GF(2) sage: K. = Fq.extension(2) - sage: FqX. = Fq[] - sage: FqXY. = FqX[] - sage: DrinfeldModule(FqXY, [z, 1, 1]) + sage: A. = Fq[] + sage: AY. = A[] + sage: DrinfeldModule(AY, [z, 1, 1]) Traceback (most recent call last): ... TypeError: function ring base must be a finite field @@ -508,8 +508,8 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: Fq = GF(2) sage: K. = Fq.extension(2) - sage: FqX. = Fq[] - sage: phi = DrinfeldModule(FqX, [z, 1]) + sage: A. = Fq[] + sage: phi = DrinfeldModule(A, [z, 1]) sage: phi.category().object([1, 1, K(1)]) Traceback (most recent call last): ... @@ -519,8 +519,8 @@ class DrinfeldModule(Parent, UniqueRepresentation): :: sage: Fq = K = GF(2) - sage: FqX. = Fq[] - sage: phi = DrinfeldModule(FqX, [1, 1]) + sage: A. = Fq[] + sage: phi = DrinfeldModule(A, [1, 1]) Traceback (most recent call last): ... ValueError: function ring base must coerce into base ring @@ -528,28 +528,28 @@ class DrinfeldModule(Parent, UniqueRepresentation): :: sage: Fq = K = GF(2) - sage: FqX. = Fq[] - sage: phi = DrinfeldModule(FqX, [K(1), 1]) + sage: A. = Fq[] + sage: phi = DrinfeldModule(A, [K(1), 1]) sage: isinstance(phi.ore_polring(), OrePolynomialRing) True Test that the base morphism is correct:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K = Frac(Fq) - sage: phi = DrinfeldModule(FqX, [Fq.gen(), K(1)]) + sage: phi = DrinfeldModule(A, [Fq.gen(), K(1)]) sage: phi.base().codomain() is K True :: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: k = Frac(Fq) - sage: kT. = k[] - sage: K = k.extension(T^3 + T + 1) - sage: phi = DrinfeldModule(FqX, [Fq.gen(), K.gen()]) + sage: kS. = k[] + sage: K = k.extension(S^3 + S + 1) + sage: phi = DrinfeldModule(A, [Fq.gen(), K.gen()]) sage: phi.base().codomain() is K True @@ -557,20 +557,20 @@ class DrinfeldModule(Parent, UniqueRepresentation): of definition of the coefficients:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: k = Frac(Fq) - sage: kT. = k[] - sage: K = k.extension(T^3 + T + 1) - sage: phi = DrinfeldModule(FqX, [K(k.gen()), 1]) + sage: kS. = k[] + sage: K = k.extension(S^3 + S + 1) + sage: phi = DrinfeldModule(A, [K(k.gen()), 1]) sage: phi.base().codomain() is K True :: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K = Fq.extension(2) - sage: phi = DrinfeldModule(FqX, [Fq.gen(), K(Fq.gen())]) + sage: phi = DrinfeldModule(A, [Fq.gen(), K(Fq.gen())]) sage: phi.base().codomain() is K True """ @@ -596,17 +596,17 @@ def __classcall_private__(cls, function_ring, gen, name='t'): sage: from sage.rings.function_field.drinfeld_modules.finite_drinfeld_module import FiniteDrinfeldModule sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: isinstance(phi, FiniteDrinfeldModule) True :: - sage: K = Frac(FqX) - sage: phi = DrinfeldModule(FqX, [K(X), 1]) + sage: K = Frac(A) + sage: phi = DrinfeldModule(A, [K(T), 1]) sage: isinstance(psi, FiniteDrinfeldModule) False """ @@ -616,7 +616,7 @@ def __classcall_private__(cls, function_ring, gen, name='t'): # the category. Another problem is that those lines are # duplicate. As a general comment, there are sanity checks both # here and in the category constructor, which is not ideal. - # Check domain is Fq[X] + # Check domain is Fq[T] if not isinstance(function_ring, PolynomialRing_general): raise NotImplementedError('function ring must be a polynomial ' 'ring') @@ -632,7 +632,7 @@ def __classcall_private__(cls, function_ring, gen, name='t'): # Base ring without morphism structure: base_ring_noext = ore_polring.base() name = ore_polring.variable_name() - # `gen` is a list of coefficients (function_ring = Fq[X]): + # `gen` is a list of coefficients (function_ring = Fq[T]): elif isinstance(gen, (list, tuple)): ore_polring = None # Base ring without morphism structure: @@ -688,21 +688,21 @@ def __init__(self, gen, category): TESTS:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: gen = [p_root, z12^3, z12^5] - sage: phi = DrinfeldModule(FqX, gen) + sage: phi = DrinfeldModule(A, gen) sage: ore_polring = phi.ore_polring() sage: phi._base == phi.category().base() True - sage: phi._function_ring == FqX + sage: phi._function_ring == A True sage: phi._gen == ore_polring(gen) True sage: phi._ore_polring == ore_polring True - sage: phi._morphism == Hom(FqX, ore_polring)(phi._gen) + sage: phi._morphism == Hom(A, ore_polring)(phi._gen) True """ self._base = category.base() @@ -728,14 +728,14 @@ def __call__(self, a): TESTS:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) :: - sage: a = X^3 + 4*X + 2 - sage: phi(a) == phi(X)^3 + 4*phi(X) + 2 + sage: a = T^3 + 4*T + 2 + sage: phi(a) == phi(T)^3 + 4*phi(T) + 2 True sage: phi(a)[0] == p_root^3 + 4*p_root + 2 True @@ -746,12 +746,12 @@ def __call__(self, a): 0 sage: phi(1) 1 - sage: phi(X) == phi._gen + sage: phi(T) == phi._gen True :: - sage: a = FqX.random_element(5) + sage: a = A.random_element(5) sage: phi(a)[0] == phi.category().base()(a) True """ @@ -776,10 +776,10 @@ def _Hom_(self, other, category): EXAMPLES:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: t = phi.ore_polring().gen() sage: isog = t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 sage: psi = phi.velu(isog) @@ -800,12 +800,12 @@ def _check_rank_two(self): TESTS:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: phi._check_rank_two() - sage: phi = DrinfeldModule(FqX, [p_root, 1]) + sage: phi = DrinfeldModule(A, [p_root, 1]) sage: phi._check_rank_two() Traceback (most recent call last): ... @@ -823,12 +823,12 @@ def _latex_(self): EXAMPLES:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: latex(phi) - \text{Drinfeld{ }module{ }defined{ }by{ }} X \mapsto z_{12}^{5} t^{2} + z_{12}^{3} t + 2 z_{12}^{11} + 2 z_{12}^{10} + z_{12}^{9} + 3 z_{12}^{8} + z_{12}^{7} + 2 z_{12}^{5} + 2 z_{12}^{4} + 3 z_{12}^{3} + z_{12}^{2} + 2 z_{12}\text{{ }over{ }base{ }}\Bold{F}_{5^{12}} + \text{Drinfeld{ }module{ }defined{ }by{ }} T \mapsto z_{12}^{5} t^{2} + z_{12}^{3} t + 2 z_{12}^{11} + 2 z_{12}^{10} + z_{12}^{9} + 3 z_{12}^{8} + z_{12}^{7} + 2 z_{12}^{5} + 2 z_{12}^{4} + 3 z_{12}^{3} + z_{12}^{2} + 2 z_{12}\text{{ }over{ }base{ }}\Bold{F}_{5^{12}} """ return f'\\text{{Drinfeld{{ }}module{{ }}defined{{ }}by{{ }}}} ' \ f'{latex(self._function_ring.gen())} '\ @@ -844,12 +844,12 @@ def _repr_(self): EXAMPLES:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: phi - Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base + Drinfeld module defined by T |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base """ return f'Drinfeld module defined by {self._function_ring.gen()} ' \ f'|--> {self._gen} over base {self._base}' @@ -866,17 +866,17 @@ def action(self): EXAMPLES:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: action = phi.action() sage: action - Action on Finite Field in z12 of size 5^12 over its base induced by Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base + Action on Finite Field in z12 of size 5^12 over its base induced by Drinfeld module defined by T |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base The action on elements is computed as follows:: - sage: P = X^2 + X + 1 + sage: P = T^2 + T + 1 sage: a = z12 + 1 sage: action(P, a) 3*z12^11 + 2*z12^10 + 3*z12^9 + 3*z12^7 + 4*z12^5 + z12^4 + z12^3 + 2*z12 + 1 @@ -901,10 +901,10 @@ def coefficient(self, n): EXAMPLES:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: phi.coefficient(0) 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi.coefficient(0) == p_root @@ -940,10 +940,10 @@ def coefficients(self, sparse=True): EXAMPLES:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: phi.coefficients() [2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12, z12^3, @@ -952,7 +952,7 @@ def coefficients(self, sparse=True): Careful, the method only returns the nonzero coefficients, unless otherwise specified:: - sage: rho = DrinfeldModule(FqX, [p_root, 0, 0, 0, 1]) + sage: rho = DrinfeldModule(A, [p_root, 0, 0, 0, 1]) sage: rho.coefficients() [2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12, 1] @@ -974,11 +974,11 @@ def gen(self): EXAMPLES:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: phi.gen() == phi(X) + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) + sage: phi.gen() == phi(T) True """ return self._gen @@ -1008,26 +1008,26 @@ def height(self): EXAMPLES:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: phi.height() == 1 True sage: phi.is_ordinary() True - sage: L = Frac(FqX) - sage: phi = DrinfeldModule(FqX, [L(2), L(1)]) + sage: L = Frac(A) + sage: phi = DrinfeldModule(A, [L(2), L(1)]) sage: phi.height() Traceback (most recent call last): ... ValueError: height is defined for prime function field characteristic sage: Fq = GF(343) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(2) - sage: phi = DrinfeldModule(FqX, [1, 0, z6]) + sage: phi = DrinfeldModule(A, [1, 0, z6]) sage: phi.height() 2 sage: phi.is_supersingular() @@ -1060,14 +1060,14 @@ def invert(self, ore_pol): EXAMPLES:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) - sage: a = FqX.random_element() + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) + sage: a = A.random_element() sage: phi.invert(phi(a)) == a True - sage: phi.invert(phi(X)) == X + sage: phi.invert(phi(T)) == T True sage: phi.invert(phi(Fq.gen())) == Fq.gen() True @@ -1092,7 +1092,7 @@ def invert(self, ore_pol): TESTS:: - sage: a = FqX.random_element() + sage: a = A.random_element() sage: cat = phi.category() sage: phi_r1 = cat.random_object(1) sage: phi_r1.invert(phi_r1(a)) == a @@ -1121,12 +1121,12 @@ def invert(self, ore_pol): 'module') k = deg // r - X = self._function_ring.gen() + T = self._function_ring.gen() mat_lines = [[0 for _ in range(k+1)] for _ in range(k+1)] for i in range(k+1): - phi_X_i = self(X**i) + phi_T_i = self(T**i) for j in range(i+1): - mat_lines[j][i] = phi_X_i[r*j] + mat_lines[j][i] = phi_T_i[r*j] mat = Matrix(mat_lines) vec = vector([list(ore_pol)[r*j] for j in range(k+1)]) pre_image = self._function_ring(list((mat**(-1)) * vec)) @@ -1146,14 +1146,14 @@ def is_finite(self): EXAMPLES:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: phi.is_finite() True - sage: L = Frac(FqX) - sage: psi = DrinfeldModule(FqX, [L(2), L(1)]) + sage: L = Frac(A) + sage: psi = DrinfeldModule(A, [L(2), L(1)]) sage: psi.is_finite() False """ @@ -1165,7 +1165,7 @@ def j_invariant(self): Return the j-invariant of the Drinfeld module if the rank is two; raise a NotImplementedError otherwise. - Assume the rank is two. Write the generator `\phi_X = \omega + + Assume the rank is two. Write the generator `\phi_T = \omega + g\tau + \Delta\tau^2`. The j-invariant is defined by `\frac{g^{q+1}}{\Delta}`, `q` being the order of the base ring of the function ring. In our case, this field is always finite. @@ -1175,22 +1175,22 @@ def j_invariant(self): EXAMPLES:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: phi.j_invariant() z12^10 + 4*z12^9 + 3*z12^8 + 2*z12^7 + 3*z12^6 + z12^5 + z12^3 + 4*z12^2 + z12 + 2 - sage: psi = DrinfeldModule(FqX, [p_root, 1, 1]) + sage: psi = DrinfeldModule(A, [p_root, 1, 1]) sage: psi.j_invariant() 1 - sage: rho = DrinfeldModule(FqX, [p_root, 0, 1]) + sage: rho = DrinfeldModule(A, [p_root, 0, 1]) sage: rho.j_invariant() 0 The rank must be two:: - sage: theta = DrinfeldModule(FqX, [p_root, 1, 0]) + sage: theta = DrinfeldModule(A, [p_root, 1, 0]) sage: theta.j_invariant() Traceback (most recent call last): ... @@ -1212,15 +1212,15 @@ def morphism(self): EXAMPLES:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: phi.morphism() Ring morphism: - From: Univariate Polynomial Ring in X over Finite Field in z2 of size 5^2 + From: Univariate Polynomial Ring in T over Finite Field in z2 of size 5^2 To: Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 over its base twisted by Frob^2 - Defn: X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + Defn: T |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: from sage.rings.morphism import RingHomomorphism sage: isinstance(phi.morphism(), RingHomomorphism) True @@ -1228,9 +1228,9 @@ def morphism(self): Actually, the ``DrinfeldModule`` method :meth:`__call__` simply class the ``__call__`` method of this morphism:: - sage: phi.morphism()(X) == phi(X) + sage: phi.morphism()(T) == phi(T) True - sage: a = FqX.random_element() + sage: a = A.random_element() sage: phi.morphism()(a) == phi(a) True @@ -1244,7 +1244,7 @@ class the ``__call__`` method of this morphism:: True sage: m.im_gens() [z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12] - sage: phi(X) == m.im_gens()[0] + sage: phi(T) == m.im_gens()[0] True """ return self._morphism @@ -1260,16 +1260,16 @@ def rank(self): EXAMPLES:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: phi.rank() 2 - sage: psi = DrinfeldModule(FqX, [p_root, 2]) + sage: psi = DrinfeldModule(A, [p_root, 2]) sage: psi.rank() 1 - sage: rho = DrinfeldModule(FqX, [p_root, 0, 0, 0, 1]) + sage: rho = DrinfeldModule(A, [p_root, 0, 0, 0, 1]) sage: rho.rank() 4 """ @@ -1311,21 +1311,21 @@ def velu(self, isog): EXAMPLES:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: t = phi.ore_polring().gen() sage: isog = t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 sage: psi = phi.velu(isog) sage: psi - Drinfeld module defined by X |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base + Drinfeld module defined by T |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base sage: isog in Hom(phi, psi) True This method works for endomorphisms as well:: - sage: phi.velu(phi(X)) is phi + sage: phi.velu(phi(T)) is phi True sage: phi.velu(t^6) is phi True diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 89fc6744209..5722d04d175 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -44,11 +44,11 @@ class FiniteDrinfeldModule(DrinfeldModule): ``FiniteDrinfeldModule`` depending on the input:: sage: Fq = GF(343) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(2) - sage: phi = DrinfeldModule(FqX, [z6, 0, 5]) + sage: phi = DrinfeldModule(A, [z6, 0, 5]) sage: phi - Drinfeld module defined by X |--> 5*t^2 + z6 over base Finite Field in z6 of size 7^6 over its base + Drinfeld module defined by T |--> 5*t^2 + z6 over base Finite Field in z6 of size 7^6 over its base :: @@ -84,19 +84,19 @@ class FiniteDrinfeldModule(DrinfeldModule): sage: chi = phi.frobenius_charpoly() sage: chi - T^2 + (X + 2*z3^2 + 2*z3 + 1)*T + 2*X^2 + (z3^2 + z3 + 4)*X + 2*z3 + X^2 + (T + 2*z3^2 + 2*z3 + 1)*X + 2*T^2 + (z3^2 + z3 + 4)*T + 2*z3 sage: frob_pol = frobenius_endomorphism.ore_polynomial() - sage: chi(frob_pol, phi(X)) + sage: chi(frob_pol, phi(T)) 0 This makes it possible to compute the Frobenius trace and norm:: sage: phi.frobenius_trace() - 6*X + 5*z3^2 + 5*z3 + 6 + 6*T + 5*z3^2 + 5*z3 + 6 sage: phi.frobenius_trace() == -chi[1] True sage: phi.frobenius_norm() - 2*X^2 + (z3^2 + z3 + 4)*X + 2*z3 + 2*T^2 + (z3^2 + z3 + 4)*T + 2*z3 And to decide if a Drinfeld module is ordinary or supersingular:: @@ -125,11 +125,11 @@ def __init__(self, gen, category): TESTS:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: gen = [p_root, z12^3, z12^5] - sage: phi = DrinfeldModule(FqX, gen) + sage: phi = DrinfeldModule(A, gen) sage: ore_polring = phi.ore_polring() sage: phi._gen == ore_polring(gen) True @@ -157,9 +157,9 @@ def frobenius_endomorphism(self): EXAMPLES:: sage: Fq = GF(343) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(2) - sage: phi = DrinfeldModule(FqX, [1, 0, z6]) + sage: phi = DrinfeldModule(A, [1, 0, z6]) sage: phi.frobenius_endomorphism() Drinfeld Module morphism: From (gen): z6*t^2 + 1 @@ -190,15 +190,15 @@ def frobenius_charpoly(self, var='T'): characteristic polynomial of the Frobenius endomorphism as a bivariate polynomial. - Let `\chi = T^2 - A(X)T + B(X)` be the characteristic polynomial + Let `\chi = X^2 - A(T)X + B(T)` be the characteristic polynomial of the Frobenius endomorphism, let `t^n` be the Ore polynomial that defines the Frobenius endomorphism of `\phi`; by definition, `n` is the degree over `\mathbb{F}_q` of the base - codomain. We have `\chi(t^n)(\phi(X)) = t^{2n} - \phi_A t^n + + codomain. We have `\chi(t^n)(\phi(T)) = t^{2n} - \phi_A t^n + \phi_B = 0`, with `\deg(A) \leq \frac{n}{2}` and `\deg(B) = n`. - Note that the *Frobenius trace* is defined as `A(X)` and the - *Frobenius norm* is defined as `B(X)`. + Note that the *Frobenius trace* is defined as `A(T)` and the + *Frobenius norm* is defined as `B(T)`. INPUT: (default: ``'T'``) the name of the second variable @@ -208,9 +208,9 @@ def frobenius_charpoly(self, var='T'): EXAMPLES:: sage: Fq = GF(343) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(2) - sage: phi = DrinfeldModule(FqX, [1, 0, z6]) + sage: phi = DrinfeldModule(A, [1, 0, z6]) sage: chi = phi.frobenius_charpoly() sage: chi T^2 + ((3*z3^2 + z3 + 4)*X + 4*z3^2 + 6*z3 + 3)*T + (5*z3^2 + 2*z3)*X^2 + (4*z3^2 + 3*z3)*X + 5*z3^2 + 2*z3 @@ -218,24 +218,24 @@ def frobenius_charpoly(self, var='T'): :: sage: frob_pol = phi.frobenius_endomorphism().ore_polynomial() - sage: chi(frob_pol, phi(X)) + sage: chi(frob_pol, phi(T)) 0 :: - sage: A = phi.frobenius_trace() - sage: A - (4*z3^2 + 6*z3 + 3)*X + 3*z3^2 + z3 + 4 - sage: B = phi.frobenius_norm() - sage: B - (5*z3^2 + 2*z3)*X^2 + (4*z3^2 + 3*z3)*X + 5*z3^2 + 2*z3 + sage: trace = phi.frobenius_trace() + sage: trace + (4*z3^2 + 6*z3 + 3)*T + 3*z3^2 + z3 + 4 + sage: norm = phi.frobenius_norm() + sage: norm + (5*z3^2 + 2*z3)*T^2 + (4*z3^2 + 3*z3)*T + 5*z3^2 + 2*z3 :: sage: n = 2 # Degree over Fq of the base codomain - sage: A.degree() <= n/2 + sage: trace.degree() <= n/2 True - sage: B.degree() == n + sage: norm.degree() == n True ALGORITHM: @@ -249,8 +249,8 @@ def frobenius_charpoly(self, var='T'): computation of the norm and of the trace. """ self._check_rank_two() - A = self._function_ring # Fq[X] - S = PolynomialRing(A, name=var) # Fq[X][T] + A = self._function_ring # Fq[T] + S = PolynomialRing(A, name=var) # Fq[T][T] # Does not work when Fq is not a prime field... # chi = self._gen.reduced_charpoly() # return -chi(A.gen(), S.gen()) @@ -261,10 +261,10 @@ def frobenius_norm(self): Return Frobenius norm of the Drinfeld module, if the rank is two; raise a NotImplementedError otherwise. - Let `\mathbb{F}_q[X]` be the function ring, write `\chi = T^2 - - A(X)T + B(X) \in \mathbb{F}_q[X][T]` for the characteristic + Let `\mathbb{F}_q[T]` be the function ring, write `\chi = X^2 - + A(T)X + B(T) \in \mathbb{F}_q[T][X]` for the characteristic polynomial of the Frobenius endomorphism. The *Frobenius norm* - is defined as the polynomial `B(X) \in \mathbb{F}_q[X]`. + is defined as the polynomial `B(T) \in \mathbb{F}_q[T]`. Let `n` be the degree over `\mathbb{F}_q` of the base codomain. Then the Frobenius norm has degree `n`. @@ -274,12 +274,12 @@ def frobenius_norm(self): EXAMPLES:: sage: Fq = GF(343) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(2) - sage: phi = DrinfeldModule(FqX, [1, 0, z6]) + sage: phi = DrinfeldModule(A, [1, 0, z6]) sage: B = phi.frobenius_norm() sage: B - (5*z3^2 + 2*z3)*X^2 + (4*z3^2 + 3*z3)*X + 5*z3^2 + 2*z3 + (5*z3^2 + 2*z3)*T^2 + (4*z3^2 + 3*z3)*T + 5*z3^2 + 2*z3 :: @@ -315,10 +315,10 @@ def frobenius_trace(self): Return Frobenius norm of the Drinfeld module, if the rank is two; raise a NotImplementedError otherwise. - Let `\mathbb{F}_q[X]` be the function ring, write `\chi = T^2 - - A(X)T + B(X) \in \mathbb{F}_q[X][T]` for the characteristic + Let `\mathbb{F}_q[T]` be the function ring, write `\chi = T^2 - + A(X)T + B(X) \in \mathbb{F}_q[T][T]` for the characteristic polynomial of the Frobenius endomorphism. The *Frobenius norm* - is defined as the polynomial `B(X) \in \mathbb{F}_q[X]`. + is defined as the polynomial `B(T) \in \mathbb{F}_q[T]`. Let `n` be the degree over `\mathbb{F}_q` of the base codomain. Then the Frobenius trace has degree `\leq \frac{n}{2}`. @@ -327,13 +327,13 @@ def frobenius_trace(self): ALGORITHM: - Let `A(X)` denote the Frobenius trace and `B(X)` denote the - Frobenius norm. We begin by computing `B(X)`, see docstring + Let `A(T)` denote the Frobenius trace and `B(T)` denote the + Frobenius norm. We begin by computing `B(T)`, see docstring of method :meth:`frobenius_norm` for details. The characteristic polynomial of the Frobenius yields `t^{2n} - \phi_A t^n + \phi_B = 0`, where `t^n` is the Frobenius endomorphism. As `\phi_B` is now known, we can compute - `\phi_A = (t^{2n} + \phi_B) / t^n`. We get `A(X)` by + `\phi_A = (t^{2n} + \phi_B) / t^n`. We get `A(T)` by inverting this quantity, using the method :meth:`sage.rings.function_fields.drinfeld_module.drinfeld_module.DrinfeldModule.invert`, see its docstring for details. @@ -341,12 +341,12 @@ def frobenius_trace(self): EXAMPLES:: sage: Fq = GF(343) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(2) - sage: phi = DrinfeldModule(FqX, [1, 0, z6]) + sage: phi = DrinfeldModule(A, [1, 0, z6]) sage: A = phi.frobenius_trace() sage: A - (4*z3^2 + 6*z3 + 3)*X + 3*z3^2 + z3 + 4 + (4*z3^2 + 6*z3 + 3)*T + 3*z3^2 + z3 + 4 :: @@ -386,9 +386,9 @@ def is_ordinary(self): EXAMPLES:: sage: Fq = GF(343) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(2) - sage: phi = DrinfeldModule(FqX, [1, 0, z6]) + sage: phi = DrinfeldModule(A, [1, 0, z6]) sage: phi.is_ordinary() False sage: phi_p = phi(phi.characteristic()) @@ -398,10 +398,10 @@ def is_ordinary(self): ALGORITHM: Compute the Frobenius trace and test if the - `\mathbb{F}_q[X]` characteristic divides it. + `\mathbb{F}_q[T]` characteristic divides it. We could also test if the image of the - `\mathbb{F}_q[X]`-characteristic under the Drinfeld module + `\mathbb{F}_q[T]`-characteristic under the Drinfeld module is purely inseparable; see [Gek1991]_, Proposition 4.1. """ self._check_rank_two() @@ -422,9 +422,9 @@ def is_supersingular(self): EXAMPLES:: sage: Fq = GF(343) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(2) - sage: phi = DrinfeldModule(FqX, [1, 0, z6]) + sage: phi = DrinfeldModule(A, [1, 0, z6]) sage: phi.is_supersingular() True sage: phi(phi.characteristic()) # Purely inseparable diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index 690d35653b8..812301bdbdf 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -39,10 +39,10 @@ class DrinfeldModuleHomset(Homset): EXAMPLES:: sage: Fq = GF(27) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(2) - sage: phi = DrinfeldModule(FqX, [z6, z6, 2]) - sage: psi = DrinfeldModule(FqX, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) + sage: phi = DrinfeldModule(A, [z6, z6, 2]) + sage: psi = DrinfeldModule(A, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) sage: hom = Hom(phi, psi) sage: hom Set of Drinfeld module morphisms from (gen) 2*t^2 + z6*t + z6 to (gen) 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 @@ -64,7 +64,7 @@ class DrinfeldModuleHomset(Homset): The domain and codomain must have the same Drinfeld modules category:: - sage: rho = DrinfeldModule(FqX, [Frac(FqX)(X), 1]) + sage: rho = DrinfeldModule(A, [Frac(A)(T), 1]) sage: Hom(phi, rho) Traceback (most recent call last): ... @@ -72,7 +72,7 @@ class DrinfeldModuleHomset(Homset): :: - sage: sigma = DrinfeldModule(FqX, [1, z6, 2]) + sage: sigma = DrinfeldModule(A, [1, z6, 2]) sage: Hom(phi, sigma) Traceback (most recent call last): ... @@ -152,10 +152,10 @@ def __init__(self, X, Y, category=None, check=True): TESTS:: sage: Fq = GF(27) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(2) - sage: phi = DrinfeldModule(FqX, [z6, z6, 2]) - sage: psi = DrinfeldModule(FqX, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) + sage: phi = DrinfeldModule(A, [z6, z6, 2]) + sage: psi = DrinfeldModule(A, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) sage: hom = Hom(phi, psi) sage: hom.domain() is phi True @@ -183,10 +183,10 @@ def _latex_(self): EXAMPLES:: sage: Fq = GF(27) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(2) - sage: phi = DrinfeldModule(FqX, [z6, z6, 2]) - sage: psi = DrinfeldModule(FqX, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) + sage: phi = DrinfeldModule(A, [z6, z6, 2]) + sage: psi = DrinfeldModule(A, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) sage: hom = Hom(phi, psi) sage: latex(hom) \text{Set{ }of{ }Drinfeld{ }module{ }morphisms{ }from{ }(gen){ }}2 t^{2} + z_{6} t + z_{6}\text{{ }to{ }(gen){ }}2 t^{2} + \left(2 z_{6}^{5} + 2 z_{6}^{4} + 2 z_{6} + 1\right) t + z_{6} @@ -205,10 +205,10 @@ def _repr_(self): EXAMPLES:: sage: Fq = GF(27) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(2) - sage: phi = DrinfeldModule(FqX, [z6, z6, 2]) - sage: psi = DrinfeldModule(FqX, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) + sage: phi = DrinfeldModule(A, [z6, z6, 2]) + sage: psi = DrinfeldModule(A, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) sage: hom = Hom(phi, psi) sage: hom Set of Drinfeld module morphisms from (gen) 2*t^2 + z6*t + z6 to (gen) 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 @@ -232,10 +232,10 @@ def __contains__(self, x): In the next examples, the input is an Ore polynomial:: sage: Fq = GF(27) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(2) - sage: phi = DrinfeldModule(FqX, [z6, z6, 2]) - sage: psi = DrinfeldModule(FqX, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) + sage: phi = DrinfeldModule(A, [z6, z6, 2]) + sage: psi = DrinfeldModule(A, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) sage: hom = Hom(phi, psi) sage: end = End(phi) sage: t = phi.ore_polring().gen() @@ -284,10 +284,10 @@ def _element_constructor_(self, *args, **kwds): EXAMPLES:: sage: Fq = GF(27) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(2) - sage: phi = DrinfeldModule(FqX, [z6, z6, 2]) - sage: psi = DrinfeldModule(FqX, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) + sage: phi = DrinfeldModule(A, [z6, z6, 2]) + sage: psi = DrinfeldModule(A, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) sage: hom = Hom(phi, psi) sage: end = End(phi) sage: t = phi.ore_polring().gen() diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 6383a9b2aad..a0ef455704e 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -29,10 +29,10 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, r""" This class represents a Drinfeld module morphism. - Let `\phi, \psi` be two Drinfeld modules with base `\gamma: \mathbb{F}_q[X] + Let `\phi, \psi` be two Drinfeld modules with base `\gamma: \mathbb{F}_q[T] \to K`. A *morphism of Drinfeld modules `\phi \to \psi`* is an Ore polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for every `a - \in \mathbb{F}_q[X]`. In our case, this is equivalent to `f \phi_X = \psi_X + \in \mathbb{F}_q[T]`. In our case, this is equivalent to `f \phi_T = \psi_T f`. An *isogeny* is a nonzero morphism. To create a morphism object, the user should never explicitly @@ -40,10 +40,10 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, homset with the defining Ore polynomial:: sage: Fq = GF(25) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(FqX, [p_root, z12^3, z12^5]) + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: t = phi.ore_polring().gen() sage: ore_pol = t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 sage: psi = phi.velu(ore_pol) @@ -64,14 +64,14 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, One can get basic data on the morphism:: sage: morphism.domain() - Drinfeld module defined by X |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base + Drinfeld module defined by T |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base sage: morphism.domain() is phi True :: sage: morphism.codomain() - Drinfeld module defined by X |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base + Drinfeld module defined by T |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base sage: morphism.codomain() is psi True @@ -138,10 +138,10 @@ def __classcall_private__(cls, parent, x): TESTS:: sage: Fq = GF(2) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) - sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) - sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) + sage: phi = DrinfeldModule(A, [z6, 1, 1]) + sage: psi = DrinfeldModule(A, [z6, z6^4 + z6^2 + 1, 1]) sage: t = phi.ore_polring().gen() sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) sage: morphism is Hom(phi, psi)(morphism) @@ -183,10 +183,10 @@ def __init__(self, parent, ore_pol): TESTS:: sage: Fq = GF(2) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) - sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) - sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) + sage: phi = DrinfeldModule(A, [z6, 1, 1]) + sage: psi = DrinfeldModule(A, [z6, z6^4 + z6^2 + 1, 1]) sage: t = phi.ore_polring().gen() sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) sage: morphism._domain is phi @@ -211,10 +211,10 @@ def _latex_(self): EXAMPLES:: sage: Fq = GF(2) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) - sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) - sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) + sage: phi = DrinfeldModule(A, [z6, 1, 1]) + sage: psi = DrinfeldModule(A, [z6, z6^4 + z6^2 + 1, 1]) sage: t = phi.ore_polring().gen() sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) sage: latex(morphism) @@ -244,10 +244,10 @@ def _repr_(self): EXAMPLES:: sage: Fq = GF(2) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) - sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) - sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) + sage: phi = DrinfeldModule(A, [z6, 1, 1]) + sage: psi = DrinfeldModule(A, [z6, z6^4 + z6^2 + 1, 1]) sage: t = phi.ore_polring().gen() sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) sage: morphism @@ -268,10 +268,10 @@ def is_zero(self): EXAMPLES:: sage: Fq = GF(2) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) - sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) - sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) + sage: phi = DrinfeldModule(A, [z6, 1, 1]) + sage: psi = DrinfeldModule(A, [z6, z6^4 + z6^2 + 1, 1]) sage: t = phi.ore_polring().gen() sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) sage: morphism.is_zero() @@ -292,10 +292,10 @@ def is_isogeny(self): EXAMPLES:: sage: Fq = GF(2) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) - sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) - sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) + sage: phi = DrinfeldModule(A, [z6, 1, 1]) + sage: psi = DrinfeldModule(A, [z6, z6^4 + z6^2 + 1, 1]) sage: t = phi.ore_polring().gen() sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) sage: morphism.is_isogeny() @@ -328,10 +328,10 @@ def is_isomorphism(self): EXAMPLES:: sage: Fq = GF(2) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) - sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) - sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) + sage: phi = DrinfeldModule(A, [z6, 1, 1]) + sage: psi = DrinfeldModule(A, [z6, z6^4 + z6^2 + 1, 1]) sage: t = phi.ore_polring().gen() sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) sage: morphism.is_isomorphism() @@ -364,10 +364,10 @@ def ore_polynomial(self): EXAMPLES:: sage: Fq = GF(2) - sage: FqX. = Fq[] + sage: A. = Fq[] sage: K. = Fq.extension(6) - sage: phi = DrinfeldModule(FqX, [z6, 1, 1]) - sage: psi = DrinfeldModule(FqX, [z6, z6^4 + z6^2 + 1, 1]) + sage: phi = DrinfeldModule(A, [z6, 1, 1]) + sage: psi = DrinfeldModule(A, [z6, z6^4 + z6^2 + 1, 1]) sage: t = phi.ore_polring().gen() sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) sage: ore_pol = morphism.ore_polynomial() @@ -376,7 +376,7 @@ def ore_polynomial(self): :: - sage: ore_pol * phi(X) == psi(X) * ore_pol + sage: ore_pol * phi(T) == psi(T) * ore_pol True """ return self._ore_polynomial From 774f670d75189f4ff2818f3130fc9761d4ceb541 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Mon, 6 Feb 2023 15:54:53 +0100 Subject: [PATCH 326/751] Adress David's comments - line 66: cal - line 79: function ring before definition - line 119: rewrite the note - line 140: other word for "precising" - line 190: pep8 --- .../function_field/drinfeld_modules/drinfeld_module.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 9f3784bbbc3..9066f5722a6 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -76,7 +76,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): 2. For every element `a` in the `\mathbb{F}_q[T]`, the constant coefficient `\phi(a)` is `\gamma(a)`. - For `a` in the function ring, `\phi(a)` is denoted `\phi_a`. + For `a` in `\mathbb{F}_q[T]`, `\phi(a)` is denoted `\phi_a`. The Drinfeld `\mathbb{F}_q[T]`-module `\phi` is uniquely determined by the image `\phi_T` of `T` — this serves as input of the class. @@ -137,8 +137,8 @@ class DrinfeldModule(Parent, UniqueRepresentation): .. RUBRIC:: Construction - A Drinfeld module object is constructed by precising the function - ring and the generator:: + A Drinfeld module object is constructed by giving the function ring + and the generator:: sage: Fq. = GF(3^2) sage: A. = Fq[] @@ -187,7 +187,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: phi(T) # phi_T, the generator of the Drinfeld module t^2 + t + z - sage: phi(T^3 + T + 1) # phi_(T^3 +T + 1) + sage: phi(T^3 + T + 1) # phi_(T^3 + T + 1) t^6 + (z^11 + z^9 + 2*z^6 + 2*z^4 + 2*z + 1)*t^4 + (2*z^11 + 2*z^10 + z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^3)*t^3 + (2*z^11 + z^10 + z^9 + 2*z^7 + 2*z^6 + z^5 + z^4 + 2*z^3 + 2*z + 2)*t^2 + (2*z^11 + 2*z^8 + 2*z^6 + z^5 + z^4 + 2*z^2)*t + z^3 + z + 1 sage: phi(1) # phi_1 1 From a70c2486b1cdee82305c5e1175353dcd0488d57c Mon Sep 17 00:00:00 2001 From: Kryzar Date: Mon, 6 Feb 2023 16:46:27 +0100 Subject: [PATCH 327/751] Add a LaTeX name for Drinfeld modules There is now an optional `latexname=None` argument given at init. --- src/sage/categories/drinfeld_modules.py | 6 +- .../function_field/drinfeld_modules/action.py | 4 +- .../drinfeld_modules/drinfeld_module.py | 74 ++++++++++++++----- .../finite_drinfeld_module.py | 2 +- .../drinfeld_modules/morphism.py | 4 +- 5 files changed, 63 insertions(+), 27 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 142300e0971..c8b6252ae29 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -137,7 +137,7 @@ class DrinfeldModules(Category_over_base_ring): sage: psi = cat.object([p_root, 1]) sage: psi - Drinfeld module defined by T |--> t + z^3 + 7*z^2 + 6*z + 10 over base Finite Field in z of size 11^4 over its base + Drinfeld module defined by T |--> t + z^3 + 7*z^2 + 6*z + 10 over Finite Field in z of size 11^4 over its base sage: psi.category() is cat True @@ -474,7 +474,7 @@ def object(self, gen): sage: cat = phi.category() sage: psi = cat.object([p_root, 0, 1]) sage: psi - Drinfeld module defined by T |--> t^2 + z^3 + 7*z^2 + 6*z + 10 over base Finite Field in z of size 11^4 over its base + Drinfeld module defined by T |--> t^2 + z^3 + 7*z^2 + 6*z + 10 over Finite Field in z of size 11^4 over its base sage: t = phi.ore_polring().gen() sage: cat.object(t^3 + z^3 + 7*z^2 + 6*z + 10) is phi True @@ -690,7 +690,7 @@ def constant_coefficient(self): sage: t = phi.ore_polring().gen() sage: psi = cat.object(phi.constant_coefficient() + t^3) sage: psi - Drinfeld module defined by T |--> t^3 + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base + Drinfeld module defined by T |--> t^3 + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 over its base Reciprocally, it is impossible to create two Drinfeld modules in this category if they do not share the same constant diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index 5bdf666218c..826ea735f77 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -51,7 +51,7 @@ class DrinfeldModuleAction(Action): sage: phi = DrinfeldModule(A, [z, 0, 0, 1]) sage: action = phi.action() sage: action - Action on Finite Field in z of size 11^2 over its base induced by Drinfeld module defined by T |--> t^3 + z over base Finite Field in z of size 11^2 over its base + Action on Finite Field in z of size 11^2 over its base induced by Drinfeld module defined by T |--> t^3 + z over Finite Field in z of size 11^2 over its base The action on elements is computed as follows:: @@ -163,7 +163,7 @@ def _repr_(self): sage: phi = DrinfeldModule(A, [z, 0, 0, 1]) sage: action = phi.action() sage: action - Action on Finite Field in z of size 11^2 over its base induced by Drinfeld module defined by T |--> t^3 + z over base Finite Field in z of size 11^2 over its base + Action on Finite Field in z of size 11^2 over its base induced by Drinfeld module defined by T |--> t^3 + z over Finite Field in z of size 11^2 over its base """ return f'Action on {self._base_ring} induced by ' \ f'{self._drinfeld_module}' diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 9066f5722a6..056e63aa145 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -90,7 +90,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: K. = Fq.extension(6) sage: phi = DrinfeldModule(A, [z, 4, 1]) sage: phi - Drinfeld module defined by T |--> t^2 + 4*t + z over base Finite Field in z of size 5^12 over its base + Drinfeld module defined by T |--> t^2 + 4*t + z over Finite Field in z of size 5^12 over its base :: @@ -145,7 +145,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: K. = Fq.extension(6) sage: phi = DrinfeldModule(A, [z, 1, 1]) sage: phi - Drinfeld module defined by T |--> t^2 + t + z over base Finite Field in z of size 3^12 over its base + Drinfeld module defined by T |--> t^2 + t + z over Finite Field in z of size 3^12 over its base Note that the definition of the base morphism is implicit; it is defined as the `\mathbb{F}_q`-algebra morphism defined from @@ -158,7 +158,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: L = Frac(A) sage: psi = DrinfeldModule(A, [L(T), 1, T^3 + T + 1]) sage: psi - Drinfeld module defined by T |--> (T^3 + T + 1)*t^2 + t + T over base Ring morphism: + Drinfeld module defined by T |--> (T^3 + T + 1)*t^2 + t + T over Ring morphism: From: Univariate Polynomial Ring in T over Finite Field in z2 of size 3^2 To: Fraction Field of Univariate Polynomial Ring in T over Finite Field in z2 of size 3^2 Defn: T |--> T @@ -179,7 +179,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: rho_T = z + t^3 sage: rho = DrinfeldModule(A, rho_T) sage: rho - Drinfeld module defined by T |--> t^3 + z over base Finite Field in z of size 3^12 over its base + Drinfeld module defined by T |--> t^3 + z over Finite Field in z of size 3^12 over its base sage: rho(T) == rho_T True @@ -192,6 +192,12 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: phi(1) # phi_1 1 + One can give a LaTeX name to be used for LaTeX representation:: + + sage: sigma = DrinfeldModule(A, [z, 1, 1], latexname='\phi') + sage: latex(sigma) + \phi + .. RUBRIC:: The category of Drinfeld modules Drinfeld modules have their own category (see class @@ -208,7 +214,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: cat = phi.category() sage: cat.object([z, 0, 0, 1]) - Drinfeld module defined by T |--> t^3 + z over base Finite Field in z of size 3^12 over its base + Drinfeld module defined by T |--> t^3 + z over Finite Field in z of size 3^12 over its base .. RUBRIC:: The base ring of a Drinfeld module @@ -380,7 +386,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: ore_pol = (2*z^6 + z^3 + 2*z^2 + z + 2)*t + z^11 + 2*z^10 + 2*z^9 + 2*z^8 + z^7 + 2*z^6 + z^5 + z^3 + z^2 + z sage: psi = phi.velu(ore_pol) sage: psi - Drinfeld module defined by T |--> (2*z^11 + 2*z^9 + z^6 + 2*z^5 + 2*z^4 + 2*z^2 + 1)*t^2 + (2*z^11 + 2*z^10 + 2*z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z)*t + z over base Finite Field in z of size 3^12 over its base + Drinfeld module defined by T |--> (2*z^11 + 2*z^9 + z^6 + 2*z^5 + 2*z^4 + 2*z^2 + 1)*t^2 + (2*z^11 + 2*z^10 + 2*z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z)*t + z over Finite Field in z of size 3^12 over its base sage: ore_pol in Hom(phi, psi) True sage: ore_pol * phi(T) == psi(T) * ore_pol @@ -411,7 +417,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: action = phi.action() sage: action - Action on Finite Field in z of size 3^12 over its base induced by Drinfeld module defined by T |--> t^2 + t + z over base Finite Field in z of size 3^12 over its base + Action on Finite Field in z of size 3^12 over its base induced by Drinfeld module defined by T |--> t^2 + t + z over Finite Field in z of size 3^12 over its base The action on elements is computed by calling the action object:: @@ -576,7 +582,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): """ @staticmethod - def __classcall_private__(cls, function_ring, gen, name='t'): + def __classcall_private__(cls, function_ring, gen, name='t', latexname=None): """ Check input validity and return a ``DrinfeldModule`` or ``FiniteDrinfeldModule`` object accordingly. @@ -589,6 +595,8 @@ def __classcall_private__(cls, function_ring, gen, name='t'): coefficients or an Ore polynomial - ``name`` (default: ``'t'``) -- the name of the Ore polynomial ring gen + - ``latexname`` (default: ``None``) -- the LaTeX name of the Drinfeld + module OUTPUT: a DrinfeldModule or FiniteDrinfeldModule @@ -648,6 +656,10 @@ def __classcall_private__(cls, function_ring, gen, name='t'): base_ring_noext.has_coerce_map_from(function_ring.base_ring())): raise ValueError('function ring base must coerce into base ring') + # Check LaTeX name + if latexname is not None and type(latexname) is not str: + raise ValueError('LaTeX name should be a string') + # Build the category if isinstance(base_ring_noext, RingExtension_generic): base_ring = base_ring_noext @@ -669,7 +681,7 @@ def __classcall_private__(cls, function_ring, gen, name='t'): return FiniteDrinfeldModule(gen, category) return cls.__classcall__(cls, gen, category) - def __init__(self, gen, category): + def __init__(self, gen, category, latexname=None): """ Initialize ``self``. @@ -684,6 +696,8 @@ def __init__(self, gen, category): coefficients or an Ore polynomial - ``name`` (default: ``'t'``) -- the name of the Ore polynomial ring gen + - ``latexname`` (default: ``None``) -- the LaTeX name of the Drinfeld + module TESTS:: @@ -704,10 +718,13 @@ def __init__(self, gen, category): True sage: phi._morphism == Hom(A, ore_polring)(phi._gen) True + sage: phi._latexname is None + True """ self._base = category.base() self._function_ring = category.function_ring() self._gen = gen + self._latexname = latexname self._morphism = category._function_ring.hom([gen]) self._ore_polring = gen.parent() self._Fq = self._function_ring.base_ring() # Must be last @@ -818,6 +835,9 @@ def _latex_(self): r""" Return a LaTeX representation of the Drinfeld module. + If a LaTeX name was given at init. using `latexname`, use the LaTeX + name. Otherwise, create a representation. + OUTPUT: a string EXAMPLES:: @@ -829,11 +849,27 @@ def _latex_(self): sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: latex(phi) \text{Drinfeld{ }module{ }defined{ }by{ }} T \mapsto z_{12}^{5} t^{2} + z_{12}^{3} t + 2 z_{12}^{11} + 2 z_{12}^{10} + z_{12}^{9} + 3 z_{12}^{8} + z_{12}^{7} + 2 z_{12}^{5} + 2 z_{12}^{4} + 3 z_{12}^{3} + z_{12}^{2} + 2 z_{12}\text{{ }over{ }base{ }}\Bold{F}_{5^{12}} + + :: + + sage: psi = DrinfeldModule(A, [p_root, z12^3, z12^5], latexname='\psi') + sage: latex(psi) + \psi + + :: + + sage: psi = DrinfeldModule(A, [p_root, z12^3, z12^5], latexname=1729) + Traceback (most recent call last): + ... + ValueError: LaTeX name should be a string """ - return f'\\text{{Drinfeld{{ }}module{{ }}defined{{ }}by{{ }}}} ' \ - f'{latex(self._function_ring.gen())} '\ - f'\\mapsto {latex(self._gen)}' \ - f'\\text{{{{ }}over{{ }}base{{ }}}}{latex(self._base)}' + if self._latexname is not None: + return self._latexname + else: + return f'\\text{{Drinfeld{{ }}module{{ }}defined{{ }}by{{ }}}} ' \ + f'{latex(self._function_ring.gen())} '\ + f'\\mapsto {latex(self._gen)}' \ + f'\\text{{{{ }}over{{ }}base{{ }}}}{latex(self._base)}' def _repr_(self): r""" @@ -849,10 +885,10 @@ def _repr_(self): sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: phi - Drinfeld module defined by T |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base + Drinfeld module defined by T |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 over its base """ return f'Drinfeld module defined by {self._function_ring.gen()} ' \ - f'|--> {self._gen} over base {self._base}' + f'|--> {self._gen} over {self._base}' def action(self): r""" @@ -872,7 +908,7 @@ def action(self): sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: action = phi.action() sage: action - Action on Finite Field in z12 of size 5^12 over its base induced by Drinfeld module defined by T |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base + Action on Finite Field in z12 of size 5^12 over its base induced by Drinfeld module defined by T |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 over its base The action on elements is computed as follows:: @@ -1190,8 +1226,8 @@ def j_invariant(self): The rank must be two:: - sage: theta = DrinfeldModule(A, [p_root, 1, 0]) - sage: theta.j_invariant() + sage: sigma = DrinfeldModule(A, [p_root, 1, 0]) + sage: sigma.j_invariant() Traceback (most recent call last): ... NotImplementedError: rank must be 2 @@ -1319,7 +1355,7 @@ def velu(self, isog): sage: isog = t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 sage: psi = phi.velu(isog) sage: psi - Drinfeld module defined by T |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base + Drinfeld module defined by T |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 over its base sage: isog in Hom(phi, psi) True diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 5722d04d175..016a4ee6a12 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -48,7 +48,7 @@ class FiniteDrinfeldModule(DrinfeldModule): sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(A, [z6, 0, 5]) sage: phi - Drinfeld module defined by T |--> 5*t^2 + z6 over base Finite Field in z6 of size 7^6 over its base + Drinfeld module defined by T |--> 5*t^2 + z6 over Finite Field in z6 of size 7^6 over its base :: diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index a0ef455704e..3ff5d40f7b7 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -64,14 +64,14 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, One can get basic data on the morphism:: sage: morphism.domain() - Drinfeld module defined by T |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base + Drinfeld module defined by T |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 over its base sage: morphism.domain() is phi True :: sage: morphism.codomain() - Drinfeld module defined by T |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over base Finite Field in z12 of size 5^12 over its base + Drinfeld module defined by T |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 over its base sage: morphism.codomain() is psi True From b48243cb6617064254041b0050c3effe44050cee Mon Sep 17 00:00:00 2001 From: Kryzar Date: Mon, 6 Feb 2023 17:00:09 +0100 Subject: [PATCH 328/751] (minor) Modify DrinfeldModule.invert docstring --- .../rings/function_field/drinfeld_modules/drinfeld_module.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 056e63aa145..02a42cd224c 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -1082,9 +1082,8 @@ def height(self): def invert(self, ore_pol): r""" - Return the preimage of the input under the Drinfeld module; - raise an exception if the input is not in the image of the - Drinfeld module. + Return the preimage of the input under the Drinfeld module, if it + exists. INPUT: From b8e54956aff8e602e04c8723fcec2a441bccd687 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Mon, 6 Feb 2023 21:39:49 +0100 Subject: [PATCH 329/751] (minor) Typo --- src/sage/rings/function_field/drinfeld_modules/action.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index 826ea735f77..8c1e68fcd6f 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -170,7 +170,7 @@ def _repr_(self): def drinfeld_module(self): r""" - Return the Drinfeld module defining to the action. + Return the Drinfeld module defining the action. OUTPUT: a Drinfeld module From ef94f98219a71e9cfe209e06d06b7083ad51ceb7 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Mon, 6 Feb 2023 21:55:19 +0100 Subject: [PATCH 330/751] Proofread DrinfeldModuleAction --- .../function_field/drinfeld_modules/action.py | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index 8c1e68fcd6f..74399316c92 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -26,20 +26,26 @@ class DrinfeldModuleAction(Action): r""" - This class represents the module action induced by a Drinfeld + This class implements the module action induced by a Drinfeld module. - Let `\phi` be a Drinfeld module with base `\gamma: \mathbb{F}_q[T] - \to K`. Let `L/K` be a field extension, let `x \in L`, let `a` be a - function ring element; the action is defined as `(a, x) \mapsto - \phi_a(x)`. + Let `\phi` be a Drinfeld module over a field `K` and let `L/K` be a + field extension. Let `x \in L` and let `a` be a function ring + element; the action is defined as `(a, x) \mapsto \phi_a(x)`. .. NOTE:: In this implementation, `L` is `K`. - The user should never explicitly instantiate the class - `DrinfeldModuleAction`. + .. NOTE:: + + The user should never explicitly instantiate the class + `DrinfeldModuleAction`. + + .. WARNING:: + + This class may be replaced later on. See issues #34833 and + #34834. INPUT: the Drinfeld module From 9c34fe1657d3ca40c19931130ce6b1e791c0675c Mon Sep 17 00:00:00 2001 From: ymusleh <44390016+ymusleh@users.noreply.github.com> Date: Mon, 6 Feb 2023 16:11:41 -0500 Subject: [PATCH 331/751] Major typo fix --- .../function_field/drinfeld_modules/finite_drinfeld_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 016a4ee6a12..d4b84500ef6 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -378,7 +378,7 @@ def is_ordinary(self): trace. A *supersingular* rank two finite Drinfeld module is a Drinfeld module that is not ordinary. - A rnak two Drinfeld module is *ordinary* if and only if it is + A rank two Drinfeld module is *ordinary* if and only if it is note supersingular; see :meth:`is_supersingular`. OUTPUT: a boolean From 6601038cdf3369e5f3b1b4372b238b080a35f8c7 Mon Sep 17 00:00:00 2001 From: ymusleh <44390016+ymusleh@users.noreply.github.com> Date: Mon, 6 Feb 2023 16:27:43 -0500 Subject: [PATCH 332/751] More extremely critical changes --- .../drinfeld_modules/finite_drinfeld_module.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index d4b84500ef6..c36c0e23ad6 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -117,7 +117,7 @@ def __init__(self, gen, category): - ``function_ring`` -- a univariate polynomial ring whose base is a finite field - - ``gen`` -- the generator of the Drinfeld module; as a list of + - ``gen`` -- the generator of the Drinfeld module as a list of coefficients or an Ore polynomial - ``name`` (default: `'t'`) -- the name of the Ore polynomial ring gen @@ -178,7 +178,7 @@ def frobenius_endomorphism(self): def frobenius_charpoly(self, var='T'): r""" Return the characteristic polynomial of the Frobenius - endomorphism, if the rank is two; raise a NotImplementedError + endomorphism if the rank is two. Raise a NotImplementedError otherwise. Let `\mathbb{F}_q` be the base ring of the function ring. The @@ -191,7 +191,7 @@ def frobenius_charpoly(self, var='T'): bivariate polynomial. Let `\chi = X^2 - A(T)X + B(T)` be the characteristic polynomial - of the Frobenius endomorphism, let `t^n` be the Ore polynomial + of the Frobenius endomorphism, and let `t^n` be the Ore polynomial that defines the Frobenius endomorphism of `\phi`; by definition, `n` is the degree over `\mathbb{F}_q` of the base codomain. We have `\chi(t^n)(\phi(T)) = t^{2n} - \phi_A t^n + @@ -245,12 +245,12 @@ def frobenius_charpoly(self, var='T'): See [MS2019]_, Section 4. See docstrings of methods :meth:`frobenius_norm` and - :meth:`frobenius_trace` for furthere details on the + :meth:`frobenius_trace` for further details on the computation of the norm and of the trace. """ self._check_rank_two() A = self._function_ring # Fq[T] - S = PolynomialRing(A, name=var) # Fq[T][T] + S = PolynomialRing(A, name=var) # Fq[T][X] # Does not work when Fq is not a prime field... # chi = self._gen.reduced_charpoly() # return -chi(A.gen(), S.gen()) @@ -259,7 +259,7 @@ def frobenius_charpoly(self, var='T'): def frobenius_norm(self): r""" Return Frobenius norm of the Drinfeld module, if the rank is - two; raise a NotImplementedError otherwise. + two, raise a NotImplementedError otherwise. Let `\mathbb{F}_q[T]` be the function ring, write `\chi = X^2 - A(T)X + B(T) \in \mathbb{F}_q[T][X]` for the characteristic @@ -316,7 +316,7 @@ def frobenius_trace(self): two; raise a NotImplementedError otherwise. Let `\mathbb{F}_q[T]` be the function ring, write `\chi = T^2 - - A(X)T + B(X) \in \mathbb{F}_q[T][T]` for the characteristic + A(X)T + B(X) \in \mathbb{F}_q[T][X]` for the characteristic polynomial of the Frobenius endomorphism. The *Frobenius norm* is defined as the polynomial `B(T) \in \mathbb{F}_q[T]`. @@ -379,7 +379,7 @@ def is_ordinary(self): Drinfeld module that is not ordinary. A rank two Drinfeld module is *ordinary* if and only if it is - note supersingular; see :meth:`is_supersingular`. + not supersingular; see :meth:`is_supersingular`. OUTPUT: a boolean From b4371c84b2e5914c129ae39874bfaf27df1f2178 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Mon, 6 Feb 2023 22:40:05 +0100 Subject: [PATCH 333/751] Manage merge conflict --- src/sage/categories/drinfeld_modules.py | 21 ++-- .../function_field/drinfeld_modules/action.py | 19 +-- .../drinfeld_modules/drinfeld_module.py | 111 ++++++------------ .../finite_drinfeld_module.py | 29 ++--- .../drinfeld_modules/morphism.py | 10 +- 5 files changed, 73 insertions(+), 117 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index c8b6252ae29..e1f74107688 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -36,11 +36,11 @@ class DrinfeldModules(Category_over_base_ring): Let `\mathbb{F}_q[T]` be a polynomial ring with coefficients in a finite field `\mathbb{F}_q` and let `K` be a field. Fix a ring morphism `\gamma: \mathbb{F}_q[T] \to K`. We say that the field `K` - is an `\mathbb{F}_q[T]`-field, so that the *base of the category* is - defined as the `\mathbb{F}_q[T]`-field *K*. The base uniquely - defines the category, and we also refer to it as the *base ring* or - *base field*. The *base morphism* is the morphism `\gamma: - \mathbb{F}_q[T] \to K`. + is an `\mathbb{F}_q[T]`-field, so that the *base field of the + category* is defined as the `\mathbb{F}_q[T]`-field *K*. The base + field uniquely defines the category, and we also refer to it as its + *base*. The *base morphism* is the morphism `\gamma: \mathbb{F}_q[T] + \to K`. .. NOTE:: @@ -57,7 +57,7 @@ class DrinfeldModules(Category_over_base_ring): coefficient of the category is the image of `T` under the base morphism. - INPUT: the base ring morphism + INPUT: the base field .. RUBRIC:: Construction @@ -79,13 +79,10 @@ class DrinfeldModules(Category_over_base_ring): .. RUBRIC:: Properties of the category - The base ring is retrieved using the method :meth:`base` or - :meth:`base_ring`:: + The base field is retrieved using the method :meth:`base`. sage: cat.base() Finite Field in z of size 11^4 over its base - sage: cat.base_ring() - Finite Field in z of size 11^4 over its base Equivalently, one can use :meth:`base_morphism` to retrieve the base morphism:: @@ -114,7 +111,7 @@ class DrinfeldModules(Category_over_base_ring): sage: cat.base_morphism()(cat.characteristic()) 0 - The base ring, base morphism, function ring and Ore polynomial ring + The base field, base morphism, function ring and Ore polynomial ring are the same for the category and its objects:: sage: cat.base() is phi.base() @@ -212,7 +209,7 @@ def __init__(self, base_field, name='t'): INPUT: - - ``base_ring`` -- the base field, which is a ring extension + - ``base_field`` -- the base field, which is a ring extension over a base - ``name`` (default: `'t'`) -- the name of the Ore polynomial variable diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index 74399316c92..6fabd091805 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -29,9 +29,10 @@ class DrinfeldModuleAction(Action): This class implements the module action induced by a Drinfeld module. - Let `\phi` be a Drinfeld module over a field `K` and let `L/K` be a - field extension. Let `x \in L` and let `a` be a function ring - element; the action is defined as `(a, x) \mapsto \phi_a(x)`. + Let `\phi` be a Drinfeld `\mathbb{F}_q[T]`-module over a field `K` + and let `L/K` be a field extension. Let `x \in L` and let `a` be a + function ring element; the action is defined as `(a, x) \mapsto + \phi_a(x)`. .. NOTE:: @@ -93,14 +94,14 @@ def __init__(self, drinfeld_module): sage: action = phi.action() sage: action._drinfeld_module is phi True - sage: action._base_ring is phi.base() + sage: action._base is phi.base() True """ if not isinstance(drinfeld_module, DrinfeldModule): raise TypeError('input must be a DrinfeldModule') self._drinfeld_module = drinfeld_module - self._base_ring = drinfeld_module.base() - super().__init__(drinfeld_module.function_ring(), self._base_ring) + self._base = drinfeld_module.base() + super().__init__(drinfeld_module.function_ring(), self._base) def _act_(self, pol, x): r""" @@ -131,7 +132,7 @@ def _act_(self, pol, x): """ if pol not in self._drinfeld_module.function_ring(): raise TypeError('first input must be in the function ring') - if x not in self._base_ring: + if x not in self._base: raise TypeError('second input must be in the field acted upon') return self._drinfeld_module(pol)(x) @@ -152,7 +153,7 @@ def _latex_(self): \text{Action{ }on{ }}\Bold{F}_{11^{2}}\text{{ }induced{ }by{ }}\text{Drinfeld{ }module{ }defined{ }by{ }} T \mapsto t^{3} + z\text{{ }over{ }base{ }}\Bold{F}_{11^{2}} """ return f'\\text{{Action{{ }}on{{ }}}}' \ - f'{latex(self._base_ring)}\\text{{{{ }}' \ + f'{latex(self._base)}\\text{{{{ }}' \ f'induced{{ }}by{{ }}}}{latex(self._drinfeld_module)}' def _repr_(self): @@ -171,7 +172,7 @@ def _repr_(self): sage: action Action on Finite Field in z of size 11^2 over its base induced by Drinfeld module defined by T |--> t^3 + z over Finite Field in z of size 11^2 over its base """ - return f'Action on {self._base_ring} induced by ' \ + return f'Action on {self._base} induced by ' \ f'{self._drinfeld_module}' def drinfeld_module(self): diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 02a42cd224c..ef16fb1bd98 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -45,25 +45,19 @@ class DrinfeldModule(Parent, UniqueRepresentation): Let `\mathbb{F}_q[T]` be a polynomial ring with coefficients in a finite field `\mathbb{F}_q` and let `K` be a field. Fix a ring morphism `\gamma: \mathbb{F}_q[T] \to K`. We say that the field `K` - is an `\mathbb{F}_q[T]`-field, so that the *base of the Drinfeld - module* is defined as the `\mathbb{F}_q[T]`-field *K*. The base - uniquely defines the category, and we also refer to it as the *base - ring* or *base field*. The *base morphism* is the morphism `\gamma: + is an `\mathbb{F}_q[T]`-field, so that the *base field of the + Drinfeld module* is defined as the `\mathbb{F}_q[T]`-field *K*. This + field is the `base` of the category of Drinfeld modules, which it + uniquely defines. The *base morphism* is the morphism `\gamma: \mathbb{F}_q[T] \to K`. - .. NOTE:: - - Equivalently, the base of the Drinfeld module could be defined as the - base morphism `\gamma: \mathbb{F}_q[T] \to K`. - - .. NOTE:: See also :class:`sage.categories.drinfeld_modules`. The monic polynomial that generates the kernel of the base morphism is called the `\mathbb{F}_q[T]`-characteristic of the - `\mathbb{F}_q[T]`-field `K`. It cal also be referred to as the + `\mathbb{F}_q[T]`-field `K`. It can also be referred to as the function-field characteristic of `K`. Let `K\{\tau\}` be the ring of Ore polynomials with coefficients in @@ -111,7 +105,6 @@ class DrinfeldModule(Parent, UniqueRepresentation): constant coefficient of `\phi_T`. The `\mathbb{F}_q[T]`-characteristic of the `\mathbb{F}_q[T]`-field `K` can also be referred to as its function ring-characteristic. - Finally, `K` is just referred to as the codomain base. Classical references on Drinfeld modules include [Gos1998]_, [Rosen2002]_, [VS06]_ and [Gek1991]_. @@ -128,8 +121,8 @@ class DrinfeldModule(Parent, UniqueRepresentation): INPUT: - - ``function_ring`` -- a univariate polynomial ring whose base is a - finite field + - ``function_ring`` -- a univariate polynomial ring whose base field + is a finite field - ``gen`` -- the generator of the Drinfeld module; as a list of coefficients or an Ore polynomial - ``name`` (default: ``'t'``) -- the name of the Ore polynomial ring @@ -147,11 +140,9 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: phi Drinfeld module defined by T |--> t^2 + t + z over Finite Field in z of size 3^12 over its base - Note that the definition of the base morphism is implicit; it is - defined as the `\mathbb{F}_q`-algebra morphism defined from - `\mathbb{F}_q[T]` to the base ring, and the base ring is a ring - extension over the base morphism whose underlying ring is the - compositum of all the parents of the coefficients. + Note that the definition of the base field is implicit; it is + automatically defined as the compositum of all the parents of the + coefficients. The above Drinfeld module is finite; it can also be infinite:: @@ -216,12 +207,11 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: cat.object([z, 0, 0, 1]) Drinfeld module defined by T |--> t^3 + z over Finite Field in z of size 3^12 over its base - .. RUBRIC:: The base ring of a Drinfeld module + .. RUBRIC:: The base field of a Drinfeld module - The base ring of the Drinfeld module is retrieved using - :meth:`base_ring` or :meth:`base`:: + The base field of the Drinfeld module is retrieved using :meth:`base`:: - sage: phi.base_ring() + sage: phi.base() Finite Field in z of size 3^12 over its base The base morphism is retrieved using :meth:`base_morphism`:: @@ -232,11 +222,11 @@ class DrinfeldModule(Parent, UniqueRepresentation): To: Finite Field in z of size 3^12 over its base Defn: T |--> z - Note that the base ring is *not* the field `K`. Rather, it is a ring - extension (see :class:`sage.rings.ring_extension.RingExtension`) - whose underlying ring is `K` and whose base is the base morphism:: + Note that the base field is *not* the field `K`. Rather, it is a ring + extension (see :class:`sage.rings.ring_extension.RingExtension`) whose + underlying ring is `K` and whose base is the base morphism:: - sage: phi.base_ring() is K + sage: phi.base() is K False .. RUBRIC:: Getters @@ -474,7 +464,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: DrinfeldModule(A, [z, QQ(1)]) Traceback (most recent call last): ... - ValueError: function ring base must coerce into base ring + ValueError: function ring base must coerce into base field :: @@ -484,7 +474,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: DrinfeldModule(A, [1, QQ(1)]) Traceback (most recent call last): ... - ValueError: function ring base must coerce into base ring + ValueError: function ring base must coerce into base field The function ring must be an univariate polynomial ring whose base is a finite field:: @@ -529,7 +519,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: phi = DrinfeldModule(A, [1, 1]) Traceback (most recent call last): ... - ValueError: function ring base must coerce into base ring + ValueError: function ring base must coerce into base field :: @@ -545,40 +535,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: A. = Fq[] sage: K = Frac(Fq) sage: phi = DrinfeldModule(A, [Fq.gen(), K(1)]) - sage: phi.base().codomain() is K - True - - :: - - sage: Fq = GF(25) - sage: A. = Fq[] - sage: k = Frac(Fq) - sage: kS. = k[] - sage: K = k.extension(S^3 + S + 1) - sage: phi = DrinfeldModule(A, [Fq.gen(), K.gen()]) - sage: phi.base().codomain() is K - True - - In particular, note that the field `K` may not be the smallest field - of definition of the coefficients:: - - sage: Fq = GF(25) - sage: A. = Fq[] - sage: k = Frac(Fq) - sage: kS. = k[] - sage: K = k.extension(S^3 + S + 1) - sage: phi = DrinfeldModule(A, [K(k.gen()), 1]) - sage: phi.base().codomain() is K - True - - :: - - sage: Fq = GF(25) - sage: A. = Fq[] - sage: K = Fq.extension(2) - sage: phi = DrinfeldModule(A, [Fq.gen(), K(Fq.gen())]) - sage: phi.base().codomain() is K - True + sage: phi.base_morphism().codomain() is K """ @staticmethod @@ -638,36 +595,36 @@ def __classcall_private__(cls, function_ring, gen, name='t', latexname=None): if isinstance(gen, OrePolynomial): ore_polring = gen.parent() # Base ring without morphism structure: - base_ring_noext = ore_polring.base() + base_field_noext = ore_polring.base() name = ore_polring.variable_name() # `gen` is a list of coefficients (function_ring = Fq[T]): elif isinstance(gen, (list, tuple)): ore_polring = None # Base ring without morphism structure: - base_ring_noext = Sequence(gen).universe() + base_field_noext = Sequence(gen).universe() else: raise TypeError('generator must be list of coefficients or Ore ' 'polynomial') # Constant coefficient must be nonzero: if gen[0].is_zero(): raise ValueError('constant coefficient must be nonzero') - # The coefficients are in a base ring that has coercion from Fq: - if not (hasattr(base_ring_noext, 'has_coerce_map_from') and - base_ring_noext.has_coerce_map_from(function_ring.base_ring())): - raise ValueError('function ring base must coerce into base ring') + # The coefficients are in a base field that has coercion from Fq: + if not (hasattr(base_field_noext, 'has_coerce_map_from') and + base_field_noext.has_coerce_map_from(function_ring.base_field())): + raise ValueError('function ring base must coerce into base field') # Check LaTeX name if latexname is not None and type(latexname) is not str: raise ValueError('LaTeX name should be a string') # Build the category - if isinstance(base_ring_noext, RingExtension_generic): - base_ring = base_ring_noext + if isinstance(base_field_noext, RingExtension_generic): + base_field = base_field_noext else: - base_morphism = Hom(function_ring, base_ring_noext)(gen[0]) - base_ring = base_ring_noext.over(base_morphism) + base_morphism = Hom(function_ring, base_field_noext)(gen[0]) + base_field = base_field_noext.over(base_morphism) - category = DrinfeldModules(base_ring, name=name) + category = DrinfeldModules(base_field, name=name) # Check gen as Ore polynomial ore_polring = category.ore_polring() # Sanity cast @@ -676,7 +633,7 @@ def __classcall_private__(cls, function_ring, gen, name='t', latexname=None): raise ValueError('generator must have positive degree') # Instantiate the appropriate class - if base_ring.is_finite(): + if base_field.is_finite(): from sage.rings.function_field.drinfeld_modules.finite_drinfeld_module import FiniteDrinfeldModule return FiniteDrinfeldModule(gen, category) return cls.__classcall__(cls, gen, category) @@ -1202,7 +1159,7 @@ def j_invariant(self): Assume the rank is two. Write the generator `\phi_T = \omega + g\tau + \Delta\tau^2`. The j-invariant is defined by - `\frac{g^{q+1}}{\Delta}`, `q` being the order of the base ring + `\frac{g^{q+1}}{\Delta}`, `q` being the order of the base field of the function ring. In our case, this field is always finite. OUTPUT: an element in the base codomain diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index c36c0e23ad6..63e56791d29 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -29,9 +29,9 @@ class FiniteDrinfeldModule(DrinfeldModule): r""" This class represents a finite Drinfeld module. - A *finite Drinfeld module* is a Drinfeld module whose base codomain - is a finite field. In this case, the function field characteristic - is a prime ideal. + A *finite Drinfeld module* is a Drinfeld module whose base field is + finite. In this case, the function field characteristic is a prime + ideal. For general definitions and help on Drinfeld modules, see class :class:`sage.rings.function_fields.drinfeld_module.drinfeld_module.DrinfeldModule`. @@ -148,7 +148,7 @@ def frobenius_endomorphism(self): Return the Frobenius endomorphism of the Drinfeld module as a morphism object. - Let `q` be the order of the base ring of the function ring. The + Let `q` be the order of the base field of the function ring. The *Frobenius endomorphism* is defined as the endomorphism whose defining Ore polynomial is `t^q`. @@ -181,7 +181,7 @@ def frobenius_charpoly(self, var='T'): endomorphism if the rank is two. Raise a NotImplementedError otherwise. - Let `\mathbb{F}_q` be the base ring of the function ring. The + Let `\mathbb{F}_q` be the base field of the function ring. The *characteristic polynomial `\chi` of the Frobenius endomorphism* is defined in [Gek1991]_. An important feature of this polynomial is that it is a monic univariate polynomial with @@ -193,9 +193,10 @@ def frobenius_charpoly(self, var='T'): Let `\chi = X^2 - A(T)X + B(T)` be the characteristic polynomial of the Frobenius endomorphism, and let `t^n` be the Ore polynomial that defines the Frobenius endomorphism of `\phi`; by - definition, `n` is the degree over `\mathbb{F}_q` of the base - codomain. We have `\chi(t^n)(\phi(T)) = t^{2n} - \phi_A t^n + - \phi_B = 0`, with `\deg(A) \leq \frac{n}{2}` and `\deg(B) = n`. + definition, `n` is the degree over of the base field over + `\mathbb{F}_q`. We have `\chi(t^n)(\phi(T)) = t^{2n} - \phi_A + t^n + \phi_B = 0`, with `\deg(A) \leq \frac{n}{2}` and `\deg(B) + = n`. Note that the *Frobenius trace* is defined as `A(T)` and the *Frobenius norm* is defined as `B(T)`. @@ -232,7 +233,7 @@ def frobenius_charpoly(self, var='T'): :: - sage: n = 2 # Degree over Fq of the base codomain + sage: n = 2 # Degree of the base field over Fq sage: trace.degree() <= n/2 True sage: norm.degree() == n @@ -266,8 +267,8 @@ def frobenius_norm(self): polynomial of the Frobenius endomorphism. The *Frobenius norm* is defined as the polynomial `B(T) \in \mathbb{F}_q[T]`. - Let `n` be the degree over `\mathbb{F}_q` of the base codomain. - Then the Frobenius norm has degree `n`. + Let `n` be the degree of the base field over `\mathbb{F}_q` Then the + Frobenius norm has degree `n`. OUTPUT: an element in the function ring @@ -283,7 +284,7 @@ def frobenius_norm(self): :: - sage: n = 2 # Degree over Fq of the base codomain + sage: n = 2 # Degree of the base field over Fq sage: B.degree() == n True @@ -298,7 +299,7 @@ def frobenius_norm(self): Gekeler, given in [MS2019]_, Section 4, Proposition 3. """ self._check_rank_two() - L = self._base.codomain().over(self._Fq) + L = self._base.over(self._Fq) # Notations from Schost-Musleh: if self._frobenius_norm is None: n = L.degree_over(self._Fq) @@ -362,7 +363,7 @@ def frobenius_trace(self): self._check_rank_two() # Notations from Schost-Musleh: if self._frobenius_trace is None: - n = self._base.codomain().over(self._Fq).degree_over(self._Fq) + n = self._base.over(self._Fq).degree_over(self._Fq) B = self.frobenius_norm() t = self.ore_polring().gen() self._frobenius_trace = self.invert(t**n + (self(B) // t**n)) diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 3ff5d40f7b7..18a41c548aa 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -29,11 +29,11 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, r""" This class represents a Drinfeld module morphism. - Let `\phi, \psi` be two Drinfeld modules with base `\gamma: \mathbb{F}_q[T] - \to K`. A *morphism of Drinfeld modules `\phi \to \psi`* is an Ore - polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for every `a - \in \mathbb{F}_q[T]`. In our case, this is equivalent to `f \phi_T = \psi_T - f`. An *isogeny* is a nonzero morphism. + Let `\phi, \psi` be two Drinfeld `\mathbb{F}_q[T]`-modules over a + field `K`. A *morphism of Drinfeld modules `\phi \to \psi`* is an + Ore polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for + every `a \in \mathbb{F}_q[T]`. In our case, this is equivalent to `f + \phi_T = \psi_T f`. An *isogeny* is a nonzero morphism. To create a morphism object, the user should never explicitly instantiate :class:`DrinfeldModuleMorphism`, but rather call the parent From 5e3182eb1d5cc3255263d14188272eb30c4cf9b8 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Mon, 6 Feb 2023 22:44:03 +0100 Subject: [PATCH 334/751] Adress David's suggestions for DrinfeldModuleHomset --- src/sage/rings/function_field/drinfeld_modules/homset.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index 812301bdbdf..c90d5535340 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -218,7 +218,7 @@ def _repr_(self): def __contains__(self, x): r""" - Implement the ``in`` operator for the homset; return ``True`` if + Implement the ``in`` operator for the homset; return ``True`` whether the input defines a morphism in the homset. INPUT: @@ -274,7 +274,7 @@ def __contains__(self, x): def _element_constructor_(self, *args, **kwds): r""" - Return the Drinfeld module morphism defined by the input Ore + Return the Drinfeld module morphism defined by the given Ore polynomial. INPUT: an Ore polynomial From 09f27ab8c647af53528fdecee6d9650be09cd00c Mon Sep 17 00:00:00 2001 From: ymusleh <44390016+ymusleh@users.noreply.github.com> Date: Mon, 6 Feb 2023 17:31:09 -0500 Subject: [PATCH 335/751] Huge fix people from paris wouldn't understand Removed stray apostrophe and made punctuation a bit more consistent. --- src/sage/categories/drinfeld_modules.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index e1f74107688..735c4a37101 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -139,7 +139,7 @@ class DrinfeldModules(Category_over_base_ring): True Of course, the constant coefficient of the input must be the same as - the category':: + the category:: sage: cat.object([z, 1]) Traceback (most recent call last): @@ -280,7 +280,7 @@ def __init__(self, base_field, name='t'): def _latex_(self): r""" - Return a latex representation of the category + Return a latex representation of the category. OUTPUT: a string @@ -300,7 +300,7 @@ def _latex_(self): def _repr_(self): r""" - Return a string representation of the category + Return a string representation of the category. OUTPUT: a string @@ -359,7 +359,7 @@ def Endsets(self): def base_morphism(self): r""" - Return the base morphism of the category + Return the base morphism of the category. OUTPUT: a ring morphism From 1863590a8d7fb7307153669a17ba09ee4201cd49 Mon Sep 17 00:00:00 2001 From: Xavier Caruso Date: Tue, 7 Feb 2023 09:32:00 +0100 Subject: [PATCH 336/751] fix creation of the ring extension when the top ring is itself an extension --- .../rings/function_field/drinfeld_modules/drinfeld_module.py | 2 +- src/sage/rings/ring_extension.pyx | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index ef16fb1bd98..1abe56fd306 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -610,7 +610,7 @@ def __classcall_private__(cls, function_ring, gen, name='t', latexname=None): raise ValueError('constant coefficient must be nonzero') # The coefficients are in a base field that has coercion from Fq: if not (hasattr(base_field_noext, 'has_coerce_map_from') and - base_field_noext.has_coerce_map_from(function_ring.base_field())): + base_field_noext.has_coerce_map_from(function_ring.base_ring())): raise ValueError('function ring base must coerce into base field') # Check LaTeX name diff --git a/src/sage/rings/ring_extension.pyx b/src/sage/rings/ring_extension.pyx index b493f57bed9..791cd3d1de8 100644 --- a/src/sage/rings/ring_extension.pyx +++ b/src/sage/rings/ring_extension.pyx @@ -429,6 +429,7 @@ class RingExtensionFactory(UniqueFactory): else: use_generic_constructor = False is_backend_exposed = False + ring = (ring)._backend # We normalize other attributes if gens is not None: From 7cc1eb641a612008e688384a96b4f962a4511415 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Tue, 7 Feb 2023 09:59:59 +0100 Subject: [PATCH 337/751] Refactor DrinfeldModule docstring (see details) - Use italics for definitions - Change the order of paragraphs in the begining --- .../drinfeld_modules/drinfeld_module.py | 85 +++++++++---------- 1 file changed, 41 insertions(+), 44 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index ef16fb1bd98..32a0aee4e31 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -40,32 +40,18 @@ class DrinfeldModule(Parent, UniqueRepresentation): r""" - This class represents a Drinfeld `\mathbb{F}_q[T]`-module. + This class implements Drinfeld `\mathbb{F}_q[T]`-modules. Let `\mathbb{F}_q[T]` be a polynomial ring with coefficients in a finite field `\mathbb{F}_q` and let `K` be a field. Fix a ring - morphism `\gamma: \mathbb{F}_q[T] \to K`. We say that the field `K` - is an `\mathbb{F}_q[T]`-field, so that the *base field of the - Drinfeld module* is defined as the `\mathbb{F}_q[T]`-field *K*. This - field is the `base` of the category of Drinfeld modules, which it - uniquely defines. The *base morphism* is the morphism `\gamma: - \mathbb{F}_q[T] \to K`. - - .. NOTE:: - - See also :class:`sage.categories.drinfeld_modules`. - - The monic polynomial that generates the kernel of the base morphism - is called the `\mathbb{F}_q[T]`-characteristic of the - `\mathbb{F}_q[T]`-field `K`. It can also be referred to as the - function-field characteristic of `K`. - - Let `K\{\tau\}` be the ring of Ore polynomials with coefficients in - `K` and Frobenius variable `\tau: x \mapsto x^q`. A Drinfeld - `\mathbb{F}_q[T]`-module over the `\mathbb{F}_q[T]`-field `K` is an - `\mathbb{F}_q`-algebra morphism `\phi: \mathbb{F}_q[T] \to - K\{\tau\}` such that: - + morphism `\gamma: \mathbb{F}_q[T] \to K`; we say that `K` is an + `\mathbb{F}_q[T]`*-field*. Let `K\{\tau\}` be the ring of Ore + polynomials with coefficients in `K`, whose multiplication is given + by the rule `\tau \lambda = \lambda^q \tau` for any `\lambda \in K`. + + A Drinfeld `\mathbb{F}_q[T]`-module over the `base + \mathbb{F}_q[T]`-field `K` is an `\mathbb{F}_q`-algebra morphism + `\phi: \mathbb{F}_q[T] \to K\{\tau\}` such that: 1. The image of `\phi` contains nonconstant Ore polynomials. 2. For every element `a` in the `\mathbb{F}_q[T]`, the constant coefficient `\phi(a)` is `\gamma(a)`. @@ -75,9 +61,21 @@ class DrinfeldModule(Parent, UniqueRepresentation): The Drinfeld `\mathbb{F}_q[T]`-module `\phi` is uniquely determined by the image `\phi_T` of `T` — this serves as input of the class. - A Drinfeld module is said to be finite if the field `K` is. Despite - an emphasis on this case, the base field can be any extension of - `\mathbb{F}_q`:: + .. NOTE:: + + See also :class:`sage.categories.drinfeld_modules`. + + The *base morphism* is the morphism `\gamma: \mathbb{F}_q[T] \to K`. + The monic polynomial that generates the kernel of `\gamma` is called + the `\mathbb{F}_q[T]`-*characteristic*, or *function-field + characteristic*, of the base field. We say that `\mathbb{F}_q[T]` is + the *function ring* of `\phi`; `K\{\tau\}` is the *Ore polynomial + ring* of `\phi`. Further, the *generator* of `\phi` is `\phi_T` and + its *constant coefficient* is the constant coefficient of `\phi_T`. + + A Drinfeld module is said to be *finite* if the field `K` is. + Despite an emphasis on this case, the base field can be any + extension of `\mathbb{F}_q`:: sage: Fq = GF(25) sage: A. = Fq[] @@ -99,13 +97,6 @@ class DrinfeldModule(Parent, UniqueRepresentation): Finite Drinfeld modules are implemented in the class :class:`sage.rings.function_field.drinfeld_modules.finite_drinfeld_module`. - We say that `\mathbb{F}_q[T]` is the function ring of `\phi`; - `K\{\tau\}` is the Ore polynomial ring of `\phi`. Further, the - generator of `\phi` is `\phi_T` and its constant coefficient is the - constant coefficient of `\phi_T`. The - `\mathbb{F}_q[T]`-characteristic of the `\mathbb{F}_q[T]`-field `K` - can also be referred to as its function ring-characteristic. - Classical references on Drinfeld modules include [Gos1998]_, [Rosen2002]_, [VS06]_ and [Gek1991]_. @@ -140,9 +131,11 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: phi Drinfeld module defined by T |--> t^2 + t + z over Finite Field in z of size 3^12 over its base - Note that the definition of the base field is implicit; it is - automatically defined as the compositum of all the parents of the - coefficients. + .. NOTE:: + + Note that the definition of the base field is implicit; it is + automatically defined as the compositum of all the parents of + the coefficients. The above Drinfeld module is finite; it can also be infinite:: @@ -166,7 +159,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): regular Ore polynomials:: sage: ore_polring = phi.ore_polring() - sage: t = phi.ore_polring().gen() + sage: t = ore_polring.gen() sage: rho_T = z + t^3 sage: rho = DrinfeldModule(A, rho_T) sage: rho @@ -185,9 +178,9 @@ class DrinfeldModule(Parent, UniqueRepresentation): One can give a LaTeX name to be used for LaTeX representation:: - sage: sigma = DrinfeldModule(A, [z, 1, 1], latexname='\phi') + sage: sigma = DrinfeldModule(A, [z, 1, 1], latexname='\sigma') sage: latex(sigma) - \phi + \sigma .. RUBRIC:: The category of Drinfeld modules @@ -299,10 +292,10 @@ class DrinfeldModule(Parent, UniqueRepresentation): .. RUBRIC:: Morphisms and isogenies - A morphism of Drinfeld modules `\phi \to \psi` is an Ore polynomial - `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for every `a` in - the function ring. In our case, this is equivalent to `f \phi_T = - \psi_T f`. An isogeny is a nonzero morphism. + A *morphism* of Drinfeld modules `\phi \to \psi` is an Ore + polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for + every `a` in the function ring. In our case, this is equivalent to + `f \phi_T = \psi_T f`. An *isogeny* is a nonzero morphism. Use the ``in`` syntax to test if an Ore polynomial defines a morphism:: @@ -421,6 +414,11 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: action(A.random_element(), 0) 0 + .. WARNING:: + + The class ``DrinfeldModuleAction`` may be replaced later on. See + issues #34833 and #34834. + .. RUBRIC:: Inverting the Drinfeld module The morphism that defines a Drinfeld module is injective. Given an @@ -511,7 +509,6 @@ class DrinfeldModule(Parent, UniqueRepresentation): ... ValueError: constant coefficient must equal that of the category - :: sage: Fq = K = GF(2) From 63fc7d9ff4f5dffaf8e7c7e6a208bd516bbe0da0 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Tue, 7 Feb 2023 10:15:43 +0100 Subject: [PATCH 338/751] Various changes to doc (see details) - Change first sentences of doctests - Refactor DrinfeldModules doctest according to DrinfeldModule --- src/sage/categories/drinfeld_modules.py | 32 +++++++++---------- .../function_field/drinfeld_modules/action.py | 2 +- .../drinfeld_modules/drinfeld_module.py | 4 +-- .../finite_drinfeld_module.py | 2 +- .../function_field/drinfeld_modules/homset.py | 4 +-- .../drinfeld_modules/morphism.py | 6 ++-- 6 files changed, 24 insertions(+), 26 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 735c4a37101..de0a4200b1c 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -30,32 +30,30 @@ class DrinfeldModules(Category_over_base_ring): r""" - This class represents the category of Drinfeld modules on a given - base. + This class implements the category of Drinfeld + `\mathbb{F}_q[T]`-modules on a given base field. Let `\mathbb{F}_q[T]` be a polynomial ring with coefficients in a finite field `\mathbb{F}_q` and let `K` be a field. Fix a ring - morphism `\gamma: \mathbb{F}_q[T] \to K`. We say that the field `K` - is an `\mathbb{F}_q[T]`-field, so that the *base field of the - category* is defined as the `\mathbb{F}_q[T]`-field *K*. The base - field uniquely defines the category, and we also refer to it as its - *base*. The *base morphism* is the morphism `\gamma: \mathbb{F}_q[T] - \to K`. + morphism `\gamma: \mathbb{F}_q[T] \to K`; we say that `K` is an + `\mathbb{F}_q[T]`*-field*. Let `K\{\tau\}` be the ring of Ore + polynomials with coefficients in `K`, whose multiplication is given + by the rule `\tau \lambda = \lambda^q \tau` for any `\lambda \in K`. + + We call `K` the *base field* of the category, and `\gamma` its *base + morphism*. .. NOTE:: Equivalently, the base of the category could be defined as the base morphism `\gamma: \mathbb{F}_q[T] \to K`. - The monic polynomial that generates the kernel of the base morphism - is called the `\mathbb{F}_q[T]`-characteristic of the - `\mathbb{F}_q[T]`-field `K`. It can also be referred to as the - function-field characteristic of `K`. - - We say that `\mathbb{F}_q[T]` is the function ring of the category; - `K\{\tau\}` is the Ore polynomial ring of the category. The constant - coefficient of the category is the image of `T` under the base - morphism. + The monic polynomial that generates the kernel of `\gamma` is called + the `\mathbb{F}_q[T]`-*characteristic*, or *function-field + characteristic*, of the base field. We say that `\mathbb{F}_q[T]` is + the *function ring* of the category; `K\{\tau\}` is the *Ore + polynomial ring*. The constant coefficient of the category is the + image of `T` under the base morphism. INPUT: the base field diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index 6fabd091805..be93b643526 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -27,7 +27,7 @@ class DrinfeldModuleAction(Action): r""" This class implements the module action induced by a Drinfeld - module. + `\mathbb{F}_q[T]`-module. Let `\phi` be a Drinfeld `\mathbb{F}_q[T]`-module over a field `K` and let `L/K` be a field extension. Let `x \in L` and let `a` be a diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 32a0aee4e31..9c66244e225 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -70,8 +70,8 @@ class DrinfeldModule(Parent, UniqueRepresentation): the `\mathbb{F}_q[T]`-*characteristic*, or *function-field characteristic*, of the base field. We say that `\mathbb{F}_q[T]` is the *function ring* of `\phi`; `K\{\tau\}` is the *Ore polynomial - ring* of `\phi`. Further, the *generator* of `\phi` is `\phi_T` and - its *constant coefficient* is the constant coefficient of `\phi_T`. + ring*. Further, the *generator* is `\phi_T` and the *constant + coefficient* is the constant coefficient of `\phi_T`. A Drinfeld module is said to be *finite* if the field `K` is. Despite an emphasis on this case, the base field can be any diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 63e56791d29..9e6f7a3b8c2 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -27,7 +27,7 @@ class FiniteDrinfeldModule(DrinfeldModule): r""" - This class represents a finite Drinfeld module. + This class implements finite Drinfeld `\mathbb{F}_q[T]`-modules. A *finite Drinfeld module* is a Drinfeld module whose base field is finite. In this case, the function field characteristic is a prime diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index c90d5535340..c5391095631 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -28,8 +28,8 @@ class DrinfeldModuleHomset(Homset): r""" - This class represents the set of morphisms between two Drinfeld - modules. + This class implements the set of morphisms between two Drinfeld + `\mathbb{F}_q[T]`-modules. INPUT: diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 18a41c548aa..b1b4d8b895d 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -27,7 +27,7 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, metaclass=InheritComparisonClasscallMetaclass): r""" - This class represents a Drinfeld module morphism. + This class represents Drinfeld `\mathbb{F}_q[T]`-module morphisms. Let `\phi, \psi` be two Drinfeld `\mathbb{F}_q[T]`-modules over a field `K`. A *morphism of Drinfeld modules `\phi \to \psi`* is an @@ -36,8 +36,8 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, \phi_T = \psi_T f`. An *isogeny* is a nonzero morphism. To create a morphism object, the user should never explicitly - instantiate :class:`DrinfeldModuleMorphism`, but rather call the parent - homset with the defining Ore polynomial:: + instantiate :class:`DrinfeldModuleMorphism`, but rather call the + parent homset with the defining Ore polynomial:: sage: Fq = GF(25) sage: A. = Fq[] From 53fab7d5d3c6d273c7b01f59b004f5a376966ed0 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Tue, 7 Feb 2023 10:53:25 +0100 Subject: [PATCH 339/751] Handle NotImplementedError for is_subring --- src/sage/categories/drinfeld_modules.py | 9 ++++++--- .../function_field/drinfeld_modules/drinfeld_module.py | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index de0a4200b1c..b282fcaca61 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -270,10 +270,13 @@ def __init__(self, base_field, name='t'): # Create characteristic self._characteristic = None if K.is_finite(): - #FIXME: This minpoly is over Fp, not Fq + # FIXME: This minpoly is over Fp, not Fq self._characteristic = A(K(base_morphism(T)).minpoly()) - elif A.is_subring(K): - self._characteristic = Integer(0) + try: + if A.is_subring(K): + self._characteristic = Integer(0) + except NotImplementedError: + pass super().__init__(base=base_field) def _latex_(self): diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 9c66244e225..e45af9dcfad 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -607,7 +607,7 @@ def __classcall_private__(cls, function_ring, gen, name='t', latexname=None): raise ValueError('constant coefficient must be nonzero') # The coefficients are in a base field that has coercion from Fq: if not (hasattr(base_field_noext, 'has_coerce_map_from') and - base_field_noext.has_coerce_map_from(function_ring.base_field())): + base_field_noext.has_coerce_map_from(function_ring.base_ring())): raise ValueError('function ring base must coerce into base field') # Check LaTeX name From 09b63288432fee81e4cd5c85819231095d85c48a Mon Sep 17 00:00:00 2001 From: Kryzar Date: Tue, 7 Feb 2023 11:15:47 +0100 Subject: [PATCH 340/751] Adress David's suggestions for Morphism --- src/sage/categories/drinfeld_modules.py | 1 - .../drinfeld_modules/drinfeld_module.py | 3 ++ .../drinfeld_modules/morphism.py | 30 +++++++++---------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index b282fcaca61..e26dad7323e 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -182,7 +182,6 @@ class DrinfeldModules(Category_over_base_ring): :: - sage: base = 'I hate Rostropovitch' sage: cat = DrinfeldModules(base) # known bug (blankline) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index e45af9dcfad..0e570a0159b 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -619,6 +619,9 @@ def __classcall_private__(cls, function_ring, gen, name='t', latexname=None): base_field = base_field_noext else: base_morphism = Hom(function_ring, base_field_noext)(gen[0]) + natural_map = Hom(function_ring, base_field_noext).natural_map() + if base_morphism == natural_map: + base_morphism = natural_map base_field = base_field_noext.over(base_morphism) category = DrinfeldModules(base_field, name=name) diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index b1b4d8b895d..f99be1e93e9 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -29,8 +29,8 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, r""" This class represents Drinfeld `\mathbb{F}_q[T]`-module morphisms. - Let `\phi, \psi` be two Drinfeld `\mathbb{F}_q[T]`-modules over a - field `K`. A *morphism of Drinfeld modules `\phi \to \psi`* is an + Let `\phi` and `\psi` be two Drinfeld `\mathbb{F}_q[T]`-modules over + a field `K`. A *morphism of Drinfeld modules `\phi \to \psi`* is an Ore polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for every `a \in \mathbb{F}_q[T]`. In our case, this is equivalent to `f \phi_T = \psi_T f`. An *isogeny* is a nonzero morphism. @@ -54,7 +54,7 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, To (gen): (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 Defn: t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 - The input Ore polynomial must indeed define a morphism:: + The given Ore polynomial must indeed define a morphism:: sage: morphism = Hom(phi, psi)(1) Traceback (most recent call last): @@ -105,20 +105,18 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, sage: End(phi)(0).parent() == End(phi) True - .. NOTE:: + For the sake of completeness, we explain how the user can directly + instantiate the class, even though this should never be explicitly + done:: - For the sake of completeness, we explain how the user can - directly instantiate the class, even though this should never be - explicitly done:: - - sage: from sage.rings.function_field.drinfeld_modules.morphism import DrinfeldModuleMorphism - sage: DrinfeldModuleMorphism(Hom(phi, psi), ore_pol) - Drinfeld Module morphism: - From (gen): z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - To (gen): (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - Defn: t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 - sage: DrinfeldModuleMorphism(Hom(phi, psi), ore_pol) is morphism - True + sage: from sage.rings.function_field.drinfeld_modules.morphism import DrinfeldModuleMorphism + sage: DrinfeldModuleMorphism(Hom(phi, psi), ore_pol) + Drinfeld Module morphism: + From (gen): z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + To (gen): (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + Defn: t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 + sage: DrinfeldModuleMorphism(Hom(phi, psi), ore_pol) is morphism + True """ @staticmethod From fc9b281d786e01a8f3f2a17bc354525c240cbb31 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Tue, 7 Feb 2023 11:21:51 +0100 Subject: [PATCH 341/751] Try to cast the base morphism to a natural map, when possible --- .../function_field/drinfeld_modules/drinfeld_module.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 0e570a0159b..525eded371b 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -619,9 +619,12 @@ def __classcall_private__(cls, function_ring, gen, name='t', latexname=None): base_field = base_field_noext else: base_morphism = Hom(function_ring, base_field_noext)(gen[0]) - natural_map = Hom(function_ring, base_field_noext).natural_map() - if base_morphism == natural_map: - base_morphism = natural_map + try: + natural_map = Hom(function_ring, base_field_noext).natural_map() + if base_morphism == natural_map: + base_morphism = natural_map + except TypeError: + pass base_field = base_field_noext.over(base_morphism) category = DrinfeldModules(base_field, name=name) From bd430de47d403e3c80acacf101b926776ecb1ea8 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Tue, 7 Feb 2023 11:35:45 +0100 Subject: [PATCH 342/751] Fix LaTeX name init --- .../drinfeld_modules/drinfeld_module.py | 11 +++++------ .../drinfeld_modules/finite_drinfeld_module.py | 6 ++++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 525eded371b..66293a18638 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -91,6 +91,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: K. = Frac(A) sage: psi = DrinfeldModule(A, [z, T+1]) sage: psi + Drinfeld module defined by T |--> (T + 1)*t + T over Fraction Field of Univariate Polynomial Ring in T over Finite Field in z2 of size 7^2 over its base .. NOTE:: @@ -142,10 +143,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: L = Frac(A) sage: psi = DrinfeldModule(A, [L(T), 1, T^3 + T + 1]) sage: psi - Drinfeld module defined by T |--> (T^3 + T + 1)*t^2 + t + T over Ring morphism: - From: Univariate Polynomial Ring in T over Finite Field in z2 of size 3^2 - To: Fraction Field of Univariate Polynomial Ring in T over Finite Field in z2 of size 3^2 - Defn: T |--> T + Drinfeld module defined by T |--> (T^3 + T + 1)*t^2 + t + T over Fraction Field of Univariate Polynomial Ring in T over Finite Field in z2 of size 3^2 over its base :: @@ -179,6 +177,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): One can give a LaTeX name to be used for LaTeX representation:: sage: sigma = DrinfeldModule(A, [z, 1, 1], latexname='\sigma') + ... sage: latex(sigma) \sigma @@ -638,8 +637,8 @@ def __classcall_private__(cls, function_ring, gen, name='t', latexname=None): # Instantiate the appropriate class if base_field.is_finite(): from sage.rings.function_field.drinfeld_modules.finite_drinfeld_module import FiniteDrinfeldModule - return FiniteDrinfeldModule(gen, category) - return cls.__classcall__(cls, gen, category) + return FiniteDrinfeldModule(gen, category, latexname) + return cls.__classcall__(cls, gen, category, latexname) def __init__(self, gen, category, latexname=None): """ diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 9e6f7a3b8c2..5a9c7f77099 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -106,7 +106,7 @@ class FiniteDrinfeldModule(DrinfeldModule): False """ - def __init__(self, gen, category): + def __init__(self, gen, category, latexname=None): """ Initialize `self`. @@ -121,6 +121,8 @@ def __init__(self, gen, category): coefficients or an Ore polynomial - ``name`` (default: `'t'`) -- the name of the Ore polynomial ring gen + - ``latexname`` (default: ``None``) -- the LaTeX name of the Drinfeld + module TESTS:: @@ -139,7 +141,7 @@ def __init__(self, gen, category): # added one to ensure that FiniteDrinfeldModule would always # have _frobenius_norm and _frobenius_trace attributes. - super().__init__(gen, category) + super().__init__(gen, category, latexname) self._frobenius_norm = None self._frobenius_trace = None From d8441f51685a7ff34db06ed9ff791bdcde523d7e Mon Sep 17 00:00:00 2001 From: Kryzar Date: Tue, 7 Feb 2023 11:39:44 +0100 Subject: [PATCH 343/751] (fix) Stop using base.codomain --- src/sage/categories/drinfeld_modules.py | 6 +++--- .../function_field/drinfeld_modules/drinfeld_module.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index e26dad7323e..52eec420b13 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -413,7 +413,7 @@ def constant_coefficient(self): r""" Return the constant coefficient of the category. - OUTPUT: an element in the base codomain + OUTPUT: an element in the base field EXAMPLES:: @@ -604,7 +604,7 @@ def base_morphism(self): To: Finite Field in z12 of size 5^12 over its base Defn: T |--> 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - The base codomain can be infinite:: + The base field can be infinite:: sage: sigma = DrinfeldModule(A, [Frac(A).gen(), 1]) # todo: not tested sage: sigma.base_morphism() # todo: not tested @@ -660,7 +660,7 @@ def constant_coefficient(self): r""" Return the constant coefficient of the generator. - OUTPUT: an element in the base codomain + OUTPUT: an element in the base field EXAMPLES:: diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 66293a18638..b88066d4d3d 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -1108,7 +1108,7 @@ def invert(self, ore_pol): r = self.rank() if ore_pol not in self._ore_polring: raise TypeError('input must be an Ore polynomial') - if ore_pol in self._base.codomain(): + if ore_pol in self._base: return self._Fq(ore_pol) if deg % r != 0: raise ValueError('input must be in the image of the Drinfeld ' From cd96c6f7118c13daba560bf35deb46bb97977f2d Mon Sep 17 00:00:00 2001 From: Kryzar Date: Tue, 7 Feb 2023 11:55:58 +0100 Subject: [PATCH 344/751] Fix some doctests --- .../drinfeld_modules/drinfeld_module.py | 19 +++++++++---------- .../finite_drinfeld_module.py | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index b88066d4d3d..781a82c51fb 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -524,14 +524,6 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: phi = DrinfeldModule(A, [K(1), 1]) sage: isinstance(phi.ore_polring(), OrePolynomialRing) True - - Test that the base morphism is correct:: - - sage: Fq = GF(25) - sage: A. = Fq[] - sage: K = Frac(Fq) - sage: phi = DrinfeldModule(A, [Fq.gen(), K(1)]) - sage: phi.base_morphism().codomain() is K """ @staticmethod @@ -812,6 +804,7 @@ def _latex_(self): :: sage: psi = DrinfeldModule(A, [p_root, z12^3, z12^5], latexname='\psi') + ... sage: latex(psi) \psi @@ -1012,13 +1005,18 @@ def height(self): sage: phi.is_ordinary() True - sage: L = Frac(A) + :: + + sage: B. = Fq[] + sage: L = Frac(B) sage: phi = DrinfeldModule(A, [L(2), L(1)]) sage: phi.height() Traceback (most recent call last): ... ValueError: height is defined for prime function field characteristic + :: + sage: Fq = GF(343) sage: A. = Fq[] sage: K. = Fq.extension(2) @@ -1146,7 +1144,8 @@ def is_finite(self): sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: phi.is_finite() True - sage: L = Frac(A) + sage: B. = Fq[] + sage: L = Frac(B) sage: psi = DrinfeldModule(A, [L(2), L(1)]) sage: psi.is_finite() False diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 5a9c7f77099..4fd8947fd5d 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -173,7 +173,7 @@ def frobenius_endomorphism(self): """ t = self.ore_polring().gen() Fq = self._function_ring.base() - #FIXME + # FIXME deg = self._base.over(Fq).degree(Fq) return self._Hom_(self, category=self.category())(t**deg) From ba4fc7663b366ffcbc9194a454129c7ab1d76b06 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Tue, 7 Feb 2023 15:54:05 +0100 Subject: [PATCH 345/751] Modify natural map creation --- .../drinfeld_modules/drinfeld_module.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 781a82c51fb..d012c02fde5 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -606,16 +606,15 @@ def __classcall_private__(cls, function_ring, gen, name='t', latexname=None): raise ValueError('LaTeX name should be a string') # Build the category + T = function_ring.gen() if isinstance(base_field_noext, RingExtension_generic): base_field = base_field_noext + elif base_field_noext.has_coerce_map_from(function_ring) \ + and T == gen[0]: + base_morphism = base_field_noext.coerce_map_from(function_ring) + base_field = base_field_noext.over(base_morphism) else: base_morphism = Hom(function_ring, base_field_noext)(gen[0]) - try: - natural_map = Hom(function_ring, base_field_noext).natural_map() - if base_morphism == natural_map: - base_morphism = natural_map - except TypeError: - pass base_field = base_field_noext.over(base_morphism) category = DrinfeldModules(base_field, name=name) From 7bc38004342d8925cda7fa37e3b2247e73923f25 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Tue, 7 Feb 2023 16:58:48 +0100 Subject: [PATCH 346/751] Fix extensions over Fq --- src/sage/categories/drinfeld_modules.py | 3 +-- .../function_field/drinfeld_modules/finite_drinfeld_module.py | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 52eec420b13..1b79ad1d18e 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -269,8 +269,7 @@ def __init__(self, base_field, name='t'): # Create characteristic self._characteristic = None if K.is_finite(): - # FIXME: This minpoly is over Fp, not Fq - self._characteristic = A(K(base_morphism(T)).minpoly()) + self._characteristic = A(K.over(Fq)(base_morphism(T)).minpoly()) try: if A.is_subring(K): self._characteristic = Integer(0) diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 4fd8947fd5d..1460d73e8c6 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -173,7 +173,6 @@ def frobenius_endomorphism(self): """ t = self.ore_polring().gen() Fq = self._function_ring.base() - # FIXME deg = self._base.over(Fq).degree(Fq) return self._Hom_(self, category=self.category())(t**deg) From ff2d38d1e5b2dab7d7c5b8715da3035964f4868f Mon Sep 17 00:00:00 2001 From: DavidAyotte Date: Tue, 7 Feb 2023 17:33:54 +0100 Subject: [PATCH 347/751] fix the method monomials_of_degree --- src/sage/rings/polynomial/multi_polynomial_ring_base.pyx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/sage/rings/polynomial/multi_polynomial_ring_base.pyx b/src/sage/rings/polynomial/multi_polynomial_ring_base.pyx index f6a46ac4898..c8cfc106236 100644 --- a/src/sage/rings/polynomial/multi_polynomial_ring_base.pyx +++ b/src/sage/rings/polynomial/multi_polynomial_ring_base.pyx @@ -444,7 +444,7 @@ cdef class MPolynomialRing_base(sage.rings.ring.CommutativeRing): 1/2*x^3 + x*y + z^2 - 1/2*x + y + 25 .. SEEALSO:: - + :meth:`lagrange_polynomial` """ # get ring and number of variables @@ -1387,8 +1387,9 @@ cdef class MPolynomialRing_base(sage.rings.ring.CommutativeRing): sage: len(mons) == binomial(3+2-1,2) True """ - from sage.combinat.integer_vector import IntegerVectors - return [self.monomial(*a) for a in IntegerVectors(degree, self.ngens())] + deg_of_gens = [x.degree() for x in self.gens()] + from sage.combinat.integer_vector_weighted import WeightedIntegerVectors + return [self.monomial(*a) for a in WeightedIntegerVectors(degree, deg_of_gens)] def _macaulay_resultant_getS(self, mon_deg_tuple, dlist): r""" From 2407ba051d0f757112a6add7843cc4443f4c6f07 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Tue, 7 Feb 2023 17:36:10 +0100 Subject: [PATCH 348/751] Create base_over_constants_field DrinfeldModules method --- src/sage/categories/drinfeld_modules.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 1b79ad1d18e..87478f8bd00 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -275,6 +275,10 @@ def __init__(self, base_field, name='t'): self._characteristic = Integer(0) except NotImplementedError: pass + # Create base over constants field + i = A.coerce_map_from(Fq) + Fq_to_K = self._base_morphism * i + self._base_over_constants_field = base_field.over(Fq_to_K) super().__init__(base=base_field) def _latex_(self): @@ -380,6 +384,26 @@ def base_morphism(self): """ return self._base_morphism + def base_over_constants_field(self): + r""" + Return the base field, seen as an extension over the constants + field `\mathbb{F}_q`. + + OUTPUT: a ring extension + + EXAMPLES:: + + sage: Fq = GF(11) + sage: A. = Fq[] + sage: K. = Fq.extension(4) + sage: p_root = z^3 + 7*z^2 + 6*z + 10 + sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) + sage: cat = phi.category() + sage: cat.base_over_constants_field() + Field in z with defining polynomial x^4 + 8*x^2 + 10*x + 2 over its base + """ + return self._base_over_constants_field + def characteristic(self): r""" Return the function ring-characteristic. From 88505c2e9d53289200a1fedbd385623db1378b52 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Tue, 7 Feb 2023 17:40:31 +0100 Subject: [PATCH 349/751] Create base_over_constants_field DrinfeldModule (singular) method --- src/sage/categories/drinfeld_modules.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 87478f8bd00..bbf45fbf5a0 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -634,6 +634,25 @@ def base_morphism(self): """ return self.category().base_morphism() + def base_over_constants_field(self): + r""" + Return the base field, seen as an extension over the constants + field `\mathbb{F}_q`. + + OUTPUT: a ring extension + + EXAMPLES:: + + sage: Fq = GF(25) + sage: A. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) + sage: phi.base_over_constants_field() + Field in z12 with defining polynomial x^6 + (4*z2 + 3)*x^5 + x^4 + (3*z2 + 1)*x^3 + x^2 + (4*z2 + 1)*x + z2 over its base + """ + return self.category().base_over_constants_field() + def characteristic(self): r""" Return the function ring-characteristic. From 3cea9023aa6f34748b1dac6c27e0ffa940ce080f Mon Sep 17 00:00:00 2001 From: Kryzar Date: Tue, 7 Feb 2023 17:41:51 +0100 Subject: [PATCH 350/751] (fix) Remove `not tested` comments from DrinfeldModules --- src/sage/categories/drinfeld_modules.py | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index bbf45fbf5a0..daad92e56ee 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -423,8 +423,8 @@ def characteristic(self): :: - sage: psi = DrinfeldModule(A, [Frac(A).gen(), 1]) # todo: not tested - sage: psi.category().characteristic() # todo: not tested + sage: psi = DrinfeldModule(A, [Frac(A).gen(), 1]) + sage: psi.category().characteristic() 0 """ if self._characteristic is None: @@ -602,8 +602,8 @@ def base(self): The base can be infinite:: - sage: sigma = DrinfeldModule(A, [Frac(A).gen(), 1]) # todo: not tested - sage: sigma.base() # todo: not tested + sage: sigma = DrinfeldModule(A, [Frac(A).gen(), 1]) + sage: sigma.base() Fraction Field of Univariate Polynomial Ring in T over Finite Field in z2 of size 5^2 over its base """ return self.category().base() @@ -629,8 +629,8 @@ def base_morphism(self): The base field can be infinite:: - sage: sigma = DrinfeldModule(A, [Frac(A).gen(), 1]) # todo: not tested - sage: sigma.base_morphism() # todo: not tested + sage: sigma = DrinfeldModule(A, [Frac(A).gen(), 1]) + sage: sigma.base_morphism() """ return self.category().base_morphism() @@ -666,16 +666,17 @@ def characteristic(self): sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) - sage: phi.characteristic() # todo: not tested + sage: phi.characteristic() T^2 + (4*z2 + 2)*T + 2 sage: phi.base_morphism()(phi.characteristic()) 0 :: - sage: L = Frac(A) # todo: not tested - sage: psi = DrinfeldModule(A, [L(1), 0, 0, L(1)]) # todo: not tested - sage: psi.characteristic() # todo: not tested + sage: B. = Fq[] + sage: L = Frac(B) + sage: psi = DrinfeldModule(A, [L(1), 0, 0, L(1)]) + sage: psi.characteristic() 0 """ return self.category().characteristic() From eb42cbcbe3aa4483f2d166404b0e00c408ff3cc8 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Tue, 7 Feb 2023 18:12:26 +0100 Subject: [PATCH 351/751] Fix invert method and move it for *finite* Drinfeld modules --- src/sage/categories/drinfeld_modules.py | 256 +++++++++--------- .../drinfeld_modules/drinfeld_module.py | 105 ------- .../finite_drinfeld_module.py | 114 ++++++++ 3 files changed, 242 insertions(+), 233 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index daad92e56ee..a8f74cff940 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -634,120 +634,12 @@ def base_morphism(self): """ return self.category().base_morphism() - def base_over_constants_field(self): - r""" - Return the base field, seen as an extension over the constants - field `\mathbb{F}_q`. - - OUTPUT: a ring extension - - EXAMPLES:: - - sage: Fq = GF(25) - sage: A. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) - sage: phi.base_over_constants_field() - Field in z12 with defining polynomial x^6 + (4*z2 + 3)*x^5 + x^4 + (3*z2 + 1)*x^3 + x^2 + (4*z2 + 1)*x + z2 over its base - """ - return self.category().base_over_constants_field() - - def characteristic(self): - r""" - Return the function ring-characteristic. - - OUTPUT: a univariate polynomial ring - - EXAMPLES:: - - sage: Fq = GF(25) - sage: A. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) - sage: phi.characteristic() - T^2 + (4*z2 + 2)*T + 2 - sage: phi.base_morphism()(phi.characteristic()) - 0 - - :: - - sage: B. = Fq[] - sage: L = Frac(B) - sage: psi = DrinfeldModule(A, [L(1), 0, 0, L(1)]) - sage: psi.characteristic() - 0 - """ - return self.category().characteristic() - - def function_ring(self): - r""" - Return the function ring of the Drinfeld module. - - OUTPUT: a univariate polynomial ring - - EXAMPLES:: - - sage: Fq = GF(25) - sage: A. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) - sage: phi.function_ring() is A - True - """ - return self.category().function_ring() - - def constant_coefficient(self): - r""" - Return the constant coefficient of the generator. - - OUTPUT: an element in the base field - - EXAMPLES:: - - sage: Fq = GF(25) - sage: A. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) - sage: phi.constant_coefficient() == p_root - True - - Let `\mathbb{F}_q[T]` be the function ring, and let `\gamma` - the base of the Drinfeld module. The constant coefficient - equals `\gamma(T)`:: - - sage: cat = phi.category() - sage: base = cat.base() - sage: base(T) == phi.constant_coefficient() - True - - Naturally, two Drinfeld modules in the same category have the - same constant coefficient:: - - sage: t = phi.ore_polring().gen() - sage: psi = cat.object(phi.constant_coefficient() + t^3) - sage: psi - Drinfeld module defined by T |--> t^3 + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 over its base - - Reciprocally, it is impossible to create two Drinfeld modules in - this category if they do not share the same constant - coefficient:: - - sage: rho = cat.object(phi.constant_coefficient() + 1 + t^3) - Traceback (most recent call last): - ... - ValueError: constant coefficient must equal that of the category - """ - return self.category().constant_coefficient() - - def ore_polring(self): + def base_over_constants_field(self): r""" - Return the Ore polynomial ring of the Drinfeld module. + Return the base field, seen as an extension over the constants + field `\mathbb{F}_q`. - OUTPUT: an Ore polynomial ring + OUTPUT: a ring extension EXAMPLES:: @@ -756,20 +648,128 @@ def ore_polring(self): sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) - sage: ore_polring = phi.ore_polring() - sage: ore_polring - Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 over its base twisted by Frob^2 - - The Ore polynomial ring can also be retrieved from the category - of the Drinfeld module:: - - sage: ore_polring is phi.category().ore_polring() - True - - The generator of the Drinfeld module is in the Ore polynomial - ring:: - - sage: phi(T) in ore_polring - True + sage: phi.base_over_constants_field() + Field in z12 with defining polynomial x^6 + (4*z2 + 3)*x^5 + x^4 + (3*z2 + 1)*x^3 + x^2 + (4*z2 + 1)*x + z2 over its base """ - return self.category().ore_polring() + return self.category().base_over_constants_field() + + def characteristic(self): + r""" + Return the function ring-characteristic. + + OUTPUT: a univariate polynomial ring + + EXAMPLES:: + + sage: Fq = GF(25) + sage: A. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) + sage: phi.characteristic() + T^2 + (4*z2 + 2)*T + 2 + sage: phi.base_morphism()(phi.characteristic()) + 0 + + :: + + sage: B. = Fq[] + sage: L = Frac(B) + sage: psi = DrinfeldModule(A, [L(1), 0, 0, L(1)]) + sage: psi.characteristic() + 0 + """ + return self.category().characteristic() + + def function_ring(self): + r""" + Return the function ring of the Drinfeld module. + + OUTPUT: a univariate polynomial ring + + EXAMPLES:: + + sage: Fq = GF(25) + sage: A. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) + sage: phi.function_ring() is A + True + """ + return self.category().function_ring() + + def constant_coefficient(self): + r""" + Return the constant coefficient of the generator. + + OUTPUT: an element in the base field + + EXAMPLES:: + + sage: Fq = GF(25) + sage: A. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) + sage: phi.constant_coefficient() == p_root + True + + Let `\mathbb{F}_q[T]` be the function ring, and let `\gamma` + the base of the Drinfeld module. The constant coefficient + equals `\gamma(T)`:: + + sage: cat = phi.category() + sage: base = cat.base() + sage: base(T) == phi.constant_coefficient() + True + + Naturally, two Drinfeld modules in the same category have the + same constant coefficient:: + + sage: t = phi.ore_polring().gen() + sage: psi = cat.object(phi.constant_coefficient() + t^3) + sage: psi + Drinfeld module defined by T |--> t^3 + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 over its base + + Reciprocally, it is impossible to create two Drinfeld modules in + this category if they do not share the same constant + coefficient:: + + sage: rho = cat.object(phi.constant_coefficient() + 1 + t^3) + Traceback (most recent call last): + ... + ValueError: constant coefficient must equal that of the category + """ + return self.category().constant_coefficient() + + def ore_polring(self): + r""" + Return the Ore polynomial ring of the Drinfeld module. + + OUTPUT: an Ore polynomial ring + + EXAMPLES:: + + sage: Fq = GF(25) + sage: A. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) + sage: ore_polring = phi.ore_polring() + sage: ore_polring + Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 over its base twisted by Frob^2 + + The Ore polynomial ring can also be retrieved from the category + of the Drinfeld module:: + + sage: ore_polring is phi.category().ore_polring() + True + + The generator of the Drinfeld module is in the Ore polynomial + ring:: + + sage: phi(T) in ore_polring + True + """ + return self.category().ore_polring() diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index d012c02fde5..cf6743638a4 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -26,9 +26,7 @@ from sage.categories.drinfeld_modules import DrinfeldModules from sage.categories.homset import Hom -from sage.matrix.constructor import Matrix from sage.misc.latex import latex -from sage.modules.free_module_element import vector from sage.rings.integer import Integer from sage.rings.polynomial.ore_polynomial_element import OrePolynomial from sage.rings.polynomial.polynomial_ring import PolynomialRing_general @@ -418,17 +416,6 @@ class DrinfeldModule(Parent, UniqueRepresentation): The class ``DrinfeldModuleAction`` may be replaced later on. See issues #34833 and #34834. - .. RUBRIC:: Inverting the Drinfeld module - - The morphism that defines a Drinfeld module is injective. Given an - Ore polynomial that equals `\phi_a` for some function ring elelement - `a`, one can retrieve `a` (as a morphism, a Drinfeld module is - injective, see [Gos1998]_, cor. 4.5.2.):: - - sage: a = A.random_element() - sage: phi.invert(phi(a)) == a - True - TESTS: The generator must have positive degree:: @@ -1036,98 +1023,6 @@ def height(self): except NotImplementedError: raise NotImplementedError('height not implemented in this case') - def invert(self, ore_pol): - r""" - Return the preimage of the input under the Drinfeld module, if it - exists. - - INPUT: - - - ``ore_pol`` -- the Ore polynomial whose preimage we want to - compute - - OUTPUT: a function ring element - - EXAMPLES:: - - sage: Fq = GF(25) - sage: A. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) - sage: a = A.random_element() - sage: phi.invert(phi(a)) == a - True - sage: phi.invert(phi(T)) == T - True - sage: phi.invert(phi(Fq.gen())) == Fq.gen() - True - - When the input is not in the image of the Drinfeld module, an - exception is raised:: - - sage: t = phi.ore_polring().gen() - sage: phi.invert(t + 1) - Traceback (most recent call last): - ... - ValueError: input must be in the image of the Drinfeld module - sage: phi.invert(t^3 + t^2 + 1) - Traceback (most recent call last): - ... - ValueError: input must be in the image of the Drinfeld module - - ALGORITHM: - - The algorithm relies on the inversion of a linear algebra - system. See [MS2019]_, 3.2.5 for details. - - TESTS:: - - sage: a = A.random_element() - sage: cat = phi.category() - sage: phi_r1 = cat.random_object(1) - sage: phi_r1.invert(phi_r1(a)) == a - True - sage: phi_r2 = cat.random_object(2) - sage: phi_r2.invert(phi_r2(a)) == a - True - sage: phi_r3 = cat.random_object(3) - sage: phi_r3.invert(phi_r3(a)) == a - True - sage: phi_r4 = cat.random_object(4) - sage: phi_r4.invert(phi_r4(a)) == a - True - sage: phi_r5 = cat.random_object(5) - sage: phi_r5.invert(phi_r5(a)) == a - True - """ - deg = ore_pol.degree() - r = self.rank() - if ore_pol not in self._ore_polring: - raise TypeError('input must be an Ore polynomial') - if ore_pol in self._base: - return self._Fq(ore_pol) - if deg % r != 0: - raise ValueError('input must be in the image of the Drinfeld ' - 'module') - - k = deg // r - T = self._function_ring.gen() - mat_lines = [[0 for _ in range(k+1)] for _ in range(k+1)] - for i in range(k+1): - phi_T_i = self(T**i) - for j in range(i+1): - mat_lines[j][i] = phi_T_i[r*j] - mat = Matrix(mat_lines) - vec = vector([list(ore_pol)[r*j] for j in range(k+1)]) - pre_image = self._function_ring(list((mat**(-1)) * vec)) - - if self(pre_image) == ore_pol: - return pre_image - else: - raise ValueError('input must be in the image of the Drinfeld ' - 'module') - def is_finite(self): r""" Return ``True`` whether the Drinfeld module is finite. diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 1460d73e8c6..a5041ec011a 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -21,6 +21,8 @@ # http://www.gnu.org/licenses/ # ***************************************************************************** +from sage.matrix.constructor import Matrix +from sage.modules.free_module_element import vector from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.function_field.drinfeld_modules.drinfeld_module import DrinfeldModule @@ -104,6 +106,16 @@ class FiniteDrinfeldModule(DrinfeldModule): True sage: phi.is_supersingular() False + + .. RUBRIC:: Inverting the Drinfeld module + + The morphism that defines a Drinfeld module is injective (see + [Gos1998]_, cor. 4.5.2). If the Drinfeld module is finite, one can + retrieve preimages: + + sage: a = A.random_element() + sage: phi.invert(phi(a)) == a + True """ def __init__(self, gen, category, latexname=None): @@ -370,6 +382,108 @@ def frobenius_trace(self): self._frobenius_trace = self.invert(t**n + (self(B) // t**n)) return self._frobenius_trace + def invert(self, ore_pol): + r""" + Return the preimage of the input under the Drinfeld module, if it + exists. + + INPUT: + + - ``ore_pol`` -- the Ore polynomial whose preimage we want to + compute + + OUTPUT: a function ring element + + EXAMPLES:: + + sage: Fq = GF(25) + sage: A. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) + sage: a = A.random_element() + sage: phi.invert(phi(a)) == a + True + sage: phi.invert(phi(T)) == T + True + sage: phi.invert(phi(Fq.gen())) == Fq.gen() + True + + When the input is not in the image of the Drinfeld module, an + exception is raised:: + + sage: t = phi.ore_polring().gen() + sage: phi.invert(t + 1) + Traceback (most recent call last): + ... + ValueError: input must be in the image of the Drinfeld module + sage: phi.invert(t^3 + t^2 + 1) + Traceback (most recent call last): + ... + ValueError: input must be in the image of the Drinfeld module + + ALGORITHM: + + The algorithm relies on the inversion of a linear algebra + system. See [MS2019]_, 3.2.5 for details. + + TESTS:: + + sage: a = A.random_element() + sage: cat = phi.category() + sage: phi_r1 = cat.random_object(1) + sage: phi_r1.invert(phi_r1(a)) == a + True + sage: phi_r2 = cat.random_object(2) + sage: phi_r2.invert(phi_r2(a)) == a + True + sage: phi_r3 = cat.random_object(3) + sage: phi_r3.invert(phi_r3(a)) == a + True + sage: phi_r4 = cat.random_object(4) + sage: phi_r4.invert(phi_r4(a)) == a + True + sage: phi_r5 = cat.random_object(5) + sage: phi_r5.invert(phi_r5(a)) == a + True + """ + deg = ore_pol.degree() + r = self.rank() + base_over_Fq = self.base_over_constants_field() + if ore_pol not in self._ore_polring: + raise TypeError('input must be an Ore polynomial') + if ore_pol.degree() == 0: + coord = base_over_Fq(self._base(ore_pol)).vector() + if coord.nonzero_positions == [0]: + return self._Fq(coord[0]) + if ore_pol == 0: + return self._Fq.zero() + if deg % r != 0: + raise ValueError('input must be in the image of the Drinfeld ' + 'module') + + k = deg // r + T = self._function_ring.gen() + mat_lines = [[0 for _ in range(k+1)] for _ in range(k+1)] + for i in range(k+1): + phi_T_i = self(T**i) + for j in range(i+1): + mat_lines[j][i] = phi_T_i[r*j] + mat = Matrix(mat_lines) + vec = vector([list(ore_pol)[r*j] for j in range(k+1)]) + coeffs = list((mat**(-1)) * vec) + coeffs_in_Fq = [] + for coeff in coeffs: + coeff_in_Fq = base_over_Fq(coeff).vector()[0] + coeffs_in_Fq.append(coeff_in_Fq) + pre_image = self._function_ring(coeffs_in_Fq) + + if self(pre_image) == ore_pol: + return pre_image + else: + raise ValueError('input must be in the image of the Drinfeld ' + 'module') + def is_ordinary(self): r""" Return ``True`` whether the Drinfeld module is ordinary; raise a From a37eb292aadbf08ce2b6146ace3d1394f07f326d Mon Sep 17 00:00:00 2001 From: DavidAyotte Date: Tue, 7 Feb 2023 18:12:52 +0100 Subject: [PATCH 352/751] fix and add doctests --- src/sage/rings/polynomial/multi_polynomial_ring_base.pyx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sage/rings/polynomial/multi_polynomial_ring_base.pyx b/src/sage/rings/polynomial/multi_polynomial_ring_base.pyx index c8cfc106236..f0c679c395b 100644 --- a/src/sage/rings/polynomial/multi_polynomial_ring_base.pyx +++ b/src/sage/rings/polynomial/multi_polynomial_ring_base.pyx @@ -1379,7 +1379,10 @@ cdef class MPolynomialRing_base(sage.rings.ring.CommutativeRing): sage: R. = ZZ[] sage: mons = R.monomials_of_degree(2) sage: mons - [x^2, x*y, x*z, y^2, y*z, z^2] + [z^2, y*z, x*z, y^2, x*y, x^2] + sage: P = PolynomialRing(QQ, 3, 'x,y,z', order=TermOrder('wdeglex', [1,2,1])) + sage: P.monomials_of_degree(2) + [y, z^2, x*z, x^2] The number of such monomials equals `\binom{n+k-1}{k}` where `n` is the number of variables and `k` the degree:: From de74a78c97c36e2641a0dcc389fb5780b344fa50 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Tue, 7 Feb 2023 18:17:35 +0100 Subject: [PATCH 353/751] (fix) Identation problem in DrinfeldModules --- src/sage/categories/drinfeld_modules.py | 240 ++++++++++++------------ 1 file changed, 120 insertions(+), 120 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index a8f74cff940..5c1aa204d24 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -653,123 +653,123 @@ def base_over_constants_field(self): """ return self.category().base_over_constants_field() - def characteristic(self): - r""" - Return the function ring-characteristic. - - OUTPUT: a univariate polynomial ring - - EXAMPLES:: - - sage: Fq = GF(25) - sage: A. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) - sage: phi.characteristic() - T^2 + (4*z2 + 2)*T + 2 - sage: phi.base_morphism()(phi.characteristic()) - 0 - - :: - - sage: B. = Fq[] - sage: L = Frac(B) - sage: psi = DrinfeldModule(A, [L(1), 0, 0, L(1)]) - sage: psi.characteristic() - 0 - """ - return self.category().characteristic() - - def function_ring(self): - r""" - Return the function ring of the Drinfeld module. - - OUTPUT: a univariate polynomial ring - - EXAMPLES:: - - sage: Fq = GF(25) - sage: A. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) - sage: phi.function_ring() is A - True - """ - return self.category().function_ring() - - def constant_coefficient(self): - r""" - Return the constant coefficient of the generator. - - OUTPUT: an element in the base field - - EXAMPLES:: - - sage: Fq = GF(25) - sage: A. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) - sage: phi.constant_coefficient() == p_root - True - - Let `\mathbb{F}_q[T]` be the function ring, and let `\gamma` - the base of the Drinfeld module. The constant coefficient - equals `\gamma(T)`:: - - sage: cat = phi.category() - sage: base = cat.base() - sage: base(T) == phi.constant_coefficient() - True - - Naturally, two Drinfeld modules in the same category have the - same constant coefficient:: - - sage: t = phi.ore_polring().gen() - sage: psi = cat.object(phi.constant_coefficient() + t^3) - sage: psi - Drinfeld module defined by T |--> t^3 + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 over its base - - Reciprocally, it is impossible to create two Drinfeld modules in - this category if they do not share the same constant - coefficient:: - - sage: rho = cat.object(phi.constant_coefficient() + 1 + t^3) - Traceback (most recent call last): - ... - ValueError: constant coefficient must equal that of the category - """ - return self.category().constant_coefficient() - - def ore_polring(self): - r""" - Return the Ore polynomial ring of the Drinfeld module. - - OUTPUT: an Ore polynomial ring - - EXAMPLES:: - - sage: Fq = GF(25) - sage: A. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) - sage: ore_polring = phi.ore_polring() - sage: ore_polring - Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 over its base twisted by Frob^2 - - The Ore polynomial ring can also be retrieved from the category - of the Drinfeld module:: - - sage: ore_polring is phi.category().ore_polring() - True - - The generator of the Drinfeld module is in the Ore polynomial - ring:: - - sage: phi(T) in ore_polring - True - """ - return self.category().ore_polring() + def characteristic(self): + r""" + Return the function ring-characteristic. + + OUTPUT: a univariate polynomial ring + + EXAMPLES:: + + sage: Fq = GF(25) + sage: A. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) + sage: phi.characteristic() + T^2 + (4*z2 + 2)*T + 2 + sage: phi.base_morphism()(phi.characteristic()) + 0 + + :: + + sage: B. = Fq[] + sage: L = Frac(B) + sage: psi = DrinfeldModule(A, [L(1), 0, 0, L(1)]) + sage: psi.characteristic() + 0 + """ + return self.category().characteristic() + + def function_ring(self): + r""" + Return the function ring of the Drinfeld module. + + OUTPUT: a univariate polynomial ring + + EXAMPLES:: + + sage: Fq = GF(25) + sage: A. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) + sage: phi.function_ring() is A + True + """ + return self.category().function_ring() + + def constant_coefficient(self): + r""" + Return the constant coefficient of the generator. + + OUTPUT: an element in the base field + + EXAMPLES:: + + sage: Fq = GF(25) + sage: A. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) + sage: phi.constant_coefficient() == p_root + True + + Let `\mathbb{F}_q[T]` be the function ring, and let `\gamma` + the base of the Drinfeld module. The constant coefficient + equals `\gamma(T)`:: + + sage: cat = phi.category() + sage: base = cat.base() + sage: base(T) == phi.constant_coefficient() + True + + Naturally, two Drinfeld modules in the same category have the + same constant coefficient:: + + sage: t = phi.ore_polring().gen() + sage: psi = cat.object(phi.constant_coefficient() + t^3) + sage: psi + Drinfeld module defined by T |--> t^3 + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 over its base + + Reciprocally, it is impossible to create two Drinfeld modules in + this category if they do not share the same constant + coefficient:: + + sage: rho = cat.object(phi.constant_coefficient() + 1 + t^3) + Traceback (most recent call last): + ... + ValueError: constant coefficient must equal that of the category + """ + return self.category().constant_coefficient() + + def ore_polring(self): + r""" + Return the Ore polynomial ring of the Drinfeld module. + + OUTPUT: an Ore polynomial ring + + EXAMPLES:: + + sage: Fq = GF(25) + sage: A. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) + sage: ore_polring = phi.ore_polring() + sage: ore_polring + Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 over its base twisted by Frob^2 + + The Ore polynomial ring can also be retrieved from the category + of the Drinfeld module:: + + sage: ore_polring is phi.category().ore_polring() + True + + The generator of the Drinfeld module is in the Ore polynomial + ring:: + + sage: phi(T) in ore_polring + True + """ + return self.category().ore_polring() From 506fb1561aea4faed202be6fe2a8fa101ec94bb8 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Tue, 7 Feb 2023 18:22:37 +0100 Subject: [PATCH 354/751] (fix) Fix some doctest fails --- .../rings/function_field/drinfeld_modules/drinfeld_module.py | 2 +- .../function_field/drinfeld_modules/finite_drinfeld_module.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index cf6743638a4..68d6bb79abc 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -999,7 +999,7 @@ def height(self): sage: phi.height() Traceback (most recent call last): ... - ValueError: height is defined for prime function field characteristic + NotImplementedError: height not implemented in this case :: diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index a5041ec011a..4a0c0984c14 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -188,7 +188,7 @@ def frobenius_endomorphism(self): deg = self._base.over(Fq).degree(Fq) return self._Hom_(self, category=self.category())(t**deg) - def frobenius_charpoly(self, var='T'): + def frobenius_charpoly(self, var='X'): r""" Return the characteristic polynomial of the Frobenius endomorphism if the rank is two. Raise a NotImplementedError @@ -227,7 +227,7 @@ def frobenius_charpoly(self, var='T'): sage: phi = DrinfeldModule(A, [1, 0, z6]) sage: chi = phi.frobenius_charpoly() sage: chi - T^2 + ((3*z3^2 + z3 + 4)*X + 4*z3^2 + 6*z3 + 3)*T + (5*z3^2 + 2*z3)*X^2 + (4*z3^2 + 3*z3)*X + 5*z3^2 + 2*z3 + X^2 + ((3*z3^2 + z3 + 4)*T + 4*z3^2 + 6*z3 + 3)*X + (5*z3^2 + 2*z3)*T^2 + (4*z3^2 + 3*z3)*T + 5*z3^2 + 2*z3 :: From f119d2ce0f1f9b764142db55e1669ce553826ec6 Mon Sep 17 00:00:00 2001 From: DavidAyotte Date: Tue, 7 Feb 2023 19:46:23 +0100 Subject: [PATCH 355/751] fix the ordering and add doctests --- .../polynomial/multi_polynomial_ring_base.pyx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/sage/rings/polynomial/multi_polynomial_ring_base.pyx b/src/sage/rings/polynomial/multi_polynomial_ring_base.pyx index f0c679c395b..1a0faf98497 100644 --- a/src/sage/rings/polynomial/multi_polynomial_ring_base.pyx +++ b/src/sage/rings/polynomial/multi_polynomial_ring_base.pyx @@ -1380,9 +1380,15 @@ cdef class MPolynomialRing_base(sage.rings.ring.CommutativeRing): sage: mons = R.monomials_of_degree(2) sage: mons [z^2, y*z, x*z, y^2, x*y, x^2] - sage: P = PolynomialRing(QQ, 3, 'x,y,z', order=TermOrder('wdeglex', [1,2,1])) + sage: P = PolynomialRing(QQ, 3, 'x, y, z', order=TermOrder('wdeglex', [1, 2, 1])) sage: P.monomials_of_degree(2) - [y, z^2, x*z, x^2] + [z^2, y, x*z, x^2] + sage: P = PolynomialRing(QQ, 3, 'x, y, z', order='lex') + sage: P.monomials_of_degree(3) + [z^3, y*z^2, y^2*z, y^3, x*z^2, x*y*z, x*y^2, x^2*z, x^2*y, x^3] + sage: P = PolynomialRing(QQ, 3, 'x, y, z', order='invlex') + sage: P.monomials_of_degree(3) + [x^3, x^2*y, x*y^2, y^3, x^2*z, x*y*z, y^2*z, x*z^2, y*z^2, z^3] The number of such monomials equals `\binom{n+k-1}{k}` where `n` is the number of variables and `k` the degree:: @@ -1392,7 +1398,9 @@ cdef class MPolynomialRing_base(sage.rings.ring.CommutativeRing): """ deg_of_gens = [x.degree() for x in self.gens()] from sage.combinat.integer_vector_weighted import WeightedIntegerVectors - return [self.monomial(*a) for a in WeightedIntegerVectors(degree, deg_of_gens)] + mons = [self.monomial(*a) for a in WeightedIntegerVectors(degree, deg_of_gens)] + mons.sort() # This could be implemented in WeightedIntegerVectors instead + return mons def _macaulay_resultant_getS(self, mon_deg_tuple, dlist): r""" From 301aa0a78e588d4b1fe316ead5681007f1794b4c Mon Sep 17 00:00:00 2001 From: Kryzar Date: Tue, 7 Feb 2023 20:59:21 +0100 Subject: [PATCH 356/751] (fix) Fix DrinfeldModules failing doctests --- src/sage/categories/drinfeld_modules.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 5c1aa204d24..c28948eb6e3 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -631,6 +631,10 @@ def base_morphism(self): sage: sigma = DrinfeldModule(A, [Frac(A).gen(), 1]) sage: sigma.base_morphism() + Ring morphism: + From: Univariate Polynomial Ring in T over Finite Field in z2 of size 5^2 + To: Fraction Field of Univariate Polynomial Ring in T over Finite Field in z2 of size 5^2 over its base + Defn: T |--> T """ return self.category().base_morphism() @@ -677,7 +681,9 @@ def characteristic(self): sage: L = Frac(B) sage: psi = DrinfeldModule(A, [L(1), 0, 0, L(1)]) sage: psi.characteristic() - 0 + Traceback (most recent call last): + ... + NotImplementedError: function ring characteristic notimplemented in this case """ return self.category().characteristic() From 90aa9ac02dedee8a2cb76142129df8b887659169 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Tue, 7 Feb 2023 21:07:09 +0100 Subject: [PATCH 357/751] Enhance invert method code --- .../drinfeld_modules/finite_drinfeld_module.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 4a0c0984c14..014f587a36e 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -471,12 +471,9 @@ def invert(self, ore_pol): mat_lines[j][i] = phi_T_i[r*j] mat = Matrix(mat_lines) vec = vector([list(ore_pol)[r*j] for j in range(k+1)]) - coeffs = list((mat**(-1)) * vec) - coeffs_in_Fq = [] - for coeff in coeffs: - coeff_in_Fq = base_over_Fq(coeff).vector()[0] - coeffs_in_Fq.append(coeff_in_Fq) - pre_image = self._function_ring(coeffs_in_Fq) + coeffs_K = list((mat**(-1)) * vec) + coeffs_Fq = list(map(lambda x: base_over_Fq(x).vector()[0], coeffs_K)) + pre_image = self._function_ring(coeffs_Fq) if self(pre_image) == ore_pol: return pre_image From d954bc3c5830964dd06d83452b523450f6530180 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Tue, 7 Feb 2023 21:51:34 +0100 Subject: [PATCH 358/751] Lighten DrinfeldModule representation --- src/sage/categories/drinfeld_modules.py | 10 +++--- .../function_field/drinfeld_modules/action.py | 4 +-- .../drinfeld_modules/drinfeld_module.py | 32 ++++++++----------- .../finite_drinfeld_module.py | 2 +- .../drinfeld_modules/morphism.py | 4 +-- 5 files changed, 24 insertions(+), 28 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index c28948eb6e3..d3b931397c3 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -132,7 +132,7 @@ class DrinfeldModules(Category_over_base_ring): sage: psi = cat.object([p_root, 1]) sage: psi - Drinfeld module defined by T |--> t + z^3 + 7*z^2 + 6*z + 10 over Finite Field in z of size 11^4 over its base + Drinfeld module defined by T |--> t + z^3 + 7*z^2 + 6*z + 10 sage: psi.category() is cat True @@ -149,7 +149,7 @@ class DrinfeldModules(Category_over_base_ring): sage: rho = cat.random_object(2) sage: rho # random - Drinfeld module defined by T |--> (7*z^3 + 7*z^2 + 10*z + 2)*t^2 + (9*z^3 + 5*z^2 + 2*z + 7)*t + z^3 + 7*z^2 + 6*z + 10 over Finite Field in z of size 11^4 + Drinfeld module defined by T |--> (7*z^3 + 7*z^2 + 10*z + 2)*t^2 + (9*z^3 + 5*z^2 + 2*z + 7)*t + z^3 + 7*z^2 + 6*z + 10 sage: rho.rank() == 2 True sage: rho.category() is cat @@ -494,7 +494,7 @@ def object(self, gen): sage: cat = phi.category() sage: psi = cat.object([p_root, 0, 1]) sage: psi - Drinfeld module defined by T |--> t^2 + z^3 + 7*z^2 + 6*z + 10 over Finite Field in z of size 11^4 over its base + Drinfeld module defined by T |--> t^2 + z^3 + 7*z^2 + 6*z + 10 sage: t = phi.ore_polring().gen() sage: cat.object(t^3 + z^3 + 7*z^2 + 6*z + 10) is phi True @@ -547,7 +547,7 @@ def random_object(self, rank): sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) sage: cat = phi.category() sage: psi = cat.random_object(3) # random - Drinfeld module defined by T |--> (6*z^3 + 4*z^2 + 10*z + 9)*t^3 + (4*z^3 + 8*z^2 + 8*z)*t^2 + (10*z^3 + 3*z^2 + 6*z)*t + z^3 + 7*z^2 + 6*z + 10 over Finite Field in z of size 11^4 + Drinfeld module defined by T |--> (6*z^3 + 4*z^2 + 10*z + 9)*t^3 + (4*z^3 + 8*z^2 + 8*z)*t^2 + (10*z^3 + 3*z^2 + 6*z)*t + z^3 + 7*z^2 + 6*z + 10 sage: psi.rank() == 3 True """ @@ -736,7 +736,7 @@ def constant_coefficient(self): sage: t = phi.ore_polring().gen() sage: psi = cat.object(phi.constant_coefficient() + t^3) sage: psi - Drinfeld module defined by T |--> t^3 + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 over its base + Drinfeld module defined by T |--> t^3 + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 Reciprocally, it is impossible to create two Drinfeld modules in this category if they do not share the same constant diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index be93b643526..c324014745d 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -58,7 +58,7 @@ class DrinfeldModuleAction(Action): sage: phi = DrinfeldModule(A, [z, 0, 0, 1]) sage: action = phi.action() sage: action - Action on Finite Field in z of size 11^2 over its base induced by Drinfeld module defined by T |--> t^3 + z over Finite Field in z of size 11^2 over its base + Action on Finite Field in z of size 11^2 over its base induced by Drinfeld module defined by T |--> t^3 + z The action on elements is computed as follows:: @@ -170,7 +170,7 @@ def _repr_(self): sage: phi = DrinfeldModule(A, [z, 0, 0, 1]) sage: action = phi.action() sage: action - Action on Finite Field in z of size 11^2 over its base induced by Drinfeld module defined by T |--> t^3 + z over Finite Field in z of size 11^2 over its base + Action on Finite Field in z of size 11^2 over its base induced by Drinfeld module defined by T |--> t^3 + z """ return f'Action on {self._base} induced by ' \ f'{self._drinfeld_module}' diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 68d6bb79abc..fdd4997bbf7 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -49,10 +49,8 @@ class DrinfeldModule(Parent, UniqueRepresentation): A Drinfeld `\mathbb{F}_q[T]`-module over the `base \mathbb{F}_q[T]`-field `K` is an `\mathbb{F}_q`-algebra morphism - `\phi: \mathbb{F}_q[T] \to K\{\tau\}` such that: - 1. The image of `\phi` contains nonconstant Ore polynomials. - 2. For every element `a` in the `\mathbb{F}_q[T]`, the constant - coefficient `\phi(a)` is `\gamma(a)`. + `\phi: \mathbb{F}_q[T] \to K\{\tau\}` such that `\Im(\phi) \not\subset K` + and `\phi` agrees with `\gamma` on `\mathbb{F}_q`. For `a` in `\mathbb{F}_q[T]`, `\phi(a)` is denoted `\phi_a`. @@ -80,7 +78,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: K. = Fq.extension(6) sage: phi = DrinfeldModule(A, [z, 4, 1]) sage: phi - Drinfeld module defined by T |--> t^2 + 4*t + z over Finite Field in z of size 5^12 over its base + Drinfeld module defined by T |--> t^2 + 4*t + z :: @@ -89,7 +87,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: K. = Frac(A) sage: psi = DrinfeldModule(A, [z, T+1]) sage: psi - Drinfeld module defined by T |--> (T + 1)*t + T over Fraction Field of Univariate Polynomial Ring in T over Finite Field in z2 of size 7^2 over its base + Drinfeld module defined by T |--> (T + 1)*t + T .. NOTE:: @@ -128,7 +126,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: K. = Fq.extension(6) sage: phi = DrinfeldModule(A, [z, 1, 1]) sage: phi - Drinfeld module defined by T |--> t^2 + t + z over Finite Field in z of size 3^12 over its base + Drinfeld module defined by T |--> t^2 + t + z .. NOTE:: @@ -141,7 +139,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: L = Frac(A) sage: psi = DrinfeldModule(A, [L(T), 1, T^3 + T + 1]) sage: psi - Drinfeld module defined by T |--> (T^3 + T + 1)*t^2 + t + T over Fraction Field of Univariate Polynomial Ring in T over Finite Field in z2 of size 3^2 over its base + Drinfeld module defined by T |--> (T^3 + T + 1)*t^2 + t + T :: @@ -159,7 +157,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: rho_T = z + t^3 sage: rho = DrinfeldModule(A, rho_T) sage: rho - Drinfeld module defined by T |--> t^3 + z over Finite Field in z of size 3^12 over its base + Drinfeld module defined by T |--> t^3 + z sage: rho(T) == rho_T True @@ -195,7 +193,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: cat = phi.category() sage: cat.object([z, 0, 0, 1]) - Drinfeld module defined by T |--> t^3 + z over Finite Field in z of size 3^12 over its base + Drinfeld module defined by T |--> t^3 + z .. RUBRIC:: The base field of a Drinfeld module @@ -223,8 +221,6 @@ class DrinfeldModule(Parent, UniqueRepresentation): One can retrieve basic properties:: - :: - sage: phi.base_morphism() Ring morphism: From: Univariate Polynomial Ring in T over Finite Field in z2 of size 3^2 @@ -366,7 +362,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: ore_pol = (2*z^6 + z^3 + 2*z^2 + z + 2)*t + z^11 + 2*z^10 + 2*z^9 + 2*z^8 + z^7 + 2*z^6 + z^5 + z^3 + z^2 + z sage: psi = phi.velu(ore_pol) sage: psi - Drinfeld module defined by T |--> (2*z^11 + 2*z^9 + z^6 + 2*z^5 + 2*z^4 + 2*z^2 + 1)*t^2 + (2*z^11 + 2*z^10 + 2*z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z)*t + z over Finite Field in z of size 3^12 over its base + Drinfeld module defined by T |--> (2*z^11 + 2*z^9 + z^6 + 2*z^5 + 2*z^4 + 2*z^2 + 1)*t^2 + (2*z^11 + 2*z^10 + 2*z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z)*t + z sage: ore_pol in Hom(phi, psi) True sage: ore_pol * phi(T) == psi(T) * ore_pol @@ -397,7 +393,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: action = phi.action() sage: action - Action on Finite Field in z of size 3^12 over its base induced by Drinfeld module defined by T |--> t^2 + t + z over Finite Field in z of size 3^12 over its base + Action on Finite Field in z of size 3^12 over its base induced by Drinfeld module defined by T |--> t^2 + t + z The action on elements is computed by calling the action object:: @@ -823,10 +819,10 @@ def _repr_(self): sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: phi - Drinfeld module defined by T |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 over its base + Drinfeld module defined by T |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 """ return f'Drinfeld module defined by {self._function_ring.gen()} ' \ - f'|--> {self._gen} over {self._base}' + f'|--> {self._gen}' def action(self): r""" @@ -846,7 +842,7 @@ def action(self): sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: action = phi.action() sage: action - Action on Finite Field in z12 of size 5^12 over its base induced by Drinfeld module defined by T |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 over its base + Action on Finite Field in z12 of size 5^12 over its base induced by Drinfeld module defined by T |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 The action on elements is computed as follows:: @@ -1206,7 +1202,7 @@ def velu(self, isog): sage: isog = t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 sage: psi = phi.velu(isog) sage: psi - Drinfeld module defined by T |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 over its base + Drinfeld module defined by T |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: isog in Hom(phi, psi) True diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 014f587a36e..bc87115f2f5 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -50,7 +50,7 @@ class FiniteDrinfeldModule(DrinfeldModule): sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(A, [z6, 0, 5]) sage: phi - Drinfeld module defined by T |--> 5*t^2 + z6 over Finite Field in z6 of size 7^6 over its base + Drinfeld module defined by T |--> 5*t^2 + z6 :: diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index f99be1e93e9..48bd560961f 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -64,14 +64,14 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, One can get basic data on the morphism:: sage: morphism.domain() - Drinfeld module defined by T |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 over its base + Drinfeld module defined by T |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: morphism.domain() is phi True :: sage: morphism.codomain() - Drinfeld module defined by T |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 over Finite Field in z12 of size 5^12 over its base + Drinfeld module defined by T |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: morphism.codomain() is psi True From 3b2314b55e517e9639600b342ced9dff18993c33 Mon Sep 17 00:00:00 2001 From: Xavier Caruso Date: Tue, 7 Feb 2023 23:53:38 +0100 Subject: [PATCH 359/751] small changes --- .../drinfeld_modules/drinfeld_module.py | 72 ++++++------ .../finite_drinfeld_module.py | 62 +++++----- .../function_field/drinfeld_modules/homset.py | 107 +++++++++--------- .../drinfeld_modules/morphism.py | 18 +-- 4 files changed, 118 insertions(+), 141 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index fdd4997bbf7..a5a5f6dceab 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -47,15 +47,15 @@ class DrinfeldModule(Parent, UniqueRepresentation): polynomials with coefficients in `K`, whose multiplication is given by the rule `\tau \lambda = \lambda^q \tau` for any `\lambda \in K`. - A Drinfeld `\mathbb{F}_q[T]`-module over the `base - \mathbb{F}_q[T]`-field `K` is an `\mathbb{F}_q`-algebra morphism + A Drinfeld `\mathbb{F}_q[T]`-module over the base + `\mathbb{F}_q[T]`-field `K` is an `\mathbb{F}_q`-algebra morphism `\phi: \mathbb{F}_q[T] \to K\{\tau\}` such that `\Im(\phi) \not\subset K` and `\phi` agrees with `\gamma` on `\mathbb{F}_q`. For `a` in `\mathbb{F}_q[T]`, `\phi(a)` is denoted `\phi_a`. The Drinfeld `\mathbb{F}_q[T]`-module `\phi` is uniquely determined - by the image `\phi_T` of `T` — this serves as input of the class. + by the image `\phi_T` of `T`; this serves as input of the class. .. NOTE:: @@ -84,8 +84,8 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: Fq = GF(49) sage: A. = Fq[] - sage: K. = Frac(A) - sage: psi = DrinfeldModule(A, [z, T+1]) + sage: K = Frac(A) + sage: psi = DrinfeldModule(A, [K(T), T+1]) sage: psi Drinfeld module defined by T |--> (T + 1)*t + T @@ -111,8 +111,10 @@ class DrinfeldModule(Parent, UniqueRepresentation): - ``function_ring`` -- a univariate polynomial ring whose base field is a finite field + - ``gen`` -- the generator of the Drinfeld module; as a list of coefficients or an Ore polynomial + - ``name`` (default: ``'t'``) -- the name of the Ore polynomial ring generator @@ -131,7 +133,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): .. NOTE:: Note that the definition of the base field is implicit; it is - automatically defined as the compositum of all the parents of + automatically defined as the compositum of all the parents of the coefficients. The above Drinfeld module is finite; it can also be infinite:: @@ -337,7 +339,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: identity_morphism.ore_polynomial() 1 - It is easy to check if a morphism is an isogeny, endomorphism or + One checks if a morphism is an isogeny, endomorphism or isomorphism:: sage: frobenius_endomorphism.is_isogeny() @@ -355,17 +357,17 @@ class DrinfeldModule(Parent, UniqueRepresentation): .. RUBRIC:: The Vélu formula - Let ``ore_pol`` be a nonzero Ore polynomial. We can decide if there - exists a Drinfeld module ``psi`` such that ``ore_pol`` is an isogeny - from ``self`` to ``psi``. If so, we find ``psi``:: + Let ``P`` be a nonzero Ore polynomial. We can decide if ``P`` + defines an isogeny with a given domain and, if it does, find + the codomain:: - sage: ore_pol = (2*z^6 + z^3 + 2*z^2 + z + 2)*t + z^11 + 2*z^10 + 2*z^9 + 2*z^8 + z^7 + 2*z^6 + z^5 + z^3 + z^2 + z - sage: psi = phi.velu(ore_pol) + sage: P = (2*z^6 + z^3 + 2*z^2 + z + 2)*t + z^11 + 2*z^10 + 2*z^9 + 2*z^8 + z^7 + 2*z^6 + z^5 + z^3 + z^2 + z + sage: psi = phi.velu(P) sage: psi Drinfeld module defined by T |--> (2*z^11 + 2*z^9 + z^6 + 2*z^5 + 2*z^4 + 2*z^2 + 1)*t^2 + (2*z^11 + 2*z^10 + 2*z^9 + z^8 + 2*z^7 + 2*z^6 + z^5 + 2*z^4 + 2*z^2 + 2*z)*t + z - sage: ore_pol in Hom(phi, psi) + sage: P in Hom(phi, psi) True - sage: ore_pol * phi(T) == psi(T) * ore_pol + sage: P * phi(T) == psi(T) * P True If the input does not define an isogeny, an exception is raised: @@ -519,14 +521,19 @@ def __classcall_private__(cls, function_ring, gen, name='t', latexname=None): - ``function_ring`` -- a univariate polynomial ring whose base is a finite field + - ``gen`` -- the generator of the Drinfeld module; as a list of coefficients or an Ore polynomial + - ``name`` (default: ``'t'``) -- the name of the Ore polynomial ring gen + - ``latexname`` (default: ``None``) -- the LaTeX name of the Drinfeld module - OUTPUT: a DrinfeldModule or FiniteDrinfeldModule + OUTPUT: + + A DrinfeldModule or FiniteDrinfeldModule. TESTS:: @@ -618,17 +625,20 @@ def __init__(self, gen, category, latexname=None): """ Initialize ``self``. - Validity of the input is checked in ``__classcall_private__``. - The ``__init__`` just saves attributes. + Validity of the input is checked in meth:`__classcall_private__`. + The meth:`__init__` just saves attributes. INPUT: - ``function_ring`` -- a univariate polynomial ring whose base is a finite field + - ``gen`` -- the generator of the Drinfeld module; as a list of coefficients or an Ore polynomial + - ``name`` (default: ``'t'``) -- the name of the Ore polynomial ring gen + - ``latexname`` (default: ``None``) -- the LaTeX name of the Drinfeld module @@ -718,11 +728,10 @@ def _Hom_(self, other, category): INPUT: - ``other`` -- the codomain of the homset + - ``category`` -- the category in which we consider the morphisms, usually ``self.category()`` - OUTPUT: an homset - EXAMPLES:: sage: Fq = GF(25) @@ -768,10 +777,8 @@ def _latex_(self): r""" Return a LaTeX representation of the Drinfeld module. - If a LaTeX name was given at init. using `latexname`, use the LaTeX - name. Otherwise, create a representation. - - OUTPUT: a string + If a LaTeX name was given at initialization, we use it. + Otherwise, we create a representation. EXAMPLES:: @@ -807,9 +814,7 @@ def _latex_(self): def _repr_(self): r""" - Return a string representation of the Drinfeld module. - - OUTPUT: a string + Return a string representation of this Drinfeld module. EXAMPLES:: @@ -844,7 +849,7 @@ def action(self): sage: action Action on Finite Field in z12 of size 5^12 over its base induced by Drinfeld module defined by T |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - The action on elements is computed as follows:: + The action on elements is computed as follows:: sage: P = T^2 + T + 1 sage: a = z12 + 1 @@ -905,8 +910,6 @@ def coefficients(self, sparse=True): - ``sparse`` -- a boolean - OUTPUT: a list of elements in the base codomain - EXAMPLES:: sage: Fq = GF(25) @@ -939,8 +942,6 @@ def gen(self): r""" Return the generator of the Drinfeld module. - OUTPUT: an Ore polynomial - EXAMPLES:: sage: Fq = GF(25) @@ -973,8 +974,6 @@ def height(self): A rank two Drinfeld module is supersingular if and only if its height equals its rank. - OUTPUT: an integer - EXAMPLES:: sage: Fq = GF(25) @@ -1015,15 +1014,14 @@ def height(self): 'function field characteristic') else: p = self.characteristic() - return Integer((self(p).valuation()) // (p.degree())) + return Integer(self(p).valuation() // p.degree()) except NotImplementedError: raise NotImplementedError('height not implemented in this case') def is_finite(self): r""" - Return ``True`` whether the Drinfeld module is finite. - - OUTPUT: a boolean + Return ``True`` if this Drinfeld module is finite, + ``False`` otherwise. EXAMPLES:: diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index bc87115f2f5..0d8939051ca 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -91,7 +91,7 @@ class FiniteDrinfeldModule(DrinfeldModule): sage: chi(frob_pol, phi(T)) 0 - This makes it possible to compute the Frobenius trace and norm:: + as well as its trace and norm:: sage: phi.frobenius_trace() 6*T + 5*z3^2 + 5*z3 + 6 @@ -100,7 +100,7 @@ class FiniteDrinfeldModule(DrinfeldModule): sage: phi.frobenius_norm() 2*T^2 + (z3^2 + z3 + 4)*T + 2*z3 - And to decide if a Drinfeld module is ordinary or supersingular:: + We can decide if a Drinfeld module is ordinary or supersingular:: sage: phi.is_ordinary() True @@ -129,10 +129,13 @@ def __init__(self, gen, category, latexname=None): - ``function_ring`` -- a univariate polynomial ring whose base is a finite field + - ``gen`` -- the generator of the Drinfeld module as a list of coefficients or an Ore polynomial + - ``name`` (default: `'t'`) -- the name of the Ore polynomial ring gen + - ``latexname`` (default: ``None``) -- the LaTeX name of the Drinfeld module @@ -148,11 +151,9 @@ def __init__(self, gen, category, latexname=None): sage: phi._gen == ore_polring(gen) True """ - # NOTE: There used to be no __init__ here (which was fine). I # added one to ensure that FiniteDrinfeldModule would always # have _frobenius_norm and _frobenius_trace attributes. - super().__init__(gen, category, latexname) self._frobenius_norm = None self._frobenius_trace = None @@ -166,8 +167,6 @@ def frobenius_endomorphism(self): *Frobenius endomorphism* is defined as the endomorphism whose defining Ore polynomial is `t^q`. - OUTPUT: a Drinfeld module morphism - EXAMPLES:: sage: Fq = GF(343) @@ -179,6 +178,9 @@ def frobenius_endomorphism(self): From (gen): z6*t^2 + 1 To (gen): z6*t^2 + 1 Defn: t^2 + + TESTS:: + sage: from sage.rings.function_field.drinfeld_modules.morphism import DrinfeldModuleMorphism sage: isinstance(phi.frobenius_endomorphism(), DrinfeldModuleMorphism) True @@ -214,10 +216,9 @@ def frobenius_charpoly(self, var='X'): Note that the *Frobenius trace* is defined as `A(T)` and the *Frobenius norm* is defined as `B(T)`. - INPUT: (default: ``'T'``) the name of the second variable + INPUT: - OUTPUT: an univariate polynomial with coefficients in the - function ring + - ``var`` (default: ``'X'``) -- the name of the second variable EXAMPLES:: @@ -283,8 +284,6 @@ def frobenius_norm(self): Let `n` be the degree of the base field over `\mathbb{F}_q` Then the Frobenius norm has degree `n`. - OUTPUT: an element in the function ring - EXAMPLES:: sage: Fq = GF(343) @@ -331,26 +330,11 @@ def frobenius_trace(self): Let `\mathbb{F}_q[T]` be the function ring, write `\chi = T^2 - A(X)T + B(X) \in \mathbb{F}_q[T][X]` for the characteristic - polynomial of the Frobenius endomorphism. The *Frobenius norm* - is defined as the polynomial `B(T) \in \mathbb{F}_q[T]`. + polynomial of the Frobenius endomorphism. The *Frobenius trace* + is defined as the polynomial `A(T) \in \mathbb{F}_q[T]`. Let `n` be the degree over `\mathbb{F}_q` of the base codomain. - Then the Frobenius trace has degree `\leq \frac{n}{2}`. - - OUTPUT: an element in the function ring - - ALGORITHM: - - Let `A(T)` denote the Frobenius trace and `B(T)` denote the - Frobenius norm. We begin by computing `B(T)`, see docstring - of method :meth:`frobenius_norm` for details. The - characteristic polynomial of the Frobenius yields `t^{2n} - - \phi_A t^n + \phi_B = 0`, where `t^n` is the Frobenius - endomorphism. As `\phi_B` is now known, we can compute - `\phi_A = (t^{2n} + \phi_B) / t^n`. We get `A(T)` by - inverting this quantity, using the method - :meth:`sage.rings.function_fields.drinfeld_module.drinfeld_module.DrinfeldModule.invert`, - see its docstring for details. + Then the Frobenius trace has degree at most `\frac{n}{2}`. EXAMPLES:: @@ -372,6 +356,19 @@ def frobenius_trace(self): sage: A == -phi.frobenius_charpoly()[1] True + + ALGORITHM: + + Let `A(T)` denote the Frobenius trace and `B(T)` denote the + Frobenius norm. We begin by computing `B(T)`, see docstring + of method :meth:`frobenius_norm` for details. The + characteristic polynomial of the Frobenius yields `t^{2n} - + \phi_A t^n + \phi_B = 0`, where `t^n` is the Frobenius + endomorphism. As `\phi_B` is now known, we can compute + `\phi_A = (t^{2n} + \phi_B) / t^n`. We get `A(T)` by + inverting this quantity, using the method + :meth:`sage.rings.function_fields.drinfeld_module.drinfeld_module.DrinfeldModule.invert`, + see its docstring for details. """ self._check_rank_two() # Notations from Schost-Musleh: @@ -392,8 +389,6 @@ def invert(self, ore_pol): - ``ore_pol`` -- the Ore polynomial whose preimage we want to compute - OUTPUT: a function ring element - EXAMPLES:: sage: Fq = GF(25) @@ -417,6 +412,7 @@ def invert(self, ore_pol): Traceback (most recent call last): ... ValueError: input must be in the image of the Drinfeld module + sage: phi.invert(t^3 + t^2 + 1) Traceback (most recent call last): ... @@ -494,8 +490,6 @@ def is_ordinary(self): A rank two Drinfeld module is *ordinary* if and only if it is not supersingular; see :meth:`is_supersingular`. - OUTPUT: a boolean - EXAMPLES:: sage: Fq = GF(343) @@ -530,8 +524,6 @@ def is_supersingular(self): trace. An *ordinary* rank two finite Drinfeld module is a Drinfeld module that is not supersingular. - OUTPUT: a boolean - EXAMPLES:: sage: Fq = GF(343) diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index c5391095631..f9d3fac81e4 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -34,6 +34,7 @@ class DrinfeldModuleHomset(Homset): INPUT: - ``X`` -- the domain + - ``Y`` -- the codomain EXAMPLES:: @@ -43,22 +44,22 @@ class DrinfeldModuleHomset(Homset): sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(A, [z6, z6, 2]) sage: psi = DrinfeldModule(A, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) - sage: hom = Hom(phi, psi) - sage: hom + sage: H = Hom(phi, psi) + sage: H Set of Drinfeld module morphisms from (gen) 2*t^2 + z6*t + z6 to (gen) 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 :: sage: from sage.rings.function_field.drinfeld_modules.homset import DrinfeldModuleHomset - sage: isinstance(hom, DrinfeldModuleHomset) + sage: isinstance(H, DrinfeldModuleHomset) True There is a simpler syntax for endomorphisms sets:: - sage: end = End(phi) - sage: end + sage: E = End(phi) + sage: E Set of Drinfeld module morphisms from (gen) 2*t^2 + z6*t + z6 to (gen) 2*t^2 + z6*t + z6 - sage: end is Hom(phi, phi) + sage: E is Hom(phi, phi) True The domain and codomain must have the same Drinfeld modules @@ -80,8 +81,7 @@ class DrinfeldModuleHomset(Homset): One can create morphism objects by calling the homset:: - sage: t = phi.ore_polring().gen() - sage: identity_morphism = end(1) + sage: identity_morphism = E(1) sage: identity_morphism Drinfeld Module morphism: From (gen): 2*t^2 + z6*t + z6 @@ -90,7 +90,8 @@ class DrinfeldModuleHomset(Homset): :: - sage: frobenius_endomorphism = end(t^6) + sage: t = phi.ore_polring().gen() + sage: frobenius_endomorphism = E(t^6) sage: frobenius_endomorphism Drinfeld Module morphism: From (gen): 2*t^2 + z6*t + z6 @@ -99,7 +100,7 @@ class DrinfeldModuleHomset(Homset): :: - sage: isogeny = hom(t + 1) + sage: isogeny = H(t + 1) sage: isogeny Drinfeld Module morphism: From (gen): 2*t^2 + z6*t + z6 @@ -109,28 +110,28 @@ class DrinfeldModuleHomset(Homset): And one can test if an Ore polynomial defines a morphism using the ``in`` syntax:: - sage: 1 in hom + sage: 1 in H False - sage: t^6 in hom + sage: t^6 in H False - sage: t + 1 in hom + sage: t + 1 in H True - sage: 1 in end + sage: 1 in E True - sage: t^6 in end + sage: t^6 in E True - sage: t + 1 in end + sage: t + 1 in E False This also works if the candidate is a morphism object:: - sage: isogeny in hom + sage: isogeny in H True - sage: end(0) in end + sage: E(0) in E True - sage: identity_morphism in hom + sage: identity_morphism in H False - sage: frobenius_endomorphism in hom + sage: frobenius_endomorphism in H False """ @@ -144,9 +145,12 @@ def __init__(self, X, Y, category=None, check=True): INPUT: - ``X`` -- the domain of the homset + - ``Y`` -- the codomain of the homset + - ``category`` (default: ``None``) -- the Drinfeld modules category of the domain and codomain + - ``check`` (default: ``True``) -- check the validity of the category TESTS:: @@ -156,10 +160,10 @@ def __init__(self, X, Y, category=None, check=True): sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(A, [z6, z6, 2]) sage: psi = DrinfeldModule(A, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) - sage: hom = Hom(phi, psi) - sage: hom.domain() is phi + sage: H = Hom(phi, psi) + sage: H.domain() is phi True - sage: hom.codomain() is psi + sage: H.codomain() is psi True """ if category is None: @@ -178,8 +182,6 @@ def _latex_(self): r""" Return a LaTeX representation of the homset. - OUTPUT: a string - EXAMPLES:: sage: Fq = GF(27) @@ -187,8 +189,8 @@ def _latex_(self): sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(A, [z6, z6, 2]) sage: psi = DrinfeldModule(A, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) - sage: hom = Hom(phi, psi) - sage: latex(hom) + sage: H = Hom(phi, psi) + sage: latex(H) \text{Set{ }of{ }Drinfeld{ }module{ }morphisms{ }from{ }(gen){ }}2 t^{2} + z_{6} t + z_{6}\text{{ }to{ }(gen){ }}2 t^{2} + \left(2 z_{6}^{5} + 2 z_{6}^{4} + 2 z_{6} + 1\right) t + z_{6} """ return f'\\text{{Set{{ }}of{{ }}Drinfeld{{ }}module{{ }}morphisms' \ @@ -200,8 +202,6 @@ def _repr_(self): r""" Return a string representation of the homset. - OUTPUT: a string - EXAMPLES:: sage: Fq = GF(27) @@ -209,8 +209,8 @@ def _repr_(self): sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(A, [z6, z6, 2]) sage: psi = DrinfeldModule(A, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) - sage: hom = Hom(phi, psi) - sage: hom + sage: H = Hom(phi, psi) + sage: H Set of Drinfeld module morphisms from (gen) 2*t^2 + z6*t + z6 to (gen) 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 """ return f'Set of Drinfeld module morphisms from (gen) '\ @@ -218,15 +218,12 @@ def _repr_(self): def __contains__(self, x): r""" - Implement the ``in`` operator for the homset; return ``True`` - whether the input defines a morphism in the homset. + Return ``True`` if the input defines a morphism in the homset. INPUT: - ``x`` -- an Ore polynomial or a Drinfeld module morphism - OUTPUT: a boolean - EXAMPLES: In the next examples, the input is an Ore polynomial:: @@ -236,34 +233,34 @@ def __contains__(self, x): sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(A, [z6, z6, 2]) sage: psi = DrinfeldModule(A, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) - sage: hom = Hom(phi, psi) - sage: end = End(phi) + sage: H = Hom(phi, psi) + sage: E = End(phi) sage: t = phi.ore_polring().gen() - sage: 1 in hom + sage: 1 in H False - sage: t^6 in hom + sage: t^6 in H False - sage: t + 1 in hom + sage: t + 1 in H True - sage: 1 in end + sage: 1 in E True - sage: t^6 in end + sage: t^6 in E True - sage: t + 1 in end + sage: t + 1 in E False Whereas the input is now a Drinfeld module morphism:: - sage: isogeny = hom(t + 1) - sage: isogeny in hom + sage: isogeny = H(t + 1) + sage: isogeny in H True - sage: end(0) in end + sage: E(0) in E True - sage: identity_morphism = end(1) - sage: identity_morphism in hom + sage: identity_morphism = E(1) + sage: identity_morphism in H False sage: frobenius_endomorphism = phi.frobenius_endomorphism() - sage: frobenius_endomorphism in hom + sage: frobenius_endomorphism in H False """ try: @@ -279,8 +276,6 @@ def _element_constructor_(self, *args, **kwds): INPUT: an Ore polynomial - OUTPUT: a Drinfeld module morphism - EXAMPLES:: sage: Fq = GF(27) @@ -288,10 +283,10 @@ def _element_constructor_(self, *args, **kwds): sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(A, [z6, z6, 2]) sage: psi = DrinfeldModule(A, [z6, 2*z6^5 + 2*z6^4 + 2*z6 + 1, 2]) - sage: hom = Hom(phi, psi) - sage: end = End(phi) + sage: H = Hom(phi, psi) + sage: E = End(phi) sage: t = phi.ore_polring().gen() - sage: identity_morphism = end(1) + sage: identity_morphism = E(1) sage: identity_morphism Drinfeld Module morphism: From (gen): 2*t^2 + z6*t + z6 @@ -300,7 +295,7 @@ def _element_constructor_(self, *args, **kwds): :: - sage: frobenius_endomorphism = end(t^6) + sage: frobenius_endomorphism = E(t^6) sage: frobenius_endomorphism Drinfeld Module morphism: From (gen): 2*t^2 + z6*t + z6 @@ -309,7 +304,7 @@ def _element_constructor_(self, *args, **kwds): :: - sage: isogeny = hom(t + 1) + sage: isogeny = H(t + 1) sage: isogeny Drinfeld Module morphism: From (gen): 2*t^2 + z6*t + z6 diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 48bd560961f..275b49d163f 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -30,7 +30,7 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, This class represents Drinfeld `\mathbb{F}_q[T]`-module morphisms. Let `\phi` and `\psi` be two Drinfeld `\mathbb{F}_q[T]`-modules over - a field `K`. A *morphism of Drinfeld modules `\phi \to \psi`* is an + a field `K`. A *morphism of Drinfeld modules* `\phi \to \psi` is an Ore polynomial `f \in K\{\tau\}` such that `f \phi_a = \psi_a f` for every `a \in \mathbb{F}_q[T]`. In our case, this is equivalent to `f \phi_T = \psi_T f`. An *isogeny* is a nonzero morphism. @@ -68,8 +68,6 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, sage: morphism.domain() is phi True - :: - sage: morphism.codomain() Drinfeld module defined by T |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: morphism.codomain() is psi @@ -80,8 +78,6 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, sage: morphism.ore_polynomial() t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 - :: - sage: morphism.ore_polynomial() is ore_pol True @@ -126,13 +122,13 @@ def __classcall_private__(cls, parent, x): INPUT: - - ``cls`` -- DrinfeldModuleMorphism + - ``cls`` -- the class ``DrinfeldModuleMorphism`` + - ``parent`` -- the Drinfeld module homset + - ``x`` -- the Ore polynomial defining the morphism or a DrinfeldModuleMorphism - OUTPUT: the morphism object - TESTS:: sage: Fq = GF(2) @@ -176,6 +172,7 @@ def __init__(self, parent, ore_pol): INPUT: - ``parent`` -- the Drinfeld module homset + - ``ore_pol`` -- the Ore polynomial that defines the morphism TESTS:: @@ -194,7 +191,6 @@ def __init__(self, parent, ore_pol): sage: morphism._ore_polynomial == t + z6^5 + z6^2 + 1 True """ - super().__init__(parent) self._domain = parent.domain() self._codomain = parent.codomain() @@ -204,8 +200,6 @@ def _latex_(self): r""" Return a LaTeX representation of the morphism. - OUTPUT: a string - EXAMPLES:: sage: Fq = GF(2) @@ -237,8 +231,6 @@ def _repr_(self): r""" Return a string representation of the morphism. - OUTPUT: a string - EXAMPLES:: sage: Fq = GF(2) From 4ccc577fdb1c7ccd098f18cd0bb23f80257275e9 Mon Sep 17 00:00:00 2001 From: Xavier Caruso Date: Wed, 8 Feb 2023 07:43:19 +0100 Subject: [PATCH 360/751] category --- src/sage/categories/drinfeld_modules.py | 263 +++++++++++------------- 1 file changed, 123 insertions(+), 140 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index d3b931397c3..4e57cf36a5f 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -40,13 +40,10 @@ class DrinfeldModules(Category_over_base_ring): polynomials with coefficients in `K`, whose multiplication is given by the rule `\tau \lambda = \lambda^q \tau` for any `\lambda \in K`. - We call `K` the *base field* of the category, and `\gamma` its *base - morphism*. - - .. NOTE:: - - Equivalently, the base of the category could be defined as the - base morphism `\gamma: \mathbb{F}_q[T] \to K`. + The extension `K`/`\mathbb{F}_q[T]` (represented as an instance of + the class class:`sage.rings.ring_extension.RingExtension`) is the + *base field* of the category; its defining morphism `\gamma` is + called the *base morphism*. The monic polynomial that generates the kernel of `\gamma` is called the `\mathbb{F}_q[T]`-*characteristic*, or *function-field @@ -55,8 +52,6 @@ class DrinfeldModules(Category_over_base_ring): polynomial ring*. The constant coefficient of the category is the image of `T` under the base morphism. - INPUT: the base field - .. RUBRIC:: Construction Generally, Drinfeld modules objects are created before their @@ -68,9 +63,9 @@ class DrinfeldModules(Category_over_base_ring): sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) - sage: cat = phi.category() - sage: cat - Category of Drinfeld modules defined over Finite Field in z of size 11^4 over its base + sage: C = phi.category() + sage: C + Category of Drinfeld modules over Finite Field in z of size 11^4 over its base The output tells the user that the category is only defined by its base. @@ -79,13 +74,13 @@ class DrinfeldModules(Category_over_base_ring): The base field is retrieved using the method :meth:`base`. - sage: cat.base() + sage: C.base() Finite Field in z of size 11^4 over its base Equivalently, one can use :meth:`base_morphism` to retrieve the base morphism:: - sage: cat.base_morphism() + sage: C.base_morphism() Ring morphism: From: Univariate Polynomial Ring in T over Finite Field of size 11 To: Finite Field in z of size 11^4 over its base @@ -95,51 +90,54 @@ class DrinfeldModules(Category_over_base_ring): Drinfeld modules in the category --- is simply the image of `T` by the base morphism:: - sage: cat.constant_coefficient() + sage: C.constant_coefficient() z^3 + 7*z^2 + 6*z + 10 - sage: cat.base_morphism()(T) == cat.constant_coefficient() + sage: C.base_morphism()(T) == C.constant_coefficient() True Similarly, the function ring-characteristic of the category is either `0` or the unique monic polynomial in `\mathbb{F}_q[T]` that generates the kernel of the base:: - sage: cat.characteristic() + sage: C.characteristic() T^2 + 7*T + 2 - sage: cat.base_morphism()(cat.characteristic()) + sage: C.base_morphism()(C.characteristic()) 0 The base field, base morphism, function ring and Ore polynomial ring are the same for the category and its objects:: - sage: cat.base() is phi.base() + sage: C.base() is phi.base() True - sage: cat.base_morphism() is phi.base_morphism() + sage: C.base_morphism() is phi.base_morphism() True - sage: cat.function_ring() is phi.function_ring() - True - sage: cat.function_ring() + + sage: C.function_ring() Univariate Polynomial Ring in T over Finite Field of size 11 - sage: cat.ore_polring() is phi.ore_polring() + sage: C.function_ring() is phi.function_ring() True - sage: cat.ore_polring() + + sage: C.ore_polring() Ore Polynomial Ring in t over Finite Field in z of size 11^4 over its base twisted by Frob + sage: C.ore_polring() is phi.ore_polring() + True + .. RUBRIC:: Creating Drinfeld module objects from the category Calling :meth:`object` with an Ore polynomial creates a Drinfeld module object in the category whose generator is the input:: - sage: psi = cat.object([p_root, 1]) + sage: psi = C.object([p_root, 1]) sage: psi Drinfeld module defined by T |--> t + z^3 + 7*z^2 + 6*z + 10 - sage: psi.category() is cat + sage: psi.category() is C True Of course, the constant coefficient of the input must be the same as the category:: - sage: cat.object([z, 1]) + sage: C.object([z, 1]) Traceback (most recent call last): ... ValueError: constant coefficient must equal that of the category @@ -147,12 +145,12 @@ class DrinfeldModules(Category_over_base_ring): It is also possible to create a random object in the category. The input is the desired rank:: - sage: rho = cat.random_object(2) + sage: rho = C.random_object(2) sage: rho # random Drinfeld module defined by T |--> (7*z^3 + 7*z^2 + 10*z + 2)*t^2 + (9*z^3 + 5*z^2 + 2*z + 7)*t + z^3 + 7*z^2 + 6*z + 10 sage: rho.rank() == 2 True - sage: rho.category() is cat + sage: rho.category() is C True TESTS:: @@ -162,20 +160,20 @@ class DrinfeldModules(Category_over_base_ring): sage: K. = Fq.extension(4) sage: from sage.categories.drinfeld_modules import DrinfeldModules sage: base = Hom(A, K)(0) - sage: cat = DrinfeldModules(base) + sage: C = DrinfeldModules(base) Traceback (most recent call last): ... TypeError: base field must be a ring extension - + :: - sage: cat.base().defining_morphism() == cat.base_morphism() + sage: C.base().defining_morphism() == C.base_morphism() True :: sage: base = Hom(A, A)(1) - sage: cat = DrinfeldModules(base) + sage: C = DrinfeldModules(base) Traceback (most recent call last): ... TypeError: base field must be a ring extension @@ -183,7 +181,7 @@ class DrinfeldModules(Category_over_base_ring): :: sage: base = 'I hate Rostropovitch' - sage: cat = DrinfeldModules(base) # known bug (blankline) + sage: C = DrinfeldModules(base) # known bug (blankline) Traceback (most recent call last): ... @@ -193,7 +191,7 @@ class DrinfeldModules(Category_over_base_ring): sage: ZZT. = ZZ[] sage: base = Hom(ZZT, K)(1) - sage: cat = DrinfeldModules(base) # known bug (blankline) + sage: C = DrinfeldModules(base) # known bug (blankline) Traceback (most recent call last): ... @@ -208,7 +206,8 @@ def __init__(self, base_field, name='t'): - ``base_field`` -- the base field, which is a ring extension over a base - - ``name`` (default: `'t'`) -- the name of the Ore polynomial + + - ``name`` (default: ``'t'``) -- the name of the Ore polynomial variable TESTS:: @@ -218,21 +217,21 @@ def __init__(self, base_field, name='t'): sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) - sage: cat = phi.category() + sage: C = phi.category() sage: ore_polring. = OrePolynomialRing(phi.base(), phi.base().frobenius_endomorphism()) - sage: cat._ore_polring is ore_polring + sage: C._ore_polring is ore_polring True sage: i = phi.base().coerce_map_from(K) sage: base_morphism = Hom(A, K)(p_root) - sage: cat.base() == K.over(base_morphism) + sage: C.base() == K.over(base_morphism) True - sage: cat._base_morphism == i * base_morphism + sage: C._base_morphism == i * base_morphism True - sage: cat._function_ring is A + sage: C._function_ring is A True - sage: cat._constant_coefficient == base_morphism(T) + sage: C._constant_coefficient == base_morphism(T) True - sage: cat._characteristic(cat._constant_coefficient) + sage: C._characteristic(C._constant_coefficient) 0 """ # Check input is a ring extension @@ -270,11 +269,12 @@ def __init__(self, base_field, name='t'): self._characteristic = None if K.is_finite(): self._characteristic = A(K.over(Fq)(base_morphism(T)).minpoly()) - try: - if A.is_subring(K): - self._characteristic = Integer(0) - except NotImplementedError: - pass + else: + try: + if base_morphism.is_injective(): + self._characteristic = Integer(0) + except NotImplementedError: + pass # Create base over constants field i = A.coerce_map_from(Fq) Fq_to_K = self._base_morphism * i @@ -294,12 +294,12 @@ def _latex_(self): sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) - sage: cat = phi.category() - sage: latex(cat) - \text{Category{ }of{ }Drinfeld{ }modules{ }defined{ }over{ }\Bold{F}_{11^{4}} + sage: C = phi.category() + sage: latex(C) + \text{Category{ }of{ }Drinfeld{ }modules{ }over{ }\Bold{F}_{11^{4}} """ return f'\\text{{Category{{ }}of{{ }}Drinfeld{{ }}modules{{ }}' \ - f'defined{{ }}over{{ }}{latex(self._base_field)}' + f'over{{ }}{latex(self._base_field)}' def _repr_(self): r""" @@ -314,18 +314,16 @@ def _repr_(self): sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) - sage: cat = phi.category() - sage: cat - Category of Drinfeld modules defined over Finite Field in z of size 11^4 over its base + sage: C = phi.category() + sage: C + Category of Drinfeld modules over Finite Field in z of size 11^4 over its base """ - return f'Category of Drinfeld modules defined over {self._base_field}' + return f'Category of Drinfeld modules over {self._base_field}' def Homsets(self): r""" Return the category of homsets. - OUTPUT: the category of homsets - EXAMPLES:: sage: Fq = GF(11) @@ -333,9 +331,10 @@ def Homsets(self): sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) - sage: cat = phi.category() + sage: C = phi.category() + sage: from sage.categories.homsets import Homsets - sage: cat.Homsets() is Homsets() + sage: C.Homsets() is Homsets() True """ return Homsets() @@ -344,8 +343,6 @@ def Endsets(self): r""" Return the category of endsets. - OUTPUT: the category of endsets - EXAMPLES:: sage: Fq = GF(11) @@ -353,9 +350,10 @@ def Endsets(self): sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) - sage: cat = phi.category() + sage: C = phi.category() + sage: from sage.categories.homsets import Homsets - sage: cat.Endsets() is Homsets().Endsets() + sage: C.Endsets() is Homsets().Endsets() True """ return Homsets().Endsets() @@ -364,8 +362,6 @@ def base_morphism(self): r""" Return the base morphism of the category. - OUTPUT: a ring morphism - EXAMPLES:: sage: Fq = GF(11) @@ -373,13 +369,14 @@ def base_morphism(self): sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) - sage: cat = phi.category() - sage: cat.base_morphism() + sage: C = phi.category() + sage: C.base_morphism() Ring morphism: From: Univariate Polynomial Ring in T over Finite Field of size 11 To: Finite Field in z of size 11^4 over its base Defn: T |--> z^3 + 7*z^2 + 6*z + 10 - sage: cat.constant_coefficient() == cat.base_morphism()(T) + + sage: C.constant_coefficient() == C.base_morphism()(T) True """ return self._base_morphism @@ -389,8 +386,6 @@ def base_over_constants_field(self): Return the base field, seen as an extension over the constants field `\mathbb{F}_q`. - OUTPUT: a ring extension - EXAMPLES:: sage: Fq = GF(11) @@ -398,8 +393,8 @@ def base_over_constants_field(self): sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) - sage: cat = phi.category() - sage: cat.base_over_constants_field() + sage: C = phi.category() + sage: C.base_over_constants_field() Field in z with defining polynomial x^4 + 8*x^2 + 10*x + 2 over its base """ return self._base_over_constants_field @@ -408,8 +403,6 @@ def characteristic(self): r""" Return the function ring-characteristic. - OUTPUT: `0` or a monic prime polynomial in the function ring - EXAMPLES:: sage: Fq = GF(11) @@ -417,18 +410,19 @@ def characteristic(self): sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) - sage: cat = phi.category() - sage: cat.characteristic() + sage: C = phi.category() + sage: C.characteristic() T^2 + 7*T + 2 :: sage: psi = DrinfeldModule(A, [Frac(A).gen(), 1]) - sage: psi.category().characteristic() + sage: C = psi.category() + sage: C.characteristic() 0 """ if self._characteristic is None: - raise NotImplementedError('function ring characteristic not' \ + raise NotImplementedError('function ring characteristic not ' \ 'implemented in this case') return self._characteristic @@ -436,8 +430,6 @@ def constant_coefficient(self): r""" Return the constant coefficient of the category. - OUTPUT: an element in the base field - EXAMPLES:: sage: Fq = GF(11) @@ -445,10 +437,10 @@ def constant_coefficient(self): sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) - sage: cat = phi.category() - sage: cat.constant_coefficient() + sage: C = phi.category() + sage: C.constant_coefficient() z^3 + 7*z^2 + 6*z + 10 - sage: cat.constant_coefficient() == cat.base()(T) + sage: C.constant_coefficient() == C.base()(T) True """ return self._constant_coefficient @@ -457,8 +449,6 @@ def function_ring(self): r""" Return the function ring of the category. - OUTPUT: a univariate polynomial ring - EXAMPLES:: sage: Fq = GF(11) @@ -466,10 +456,10 @@ def function_ring(self): sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) - sage: cat = phi.category() - sage: cat.function_ring() + sage: C = phi.category() + sage: C.function_ring() Univariate Polynomial Ring in T over Finite Field of size 11 - sage: cat.function_ring() is A + sage: C.function_ring() is A True """ return self._function_ring @@ -479,10 +469,10 @@ def object(self, gen): Return a Drinfeld module object in the category whose generator is the input. - INPUT: the generator of the Drinfeld module, given as an Ore - polynomial or a list of coefficients + INPUT: - OUTPUT: a Drinfeld module in the category + - ``gen`` -- the generator of the Drinfeld module, given as an Ore + polynomial or a list of coefficients EXAMPLES:: @@ -490,13 +480,14 @@ def object(self, gen): sage: A. = Fq[] sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 - sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) - sage: cat = phi.category() - sage: psi = cat.object([p_root, 0, 1]) - sage: psi + sage: psi = DrinfeldModule(A, [p_root, 1]) + sage: C = psi.category() + + sage: phi = C.object([p_root, 0, 1]) + sage: phi Drinfeld module defined by T |--> t^2 + z^3 + 7*z^2 + 6*z + 10 sage: t = phi.ore_polring().gen() - sage: cat.object(t^3 + z^3 + 7*z^2 + 6*z + 10) is phi + sage: C.object(t^2 + z^3 + 7*z^2 + 6*z + 10) is phi True """ from sage.rings.function_field.drinfeld_modules.drinfeld_module import DrinfeldModule @@ -510,9 +501,7 @@ def object(self, gen): def ore_polring(self): r""" - Return the Ore polynomial ring of the category. - - OUTPUT: an Ore polynomial ring + Return the Ore polynomial ring of the category EXAMPLES:: @@ -521,22 +510,19 @@ def ore_polring(self): sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) - sage: cat = phi.category() - sage: cat.ore_polring() + sage: C = phi.category() + sage: C.ore_polring() Ore Polynomial Ring in t over Finite Field in z of size 11^4 over its base twisted by Frob - sage: cat.ore_polring() is phi.ore_polring() - True """ return self._ore_polring def random_object(self, rank): r""" - Return a random Drinfeld module in the category, whose rank is - the input. + Return a random Drinfeld module in the category with given rank. - INPUT: an integer, the rank of the Drinfeld module + INPUT: - OUTPUT: a Drinfeld module in the category + - ``rank`` -- an integer, the rank of the Drinfeld module EXAMPLES:: @@ -545,8 +531,9 @@ def random_object(self, rank): sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) - sage: cat = phi.category() - sage: psi = cat.random_object(3) # random + sage: C = phi.category() + + sage: psi = C.random_object(3) # random Drinfeld module defined by T |--> (6*z^3 + 4*z^2 + 10*z + 9)*t^3 + (4*z^3 + 8*z^2 + 8*z)*t^2 + (10*z^3 + 3*z^2 + 6*z)*t + z^3 + 7*z^2 + 6*z + 10 sage: psi.rank() == 3 True @@ -576,8 +563,8 @@ def super_categories(self): sage: K. = Fq.extension(4) sage: p_root = z^3 + 7*z^2 + 6*z + 10 sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) - sage: cat = phi.category() - sage: cat.super_categories() + sage: C = phi.category() + sage: C.super_categories() [] """ return [] @@ -586,9 +573,10 @@ class ParentMethods: def base(self): r""" - Return the base field of the Drinfeld module. + Return the base field of this Drinfeld module, viewed as + an algebra over the function ring. - OUTPUT: a field, which is a ring extension over a base + This is an instance of the class class:`sage.rings.ring_extension.RingExtension`. EXAMPLES:: @@ -610,9 +598,7 @@ def base(self): def base_morphism(self): r""" - Return the base morphism of the Drinfeld module. - - OUTPUT: a ring morphism + Return the base morphism of this Drinfeld module. EXAMPLES:: @@ -643,7 +629,7 @@ def base_over_constants_field(self): Return the base field, seen as an extension over the constants field `\mathbb{F}_q`. - OUTPUT: a ring extension + This is an instance of the class class:`sage.rings.ring_extension.RingExtension`. EXAMPLES:: @@ -661,8 +647,6 @@ def characteristic(self): r""" Return the function ring-characteristic. - OUTPUT: a univariate polynomial ring - EXAMPLES:: sage: Fq = GF(25) @@ -683,15 +667,13 @@ def characteristic(self): sage: psi.characteristic() Traceback (most recent call last): ... - NotImplementedError: function ring characteristic notimplemented in this case + NotImplementedError: function ring characteristic not implemented in this case """ return self.category().characteristic() def function_ring(self): r""" - Return the function ring of the Drinfeld module. - - OUTPUT: a univariate polynomial ring + Return the function ring of this Drinfeld module. EXAMPLES:: @@ -700,6 +682,8 @@ def function_ring(self): sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) + sage: phi.function_ring() + Univariate Polynomial Ring in T over Finite Field in z2 of size 5^2 sage: phi.function_ring() is A True """ @@ -707,7 +691,8 @@ def function_ring(self): def constant_coefficient(self): r""" - Return the constant coefficient of the generator. + Return the constant coefficient of the generator + of this Drinfeld module. OUTPUT: an element in the base field @@ -721,12 +706,12 @@ def constant_coefficient(self): sage: phi.constant_coefficient() == p_root True - Let `\mathbb{F}_q[T]` be the function ring, and let `\gamma` - the base of the Drinfeld module. The constant coefficient - equals `\gamma(T)`:: + Let `\mathbb{F}_q[T]` be the function ring, and let `\gamma` be + the base of the Drinfeld module. The constant coefficient is + `\gamma(T)`:: - sage: cat = phi.category() - sage: base = cat.base() + sage: C = phi.category() + sage: base = C.base() sage: base(T) == phi.constant_coefficient() True @@ -734,7 +719,7 @@ def constant_coefficient(self): same constant coefficient:: sage: t = phi.ore_polring().gen() - sage: psi = cat.object(phi.constant_coefficient() + t^3) + sage: psi = C.object(phi.constant_coefficient() + t^3) sage: psi Drinfeld module defined by T |--> t^3 + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 @@ -742,7 +727,7 @@ def constant_coefficient(self): this category if they do not share the same constant coefficient:: - sage: rho = cat.object(phi.constant_coefficient() + 1 + t^3) + sage: rho = C.object(phi.constant_coefficient() + 1 + t^3) Traceback (most recent call last): ... ValueError: constant coefficient must equal that of the category @@ -751,9 +736,7 @@ def constant_coefficient(self): def ore_polring(self): r""" - Return the Ore polynomial ring of the Drinfeld module. - - OUTPUT: an Ore polynomial ring + Return the Ore polynomial ring of this Drinfeld module. EXAMPLES:: @@ -762,20 +745,20 @@ def ore_polring(self): sage: K. = Fq.extension(6) sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) - sage: ore_polring = phi.ore_polring() - sage: ore_polring + sage: S = phi.ore_polring() + sage: S Ore Polynomial Ring in t over Finite Field in z12 of size 5^12 over its base twisted by Frob^2 The Ore polynomial ring can also be retrieved from the category of the Drinfeld module:: - sage: ore_polring is phi.category().ore_polring() + sage: S is phi.category().ore_polring() True The generator of the Drinfeld module is in the Ore polynomial ring:: - sage: phi(T) in ore_polring + sage: phi(T) in S True """ return self.category().ore_polring() From 297d317b541e0147e9ae3bc30a848244d4304340 Mon Sep 17 00:00:00 2001 From: Sandstorm831 Date: Wed, 8 Feb 2023 18:03:23 +0530 Subject: [PATCH 361/751] fixing_failing_tests --- src/sage/combinat/posets/linear_extensions.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/sage/combinat/posets/linear_extensions.py b/src/sage/combinat/posets/linear_extensions.py index 47c315a230a..2cdc803f9b5 100644 --- a/src/sage/combinat/posets/linear_extensions.py +++ b/src/sage/combinat/posets/linear_extensions.py @@ -257,13 +257,13 @@ def is_supergreedy(self): Return ``True`` if the linear extension is supergreedy. A linear extension `[e_1, e_2, \ldots, e_n]` is *supergreedy* if - for every `i`, either if there is a minimal element `e_{i+1}` in + for every `i`, either if there is a minimal element `e_{i+1}` in `[e_{i+1}, \ldots, e_n]` which is in the upper cover of `e_j` in `[e_1, \ldots, e_i]` for which j is maximum or if no such element exist `e_{i+1}` is the any of the minimal element in `[e_i+1,\dots, e_n]`. - Informally said a linear extension is supergreedy if it "always + Informally said a linear extension is supergreedy if it "always goes up and receedes the least" loosely speaking, supergreedy linear extensions are depth-first linear extensions. @@ -306,7 +306,6 @@ def next_elements(H, linext): S = [x for x in H.neighbor_out_iterator(linext[k-1]) if x not in linext and all(low in linext for low in H.neighbor_in_iterator(x))] k -= 1 return S - if not self: return True if self[0] not in H.sources(): @@ -319,7 +318,6 @@ def next_elements(H, linext): return False return True - def tau(self, i): r""" Return the operator `\tau_i` on linear extensions ``self`` of a poset. From b7f0ecfea92ddb8bbe4f9bf4d568b38e901f9340 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Wed, 8 Feb 2023 15:23:45 +0100 Subject: [PATCH 362/751] Fix stuff --- src/sage/categories/drinfeld_modules.py | 5 +- .../function_field/drinfeld_modules/action.py | 2 +- .../drinfeld_modules/drinfeld_module.py | 60 +++++++++---- .../finite_drinfeld_module.py | 12 +-- .../function_field/drinfeld_modules/homset.py | 34 +++---- .../drinfeld_modules/morphism.py | 90 +++++++++++-------- 6 files changed, 115 insertions(+), 88 deletions(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index 4e57cf36a5f..f07aeac6049 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -18,6 +18,7 @@ # http://www.gnu.org/licenses/ # ****************************************************************************** +from sage.categories.objects import Objects from sage.categories.category_types import Category_over_base_ring from sage.categories.homsets import Homsets from sage.misc.functional import log @@ -565,9 +566,9 @@ def super_categories(self): sage: phi = DrinfeldModule(A, [p_root, 0, 0, 1]) sage: C = phi.category() sage: C.super_categories() - [] + [Category of objects] """ - return [] + return [Objects()] class ParentMethods: diff --git a/src/sage/rings/function_field/drinfeld_modules/action.py b/src/sage/rings/function_field/drinfeld_modules/action.py index c324014745d..32a00f9ea71 100644 --- a/src/sage/rings/function_field/drinfeld_modules/action.py +++ b/src/sage/rings/function_field/drinfeld_modules/action.py @@ -150,7 +150,7 @@ def _latex_(self): sage: phi = DrinfeldModule(A, [z, 0, 0, 1]) sage: action = phi.action() sage: latex(action) - \text{Action{ }on{ }}\Bold{F}_{11^{2}}\text{{ }induced{ }by{ }}\text{Drinfeld{ }module{ }defined{ }by{ }} T \mapsto t^{3} + z\text{{ }over{ }base{ }}\Bold{F}_{11^{2}} + \text{Action{ }on{ }}\Bold{F}_{11^{2}}\text{{ }induced{ }by{ }}\phi: T \mapsto t^{3} + z """ return f'\\text{{Action{{ }}on{{ }}}}' \ f'{latex(self._base)}\\text{{{{ }}' \ diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index a5a5f6dceab..502785f53d7 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -27,11 +27,13 @@ from sage.categories.drinfeld_modules import DrinfeldModules from sage.categories.homset import Hom from sage.misc.latex import latex +from sage.misc.lazy_string import _LazyString from sage.rings.integer import Integer from sage.rings.polynomial.ore_polynomial_element import OrePolynomial from sage.rings.polynomial.polynomial_ring import PolynomialRing_general from sage.rings.ring_extension import RingExtension_generic from sage.structure.parent import Parent +from sage.structure.sage_object import SageObject from sage.structure.sequence import Sequence from sage.structure.unique_representation import UniqueRepresentation @@ -185,7 +187,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): :class:`sage.categories.drinfeld_modules.DrinfeldModules`):: sage: phi.category() - Category of Drinfeld modules defined over Finite Field in z of size 3^12 over its base + Category of Drinfeld modules over Finite Field in z of size 3^12 over its base sage: phi.category() is psi.category() False sage: phi.category() is rho.category() @@ -316,20 +318,13 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: identity_morphism = hom(1) sage: zero_morphism = hom(0) sage: frobenius_endomorphism - Drinfeld Module morphism: - From (gen): t^2 + t + z - To (gen): t^2 + t + z - Defn: t^6 + Endomorphism of Drinfeld module defined by T |--> t^2 + t + z + Defn: t^6 sage: identity_morphism - Drinfeld Module morphism: - From (gen): t^2 + t + z - To (gen): t^2 + t + z - Defn: 1 + Identity morphism of Drinfeld module defined by T |--> t^2 + t + z sage: zero_morphism - Drinfeld Module morphism: - From (gen): t^2 + t + z - To (gen): t^2 + t + z - Defn: 0 + Endomorphism of Drinfeld module defined by T |--> t^2 + t + z + Defn: 0 The underlying Ore polynomial is retrieved with the method :meth:`ore_polynomial`:: @@ -663,6 +658,10 @@ def __init__(self, gen, category, latexname=None): True sage: phi._latexname is None True + + :: + + sage: TestSuite(phi).run() """ self._base = category.base() self._function_ring = category.function_ring() @@ -788,7 +787,7 @@ def _latex_(self): sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) sage: latex(phi) - \text{Drinfeld{ }module{ }defined{ }by{ }} T \mapsto z_{12}^{5} t^{2} + z_{12}^{3} t + 2 z_{12}^{11} + 2 z_{12}^{10} + z_{12}^{9} + 3 z_{12}^{8} + z_{12}^{7} + 2 z_{12}^{5} + 2 z_{12}^{4} + 3 z_{12}^{3} + z_{12}^{2} + 2 z_{12}\text{{ }over{ }base{ }}\Bold{F}_{5^{12}} + \phi: T \mapsto z_{12}^{5} t^{2} + z_{12}^{3} t + 2 z_{12}^{11} + 2 z_{12}^{10} + z_{12}^{9} + 3 z_{12}^{8} + z_{12}^{7} + 2 z_{12}^{5} + 2 z_{12}^{4} + 3 z_{12}^{3} + z_{12}^{2} + 2 z_{12} :: @@ -807,10 +806,8 @@ def _latex_(self): if self._latexname is not None: return self._latexname else: - return f'\\text{{Drinfeld{{ }}module{{ }}defined{{ }}by{{ }}}} ' \ - f'{latex(self._function_ring.gen())} '\ - f'\\mapsto {latex(self._gen)}' \ - f'\\text{{{{ }}over{{ }}base{{ }}}}{latex(self._base)}' + return f'\\phi: {latex(self._function_ring.gen())} \\mapsto ' \ + f'{latex(self._gen)}' def _repr_(self): r""" @@ -829,6 +826,33 @@ def _repr_(self): return f'Drinfeld module defined by {self._function_ring.gen()} ' \ f'|--> {self._gen}' + def _test_category(self, **options): + """ + Run generic tests on the method :meth:`.category`. + + EXAMPLES:: + + sage: Fq = GF(25) + sage: A. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) + sage: phi._test_category() + + .. NOTE:: + + We reimplemented this method because Drinfeld modules are + parents, and + meth:`sage.structure.parent.Parent._test_category` requires + parents' categories to be subcategories of ``Sets()``. + """ + tester = self._tester(**options) + SageObject._test_category(self, tester=tester) + category = self.category() + # Tests that self inherits methods from the categories + tester.assertTrue(isinstance(self, category.parent_class), + _LazyString("category of %s improperly initialized", (self,), {})) + def action(self): r""" Return the action object diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 0d8939051ca..237da641a18 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -77,10 +77,8 @@ class FiniteDrinfeldModule(DrinfeldModule): sage: frobenius_endomorphism = phi.frobenius_endomorphism() sage: frobenius_endomorphism - Drinfeld Module morphism: - From (gen): 5*t^2 + z6 - To (gen): 5*t^2 + z6 - Defn: t^2 + Endomorphism of Drinfeld module defined by T |--> 5*t^2 + z6 + Defn: t^2 Its characteristic polynomial can be computed:: @@ -174,10 +172,8 @@ def frobenius_endomorphism(self): sage: K. = Fq.extension(2) sage: phi = DrinfeldModule(A, [1, 0, z6]) sage: phi.frobenius_endomorphism() - Drinfeld Module morphism: - From (gen): z6*t^2 + 1 - To (gen): z6*t^2 + 1 - Defn: t^2 + Endomorphism of Drinfeld module defined by T |--> z6*t^2 + 1 + Defn: t^2 TESTS:: diff --git a/src/sage/rings/function_field/drinfeld_modules/homset.py b/src/sage/rings/function_field/drinfeld_modules/homset.py index f9d3fac81e4..84fdc4c6e14 100644 --- a/src/sage/rings/function_field/drinfeld_modules/homset.py +++ b/src/sage/rings/function_field/drinfeld_modules/homset.py @@ -83,29 +83,24 @@ class DrinfeldModuleHomset(Homset): sage: identity_morphism = E(1) sage: identity_morphism - Drinfeld Module morphism: - From (gen): 2*t^2 + z6*t + z6 - To (gen): 2*t^2 + z6*t + z6 - Defn: 1 + Identity morphism of Drinfeld module defined by T |--> 2*t^2 + z6*t + z6 :: sage: t = phi.ore_polring().gen() sage: frobenius_endomorphism = E(t^6) sage: frobenius_endomorphism - Drinfeld Module morphism: - From (gen): 2*t^2 + z6*t + z6 - To (gen): 2*t^2 + z6*t + z6 - Defn: t^6 + Endomorphism of Drinfeld module defined by T |--> 2*t^2 + z6*t + z6 + Defn: t^6 :: sage: isogeny = H(t + 1) sage: isogeny Drinfeld Module morphism: - From (gen): 2*t^2 + z6*t + z6 - To (gen): 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 - Defn: t + 1 + From: Drinfeld module defined by T |--> 2*t^2 + z6*t + z6 + To: Drinfeld module defined by T |--> 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 + Defn: t + 1 And one can test if an Ore polynomial defines a morphism using the ``in`` syntax:: @@ -288,28 +283,23 @@ def _element_constructor_(self, *args, **kwds): sage: t = phi.ore_polring().gen() sage: identity_morphism = E(1) sage: identity_morphism - Drinfeld Module morphism: - From (gen): 2*t^2 + z6*t + z6 - To (gen): 2*t^2 + z6*t + z6 - Defn: 1 + Identity morphism of Drinfeld module defined by T |--> 2*t^2 + z6*t + z6 :: sage: frobenius_endomorphism = E(t^6) sage: frobenius_endomorphism - Drinfeld Module morphism: - From (gen): 2*t^2 + z6*t + z6 - To (gen): 2*t^2 + z6*t + z6 - Defn: t^6 + Endomorphism of Drinfeld module defined by T |--> 2*t^2 + z6*t + z6 + Defn: t^6 :: sage: isogeny = H(t + 1) sage: isogeny Drinfeld Module morphism: - From (gen): 2*t^2 + z6*t + z6 - To (gen): 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 - Defn: t + 1 + From: Drinfeld module defined by T |--> 2*t^2 + z6*t + z6 + To: Drinfeld module defined by T |--> 2*t^2 + (2*z6^5 + 2*z6^4 + 2*z6 + 1)*t + z6 + Defn: t + 1 """ # NOTE: This used to be self.element_class(self, ...), but this # would call __init__ instead of __classcall_private__. This diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 275b49d163f..40c0caa2635 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -39,20 +39,20 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, instantiate :class:`DrinfeldModuleMorphism`, but rather call the parent homset with the defining Ore polynomial:: - sage: Fq = GF(25) + sage: Fq = GF(4) sage: A. = Fq[] - sage: K. = Fq.extension(6) - sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) + sage: K. = Fq.extension(3) + sage: phi = DrinfeldModule(A, [z, z^2 + z, z^2 + z]) sage: t = phi.ore_polring().gen() - sage: ore_pol = t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 + sage: ore_pol = t + z^5 + z^3 + z + 1 sage: psi = phi.velu(ore_pol) sage: morphism = Hom(phi, psi)(ore_pol) sage: morphism Drinfeld Module morphism: - From (gen): z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - To (gen): (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - Defn: t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 + From: Drinfeld module defined by T |--> (z^2 + z)*t^2 + (z^2 + z)*t + z + To: Drinfeld module defined by T |--> (z^5 + z^2 + z + 1)*t^2 + (z^4 + z + 1)*t + z + Defn: t + z^5 + z^3 + z + 1 + The given Ore polynomial must indeed define a morphism:: @@ -64,20 +64,19 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, One can get basic data on the morphism:: sage: morphism.domain() - Drinfeld module defined by T |--> z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + Drinfeld module defined by T |--> (z^2 + z)*t^2 + (z^2 + z)*t + z sage: morphism.domain() is phi True sage: morphism.codomain() - Drinfeld module defined by T |--> (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + Drinfeld module defined by T |--> (z^5 + z^2 + z + 1)*t^2 + (z^4 + z + 1)*t + z sage: morphism.codomain() is psi True :: sage: morphism.ore_polynomial() - t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 - + t + z^5 + z^3 + z + 1 sage: morphism.ore_polynomial() is ore_pol True @@ -108,9 +107,9 @@ class DrinfeldModuleMorphism(Morphism, UniqueRepresentation, sage: from sage.rings.function_field.drinfeld_modules.morphism import DrinfeldModuleMorphism sage: DrinfeldModuleMorphism(Hom(phi, psi), ore_pol) Drinfeld Module morphism: - From (gen): z12^5*t^2 + z12^3*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - To (gen): (z12^11 + 3*z12^10 + z12^9 + z12^7 + z12^5 + 4*z12^4 + 4*z12^3 + z12^2 + 1)*t^2 + (2*z12^11 + 4*z12^10 + 2*z12^8 + z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + z12^2 + z12 + 4)*t + 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 - Defn: t + 2*z12^11 + 4*z12^9 + 2*z12^8 + 2*z12^6 + 3*z12^5 + z12^4 + 2*z12^3 + 4*z12^2 + 4*z12 + 4 + From: Drinfeld module defined by T |--> (z^2 + z)*t^2 + (z^2 + z)*t + z + To: Drinfeld module defined by T |--> (z^5 + z^2 + z + 1)*t^2 + (z^4 + z + 1)*t + z + Defn: t + z^5 + z^3 + z + 1 sage: DrinfeldModuleMorphism(Hom(phi, psi), ore_pol) is morphism True """ @@ -210,22 +209,9 @@ def _latex_(self): sage: t = phi.ore_polring().gen() sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) sage: latex(morphism) - \begin{array}{l} - \text{Drinfeld{ }module{ }morphism:}\\ - \text{{ }{ }From (gen):{ }}t^{2} + t + z_{6}\\ - \text{{ }{ }To (gen):{ }}{ }{ }t^{2} + \left(z_{6}^{4} + z_{6}^{2} + 1\right) t + z_{6}\\ - \text{{ }{ }Defn:{ }}t + z_{6}^{5} + z_{6}^{2} + 1 - \end{array} + t + z_{6}^{5} + z_{6}^{2} + 1 """ - return f'\\begin{{array}}{{l}}\n' \ - f'\\text{{Drinfeld{{ }}module{{ }}morphism:}}\\\\\n' \ - f'\\text{{{{ }}{{ }}From (gen):{{ }}}}'\ - f'{latex(self._domain.gen())}\\\\\n' \ - f'\\text{{{{ }}{{ }}To (gen):{{ }}}}{{ }}{{ }}' \ - f'{latex(self._codomain.gen())}\\\\\n' \ - f'\\text{{{{ }}{{ }}Defn:{{ }}}}' \ - f'{latex(self._ore_polynomial)}\n' \ - f'\\end{{array}}' + return f'{latex(self._ore_polynomial)}' def _repr_(self): r""" @@ -242,14 +228,20 @@ def _repr_(self): sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) sage: morphism Drinfeld Module morphism: - From (gen): t^2 + t + z6 - To (gen): t^2 + (z6^4 + z6^2 + 1)*t + z6 - Defn: t + z6^5 + z6^2 + 1 + From: Drinfeld module defined by T |--> t^2 + t + z6 + To: Drinfeld module defined by T |--> t^2 + (z6^4 + z6^2 + 1)*t + z6 + Defn: t + z6^5 + z6^2 + 1 """ - return f'Drinfeld Module morphism:\n' \ - f' From (gen): {self._domain.gen()}\n' \ - f' To (gen): {self._codomain.gen()}\n' \ - f' Defn: {self._ore_polynomial}' + if self.is_identity(): + return f'Identity morphism of {self._domain}' + elif self.is_endomorphism(): + return f'Endomorphism of {self._domain}\n' \ + f' Defn: {self._ore_polynomial}' + else: + return f'Drinfeld Module morphism:\n' \ + f' From: {self._domain}\n' \ + f' To: {self._codomain}\n' \ + f' Defn: {self._ore_polynomial}' def is_zero(self): r""" @@ -275,6 +267,30 @@ def is_zero(self): """ return self._ore_polynomial.is_zero() + def is_identity(self): + r""" + Return ``True`` whether the morphism is the identity morphism. + + EXAMPLES:: + + sage: Fq = GF(2) + sage: A. = Fq[] + sage: K. = Fq.extension(6) + sage: phi = DrinfeldModule(A, [z6, 1, 1]) + sage: morphism = End(phi)(1) + sage: morphism.is_identity() + True + + :: + + sage: psi = DrinfeldModule(A, [z6, z6^4 + z6^2 + 1, 1]) + sage: t = phi.ore_polring().gen() + sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) + sage: morphism.is_identity() + False + """ + return self._ore_polynomial == 1 + def is_isogeny(self): r""" Return ``True`` whether the morphism is an isogeny. From 30617f991360e2575347be4aaf75391a56428297 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Wed, 8 Feb 2023 15:32:33 +0100 Subject: [PATCH 363/751] Add hash methods --- .../drinfeld_modules/drinfeld_module.py | 16 ++++++++++++++++ .../drinfeld_modules/morphism.py | 18 ++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 502785f53d7..67e4ab963e8 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -853,6 +853,22 @@ def _test_category(self, **options): tester.assertTrue(isinstance(self, category.parent_class), _LazyString("category of %s improperly initialized", (self,), {})) + def __hash__(self): + r""" + Return a hash of ``self``. + + EXAMPLES:: + + sage: Fq = GF(25) + sage: A. = Fq[] + sage: K. = Fq.extension(6) + sage: p_root = 2*z12^11 + 2*z12^10 + z12^9 + 3*z12^8 + z12^7 + 2*z12^5 + 2*z12^4 + 3*z12^3 + z12^2 + 2*z12 + sage: phi = DrinfeldModule(A, [p_root, z12^3, z12^5]) + sage: hash(phi) # random + -6894299335185957188 + """ + return hash((self.base(), self._gen)) + def action(self): r""" Return the action object diff --git a/src/sage/rings/function_field/drinfeld_modules/morphism.py b/src/sage/rings/function_field/drinfeld_modules/morphism.py index 40c0caa2635..dab86c43efa 100644 --- a/src/sage/rings/function_field/drinfeld_modules/morphism.py +++ b/src/sage/rings/function_field/drinfeld_modules/morphism.py @@ -243,6 +243,24 @@ def _repr_(self): f' To: {self._codomain}\n' \ f' Defn: {self._ore_polynomial}' + def __hash__(self): + r""" + Return a hash of ``self``. + + EXAMPLES:: + + sage: Fq = GF(2) + sage: A. = Fq[] + sage: K. = Fq.extension(6) + sage: phi = DrinfeldModule(A, [z6, 1, 1]) + sage: psi = DrinfeldModule(A, [z6, z6^4 + z6^2 + 1, 1]) + sage: t = phi.ore_polring().gen() + sage: morphism = Hom(phi, psi)(t + z6^5 + z6^2 + 1) + sage: hash(morphism) # random + -4214883752078138009 + """ + return hash((self._domain, self._codomain, self._ore_polynomial)) + def is_zero(self): r""" Return ``True`` whether the morphism is the zero morphism. From 39022557c93db40e11523a19587fac90d34b6e4b Mon Sep 17 00:00:00 2001 From: Kryzar Date: Wed, 8 Feb 2023 15:37:40 +0100 Subject: [PATCH 364/751] (fix) Typo --- src/sage/categories/drinfeld_modules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/categories/drinfeld_modules.py b/src/sage/categories/drinfeld_modules.py index f07aeac6049..7720d3fde76 100644 --- a/src/sage/categories/drinfeld_modules.py +++ b/src/sage/categories/drinfeld_modules.py @@ -473,7 +473,7 @@ def object(self, gen): INPUT: - ``gen`` -- the generator of the Drinfeld module, given as an Ore - polynomial or a list of coefficients + polynomial or a list of coefficients EXAMPLES:: From f02b32bc31e272d124c3ea77f6f3834b572ede71 Mon Sep 17 00:00:00 2001 From: Eric Gourgoulhon Date: Thu, 9 Feb 2023 11:15:02 +0100 Subject: [PATCH 365/751] Document argument is_open in ManifoldSubset.complement and differnce --- src/sage/manifolds/subset.py | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/src/sage/manifolds/subset.py b/src/sage/manifolds/subset.py index 43fc76a95d6..3e9f03a579a 100644 --- a/src/sage/manifolds/subset.py +++ b/src/sage/manifolds/subset.py @@ -2629,11 +2629,13 @@ def complement(self, superset=None, name=None, latex_name=None, is_open=False): - ``latex_name`` -- (default: ``None``) LaTeX symbol to denote the complement in the case the latter has to be created; the default is built upon the symbol `\setminus` + - ``is_open`` -- (default: ``False``) if ``True``, the created subset + is assumed to be open with respect to the manifold's topology OUTPUT: - - instance of :class:`ManifoldSubset` representing the - subset that is difference of ``superset`` minus ``self`` + - instance of :class:`ManifoldSubset` representing the subset that + is ``superset`` minus ``self`` EXAMPLES:: @@ -2650,6 +2652,15 @@ def complement(self, superset=None, name=None, latex_name=None, is_open=False): ... TypeError: superset must be a superset of self + Demanding that the complement is open makes ``self`` a closed subset:: + + sage: A.is_closed() # False a priori + False + sage: A.complement(is_open=True) + Open subset M_minus_A of the 2-dimensional topological manifold M + sage: A.is_closed() + True + """ if superset is None: superset = self.manifold() @@ -2672,11 +2683,13 @@ def difference(self, other, name=None, latex_name=None, is_open=False): - ``latex_name`` -- (default: ``None``) LaTeX symbol to denote the difference in the case the latter has to be created; the default is built upon the symbol `\setminus` + - ``is_open`` -- (default: ``False``) if ``True``, the created subset + is assumed to be open with respect to the manifold's topology OUTPUT: - - instance of :class:`ManifoldSubset` representing the - subset that is difference of ``self`` minus ``other`` + - instance of :class:`ManifoldSubset` representing the subset that is + ``self`` minus ``other`` EXAMPLES:: @@ -2706,6 +2719,13 @@ def difference(self, other, name=None, latex_name=None, is_open=False): sage: M.difference(O, is_open=True) Open subset CO2 of the 2-dimensional topological manifold M + Since `O` is open and we have asked `M\setminus O` to be open, `O` + is a clopen set (if `O\neq M` and `O\neq\emptyset`, this implies that + `M` is not connected):: + + sage: O.is_closed() and O.is_open() + True + """ # See if it has been created already diffs = [] From 15e1b50c34f3529c808165974797ad4744c55119 Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Thu, 26 Jan 2023 18:11:47 +0000 Subject: [PATCH 366/751] Store Williamson type matrices as strings --- src/sage/combinat/matrices/hadamard_matrix.py | 34 +++++++++---------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 342fa853af3..bb8b52ee97b 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -347,31 +347,29 @@ def williamson_type_quadruples_smallcases(n, existence=False): ValueError: The Williamson type quadruple of order 123 is not yet implemented. """ db = { - 1: ([1], [1], [1], [1]), - 7: ([1, -1, -1, 1, 1, -1, -1], - [1, -1, 1, -1, -1, 1, -1], - [1, 1, -1, -1, -1, -1, 1], - [1, -1, -1, -1, -1, -1, -1]), - 9: ([1, -1, -1, -1, 1, 1, -1, -1, -1], - [1, -1, -1, 1, -1, -1, 1, -1, -1], - [1, -1, 1, -1, -1, -1, -1, 1, -1], - [1, 1, -1, -1, -1, -1, -1, -1, 1]), - 29: ([1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1], - [1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1], - [1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1], - [1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1]), - 43: ([1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1], - [1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1], - [1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1], - [1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1]), + 1: ('+', '+', '+', '+'), + 7: ('+--++--', '+-+--+-', '++----+', '+------'), + 9: ('+---++---', '+--+--+--', '+-+----+-', '++------+'), + 29: ('+++---++--+-+----+-+--++---++', + '+-+---++--+-++++++-+--++---+-', + '++++-++-+---++++++---+-++-+++', + '++--+--+-+++-++++-+++-+--+--+'), + 43: ('++---++++-+--+--++--------++--+--+-++++---+', + '+++-+-++--+-+-++++-+----+-++++-+-+--++-+-++', + '++-++++++----+-+--++-++-++--+-+----++++++-+', + '+---++--++++-+-+++-++--++-+++-+-++++--++---'), } + def pmtoZ(s): + return [1 if x == '+' else -1 for x in s] + if existence: return n in db if n not in db: raise ValueError("The Williamson type quadruple of order %s is not yet implemented." % n) - a, b, c, d = map(vector, db[n]) + + a, b, c, d = map(lambda s: vector(pmtoZ(s)), db[n]) return a, b, c, d From 5832798800e7c8b646423599889cdbff000ab45e Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Thu, 26 Jan 2023 18:44:26 +0000 Subject: [PATCH 367/751] Add more williamson type matrices --- src/sage/combinat/matrices/hadamard_matrix.py | 34 +++++++++++++++---- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index bb8b52ee97b..9a7d0df284a 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -312,7 +312,7 @@ def williamson_type_quadruples_smallcases(n, existence=False): Williamson construction of Hadamard matrices. Namely, the function returns the first row of 4 `n\times n` circulant matrices with the properties described in :func:`sage.combinat.matrices.hadamard_matrix.hadamard_matrix_williamson_type`. - The matrices for n=29 and n=43 are given in [Ha83]_. + The matrices for `n = 3, 5, ..., 29, 37, 43` are given in [Ha83]_. INPUT: @@ -348,12 +348,32 @@ def williamson_type_quadruples_smallcases(n, existence=False): """ db = { 1: ('+', '+', '+', '+'), + 3: ('+++', '+--', '+--', '+--'), + 5: ('+-++-', '++--+', '+----', '+----'), 7: ('+--++--', '+-+--+-', '++----+', '+------'), 9: ('+---++---', '+--+--+--', '+-+----+-', '++------+'), - 29: ('+++---++--+-+----+-+--++---++', - '+-+---++--+-++++++-+--++---+-', - '++++-++-+---++++++---+-++-+++', - '++--+--+-+++-++++-+++-+--+--+'), + 11: ('++--------+', '++-+-++-+-+', '++-++--++-+', '+-++----++-'), + 13: ('++++-+--+-+++', '+---+-++-+---', '++---+--+---+', '++---+--+---+'), + 15: ('+-+---++++---+-', '++-++------++-+', + '++-++++--++++-+', '++-++-+--+-++-+'), + 17: ('+---+++----+++---', '++-+---+--+---+-+', + '+--+-++++++++-+--', '+-++-+++--+++-++-'), + 19: ('++--+++-+--+-+++--+', '++-++--+-++-+--++-+', + '+-+---++++++++---+-', '++--+-++++++++-+--+'), + 21: ('+--++++---++---++++--', '++++-+---+--+---+-+++', + '++--+-+-++--++-+-+--+', '++-+++++-+--+-+++++-+'), + 23: ('++---+---+-++-+---+---+', '+-++-++--++++++--++-++-', + '+++---++-+-++-+-++---++', '+++-+++-+------+-+++-++'), + 25: ('++++-+-+-+--++--+-+-+-+++', '++--+--+-++++++++-+--+--+', + '+++--+--++++--++++--+--++', '+-+--+++--++++++--+++--+-'), + 27: ('+--+--+-+++--++--+++-+--+--', '+++-++-+---++--++---+-++-++', + '+---+++++-+-++++-+-+++++---', '+---+++++-+-++++-+-+++++---'), + 29: ('+++---++--+-+----+-+--++---++', '+-+---++--+-++++++-+--++---+-', + '++++-++-+---++++++---+-++-+++', '++--+--+-+++-++++-+++-+--+--+'), + 37: ('+--+-+-+-++---+--++++--+---++-+-+-+--', + '+---++-++--+-+-++----++-+-+--++-++---', + '+++++-+-----++----++----++-----+-++++', + '+--+++-+-----+----++----+-----+-+++--'), 43: ('++---++++-+--+--++--------++--+--+-++++---+', '+++-+-++--+-+-++++-+----+-++++-+-+--++-+-++', '++-++++++----+-+--++-++-++--+-+----++++++-+', @@ -397,10 +417,10 @@ def williamson_hadamard_matrix_smallcases(n, existence=False, check=True): 116 x 116 dense matrix over Integer Ring... sage: williamson_hadamard_matrix_smallcases(172) 172 x 172 dense matrix over Integer Ring... - sage: williamson_hadamard_matrix_smallcases(100) + sage: williamson_hadamard_matrix_smallcases(1000) Traceback (most recent call last): ... - ValueError: The Williamson type Hadamard matrix of order 100 is not yet implemented. + ValueError: The Williamson type Hadamard matrix of order 1000 is not yet implemented. """ assert n % 4 == 0 From 80eddce6b09208250626f5ac37c55df3e009853b Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Thu, 26 Jan 2023 19:28:08 +0000 Subject: [PATCH 368/751] Add other Williamson type matrices --- src/doc/en/reference/references/index.rst | 5 +++ src/sage/combinat/matrices/hadamard_matrix.py | 37 ++++++++++++++----- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/doc/en/reference/references/index.rst b/src/doc/en/reference/references/index.rst index caeacee26ab..a10b5889127 100644 --- a/src/doc/en/reference/references/index.rst +++ b/src/doc/en/reference/references/index.rst @@ -4109,6 +4109,11 @@ REFERENCES: of a genus 2 Jacobian*, Mathematics of Computation 88 (2019), 889-929. :doi:`10.1090/mcom/3358`. +.. [Lon2013] \S. London, + *Constructing New Turyn Type Sequences, T-Sequences and Hadamard Matrices*. + PhD Thesis, University of Illinois at Chicago, 2013. + https://hdl.handle.net/10027/9916 + .. [LOS2012] \C. Lecouvey, M. Okado, M. Shimozono. "Affine crystals, one-dimensional sums and parabolic Lusztig `q`-analogues". Mathematische Zeitschrift. **271** (2012). Issue 3-4. diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 9a7d0df284a..c48f8fc8505 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -312,7 +312,8 @@ def williamson_type_quadruples_smallcases(n, existence=False): Williamson construction of Hadamard matrices. Namely, the function returns the first row of 4 `n\times n` circulant matrices with the properties described in :func:`sage.combinat.matrices.hadamard_matrix.hadamard_matrix_williamson_type`. - The matrices for `n = 3, 5, ..., 29, 37, 43` are given in [Ha83]_. + The matrices for `n = 3, 5, ..., 29, 37, 43` are given in [Ha83]_. The matrices + for `n = 31, 33, 39, 41, 45, 49, 51, 55, 57, 61, 63` are given in [Lon2013]_. INPUT: @@ -370,14 +371,32 @@ def williamson_type_quadruples_smallcases(n, existence=False): '+---+++++-+-++++-+-+++++---', '+---+++++-+-++++-+-+++++---'), 29: ('+++---++--+-+----+-+--++---++', '+-+---++--+-++++++-+--++---+-', '++++-++-+---++++++---+-++-+++', '++--+--+-+++-++++-+++-+--+--+'), - 37: ('+--+-+-+-++---+--++++--+---++-+-+-+--', - '+---++-++--+-+-++----++-+-+--++-++---', - '+++++-+-----++----++----++-----+-++++', - '+--+++-+-----+----++----+-----+-+++--'), - 43: ('++---++++-+--+--++--------++--+--+-++++---+', - '+++-+-++--+-+-++++-+----+-++++-+-+--++-+-++', - '++-++++++----+-+--++-++-++--+-+----++++++-+', - '+---++--++++-+-+++-++--++-+++-+-++++--++---'), + 31: ('++++++-+--+---++++---+--+-+++++', '+--++---+-+-++----++-+-+---++--', + '+--++---+-+-++----++-+-+---++--', '+-----+-++-+++----+++-++-+-----'), + 33: ('++++++-+-+-+++------+++-+-+-+++++', '++-+-++-+----+++--+++----+-++-+-+', + '++--++-+++-+--+-++-+--+-+++-++--+', '+--++--+++++-++----++-+++++--++--'), + 37: ('+--+-+-+-++---+--++++--+---++-+-+-+--', '+---++-++--+-+-++----++-+-+--++-++---', + '+++++-+-----++----++----++-----+-++++', '+--+++-+-----+----++----+-----+-+++--'), + 39: ('+++--+-+-----+--++----++--+-----+-+--++', '+++--++-+---+-+--+----+--+-+---+-++--++', + '++++---+--++----+-+--+-+----++--+---+++', '+---++-+-+-----+++-++-+++-----+-+-++---'), + 41: ('++++--+-++++-++--++----++--++-++++-+--+++', '++++--+-++++-++--++----++--++-++++-+--+++', + '+++-++-+-+-+-----+++--+++-----+-+-+-++-++', '+--+--+-+-+-+++++---++---+++++-+-+-+--+--'), + 43: ('++---++++-+--+--++--------++--+--+-++++---+', '+++-+-++--+-+-++++-+----+-++++-+-+--++-+-++', + '++-++++++----+-+--++-++-++--+-+----++++++-+', '+---++--++++-+-+++-++--++-+++-+-++++--++---'), + 45: ('+++++-++----+-++--++-++-++--++-+----++-++++', '+++---++--+-+-+-++--------++-+-+-+--++---++', + '++-+-++++-+--+--+++--++--+++--+--+-++++-+-+', '+-++-----++++-+-+++-++++-+++-+-++++-----++-'), + 49: ('++++-++-+---++-+++---++-++-++---+++-++---+-++-+++', '++++-++-+---++-+++---++-++-++---+++-++---+-++-+++', + '+----+-++++--+-+++-+-+++--+++-+-+++-+--++++-+----', '+++++-+----++-+---+-+---++---+-+---+-++----+-++++'), + 51: ('+---+++-++-+-+++--+++++--++--+++++--+++-+-++-+++---', '----+++-++-+-+++--+++++--++--+++++--+++-+-++-+++---', + '-+--+----+-+++-+-+++++--+--+--+++++-+-+++-+----+--+', '-+--+----+-+++-+-+++++--+--+--+++++-+-+++-+----+--+'), + 55: ('+-+--+-+-++--+-+++++-+++--++++--+++-+++++-+--++-+-+--+-', '--+--+-+-++--+-+++++-+++--++++--+++-+++++-+--++-+-+--+-', + '+++----++-++--++----+-+-++++++++-+-+----++--++-++----++', '+++----++-++--++----+-+-++++++++-+-+----++--++-++----++'), + 57: ('+---++-+--++++-+++-++---+-++++++-+---++-+++-++++--+-++---', '----++-+--++++-+++-++---+-++++++-+---++-+++-++++--+-++---', + '--+-+-+++--+--+-++---+++++-++++-+++++---++-+--+--+++-+-+-', '--+-+-+++--+--+-++---+++++-++++-+++++---++-+--+--+++-+-+-'), + 61: ('++--+--++--+-+-++++--+-----+------+-----+--++++-+-+--++--+--+', '++--+--++--+-+-++++--+-----+------+-----+--++++-+-+--++--+--+', + '+---+-+-++++---++--+-++-+---++++++---+-++-+--++---++++-+-+---', '++++-+-+----+++--++-+--+-+++------+++-+--+-++--+++----+-+-+++'), + 63: ('++-+++--++-++--+--+-++-+-+++--------+++-+-++-+--+--++-++--+++-+', '-+-+++--++-++--+--+-++-+-+++--------+++-+-++-+--+--++-++--+++-+', + '++++-++-+-++++-+---+---+++---++++++---+++---+---+-++++-+-++-+++', '++++-++-+-++++-+---+---+++---++++++---+++---+---+-++++-+-++-+++'), } def pmtoZ(s): From 1e460a9fa9ac9d676bbd9f6456d7467a78948f94 Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 08:58:24 +0000 Subject: [PATCH 369/751] Rename supplementary_difference_set_from_rel_diff_set --- .../combinat/designs/difference_family.py | 28 +++++++++---------- src/sage/combinat/matrices/hadamard_matrix.py | 10 +++---- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index a32f8193e26..3e8747fc167 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -1618,8 +1618,8 @@ def is_supplementary_difference_set(Ks, v, lmbda): EXAMPLES:: - sage: from sage.combinat.designs.difference_family import supplementary_difference_set, is_supplementary_difference_set - sage: S1, S2, S3, S4 = supplementary_difference_set(17) + sage: from sage.combinat.designs.difference_family import supplementary_difference_set_from_rel_diff_set, is_supplementary_difference_set + sage: S1, S2, S3, S4 = supplementary_difference_set_from_rel_diff_set(17) sage: is_supplementary_difference_set([S1, S2, S3, S4], 16, 16) True sage: is_supplementary_difference_set([S1, S2, S3, S4], 16, 14) @@ -1651,7 +1651,7 @@ def is_supplementary_difference_set(Ks, v, lmbda): return True -def supplementary_difference_set(q, existence=False, check=True): +def supplementary_difference_set_from_rel_diff_set(q, existence=False, check=True): r"""Construct `4-\{2v; v, v+1, v, v; 2v\}` supplementary difference sets where `q=2v+1`. The sets are created from relative difference sets as detailed in Theorem 3.3 of [Spe1975]_. this construction @@ -1682,8 +1682,8 @@ def supplementary_difference_set(q, existence=False, check=True): EXAMPLES:: - sage: from sage.combinat.designs.difference_family import supplementary_difference_set - sage: supplementary_difference_set(17) #random + sage: from sage.combinat.designs.difference_family import supplementary_difference_set_from_rel_diff_set + sage: supplementary_difference_set_from_rel_diff_set(17) #random ([0, 2, 5, 6, 8, 10, 13, 14], [0, 1, 2, 6, 7, 9, 10, 14, 15], [0, 1, 2, 6, 11, 12, 13, 15], @@ -1691,31 +1691,31 @@ def supplementary_difference_set(q, existence=False, check=True): If existence is ``True``, the function returns a boolean:: - sage: supplementary_difference_set(7, existence=True) + sage: supplementary_difference_set_from_rel_diff_set(7, existence=True) False - sage: supplementary_difference_set(17, existence=True) + sage: supplementary_difference_set_from_rel_diff_set(17, existence=True) True TESTS:: sage: from sage.combinat.designs.difference_family import is_supplementary_difference_set - sage: is_supplementary_difference_set(supplementary_difference_set(17), 16, 16) + sage: is_supplementary_difference_set(supplementary_difference_set_from_rel_diff_set(17), 16, 16) True - sage: is_supplementary_difference_set(supplementary_difference_set(9), 8, 8) + sage: is_supplementary_difference_set(supplementary_difference_set_from_rel_diff_set(9), 8, 8) True - sage: supplementary_difference_set(7) + sage: supplementary_difference_set_from_rel_diff_set(7) Traceback (most recent call last): ... ValueError: There is no s for which m-1 is an odd prime power - sage: supplementary_difference_set(8) + sage: supplementary_difference_set_from_rel_diff_set(8) Traceback (most recent call last): ... ValueError: q must be an odd prime power - sage: supplementary_difference_set(8, existence=True) + sage: supplementary_difference_set_from_rel_diff_set(8, existence=True) False - sage: supplementary_difference_set(7, existence=True) + sage: supplementary_difference_set_from_rel_diff_set(7, existence=True) False - sage: supplementary_difference_set(1, existence=True) + sage: supplementary_difference_set_from_rel_diff_set(1, existence=True) False .. SEEALSO:: diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index c48f8fc8505..cd66b394948 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -1163,7 +1163,7 @@ def hadamard_matrix_spence_construction(n, existence=False, check=True): r"""Create an Hadamard matrix of order `n` using Spence construction. This construction (detailed in [Spe1975]_), uses supplementary difference sets implemented in - :func:`sage.combinat.designs.difference_family.supplementary_difference_set` to create the + :func:`sage.combinat.designs.difference_family.supplementary_difference_set_from_rel_diff_set` to create the desired matrix. INPUT: @@ -1210,19 +1210,19 @@ def hadamard_matrix_spence_construction(n, existence=False, check=True): ... AssertionError """ - from sage.combinat.designs.difference_family import supplementary_difference_set + from sage.combinat.designs.difference_family import supplementary_difference_set_from_rel_diff_set assert n % 4 == 0 and n > 0 q = n//4 if existence: - return supplementary_difference_set(q, existence=True) + return supplementary_difference_set_from_rel_diff_set(q, existence=True) - if not supplementary_difference_set(q, existence=True): + if not supplementary_difference_set_from_rel_diff_set(q, existence=True): raise ValueError(f'The order {n} is not covered by Spence construction.') - S1, S2, S3, S4 = supplementary_difference_set(q, check=False) + S1, S2, S3, S4 = supplementary_difference_set_from_rel_diff_set(q, check=False) A1 = matrix.circulant([1 if j in S1 else -1 for j in range(q-1)]) A2 = matrix.circulant([1 if j in S4 else -1 for j in range(q-1)]) From e715e0db51169225b6c7e308d955bf634b2dfb7a Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 12:10:26 +0000 Subject: [PATCH 370/751] Extract construction of sds --- .../combinat/designs/difference_family.py | 106 +++++++++++++++--- 1 file changed, 91 insertions(+), 15 deletions(-) diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index 3e8747fc167..5cfe9c69c96 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -1629,7 +1629,7 @@ def is_supplementary_difference_set(Ks, v, lmbda): .. SEEALSO:: - :func:`supplementary_difference_set` + :func:`supplementary_difference_set_from_rel_diff_set` """ from sage.groups.additive_abelian.additive_abelian_group import AdditiveAbelianGroup @@ -1823,7 +1823,7 @@ def get_fixed_relative_difference_set(rel_diff_set, as_elements=False): `\{td | d\in R\}= R`. In addition, the set returned by this function will contain the element `0`. This is needed in the - construction of supplementary difference sets (see :func:`supplementary_difference_set`). + construction of supplementary difference sets (see :func:`supplementary_difference_set_from_rel_diff_set`). INPUT: @@ -2155,6 +2155,88 @@ def skew_supplementary_difference_set(n, existence=False, check=True): 267: [1, 4, 16, 64, 67, 91, 97, 121, 217, 223, 256], } + if existence: + return n in indices + + if n not in indices: + raise ValueError(f'Skew SDS of order {n} not yet implemented.') + + S1, S2, S3, S4 = _construction_supplementary_difference_set(n, H_db[n], indices[n], cosets_gens[n], check=False) + + if check: + lmbda = len(S1) + len(S2) + len(S3) + len(S4) - n + assert is_supplementary_difference_set([S1, S2, S3, S4], n, lmbda) + assert _is_skew_set(S1, n) + + return S1, S2, S3, S4 + + +def _construction_supplementary_difference_set(n, H, indices, cosets_gen, check=True): + r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where `n_1 + n_2 + n_3 + n_4 = n+\lambda`. + + This construction is described in [Djo1994]_. + + Let H be a subgroup of Zmod(n) of order `t`. We construct the `2s = n/t` cosets + `\alpha_0, .., \alpha_{2s-1}` by using the elements contained in a sequence `A`: + `\alpha_{2i} = a_iH` and `\alpha_{2i+1} = -\alpha_{2i}`. + + Then, we use four indices sets `J_1, J_2, J_3, J_4` to construct the four + supplementary difference sets: `S_i = \bigcup_{j\in J__i} \alpha_i`. Note that + if `J_i` contains the value `-1`, this function will add `0` to the set `S_i`. + + To construct a coset `\alpha_{2i}` by listing it directly, replace the `2i`-th + element of the list `A` with the desired set. + + INPUT: + + - ``n`` -- integer, the parameter of the supplementary difference set. + + - ``H`` -- list of integers, the set `H` used to construct the cosets. + + - ``indices`` -- list containing four list of integers, which are the sets + `J_1, J_2, J_3, J_4` described above. + + - ``cosets_gen`` -- list containing integers or list of integers, is the set `A` + described above. + + - ``check`` -- boolean (default True). If true, check that the sets + are supplementary difference sets. Setting this parameter to False may speed + up the computation considerably. + + OUTPUT: + + The function returns the 4 sets (containing integers modulo `n`). + + TESTS:: + + sage: from sage.combinat.designs.difference_family import is_supplementary_difference_set, _construction_supplementary_difference_set + sage: H = [1, 10, -11] + sage: cosets_gen = [1, 2, 3, 5, 6, 9] + sage: indices = [[0, 3, 5, 7, 9, 10], [0, 5, 6, 7, 8], [1, 2, 6, 7, 9], [2, 6, 8, 9, 10]] + sage: _construction_supplementary_difference_set(37, H, indices, cosets_gen) + ([1, 10, 26, 35, 17, 22, 34, 7, 33, 32, 24, 18, 31, 14, 29, 9, 16, 12], + [1, 10, 26, 34, 7, 33, 5, 13, 19, 32, 24, 18, 6, 23, 8], + [36, 27, 11, 2, 20, 15, 5, 13, 19, 32, 24, 18, 31, 14, 29], + [2, 20, 15, 5, 13, 19, 6, 23, 8, 31, 14, 29, 9, 16, 12]) + sage: H = [1, 16, 22] + sage: cosets_gen = [1, 2, 3, 4, 6, 8, [13]] + sage: indices = [[1, 3, 5, 6, 8, 10, 12], [0, 1, 5, 8, 12, 13], [1, 3, 4, 7, 9, 12, 13], [0, 1, 2, 3, 7, 8]] + sage: _construction_supplementary_difference_set(39, H, indices, cosets_gen) + ([38, 23, 17, 37, 7, 34, 36, 30, 12, 4, 25, 10, 6, 18, 15, 8, 11, 20, 13], + [1, 16, 22, 38, 23, 17, 36, 30, 12, 6, 18, 15, 13, 26], + [38, 23, 17, 37, 7, 34, 3, 9, 27, 35, 14, 29, 33, 21, 24, 13, 26], + [1, 16, 22, 38, 23, 17, 2, 32, 5, 37, 7, 34, 35, 14, 29, 6, 18, 15]) + sage: H = [1, 4, 11, 16, 21, -2, -8] + sage: cosets_gen = [1, 3, 7] + sage: indices = [[1, 2, 4], [1, 2, 4], [0, 2, 3], [3, 4, -1]] + sage: sets = _construction_supplementary_difference_set(43, H, indices, cosets_gen, check=False) + sage: is_supplementary_difference_set(sets, 43, 35) + True + + .. SEEALSO:: + + :func:`skew_supplementary_difference_set` + """ def generate_set(index_set, cosets): S = [] for idx in index_set: @@ -2164,17 +2246,11 @@ def generate_set(index_set, cosets): S += cosets[idx] return S - if existence: - return n in indices - - if n not in indices: - raise ValueError(f'Skew SDS of order {n} not yet implemented.') - Z = Zmod(n) - H = list(map(Z, H_db[n])) + H = list(map(Z, H)) cosets = [] - for el in cosets_gens[n]: + for el in cosets_gen: if isinstance(el, list): even_coset = [Z(x) for x in el] else: @@ -2183,18 +2259,18 @@ def generate_set(index_set, cosets): cosets.append(even_coset) cosets.append(odd_coset) - S1 = generate_set(indices[n][0], cosets) - S2 = generate_set(indices[n][1], cosets) - S3 = generate_set(indices[n][2], cosets) - S4 = generate_set(indices[n][3], cosets) + S1 = generate_set(indices[0], cosets) + S2 = generate_set(indices[1], cosets) + S3 = generate_set(indices[2], cosets) + S4 = generate_set(indices[3], cosets) if check: lmbda = len(S1) + len(S2) + len(S3) + len(S4) - n assert is_supplementary_difference_set([S1, S2, S3, S4], n, lmbda) - assert _is_skew_set(S1, n) return S1, S2, S3, S4 + def _is_skew_set(S, n): r"""Check if `S` is a skew set over the set of integers modulo `n`. From 4a5989e334b52307fdfbe3054d8450267cd9f694 Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 12:46:15 +0000 Subject: [PATCH 371/751] Add construction for SDS --- src/doc/en/reference/references/index.rst | 12 +- .../combinat/designs/difference_family.py | 106 +++++++++++++++++- src/sage/combinat/matrices/hadamard_matrix.py | 2 +- 3 files changed, 113 insertions(+), 7 deletions(-) diff --git a/src/doc/en/reference/references/index.rst b/src/doc/en/reference/references/index.rst index a10b5889127..8a8081c28f5 100644 --- a/src/doc/en/reference/references/index.rst +++ b/src/doc/en/reference/references/index.rst @@ -2051,10 +2051,15 @@ REFERENCES: *Ten New Orders for Hadamard Matrices of Skew Type*, Publikacije Elektrotehničkog fakulteta. Serija Matematika 2 (1992): 47-59. -.. [Djo1994] \D. Đoković. +.. [Djo1994a] \D. Đoković. *Five New Orders for Hadamard Matrices of Skew Type*, Australasian Journal of Combinatorics 10 (1994): 259-264. +.. [Djo1994b] \D. Đoković. + *Two Hadamard matrices of order 956 of Goethals-Seidel type*, + Combinatorica 14(3) (1994): 375-377. + :doi:`10.1007/BF01212983` + .. [Djo2008a] \D. Đoković. *Skew-Hadamard matrices of orders 188 and 388 exist*, International Mathematical Forum 3 no.22 (2008): 1063-1068. @@ -2065,6 +2070,11 @@ REFERENCES: Journal of Combinatorial Designs 16 (2008): 493-498. :arxiv:`0706.1973` +.. [Djo2008c] \D. Đoković. + *Hadamard matrices of order 764 exist*, + Combinatorica 28(4) (2008): 487-489. + :doi:`10.1007/s00493-008-2384-z` + .. [Djo2023a] \D. Đoković. *Skew-Hadamard matrices of order 276*. :arxiv:`10.48550/ARXIV.2301.02751` diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index 5cfe9c69c96..be6e029b0dc 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -1929,12 +1929,12 @@ def is_fixed_relative_difference_set(R, q): def skew_supplementary_difference_set(n, existence=False, check=True): r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where `S_1` is skew and `n_1 + n_2 + n_3 + n_4 = n+\lambda`. - These sets are constructed from available data, as described in [Djo1994]_. The set `S_1 \subset G` is + These sets are constructed from available data, as described in [Djo1994a]_. The set `S_1 \subset G` is always skew, i.e. `S_1 \cap (-S_1) = \emptyset` and `S_1 \cup (-S_1) = G \setminus \{0\}`. The data is taken from: - * `n = 103, 151`: [Djo1994]_ + * `n = 103, 151`: [Djo1994a]_ * `n = 67, 113, 127, 157, 163, 181, 241`: [Djo1992a]_ * `n = 37, 43`: [Djo1992b]_ * `n = 39, 49, 65, 93, 121, 129, 133, 217, 219, 267`: [Djo1992c]_ @@ -2174,7 +2174,7 @@ def skew_supplementary_difference_set(n, existence=False, check=True): def _construction_supplementary_difference_set(n, H, indices, cosets_gen, check=True): r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where `n_1 + n_2 + n_3 + n_4 = n+\lambda`. - This construction is described in [Djo1994]_. + This construction is described in [Djo1994a]_. Let H be a subgroup of Zmod(n) of order `t`. We construct the `2s = n/t` cosets `\alpha_0, .., \alpha_{2s-1}` by using the elements contained in a sequence `A`: @@ -2184,7 +2184,7 @@ def _construction_supplementary_difference_set(n, H, indices, cosets_gen, check= supplementary difference sets: `S_i = \bigcup_{j\in J__i} \alpha_i`. Note that if `J_i` contains the value `-1`, this function will add `0` to the set `S_i`. - To construct a coset `\alpha_{2i}` by listing it directly, replace the `2i`-th + To construct a coset `\alpha_{2i}` by listing it directly, replace the `2i`-th element of the list `A` with the desired set. INPUT: @@ -2271,10 +2271,106 @@ def generate_set(index_set, cosets): return S1, S2, S3, S4 +def supplementary_difference_set(n, existence=False, check=True): + r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where skew and `n_1 + n_2 + n_3 + n_4 = n+\lambda`. + + These sets are constructed from available data, as described in [Djo1994a]_. + + The data for `n=191` is taken from [Djo2008c]_, and date for `n=239` is from [Djo1994b]_. + Additional SDS are constructed using :func:`skew_supplementary_difference_set`. + + INPUT: + + - ``n`` -- integer, the parameter of the supplementary difference set. + + - ``existence`` -- boolean (dafault False). If true, only check whether the + supplementary difference sets can be constructed. + + - ``check`` -- boolean (default True). If true, check that the sets are + supplementary difference sets before returning them. Setting this parameter + to False may speed up the computation considerably. + + OUTPUT: + + If ``existence`` is false, the function returns the 4 sets (containing integers + modulo `n`), or raises an error if data for the given ``n`` is not available. + If ``existence`` is true, the function returns a boolean representing whether + skew supplementary difference sets can be constructed. + + EXAMPLES:: + + sage: from sage.combinat.designs.difference_family import supplementary_difference_set + sage: S1, S2, S3, S4 = supplementary_difference_set(191) + + If existence is ``True``, the function returns a boolean :: + + sage: supplementary_difference_set(191, existence=True) + True + sage: supplementary_difference_set(17, existence=True) + False + + TESTS:: + + sage: from sage.combinat.designs.difference_family import is_supplementary_difference_set + sage: S1, S2, S3, S4 = supplementary_difference_set(191, check=False) + sage: is_supplementary_difference_set([S1, S2, S3, S4], 191, len(S1)+len(S2)+len(S3)+len(S4)-191) + True + sage: S1, S2, S3, S4 = supplementary_difference_set(37, check=False) + sage: supplementary_difference_set(7) + Traceback (most recent call last): + ... + ValueError: SDS of order 7 not yet implemented. + sage: supplementary_difference_set(7, existence=True) + False + sage: supplementary_difference_set(127, existence=True) + True + """ + + indices = { + 191: [[1, 7, 9, 10, 11, 13, 17, 18, 25, 26, 30, 31, 33, 34, 35, 36, 37], + [1, 4, 7, 9, 11, 12, 13, 14, 19, 21, 22, 23, 24, 25, 26, 29, 36, 37], + [0, 3, 4, 5, 7, 8, 9, 16, 17, 19, 24, 25, 29, 30, 31, 33, 35, 37], + [1, 3, 4, 5, 8, 11, 14, 18, 19, 20, 21, 23, 24, 25, 28, 29, 30, 32, 34, 35]], + 239: [[0, 1, 2, 3, 4, 5, 6, 7, 14, 18, 19, 21, 24, 25, 29, 30], + [0, 1, 3, 7, 9, 12, 15, 18, 20, 22, 26, 28, 29, 30, 31, 32, 33], + [2, 3, 4, 5, 8, 9, 10, 11, 13, 17, 19, 21, 22, 24, 27, 31, 32], + [0, 1, 2, 3, 6, 7, 8, 11, 13, 15, 17, 18, 19, 22, 25, 26, 27, 32, 33]], + } + + cosets_gens = { + 191: [1, 2, 3, 4, 6, 8, 9, 11, 12, 13, 16, 17, 18, 19, 22, 32, 36, 38, 41], + 239: [1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14, 15, 18, 21, 28, 35, 42], + } + + H_db = { + 191: [1, 39, 184, 109, 49], + 239: [1, 10, 24, 44, 98, 100, 201], + } + + if existence: + return n in indices or skew_supplementary_difference_set(n, existence=True) + + sets = None + if n in indices: + sets = _construction_supplementary_difference_set(n, H_db[n], indices[n], cosets_gens[n], check=False) + elif skew_supplementary_difference_set(n, existence=True): + sets = skew_supplementary_difference_set(n, check=False) + + if sets is None: + raise ValueError(f'SDS of order {n} not yet implemented.') + + S1, S2, S3, S4 = sets + if check: + lmbda = len(S1) + len(S2) + len(S3) + len(S4) - n + assert is_supplementary_difference_set([S1, S2, S3, S4], n, lmbda) + + return S1, S2, S3, S4 + + def _is_skew_set(S, n): r"""Check if `S` is a skew set over the set of integers modulo `n`. - From [Djo1994]_, a set `S \subset G` (where `G` is a finite abelian group of order `n`) is of skew + From [Djo1994a]_, a set `S \subset G` (where `G` is a finite abelian group of order `n`) is of skew type if `S_1 \cap (-S_1) = \emptyset` and `S_1 \cup (-S_1) = G\setminus \{0\}`. INPUT: diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index cd66b394948..fdf0958e127 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -2290,7 +2290,7 @@ def skew_hadamard_matrix_324(): r""" Construct a skew Hadamard matrix of order 324. - The construction is taken from [Djo1994]_. It uses four supplementary difference sets `S_1, S_2, S_3, S_4`, + The construction is taken from [Djo1994a]_. It uses four supplementary difference sets `S_1, S_2, S_3, S_4`, with `S_1` of skew type. These are then used to generate four matrices of order `81`, which are inserted into the Goethals-Seidel array. From ccff87ed38ed8c6bbd42c27c7d3e4ff08ff1e35c Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 13:34:58 +0000 Subject: [PATCH 372/751] Add construction for hadamard matrix from sds --- src/sage/combinat/matrices/hadamard_matrix.py | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index fdf0958e127..ff64da31099 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -768,6 +768,92 @@ def _construction_goethals_seidel_matrix(A, B, C, D): [-D*R, -C.T*R, B.T*R, A]]) +def hadamard_matrix_from_sds(n, existence=False, check=True): + r"""Construction of Hadamard matrices from supplementary difference sets. + + Given four SDS with parameters `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` with + `n_1 + n_2 + n_3 + n_4 = n+\lambda` we can construct four (-1,+1) sequences `a_i = (a_{i,0},...,a_{i,n-1})` + where `a_{i,j} = -1` iff `j \in S_i`. This will be the fist rows of four circulant + matrices `A_1, A_2, A_3, A_4` which, when plugged into the Goethals-Seidel array, create an + Hadamard matrix of order `4n` (see [Djo1994b]_). + + The supplementary difference sets are taken from + :func:`sage.combinat.designs.difference_family.supplementary_difference_set`. + + INPUT: + + - ``n`` -- integer, the order of the matrix to be constructed. + + - ``check`` -- boolean: if True (default), check the the matrix is a Hadamard + before returning. + + - ``existence`` -- boolean (default False): if True, only check if the matrix exists. + + OUTPUT: + + If ``existence`` is false, returns the Hadamard matrix of order `n`. It raises + an error if no data is available to construct the matrix of the given order, + or if `n` is not a multiple of `4`. + If ``existence`` is true, returns a boolean representing whether the matrix + can be constructed or not. + + EXAMPLES: + + By default The function returns the Hadamard matrix :: + + sage: from sage.combinat.matrices.hadamard_matrix import hadamard_matrix_from_sds + sage: hadamard_matrix_from_sds(148) + 148 x 148 dense matrix over Integer Ring... + + If ``existence`` is set to True, the function returns a boolean :: + + sage: hadamard_matrix_from_sds(764, existence=True) + True + + TESTS:: + + sage: from sage.combinat.matrices.hadamard_matrix import hadamard_matrix_from_sds, is_hadamard_matrix + sage: is_hadamard_matrix(hadamard_matrix_from_sds(172)) + True + sage: hadamard_matrix_from_sds(64, existence=True) + False + sage: hadamard_matrix_from_sds(64) + Traceback (most recent call last): + ... + ValueError: SDS of order 16 not yet implemented. + sage: hadamard_matrix_from_sds(14) + Traceback (most recent call last): + ... + ValueError: n must be a positive multiple of four. + """ + from sage.combinat.designs.difference_family import supplementary_difference_set + + if n <= 0 or n % 4 != 0: + raise ValueError(f'n must be a positive multiple of four.') + t = n // 4 + + if existence: + return supplementary_difference_set(t, existence=True) + + S1, S2, S3, S4 = supplementary_difference_set(t, check=False) + a = [-1 if i in S1 else 1 for i in range(t)] + b = [-1 if i in S2 else 1 for i in range(t)] + c = [-1 if i in S3 else 1 for i in range(t)] + d = [-1 if i in S4 else 1 for i in range(t)] + + if n == 956: + a, b, c, d = [-el for el in d], a, b, c + + A, B, C, D = map(matrix.circulant, [a, b, c, d]) + if check: + assert A*A.T+B*B.T+C*C.T+D*D.T == 4*t*I(t) + + H = _construction_goethals_seidel_matrix(A, B, C, D) + if check: + assert is_hadamard_matrix(H) + return H + + def hadamard_matrix_cooper_wallis_construction(x1, x2, x3, x4, A, B, C, D, check=True): r""" Create an Hadamard matrix using the contruction detailed in [CW1972]_. @@ -1531,6 +1617,10 @@ def hadamard_matrix(n, existence=False, check=True): if existence: return True M = turyn_type_hadamard_matrix_smallcases(n, check=False) + elif hadamard_matrix_from_sds(n, existence=True): + if existence: + return True + M = hadamard_matrix_from_sds(n, check=False) elif hadamard_matrix_spence_construction(n, existence=True): if existence: return True From 2fd3af6d507d628f47a5892c845de2bce8c6ab3e Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 18:27:59 +0000 Subject: [PATCH 373/751] Create function to construct symmetric conference matrices --- src/sage/combinat/matrices/hadamard_matrix.py | 62 +++++++++++++++---- 1 file changed, 51 insertions(+), 11 deletions(-) diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index ff64da31099..e05f05ad559 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -172,6 +172,56 @@ def hadamard_matrix_paleyI(n, normalize=True): return H +def symmetric_conference_matrix_paley(n): + r""" + Construct a symmetric conference matrix of order n. + + A conference matrix is an `n\times n` matrix `C` with 0s on the main diagonal + and 1s and -1s elsewhere, satisfying `CC^\top=(n-1)I`. This construction assumes + that `q = n-1` is a prime power, with `q \cong 1 \mod 4`. See [Hora]_ or [Lon2013]_. + + These matrices are used in the :func:`hadamard_matrix_paleyII`. + + INPUT: + + - ``n`` -- integer, the order of the symmetric conference matrix to consruct. + + EXAMPLES:: + + sage: from sage.combinat.matrices.hadamard_matrix import symmetric_conference_matrix_paley + sage: symmetric_conference_matrix_paley(6) + [ 0 1 1 1 1 1] + [ 1 0 1 -1 -1 1] + [ 1 1 0 1 -1 -1] + [ 1 -1 1 0 1 -1] + [ 1 -1 -1 1 0 1] + [ 1 1 -1 -1 1 0] + + TESTS:: + + sage: symmetric_conference_matrix_paley(5) + Traceback (most recent call last): + ... + ValueError: The order 5 is not covered by Paley construction of symmetric conference matrices. + """ + q = n - 1 + if not (is_prime_power(q) and (q % 4 == 1)): + raise ValueError("The order %s is not covered by Paley construction of symmetric conference matrices." % n) + + from sage.rings.finite_rings.finite_field_constructor import FiniteField + K = FiniteField(q, 'x') + K_list = list(K) + K_list.insert(0, K.zero()) + H = matrix(ZZ, [[(1 if (x-y).is_square() else -1) + for x in K_list] + for y in K_list]) + for i in range(n): + H[0, i] = 1 + H[i, 0] = 1 + H[i, i] = 0 + return H + + def hadamard_matrix_paleyII(n): r""" Implement the Paley type II construction. @@ -219,17 +269,7 @@ def hadamard_matrix_paleyII(n): if not (n % 2 == 0 and is_prime_power(q) and (q % 4 == 1)): raise ValueError("The order %s is not covered by the Paley type II construction." % n) - from sage.rings.finite_rings.finite_field_constructor import FiniteField - K = FiniteField(q, 'x') - K_list = list(K) - K_list.insert(0, K.zero()) - H = matrix(ZZ, [[(1 if (x-y).is_square() else -1) - for x in K_list] - for y in K_list]) - for i in range(q+1): - H[0, i] = 1 - H[i, 0] = 1 - H[i, i] = 0 + H = symmetric_conference_matrix_paley(q+1) tr = { 0: matrix(2, 2, [ 1, -1, -1, -1]), 1: matrix(2, 2, [ 1, 1, 1, -1]), From 2b38a4c0bcdc1ef13d2f395b4c5b9292164cda52 Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 19:23:12 +0000 Subject: [PATCH 374/751] Add miyamoto construction --- src/doc/en/reference/references/index.rst | 5 + src/sage/combinat/matrices/hadamard_matrix.py | 112 ++++++++++++++++++ 2 files changed, 117 insertions(+) diff --git a/src/doc/en/reference/references/index.rst b/src/doc/en/reference/references/index.rst index 8a8081c28f5..6c8b4f644d7 100644 --- a/src/doc/en/reference/references/index.rst +++ b/src/doc/en/reference/references/index.rst @@ -4499,6 +4499,11 @@ REFERENCES: .. [Mit2008] \A. Mitra. *On the construction of M-sequences via primitive polynomials with a fast identification method*, International Journal of Electronics and Communication Engineering 2(9) (2008): 1991-1996. +.. [Miy1991] \M. Miyamoto. + *A construction of Hadamard matrices*, + Journal of Combinatorial Theory, Series A 57(1) (1991): 86-108. + :doi:`10.1016/0097-3165(91)90008-5` + .. [MKO1998] Hans Munthe--Kaas and Brynjulf Owren. *Computations in a free Lie algebra*. (1998). `Downloadable from Munthe-Kaas's website diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index e05f05ad559..760d73e6f86 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -280,6 +280,114 @@ def hadamard_matrix_paleyII(n): return normalise_hadamard(H) +def hadamard_matrix_miyamoto_construction(n, existence=False, check=True): + r""" + Construct Hadamard matrix using Miyamoto construction. + + If `q = n/4` is a prime power, and there exists an Hadamard matrix of order + `q-1`, then a Hadamard matrix of order `n` can be constructed (see [Miy1991]_). + + INPUT: + + - ``n`` -- integer, the order of the matrix to be constructed. + + - ``check`` -- boolean: if True (default), check the the matrix is a Hadamard + before returning. + + - ``existence`` -- boolean (default False): if True, only check if the matrix exists. + + OUTPUT: + + If ``existence`` is false, returns the Hadamard matrix of order `n`. It raises + an error if no data is available to construct the matrix of the given order, + or if `n` is not a multiple of `4`. + If ``existence`` is true, returns a boolean representing whether the matrix + can be constructed or not. + + EXAMPLES: + + By default the function returns the Hadamard matrix :: + + sage: from sage.combinat.matrices.hadamard_matrix import hadamard_matrix_miyamoto_construction + sage: hadamard_matrix_miyamoto_construction(20) + 20 x 20 dense matrix over Integer Ring... + + If ``existence`` is set to True, the function returns a boolean :: + + sage: hadamard_matrix_miyamoto_construction(36, existence=True) + True + + TESTS:: + + sage: from sage.combinat.matrices.hadamard_matrix import is_hadamard_matrix + sage: is_hadamard_matrix(hadamard_matrix_miyamoto_construction(68, check=False)) + True + sage: hadamard_matrix_miyamoto_construction(64, existence=True) + False + sage: hadamard_matrix_miyamoto_construction(64) + Traceback (most recent call last): + ... + ValueError: The order 64 is not covered by Miyamoto construction. + sage: hadamard_matrix_miyamoto_construction(14) + Traceback (most recent call last): + ... + ValueError: No Hadamard matrix of order 14 exists. + """ + if n < 0 or n % 4 != 0: + raise ValueError(f'No Hadamard matrix of order {n} exists.') + + q = n // 4 + if existence: + return is_prime_power(q) and q % 4 == 1 and hadamard_matrix(q-1, existence=True) + + if not (is_prime_power(q) and q % 4 == 1 and hadamard_matrix(q-1, existence=True)): + raise ValueError(f'The order {n} is not covered by Miyamoto construction.') + + m = (q-1) // 2 + + C = symmetric_conference_matrix_paley(q + 1) + + neg = [i for i in range(2, m+2) if C[1, i] == -1] + pos = [i for i in range(m+2, 2*m+2) if C[1, i] == 1] + + for i, j in zip(neg, pos): + C.swap_rows(i, j) + C.swap_columns(i, j) + + C1 = -C.submatrix(row=2, col=2, nrows=m, ncols=m) + C2 = C.submatrix(row=2, col=m+2, nrows=m, ncols=m) + C4 = C.submatrix(row=m+2, col=m+2, nrows=m, ncols=m) + + K = hadamard_matrix(q - 1) + K1 = K.submatrix(row=0, col=0, nrows=(q-1)//2, ncols=(q-1)//2) + K2 = K.submatrix(row=0, col=(q-1)//2, nrows=(q-1)//2, ncols=(q-1)//2) + K3 = -K.submatrix(row=(q-1)//2, col=0, nrows=(q-1)//2, ncols=(q-1)//2) + K4 = K.submatrix(row=(q-1)//2, col=(q-1)//2, nrows=(q-1)//2, ncols=(q-1)//2) + + Zr = zero_matrix(m) + Us = [[C1, C2, Zr, Zr], [C2.T, C4, Zr, Zr], [Zr, Zr, C1, C2], [Zr, Zr, C2.T, C4]] + Vs = [[I(m), Zr, K1, K2], [Zr, I(m), K3, K4], [K1.T, K3.T, I(m), Zr], [K2.T, K4.T, Zr, I(m)]] + + def T(i, j): + return block_matrix([[Us[i][j]+Vs[i][j], Us[i][j]-Vs[i][j]], + [Us[i][j]-Vs[i][j], Us[i][j]+Vs[i][j]]]) + + e = matrix([[1] * (2*m)]) + one = matrix([1]) + H = block_matrix([[ one, -e, one, e, one, e, one, e], + [-e.T, T(0, 0), e.T, T(0, 1), e.T, T(0, 2), e.T, T(0, 3)], + [-one, -e, one, -e, one, e, -one, -e], + [-e.T, -T(1, 0), -e.T, T(1, 1), e.T, T(1, 2), -e.T, -T(1, 3)], + [-one, -e, -one, -e, one, -e, one, e], + [-e.T, -T(2, 0), -e.T, -T(2, 1), -e.T, T(2, 2), e.T, T(2, 3)], + [-one, -e, one, e, -one, -e, one, -e], + [-e.T, -T(3, 0), e.T, T(3, 1), -e.T, -T(3, 2), -e.T, T(3, 3)]]) + + if check: + assert is_hadamard_matrix(H) + return H + + def hadamard_matrix_williamson_type(a, b, c, d, check=True): r""" Construction of Williamson type Hadamard matrix. @@ -1657,6 +1765,10 @@ def hadamard_matrix(n, existence=False, check=True): if existence: return True M = turyn_type_hadamard_matrix_smallcases(n, check=False) + elif hadamard_matrix_miyamoto_construction(n, existence=True): + if existence: + return True + M = hadamard_matrix_miyamoto_construction(n, check=False) elif hadamard_matrix_from_sds(n, existence=True): if existence: return True From 75b9ed363721c615f0c922e4ef608c33da61754c Mon Sep 17 00:00:00 2001 From: Sandstorm831 Date: Thu, 9 Feb 2023 23:41:07 +0530 Subject: [PATCH 375/751] minor documentation correction --- src/sage/combinat/posets/linear_extensions.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/sage/combinat/posets/linear_extensions.py b/src/sage/combinat/posets/linear_extensions.py index 2cdc803f9b5..a2dfb7b26a1 100644 --- a/src/sage/combinat/posets/linear_extensions.py +++ b/src/sage/combinat/posets/linear_extensions.py @@ -283,8 +283,6 @@ def is_supergreedy(self): sage: for l in Q.linear_extensions(): ....: if not l.is_supergreedy(): ....: print(l) - [0, 1, 2, 3, 4] - [0, 2, 3, 1, 4] [0, 2, 1, 3, 4] TESTS:: From 78dcd21a0d5116b19487aad8219fd5bd368ba93a Mon Sep 17 00:00:00 2001 From: David Roe Date: Fri, 18 Feb 2022 03:44:44 -0500 Subject: [PATCH 376/751] Convert result of multivariate polynomial evaluation into correct parent --- .../multi_polynomial_libsingular.pyx | 38 +++++++++++-------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx index f3c0bc09542..4a004bfb9ef 100644 --- a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx +++ b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx @@ -2056,6 +2056,15 @@ cdef class MPolynomial_libsingular(MPolynomial): 9 sage: a.parent() is QQ True + + See :trac:`33373`:: + + sage: k.
= GF(2^4) + sage: R. = PolynomialRing(k, 1) + sage: f = R(1) + sage: S. = PolynomialRing(k, 1) + sage: f(y).parent() + Multivariate Polynomial Ring in y over Finite Field in a of size 2^4 """ if len(kwds) > 0: f = self.subs(**kwds) @@ -2075,29 +2084,28 @@ cdef class MPolynomial_libsingular(MPolynomial): if l != parent._ring.N: raise TypeError("number of arguments does not match number of variables in parent") + res_parent = coercion_model.common_parent(parent._base, *x) + cdef poly *res # ownership will be transferred to us in the else block try: # Attempt evaluation via singular. coerced_x = [parent.coerce(e) for e in x] except TypeError: # give up, evaluate functional - y = parent.base_ring().zero() + sage_res = parent.base_ring().zero() for (m,c) in self.dict().iteritems(): - y += c*mul([ x[i]**m[i] for i in m.nonzero_positions()]) - return y - - cdef poly *res # ownership will be transferred to us in the next line - singular_polynomial_call(&res, self._poly, _ring, coerced_x, MPolynomial_libsingular_get_element) - res_parent = coercion_model.common_parent(parent._base, *x) - - if res == NULL: - return res_parent(0) - if p_LmIsConstant(res, _ring): - sage_res = si2sa( p_GetCoeff(res, _ring), _ring, parent._base ) - p_Delete(&res, _ring) # sage_res contains copy + sage_res += c*mul([ x[i]**m[i] for i in m.nonzero_positions()]) else: - sage_res = new_MP(parent, res) # pass on ownership of res to sage_res + singular_polynomial_call(&res, self._poly, _ring, coerced_x, MPolynomial_libsingular_get_element) + + if res == NULL: + return res_parent(0) + if p_LmIsConstant(res, _ring): + sage_res = si2sa( p_GetCoeff(res, _ring), _ring, parent._base ) + p_Delete(&res, _ring) # sage_res contains copy + else: + sage_res = new_MP(parent, res) # pass on ownership of res to sage_res - if parent(sage_res) is not res_parent: + if sage_res.parent() is not res_parent: sage_res = res_parent(sage_res) return sage_res From fbaf715324f08cc9372617528d887f19e018e7ea Mon Sep 17 00:00:00 2001 From: Kryzar Date: Thu, 9 Feb 2023 21:36:05 +0100 Subject: [PATCH 377/751] Refactor latexname --- .../drinfeld_modules/drinfeld_module.py | 52 +++++-------------- .../finite_drinfeld_module.py | 7 +-- 2 files changed, 15 insertions(+), 44 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 67e4ab963e8..4d49705c82b 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -27,6 +27,7 @@ from sage.categories.drinfeld_modules import DrinfeldModules from sage.categories.homset import Hom from sage.misc.latex import latex +from sage.misc.latex import latex_variable_name from sage.misc.lazy_string import _LazyString from sage.rings.integer import Integer from sage.rings.polynomial.ore_polynomial_element import OrePolynomial @@ -174,13 +175,6 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: phi(1) # phi_1 1 - One can give a LaTeX name to be used for LaTeX representation:: - - sage: sigma = DrinfeldModule(A, [z, 1, 1], latexname='\sigma') - ... - sage: latex(sigma) - \sigma - .. RUBRIC:: The category of Drinfeld modules Drinfeld modules have their own category (see class @@ -507,7 +501,7 @@ class DrinfeldModule(Parent, UniqueRepresentation): """ @staticmethod - def __classcall_private__(cls, function_ring, gen, name='t', latexname=None): + def __classcall_private__(cls, function_ring, gen, name='t'): """ Check input validity and return a ``DrinfeldModule`` or ``FiniteDrinfeldModule`` object accordingly. @@ -523,9 +517,6 @@ def __classcall_private__(cls, function_ring, gen, name='t', latexname=None): - ``name`` (default: ``'t'``) -- the name of the Ore polynomial ring gen - - ``latexname`` (default: ``None``) -- the LaTeX name of the Drinfeld - module - OUTPUT: A DrinfeldModule or FiniteDrinfeldModule. @@ -586,10 +577,6 @@ def __classcall_private__(cls, function_ring, gen, name='t', latexname=None): base_field_noext.has_coerce_map_from(function_ring.base_ring())): raise ValueError('function ring base must coerce into base field') - # Check LaTeX name - if latexname is not None and type(latexname) is not str: - raise ValueError('LaTeX name should be a string') - # Build the category T = function_ring.gen() if isinstance(base_field_noext, RingExtension_generic): @@ -613,10 +600,10 @@ def __classcall_private__(cls, function_ring, gen, name='t', latexname=None): # Instantiate the appropriate class if base_field.is_finite(): from sage.rings.function_field.drinfeld_modules.finite_drinfeld_module import FiniteDrinfeldModule - return FiniteDrinfeldModule(gen, category, latexname) - return cls.__classcall__(cls, gen, category, latexname) + return FiniteDrinfeldModule(gen, category) + return cls.__classcall__(cls, gen, category) - def __init__(self, gen, category, latexname=None): + def __init__(self, gen, category): """ Initialize ``self``. @@ -634,9 +621,6 @@ def __init__(self, gen, category, latexname=None): - ``name`` (default: ``'t'``) -- the name of the Ore polynomial ring gen - - ``latexname`` (default: ``None``) -- the LaTeX name of the Drinfeld - module - TESTS:: sage: Fq = GF(25) @@ -656,8 +640,6 @@ def __init__(self, gen, category, latexname=None): True sage: phi._morphism == Hom(A, ore_polring)(phi._gen) True - sage: phi._latexname is None - True :: @@ -666,7 +648,6 @@ def __init__(self, gen, category, latexname=None): self._base = category.base() self._function_ring = category.function_ring() self._gen = gen - self._latexname = latexname self._morphism = category._function_ring.hom([gen]) self._ore_polring = gen.parent() self._Fq = self._function_ring.base_ring() # Must be last @@ -776,8 +757,8 @@ def _latex_(self): r""" Return a LaTeX representation of the Drinfeld module. - If a LaTeX name was given at initialization, we use it. - Otherwise, we create a representation. + If a representation name is given with meth:`rename`, it is + taken into account for LaTeX representation. EXAMPLES:: @@ -791,20 +772,13 @@ def _latex_(self): :: - sage: psi = DrinfeldModule(A, [p_root, z12^3, z12^5], latexname='\psi') - ... - sage: latex(psi) - \psi - - :: - - sage: psi = DrinfeldModule(A, [p_root, z12^3, z12^5], latexname=1729) - Traceback (most recent call last): - ... - ValueError: LaTeX name should be a string + sage: phi.rename('phi') + sage: latex(phi) + \phi + sage: phi.reset_name() """ - if self._latexname is not None: - return self._latexname + if hasattr(self, '__custom_name'): + return latex_variable_name(getattr(self, '__custom_name')) else: return f'\\phi: {latex(self._function_ring.gen())} \\mapsto ' \ f'{latex(self._gen)}' diff --git a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py index 237da641a18..114d1730b9b 100644 --- a/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/finite_drinfeld_module.py @@ -116,7 +116,7 @@ class FiniteDrinfeldModule(DrinfeldModule): True """ - def __init__(self, gen, category, latexname=None): + def __init__(self, gen, category): """ Initialize `self`. @@ -134,9 +134,6 @@ def __init__(self, gen, category, latexname=None): - ``name`` (default: `'t'`) -- the name of the Ore polynomial ring gen - - ``latexname`` (default: ``None``) -- the LaTeX name of the Drinfeld - module - TESTS:: sage: Fq = GF(25) @@ -152,7 +149,7 @@ def __init__(self, gen, category, latexname=None): # NOTE: There used to be no __init__ here (which was fine). I # added one to ensure that FiniteDrinfeldModule would always # have _frobenius_norm and _frobenius_trace attributes. - super().__init__(gen, category, latexname) + super().__init__(gen, category) self._frobenius_norm = None self._frobenius_trace = None From 14879847094a9c6b490117bfd49da9395e8962d1 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Thu, 9 Feb 2023 21:42:19 +0100 Subject: [PATCH 378/751] Enhance an error message --- .../rings/function_field/drinfeld_modules/drinfeld_module.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 4d49705c82b..9544f66c007 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -589,6 +589,11 @@ def __classcall_private__(cls, function_ring, gen, name='t'): base_morphism = Hom(function_ring, base_field_noext)(gen[0]) base_field = base_field_noext.over(base_morphism) + # This test is also done in the category. We put it here also + # to have a friendlier error message + if not base_field.is_field(): + raise ValueError('generator coefficients must live in a field') + category = DrinfeldModules(base_field, name=name) # Check gen as Ore polynomial From 0e6cee3d7aa71458b17eb073346fcc4090920b23 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Thu, 9 Feb 2023 23:08:40 +0100 Subject: [PATCH 379/751] (fix) Fix PEP8 typo --- .../rings/function_field/drinfeld_modules/drinfeld_module.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index 9544f66c007..c2f05bbdf56 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -589,7 +589,7 @@ def __classcall_private__(cls, function_ring, gen, name='t'): base_morphism = Hom(function_ring, base_field_noext)(gen[0]) base_field = base_field_noext.over(base_morphism) - # This test is also done in the category. We put it here also + # This test is also done in the category. We put it here also # to have a friendlier error message if not base_field.is_field(): raise ValueError('generator coefficients must live in a field') From 7c87d0f381801cd590e67301dc97a09b876bb1e8 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Fri, 10 Feb 2023 15:13:11 +0900 Subject: [PATCH 380/751] Add codecov.yml to control codecov report --- .github/workflows/codecov.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 00000000000..69cb76019a4 --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1 @@ +comment: false From 82318995cf84164bdca86fb3b69fae117a2453b9 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Fri, 10 Feb 2023 15:45:19 +0900 Subject: [PATCH 381/751] Relocate and rename codecov.yml --- .github/workflows/codecov.yml => .codecov.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/codecov.yml => .codecov.yml (100%) diff --git a/.github/workflows/codecov.yml b/.codecov.yml similarity index 100% rename from .github/workflows/codecov.yml rename to .codecov.yml From 121c0107a7a25bceae85632d831fecc201c5f14b Mon Sep 17 00:00:00 2001 From: Marc Mezzarobba Date: Thu, 9 Feb 2023 13:26:45 +0100 Subject: [PATCH 382/751] #27428 fix use of sig_on()/sig_off() in CBF.integral() using undocumented cysignal functions sig_block()/sig_unblock(), based on Jeroen Demeyer's indications[1] [1] /~https://github.com/sagemath/sage/issues/27428#issuecomment-1418024759 --- src/sage/rings/complex_arb.pyx | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/src/sage/rings/complex_arb.pyx b/src/sage/rings/complex_arb.pyx index 797f5122d40..f17ff37893c 100644 --- a/src/sage/rings/complex_arb.pyx +++ b/src/sage/rings/complex_arb.pyx @@ -145,7 +145,7 @@ Classes and Methods import operator import sys import warnings -from cysignals.signals cimport sig_on, sig_str, sig_off, sig_error +from cysignals.signals cimport sig_on, sig_str, sig_off, sig_error, sig_block, sig_unblock import sage.categories.fields @@ -284,27 +284,27 @@ cdef int acb_calc_func_callback(acb_ptr out, const acb_t inp, void * param, """ cdef IntegrationContext ctx cdef ComplexBall x - sig_off() + sig_block() try: ctx = param if ctx.exn_type is not None or order >= 2: acb_indeterminate(out) return 0 - x = ComplexBall.__new__(ComplexBall) - assert prec == ctx.parent._prec - x._parent = ctx.parent - acb_set(x.value, inp) try: + x = ComplexBall.__new__(ComplexBall) + assert prec == ctx.parent._prec + x._parent = ctx.parent + acb_set(x.value, inp) y = ctx.f(x, (order == 1)) if not isinstance(y, ComplexBall): y = ctx.parent.coerce(y) acb_set(out, ( y).value) - except Exception: + except BaseException: ctx.exn_type, ctx.exn_obj, ctx.exn_tb = sys.exc_info() acb_indeterminate(out) return 0 finally: - sig_on() + sig_unblock() class ComplexBallField(UniqueRepresentation, sage.rings.abc.ComplexBallField): @@ -1175,6 +1175,14 @@ class ComplexBallField(UniqueRepresentation, sage.rings.abc.ComplexBallField): sage: ComplexBallField(100).integral(lambda x, _: sin(x), RBF(0), RBF(1)) [0.4596976941318602825990633926 +/- ...e-29] + + sage: from cysignals.alarm import alarm + sage: alarm(0.1r) + sage: C = ComplexBallField(1000000) + sage: C.integral(lambda x, _: x.cos() * x.sin(), 0, 1) + Traceback (most recent call last): + ... + AlarmInterrupt """ cdef IntegrationContext ctx = IntegrationContext() cdef acb_calc_integrate_opt_t arb_opts From 6e5e52ea2eb50d47be1b6b92027151ef88988ded Mon Sep 17 00:00:00 2001 From: Sanjay Rijal <37138338+zovelsanj@users.noreply.github.com> Date: Fri, 10 Feb 2023 20:45:20 +0545 Subject: [PATCH 383/751] updated sage installation method with pip Added sage library installation instructions using pip. Installing sage in a python virtual environment can be troublesome as `sage` and `sagemath` libraries, not at all related to this sage, exist in PiPy. --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 1a0582d87c5..38cf9271134 100644 --- a/README.md +++ b/README.md @@ -394,6 +394,18 @@ in the Installation Guide. or JupyterLab installation, as described in [section "Launching SageMath"](https://doc.sagemath.org/html/en/installation/launching.html) in the installation manual. + +Alternative Installation using PiPy +--------------- + +You can find `sage` and `sagemath` pip packages but it is worth nothing that they are not at all realted to this `sage`. Indeed `pip install sage` installs `sage 0.0.0` which is literally an empty package. For installation of this `sage` you need to install `sagemath-standard`. First activate your python virtual environment and follow these steps: + + $ python3 -m pip install sage_conf + $ ls $(sage-config SAGE_SPKG_WHEELS) + $ python3 -m pip install $(sage-config SAGE_SPKG_WHEELS)/*.whl + $ python3 -m pip install sagemath-standard + +You need to install the `sage_conf`, a wheelhouse of various python packages. You can list the wheels using `ls $(sage-config SAGE_SPKG_WHEELS)`. After manual installation of these wheels you can install the sage library, `sagemath-standard`. Troubleshooting --------------- From 7eff8f6072154edd9a19b09199b6d41417aafdf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Fri, 10 Feb 2023 20:36:25 +0100 Subject: [PATCH 384/751] removing some unused imports --- .../finite_dimensional_algebra_element.pxd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd b/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd index e5f098c67d7..3230f283da8 100644 --- a/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd +++ b/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd @@ -1,4 +1,4 @@ -from sage.structure.element cimport AlgebraElement, Element, Vector, parent +from sage.structure.element cimport AlgebraElement, Vector from sage.matrix.matrix cimport Matrix cdef class FiniteDimensionalAlgebraElement(AlgebraElement): From b5cebda49aeb6de0c0b27b8647766d0e74b2d4da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Fri, 10 Feb 2023 21:11:48 +0100 Subject: [PATCH 385/751] add back import --- .../finite_dimensional_algebra_element.pxd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd b/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd index 3230f283da8..c13b8dbab07 100644 --- a/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd +++ b/src/sage/algebras/finite_dimensional_algebras/finite_dimensional_algebra_element.pxd @@ -1,4 +1,4 @@ -from sage.structure.element cimport AlgebraElement, Vector +from sage.structure.element cimport AlgebraElement, Element, Vector from sage.matrix.matrix cimport Matrix cdef class FiniteDimensionalAlgebraElement(AlgebraElement): From 52b23a4fc02b89cfe61e3f24045ce14cefed76d0 Mon Sep 17 00:00:00 2001 From: "Alex J. Best" Date: Fri, 10 Feb 2023 16:24:49 +0100 Subject: [PATCH 386/751] bump eclib to 20221012 --- build/pkgs/eclib/checksums.ini | 6 +++--- build/pkgs/eclib/package-version.txt | 2 +- build/pkgs/eclib/spkg-configure.m4 | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/pkgs/eclib/checksums.ini b/build/pkgs/eclib/checksums.ini index 8154d34c1ba..ddf84c8173f 100644 --- a/build/pkgs/eclib/checksums.ini +++ b/build/pkgs/eclib/checksums.ini @@ -1,5 +1,5 @@ tarball=eclib-VERSION.tar.bz2 -sha1=2e86bc02e43edfb43473ecb1ae8e7b67cfe87e3c -md5=bb6fc7cb57c01c45a033276e1a94028f -cksum=3974905173 +sha1=7c8b64bd9a1b8f4f489690a53c1f329afc953f2c +md5=03a87ae2b490f11b81ec6b305cbc8087 +cksum=111064162 upstream_url=/~https://github.com/JohnCremona/eclib/releases/download/VERSION/eclib-VERSION.tar.bz2 diff --git a/build/pkgs/eclib/package-version.txt b/build/pkgs/eclib/package-version.txt index 774b03215ac..6f50c16be9c 100644 --- a/build/pkgs/eclib/package-version.txt +++ b/build/pkgs/eclib/package-version.txt @@ -1 +1 @@ -20220621 +20221012 diff --git a/build/pkgs/eclib/spkg-configure.m4 b/build/pkgs/eclib/spkg-configure.m4 index 471f40e0aee..2d8d19a7e6e 100644 --- a/build/pkgs/eclib/spkg-configure.m4 +++ b/build/pkgs/eclib/spkg-configure.m4 @@ -1,7 +1,7 @@ SAGE_SPKG_CONFIGURE([eclib], [ SAGE_SPKG_DEPCHECK([ntl pari flint], [ dnl Trac #31443, #34029: use existing eclib only if the version reported by pkg-config is correct - m4_pushdef([SAGE_ECLIB_VER],["20220621"]) + m4_pushdef([SAGE_ECLIB_VER],["20221012"]) PKG_CHECK_MODULES([ECLIB], [eclib = SAGE_ECLIB_VER], [ AC_CACHE_CHECK([for mwrank version == SAGE_ECLIB_VER], [ac_cv_path_MWRANK], [ AC_PATH_PROGS_FEATURE_CHECK([MWRANK], [mwrank], [ From e78344c1c384b353924bc1a8d0a86a71778f15f5 Mon Sep 17 00:00:00 2001 From: Alex J Best Date: Fri, 10 Feb 2023 22:47:30 +0000 Subject: [PATCH 387/751] conform to doc requirements so that the docs look beautiful --- src/sage/algebras/free_algebra_quotient.py | 2 ++ src/sage/algebras/iwahori_hecke_algebra.py | 2 ++ .../algebras/quatalg/quaternion_algebra.py | 4 ++-- src/sage/categories/cartesian_product.py | 2 +- src/sage/categories/domains.py | 24 +++++++++---------- src/sage/categories/examples/sets_cat.py | 2 +- src/sage/categories/magmas.py | 2 ++ src/sage/coding/abstract_code.py | 8 +++---- .../coding/guruswami_sudan/interpolation.py | 2 +- src/sage/coding/linear_code_no_metric.py | 2 +- src/sage/combinat/colored_permutations.py | 2 ++ src/sage/combinat/ordered_tree.py | 2 +- src/sage/combinat/permutation.py | 4 ++-- src/sage/combinat/posets/hasse_diagram.py | 2 +- src/sage/combinat/root_system/type_affine.py | 2 +- src/sage/combinat/sf/dual.py | 2 +- src/sage/combinat/sf/sfa.py | 2 +- src/sage/combinat/subset.py | 4 ++-- src/sage/combinat/tableau.py | 2 +- src/sage/combinat/words/paths.py | 2 +- src/sage/functions/special.py | 2 +- src/sage/game_theory/normal_form_game.py | 4 ++-- src/sage/geometry/cone.py | 2 +- src/sage/geometry/fan.py | 2 +- src/sage/geometry/lattice_polytope.py | 2 +- src/sage/geometry/newton_polygon.py | 4 +++- src/sage/geometry/polyhedron/base3.py | 2 +- src/sage/geometry/polyhedron/base_QQ.py | 2 +- src/sage/graphs/generic_graph.py | 6 ++--- src/sage/groups/perm_gps/permgroup.py | 4 ++-- src/sage/groups/perm_gps/permgroup_named.py | 2 +- src/sage/interfaces/expect.py | 18 ++++---------- src/sage/interfaces/frobby.py | 2 +- src/sage/interfaces/interface.py | 2 +- src/sage/interfaces/quit.py | 2 +- src/sage/interfaces/r.py | 4 ++-- src/sage/interfaces/tides.py | 2 ++ src/sage/manifolds/utilities.py | 2 +- src/sage/matroids/constructor.py | 2 +- src/sage/misc/bindable_class.py | 2 +- src/sage/misc/decorators.py | 2 +- src/sage/misc/functional.py | 2 +- src/sage/misc/misc.py | 2 +- .../modform_hecketriangle/abstract_space.py | 2 +- .../modform_hecketriangle/analytic_type.py | 8 ++++--- src/sage/modules/fg_pid/fgp_element.py | 2 +- src/sage/modules/torsion_quadratic_module.py | 2 +- src/sage/numerical/linear_tensor.py | 2 +- src/sage/plot/plot3d/plot3d.py | 2 +- src/sage/quadratic_forms/genera/genus.py | 2 +- src/sage/quivers/morphism.py | 2 +- .../repl/ipython_kernel/widgets_sagenb.py | 4 ++-- src/sage/rings/lazy_series.py | 2 +- src/sage/rings/number_field/number_field.py | 6 ++--- .../number_field/number_field_ideal_rel.py | 2 +- src/sage/rings/number_field/structure.py | 2 +- src/sage/rings/padics/CR_template.pxi | 6 ++--- src/sage/rings/padics/factory.py | 2 +- src/sage/rings/padics/lattice_precision.py | 4 ++-- src/sage/rings/padics/padic_base_leaves.py | 6 ++--- .../rings/padics/padic_extension_generic.py | 2 +- .../rings/padics/padic_lattice_element.py | 2 +- src/sage/rings/padics/padic_valuation.py | 2 +- .../polynomial/infinite_polynomial_ring.py | 2 +- .../polynomial/laurent_polynomial_ideal.py | 2 ++ .../polynomial/laurent_polynomial_ring.py | 2 +- .../rings/polynomial/ore_function_element.py | 4 ++-- .../rings/polynomial/ore_function_field.py | 2 +- src/sage/rings/polynomial/pbori/ll.py | 2 ++ src/sage/rings/polynomial/polynomial_ring.py | 2 +- src/sage/rings/polynomial/term_order.py | 2 +- src/sage/schemes/affine/affine_morphism.py | 4 ++-- .../elliptic_curves/ell_finite_field.py | 2 +- .../schemes/elliptic_curves/hom_velusqrt.py | 2 +- src/sage/sets/finite_set_maps.py | 2 +- src/sage/sets/set.py | 2 +- src/sage/symbolic/operators.py | 2 ++ 77 files changed, 127 insertions(+), 115 deletions(-) diff --git a/src/sage/algebras/free_algebra_quotient.py b/src/sage/algebras/free_algebra_quotient.py index 583eb5f9ae8..4d5000b3df4 100644 --- a/src/sage/algebras/free_algebra_quotient.py +++ b/src/sage/algebras/free_algebra_quotient.py @@ -295,6 +295,8 @@ def module(self): """ The free module of the algebra. + EXAMPLES:: + sage: H = sage.algebras.free_algebra_quotient.hamilton_quatalg(QQ)[0]; H Free algebra quotient on 3 generators ('i', 'j', 'k') and dimension 4 over Rational Field sage: H.module() diff --git a/src/sage/algebras/iwahori_hecke_algebra.py b/src/sage/algebras/iwahori_hecke_algebra.py index 900039c7909..6df42729b70 100644 --- a/src/sage/algebras/iwahori_hecke_algebra.py +++ b/src/sage/algebras/iwahori_hecke_algebra.py @@ -2491,6 +2491,8 @@ def __init__(self, IHAlgebra, prefix=None): r""" Initialize the `A`-basis of the Iwahori-Hecke algebra ``IHAlgebra``. + EXAMPLES:: + sage: R. = LaurentPolynomialRing(QQ) sage: H = IwahoriHeckeAlgebra('A3', v**2) sage: A = H.A() diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py index 45a4d512c0a..0bca394c6a9 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra.py +++ b/src/sage/algebras/quatalg/quaternion_algebra.py @@ -1337,8 +1337,8 @@ def __init__(self, A, basis, check=True): sage: type(R) - Over QQ and number fields it is checked whether the given - basis actually gives an order (as a module over the maximal order): + Over QQ and number fields it is checked whether the given + basis actually gives an order (as a module over the maximal order):: sage: A. = QuaternionAlgebra(-1,-1) sage: A.quaternion_order([1,i,j,i-j]) diff --git a/src/sage/categories/cartesian_product.py b/src/sage/categories/cartesian_product.py index e6fbf670750..f61cca89629 100644 --- a/src/sage/categories/cartesian_product.py +++ b/src/sage/categories/cartesian_product.py @@ -155,7 +155,7 @@ def __call__(self, args, **kwds): sage: _.category() Category of Cartesian products of finite enumerated sets - Check that the empty product is handled correctly: + Check that the empty product is handled correctly:: sage: C = cartesian_product([]) sage: C diff --git a/src/sage/categories/domains.py b/src/sage/categories/domains.py index 2cdbb4cd2ce..c40f95ba880 100644 --- a/src/sage/categories/domains.py +++ b/src/sage/categories/domains.py @@ -57,18 +57,18 @@ def _test_zero_divisors(self, **options): In rings whose elements can not be represented exactly, there may be zero divisors in practice, even though these rings do not have them in theory. For such inexact rings, these tests - are not performed: - - sage: R = ZpFM(5); R - 5-adic Ring of fixed modulus 5^20 - sage: R.is_exact() - False - sage: a = R(5^19) - sage: a.is_zero() - False - sage: (a*a).is_zero() - True - sage: R._test_zero_divisors() + are not performed:: + + sage: R = ZpFM(5); R + 5-adic Ring of fixed modulus 5^20 + sage: R.is_exact() + False + sage: a = R(5^19) + sage: a.is_zero() + False + sage: (a*a).is_zero() + True + sage: R._test_zero_divisors() EXAMPLES:: diff --git a/src/sage/categories/examples/sets_cat.py b/src/sage/categories/examples/sets_cat.py index 93cc264580d..111fd9f3a2c 100644 --- a/src/sage/categories/examples/sets_cat.py +++ b/src/sage/categories/examples/sets_cat.py @@ -160,7 +160,7 @@ class PrimeNumbers_Abstract(UniqueRepresentation, Parent): datastructure will then be constructed by inheriting from :class:`PrimeNumbers_Abstract`. - This is used by: + This is used by:: sage: P = Sets().example("facade") sage: P = Sets().example("inherits") diff --git a/src/sage/categories/magmas.py b/src/sage/categories/magmas.py index 975ea0491b3..43327b13de6 100644 --- a/src/sage/categories/magmas.py +++ b/src/sage/categories/magmas.py @@ -711,6 +711,8 @@ def one(self): r""" Return the unit element of ``self``. + EXAMPLES:: + sage: from sage.combinat.root_system.extended_affine_weyl_group import ExtendedAffineWeylGroup sage: PvW0 = ExtendedAffineWeylGroup(['A',2,1]).PvW0() sage: PvW0 in Magmas().Unital().Realizations() diff --git a/src/sage/coding/abstract_code.py b/src/sage/coding/abstract_code.py index 238a165c021..c041e8d0eb2 100644 --- a/src/sage/coding/abstract_code.py +++ b/src/sage/coding/abstract_code.py @@ -337,7 +337,7 @@ def __iter__(self): ....: super().__init__(10) We check we get a sensible error message while asking for an - iterator over the elements of our new class: + iterator over the elements of our new class:: sage: C = MyCode() sage: list(C) @@ -365,7 +365,7 @@ def __contains__(self, c): ....: super().__init__(length) We check we get a sensible error message while asking if an element is - in our new class: + in our new class:: sage: C = MyCode(3) sage: vector((1, 0, 0, 0, 0, 1, 1)) in C @@ -461,7 +461,7 @@ def _repr_(self): ....: super().__init__(10) We check we get a sensible error message while asking for a string - representation of an instance of our new class: + representation of an instance of our new class:: sage: C = MyCode() sage: C #random @@ -489,7 +489,7 @@ def _latex_(self): ....: super().__init__(10) We check we get a sensible error message while asking for a string - representation of an instance of our new class: + representation of an instance of our new class:: sage: C = MyCode() sage: latex(C) diff --git a/src/sage/coding/guruswami_sudan/interpolation.py b/src/sage/coding/guruswami_sudan/interpolation.py index e1f9755faa3..77eba69c5c3 100644 --- a/src/sage/coding/guruswami_sudan/interpolation.py +++ b/src/sage/coding/guruswami_sudan/interpolation.py @@ -184,7 +184,7 @@ def _interpolation_matrix_problem(points, tau, parameters, wy): EXAMPLES: The following parameters arise from Guruswami-Sudan decoding of an [6,2,5] - GRS code over F(11) with multiplicity 2 and list size 4. + GRS code over F(11) with multiplicity 2 and list size 4.:: sage: from sage.coding.guruswami_sudan.interpolation import _interpolation_matrix_problem sage: F = GF(11) diff --git a/src/sage/coding/linear_code_no_metric.py b/src/sage/coding/linear_code_no_metric.py index 9610c4e31ce..932ad7ad937 100644 --- a/src/sage/coding/linear_code_no_metric.py +++ b/src/sage/coding/linear_code_no_metric.py @@ -538,7 +538,7 @@ def systematic_generator_matrix(self, systematic_positions=None): [1 2 0 1] [0 0 1 2] - Specific systematic positions can also be requested: + Specific systematic positions can also be requested:: sage: C.systematic_generator_matrix(systematic_positions=[3,2]) [1 2 0 1] diff --git a/src/sage/combinat/colored_permutations.py b/src/sage/combinat/colored_permutations.py index 4ace496fbdb..b5907c5859d 100644 --- a/src/sage/combinat/colored_permutations.py +++ b/src/sage/combinat/colored_permutations.py @@ -87,6 +87,8 @@ def __len__(self): """ Return the length of the one line form of ``self``. + EXAMPLES:: + sage: C = ColoredPermutations(2, 3) sage: s1,s2,t = C.gens() sage: len(s1) diff --git a/src/sage/combinat/ordered_tree.py b/src/sage/combinat/ordered_tree.py index fce1668bd22..702b83cb051 100644 --- a/src/sage/combinat/ordered_tree.py +++ b/src/sage/combinat/ordered_tree.py @@ -224,7 +224,7 @@ def _auto_parent(cls): .. NOTE:: - It is possible to bypass the automatic parent mechanism using: + It is possible to bypass the automatic parent mechanism using:: sage: t1 = OrderedTree.__new__(OrderedTree, Parent(), []) sage: t1.__init__(Parent(), []) diff --git a/src/sage/combinat/permutation.py b/src/sage/combinat/permutation.py index e64650bde6e..e35ee0c893e 100644 --- a/src/sage/combinat/permutation.py +++ b/src/sage/combinat/permutation.py @@ -4271,7 +4271,7 @@ def permutohedron_join(self, other, side="right") -> Permutation: sage: p.permutohedron_join(p) [1] - The left permutohedron: + The left permutohedron:: sage: p = Permutation([3,1,2]) sage: q = Permutation([1,3,2]) @@ -4387,7 +4387,7 @@ def permutohedron_meet(self, other, side="right") -> Permutation: sage: p.permutohedron_meet(p) [1] - The left permutohedron: + The left permutohedron:: sage: p = Permutation([3,1,2]) sage: q = Permutation([1,3,2]) diff --git a/src/sage/combinat/posets/hasse_diagram.py b/src/sage/combinat/posets/hasse_diagram.py index d857092f9c7..778253d0807 100644 --- a/src/sage/combinat/posets/hasse_diagram.py +++ b/src/sage/combinat/posets/hasse_diagram.py @@ -1994,7 +1994,7 @@ def orthocomplementations_iterator(self): [] Unique orthocomplementations; second is not uniquely complemented, - but has only one orthocomplementation. + but has only one orthocomplementation:: sage: H = posets.BooleanLattice(4)._hasse_diagram # Uniquely complemented sage: len(list(H.orthocomplementations_iterator())) diff --git a/src/sage/combinat/root_system/type_affine.py b/src/sage/combinat/root_system/type_affine.py index 12bf38eb52a..5ce62dfb7be 100644 --- a/src/sage/combinat/root_system/type_affine.py +++ b/src/sage/combinat/root_system/type_affine.py @@ -51,7 +51,7 @@ class AmbientSpace(CombinatorialFreeModule): \delta,\delta\rangle=0` and similarly for the null coroot. In the current implementation, `\Lambda_0` and the null coroot - are identified: + are identified:: sage: L = RootSystem(["A",3,1]).ambient_space() sage: Lambda = L.fundamental_weights() diff --git a/src/sage/combinat/sf/dual.py b/src/sage/combinat/sf/dual.py index 77e8b439d8c..d4d19461701 100644 --- a/src/sage/combinat/sf/dual.py +++ b/src/sage/combinat/sf/dual.py @@ -214,7 +214,7 @@ def _self_to_dual(self, x): sage: h._self_to_dual(h([2,1]) + 3*h[1,1,1]) 21*m[1, 1, 1] + 11*m[2, 1] + 4*m[3] - This is for internal use only. Please use instead: + This is for internal use only. Please use instead:: sage: m(h([2,1]) + 3*h[1,1,1]) 21*m[1, 1, 1] + 11*m[2, 1] + 4*m[3] diff --git a/src/sage/combinat/sf/sfa.py b/src/sage/combinat/sf/sfa.py index b435764a746..19b67895169 100644 --- a/src/sage/combinat/sf/sfa.py +++ b/src/sage/combinat/sf/sfa.py @@ -501,7 +501,7 @@ def _repr_(self): sage: Sym.macdonald(q=1,t=3).P() Sym in the Macdonald P with q=1 and t=3 basis - Hall-Littlewood polynomials: + Hall-Littlewood polynomials:: sage: Sym.hall_littlewood().P() Sym in the Hall-Littlewood P basis diff --git a/src/sage/combinat/subset.py b/src/sage/combinat/subset.py index 5cae6958510..b4801b69e59 100644 --- a/src/sage/combinat/subset.py +++ b/src/sage/combinat/subset.py @@ -342,9 +342,9 @@ def cardinality(self): sage: Subsets(3).cardinality() 8 - TESTS:: + TESTS: - ``__len__`` should return a Python int. + ``__len__`` should return a Python int.:: sage: S = Subsets(Set([1,2,3])) sage: len(S) diff --git a/src/sage/combinat/tableau.py b/src/sage/combinat/tableau.py index 1105a3ea177..4a6bf8270f1 100644 --- a/src/sage/combinat/tableau.py +++ b/src/sage/combinat/tableau.py @@ -233,7 +233,7 @@ def __init__(self, parent, t, check=True): A tableau is shallowly immutable. See :trac:`15862`. The entries themselves may be mutable objects, though in that case the - resulting Tableau should be unhashable. + resulting Tableau should be unhashable.:: sage: T = Tableau([[1,2],[2]]) sage: t0 = T[0] diff --git a/src/sage/combinat/words/paths.py b/src/sage/combinat/words/paths.py index 3d0ee41a4c4..b579aeae1ae 100644 --- a/src/sage/combinat/words/paths.py +++ b/src/sage/combinat/words/paths.py @@ -384,7 +384,7 @@ def __init__(self, alphabet, steps): True If size of alphabet is twice the number of steps, then opposite - vectors are used for the second part of the alphabet. + vectors are used for the second part of the alphabet:: sage: WordPaths('abcd',[(2,1),(2,4)]) Word Paths over 4 steps diff --git a/src/sage/functions/special.py b/src/sage/functions/special.py index 56f96f2ef53..faa6a73cc7e 100644 --- a/src/sage/functions/special.py +++ b/src/sage/functions/special.py @@ -538,7 +538,7 @@ def _eval_(self, z, m): sage: elliptic_e(z, 1) elliptic_e(z, 1) - Here arccoth doesn't have 1 in its domain, so we just hold the expression: + Here arccoth doesn't have 1 in its domain, so we just hold the expression:: sage: elliptic_e(arccoth(1), x^2*e) elliptic_e(+Infinity, x^2*e) diff --git a/src/sage/game_theory/normal_form_game.py b/src/sage/game_theory/normal_form_game.py index 40b3365d5e3..f8cf43485b5 100644 --- a/src/sage/game_theory/normal_form_game.py +++ b/src/sage/game_theory/normal_form_game.py @@ -2743,8 +2743,8 @@ def _is_degenerate_pure(self, certificate=False): sage: g._is_degenerate_pure() True - Whilst this game is not degenerate in pure strategies, it is - actually degenerate, but only in mixed strategies. + Whilst this game is not degenerate in pure strategies, it is + actually degenerate, but only in mixed strategies:: sage: A = matrix([[3, 0], [0, 3], [1.5, 1.5]]) sage: B = matrix([[4, 3], [2, 6], [3, 1]]) diff --git a/src/sage/geometry/cone.py b/src/sage/geometry/cone.py index 3d9cb0766fc..6cd764bacbc 100644 --- a/src/sage/geometry/cone.py +++ b/src/sage/geometry/cone.py @@ -6369,7 +6369,7 @@ def random_cone(lattice=None, min_ambient_dim=0, max_ambient_dim=None, TESTS: It's hard to test the output of a random process, but we can at - least make sure that we get a cone back. + least make sure that we get a cone back:: sage: from sage.geometry.cone import is_Cone sage: K = random_cone(max_ambient_dim=6, max_rays=10) diff --git a/src/sage/geometry/fan.py b/src/sage/geometry/fan.py index 26d814fb437..cd8041262a4 100644 --- a/src/sage/geometry/fan.py +++ b/src/sage/geometry/fan.py @@ -1390,7 +1390,7 @@ def _compute_cone_lattice(self): We use different algorithms depending on available information. One of the common cases is a fan which is KNOWN to be complete, i.e. we do - not even need to check if it is complete. + not even need to check if it is complete:: sage: fan = toric_varieties.P1xP1().fan() # optional - palp sage: fan.cone_lattice() # indirect doctest # optional - palp diff --git a/src/sage/geometry/lattice_polytope.py b/src/sage/geometry/lattice_polytope.py index 0b30f206cbe..0c762ad771c 100644 --- a/src/sage/geometry/lattice_polytope.py +++ b/src/sage/geometry/lattice_polytope.py @@ -3783,7 +3783,7 @@ def points(self, *args, **kwds): M( 0, 0, 0) in 3-d lattice M - Only two of the above points: + Only two of the above points:: sage: p.points(1, 3) # optional - palp M(0, 1, 0), diff --git a/src/sage/geometry/newton_polygon.py b/src/sage/geometry/newton_polygon.py index 4f253741ab7..0ec4bcb560e 100644 --- a/src/sage/geometry/newton_polygon.py +++ b/src/sage/geometry/newton_polygon.py @@ -630,13 +630,15 @@ def __init__(self): """ Parent class for all Newton polygons. + EXAMPLES:: + sage: from sage.geometry.newton_polygon import ParentNewtonPolygon sage: ParentNewtonPolygon() Parent for Newton polygons TESTS: - This class is a singleton. + This class is a singleton.:: sage: ParentNewtonPolygon() is ParentNewtonPolygon() True diff --git a/src/sage/geometry/polyhedron/base3.py b/src/sage/geometry/polyhedron/base3.py index 32a335ce586..5c160c907f6 100644 --- a/src/sage/geometry/polyhedron/base3.py +++ b/src/sage/geometry/polyhedron/base3.py @@ -604,7 +604,7 @@ def face_generator(self, face_dimension=None, algorithm=None, **kwds): A 1-dimensional face of a Polyhedron in ZZ^4 defined as the convex hull of 2 vertices, A 1-dimensional face of a Polyhedron in ZZ^4 defined as the convex hull of 2 vertices] - Check that we catch incorrect algorithms: + Check that we catch incorrect algorithms:: sage: list(P.face_generator(2, algorithm='integrate'))[:4] Traceback (most recent call last): diff --git a/src/sage/geometry/polyhedron/base_QQ.py b/src/sage/geometry/polyhedron/base_QQ.py index 0efcb15f1a2..c94b087a11d 100644 --- a/src/sage/geometry/polyhedron/base_QQ.py +++ b/src/sage/geometry/polyhedron/base_QQ.py @@ -119,7 +119,7 @@ def integral_points_count(self, verbose=False, use_Hrepresentation=False, 27 We enlarge the polyhedron to force the use of the generating function methods - implemented in LattE integrale, rather than explicit enumeration. + implemented in LattE integrale, rather than explicit enumeration:: sage: (1000000000*P).integral_points_count(verbose=True) # optional - latte_int This is LattE integrale... diff --git a/src/sage/graphs/generic_graph.py b/src/sage/graphs/generic_graph.py index fa48183ecc4..03ab9b57b53 100644 --- a/src/sage/graphs/generic_graph.py +++ b/src/sage/graphs/generic_graph.py @@ -5605,7 +5605,7 @@ def layout_planar(self, set_embedding=False, on_embedding=None, sage: g.layout(layout='planar', external_face=(3,1)) {0: [2, 1], 1: [0, 2], 2: [1, 1], 3: [1, 0]} - Choose the embedding: + Choose the embedding:: sage: H = graphs.LadderGraph(4) sage: em = {0:[1,4], 4:[0,5], 1:[5,2,0], 5:[4,6,1], 2:[1,3,6], 6:[7,5,2], 3:[7,2], 7:[3,6]} @@ -6356,7 +6356,7 @@ def num_faces(self, embedding=None): ... ValueError: no embedding is provided and the graph is not planar - Ticket :trac:`22003` is fixed: + Ticket :trac:`22003` is fixed:: sage: Graph(1).num_faces() 1 @@ -20622,7 +20622,7 @@ def plot(self, **options): 9: (0.47..., 0.15...)} sage: P = G.plot(save_pos=True, layout='spring') - The following illustrates the format of a position dictionary. + The following illustrates the format of a position dictionary:: sage: G.get_pos() # currently random across platforms, see #9593 {0: [1.17..., -0.855...], diff --git a/src/sage/groups/perm_gps/permgroup.py b/src/sage/groups/perm_gps/permgroup.py index ebdf7c4c6eb..bca0c00d843 100644 --- a/src/sage/groups/perm_gps/permgroup.py +++ b/src/sage/groups/perm_gps/permgroup.py @@ -654,7 +654,7 @@ def gap(self): TESTS: - see that this method does not harm pickling: + see that this method does not harm pickling:: sage: A4 = PermutationGroup([[(1,2,3)],[(2,3,4)]]) sage: A4.gap() @@ -662,7 +662,7 @@ def gap(self): sage: TestSuite(A4).run() the following test shows, that support for the ``self._libgap`` - attribute is needed in the constructor of the class: + attribute is needed in the constructor of the class:: sage: PG = PGU(6,2) sage: g, h = PG.gens() diff --git a/src/sage/groups/perm_gps/permgroup_named.py b/src/sage/groups/perm_gps/permgroup_named.py index a3be9f974fe..879c36a3764 100644 --- a/src/sage/groups/perm_gps/permgroup_named.py +++ b/src/sage/groups/perm_gps/permgroup_named.py @@ -599,7 +599,7 @@ def algebra(self, base_ring, category=None): Category of finite dimensional unital cellular semigroup algebras over Rational Field - In the following case, a usual group algebra is returned: + In the following case, a usual group algebra is returned:: sage: S = SymmetricGroup([2,3,5]) sage: S.algebra(QQ) diff --git a/src/sage/interfaces/expect.py b/src/sage/interfaces/expect.py index 8903a454df5..58802e8aeb0 100644 --- a/src/sage/interfaces/expect.py +++ b/src/sage/interfaces/expect.py @@ -1181,15 +1181,13 @@ def _expect_expr(self, expr=None, timeout=None): sage: singular._sendstr('def abc = 10 + 15;\n') Then we tell singular to print 10, which is an arbitrary number - different from the expected result 35. + different from the expected result 35:: sage: singular._sendstr('10;\n') Here an exception is raised because 25 hasn't appeared yet in the output stream. The key thing is that this doesn't lock, but instead - quickly raises an exception. - - :: + quickly raises an exception:: sage: t = walltime() sage: try: @@ -1203,21 +1201,15 @@ def _expect_expr(self, expr=None, timeout=None): sage: w = walltime(t); 0.3 < w < 10 True - We tell Singular to print abc, which equals 25. - - :: + We tell Singular to print abc, which equals 25:: sage: singular._sendstr('abc;\n') - Now 25 is in the output stream, so we can wait for it. - - :: + Now 25 is in the output stream, so we can wait for it:: sage: singular._expect_expr('25') - This gives us everything before the 25, including the 10 we printed earlier. - - :: + This gives us everything before the 25, including the 10 we printed earlier:: sage: singular._expect.before.decode('ascii') '...10\r\n> ' diff --git a/src/sage/interfaces/frobby.py b/src/sage/interfaces/frobby.py index 9f514422528..21668a48d31 100644 --- a/src/sage/interfaces/frobby.py +++ b/src/sage/interfaces/frobby.py @@ -123,7 +123,7 @@ def alexander_dual(self, monomial_ideal): True We see how it is much faster to compute this with frobby than the built-in - procedure for simplicial complexes. + procedure for simplicial complexes:: sage: t=simplicial_complexes.PoincareHomologyThreeSphere() # optional - frobby sage: R=PolynomialRing(QQ,16,'x') # optional - frobby diff --git a/src/sage/interfaces/interface.py b/src/sage/interfaces/interface.py index 5ed25e6138d..876f8e8824c 100644 --- a/src/sage/interfaces/interface.py +++ b/src/sage/interfaces/interface.py @@ -880,7 +880,7 @@ def _reduce(self): `"'abc'"` instead. That is dependant on the Elements `is_string` function to be implemented correctly. This has gone wrong in the past and remained uncaught by the doctests because the original identifier was reused. This test makes sure - that does not happen again: + that does not happen again:: sage: a = r("'abc'") # optional - rpy2 sage: b = dumps(a) # optional - rpy2 diff --git a/src/sage/interfaces/quit.py b/src/sage/interfaces/quit.py index 3bbd3ae24d3..e068c324b13 100644 --- a/src/sage/interfaces/quit.py +++ b/src/sage/interfaces/quit.py @@ -149,7 +149,7 @@ def invalidate_all(): sage: b (invalid PARI/GP interpreter object -- The pari session in which this object was defined is no longer running.) - However the maxima and gp sessions should still work out, though with their state reset: + However the maxima and gp sessions should still work out, though with their state reset:: sage: a = maxima(2); b = gp(3) sage: a, b diff --git a/src/sage/interfaces/r.py b/src/sage/interfaces/r.py index 0eabaccecf7..0e0076a0cd6 100644 --- a/src/sage/interfaces/r.py +++ b/src/sage/interfaces/r.py @@ -512,7 +512,7 @@ def _lazy_init(self): sage: my_r._initialized # optional - rpy2 True - And on package import: + And on package import:: sage: my_r = R() # optional - rpy2 sage: my_r._initialized # optional - rpy2 @@ -521,7 +521,7 @@ def _lazy_init(self): sage: my_r._initialized # optional - rpy2 True - And when fetching help pages: + And when fetching help pages:: sage: my_r = R() # optional - rpy2 sage: my_r._initialized # optional - rpy2 diff --git a/src/sage/interfaces/tides.py b/src/sage/interfaces/tides.py index 906f95396e5..f09639dd849 100644 --- a/src/sage/interfaces/tides.py +++ b/src/sage/interfaces/tides.py @@ -356,6 +356,8 @@ def remove_constants(l1,l2): Given two lists, remove the entries in the first that are real constants, and also the corresponding elements in the second one. + EXAMPLES:: + sage: from sage.interfaces.tides import subexpressions_list, remove_constants sage: f(a)=[1+cos(7)*a] sage: l1, l2 = subexpressions_list(f) diff --git a/src/sage/manifolds/utilities.py b/src/sage/manifolds/utilities.py index de83d63326f..e082e2584af 100644 --- a/src/sage/manifolds/utilities.py +++ b/src/sage/manifolds/utilities.py @@ -1040,7 +1040,7 @@ def _latex_(self): sage: latex(ExpressionNice(fun)) \frac{\partial\,f_{x}}{\partial y} - If latex_name, it should be used in LaTeX output: + If latex_name, it should be used in LaTeX output:: sage: f = function('f_x', latex_name=r"{\cal F}")(x,y) sage: fun = f.diff(y) diff --git a/src/sage/matroids/constructor.py b/src/sage/matroids/constructor.py index 1fb2cd2b93e..dc5610f1536 100644 --- a/src/sage/matroids/constructor.py +++ b/src/sage/matroids/constructor.py @@ -360,7 +360,7 @@ def Matroid(groundset=None, data=None, **kwds): [0, 1, 2, 3] The GraphicMatroid object forces its graph to be connected. If a - disconnected graph is used as input, it will connect the components. + disconnected graph is used as input, it will connect the components:: sage: G1 = graphs.CycleGraph(3); G2 = graphs.DiamondGraph() sage: G = G1.disjoint_union(G2) diff --git a/src/sage/misc/bindable_class.py b/src/sage/misc/bindable_class.py index 92f57ef48cb..d995ad65fc8 100644 --- a/src/sage/misc/bindable_class.py +++ b/src/sage/misc/bindable_class.py @@ -160,7 +160,7 @@ class BoundClass(functools.partial): sage: c = x.Inner; c > - Introspection works, at least partially: + Introspection works, at least partially:: sage: sage_getdoc(c).strip() 'Some documentation for Outer.Inner' diff --git a/src/sage/misc/decorators.py b/src/sage/misc/decorators.py index dd9123f5004..d876634b027 100644 --- a/src/sage/misc/decorators.py +++ b/src/sage/misc/decorators.py @@ -389,7 +389,7 @@ def __call__(self, func): [('arrow_options', {'size': 5})] Demonstrate that the introspected argument specification of the - wrapped function is updated (see :trac:`9976`). + wrapped function is updated (see :trac:`9976`):: sage: from sage.misc.sageinspect import sage_getargspec sage: sage_getargspec(f) diff --git a/src/sage/misc/functional.py b/src/sage/misc/functional.py index 7d2ee692e13..356077005a7 100644 --- a/src/sage/misc/functional.py +++ b/src/sage/misc/functional.py @@ -1935,7 +1935,7 @@ def sqrt(x, *args, **kwds): sage: sqrt(2).n(prec=100) 1.4142135623730950488016887242 - Or one can input a numerical type. + Or one can input a numerical type:: sage: sqrt(2.) 1.41421356237310 diff --git a/src/sage/misc/misc.py b/src/sage/misc/misc.py index bae968c42f3..2089ff8ece2 100644 --- a/src/sage/misc/misc.py +++ b/src/sage/misc/misc.py @@ -1413,7 +1413,7 @@ def inject_variable(name, value, warn=True): sage: a 272 - That's because warn seem to not reissue twice the same warning: + That's because warn seem to not reissue twice the same warning:: sage: from warnings import warn sage: warn("blah") diff --git a/src/sage/modular/modform_hecketriangle/abstract_space.py b/src/sage/modular/modform_hecketriangle/abstract_space.py index efd12339000..c14a59f54d6 100644 --- a/src/sage/modular/modform_hecketriangle/abstract_space.py +++ b/src/sage/modular/modform_hecketriangle/abstract_space.py @@ -1963,7 +1963,7 @@ def construct_quasi_form(self, laurent_series, order_1=ZZ(0), check=True, ration sage: el == constructed_el True - If a q_basis is available the construction uses a different algorithm which we also check:: + If a q_basis is available the construction uses a different algorithm which we also check:: sage: basis = QF.q_basis(min_exp=-1) sage: QF(qexp) == constructed_el diff --git a/src/sage/modular/modform_hecketriangle/analytic_type.py b/src/sage/modular/modform_hecketriangle/analytic_type.py index 3b3b691e181..68adb2c513f 100644 --- a/src/sage/modular/modform_hecketriangle/analytic_type.py +++ b/src/sage/modular/modform_hecketriangle/analytic_type.py @@ -170,6 +170,8 @@ def analytic_name(self): r""" Return a string representation of the analytic type. + EXAMPLES:: + sage: from sage.modular.modform_hecketriangle.analytic_type import AnalyticType sage: AT = AnalyticType() sage: AT(["quasi", "weak"]).analytic_name() @@ -328,9 +330,9 @@ class AnalyticType(FiniteLatticePoset): sage: el.analytic_type() quasi modular - Similarly the type of the ring element ``el2 = E4/Delta - E6/Delta`` is - ``weakly holomorphic`` despite the fact that the sum (``el2``) describes - a function which is holomorphic at infinity. + Similarly the type of the ring element ``el2 = E4/Delta - E6/Delta`` is + ``weakly holomorphic`` despite the fact that the sum (``el2``) describes + a function which is holomorphic at infinity:: sage: from sage.modular.modform_hecketriangle.graded_ring import WeakModularFormsRing sage: x,y,z,d = var("x,y,z,d") diff --git a/src/sage/modules/fg_pid/fgp_element.py b/src/sage/modules/fg_pid/fgp_element.py index dadf8745f88..42ac52dfb38 100644 --- a/src/sage/modules/fg_pid/fgp_element.py +++ b/src/sage/modules/fg_pid/fgp_element.py @@ -156,7 +156,7 @@ def _add_(self, other): sage: 0 + x (1, 0) - We test canonical coercion from V and W. + We test canonical coercion from V and W.:: sage: Q.0 + V.0 (1, 8) diff --git a/src/sage/modules/torsion_quadratic_module.py b/src/sage/modules/torsion_quadratic_module.py index 3414c487a80..8268f7f6be2 100644 --- a/src/sage/modules/torsion_quadratic_module.py +++ b/src/sage/modules/torsion_quadratic_module.py @@ -850,7 +850,7 @@ def orthogonal_group(self, gens=None, check=False): [1 0 0] [0 0 1] - We compute the kernel of the action of the orthogonal group of `L` on the discriminant group. + We compute the kernel of the action of the orthogonal group of `L` on the discriminant group.:: sage: L = IntegralLattice('A4') sage: O = L.orthogonal_group() diff --git a/src/sage/numerical/linear_tensor.py b/src/sage/numerical/linear_tensor.py index 26d94b12cc6..34dc8e934ff 100644 --- a/src/sage/numerical/linear_tensor.py +++ b/src/sage/numerical/linear_tensor.py @@ -389,7 +389,7 @@ def _element_constructor_(self, x): sage: type(_) - Construct from scalar: + Construct from scalar:: sage: LT(123) # indirect doctest (123.0, 123.0) diff --git a/src/sage/plot/plot3d/plot3d.py b/src/sage/plot/plot3d/plot3d.py index 174765980f7..3771780f75d 100644 --- a/src/sage/plot/plot3d/plot3d.py +++ b/src/sage/plot/plot3d/plot3d.py @@ -248,7 +248,7 @@ def __init__(self, dep_var, indep_vars): Because the base :class:`_Coordinates` class automatically checks the initializing variables with the transform method, :class:`_Coordinates` - cannot be instantiated by itself. We test a subclass. + cannot be instantiated by itself. We test a subclass.:: sage: from sage.plot.plot3d.plot3d import _ArbitraryCoordinates as arb sage: x,y,z=var('x,y,z') diff --git a/src/sage/quadratic_forms/genera/genus.py b/src/sage/quadratic_forms/genera/genus.py index 0fc43f33c62..5451df7ae29 100644 --- a/src/sage/quadratic_forms/genera/genus.py +++ b/src/sage/quadratic_forms/genera/genus.py @@ -3045,7 +3045,7 @@ def representative(self): Genus symbol at 3: 1^3 3^1 A representative of ``g`` is not known yet. - Let us trigger its computation: + Let us trigger its computation:: sage: g.representative() [ 0 0 0 2] diff --git a/src/sage/quivers/morphism.py b/src/sage/quivers/morphism.py index b8bb25657eb..febc2c3136c 100644 --- a/src/sage/quivers/morphism.py +++ b/src/sage/quivers/morphism.py @@ -1108,7 +1108,7 @@ def algebraic_dual(self): Representation with dimension vector (5, 2, 1, 1, 4) The algebraic dual of an indecomposable projective is the indecomposable - projective of the same vertex in the opposite quiver. + projective of the same vertex in the opposite quiver.:: sage: Q.reverse().P(QQ, 4) Representation with dimension vector (5, 2, 1, 1, 4) diff --git a/src/sage/repl/ipython_kernel/widgets_sagenb.py b/src/sage/repl/ipython_kernel/widgets_sagenb.py index 76f4f52ac4a..01a2bc42d06 100644 --- a/src/sage/repl/ipython_kernel/widgets_sagenb.py +++ b/src/sage/repl/ipython_kernel/widgets_sagenb.py @@ -91,7 +91,7 @@ def input_box(default=None, label=None, type=None, width=80, height=1): 9 With a different ``type``, the text is evaluated and ``type`` is - called on it: + called on it:: sage: w = input_box("4+5", type=float) sage: w @@ -470,7 +470,7 @@ def selector(values, label=None, default=None, nrows=None, ncols=None, width=Non sage: selector([(1,"one"), (2,"two"), (3,"three")], buttons=True) ToggleButtons(options=(('one', 1), ('two', 2), ('three', 3)), value=1) - The values can be any kind of object: + The values can be any kind of object:: sage: selector([sin(x^2), GF(29), EllipticCurve('37a1')]) Dropdown(options=(sin(x^2), Finite Field of size 29, Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field), value=sin(x^2)) diff --git a/src/sage/rings/lazy_series.py b/src/sage/rings/lazy_series.py index e77b1a7cd2e..df73af12a9d 100644 --- a/src/sage/rings/lazy_series.py +++ b/src/sage/rings/lazy_series.py @@ -3975,7 +3975,7 @@ def derivative(self, *args): TESTS: - Check the derivative of the logarithm: + Check the derivative of the logarithm:: sage: L. = LazyLaurentSeriesRing(QQ) sage: -log(1-z).derivative() diff --git a/src/sage/rings/number_field/number_field.py b/src/sage/rings/number_field/number_field.py index 8c02fa8e494..01fa87fa306 100644 --- a/src/sage/rings/number_field/number_field.py +++ b/src/sage/rings/number_field/number_field.py @@ -1708,7 +1708,7 @@ def _element_constructor_(self, x, check=True): a^2 An error is raised when a PARI element with an incorrect - modulus is given: + modulus is given:: sage: K(pari("Mod(-5/3*q^2 + 5/3*q - 1/6, q^3 - 999)")) Traceback (most recent call last): @@ -8693,8 +8693,8 @@ def _subfields_helper(self, degree=0, name=None, both_maps=True, optimize=False) (Number Field in a0 with defining polynomial x^2 - 23 with a0 = -4.795831523312720?, -4.795831523312719) - If we take a different embedding of the large field, we get a - different embedding of the degree 2 subfield:: + If we take a different embedding of the large field, we get a + different embedding of the degree 2 subfield:: sage: K. = NumberField(x^4 - 23, embedding=-50) sage: L2, _, _ = K.subfields(2)[0]; L2, CDF(L2.gen()) # indirect doctest diff --git a/src/sage/rings/number_field/number_field_ideal_rel.py b/src/sage/rings/number_field/number_field_ideal_rel.py index 192c8f15034..1292219f843 100644 --- a/src/sage/rings/number_field/number_field_ideal_rel.py +++ b/src/sage/rings/number_field/number_field_ideal_rel.py @@ -170,7 +170,7 @@ def absolute_ideal(self, names = 'a'): sage: J.absolute_ideal().norm() 4 - Now pass 'm' as the name for the generator of the absolute field: + Now pass 'm' as the name for the generator of the absolute field:: sage: J.absolute_ideal('m') Fractional ideal (m^2) diff --git a/src/sage/rings/number_field/structure.py b/src/sage/rings/number_field/structure.py index f933affe775..52e6ed6d503 100644 --- a/src/sage/rings/number_field/structure.py +++ b/src/sage/rings/number_field/structure.py @@ -151,7 +151,7 @@ class NameChange(NumberFieldStructure): sage: NameChange(K) - Check for memory leaks: + Check for memory leaks:: sage: u=id(NumberField(x^2-5,'a').absolute_field('b')) sage: import gc diff --git a/src/sage/rings/padics/CR_template.pxi b/src/sage/rings/padics/CR_template.pxi index 1b3134f3195..73f87ed27e9 100644 --- a/src/sage/rings/padics/CR_template.pxi +++ b/src/sage/rings/padics/CR_template.pxi @@ -905,13 +905,13 @@ cdef class CRElement(pAdicTemplateElement): sage: b = R(0); b.add_bigoh(3) O(7^3) - The precision never increases:: + The precision never increases:: sage: R(4).add_bigoh(2).add_bigoh(4) 4 + O(7^2) - Another example that illustrates that the precision does - not increase:: + Another example that illustrates that the precision does + not increase:: sage: k = Qp(3,5) sage: a = k(1234123412/3^70); a diff --git a/src/sage/rings/padics/factory.py b/src/sage/rings/padics/factory.py index 044dcae0bed..67da897436c 100644 --- a/src/sage/rings/padics/factory.py +++ b/src/sage/rings/padics/factory.py @@ -3019,7 +3019,7 @@ def ZpER(p, prec=None, halt=None, secure=False, *args, **kwds): 40 However, both the default precision and the halting precision can be - customized at the creation of the parent as follows: + customized at the creation of the parent as follows:: sage: S = ZpER(5, prec=10, halt=100) sage: S.default_prec() diff --git a/src/sage/rings/padics/lattice_precision.py b/src/sage/rings/padics/lattice_precision.py index 6b1386e4121..407179f9e70 100644 --- a/src/sage/rings/padics/lattice_precision.py +++ b/src/sage/rings/padics/lattice_precision.py @@ -974,7 +974,7 @@ def precision_lattice(self, elements=None): [ 0 2048] If the precision module does not project to a lattice, - an error is raised. + an error is raised.:: sage: R = ZpLF(2, label='precision_lattice') sage: prec = R.precision() @@ -2689,7 +2689,7 @@ def precision_lattice(self, elements=None): [ 0 2048] If the precision module does not project to a lattice, - an error is raised. + an error is raised.:: sage: prec.precision_lattice([x, y, u, v]) Traceback (most recent call last): diff --git a/src/sage/rings/padics/padic_base_leaves.py b/src/sage/rings/padics/padic_base_leaves.py index f27a5db5a6c..0f0042032c5 100644 --- a/src/sage/rings/padics/padic_base_leaves.py +++ b/src/sage/rings/padics/padic_base_leaves.py @@ -904,7 +904,7 @@ def _coerce_map_from_(self, R): True Note that coerce map does not exist between ``p``-adic rings with - lattice precision and other ``p``-adic rings. + lattice precision and other ``p``-adic rings.:: sage: S = Zp(2) sage: R.has_coerce_map_from(S) @@ -913,7 +913,7 @@ def _coerce_map_from_(self, R): False Similarly there is no coercion maps between ``p``-adic rings with - different labels. + different labels.:: sage: R2 = ZpLC(2, label='coerce') sage: R.has_coerce_map_from(R2) @@ -1033,7 +1033,7 @@ def _coerce_map_from_(self, R): True Note that coerce map does not exist between ``p``-adic fields with - lattice precision and other ``p``-adic rings. + lattice precision and other ``p``-adic rings.:: sage: L = Qp(2) sage: K.has_coerce_map_from(L) diff --git a/src/sage/rings/padics/padic_extension_generic.py b/src/sage/rings/padics/padic_extension_generic.py index ff2d0a5ec6c..1d15f83caad 100644 --- a/src/sage/rings/padics/padic_extension_generic.py +++ b/src/sage/rings/padics/padic_extension_generic.py @@ -510,7 +510,7 @@ def construction(self, forbid_frac_field=False): sage: c(R0) == R True - For a field, by default we return a fraction field functor. + For a field, by default we return a fraction field functor.:: sage: K. = Qq(25, 8) sage: c, R = K.construction(); R diff --git a/src/sage/rings/padics/padic_lattice_element.py b/src/sage/rings/padics/padic_lattice_element.py index ace965211bf..5a195ca9b0f 100644 --- a/src/sage/rings/padics/padic_lattice_element.py +++ b/src/sage/rings/padics/padic_lattice_element.py @@ -1010,7 +1010,7 @@ def unit_part(self): sage: b.unit_part() 1 + 16*17 + O(17^3) - If the element is indistinguishable from zero, an error is raised. + If the element is indistinguishable from zero, an error is raised.:: sage: c = R(0, 5); c O(17^5) diff --git a/src/sage/rings/padics/padic_valuation.py b/src/sage/rings/padics/padic_valuation.py index 883e36f5c96..5af3e28d3e4 100644 --- a/src/sage/rings/padics/padic_valuation.py +++ b/src/sage/rings/padics/padic_valuation.py @@ -439,7 +439,7 @@ class pAdicValuation_base(DiscreteValuation): sage: QQ.valuation(5) 5-adic valuation - For `p`-adic rings, ``p`` has to match the `p` of the ring. + For `p`-adic rings, ``p`` has to match the `p` of the ring.:: sage: v = valuations.pAdicValuation(Zp(3), 2); v Traceback (most recent call last): diff --git a/src/sage/rings/polynomial/infinite_polynomial_ring.py b/src/sage/rings/polynomial/infinite_polynomial_ring.py index 1bc126c1e00..200414984a8 100644 --- a/src/sage/rings/polynomial/infinite_polynomial_ring.py +++ b/src/sage/rings/polynomial/infinite_polynomial_ring.py @@ -646,7 +646,7 @@ class InfinitePolynomialRing_sparse(CommutativeRing): sage: Z = InfinitePolynomialRing_sparse(QQ, ['x','y'], 'lex') Nevertheless, since infinite polynomial rings are supposed to be unique - parent structures, they do not evaluate equal. + parent structures, they do not evaluate equal.:: sage: Z == X False diff --git a/src/sage/rings/polynomial/laurent_polynomial_ideal.py b/src/sage/rings/polynomial/laurent_polynomial_ideal.py index 76d1b495274..0168a56e267 100644 --- a/src/sage/rings/polynomial/laurent_polynomial_ideal.py +++ b/src/sage/rings/polynomial/laurent_polynomial_ideal.py @@ -103,6 +103,8 @@ def set_hint(self, hint): to speed up computation of the associated ideal in some cases; normally the end user will have no need to work with it directly. + EXAMPLES:: + sage: P. = LaurentPolynomialRing(QQ, 3) sage: I = P.ideal([x^2*y + 3*x*y^2]) sage: I.hint() diff --git a/src/sage/rings/polynomial/laurent_polynomial_ring.py b/src/sage/rings/polynomial/laurent_polynomial_ring.py index c10faf46568..0ec8ecb15f7 100644 --- a/src/sage/rings/polynomial/laurent_polynomial_ring.py +++ b/src/sage/rings/polynomial/laurent_polynomial_ring.py @@ -731,7 +731,7 @@ def ideal(self, *args, **kwds): TESTS: - check that :trac:`26421` is fixed: + check that :trac:`26421` is fixed:: sage: R. = LaurentPolynomialRing(ZZ) sage: P. = PolynomialRing(R) diff --git a/src/sage/rings/polynomial/ore_function_element.py b/src/sage/rings/polynomial/ore_function_element.py index d21ed8d1ed4..0d2800665e0 100644 --- a/src/sage/rings/polynomial/ore_function_element.py +++ b/src/sage/rings/polynomial/ore_function_element.py @@ -845,7 +845,7 @@ def reduced_trace(self, var=None): 3/(z^2 + 2) The reduced trace lies in the center of `S`, which is the fraction field - of a univariate polynomial ring in the variable `z = x^3` over `GF(5)`. + of a univariate polynomial ring in the variable `z = x^3` over `GF(5)`.:: sage: tr.parent() Fraction Field of Univariate Polynomial Ring in z over Finite Field of size 5 @@ -906,7 +906,7 @@ def reduced_norm(self, var=None): (z + 2)/(z^2 + 4) The reduced norm lies in the center of `S`, which is the fraction field - of a univariate polynomial ring in the variable `z = x^3` over `GF(5)`. + of a univariate polynomial ring in the variable `z = x^3` over `GF(5)`.:: sage: N.parent() Fraction Field of Univariate Polynomial Ring in z over Finite Field of size 5 diff --git a/src/sage/rings/polynomial/ore_function_field.py b/src/sage/rings/polynomial/ore_function_field.py index f223f9799dd..34e6e2a6756 100644 --- a/src/sage/rings/polynomial/ore_function_field.py +++ b/src/sage/rings/polynomial/ore_function_field.py @@ -35,7 +35,7 @@ sage: g (d - 1/t)^(-1) * t -The left numerator and right denominator are accessible as follows: +The left numerator and right denominator are accessible as follows:: sage: g.left_numerator() t diff --git a/src/sage/rings/polynomial/pbori/ll.py b/src/sage/rings/polynomial/pbori/ll.py index b12985797a7..a48e7e2a84a 100644 --- a/src/sage/rings/polynomial/pbori/ll.py +++ b/src/sage/rings/polynomial/pbori/ll.py @@ -284,6 +284,8 @@ def invert(self, poly): r""" Inverted map to initial ring. + EXAMPLES:: + sage: from sage.rings.polynomial.pbori.pbori import * sage: from sage.rings.polynomial.pbori.blocks import declare_ring, Block sage: to_ring = declare_ring([Block("x", 10)], globals()) diff --git a/src/sage/rings/polynomial/polynomial_ring.py b/src/sage/rings/polynomial/polynomial_ring.py index bd34d113f5f..4759184cd83 100644 --- a/src/sage/rings/polynomial/polynomial_ring.py +++ b/src/sage/rings/polynomial/polynomial_ring.py @@ -1862,7 +1862,7 @@ def weil_polynomials(self, d, q, sign=1, lead=1): sage: all(p.is_weil_polynomial() for p in L) True - Setting multiple leading coefficients: + Setting multiple leading coefficients:: sage: R. = QQ[] sage: l = R.weil_polynomials(4,2,lead=((1,0),(2,4),(1,2))) diff --git a/src/sage/rings/polynomial/term_order.py b/src/sage/rings/polynomial/term_order.py index 6763f2016c7..613110a34eb 100644 --- a/src/sage/rings/polynomial/term_order.py +++ b/src/sage/rings/polynomial/term_order.py @@ -1790,7 +1790,7 @@ def singular_moreblocks(self): TESTS: The 'degneglex' ordering is somehow special: SINGULAR handles it - using an extra weight vector block. + using an extra weight vector block.:: sage: T = TermOrder("degneglex", 2) sage: P = PolynomialRing(QQ,2, names='x', order=T) diff --git a/src/sage/schemes/affine/affine_morphism.py b/src/sage/schemes/affine/affine_morphism.py index 32c2e47e494..0c489c65794 100644 --- a/src/sage/schemes/affine/affine_morphism.py +++ b/src/sage/schemes/affine/affine_morphism.py @@ -158,7 +158,7 @@ def __init__(self, parent, polys, check=True): Defn: Defined on coordinates by sending (x, y) to ((5*x^3 + 3*x*y^2 - y^3)/(x^3 - 1), (x^2*y + 3)/(x^3 - 1)) - If you pass in quotient ring elements, they are reduced:: + If you pass in quotient ring elements, they are reduced:: sage: A. = AffineSpace(QQ, 3) sage: X = A.subscheme([x-y]) @@ -171,7 +171,7 @@ def __init__(self, parent, polys, check=True): Defn: Defined on coordinates by sending (x, y, z) to (y, y, 2*y) - You must use the ambient space variables to create rational functions:: + You must use the ambient space variables to create rational functions:: sage: A. = AffineSpace(QQ, 3) sage: X = A.subscheme([x^2-y^2]) diff --git a/src/sage/schemes/elliptic_curves/ell_finite_field.py b/src/sage/schemes/elliptic_curves/ell_finite_field.py index 419c08cf9ca..65738e4c727 100644 --- a/src/sage/schemes/elliptic_curves/ell_finite_field.py +++ b/src/sage/schemes/elliptic_curves/ell_finite_field.py @@ -1062,7 +1062,7 @@ def is_isogenous(self, other, field=None, proof=True): ... ValueError: Curves have different base fields: use the field parameter. - When the field is given: + When the field is given:: sage: E1 = EllipticCurve(GF(13^2,'a'),[2,7]); E1 Elliptic Curve defined by y^2 = x^3 + 2*x + 7 over Finite Field in a of size 13^2 diff --git a/src/sage/schemes/elliptic_curves/hom_velusqrt.py b/src/sage/schemes/elliptic_curves/hom_velusqrt.py index 22ae56018a3..6ed7a5c3d15 100644 --- a/src/sage/schemes/elliptic_curves/hom_velusqrt.py +++ b/src/sage/schemes/elliptic_curves/hom_velusqrt.py @@ -515,7 +515,7 @@ def _point_outside_subgroup(P): ... ValueError: ECDLog problem has no solution (...) - An example where the group is non-cyclic: + An example where the group is non-cyclic:: sage: E. = EllipticCurve(GF(71^2), [0,1]) sage: E.abelian_group() diff --git a/src/sage/sets/finite_set_maps.py b/src/sage/sets/finite_set_maps.py index ce5029d8032..c4c9ab4540a 100644 --- a/src/sage/sets/finite_set_maps.py +++ b/src/sage/sets/finite_set_maps.py @@ -305,7 +305,7 @@ def an_element(self): An exception :class:`~sage.categories.sets_cat.EmptySetError` is raised if this set is empty, that is if the codomain is - empty and the domain is not. + empty and the domain is not.:: sage: M = FiniteSetMaps(4, 0) sage: M.cardinality() diff --git a/src/sage/sets/set.py b/src/sage/sets/set.py index b76e6b064ef..1796483222d 100644 --- a/src/sage/sets/set.py +++ b/src/sage/sets/set.py @@ -616,7 +616,7 @@ def __contains__(self, x): False Finite fields better illustrate the difference between - ``__contains__`` for objects and their underlying sets. + ``__contains__`` for objects and their underlying sets.:: sage: X = Set(GF(7)) sage: X diff --git a/src/sage/symbolic/operators.py b/src/sage/symbolic/operators.py index a48b0e8e393..2f700ea298f 100644 --- a/src/sage/symbolic/operators.py +++ b/src/sage/symbolic/operators.py @@ -169,6 +169,8 @@ def change_function(self, new): Return a new function derivative operator with the same parameter set but for a new function. + EXAMPLES:: + sage: from sage.symbolic.operators import FDerivativeOperator sage: f = function('foo') sage: b = function('bar') From a2f990133f9f22bff2bf94cfc226eab1f8d4d382 Mon Sep 17 00:00:00 2001 From: Sanjay Rijal <37138338+zovelsanj@users.noreply.github.com> Date: Sat, 11 Feb 2023 12:55:48 +0545 Subject: [PATCH 388/751] fixed spelling errors --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 38cf9271134..a525a5e8334 100644 --- a/README.md +++ b/README.md @@ -398,14 +398,14 @@ in the Installation Guide. Alternative Installation using PiPy --------------- -You can find `sage` and `sagemath` pip packages but it is worth nothing that they are not at all realted to this `sage`. Indeed `pip install sage` installs `sage 0.0.0` which is literally an empty package. For installation of this `sage` you need to install `sagemath-standard`. First activate your python virtual environment and follow these steps: +You can find `sage` and `sagemath` pip packages but it is worth noting that they are not at all related to this `sage`. Indeed `pip install sage` installs `sage 0.0.0` which is literally an empty package. For installation of this `sage` you need to install `sagemath-standard`. First, activate your python virtual environment and follow these steps: $ python3 -m pip install sage_conf $ ls $(sage-config SAGE_SPKG_WHEELS) $ python3 -m pip install $(sage-config SAGE_SPKG_WHEELS)/*.whl $ python3 -m pip install sagemath-standard -You need to install the `sage_conf`, a wheelhouse of various python packages. You can list the wheels using `ls $(sage-config SAGE_SPKG_WHEELS)`. After manual installation of these wheels you can install the sage library, `sagemath-standard`. +You need to install the `sage_conf`, a wheelhouse of various python packages. You can list the wheels using `ls $(sage-config SAGE_SPKG_WHEELS)`. After manual installation of these wheels, you can install the sage library, `sagemath-standard`. Troubleshooting --------------- From 279b54b81592d0d028a56b5fe6c95d84eb49c128 Mon Sep 17 00:00:00 2001 From: Sanjay Rijal <37138338+zovelsanj@users.noreply.github.com> Date: Sat, 11 Feb 2023 13:09:16 +0545 Subject: [PATCH 389/751] pip packages instructions added in note Fixed the pip installation instructions according to this [comment](/~https://github.com/sagemath/sage/pull/35070#discussion_r1103552497). --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a525a5e8334..8ce83ce1f36 100644 --- a/README.md +++ b/README.md @@ -398,7 +398,7 @@ in the Installation Guide. Alternative Installation using PiPy --------------- -You can find `sage` and `sagemath` pip packages but it is worth noting that they are not at all related to this `sage`. Indeed `pip install sage` installs `sage 0.0.0` which is literally an empty package. For installation of this `sage` you need to install `sagemath-standard`. First, activate your python virtual environment and follow these steps: +For installation of `sage` in python using `pip` you need to install `sagemath-standard`. First, activate your python virtual environment and follow these steps: $ python3 -m pip install sage_conf $ ls $(sage-config SAGE_SPKG_WHEELS) @@ -407,6 +407,8 @@ You can find `sage` and `sagemath` pip packages but it is worth noting that they You need to install the `sage_conf`, a wheelhouse of various python packages. You can list the wheels using `ls $(sage-config SAGE_SPKG_WHEELS)`. After manual installation of these wheels, you can install the sage library, `sagemath-standard`. +**NOTE:** You can find `sage` and `sagemath` pip packages but it is worth noting that they are not at all related to this `sage`. Indeed `pip install sage` installs `sage 0.0.0` which is literally an empty package. + Troubleshooting --------------- From 254a2f3c5feccb9322ef0a21f0a7b99074c95899 Mon Sep 17 00:00:00 2001 From: Sanjay Rijal <37138338+zovelsanj@users.noreply.github.com> Date: Sat, 11 Feb 2023 13:18:52 +0545 Subject: [PATCH 390/751] fixed typos changed `PiPy` to 'PyPi' --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ce83ce1f36..dbb4a2c63b6 100644 --- a/README.md +++ b/README.md @@ -395,7 +395,7 @@ in the Installation Guide. "Launching SageMath"](https://doc.sagemath.org/html/en/installation/launching.html) in the installation manual. -Alternative Installation using PiPy +Alternative Installation using PyPi --------------- For installation of `sage` in python using `pip` you need to install `sagemath-standard`. First, activate your python virtual environment and follow these steps: From d92cce3880c92767c9fd1078277ffcd53a298f3d Mon Sep 17 00:00:00 2001 From: Sanjay Rijal <37138338+zovelsanj@users.noreply.github.com> Date: Sat, 11 Feb 2023 13:40:52 +0545 Subject: [PATCH 391/751] fixed a typo changed PyPi tp PyPI --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index dbb4a2c63b6..5117319bcf3 100644 --- a/README.md +++ b/README.md @@ -395,7 +395,7 @@ in the Installation Guide. "Launching SageMath"](https://doc.sagemath.org/html/en/installation/launching.html) in the installation manual. -Alternative Installation using PyPi +Alternative Installation using PyPI --------------- For installation of `sage` in python using `pip` you need to install `sagemath-standard`. First, activate your python virtual environment and follow these steps: From d127e67922836c35530caa7d5cde82d8775964b9 Mon Sep 17 00:00:00 2001 From: Jonathan Kliem Date: Fri, 9 Dec 2022 14:51:18 +0100 Subject: [PATCH 392/751] fix: Update email adresses --- src/sage/data_structures/sparse_bitset.pxd | 2 +- src/sage/geometry/polyhedron/base.py | 2 +- src/sage/geometry/polyhedron/base0.py | 2 +- src/sage/geometry/polyhedron/base1.py | 2 +- src/sage/geometry/polyhedron/base2.py | 2 +- src/sage/geometry/polyhedron/base3.py | 2 +- src/sage/geometry/polyhedron/base4.py | 2 +- src/sage/geometry/polyhedron/base5.py | 2 +- src/sage/geometry/polyhedron/base6.py | 2 +- src/sage/geometry/polyhedron/base7.py | 2 +- src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx | 2 +- .../polyhedron/combinatorial_polyhedron/combinatorial_face.pyx | 2 +- .../polyhedron/combinatorial_polyhedron/conversions.pyx | 2 +- .../polyhedron/combinatorial_polyhedron/face_data_structure.pxd | 2 +- .../polyhedron/combinatorial_polyhedron/face_iterator.pyx | 2 +- .../combinatorial_polyhedron/face_list_data_structure.pxd | 2 +- .../combinatorial_polyhedron/face_list_data_structure.pyx | 2 +- .../polyhedron/combinatorial_polyhedron/list_of_faces.pyx | 2 +- .../combinatorial_polyhedron/polyhedron_face_lattice.pyx | 2 +- src/sage/graphs/generic_graph.py | 2 +- src/sage/rings/number_field/order.py | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/sage/data_structures/sparse_bitset.pxd b/src/sage/data_structures/sparse_bitset.pxd index 742ac26c6a5..9b95c55675b 100644 --- a/src/sage/data_structures/sparse_bitset.pxd +++ b/src/sage/data_structures/sparse_bitset.pxd @@ -6,7 +6,7 @@ This is a regular bitset to which we will add additional structure. In particular some representation of which limbs even contain data. """ # **************************************************************************** -# Copyright (C) 2020 Jonathan Kliem +# Copyright (C) 2020 Jonathan Kliem # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/sage/geometry/polyhedron/base.py b/src/sage/geometry/polyhedron/base.py index 77a11c53d21..66160608fa1 100644 --- a/src/sage/geometry/polyhedron/base.py +++ b/src/sage/geometry/polyhedron/base.py @@ -21,7 +21,7 @@ # Copyright (C) 2019 Julian Ritter # Copyright (C) 2019-2020 Laith Rastanawi # Copyright (C) 2019-2020 Sophia Elia -# Copyright (C) 2019-2021 Jonathan Kliem +# Copyright (C) 2019-2021 Jonathan Kliem # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/sage/geometry/polyhedron/base0.py b/src/sage/geometry/polyhedron/base0.py index 7ed7e777374..3f6f9d31f7a 100644 --- a/src/sage/geometry/polyhedron/base0.py +++ b/src/sage/geometry/polyhedron/base0.py @@ -21,7 +21,7 @@ # Copyright (C) 2019 Julian Ritter # Copyright (C) 2019-2020 Laith Rastanawi # Copyright (C) 2019-2020 Sophia Elia -# Copyright (C) 2019-2021 Jonathan Kliem +# Copyright (C) 2019-2021 Jonathan Kliem # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/sage/geometry/polyhedron/base1.py b/src/sage/geometry/polyhedron/base1.py index daac9aa6c05..9236996fb0a 100644 --- a/src/sage/geometry/polyhedron/base1.py +++ b/src/sage/geometry/polyhedron/base1.py @@ -24,7 +24,7 @@ # Copyright (C) 2019 Julian Ritter # Copyright (C) 2019-2020 Laith Rastanawi # Copyright (C) 2019-2020 Sophia Elia -# Copyright (C) 2019-2021 Jonathan Kliem +# Copyright (C) 2019-2021 Jonathan Kliem # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/sage/geometry/polyhedron/base2.py b/src/sage/geometry/polyhedron/base2.py index 9afeeaaef1f..6078d473a27 100644 --- a/src/sage/geometry/polyhedron/base2.py +++ b/src/sage/geometry/polyhedron/base2.py @@ -21,7 +21,7 @@ # Copyright (C) 2019 Julian Ritter # Copyright (C) 2019-2020 Laith Rastanawi # Copyright (C) 2019-2020 Sophia Elia -# Copyright (C) 2019-2021 Jonathan Kliem +# Copyright (C) 2019-2021 Jonathan Kliem # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/sage/geometry/polyhedron/base3.py b/src/sage/geometry/polyhedron/base3.py index 32a335ce586..7245c6addbb 100644 --- a/src/sage/geometry/polyhedron/base3.py +++ b/src/sage/geometry/polyhedron/base3.py @@ -23,7 +23,7 @@ # Copyright (C) 2019 Julian Ritter # Copyright (C) 2019-2020 Laith Rastanawi # Copyright (C) 2019-2020 Sophia Elia -# Copyright (C) 2019-2021 Jonathan Kliem +# Copyright (C) 2019-2021 Jonathan Kliem # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/sage/geometry/polyhedron/base4.py b/src/sage/geometry/polyhedron/base4.py index 7e8aeb32890..30da8c35733 100644 --- a/src/sage/geometry/polyhedron/base4.py +++ b/src/sage/geometry/polyhedron/base4.py @@ -24,7 +24,7 @@ # Copyright (C) 2019 Julian Ritter # Copyright (C) 2019-2020 Laith Rastanawi # Copyright (C) 2019-2020 Sophia Elia -# Copyright (C) 2019-2021 Jonathan Kliem +# Copyright (C) 2019-2021 Jonathan Kliem # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/sage/geometry/polyhedron/base5.py b/src/sage/geometry/polyhedron/base5.py index 04d1fa0314b..8d505175862 100644 --- a/src/sage/geometry/polyhedron/base5.py +++ b/src/sage/geometry/polyhedron/base5.py @@ -23,7 +23,7 @@ # Copyright (C) 2019 Julian Ritter # Copyright (C) 2019-2020 Laith Rastanawi # Copyright (C) 2019-2020 Sophia Elia -# Copyright (C) 2019-2021 Jonathan Kliem +# Copyright (C) 2019-2021 Jonathan Kliem # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/sage/geometry/polyhedron/base6.py b/src/sage/geometry/polyhedron/base6.py index 2dd1117ad79..0d0b715d863 100644 --- a/src/sage/geometry/polyhedron/base6.py +++ b/src/sage/geometry/polyhedron/base6.py @@ -21,7 +21,7 @@ # Copyright (C) 2019 Julian Ritter # Copyright (C) 2019-2020 Laith Rastanawi # Copyright (C) 2019-2020 Sophia Elia -# Copyright (C) 2019-2021 Jonathan Kliem +# Copyright (C) 2019-2021 Jonathan Kliem # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/sage/geometry/polyhedron/base7.py b/src/sage/geometry/polyhedron/base7.py index db828e2eb0a..a7da012ef18 100644 --- a/src/sage/geometry/polyhedron/base7.py +++ b/src/sage/geometry/polyhedron/base7.py @@ -21,7 +21,7 @@ # Copyright (C) 2019 Julian Ritter # Copyright (C) 2019-2020 Laith Rastanawi # Copyright (C) 2019-2020 Sophia Elia -# Copyright (C) 2019-2021 Jonathan Kliem +# Copyright (C) 2019-2021 Jonathan Kliem # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx index 102f38c5eef..b828dfbc9c8 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx @@ -73,7 +73,7 @@ AUTHOR: """ # **************************************************************************** -# Copyright (C) 2019 Jonathan Kliem +# Copyright (C) 2019 Jonathan Kliem # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx index c1a0b996a8a..8287d36e6a0 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx @@ -55,7 +55,7 @@ AUTHOR: """ # **************************************************************************** -# Copyright (C) 2019 Jonathan Kliem +# Copyright (C) 2019 Jonathan Kliem # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/conversions.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/conversions.pyx index b4af45206e5..999acbd1f52 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/conversions.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/conversions.pyx @@ -58,7 +58,7 @@ AUTHOR: """ #***************************************************************************** -# Copyright (C) 2019 Jonathan Kliem +# Copyright (C) 2019 Jonathan Kliem # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_data_structure.pxd b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_data_structure.pxd index eea0e3b4da8..f37bcd36085 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_data_structure.pxd +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_data_structure.pxd @@ -2,7 +2,7 @@ Cython data structure for combinatorial faces. """ # **************************************************************************** -# Copyright (C) 2020 Jonathan Kliem +# Copyright (C) 2020 Jonathan Kliem # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx index b8f9f0a27b0..59258c4a7f8 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx @@ -165,7 +165,7 @@ AUTHOR: """ #***************************************************************************** -# Copyright (C) 2019 Jonathan Kliem +# Copyright (C) 2019 Jonathan Kliem # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.pxd b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.pxd index b43e50a6aae..79b319e1982 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.pxd +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.pxd @@ -2,7 +2,7 @@ Inline cython methods for lists of faces. """ # **************************************************************************** -# Copyright (C) 2020 Jonathan Kliem +# Copyright (C) 2020 Jonathan Kliem # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.pyx index e6c9aa2b134..ec9c23d090d 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_list_data_structure.pyx @@ -2,7 +2,7 @@ Sorting of a list of faces. """ # **************************************************************************** -# Copyright (C) 2020 Jonathan Kliem +# Copyright (C) 2020 Jonathan Kliem # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx index 9639f10b6b7..c71eaded3b9 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/list_of_faces.pyx @@ -81,7 +81,7 @@ AUTHOR: """ # **************************************************************************** -# Copyright (C) 2019 Jonathan Kliem +# Copyright (C) 2019 Jonathan Kliem # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pyx index 4e9ba7e0e99..a1c4152bf42 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/polyhedron_face_lattice.pyx @@ -51,7 +51,7 @@ AUTHOR: """ #***************************************************************************** -# Copyright (C) 2019 Jonathan Kliem +# Copyright (C) 2019 Jonathan Kliem # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/sage/graphs/generic_graph.py b/src/sage/graphs/generic_graph.py index fa48183ecc4..92e8b3f3e45 100644 --- a/src/sage/graphs/generic_graph.py +++ b/src/sage/graphs/generic_graph.py @@ -421,7 +421,7 @@ # 2018 Erik M. Bray # Meghana M Reddy # 2019 Rajat Mittal -# 2020 Jonathan Kliem +# 2020 Jonathan Kliem # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/src/sage/rings/number_field/order.py b/src/sage/rings/number_field/order.py index f0b0c0f9656..47630513140 100644 --- a/src/sage/rings/number_field/order.py +++ b/src/sage/rings/number_field/order.py @@ -65,7 +65,7 @@ # 2020 John H. Palmieri # 2020 Thierry Monteil # 2021 Antonio Rojas -# 2021 Jonathan Kliem +# 2021 Jonathan Kliem # # Distributed under the terms of the GNU General Public License (GPL) # as published by the Free Software Foundation; either version 2 of From 2f2732e838abec8706fda1ea5f01186dc1f65cf4 Mon Sep 17 00:00:00 2001 From: Jonathan Kliem Date: Sat, 10 Dec 2022 16:26:12 +0100 Subject: [PATCH 393/751] refactor: Move list of pairs to dedicated class --- src/sage/data_structures/binary_list.pxd | 14 + src/sage/data_structures/binary_list.pyx | 118 ++++++++ .../combinatorial_polyhedron/base.pxd | 39 +-- .../combinatorial_polyhedron/base.pyx | 265 +++++------------- 4 files changed, 214 insertions(+), 222 deletions(-) create mode 100644 src/sage/data_structures/binary_list.pxd create mode 100644 src/sage/data_structures/binary_list.pyx diff --git a/src/sage/data_structures/binary_list.pxd b/src/sage/data_structures/binary_list.pxd new file mode 100644 index 00000000000..a0ea05fbef1 --- /dev/null +++ b/src/sage/data_structures/binary_list.pxd @@ -0,0 +1,14 @@ +cimport cython + +cdef struct pair_s: + size_t first + size_t second + +@cython.final +cdef class BinaryList: + cdef pair_s** _lists + cdef size_t length + + cdef inline int enlarge(self) except -1 + cdef inline int add(self, size_t first, size_t second) except -1 + cdef inline pair_s* get(self, size_t index) except NULL diff --git a/src/sage/data_structures/binary_list.pyx b/src/sage/data_structures/binary_list.pyx new file mode 100644 index 00000000000..c35c4871892 --- /dev/null +++ b/src/sage/data_structures/binary_list.pyx @@ -0,0 +1,118 @@ +r""" +A data structure to store lists of integer pairs of large size. +""" + +# **************************************************************************** +# Copyright (C) 2022 Jonathan Kliem +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# https://www.gnu.org/licenses/ +# **************************************************************************** + +from cysignals.memory cimport check_reallocarray, check_allocarray, sig_free +from sage.rings.integer cimport smallInteger + +# Should be a power of two. +# Should be neither exposed nor modified. +cdef size_t length_per_list = 16348 + +cdef class BinaryList: + def __dealloc__(self): + cdef size_t n_lists = self.length // length_per_list + cdef size_t i + for i in range(n_lists): + sig_free(self._lists[i]) + sig_free(self._lists) + + cdef inline int enlarge(self) except -1: + """ + Increase size of list by one. + """ + if self.length % length_per_list: + self.length += 1 + return 0 + + cdef size_t n_lists = self.length // length_per_list + self._lists = check_reallocarray(self._lists, n_lists + 1, sizeof(pair_s*)) + self._lists[n_lists] = check_allocarray(length_per_list, sizeof(pair_s)) + self.length += 1 + + cdef inline pair_s* get(self, size_t index) except NULL: + if not (0 <= index < self.length): + raise IndexError + + cdef size_t list_index = index // length_per_list + cdef size_t index_in_list = index - list_index * length_per_list + + return &self._lists[list_index][index_in_list] + + def __getitem__(self, size_t index): + r""" + Get item of specified index. + + EXAMPLES:: + + sage: from sage.data_structures.binary_list import BinaryList + sage: l = BinaryList() + sage: l[0] = [1, 5] + sage: l[0] + (1, 5) + sage: l[1] + Traceback (most recent call last): + ... + IndexError + sage: l[-1] + Traceback (most recent call last): + ... + OverflowError: can't convert negative value to size_t + """ + cdef pair_s pair = self.get(index)[0] + return (smallInteger(pair.first), smallInteger(pair.second)) + + def __setitem__(self, size_t index, value): + r""" + Set item of specified index. + + Allows increasing the size of the list by at most 1. + + EXAMPLES:: + + sage: from sage.data_structures.binary_list import BinaryList + sage: l = BinaryList() + sage: l[0] = (2, 1) + sage: l[1] = (1, 2) + sage: l[0] + (2, 1) + sage: l[1] + (1, 2) + sage: l[10] = (5, 3) + Traceback (most recent call last): + ... + IndexError + sage: l[2] = 2 + Traceback (most recent call last): + ... + TypeError: 'sage.rings.integer.Integer' object is not iterable + """ + cdef size_t first, second + (first, second) = value + + if (index == self.length): + self.add(first, second) + return + + cdef pair_s* pair_pt = self.get(index) + pair_pt[0].first = first + pair_pt[0].second = second + + cdef inline int add(self, size_t first, size_t second) except -1: + """ + Add a pair to the list. + """ + self.enlarge() + cdef pair_s* last = self.get(self.length - 1) + last[0].first = first + last[0].second = second diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pxd b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pxd index 7c2a14192da..51a70d18950 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pxd +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pxd @@ -1,9 +1,10 @@ cimport cython -from sage.structure.sage_object cimport SageObject -from .face_iterator cimport FaceIterator, CombinatorialFace -from .list_of_faces cimport ListOfFaces -from .face_data_structure cimport face_t -from .polyhedron_face_lattice cimport PolyhedronFaceLattice +from sage.data_structures.binary_list cimport BinaryList +from sage.structure.sage_object cimport SageObject +from .face_iterator cimport FaceIterator, CombinatorialFace +from .list_of_faces cimport ListOfFaces +from .face_data_structure cimport face_t +from .polyhedron_face_lattice cimport PolyhedronFaceLattice @cython.final cdef class CombinatorialPolyhedron(SageObject): @@ -24,22 +25,10 @@ cdef class CombinatorialPolyhedron(SageObject): cdef tuple _far_face_tuple cdef tuple _f_vector - # Edges, ridges and incidences are stored in a pointer of pointers. - # The first edge has vertices ``edges[0][0]`` and ``edges[0][1]``, - # the second edge has vertices ``edges[0][2]`` and ``edges[0][3]``, etc. - # There are ``_length_edges_list`` edges in ``edges[i]``, so the edge - # ``_length_edges_list + 1`` has vertices ``edges[1][0]`` and ``edges[1][1]``. - # Likewise for ridges and incidences. - cdef size_t _length_edges_list - - - cdef size_t **_edges # stores edges labeled by vertex indices - cdef size_t _n_edges - cdef size_t **_ridges # stores ridges labeled by facet indices - cdef size_t _n_ridges - cdef size_t **_face_lattice_incidences # stores incidences in Hasse diagram labeled indices of the faces - cdef size_t _n_face_lattice_incidences - cdef PolyhedronFaceLattice _all_faces # class to generate Hasse diagram incidences + cdef BinaryList _edges # stores edges labeled by vertex indices + cdef BinaryList _ridges # stores ridges labeled by facet indices + cdef BinaryList _face_lattice_incidences # stores incidences in Hasse diagram labeled indices of the faces + cdef PolyhedronFaceLattice _all_faces # class to generate Hasse diagram incidences cdef tuple Vrep(self) cdef tuple facet_names(self) @@ -69,10 +58,6 @@ cdef class CombinatorialPolyhedron(SageObject): cdef int _compute_edges_or_ridges(self, int dual, bint do_edges) except -1 cdef size_t _compute_edges_or_ridges_with_iterator( self, FaceIterator face_iter, const bint do_atom_rep, const bint do_f_vector, - size_t ***edges_pt, size_t *counter_pt, size_t *current_length_pt, - size_t* f_vector) except -1 - cdef int _compute_face_lattice_incidences(self) except -1 + BinaryList edges, size_t* f_vector) except -1 - cdef inline int _set_edge(self, size_t a, size_t b, size_t ***edges_pt, size_t *counter_pt, size_t *current_length_pt) except -1 - cdef inline void _free_edges(self, size_t ***edges_pt, size_t counter) - cdef inline size_t _get_edge(self, size_t **edges, size_t edge_number, size_t vertex) except -1 + cdef int _compute_face_lattice_incidences(self) except -1 diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx index b828dfbc9c8..c9690bcc452 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx @@ -84,7 +84,7 @@ AUTHOR: import numbers from memory_allocator cimport MemoryAllocator -from cysignals.memory cimport check_malloc, check_allocarray, check_reallocarray, check_calloc, sig_free +from cysignals.memory cimport check_calloc, sig_free from sage.rings.integer import Integer from sage.graphs.graph import Graph @@ -102,8 +102,9 @@ from .conversions \ from .conversions cimport Vrep_list_to_bit_rep from sage.misc.cachefunc import cached_method +from sage.data_structures.binary_list cimport pair_s from sage.rings.integer cimport smallInteger -from cysignals.signals cimport sig_check, sig_block, sig_unblock +from cysignals.signals cimport sig_check from .face_data_structure cimport face_len_atoms, face_init, face_free from .face_iterator cimport iter_t, parallel_f_vector @@ -347,15 +348,6 @@ cdef class CombinatorialPolyhedron(SageObject): self._all_faces = None self._n_facets = -1 - # ``_length_edges_list`` should not be touched in an instance - # of :class:`CombinatorialPolyhedron`. This number can be altered, - # but should probably be a power of `2` (for memory usage). - # ``_length_edges_list`` shouldn't be too small for speed and - # shouldn't be too large, as ``ridges``, ``edges`` and ``incidences`` - # each have a memory overhead of - # ``self._length_edges_list*2*sizeof(size_t *)``. - self._length_edges_list = 16348 - def __init__(self, data, Vrep=None, facets=None, unbounded=False, far_face=None): r""" Initialize :class:`CombinatorialPolyhedron`. @@ -578,9 +570,6 @@ cdef class CombinatorialPolyhedron(SageObject): """ if not self._bounded: face_free(self._far_face) - self._free_edges(&self._edges, self._n_edges) - self._free_edges(&self._ridges, self._n_ridges) - self._free_edges(&self._face_lattice_incidences, self._n_face_lattice_incidences) def _repr_(self): r""" @@ -1244,14 +1233,14 @@ cdef class CombinatorialPolyhedron(SageObject): return smallInteger(i) # Getting the indices of the `i`-th edge. - def vertex_one(size_t i): - return f(self._get_edge(self._edges, i, 0)) + cdef pair_s edge - def vertex_two(size_t i): - return f(self._get_edge(self._edges, i, 1)) + def get_edge(size_t i): + edge = self._edges.get(i)[0] + return (f(edge.first), f(edge.second)) cdef size_t j - return tuple((vertex_one(j), vertex_two(j)) for j in range(self._n_edges)) + return tuple(get_edge(j) for j in range(self._edges.length)) def vertex_graph(self, names=True, algorithm=None): r""" @@ -1339,14 +1328,14 @@ cdef class CombinatorialPolyhedron(SageObject): from sage.matrix.constructor import matrix cdef Matrix_dense adjacency_matrix = matrix( ZZ, self.n_Vrepresentation(), self.n_Vrepresentation(), 0) - cdef size_t i, a, b + cdef size_t i + cdef pair_s edge self._compute_edges(self._algorithm_to_dual(algorithm)) - for i in range(self._n_edges): - a = self._get_edge(self._edges, i, 0) - b = self._get_edge(self._edges, i, 1) - adjacency_matrix.set_unsafe_int(a, b, 1) - adjacency_matrix.set_unsafe_int(b, a, 1) + for i in range(self._edges.length): + edge = self._edges.get(i)[0] + adjacency_matrix.set_unsafe_int(edge.first, edge.second, 1) + adjacency_matrix.set_unsafe_int(edge.second, edge.first, 1) adjacency_matrix.set_immutable() return adjacency_matrix @@ -1459,7 +1448,7 @@ cdef class CombinatorialPolyhedron(SageObject): deprecation(31834, "the keyword ``add_equalities`` is deprecated; use ``add_equations``", 3) add_equations = True self._compute_ridges(self._algorithm_to_dual(algorithm)) - n_ridges = self._n_ridges + cdef size_t n_ridges = self._ridges.length # Mapping the indices of the Vepr to the names, if requested. if self.facet_names() is not None and names is True: @@ -1469,23 +1458,21 @@ cdef class CombinatorialPolyhedron(SageObject): def f(size_t i): return smallInteger(i) - # Getting the indices of the `i`-th ridge. - def facet_one(size_t i): - return f(self._get_edge(self._ridges, i, 0)) - - def facet_two(size_t i): - return f(self._get_edge(self._ridges, i, 1)) + cdef pair_s ridge - cdef size_t j if add_equations and names: - # Also getting the equations for each facet. - return tuple( - (((facet_one(i),) + self.equations()), - ((facet_two(i),) + self.equations())) - for i in range(n_ridges)) + def get_ridge(size_t i): + ridge = self._ridges.get(i)[0] + return ((f(ridge.first),) + self.equations(), + (f(ridge.second),) + self.equations()) + else: - return tuple((facet_one(i), facet_two(i)) - for i in range(n_ridges)) + def get_ridge(size_t i): + ridge = self._ridges.get(i)[0] + return (f(ridge.first), f(ridge.second)) + + cdef size_t j + return tuple(get_ridge(j) for j in range(n_ridges)) @cached_method def facet_adjacency_matrix(self, algorithm=None): @@ -1529,14 +1516,14 @@ cdef class CombinatorialPolyhedron(SageObject): from sage.matrix.constructor import matrix cdef Matrix_dense adjacency_matrix = matrix( ZZ, self.n_facets(), self.n_facets(), 0) - cdef size_t i, a, b + cdef size_t i + cdef pair_s ridge self._compute_ridges(self._algorithm_to_dual(algorithm)) - for i in range(self._n_ridges): - a = self._get_edge(self._ridges, i, 0) - b = self._get_edge(self._ridges, i, 1) - adjacency_matrix.set_unsafe_int(a, b, 1) - adjacency_matrix.set_unsafe_int(b, a, 1) + for i in range(self._ridges.length): + ridge = self._ridges.get(i)[0] + adjacency_matrix.set_unsafe_int(ridge.first, ridge.second, 1) + adjacency_matrix.set_unsafe_int(ridge.second, ridge.first, 1) adjacency_matrix.set_immutable() return adjacency_matrix @@ -2911,23 +2898,13 @@ cdef class CombinatorialPolyhedron(SageObject): if not self._face_lattice_incidences: # compute all incidences. self._compute_face_lattice_incidences() - if self._face_lattice_incidences is NULL: + if self._face_lattice_incidences is None: raise TypeError("could not determine face lattice") - cdef size_t **incidences = self._face_lattice_incidences - cdef size_t n_incidences = self._n_face_lattice_incidences - - # Getting the indices of the `i`-th incidence. - def face_one(size_t i): - return smallInteger(self._get_edge(incidences, i, 0)) - - def face_two(size_t i): - return smallInteger(self._get_edge(incidences, i, 1)) - # Edges of the face-lattice/Hasse diagram. cdef size_t j - edges = tuple((face_one(j), face_two(j)) - for j in range(n_incidences)) + cdef size_t n_incidences = self._face_lattice_incidences.length + edges = tuple(self._face_lattice_incidences[j] for j in range(n_incidences)) V = tuple(smallInteger(i) for i in range(sum(self._f_vector))) @@ -3560,7 +3537,7 @@ cdef class CombinatorialPolyhedron(SageObject): See :meth:`CombinatorialPolyhedron.edges` and :meth:`CombinatorialPolyhedron.ridges`. """ - if (self._edges is not NULL and do_edges) or (self._ridges is not NULL and not do_edges): + if (self._edges is not None and do_edges) or (self._ridges is not None and not do_edges): return 0 # There is no need to recompute. if dual == -1: @@ -3598,19 +3575,16 @@ cdef class CombinatorialPolyhedron(SageObject): cdef FaceIterator face_iter cdef int dim = self.dimension() - cdef size_t **edges = NULL - cdef size_t counter = 0 # the number of edges so far - cdef size_t current_length = 1 # dynamically enlarge **edges + cdef BinaryList edges = BinaryList() cdef int output_dim_init = 1 if do_edges else dim - 2 cdef bint do_f_vector = False cdef size_t* f_vector = NULL try: - edges = check_malloc(sizeof(size_t*)) if dim == 1 and (do_edges or self.n_facets() > 1): # In this case there is an edge/ridge, but its not a proper face. - self._set_edge(0, 1, &edges, &counter, ¤t_length) + edges.add(0, 1) elif dim <= 1 or self.n_facets() == 0: # There is no edge/ridge. @@ -3631,7 +3605,7 @@ cdef class CombinatorialPolyhedron(SageObject): do_f_vector = False face_iter = self._face_iter(dual, output_dim_init) self._compute_edges_or_ridges_with_iterator(face_iter, (dual ^ do_edges), do_f_vector, - &edges, &counter, ¤t_length, f_vector) + edges, f_vector) # Success, copy the data to ``CombinatorialPolyhedron``. @@ -3657,36 +3631,24 @@ cdef class CombinatorialPolyhedron(SageObject): # Copy the edge or ridges. if do_edges: - sig_block() - self._n_edges = counter self._edges = edges - edges = NULL - counter = 0 - sig_unblock() else: - sig_block() - self._n_ridges = counter self._ridges = edges - edges = NULL - counter = 0 - sig_unblock() finally: - self._free_edges(&edges, counter) sig_free(f_vector) - if do_edges and self._edges is NULL: + if do_edges and self._edges is None: raise ValueError('could not determine edges') - elif not do_edges and self._ridges is NULL: + elif not do_edges and self._ridges is None: raise ValueError('could not determine ridges') cdef size_t _compute_edges_or_ridges_with_iterator( self, FaceIterator face_iter, const bint do_atom_rep, const bint do_f_vector, - size_t ***edges_pt, size_t *counter_pt, size_t *current_length_pt, - size_t* f_vector) except -1: + BinaryList edges, size_t* f_vector) except -1: r""" See :meth:`CombinatorialPolyhedron._compute_edges`. """ - cdef size_t a,b # facets of an edge + cdef size_t a, b # facets of an edge cdef int dim = self.dimension() # The dimension in which to record the edges or ridges. @@ -3717,7 +3679,7 @@ cdef class CombinatorialPolyhedron(SageObject): # Copy the information. a = face_iter.structure.coatom_rep[0] b = face_iter.structure.coatom_rep[1] - self._set_edge(a, b, edges_pt, counter_pt, current_length_pt) + edges.add(a, b) d = face_iter.next_dimension() cdef int _compute_face_lattice_incidences(self) except -1: @@ -3729,7 +3691,6 @@ cdef class CombinatorialPolyhedron(SageObject): if self._face_lattice_incidences: return 1 # There is no need to recompute the incidences. - cdef size_t len_incidence_list = self._length_edges_list cdef int dim = self.dimension() f_vector = self.f_vector() self._record_all_faces() # set up ``self._all_faces`` @@ -3753,12 +3714,7 @@ cdef class CombinatorialPolyhedron(SageObject): # For ``dimension_one`` we add: cdef size_t already_seen_next # = sum(f_vector[j] for j in range(dimension_two + 2)) - # For each incidence we determine its location in ``incidences`` - # by ``incidences[one][two]``. - cdef size_t **incidences = NULL - - cdef size_t counter = 0 # the number of incidences so far - cdef size_t current_length = 1 # dynamically enlarge **incidences + cdef BinaryList incidences = BinaryList() if all_faces is None: raise ValueError("could not determine a list of all faces") @@ -3771,117 +3727,36 @@ cdef class CombinatorialPolyhedron(SageObject): dimension_one += 1 dimension_two = -1 - try: - incidences = check_malloc(sizeof(size_t*)) - while (dimension_one < dim + 1): - already_seen = sum(f_vector[j] for j in range(dimension_two + 1)) - already_seen_next = already_seen + f_vector[dimension_two + 1] + while (dimension_one < dim + 1): + already_seen = sum(f_vector[j] for j in range(dimension_two + 1)) + already_seen_next = already_seen + f_vector[dimension_two + 1] + if all_faces.dual: + # If ``dual``, then ``all_faces`` has the dimensions reversed. + all_faces.incidence_init(dim - 1 - dimension_two, dim - 1 - dimension_one) + else: + all_faces.incidence_init(dimension_one, dimension_two) + + # Get all incidences for fixed ``[dimension_one, dimension_two]``. + while all_faces.next_incidence(&second, &first): if all_faces.dual: - # If ``dual``, then ``all_faces`` has the dimensions reversed. - all_faces.incidence_init(dim - 1 - dimension_two, dim - 1 - dimension_one) + # If ``dual``, then ``second`` and ``first are flipped. + second += already_seen + first += already_seen_next + incidences.add(second, first) else: - all_faces.incidence_init(dimension_one, dimension_two) - - # Get all incidences for fixed ``[dimension_one, dimension_two]``. - while all_faces.next_incidence(&second, &first): - if all_faces.dual: - # If ``dual``, then ``second`` and ``first are flipped. - second += already_seen - first += already_seen_next - self._set_edge(second, first, &incidences, &counter, ¤t_length) - else: - second += already_seen_next - first += already_seen - self._set_edge(first, second, &incidences, &counter, ¤t_length) + second += already_seen_next + first += already_seen + incidences.add(first, second) - sig_check() + sig_check() - # Increase dimensions. - dimension_one += 1 - dimension_two = dimension_one - 1 - - # Success, copy the data to ``CombinatorialPolyhedron``. - sig_block() - self._face_lattice_incidences = incidences - self._n_face_lattice_incidences = counter - incidences = NULL - counter = 0 - sig_unblock() - finally: - self._free_edges(&incidences, counter) - - cdef inline int _set_edge(self, size_t a, size_t b, size_t ***edges_pt, size_t *counter_pt, size_t *current_length_pt) except -1: - r""" - Set an edge in an edge list. - - Sets the values of all pointers accordingly. - - INPUT: - - - ``a``,``b`` -- the vertices of the edge - - ``edges_pt`` -- pointer to the list of lists; might point to ``NULL`` - when ``current_length_pt[0] == 0`` - - ``counter_pt`` -- pointer to the number of edges - - ``current_length_pt`` -- pointer to the length of ``edges_pt[0]`` - """ - cdef size_t len_edge_list = self._length_edges_list - # Determine the position in ``edges``. - cdef size_t one = counter_pt[0] // len_edge_list - cdef size_t two = counter_pt[0] % len_edge_list - - if unlikely(current_length_pt[0] == 0): - edges_pt[0] = check_malloc(sizeof(size_t*)) - current_length_pt[0] = 1 - - # Enlarge ``edges`` if needed. - if unlikely(two == 0): - if unlikely(one + 1 > current_length_pt[0]): - # enlarge **edges - current_length_pt[0] = 2*current_length_pt[0] - edges_pt[0] = check_reallocarray(edges_pt[0], current_length_pt[0], sizeof(size_t*)) - - edges_pt[0][one] = check_allocarray(2 * len_edge_list, sizeof(size_t)) - - edges_pt[0][one][2*two] = a - edges_pt[0][one][2*two + 1] = b - counter_pt[0] = counter_pt[0] + 1 - - cdef inline void _free_edges(self, size_t ***edges_pt, size_t counter): - r""" - Free the memory allocated for the edges. - """ - if edges_pt[0] is NULL: - return - - cdef size_t len_edge_list = self._length_edges_list - # Determine the position in ``edges``. - cdef size_t one = counter // len_edge_list - cdef size_t i - - for i in range(one): - sig_free(edges_pt[0][i]) - - sig_free(edges_pt[0]) - - cdef inline size_t _get_edge(self, size_t **edges, size_t edge_number, size_t vertex) except -1: - r""" - Get a vertex of an edge in an edge list. - - INPUT: - - - ``edges`` -- the edges list - - ``edge_number`` -- the number of the edge to obtain - - ``vertex`` -- one of ``0``, ``1``; the vertex to obtain - - OUTPUT: The specified vertex of the specified edge. - """ - cdef size_t len_edge_list = self._length_edges_list - # Determine the position in ``edges``. - cdef size_t one = edge_number // len_edge_list - cdef size_t two = edge_number % len_edge_list + # Increase dimensions. + dimension_one += 1 + dimension_two = dimension_one - 1 - return edges[one][2*two + vertex] + # Success, copy the data to ``CombinatorialPolyhedron``. + self._face_lattice_incidences = incidences def _record_all_faces(self): r""" From 31bfb691b9b61091aecefae106acf340fbb85367 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Sat, 11 Feb 2023 16:29:49 +0100 Subject: [PATCH 394/751] fix docstrings, simplify some tests --- src/sage/combinat/bijectionist.py | 757 +++++++++++++++--------------- 1 file changed, 372 insertions(+), 385 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 8a9989176d6..783a5ff4714 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -36,319 +36,313 @@ A guided tour ============= - EXAMPLES: - - We find a statistic `s` such that - `(s, wex, fix) \sim (llis, des, adj)`:: - - sage: N = 3 - sage: A = B = [pi for n in range(N+1) for pi in Permutations(n)] - sage: alpha1 = lambda p: len(p.weak_excedences()) - sage: alpha2 = lambda p: len(p.fixed_points()) - sage: beta1 = lambda p: len(p.descents(final_descent=True)) if p else 0 - sage: beta2 = lambda p: len([e for (e, f) in zip(p, p[1:]+[0]) if e == f+1]) - sage: tau = Permutation.longest_increasing_subsequence_length - sage: def rotate_permutation(p): - ....: cycle = Permutation(tuple(range(1, len(p)+1))) - ....: return Permutation([cycle.inverse()(p(cycle(i))) for i in range(1, len(p)+1)]) - sage: bij = Bijectionist(A, B, tau) - sage: bij.set_statistics((len, len), (alpha1, beta1), (alpha2, beta2)) - sage: a, b = bij.statistics_table() - sage: table(a, header_row=True, frame=True) - +-----------+--------+--------+--------+ - | a | α_1(a) | α_2(a) | α_3(a) | - +===========+========+========+========+ - | [] | 0 | 0 | 0 | - +-----------+--------+--------+--------+ - | [1] | 1 | 1 | 1 | - +-----------+--------+--------+--------+ - | [1, 2] | 2 | 2 | 2 | - +-----------+--------+--------+--------+ - | [2, 1] | 2 | 1 | 0 | - +-----------+--------+--------+--------+ - | [1, 2, 3] | 3 | 3 | 3 | - +-----------+--------+--------+--------+ - | [1, 3, 2] | 3 | 2 | 1 | - +-----------+--------+--------+--------+ - | [2, 1, 3] | 3 | 2 | 1 | - +-----------+--------+--------+--------+ - | [2, 3, 1] | 3 | 2 | 0 | - +-----------+--------+--------+--------+ - | [3, 1, 2] | 3 | 1 | 0 | - +-----------+--------+--------+--------+ - | [3, 2, 1] | 3 | 2 | 1 | - +-----------+--------+--------+--------+ - - sage: table(b, header_row=True, frame=True) - +-----------+---+--------+--------+--------+ - | b | τ | β_1(b) | β_2(b) | β_3(b) | - +===========+===+========+========+========+ - | [] | 0 | 0 | 0 | 0 | - +-----------+---+--------+--------+--------+ - | [1] | 1 | 1 | 1 | 1 | - +-----------+---+--------+--------+--------+ - | [1, 2] | 2 | 2 | 1 | 0 | - +-----------+---+--------+--------+--------+ - | [2, 1] | 1 | 2 | 2 | 2 | - +-----------+---+--------+--------+--------+ - | [1, 2, 3] | 3 | 3 | 1 | 0 | - +-----------+---+--------+--------+--------+ - | [1, 3, 2] | 2 | 3 | 2 | 1 | - +-----------+---+--------+--------+--------+ - | [2, 1, 3] | 2 | 3 | 2 | 1 | - +-----------+---+--------+--------+--------+ - | [2, 3, 1] | 2 | 3 | 2 | 1 | - +-----------+---+--------+--------+--------+ - | [3, 1, 2] | 2 | 3 | 2 | 0 | - +-----------+---+--------+--------+--------+ - | [3, 2, 1] | 1 | 3 | 3 | 3 | - +-----------+---+--------+--------+--------+ - - sage: from sage.combinat.cyclic_sieving_phenomenon import orbit_decomposition - sage: bij.set_constant_blocks(orbit_decomposition(A, rotate_permutation)) - sage: bij.constant_blocks() - {{[1, 3, 2], [2, 1, 3], [3, 2, 1]}} - sage: next(bij.solutions_iterator()) - {[]: 0, - [1]: 1, - [1, 2]: 1, - [1, 2, 3]: 1, - [1, 3, 2]: 2, - [2, 1]: 2, - [2, 1, 3]: 2, - [2, 3, 1]: 2, - [3, 1, 2]: 3, - [3, 2, 1]: 2} - - There is no rotation invariant statistic on non crossing set partitions which is equidistributed - with the Strahler number on ordered trees:: - - sage: N = 8; - sage: A = [SetPartition(d.to_noncrossing_partition()) for n in range(N) for d in DyckWords(n)] - sage: B = [t for n in range(1, N+1) for t in OrderedTrees(n)] - sage: theta = lambda m: SetPartition([[i % m.size() + 1 for i in b] for b in m]) - - The following code is equivalent to ``tau = findstat(397)``:: - - sage: def tau(T): - ....: if len(T) == 0: - ....: return 1 - ....: else: - ....: l = [tau(S) for S in T] - ....: m = max(l) - ....: if l.count(m) == 1: - ....: return m - ....: else: - ....: return m+1 - sage: bij = Bijectionist(A, B, tau) - sage: bij.set_statistics((lambda a: a.size(), lambda b: b.node_number()-1)) - sage: from sage.combinat.cyclic_sieving_phenomenon import orbit_decomposition - sage: bij.set_constant_blocks(orbit_decomposition(A, theta)) - sage: list(bij.solutions_iterator()) - [] - - An example identifying `s` and `S`:: - - sage: N = 4 - sage: A = [dyck_word for n in range(1, N) for dyck_word in DyckWords(n)] - sage: B = [binary_tree for n in range(1, N) for binary_tree in BinaryTrees(n)] - sage: concat_path = lambda D1, D2: DyckWord(list(D1) + list(D2)) - sage: concat_tree = lambda B1, B2: concat_path(B1.to_dyck_word(), - ....: B2.to_dyck_word()).to_binary_tree() - sage: bij = Bijectionist(A, B) - sage: bij.set_intertwining_relations((2, concat_path, concat_tree)) - sage: bij.set_statistics((lambda d: d.semilength(), lambda t: t.node_number())) - sage: for D in sorted(bij.minimal_subdistributions_iterator(), key=lambda x: (len(x[0][0]), x)): - ....: ascii_art(D) - ( [ /\ ], [ o ] ) - ( [ o ] ) - ( [ \ ] ) - ( [ /\/\ ], [ o ] ) - ( [ o ] ) - ( [ /\ ] [ / ] ) - ( [ / \ ], [ o ] ) - ( [ o ] ) - ( [ \ ] ) - ( [ o ] ) - ( [ \ ] ) - ( [ /\/\/\ ], [ o ] ) - ( [ o ] ) - ( [ \ ] ) - ( [ o ] ) - ( [ /\ ] [ / ] ) - ( [ /\/ \ ], [ o ] ) - ( [ o ] ) - ( [ /\ ] [ / \ ] ) - ( [ / \/\ ], [ o o ] ) - ( [ o, o ] ) - ( [ / / ] ) - ( [ /\ ] [ o o ] ) - ( [ /\/\ / \ ] [ \ / ] ) - ( [ / \, / \ ], [ o o ] ) - - The output is in a form suitable for FindStat:: - - sage: findmap(list(bij.minimal_subdistributions_iterator())) # optional -- internet - 0: Mp00034 (quality [100]) - 1: Mp00061oMp00023 (quality [100]) - 2: Mp00018oMp00140 (quality [100]) - - TESTS:: - - sage: N = 4; A = B = [permutation for n in range(N) for permutation in Permutations(n)] - sage: theta = lambda pi: Permutation([x+1 if x != len(pi) else 1 for x in pi[-1:]+pi[:-1]]) - sage: def tau(pi): - ....: n = len(pi) - ....: return sum([1 for i in range(1, n+1) for j in range(1, n+1) - ....: if i Date: Sat, 11 Feb 2023 16:35:29 +0100 Subject: [PATCH 395/751] change lambda to def --- src/sage/combinat/bijectionist.py | 114 +++++++++++++++--------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 783a5ff4714..6e756891977 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -42,10 +42,10 @@ sage: N = 3 sage: A = B = [pi for n in range(N+1) for pi in Permutations(n)] - sage: alpha1 = lambda p: len(p.weak_excedences()) - sage: alpha2 = lambda p: len(p.fixed_points()) - sage: beta1 = lambda p: len(p.descents(final_descent=True)) if p else 0 - sage: beta2 = lambda p: len([e for (e, f) in zip(p, p[1:]+[0]) if e == f+1]) + sage: def alpha1(p): return len(p.weak_excedences()) + sage: def alpha2(p): return len(p.fixed_points()) + sage: def beta1(p): return len(p.descents(final_descent=True)) if p else 0 + sage: def beta2(p): return len([e for (e, f) in zip(p, p[1:]+[0]) if e == f+1]) sage: tau = Permutation.longest_increasing_subsequence_length sage: def rotate_permutation(p): ....: cycle = Permutation(tuple(range(1, len(p)+1))) @@ -125,7 +125,7 @@ sage: N = 8; sage: A = [SetPartition(d.to_noncrossing_partition()) for n in range(N) for d in DyckWords(n)] sage: B = [t for n in range(1, N+1) for t in OrderedTrees(n)] - sage: theta = lambda m: SetPartition([[i % m.size() + 1 for i in b] for b in m]) + sage: def theta(m): return SetPartition([[i % m.size() + 1 for i in b] for b in m]) The following code is equivalent to ``tau = findstat(397)``:: @@ -195,7 +195,7 @@ TESTS:: sage: N = 4; A = B = [permutation for n in range(N) for permutation in Permutations(n)] - sage: theta = lambda pi: Permutation([x+1 if x != len(pi) else 1 for x in pi[-1:]+pi[:-1]]) + sage: def theta(pi): return Permutation([x+1 if x != len(pi) else 1 for x in pi[-1:]+pi[:-1]]) sage: def tau(pi): ....: n = len(pi) ....: return sum([1 for i in range(1, n+1) for j in range(1, n+1) @@ -213,9 +213,9 @@ A test including intertwining relations:: sage: N = 2; A = B = [dyck_word for n in range(N+1) for dyck_word in DyckWords(n)] - sage: alpha = lambda D: (D.area(), D.bounce()) - sage: beta = lambda D: (D.bounce(), D.area()) - sage: tau = lambda D: D.number_of_touch_points() + sage: def alpha(D): return (D.area(), D.bounce()) + sage: def beta(D): return (D.bounce(), D.area()) + sage: def tau(D): return D.number_of_touch_points() The following looks correct:: @@ -263,9 +263,9 @@ Repeating some tests, but using the constructor instead of set_XXX() methods: sage: N = 2; A = B = [dyck_word for n in range(N+1) for dyck_word in DyckWords(n)] - sage: alpha = lambda D: (D.area(), D.bounce()) - sage: beta = lambda D: (D.bounce(), D.area()) - sage: tau = lambda D: D.number_of_touch_points() + sage: def alpha(D): return (D.area(), D.bounce()) + sage: def beta(D): return (D.bounce(), D.area()) + sage: def tau(D): return D.number_of_touch_points() sage: bij = Bijectionist(A, B, tau, alpha_beta=((lambda d: d.semilength(), lambda d: d.semilength()),)) sage: for solution in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): @@ -276,8 +276,8 @@ Constant blocks:: sage: A = B = 'abcd' - sage: pi = lambda p1, p2: 'abcdefgh'[A.index(p1) + A.index(p2)] - sage: rho = lambda s1, s2: (s1 + s2) % 2 + sage: def pi(p1, p2): return 'abcdefgh'[A.index(p1) + A.index(p2)] + sage: def rho(s1, s2): return (s1 + s2) % 2 sage: bij = Bijectionist(A, B, lambda x: B.index(x) % 2, P=[['a', 'c']], pi_rho=((2, pi, rho),)) sage: list(bij.solutions_iterator()) [{'a': 0, 'b': 1, 'c': 0, 'd': 1}] @@ -298,7 +298,7 @@ Intertwining relations:: - sage: concat = lambda p1, p2: Permutation(p1 + [i + len(p1) for i in p2]) + sage: def concat(p1, p2): return Permutation(p1 + [i + len(p1) for i in p2]) sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] sage: bij = Bijectionist(A, B, Permutation.number_of_fixed_points, alpha_beta=((len, len),), pi_rho=((2, concat, lambda x, y: x + y),)) @@ -311,9 +311,9 @@ Statistics:: sage: N = 4; A = B = [permutation for n in range(N) for permutation in Permutations(n)] - sage: wex = lambda p: len(p.weak_excedences()) - sage: fix = lambda p: len(p.fixed_points()) - sage: des = lambda p: len(p.descents(final_descent=True)) if p else 0 + sage: def wex(p): return len(p.weak_excedences()) + sage: def fix(p): return len(p.fixed_points()) + sage: def des(p): return len(p.descents(final_descent=True)) if p else 0 sage: bij = Bijectionist(A, B, fix, alpha_beta=((wex, des), (len, len))) sage: for solution in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): ....: print(solution) @@ -567,8 +567,8 @@ def set_constant_blocks(self, P): We now add a map that combines some blocks:: - sage: pi = lambda p1, p2: 'abcdefgh'[A.index(p1) + A.index(p2)] - sage: rho = lambda s1, s2: (s1 + s2) % 2 + sage: def pi(p1, p2): return 'abcdefgh'[A.index(p1) + A.index(p2)] + sage: def rho(s1, s2): return (s1 + s2) % 2 sage: bij.set_intertwining_relations((2, pi, rho)) sage: list(bij.solutions_iterator()) [{'a': 0, 'b': 1, 'c': 0, 'd': 1}] @@ -672,10 +672,10 @@ def set_statistics(self, *alpha_beta): of fixed points of `S(\pi)` equals `s(\pi)`:: sage: N = 4; A = B = [permutation for n in range(N) for permutation in Permutations(n)] - sage: wex = lambda p: len(p.weak_excedences()) - sage: fix = lambda p: len(p.fixed_points()) - sage: des = lambda p: len(p.descents(final_descent=True)) if p else 0 - sage: adj = lambda p: len([e for (e, f) in zip(p, p[1:]+[0]) if e == f+1]) + sage: def wex(p): return len(p.weak_excedences()) + sage: def fix(p): return len(p.fixed_points()) + sage: def des(p): return len(p.descents(final_descent=True)) if p else 0 + sage: def adj(p): return len([e for (e, f) in zip(p, p[1:]+[0]) if e == f+1]) sage: bij = Bijectionist(A, B, fix) sage: bij.set_statistics((wex, des), (len, len)) sage: for solution in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): @@ -708,9 +708,9 @@ def set_statistics(self, *alpha_beta): Calling ``set_statistics`` without arguments should restore the previous state:: sage: N = 3; A = B = [permutation for n in range(N) for permutation in Permutations(n)] - sage: wex = lambda p: len(p.weak_excedences()) - sage: fix = lambda p: len(p.fixed_points()) - sage: des = lambda p: len(p.descents(final_descent=True)) if p else 0 + sage: def wex(p): return len(p.weak_excedences()) + sage: def fix(p): return len(p.fixed_points()) + sage: def des(p): return len(p.descents(final_descent=True)) if p else 0 sage: bij = Bijectionist(A, B, fix) sage: bij.set_statistics((wex, des), (len, len)) sage: for solution in bij.solutions_iterator(): @@ -783,10 +783,10 @@ def statistics_fibers(self): sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] sage: tau = Permutation.longest_increasing_subsequence_length - sage: wex = lambda p: len(p.weak_excedences()) - sage: fix = lambda p: len(p.fixed_points()) - sage: des = lambda p: len(p.descents(final_descent=True)) if p else 0 - sage: adj = lambda p: len([e for (e, f) in zip(p, p[1:]+[0]) if e == f+1]) + sage: def wex(p): return len(p.weak_excedences()) + sage: def fix(p): return len(p.fixed_points()) + sage: def des(p): return len(p.descents(final_descent=True)) if p else 0 + sage: def adj(p): return len([e for (e, f) in zip(p, p[1:]+[0]) if e == f+1]) sage: bij = Bijectionist(A, B, tau) sage: bij.set_statistics((len, len), (wex, des), (fix, adj)) sage: table([[key, AB[0], AB[1]] for key, AB in bij.statistics_fibers().items()]) @@ -828,10 +828,10 @@ def statistics_table(self, header=True): sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] sage: tau = Permutation.longest_increasing_subsequence_length - sage: wex = lambda p: len(p.weak_excedences()) - sage: fix = lambda p: len(p.fixed_points()) - sage: des = lambda p: len(p.descents(final_descent=True)) if p else 0 - sage: adj = lambda p: len([e for (e, f) in zip(p, p[1:]+[0]) if e == f+1]) + sage: def wex(p): return len(p.weak_excedences()) + sage: def fix(p): return len(p.fixed_points()) + sage: def des(p): return len(p.descents(final_descent=True)) if p else 0 + sage: def adj(p): return len([e for (e, f) in zip(p, p[1:]+[0]) if e == f+1]) sage: bij = Bijectionist(A, B, tau) sage: bij.set_statistics((wex, des), (fix, adj)) sage: a, b = bij.statistics_table() @@ -1193,8 +1193,8 @@ def set_distributions(self, *elements_distributions): Another example with statistics:: sage: bij = Bijectionist(A, B, tau) - sage: alpha = lambda p: p(1) if len(p) > 0 else 0 - sage: beta = lambda p: p(1) if len(p) > 0 else 0 + sage: def alpha(p): return p(1) if len(p) > 0 else 0 + sage: def beta(p): return p(1) if len(p) > 0 else 0 sage: bij.set_statistics((alpha, beta), (len, len)) sage: for sol in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): ....: print(sol) @@ -1304,7 +1304,7 @@ def set_intertwining_relations(self, *pi_rho): of the second permutation by the length of the first permutation:: - sage: concat = lambda p1, p2: Permutation(p1 + [i + len(p1) for i in p2]) + sage: def concat(p1, p2): return Permutation(p1 + [i + len(p1) for i in p2]) We may be interested in statistics on permutations which are equidistributed with the number of fixed points, such that @@ -1496,7 +1496,7 @@ def _forced_constant_blocks(self): sage: N = 4 sage: A = B = [permutation for n in range(2, N) for permutation in Permutations(n)] - sage: tau = lambda p: p[0] if len(p) else 0 + sage: def tau(p): return p[0] if len(p) else 0 sage: add_n = lambda p1: Permutation(p1 + [1 + len(p1)]) sage: add_1 = lambda p1: Permutation([1] + [1 + i for i in p1]) sage: bij = Bijectionist(A, B, tau) @@ -1528,8 +1528,8 @@ def _forced_constant_blocks(self): sage: bij.constant_blocks() {{[2, 3, 1], [3, 1, 2]}} - sage: concat = lambda p1, p2: Permutation(p1 + [i + len(p1) for i in p2]) - sage: union = lambda p1, p2: Partition(sorted(list(p1) + list(p2), reverse=True)) + sage: def concat(p1, p2): return Permutation(p1 + [i + len(p1) for i in p2]) + sage: def union(p1, p2): return Partition(sorted(list(p1) + list(p2), reverse=True)) sage: bij.set_intertwining_relations((2, concat, union)) In this case we do not discover constant blocks by looking at the intertwining_relations only:: @@ -1546,10 +1546,10 @@ def _forced_constant_blocks(self): sage: N = 4 sage: A = B = [permutation for n in range(N + 1) for permutation in Permutations(n)] - sage: alpha1 = lambda p: len(p.weak_excedences()) - sage: alpha2 = lambda p: len(p.fixed_points()) - sage: beta1 = lambda p: len(p.descents(final_descent=True)) if p else 0 - sage: beta2 = lambda p: len([e for (e, f) in zip(p, p[1:] + [0]) if e == f + 1]) + sage: def alpha1(p): return len(p.weak_excedences()) + sage: def alpha2(p): return len(p.fixed_points()) + sage: def beta1(p): return len(p.descents(final_descent=True)) if p else 0 + sage: def beta2(p): return len([e for (e, f) in zip(p, p[1:] + [0]) if e == f + 1]) sage: tau = Permutation.longest_increasing_subsequence_length sage: def rotate_permutation(p): ....: cycle = Permutation(tuple(range(1, len(p) + 1))) @@ -1826,7 +1826,7 @@ def minimal_subdistributions_iterator(self): Another example:: sage: N = 2; A = B = [dyck_word for n in range(N+1) for dyck_word in DyckWords(n)] - sage: tau = lambda D: D.number_of_touch_points() + sage: def tau(D): return D.number_of_touch_points() sage: bij = Bijectionist(A, B, tau) sage: bij.set_statistics((lambda d: d.semilength(), lambda d: d.semilength())) sage: for solution in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): @@ -1974,7 +1974,7 @@ def minimal_subdistributions_blocks_iterator(self): Another example:: sage: N = 2; A = B = [dyck_word for n in range(N+1) for dyck_word in DyckWords(n)] - sage: tau = lambda D: D.number_of_touch_points() + sage: def tau(D): return D.number_of_touch_points() sage: bij = Bijectionist(A, B, tau) sage: bij.set_statistics((lambda d: d.semilength(), lambda d: d.semilength())) sage: for solution in sorted(list(bij.solutions_iterator()), key=lambda d: tuple(sorted(d.items()))): @@ -2143,8 +2143,8 @@ def _preprocess_intertwining_relations(self): sage: A = B = 'abcd' sage: bij = Bijectionist(A, B, lambda x: B.index(x) % 2) - sage: pi = lambda p1, p2: 'abcdefgh'[A.index(p1) + A.index(p2)] - sage: rho = lambda s1, s2: (s1 + s2) % 2 + sage: def pi(p1, p2): return 'abcdefgh'[A.index(p1) + A.index(p2)] + sage: def rho(s1, s2): return (s1 + s2) % 2 sage: bij.set_intertwining_relations((2, pi, rho)) sage: bij._preprocess_intertwining_relations() sage: bij._P @@ -2909,8 +2909,8 @@ def add_intertwining_relation_constraints(self): sage: A = B = 'abcd' sage: bij = Bijectionist(A, B, lambda x: B.index(x) % 2) - sage: pi = lambda p1, p2: 'abcdefgh'[A.index(p1) + A.index(p2)] - sage: rho = lambda s1, s2: (s1 + s2) % 2 + sage: def pi(p1, p2): return 'abcdefgh'[A.index(p1) + A.index(p2)] + sage: def rho(s1, s2): return (s1 + s2) % 2 sage: bij.set_intertwining_relations((2, pi, rho)) sage: from sage.combinat.bijectionist import _BijectionistMILP sage: bmilp = _BijectionistMILP(bij) # indirect doctest @@ -3127,8 +3127,8 @@ def _non_copying_intersection(sets): Note that adding ``[(2,-2,-1), (2,2,-1), (2,-2,1), (2,2,1)]`` makes it take (seemingly) forever.:: - sage: c1 = lambda a, b: (a[0]+b[0], a[1]*b[1], a[2]*b[2]) - sage: c2 = lambda a: (a[0], -a[1], a[2]) + sage: def c1(a, b): return (a[0]+b[0], a[1]*b[1], a[2]*b[2]) + sage: def c2(a): return (a[0], -a[1], a[2]) sage: bij = Bijectionist(sum(As, []), sum(Bs, [])) sage: bij.set_statistics((lambda x: x[0], lambda x: x[0])) @@ -3168,10 +3168,10 @@ def _non_copying_intersection(sets): Our benchmark example:: sage: from sage.combinat.cyclic_sieving_phenomenon import orbit_decomposition - sage: alpha1 = lambda p: len(p.weak_excedences()) - sage: alpha2 = lambda p: len(p.fixed_points()) - sage: beta1 = lambda p: len(p.descents(final_descent=True)) if p else 0 - sage: beta2 = lambda p: len([e for (e, f) in zip(p, p[1:]+[0]) if e == f+1]) + sage: def alpha1(p): return len(p.weak_excedences()) + sage: def alpha2(p): return len(p.fixed_points()) + sage: def beta1(p): return len(p.descents(final_descent=True)) if p else 0 + sage: def beta2(p): return len([e for (e, f) in zip(p, p[1:]+[0]) if e == f+1]) sage: gamma = Permutation.longest_increasing_subsequence_length sage: def rotate_permutation(p): ....: cycle = Permutation(tuple(range(1, len(p)+1))) From 18f421034b807e159fb88e807be7bf7fc85ba877 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 11 Feb 2023 20:12:22 -0800 Subject: [PATCH 396/751] Remove 'docker' from the names of the Docker images published on ghcr.io --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 5eb3e79633b..72fbcefe294 100644 --- a/tox.ini +++ b/tox.ini @@ -647,7 +647,7 @@ commands = docker-{arm64,armhf}: docker run --rm --privileged multiarch/qemu-user-static:register --reset docker: bash -c 'if [ x"{env:DOCKER_CONFIG_FILE:}" != x ]; then mkdir -p {envdir}/.docker && ln -sf $(realpath "{env:DOCKER_CONFIG_FILE:}") {envdir}/.docker/; fi' docker: bash -c 'for docker_target in {env:DOCKER_TARGETS:with-targets}; do \ - docker: BUILD_IMAGE_STEM=sage-$(echo {envname} | sed s/-incremental//); \ + docker: BUILD_IMAGE_STEM=sage-$(echo {envname} | sed "s/-docker//;s/-incremental//"); \ docker: BUILD_IMAGE=$DOCKER_PUSH_REPOSITORY$BUILD_IMAGE_STEM-$docker_target; \ docker: BUILD_TAG=$(git describe --dirty --always); \ docker: TAG_ARGS=$(for tag in $BUILD_TAG {env:EXTRA_DOCKER_TAGS:}; do echo --tag $BUILD_IMAGE:$tag; done); \ From 52d2a5962a18f6f8cda79e36b865c3fe94d1c6f8 Mon Sep 17 00:00:00 2001 From: Rohan Garg <76916164+Sandstorm831@users.noreply.github.com> Date: Sun, 12 Feb 2023 11:18:54 +0530 Subject: [PATCH 397/751] Update linear_extensions.py --- src/sage/combinat/posets/linear_extensions.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/sage/combinat/posets/linear_extensions.py b/src/sage/combinat/posets/linear_extensions.py index a2dfb7b26a1..3cfdee843b1 100644 --- a/src/sage/combinat/posets/linear_extensions.py +++ b/src/sage/combinat/posets/linear_extensions.py @@ -255,13 +255,15 @@ def is_greedy(self): def is_supergreedy(self): r"""" Return ``True`` if the linear extension is supergreedy. - - A linear extension `[e_1, e_2, \ldots, e_n]` is *supergreedy* if - for every `i`, either if there is a minimal element `e_{i+1}` in - `[e_{i+1}, \ldots, e_n]` which is in the upper cover of `e_j` in - `[e_1, \ldots, e_i]` for which j is maximum or if no such element - exist `e_{i+1}` is the any of the minimal element in - `[e_i+1,\dots, e_n]`. + + A linear extension $[x_1 Date: Wed, 21 Dec 2022 12:30:56 -0800 Subject: [PATCH 398/751] build/pkgs/polymake: Update to 4.8 --- build/pkgs/polymake/checksums.ini | 6 +++--- build/pkgs/polymake/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/polymake/checksums.ini b/build/pkgs/polymake/checksums.ini index 2727d96238b..4ad03b50ba9 100644 --- a/build/pkgs/polymake/checksums.ini +++ b/build/pkgs/polymake/checksums.ini @@ -1,5 +1,5 @@ tarball=polymake-VERSION-minimal.tar.bz2 -sha1=a3903ef9438388e56a76cb04918c1fe9b2e2b563 -md5=9a451d56cfe8c6138b91558d6d369dbe -cksum=1195315956 +sha1=c4c8af82b2f0b722b50ff8e58eaac81361bac1a3 +md5=2b7225d764cce62377dafeabadd848f7 +cksum=2322933668 upstream_url=https://polymake.org/lib/exe/fetch.php/download/polymake-VERSION-minimal.tar.bz2 diff --git a/build/pkgs/polymake/package-version.txt b/build/pkgs/polymake/package-version.txt index 4f8c639658e..ef216a53f54 100644 --- a/build/pkgs/polymake/package-version.txt +++ b/build/pkgs/polymake/package-version.txt @@ -1 +1 @@ -4.7 +4.8 From 62dae334b8943eb671adf9a9c13a49035dbf60e5 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 21 Dec 2022 15:51:42 -0800 Subject: [PATCH 399/751] build/pkgs/polymake/spkg-install.in: Add -I directives to CXXFLAGS --- build/pkgs/polymake/spkg-install.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/pkgs/polymake/spkg-install.in b/build/pkgs/polymake/spkg-install.in index 827409cccd2..36e32de869e 100644 --- a/build/pkgs/polymake/spkg-install.in +++ b/build/pkgs/polymake/spkg-install.in @@ -21,6 +21,10 @@ if [ -x $SAGE_LOCAL/bin/lrs1 ]; then more_configure_options="$more_configure_options --with-lrs=$SAGE_LOCAL" fi +# Put these includes on the front, to avoid shadowing by installed headers +# from a previous version. (polymake 4.8 puts these includes to the end.) +export CXXFLAGS="-I$(pwd)/include/core-wrappers -I$(pwd)/include/core $CXXFLAGS" + ./configure --without-java \ --without-javaview \ --without-soplex \ From da792aff7e090ec9f640ddd22b6117be2265dbc7 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 21 Dec 2022 16:32:55 -0800 Subject: [PATCH 400/751] build/pkgs/polymake/dependencies: Add lrslib (needed for sympol) --- build/pkgs/polymake/dependencies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/polymake/dependencies b/build/pkgs/polymake/dependencies index b3ed8ed4299..c7df48724c2 100644 --- a/build/pkgs/polymake/dependencies +++ b/build/pkgs/polymake/dependencies @@ -1,4 +1,4 @@ -$(MP_LIBRARY) bliss cddlib normaliz perl_term_readline_gnu ppl perl_cpan_polymake_prereq libxml2 | ninja_build +$(MP_LIBRARY) bliss cddlib normaliz perl_term_readline_gnu ppl perl_cpan_polymake_prereq libxml2 lrslib | ninja_build ---------- All lines of this file are ignored except the first. From 0489c9848f5d597e84fae0786597c114bc31c7b9 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 11 Feb 2023 22:42:00 -0800 Subject: [PATCH 401/751] build/pkgs/polymake: Update to 4.9 --- build/pkgs/polymake/checksums.ini | 6 +++--- build/pkgs/polymake/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/polymake/checksums.ini b/build/pkgs/polymake/checksums.ini index 4ad03b50ba9..eba30ebcced 100644 --- a/build/pkgs/polymake/checksums.ini +++ b/build/pkgs/polymake/checksums.ini @@ -1,5 +1,5 @@ tarball=polymake-VERSION-minimal.tar.bz2 -sha1=c4c8af82b2f0b722b50ff8e58eaac81361bac1a3 -md5=2b7225d764cce62377dafeabadd848f7 -cksum=2322933668 +sha1=e34a9cb83a831b4b058e0803a606f29ff940a4e2 +md5=2118f0cae2f512b994bbc72552966bb9 +cksum=2954910267 upstream_url=https://polymake.org/lib/exe/fetch.php/download/polymake-VERSION-minimal.tar.bz2 diff --git a/build/pkgs/polymake/package-version.txt b/build/pkgs/polymake/package-version.txt index ef216a53f54..86a9588adcd 100644 --- a/build/pkgs/polymake/package-version.txt +++ b/build/pkgs/polymake/package-version.txt @@ -1 +1 @@ -4.8 +4.9 From 8d1ab4dad05f7b776912638441953420cd8de5d7 Mon Sep 17 00:00:00 2001 From: Sanjay Rijal <37138338+zovelsanj@users.noreply.github.com> Date: Sun, 12 Feb 2023 13:03:48 +0545 Subject: [PATCH 402/751] updated sage pip note updated the ambiguity note on `sage` and `sagemath` as per [#35070](/~https://github.com/sagemath/sage/pull/35070#discussion_r1103746908) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5117319bcf3..3685bb8c4b3 100644 --- a/README.md +++ b/README.md @@ -407,7 +407,7 @@ For installation of `sage` in python using `pip` you need to install `sagemath-s You need to install the `sage_conf`, a wheelhouse of various python packages. You can list the wheels using `ls $(sage-config SAGE_SPKG_WHEELS)`. After manual installation of these wheels, you can install the sage library, `sagemath-standard`. -**NOTE:** You can find `sage` and `sagemath` pip packages but it is worth noting that they are not at all related to this `sage`. Indeed `pip install sage` installs `sage 0.0.0` which is literally an empty package. +**NOTE:** You can find `sage` and `sagemath` pip packages but it is worth noting that when importing `sage` with these packages you will encounter `ModuleNotFoundError: No module named 'sage'`. Indeed `pip install sage` installs `sage 0.0.0` which is literally an empty package. Troubleshooting --------------- From 1ef47d116cfb9fb2ec67caebe2235c47eb61c100 Mon Sep 17 00:00:00 2001 From: Jonathan Kliem Date: Sun, 12 Feb 2023 11:02:53 +0100 Subject: [PATCH 403/751] refactor: BinaryList -> ListOfPairs --- .../{binary_list.pxd => list_of_pairs.pxd} | 2 +- .../{binary_list.pyx => list_of_pairs.pyx} | 10 +++++----- .../combinatorial_polyhedron/base.pxd | 20 +++++++++---------- .../combinatorial_polyhedron/base.pyx | 12 +++++------ 4 files changed, 22 insertions(+), 22 deletions(-) rename src/sage/data_structures/{binary_list.pxd => list_of_pairs.pxd} (92%) rename src/sage/data_structures/{binary_list.pyx => list_of_pairs.pyx} (93%) diff --git a/src/sage/data_structures/binary_list.pxd b/src/sage/data_structures/list_of_pairs.pxd similarity index 92% rename from src/sage/data_structures/binary_list.pxd rename to src/sage/data_structures/list_of_pairs.pxd index a0ea05fbef1..4dbb57c201c 100644 --- a/src/sage/data_structures/binary_list.pxd +++ b/src/sage/data_structures/list_of_pairs.pxd @@ -5,7 +5,7 @@ cdef struct pair_s: size_t second @cython.final -cdef class BinaryList: +cdef class ListOfPairs: cdef pair_s** _lists cdef size_t length diff --git a/src/sage/data_structures/binary_list.pyx b/src/sage/data_structures/list_of_pairs.pyx similarity index 93% rename from src/sage/data_structures/binary_list.pyx rename to src/sage/data_structures/list_of_pairs.pyx index c35c4871892..03ad6268277 100644 --- a/src/sage/data_structures/binary_list.pyx +++ b/src/sage/data_structures/list_of_pairs.pyx @@ -19,7 +19,7 @@ from sage.rings.integer cimport smallInteger # Should be neither exposed nor modified. cdef size_t length_per_list = 16348 -cdef class BinaryList: +cdef class ListOfPairs: def __dealloc__(self): cdef size_t n_lists = self.length // length_per_list cdef size_t i @@ -55,8 +55,8 @@ cdef class BinaryList: EXAMPLES:: - sage: from sage.data_structures.binary_list import BinaryList - sage: l = BinaryList() + sage: from sage.data_structures.list_of_pairs import ListOfPairs + sage: l = ListOfPairs() sage: l[0] = [1, 5] sage: l[0] (1, 5) @@ -80,8 +80,8 @@ cdef class BinaryList: EXAMPLES:: - sage: from sage.data_structures.binary_list import BinaryList - sage: l = BinaryList() + sage: from sage.data_structures.list_of_pairs import ListOfPairs + sage: l = ListOfPairs() sage: l[0] = (2, 1) sage: l[1] = (1, 2) sage: l[0] diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pxd b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pxd index 51a70d18950..494213512ff 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pxd +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pxd @@ -1,10 +1,10 @@ cimport cython -from sage.data_structures.binary_list cimport BinaryList -from sage.structure.sage_object cimport SageObject -from .face_iterator cimport FaceIterator, CombinatorialFace -from .list_of_faces cimport ListOfFaces -from .face_data_structure cimport face_t -from .polyhedron_face_lattice cimport PolyhedronFaceLattice +from sage.data_structures.list_of_pairs cimport ListOfPairs +from sage.structure.sage_object cimport SageObject +from .face_iterator cimport FaceIterator, CombinatorialFace +from .list_of_faces cimport ListOfFaces +from .face_data_structure cimport face_t +from .polyhedron_face_lattice cimport PolyhedronFaceLattice @cython.final cdef class CombinatorialPolyhedron(SageObject): @@ -25,9 +25,9 @@ cdef class CombinatorialPolyhedron(SageObject): cdef tuple _far_face_tuple cdef tuple _f_vector - cdef BinaryList _edges # stores edges labeled by vertex indices - cdef BinaryList _ridges # stores ridges labeled by facet indices - cdef BinaryList _face_lattice_incidences # stores incidences in Hasse diagram labeled indices of the faces + cdef ListOfPairs _edges # stores edges labeled by vertex indices + cdef ListOfPairs _ridges # stores ridges labeled by facet indices + cdef ListOfPairs _face_lattice_incidences # stores incidences in Hasse diagram labeled indices of the faces cdef PolyhedronFaceLattice _all_faces # class to generate Hasse diagram incidences cdef tuple Vrep(self) @@ -58,6 +58,6 @@ cdef class CombinatorialPolyhedron(SageObject): cdef int _compute_edges_or_ridges(self, int dual, bint do_edges) except -1 cdef size_t _compute_edges_or_ridges_with_iterator( self, FaceIterator face_iter, const bint do_atom_rep, const bint do_f_vector, - BinaryList edges, size_t* f_vector) except -1 + ListOfPairs edges, size_t* f_vector) except -1 cdef int _compute_face_lattice_incidences(self) except -1 diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx index c9690bcc452..62ee57c25ff 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx @@ -102,9 +102,9 @@ from .conversions \ from .conversions cimport Vrep_list_to_bit_rep from sage.misc.cachefunc import cached_method -from sage.data_structures.binary_list cimport pair_s -from sage.rings.integer cimport smallInteger -from cysignals.signals cimport sig_check +from sage.data_structures.list_of_pairs cimport pair_s +from sage.rings.integer cimport smallInteger +from cysignals.signals cimport sig_check from .face_data_structure cimport face_len_atoms, face_init, face_free from .face_iterator cimport iter_t, parallel_f_vector @@ -3575,7 +3575,7 @@ cdef class CombinatorialPolyhedron(SageObject): cdef FaceIterator face_iter cdef int dim = self.dimension() - cdef BinaryList edges = BinaryList() + cdef ListOfPairs edges = ListOfPairs() cdef int output_dim_init = 1 if do_edges else dim - 2 cdef bint do_f_vector = False @@ -3644,7 +3644,7 @@ cdef class CombinatorialPolyhedron(SageObject): cdef size_t _compute_edges_or_ridges_with_iterator( self, FaceIterator face_iter, const bint do_atom_rep, const bint do_f_vector, - BinaryList edges, size_t* f_vector) except -1: + ListOfPairs edges, size_t* f_vector) except -1: r""" See :meth:`CombinatorialPolyhedron._compute_edges`. """ @@ -3714,7 +3714,7 @@ cdef class CombinatorialPolyhedron(SageObject): # For ``dimension_one`` we add: cdef size_t already_seen_next # = sum(f_vector[j] for j in range(dimension_two + 2)) - cdef BinaryList incidences = BinaryList() + cdef ListOfPairs incidences = ListOfPairs() if all_faces is None: raise ValueError("could not determine a list of all faces") From 9d377d9d3d44f71b5a18afcf7f572598268e1c23 Mon Sep 17 00:00:00 2001 From: Jonathan Kliem Date: Sun, 12 Feb 2023 12:23:18 +0100 Subject: [PATCH 404/751] refactor: Use enum for face iterator status --- .../combinatorial_face.pyx | 4 +-- .../face_iterator.pxd | 8 ++++- .../face_iterator.pyx | 30 +++++++++---------- 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx index c1a0b996a8a..b82b60ffeec 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx @@ -70,7 +70,7 @@ import numbers from sage.rings.integer cimport smallInteger from .conversions cimport bit_rep_to_Vrep_list from .base cimport CombinatorialPolyhedron -from .face_iterator cimport FaceIterator_base +from .face_iterator cimport FaceIterator_base, FaceStatus from .polyhedron_face_lattice cimport PolyhedronFaceLattice from .face_data_structure cimport face_len_atoms, face_init, face_free, face_copy, face_issubset from .face_list_data_structure cimport bit_rep_to_coatom_rep @@ -177,7 +177,7 @@ cdef class CombinatorialFace(SageObject): self.atoms = it.atoms self.coatoms = it.coatoms - if it.structure.face_status == 0: + if it.structure.face_status == FaceStatus.not_initialized: raise LookupError("face iterator not set to a face") face_init(self.face, self.coatoms.n_atoms(), self.coatoms.n_coatoms()) diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pxd b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pxd index 452b2c9cdc9..af4f327736b 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pxd +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pxd @@ -5,10 +5,16 @@ from .face_data_structure cimport face_t from .face_list_data_structure cimport face_list_t from .combinatorial_face cimport CombinatorialFace +cdef enum FaceStatus: + not_initialized + initialized + ignore_subsets + only_visit_subsets + cdef struct iter_s: bint dual # if 1, then iterate over dual Polyhedron face_t face # the current face of the iterator - int face_status # 0 not initialized, 1 initialized, 2 added to visited_all, 3 only visit subsets + FaceStatus face_status size_t *atom_rep # a place where atom-representaion of face will be stored size_t *coatom_rep # a place where coatom-representaion of face will be stored int current_dimension # dimension of current face, dual dimension if ``dual`` diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx index b8f9f0a27b0..84ca007466b 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx @@ -414,7 +414,7 @@ cdef class FaceIterator_base(SageObject): self.structure.visited_all[self.structure.dimension -1].n_faces = 0 else: self.structure.visited_all[self.structure.dimension -1].n_faces = 1 - self.structure.face_status = 0 + self.structure.face_status = FaceStatus.not_initialized self.structure.new_faces[self.structure.dimension - 1].n_faces = self.coatoms.n_faces() self.structure.current_dimension = self.structure.dimension - 1 self.structure.highest_dimension = self.structure.dimension - 1 @@ -460,7 +460,7 @@ cdef class FaceIterator_base(SageObject): sage: next(it).ambient_V_indices() == it.current().ambient_V_indices() True """ - if unlikely(self.structure.face_status == 0): + if unlikely(self.structure.face_status == FaceStatus.not_initialized): raise ValueError("iterator not set to a face yet") return CombinatorialFace(self) @@ -888,7 +888,7 @@ cdef class FaceIterator_base(SageObject): sage: it._meet_of_coatoms(1, 2) A -1-dimensional face of a Polyhedron in QQ^2 """ - if unlikely(self.structure.face_status != 0): + if unlikely(self.structure.face_status != FaceStatus.not_initialized): raise ValueError("please reset the face iterator") if unlikely(self.structure.output_dimension != -2): raise ValueError("face iterator must not have the output dimension specified") @@ -994,7 +994,7 @@ cdef class FaceIterator_base(SageObject): ... IndexError: atoms out of range """ - if unlikely(self.structure.face_status != 0): + if unlikely(self.structure.face_status != FaceStatus.not_initialized): raise ValueError("please reset the face iterator") if unlikely(self.structure.output_dimension != -2): raise ValueError("face iterator must not have the output dimension specified") @@ -1049,14 +1049,14 @@ cdef class FaceIterator_base(SageObject): See :meth:`FaceIterator_base.ignore_subfaces` and :meth:`FaceIterator_base.ignore_supfaces`. """ - if unlikely(self.structure.face_status == 0): + if unlikely(self.structure.face_status == FaceStatus.not_initialized): raise ValueError("iterator not set to a face yet") - if unlikely(self.structure.face_status == 3): + if unlikely(self.structure.face_status == FaceStatus.only_visit_subsets): # The iterator is consumed, if it was just set to visit only subsets # next thing to ignore subsets. self.structure.current_dimension = self.structure.dimension return 0 - if unlikely(self.structure.face_status == 2): + if unlikely(self.structure.face_status == FaceStatus.ignore_subsets): # Nothing to do. return 0 # The current face is added to ``visited_all``. @@ -1065,7 +1065,7 @@ cdef class FaceIterator_base(SageObject): # as there are no new faces. add_face_shallow(self.structure.visited_all[self.structure.current_dimension], self.structure.face) - self.structure.face_status = 2 + self.structure.face_status = FaceStatus.ignore_subsets def only_subfaces(self): r""" @@ -1177,9 +1177,9 @@ cdef class FaceIterator_base(SageObject): See :meth:`FaceIterator_base.only_subfaces` and :meth:`FaceIterator_base.only_supfaces`. """ - if unlikely(self.structure.face_status == 0): + if unlikely(self.structure.face_status == FaceStatus.not_initialized): raise ValueError("iterator not set to a face yet") - if unlikely(self.structure.face_status == 2): + if unlikely(self.structure.face_status == FaceStatus.ignore_subsets): raise ValueError("cannot only visit subsets after ignoring a face") cdef face_list_t* faces = &self.structure.new_faces[self.structure.current_dimension] @@ -1191,7 +1191,7 @@ cdef class FaceIterator_base(SageObject): swap_faces(faces[0].faces[yet_to_visit], faces[0].faces[faces[0].n_faces - 1]) - self.structure.face_status = 3 + self.structure.face_status = FaceStatus.only_visit_subsets self.structure.yet_to_visit = 0 # This will work: # ``next_dimension`` will first call ``next_face_loop`` and then check @@ -1281,13 +1281,13 @@ cdef class FaceIterator_base(SageObject): if n_atoms == self.coatoms.n_atoms(): # The face is the universe. self.structure.face[0] = face[0] - self.structure.face_status = 1 + self.structure.face_status = FaceStatus.initialized self.structure.current_dimension = self.structure.dimension return 0 elif n_atoms == 0: # The face is the empty face. self.structure.face[0] = face[0] - self.structure.face_status = 1 + self.structure.face_status = FaceStatus.initialized self.structure.current_dimension = -1 return 0 @@ -1928,7 +1928,7 @@ cdef inline int next_dimension(iter_t structure, size_t parallelization_depth=0) e.g. if it is ``1`` it will stop after having yield all faces of a facet """ cdef int max_dim = structure.highest_dimension - parallelization_depth - structure.face_status = 0 + structure.face_status = FaceStatus.not_initialized while (not next_face_loop(structure)) and (structure.current_dimension <= max_dim): sig_check() structure._index += 1 @@ -1959,7 +1959,7 @@ cdef inline int next_face_loop(iter_t structure) nogil except -1: # Set ``face`` to the next face. structure.yet_to_visit -= 1 structure.face[0] = faces[0].faces[structure.yet_to_visit][0] - structure.face_status = 1 + structure.face_status = FaceStatus.initialized return 1 if structure.current_dimension <= structure.lowest_dimension: From 8b272d395a536f7ec229b07edf33b6aed12c6465 Mon Sep 17 00:00:00 2001 From: Antonio Rojas Date: Mon, 29 Aug 2022 23:14:03 +0200 Subject: [PATCH 405/751] Adapt to API changes in OpenOutputStream and CloseOutput --- src/sage/libs/gap/element.pyx | 5 +++-- src/sage/libs/gap/gap_includes.pxd | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/sage/libs/gap/element.pyx b/src/sage/libs/gap/element.pyx index c555ea0333c..e3db3934baf 100644 --- a/src/sage/libs/gap/element.pyx +++ b/src/sage/libs/gap/element.pyx @@ -130,6 +130,7 @@ cdef char *capture_stdout(Obj func, Obj obj): """ cdef Obj s, stream, output_text_string cdef UInt res + cdef TypOutputFile output # The only way to get a string representation of an object that is truly # consistent with how it would be represented at the GAP REPL is to call # ViewObj on it. Unfortunately, ViewObj *prints* to the output stream, @@ -145,12 +146,12 @@ cdef char *capture_stdout(Obj func, Obj obj): output_text_string = GAP_ValueGlobalVariable("OutputTextString") stream = CALL_2ARGS(output_text_string, s, GAP_True) - if not OpenOutputStream(stream): + if not OpenOutputStream(&output, stream): raise GAPError("failed to open output capture stream for " "representing GAP object") CALL_1ARGS(func, obj) - CloseOutput() + CloseOutput(&output) return CSTR_STRING(s) finally: GAP_Leave() diff --git a/src/sage/libs/gap/gap_includes.pxd b/src/sage/libs/gap/gap_includes.pxd index 6d22e32540b..6111d18a5c7 100644 --- a/src/sage/libs/gap/gap_includes.pxd +++ b/src/sage/libs/gap/gap_includes.pxd @@ -76,8 +76,10 @@ cdef extern from "gap/intobj.h" nogil: cdef extern from "gap/io.h" nogil: - UInt OpenOutputStream(Obj stream) - UInt CloseOutput() + ctypedef struct TypOutputFile: + pass + UInt OpenOutputStream(TypOutputFile* output, Obj stream) + UInt CloseOutput(TypOutputFile* output) cdef extern from "gap/libgap-api.h" nogil: From 1c8832fc28bb7e5235ebf58fa9be4020dc55f809 Mon Sep 17 00:00:00 2001 From: Antonio Rojas Date: Mon, 29 Aug 2022 23:14:53 +0200 Subject: [PATCH 406/751] Disable colored prompt as it breaks the pexpect interface --- src/sage/interfaces/gap.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sage/interfaces/gap.py b/src/sage/interfaces/gap.py index 7ae1792e9de..ecaa9fd2341 100644 --- a/src/sage/interfaces/gap.py +++ b/src/sage/interfaces/gap.py @@ -1512,6 +1512,8 @@ def gap_reset_workspace(max_workspace_size=None, verbose=False): """ # Create new workspace with filename WORKSPACE g = Gap(use_workspace_cache=False, max_workspace_size=None) + g.eval('ColorPrompt(false)') + g.eval('SetUserPreference("UseColorPrompt", false)') g.eval('SetUserPreference("HistoryMaxLines", 30)') from sage.tests.gap_packages import all_installed_packages for pkg in all_installed_packages(gap=g): From 4b5ed43c792a64626b0f2d7856b5b40bbda4b753 Mon Sep 17 00:00:00 2001 From: Antonio Rojas Date: Mon, 29 Aug 2022 23:16:03 +0200 Subject: [PATCH 407/751] Port NaturalHomomorphism uses --- src/sage/groups/abelian_gps/abelian_group_gap.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/groups/abelian_gps/abelian_group_gap.py b/src/sage/groups/abelian_gps/abelian_group_gap.py index a4b047113c5..86090b43535 100644 --- a/src/sage/groups/abelian_gps/abelian_group_gap.py +++ b/src/sage/groups/abelian_gps/abelian_group_gap.py @@ -338,7 +338,7 @@ def _element_constructor_(self, x, check=True): if isinstance(x, AbelianGroupElement_gap): try: if x in self._cover: - x = self.gap().NaturalHomomorphism().Image(x.gap()) + x = self._cover.gap().NaturalHomomorphismByNormalSubgroup(self._relations).Image(x.gap()) else: x = x.gap() except AttributeError: @@ -1043,7 +1043,7 @@ def natural_homomorphism(self): From: Abelian group with gap, generator orders (4,) To: Quotient abelian group with generator orders (2,) """ - phi = self.gap().NaturalHomomorphism() + phi = self._cover.gap().NaturalHomomorphismByNormalSubgroup(self._relations) Hom = self._cover.Hom(self) return Hom(phi) From b1a81216b212dfc4cea3e806f154d43ee6092522 Mon Sep 17 00:00:00 2001 From: Antonio Rojas Date: Mon, 29 Aug 2022 23:17:36 +0200 Subject: [PATCH 408/751] Fix tests with GAP 4.12 --- .../en/thematic_tutorials/lie/weyl_groups.rst | 12 +++++----- .../coding/codecan/autgroup_can_label.pyx | 2 +- src/sage/coding/linear_code.py | 22 +++++++++---------- .../hecke_algebra_representation.py | 2 +- src/sage/combinat/symmetric_group_algebra.py | 2 +- src/sage/groups/finitely_presented.py | 6 ++--- src/sage/groups/fqf_orthogonal.py | 2 +- src/sage/groups/libgap_wrapper.pyx | 6 ++--- .../partn_ref2/refinement_generic.pyx | 2 +- src/sage/groups/perm_gps/permgroup.py | 8 +++---- src/sage/libs/gap/libgap.pyx | 2 +- src/sage/libs/gap/util.pyx | 8 +------ src/sage/tests/gap_packages.py | 2 +- 13 files changed, 35 insertions(+), 41 deletions(-) diff --git a/src/doc/en/thematic_tutorials/lie/weyl_groups.rst b/src/doc/en/thematic_tutorials/lie/weyl_groups.rst index c917338e444..182e74aad20 100644 --- a/src/doc/en/thematic_tutorials/lie/weyl_groups.rst +++ b/src/doc/en/thematic_tutorials/lie/weyl_groups.rst @@ -139,12 +139,12 @@ string, which you can print:: X.1 1 1 1 1 1 1 1 1 1 1 1 1 1 X.2 1 -1 1 1 -1 1 1 -1 -1 -1 1 1 1 X.3 2 . 2 -1 . 2 2 . . . -1 2 2 - X.4 3 -1 -1 . 1 -1 3 -1 1 -1 . -1 3 - X.5 3 -1 -1 . 1 3 -1 -1 -1 1 . -1 3 - X.6 3 1 -1 . -1 -1 3 1 -1 1 . -1 3 - X.7 3 1 -1 . -1 3 -1 1 1 -1 . -1 3 - X.8 3 -1 3 . -1 -1 -1 -1 1 1 . -1 3 - X.9 3 1 3 . 1 -1 -1 1 -1 -1 . -1 3 + X.4 3 -1 -1 . 1 3 -1 -1 -1 1 . -1 3 + X.5 3 1 -1 . -1 3 -1 1 1 -1 . -1 3 + X.6 3 -1 3 . -1 -1 -1 -1 1 1 . -1 3 + X.7 3 -1 -1 . 1 -1 3 -1 1 -1 . -1 3 + X.8 3 1 3 . 1 -1 -1 1 -1 -1 . -1 3 + X.9 3 1 -1 . -1 -1 3 1 -1 1 . -1 3 X.10 4 -2 . -1 . . . 2 . . 1 . -4 X.11 4 2 . -1 . . . -2 . . 1 . -4 X.12 6 . -2 . . -2 -2 . . . . 2 6 diff --git a/src/sage/coding/codecan/autgroup_can_label.pyx b/src/sage/coding/codecan/autgroup_can_label.pyx index de5db985e0b..c83b9264e44 100644 --- a/src/sage/coding/codecan/autgroup_can_label.pyx +++ b/src/sage/coding/codecan/autgroup_can_label.pyx @@ -76,7 +76,7 @@ columns do share the same coloring:: ((1,), (2,), (3, 5, 4), - (6, 19, 16, 9, 21, 10, 8, 15, 14, 11, 20, 13, 12, 7, 17, 18)) + (6, 19, 16, 21, 9, 10, 15, 8, 20, 11, 14, 13, 7, 12, 18, 17)) We can also restrict the group action to linear isometries:: diff --git a/src/sage/coding/linear_code.py b/src/sage/coding/linear_code.py index a3ac3ca1547..bfb9f8696e8 100644 --- a/src/sage/coding/linear_code.py +++ b/src/sage/coding/linear_code.py @@ -465,27 +465,27 @@ def automorphism_group_gens(self, equivalence="semilinear"): 0 sage: C = codes.HammingCode(GF(4, 'z'), 3) sage: C.automorphism_group_gens() - ([((1, 1, 1, 1, 1, z + 1, z, z + 1, z, z, z, 1, 1, z + 1, z + 1, z, z + 1, z, z + 1, z + 1, z + 1); (1,14,6,7,4,10,11,19)(2,8,16,13,3,17,21,15)(9,12,18,20), Ring endomorphism of Finite Field in z of size 2^2 + ([((1, 1, 1, z, z + 1, 1, 1, 1, 1, z + 1, z, z, z + 1, z + 1, z + 1, 1, z + 1, z, z, 1, z); (1,13,14,20)(2,21,8,18,7,16,19,15)(3,10,5,12,17,9,6,4), Ring endomorphism of Finite Field in z of size 2^2 + Defn: z |--> z + 1), + ((z, 1, z, z, z, z + 1, z, z, z, z, z, z, z + 1, z, z, z, z, z + 1, z, z, z); (1,11,5,12,3,19)(2,8)(6,18,13)(7,17,15)(9,10,14,16,20,21), Ring endomorphism of Finite Field in z of size 2^2 Defn: z |--> z + 1), - ((z + 1, 1, 1, z, z + 1, z, z, z + 1, z + 1, z + 1, 1, z + 1, z, z, 1, z + 1, 1, z, z + 1, z + 1, z); (1,18,6,19,2,9,17,10,13,14,21,11,4,5,12)(3,20,7,16,8), Ring endomorphism of Finite Field in z of size 2^2 - Defn: z |--> z), ((z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z); (), Ring endomorphism of Finite Field in z of size 2^2 Defn: z |--> z)], 362880) sage: C.automorphism_group_gens(equivalence="linear") - ([((z + 1, 1, z + 1, z + 1, z + 1, z, 1, z, 1, 1, 1, 1, z + 1, z + 1, z + 1, z, z, 1, z, z, z); (1,15,2,8,16,18,3)(4,9,12,13,20,10,11)(5,21,14,6,7,19,17), Ring endomorphism of Finite Field in z of size 2^2 + ([((z, 1, z + 1, z + 1, 1, z + 1, z, 1, z + 1, z + 1, 1, z, 1, z + 1, z, 1, z, 1, z + 1, 1, 1); (1,12,11,10,6,8,9,20,13,21,5,14,3,16,17,19,7,4,2,15,18), Ring endomorphism of Finite Field in z of size 2^2 Defn: z |--> z), - ((z + 1, z + 1, z + 1, z + 1, z + 1, 1, z, 1, z, z, z, 1, z, 1, 1, 1, z + 1, z + 1, z + 1, 1, z); (1,15,21,8,9)(2,18,5,3,11,16,7,10,19,13,12,4,17,6,20), Ring endomorphism of Finite Field in z of size 2^2 + ((z + 1, z + 1, z + 1, z, 1, 1, z, z, 1, z + 1, z, 1, 1, z, 1, z + 1, z, z + 1, z + 1, 1, z); (1,3,18,2,17,6,19)(4,15,13,20,7,14,16)(5,11,8,21,12,9,10), Ring endomorphism of Finite Field in z of size 2^2 Defn: z |--> z), ((z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1, z + 1); (), Ring endomorphism of Finite Field in z of size 2^2 Defn: z |--> z)], 181440) sage: C.automorphism_group_gens(equivalence="permutational") - ([((1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); (1,19)(3,17)(4,21)(5,20)(7,14)(9,12)(10,16)(11,15), Ring endomorphism of Finite Field in z of size 2^2 + ([((1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); (1,11)(3,10)(4,9)(5,7)(12,21)(14,20)(15,19)(16,17), Ring endomorphism of Finite Field in z of size 2^2 Defn: z |--> z), - ((1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); (1,11)(3,10)(4,9)(5,7)(12,21)(14,20)(15,19)(16,17), Ring endomorphism of Finite Field in z of size 2^2 + ((1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); (2,18)(3,19)(4,10)(5,16)(8,13)(9,14)(11,21)(15,20), Ring endomorphism of Finite Field in z of size 2^2 Defn: z |--> z), - ((1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); (1,17)(2,8)(3,14)(4,10)(7,12)(9,19)(13,18)(15,20), Ring endomorphism of Finite Field in z of size 2^2 + ((1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); (1,19)(3,17)(4,21)(5,20)(7,14)(9,12)(10,16)(11,15), Ring endomorphism of Finite Field in z of size 2^2 Defn: z |--> z), ((1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); (2,13)(3,14)(4,20)(5,11)(8,18)(9,19)(10,15)(16,21), Ring endomorphism of Finite Field in z of size 2^2 Defn: z |--> z)], @@ -691,10 +691,10 @@ def _canonize(self, equivalence): sage: C_iso == aut_group_can_label.get_canonical_form() True sage: aut_group_can_label.get_autom_gens() - [((1, 1, 1, 1, 1, z + 1, z, z + 1, z, z, z, 1, 1, z + 1, z + 1, z, z + 1, z, z + 1, z + 1, z + 1); (1,14,6,7,4,10,11,19)(2,8,16,13,3,17,21,15)(9,12,18,20), Ring endomorphism of Finite Field in z of size 2^2 + [((1, 1, 1, z, z + 1, 1, 1, 1, 1, z + 1, z, z, z + 1, z + 1, z + 1, 1, z + 1, z, z, 1, z); (1,13,14,20)(2,21,8,18,7,16,19,15)(3,10,5,12,17,9,6,4), Ring endomorphism of Finite Field in z of size 2^2 + Defn: z |--> z + 1), + ((z, 1, z, z, z, z + 1, z, z, z, z, z, z, z + 1, z, z, z, z, z + 1, z, z, z); (1,11,5,12,3,19)(2,8)(6,18,13)(7,17,15)(9,10,14,16,20,21), Ring endomorphism of Finite Field in z of size 2^2 Defn: z |--> z + 1), - ((z + 1, 1, 1, z, z + 1, z, z, z + 1, z + 1, z + 1, 1, z + 1, z, z, 1, z + 1, 1, z, z + 1, z + 1, z); (1,18,6,19,2,9,17,10,13,14,21,11,4,5,12)(3,20,7,16,8), Ring endomorphism of Finite Field in z of size 2^2 - Defn: z |--> z), ((z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z, z); (), Ring endomorphism of Finite Field in z of size 2^2 Defn: z |--> z)] """ diff --git a/src/sage/combinat/root_system/hecke_algebra_representation.py b/src/sage/combinat/root_system/hecke_algebra_representation.py index 6b756bafc30..8ac99319bec 100644 --- a/src/sage/combinat/root_system/hecke_algebra_representation.py +++ b/src/sage/combinat/root_system/hecke_algebra_representation.py @@ -357,7 +357,7 @@ def Tw(self, word, signs=None, scalar=None): sage: q1, q2 = K.gens() sage: KW = W.algebra(K) sage: x = KW.an_element(); x - 123 + 3*32 + 2*3 + e + 123 + 3*2312 + 2*31 + e sage: T = KW.demazure_lusztig_operators(q1,q2) sage: T12 = T.Tw( (1,2) ) diff --git a/src/sage/combinat/symmetric_group_algebra.py b/src/sage/combinat/symmetric_group_algebra.py index b8a0bebab44..9bccba124c8 100644 --- a/src/sage/combinat/symmetric_group_algebra.py +++ b/src/sage/combinat/symmetric_group_algebra.py @@ -101,7 +101,7 @@ def SymmetricGroupAlgebra(R, W, category=None): sage: SGA.group() Weyl Group of type ['A', 3] (as a matrix group acting on the ambient space) sage: SGA.an_element() - s1*s2*s3 + 3*s3*s2 + 2*s3 + 1 + s1*s2*s3 + 3*s2*s3*s1*s2 + 2*s3*s1 + 1 The preferred way to construct the symmetric group algebra is to go through the usual ``algebra`` method:: diff --git a/src/sage/groups/finitely_presented.py b/src/sage/groups/finitely_presented.py index 8d6e443683c..1beb01af87f 100644 --- a/src/sage/groups/finitely_presented.py +++ b/src/sage/groups/finitely_presented.py @@ -596,9 +596,9 @@ def gap(self): sage: k = G.rewriting_system() sage: k.gap() Knuth Bendix Rewriting System for Monoid( [ a, A, b, B ] ) with rules - [ [ a^2, ], [ a*A, ], - [ A*a, ], [ b^2, ], - [ b*B, ], [ B*b, ] ] + [ [ a*A, ], [ A*a, ], + [ b*B, ], [ B*b, ], + [ a^2, ], [ b^2, ] ] """ return self._gap diff --git a/src/sage/groups/fqf_orthogonal.py b/src/sage/groups/fqf_orthogonal.py index 7fc4dbe7548..e5eccd45942 100644 --- a/src/sage/groups/fqf_orthogonal.py +++ b/src/sage/groups/fqf_orthogonal.py @@ -143,7 +143,7 @@ class FqfOrthogonalGroup(AbelianGroupAutomorphismGroup_subgroup): [2/3 0 0] [ 0 2/3 0] [ 0 0 4/3] - generated by 2 elements + generated by 3 elements sage: q = matrix.diagonal(QQ, [3/2, 1/4, 1/4]) sage: T = TorsionQuadraticForm(q) sage: T.orthogonal_group().order() diff --git a/src/sage/groups/libgap_wrapper.pyx b/src/sage/groups/libgap_wrapper.pyx index d25121aa792..dc81b71635b 100644 --- a/src/sage/groups/libgap_wrapper.pyx +++ b/src/sage/groups/libgap_wrapper.pyx @@ -25,7 +25,7 @@ Note how we call the constructor of both superclasses to initialize its output via LibGAP:: sage: FooGroup() - + sage: type(FooGroup().gap()) @@ -106,7 +106,7 @@ class ParentLibGAP(SageObject): ....: ParentLibGAP.__init__(self, lg) ....: Group.__init__(self) sage: FooGroup() - + """ def __init__(self, libgap_parent, ambient=None): @@ -461,7 +461,7 @@ cdef class ElementLibGAP(MultiplicativeGroupElement): ....: ParentLibGAP.__init__(self, lg) ....: Group.__init__(self) sage: FooGroup() - + sage: FooGroup().gens() (f1,) """ diff --git a/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx b/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx index f2ccca042ac..47d6862333c 100644 --- a/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx +++ b/src/sage/groups/perm_gps/partn_ref2/refinement_generic.pyx @@ -427,7 +427,7 @@ cdef class LabelledBranching: sage: from sage.groups.perm_gps.partn_ref2.refinement_generic import LabelledBranching sage: L = LabelledBranching(3) sage: L.small_generating_set() - [] + [()] sage: L.add_gen(libgap.eval('(1,2,3)')) sage: L.small_generating_set() [(1,2,3)] diff --git a/src/sage/groups/perm_gps/permgroup.py b/src/sage/groups/perm_gps/permgroup.py index ebdf7c4c6eb..a5510bcb0ec 100644 --- a/src/sage/groups/perm_gps/permgroup.py +++ b/src/sage/groups/perm_gps/permgroup.py @@ -926,7 +926,7 @@ def _coerce_map_from_(self, G): sage: f = PG._coerce_map_from_(MG) sage: mg = MG.an_element() sage: p = f(mg); p - (2,33,32,23,31,55)(3,49,38,44,40,28)(4,17,59,62,58,46)(5,21,47,20,43,8)(6,53,50)(7,37,12,57,14,29)(9,41,56,34,64,10)(11,25,19)(13,61,26,51,22,15)(16,45,36)(18,27,35,48,52,54)(24,63,42)(30,39,60) + (1,2,6,19,35,33)(3,9,26,14,31,23)(4,13,5)(7,22,17)(8,24,12)(10,16,32,27,20,28)(11,30,18)(15,25,36,34,29,21) sage: PG(p._gap_()) == p True @@ -972,12 +972,12 @@ def _coerce_map_from_(self, G): sage: P = G.as_permutation_group(algorithm='smaller', seed=5) sage: P1 = G.as_permutation_group() sage: P == P1 - False + True sage: g1, g2, g3 = G.gens() sage: P(g1*g2) - (1,3,7,12)(2,4,8,10)(5,11)(6,9) + (1,4,13,11)(2,5,14,18)(3,15,8,16)(6,7)(9,20,19,12)(10,17) sage: P1(g1*g2) - (2,29,25,68)(3,57,13,54)(4,11,72,37)(5,39,60,23)(6,64,75,63)(7,21,50,73)(8,46,38,32)(9,74,35,18)(10,44,49,48)(12,16,34,71)(14,79,27,40)(15,26)(17,62,59,76)(19,78,70,65)(20,22,58,51)(24,33,36,43)(28,81,80,52)(30,53,56,69)(31,61)(41,42,67,55)(45,77)(47,66) + (1,4,13,11)(2,5,14,18)(3,15,8,16)(6,7)(9,20,19,12)(10,17) Another check for :trac:`5583`:: diff --git a/src/sage/libs/gap/libgap.pyx b/src/sage/libs/gap/libgap.pyx index b1a64e57939..6a36613aa8c 100644 --- a/src/sage/libs/gap/libgap.pyx +++ b/src/sage/libs/gap/libgap.pyx @@ -695,7 +695,7 @@ class Gap(Parent): sage: libgap.List sage: libgap.GlobalRandomSource - + """ if name in dir(self.__class__): return getattr(self.__class__, name) diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx index 344ab88c42a..635098767d5 100644 --- a/src/sage/libs/gap/util.pyx +++ b/src/sage/libs/gap/util.pyx @@ -362,15 +362,9 @@ cdef Obj gap_eval(str gap_string) except? NULL: GAPError: Error, Variable: 'Complex' must have a value Syntax error: ; expected in stream:1 Complex Field with 53 bits of precision;; - ^^^^^^^^^^^^ + ^^^^^ Error, Variable: 'with' must have a value - Syntax error: ; expected in stream:1 - Complex Field with 53 bits of precision;; - ^^^^^^^^^^^^^^^^^^^^ Error, Variable: 'bits' must have a value - Syntax error: ; expected in stream:1 - Complex Field with 53 bits of precision;; - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error, Variable: 'precision' must have a value Test that on a subsequent attempt we get the same message (no garbage was diff --git a/src/sage/tests/gap_packages.py b/src/sage/tests/gap_packages.py index 2e4518ca226..c302b169b8a 100644 --- a/src/sage/tests/gap_packages.py +++ b/src/sage/tests/gap_packages.py @@ -103,7 +103,7 @@ def all_installed_packages(ignore_dot_gap=False, gap=None): sage: from sage.tests.gap_packages import all_installed_packages sage: all_installed_packages() - (...'GAPDoc'...) + (...'gapdoc'...) sage: all_installed_packages(ignore_dot_gap=True) == all_installed_packages(gap=gap, ignore_dot_gap=True) True """ From b24d42e082a9008a427cab900983edcafd3a34de Mon Sep 17 00:00:00 2001 From: Antonio Rojas Date: Fri, 30 Sep 2022 19:17:42 +0200 Subject: [PATCH 409/751] Adapt test to new is_transitive and is_primitive behavior --- src/sage/groups/perm_gps/permgroup.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/sage/groups/perm_gps/permgroup.py b/src/sage/groups/perm_gps/permgroup.py index a5510bcb0ec..1bb4f7486ac 100644 --- a/src/sage/groups/perm_gps/permgroup.py +++ b/src/sage/groups/perm_gps/permgroup.py @@ -4370,17 +4370,23 @@ def is_transitive(self, domain=None): :: - sage: G = PermutationGroup([[(1,2,3,4,5)],[(1,2)]]) #S_5 on [1..5] - sage: G.is_transitive([1,4,5]) + sage: G = PermutationGroup([[(1,2,3,4,5)],[(1,2)],[(6,7)]]) + sage: G.is_transitive([1,2,3,4,5]) True - sage: G.is_transitive([2..6]) + sage: G.is_transitive([1..7]) False sage: G.is_transitive(G.non_fixed_points()) - True + False sage: H = PermutationGroup([[(1,2,3)],[(4,5,6)]]) sage: H.is_transitive(H.non_fixed_points()) False + If `G` does not act on the domain, it always returns ``False``:: + + sage: G = PermutationGroup([[(1,2,3,4,5)],[(1,2)]]) #S_5 on [1..5] + sage: G.is_transitive([1,4,5]) + False + Note that this differs from the definition in GAP, where ``IsTransitive`` returns whether the group is transitive on the set of points moved by the group. @@ -4436,12 +4442,16 @@ def is_primitive(self, domain=None): sage: G = PermutationGroup([[(1,2,3,4)],[(2,4)]]) sage: G.is_primitive([1..4]) False - sage: G.is_primitive([1,2,3]) - True sage: G = PermutationGroup([[(3,4,5,6)],[(3,4)]]) #S_4 on [3..6] sage: G.is_primitive(G.non_fixed_points()) True + If `G` does not act on the domain, it always returns ``False``:: + + sage: G = PermutationGroup([[(1,2,3,4)],[(2,4)]]) + sage: G.is_primitive([1,2,3]) + False + """ #If the domain is not a subset of self.domain(), then the #action isn't primitive. From 271a5ba937c8be86077ebd6665ddcebddca22d39 Mon Sep 17 00:00:00 2001 From: Antonio Rojas Date: Fri, 30 Sep 2022 19:18:06 +0200 Subject: [PATCH 410/751] Mark test as random. With gap 4.12 on x86_64 it is no longer 2 --- src/sage/groups/perm_gps/permgroup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/groups/perm_gps/permgroup.py b/src/sage/groups/perm_gps/permgroup.py index 1bb4f7486ac..fb14008c8e0 100644 --- a/src/sage/groups/perm_gps/permgroup.py +++ b/src/sage/groups/perm_gps/permgroup.py @@ -1302,7 +1302,7 @@ def gens_small(self): sage: G.gens_small() # random [('b','c'), ('a','c','b')] ## (on 64-bit Linux) [('a','b'), ('a','c','b')] ## (on Solaris) - sage: len(G.gens_small()) == 2 + sage: len(G.gens_small()) == 2 # random True """ gens = self._libgap_().SmallGeneratingSet() From 8c8d75609a399867ba9f9158a25af782149a9d03 Mon Sep 17 00:00:00 2001 From: Antonio Rojas Date: Fri, 30 Sep 2022 19:18:30 +0200 Subject: [PATCH 411/751] Remove test that is now redundant, all seeds give the same answer --- src/sage/groups/matrix_gps/finitely_generated.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/sage/groups/matrix_gps/finitely_generated.py b/src/sage/groups/matrix_gps/finitely_generated.py index a6d3dc02513..63956ad5f10 100644 --- a/src/sage/groups/matrix_gps/finitely_generated.py +++ b/src/sage/groups/matrix_gps/finitely_generated.py @@ -563,9 +563,6 @@ def as_permutation_group(self, algorithm=None, seed=None): 21499084800 sage: P = G.as_permutation_group() sage: Psmaller = G.as_permutation_group(algorithm="smaller", seed=6) - sage: P == Psmaller # see the note below - True - sage: Psmaller = G.as_permutation_group(algorithm="smaller") sage: P == Psmaller False sage: P.cardinality() From 21537e7a53d00561726a2b4232fdc70d2d21fe3f Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Mon, 17 Oct 2022 07:30:12 -0700 Subject: [PATCH 412/751] install gap 4.12.0 --- build/pkgs/gap/checksums.ini | 6 +++--- build/pkgs/gap/package-version.txt | 2 +- build/pkgs/gap/spkg-install.in | 32 +++++++++++++++--------------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/build/pkgs/gap/checksums.ini b/build/pkgs/gap/checksums.ini index 066e943308a..47ee0863346 100644 --- a/build/pkgs/gap/checksums.ini +++ b/build/pkgs/gap/checksums.ini @@ -1,5 +1,5 @@ tarball=gap-VERSION.tar.gz -sha1=4ecdd281b8f430282fb9b12690b06e0a26abde10 -md5=85dc9e459d5b6c66fcad9f468afd3e3e -cksum=1351843158 +sha1=b8b2d803c43dc6ea4413b5a378689a2087c3658a +md5=6772845916c31de880792c7bb1672f81 +cksum=3760719912 upstream_url=/~https://github.com/gap-system/gap/releases/download/vVERSION/gap-VERSION.tar.gz diff --git a/build/pkgs/gap/package-version.txt b/build/pkgs/gap/package-version.txt index d782fca8f64..815588ef140 100644 --- a/build/pkgs/gap/package-version.txt +++ b/build/pkgs/gap/package-version.txt @@ -1 +1 @@ -4.11.1 +4.12.0 diff --git a/build/pkgs/gap/spkg-install.in b/build/pkgs/gap/spkg-install.in index 2ceadf99db4..781eb758c01 100644 --- a/build/pkgs/gap/spkg-install.in +++ b/build/pkgs/gap/spkg-install.in @@ -25,7 +25,7 @@ sdh_make -j1 sdh_make install-headers install-libgap # Install config.h, which is not currently handled by `make install-headers` -sdh_install gen/config.h "$SAGE_LOCAL/include/gap" +sdh_install build/config.h "$SAGE_LOCAL/include/gap" # Now install the gap executable as "gap-bin"; it will be called normally # through our wrapper script that sets the appropriate GAP_ROOT @@ -40,14 +40,14 @@ mkdir -p "$SAGE_DESTDIR$SAGE_BIN" || sdh_die "Failed to create the directory $SA # Now copy additional files GAP needs to run (and a few optional bits) into # GAP_ROOT; we don't need everything from the source tree -sdh_install bin doc gen grp lib src tst sysinfo.gap "$GAP_ROOT" +sdh_install bin doc grp lib src tst sysinfo.gap "$GAP_ROOT" # GAP's copy of libtool is also used by the toolchain for build GAP packages # (i.e. by gac) sdh_install libtool "$GAP_ROOT" # Install only the minimal packages GAP needs to run -sdh_install pkg/GAPDoc-* pkg/primgrp-* pkg/SmallGrp-* pkg/transgrp "$GAP_ROOT"/pkg +sdh_install pkg/gapdoc pkg/primgrp pkg/smallgrp pkg/transgrp "$GAP_ROOT"/pkg # Install additional packages that are not strictly required, but that are # typically "expected" to be loaded: These are the default packages that are @@ -58,20 +58,20 @@ sdh_install pkg/GAPDoc-* pkg/primgrp-* pkg/SmallGrp-* pkg/transgrp "$GAP_ROOT"/p # Also include atlasrep which is a dependency of tomlib sdh_install \ pkg/atlasrep \ - pkg/autpgrp-* \ - pkg/alnuth-* \ - pkg/crisp-* \ - pkg/ctbllib-* \ - pkg/FactInt-* \ + pkg/autpgrp \ + pkg/alnuth \ + pkg/crisp \ + pkg/ctbllib \ + pkg/factint \ pkg/fga \ - pkg/irredsol-* \ - pkg/laguna-* \ - pkg/PackageManager-* \ - pkg/polenta-* \ - pkg/polycyclic-* \ - pkg/resclasses-* \ - pkg/sophus-* \ - pkg/tomlib-* \ + pkg/irredsol \ + pkg/laguna \ + pkg/packagemanager \ + pkg/polenta \ + pkg/polycyclic \ + pkg/resclasses \ + pkg/sophus \ + pkg/tomlib \ "$GAP_ROOT"/pkg # Install the GAP startup script; ensure it is executable From da558e178209f57a579e1ea6fe6d7f5c326d951a Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Mon, 17 Oct 2022 21:18:27 +0100 Subject: [PATCH 413/751] upgrade libsemigroup and gap_packages adjust doctests --- .../gap_packages/patches/cohomolo-gcc10.patch | 150 ------------------ .../patches/guava_leon_includes.patch | 13 -- build/pkgs/libsemigroups/checksums.ini | 6 +- build/pkgs/libsemigroups/package-version.txt | 2 +- build/pkgs/libsemigroups/spkg-install.in | 2 +- src/sage/combinat/posets/posets.py | 2 +- 6 files changed, 6 insertions(+), 169 deletions(-) delete mode 100644 build/pkgs/gap_packages/patches/cohomolo-gcc10.patch delete mode 100644 build/pkgs/gap_packages/patches/guava_leon_includes.patch diff --git a/build/pkgs/gap_packages/patches/cohomolo-gcc10.patch b/build/pkgs/gap_packages/patches/cohomolo-gcc10.patch deleted file mode 100644 index e45fe7d9c6f..00000000000 --- a/build/pkgs/gap_packages/patches/cohomolo-gcc10.patch +++ /dev/null @@ -1,150 +0,0 @@ -diff --git a/pkg/cohomolo-1.6.8/standalone/progs.d/crp1.c b/pkg/cohomolo-1.6.8/standalone/progs.d/crp1.c -index 3bbdc45..7df699f 100644 ---- a/pkg/cohomolo-1.6.8/standalone/progs.d/crp1.c -+++ b/pkg/cohomolo-1.6.8/standalone/progs.d/crp1.c -@@ -8,9 +8,8 @@ extern short sp[],**mat[],*psp[],**imcos[],**cpco[],lorb[], - short *cst,**cpst,***cdpst,**svptr,*cp,*rel; - short *spst,**pspst,**pptr,**cpptr,npt,nb,nph,nph2,npg,npg2, - rno,orno,coh_index,*invg; --FILE *ip,*op; - --void seeknln (void) { while (getc(ip)!='\n'); } -+void seeknln (FILE *ip) { while (getc(ip)!='\n'); } - - /* This program differs from most other permutation programs in that perms are - all stored in the single array sp. Schreier vectors are stored in the short -@@ -23,13 +22,14 @@ void seeknln (void) { while (getc(ip)!='\n'); } - int - crprog1 (void) - { short *pc,*qc,ex,neg; int x; -+ FILE *ip,*op; - short i,j,k,l,m,n,cl,rl,*p,ocl,im,pt,pt1,pn,ipt; - if ((ip=fopen(inf2,"r"))== 0) - { fprintf(stderr,"Cannot open %s.\n",inf2); return(-1);} - fscanf(ip,"%hd%hd%hd%hd",&npt,&nph,&nb,&k); - if (nb>=mb) {fprintf(stderr,"nb too big. Increase MB.\n"); return(-1);} - if (k<=2) {fprintf(stderr,"inf2 has illegal format.\n"); return(-1); } -- seeknln(); seeknln(); -+ seeknln(ip); seeknln(ip); - for (i=1;i<=nb;i++) fscanf(ip,"%hd",lorb+i); - pptr=psp-1; pspst=psp+nph; svptr=cpsp-1; cpst=cpsp+nb; - invg=sp; nph2=2*nph; spst=sp+nph2; -@@ -37,7 +37,7 @@ crprog1 (void) - { pptr[i]=spst+(i-1)*npt-1; p=pptr[i]; - for (j=1;j<=npt;j++) {fscanf(ip,"%hd",&k); p[k]=j; } - invg[2*i-2]=2*i-1; invg[2*i-1]=2*i-2; -- seeknln(); -+ seeknln(ip); - } - spst+=(npt*nph); - for (i=1;i<=nb;i++) -@@ -75,7 +75,7 @@ crprog1 (void) - strcpy(inf1,inf0); strcat(inf1,".rel"); - if ((ip=fopen(inf1,"r"))==0) - { fprintf(stderr,"Cannot open %s.\n",inf1); return(-1);} -- fscanf(ip,"%hd%hd",&k,&rno); seeknln(); -+ fscanf(ip,"%hd%hd",&k,&rno); seeknln(ip); - op=fopen(outft,"w"); - /* Now we have read everything in, and the computation can start */ - orno=0; -diff --git a/pkg/cohomolo-1.6.8/standalone/progs.d/nq+chfns.c b/pkg/cohomolo-1.6.8/standalone/progs.d/nq+chfns.c -index a7396b2..658496f 100644 ---- a/pkg/cohomolo-1.6.8/standalone/progs.d/nq+chfns.c -+++ b/pkg/cohomolo-1.6.8/standalone/progs.d/nq+chfns.c -@@ -20,8 +20,6 @@ short mexp=MEXP,mcl=MCL,no,rel[RSP],wt[MEXP],exp,*rpf,*rpb, - extern short prime,dim,*spv,**spm,mspace[],*vec[],**mat[],cp[],pinv[],opmats, - mm,mv; - extern int msp; --FILE *ip,*op; -- - - int - calcmats (void) -@@ -59,7 +57,7 @@ calcmats (void) - } - for (i=1;i<=exp;i++) trans(mat[i+exp],mat[i]); - if (opmats) -- { op=fopen(outf,"w"); -+ { FILE *op=fopen(outf,"w"); - fprintf(op,"%4d%4d%4d\n",prime,dim,exp); - for (i=1;i<=exp;i++) printmat(mat[i]); - fclose(op); -@@ -71,6 +69,7 @@ int - rdmats (void) - /* reads matrices of generators of P */ - { short i; int quot; -+ FILE *ip; - ip=fopen(inf4,"r"); - if (ip==0) - { fprintf(stderr,"Cannot open %s\n ",inf4); return(-1); } -@@ -90,12 +89,12 @@ rdmats (void) - fclose(ip); - return(0); - } --FILE *ip; - - int - ingp (int inp) - /* Read in output of respcrun -s */ - { short i,j,k,l,m,*orpf,**pcp; -+ FILE *ip; - ip=fopen(inf3,"r"); - if (ip==0) { fprintf(stderr,"Cannot open %s\n",inf3); return(-1); } - fscanf(ip,"%hd%hd%hd%hd%hd%hd",&prime,&exp,&i,&no,&j,&m); -diff --git a/pkg/cohomolo-1.6.8/standalone/progs.d/nqmfns.c b/pkg/cohomolo-1.6.8/standalone/progs.d/nqmfns.c -index 0896551..6841bc8 100644 ---- a/pkg/cohomolo-1.6.8/standalone/progs.d/nqmfns.c -+++ b/pkg/cohomolo-1.6.8/standalone/progs.d/nqmfns.c -@@ -9,7 +9,6 @@ extern short intexp,mexp,mng,wksp, - spugen[],*tlintg[]; - extern int ptrsp,rsp; - short fac; --FILE *ip,*op; - - int - ingp (void) -@@ -18,6 +17,7 @@ ingp (void) - of nqrun, and tails are also read in. - */ - { short i,j,k,l,m,x,y,no,*orpf,*orpb,**pcp; char tails; -+ FILE *ip; - if ((ip=fopen(inf1,"r"))==0) - { fprintf(stderr,"Cannot open %s.\n",inf1); return(-1); } - fscanf(ip,"%hd%hd%hd%hd%hd%hd",&prime,&exp,&nng,&no,&class,&m); -@@ -89,6 +89,7 @@ int - outgp (void) - /* The PCP is output, together with tails */ - { short i,k,l,**pcp,*b,*e,*c; -+ FILE *op; - op=fopen(outf,"w"); - fprintf(op,"%4d%4d%4d%4d%4d%4d\n",prime,exp,nng,exp,class,1); - for (i=1;i<=exp;i++) fprintf(op,"%4d",wt[i]); fprintf(op,"\n"); -@@ -379,7 +380,7 @@ restart: - nng--; mnng--; enexpnt--; - if (nng==0) - { if (gap) -- { op=fopen(outfm,"w"); fprintf(op,"COHOMOLO.Multiplier:=[];\n"); -+ { FILE *op=fopen(outfm,"w"); fprintf(op,"COHOMOLO.Multiplier:=[];\n"); - fclose(op); - printf("All new generators eliminated. Multiplier is trivial.\n"); - } -diff --git a/pkg/cohomolo-1.6.8/standalone/progs.d/nqmp.c b/pkg/cohomolo-1.6.8/standalone/progs.d/nqmp.c -index 01cf914..0144883 100644 ---- a/pkg/cohomolo-1.6.8/standalone/progs.d/nqmp.c -+++ b/pkg/cohomolo-1.6.8/standalone/progs.d/nqmp.c -@@ -9,7 +9,6 @@ extern short intexp,mng,mexp,wksp, - spugen[],*intg[],*imintg[],*tlintg[]; - extern int ptrsp,rsp; - short *wf,*wc; char norm; --FILE *ip,*op; - - /* The data structures for this program and for nqrun are similar. - d1 and d2 contain definitions of generators. (Def. comes from commutator -@@ -35,6 +34,7 @@ nqmprog (void) - { short i,j,k,l,m,d,*gi,*gj,*ti,*tj,cl,def,*ps,*pf,**dp,*nrpb,*p,*orpf,*orpb, - nb,np,k1,*rno,*covrel,**pgen,tdef,sgn; - char nt; -+ FILE *ip,*op; - if (ingp() == -1) {fprintf(stderr,"Input error.\n"); return(-1); } - eexpnt=expnt+exp; enexpnt=nexpnt+nng; - diff --git a/build/pkgs/gap_packages/patches/guava_leon_includes.patch b/build/pkgs/gap_packages/patches/guava_leon_includes.patch deleted file mode 100644 index cdcd19cc3e8..00000000000 --- a/build/pkgs/gap_packages/patches/guava_leon_includes.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- a/pkg/guava-3.15/src/leon/src/generate.c Sat Feb 29 09:02:10 2020 ---- b/pkg/guava-3.15/src/leon/src/generate.c Thu Sep 24 13:58:36 2020 -*************** -*** 115,120 **** ---- 115,122 ---- - #include "groupio.h" - #include "enum.h" - #include "storage.h" -+ #include "chbase.h" -+ #include "inform.h" - - #ifdef ALT_TIME_HEADER - #include "cputime.h" diff --git a/build/pkgs/libsemigroups/checksums.ini b/build/pkgs/libsemigroups/checksums.ini index 62c4268515f..a21c656daa1 100644 --- a/build/pkgs/libsemigroups/checksums.ini +++ b/build/pkgs/libsemigroups/checksums.ini @@ -1,5 +1,5 @@ tarball=libsemigroups-VERSION.tar.gz -sha1=2b16c095cc5ffd3f77a71dfbf48cce188e054c03 -md5=7082cadcf7a195ccb93175cd72b6db95 -cksum=1501022358 +sha1=96f38260f9c7224c5e89ff065ea86f6702a24bad +md5=a1644b88b5bd7f0b1ff5f7a416faf10f +cksum=2033539785 upstream_url=/~https://github.com/libsemigroups/libsemigroups/releases/download/vVERSION/libsemigroups-VERSION.tar.gz diff --git a/build/pkgs/libsemigroups/package-version.txt b/build/pkgs/libsemigroups/package-version.txt index 9084fa2f716..2bf1c1ccf36 100644 --- a/build/pkgs/libsemigroups/package-version.txt +++ b/build/pkgs/libsemigroups/package-version.txt @@ -1 +1 @@ -1.1.0 +2.3.1 diff --git a/build/pkgs/libsemigroups/spkg-install.in b/build/pkgs/libsemigroups/spkg-install.in index 2aaf0e99043..128b54d2f99 100644 --- a/build/pkgs/libsemigroups/spkg-install.in +++ b/build/pkgs/libsemigroups/spkg-install.in @@ -1,4 +1,4 @@ cd src -sdh_configure +sdh_configure --disable-eigen sdh_make sdh_make_install diff --git a/src/sage/combinat/posets/posets.py b/src/sage/combinat/posets/posets.py index 2836d59d960..8c882d5ac3b 100644 --- a/src/sage/combinat/posets/posets.py +++ b/src/sage/combinat/posets/posets.py @@ -8813,7 +8813,7 @@ def _libgap_(self): sage: libgap(P) # optional - gap_packages sage: A = libgap(GF(2)).PosetAlgebra(P); A # optional - gap_packages - ]/]>, (1 generators)>> + ]/]>, (1 generator)>> sage: A.Dimension() # optional - gap_packages 13 """ From 821f9da43c1a28ce70c14a259f1397e0f72f2ac0 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Mon, 17 Oct 2022 09:09:10 -0700 Subject: [PATCH 414/751] add GAP upstream PR 5077 --- build/pkgs/gap/patches/5077.patch | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 build/pkgs/gap/patches/5077.patch diff --git a/build/pkgs/gap/patches/5077.patch b/build/pkgs/gap/patches/5077.patch new file mode 100644 index 00000000000..a07811e049a --- /dev/null +++ b/build/pkgs/gap/patches/5077.patch @@ -0,0 +1,15 @@ +diff --git a/src/common.h b/src/common.h +index e7c10b8d0b..95e6f3d609 100644 +--- a/src/common.h ++++ b/src/common.h +@@ -35,6 +35,10 @@ + // compiled with the wrong ABI + GAP_STATIC_ASSERT(sizeof(void *) == SIZEOF_VOID_P, "sizeof(void *) is wrong"); + ++// if no GC is selected explicitly, default to GASMAN ++#if !defined(USE_BOEHM_GC) && !defined(USE_JULIA_GC) && !defined(USE_GASMAN) ++#define USE_GASMAN 1 ++#endif + + // check for cygwin + #if defined(__CYGWIN__) || defined(__CYGWIN32__) From c5410a227d017485cb0fff6fa720bf49aaee0983 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Mon, 17 Oct 2022 21:33:20 +0100 Subject: [PATCH 415/751] also, fix the package names etc --- build/pkgs/gap_packages/spkg-install.in | 52 ++++++++++++------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/build/pkgs/gap_packages/spkg-install.in b/build/pkgs/gap_packages/spkg-install.in index 168e6b11532..31f34a9343e 100644 --- a/build/pkgs/gap_packages/spkg-install.in +++ b/build/pkgs/gap_packages/spkg-install.in @@ -11,33 +11,33 @@ cd "$PKG_SRC_DIR" # (GAP 4.8.6 still had it, but this is gone in 4.10) sdh_install \ - aclib-* \ - AutoDoc-* \ - corelg-* \ - crime-* \ + aclib \ + autodoc \ + corelg \ + crime \ cryst \ crystcat \ - design-* \ + design \ gbnp \ - genss-* \ - hap-* \ - hapcryst-* \ - hecke-* \ - images-* \ - liealgdb-* \ - liepring-* \ - liering-* \ - loops-* \ - MapClass-* \ - polymaking-* \ - qpa-* \ - quagroup-* \ - radiroot-* \ - repsn-* \ - sla-* \ - sonata-* \ - Toric-* \ - utils-* \ + genss \ + hap \ + hapcryst \ + hecke \ + images \ + liealgdb \ + liepring \ + liering \ + loops \ + mapclass \ + polymaking \ + qpa \ + quagroup \ + radiroot \ + repsn \ + sla \ + sonata \ + toric \ + utils \ "$PKG_DIR" install_compiled_pkg() @@ -65,7 +65,7 @@ install_compiled_pkg() # # These packages have an old ./configure that take the GAP_ROOT as a positional # argument -for pkg in cohomolo-* crypting-* grape-* guava-* orb-* datastructures-* +for pkg in cohomolo crypting grape guava orb datastructures do echo "Building GAP package $pkg" CFLAGS="$CFLAGS -Wno-implicit-function-declaration" @@ -91,7 +91,7 @@ pararr=( " " " " "--with-external-planarity" "--with-external-libsemigroups" ) ############################################################################## parind=0 -for pkg in nq-* io-* digraphs-* semigroups-* +for pkg in nq io digraphs semigroups do echo "Building GAP package $pkg" cd "$PKG_SRC_DIR/$pkg" From f30806e97cbef18f16289c6c3511431e74372bd6 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Fri, 21 Oct 2022 10:48:56 +0100 Subject: [PATCH 416/751] update GAP to 4.12.1 --- build/pkgs/gap/checksums.ini | 6 +++--- build/pkgs/gap/package-version.txt | 2 +- build/pkgs/gap/patches/5077.patch | 15 --------------- 3 files changed, 4 insertions(+), 19 deletions(-) delete mode 100644 build/pkgs/gap/patches/5077.patch diff --git a/build/pkgs/gap/checksums.ini b/build/pkgs/gap/checksums.ini index 47ee0863346..d7821a94d1b 100644 --- a/build/pkgs/gap/checksums.ini +++ b/build/pkgs/gap/checksums.ini @@ -1,5 +1,5 @@ tarball=gap-VERSION.tar.gz -sha1=b8b2d803c43dc6ea4413b5a378689a2087c3658a -md5=6772845916c31de880792c7bb1672f81 -cksum=3760719912 +sha1=72e1e31c16cb4b343dc0defef1357198c2e68ef5 +md5=daeb412b41a518903e60d39b94f8797b +cksum=1088892847 upstream_url=/~https://github.com/gap-system/gap/releases/download/vVERSION/gap-VERSION.tar.gz diff --git a/build/pkgs/gap/package-version.txt b/build/pkgs/gap/package-version.txt index 815588ef140..53cf85e173b 100644 --- a/build/pkgs/gap/package-version.txt +++ b/build/pkgs/gap/package-version.txt @@ -1 +1 @@ -4.12.0 +4.12.1 diff --git a/build/pkgs/gap/patches/5077.patch b/build/pkgs/gap/patches/5077.patch deleted file mode 100644 index a07811e049a..00000000000 --- a/build/pkgs/gap/patches/5077.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/src/common.h b/src/common.h -index e7c10b8d0b..95e6f3d609 100644 ---- a/src/common.h -+++ b/src/common.h -@@ -35,6 +35,10 @@ - // compiled with the wrong ABI - GAP_STATIC_ASSERT(sizeof(void *) == SIZEOF_VOID_P, "sizeof(void *) is wrong"); - -+// if no GC is selected explicitly, default to GASMAN -+#if !defined(USE_BOEHM_GC) && !defined(USE_JULIA_GC) && !defined(USE_GASMAN) -+#define USE_GASMAN 1 -+#endif - - // check for cygwin - #if defined(__CYGWIN__) || defined(__CYGWIN32__) From ca2d08df3388bb7c3748099406b52a665d4f9190 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Fri, 21 Oct 2022 15:32:23 +0100 Subject: [PATCH 417/751] install GAP package singular - new dependency of liepring --- build/pkgs/gap_packages/spkg-install.in | 1 + 1 file changed, 1 insertion(+) diff --git a/build/pkgs/gap_packages/spkg-install.in b/build/pkgs/gap_packages/spkg-install.in index 31f34a9343e..f4db33d0862 100644 --- a/build/pkgs/gap_packages/spkg-install.in +++ b/build/pkgs/gap_packages/spkg-install.in @@ -34,6 +34,7 @@ sdh_install \ quagroup \ radiroot \ repsn \ + singular \ sla \ sonata \ toric \ From 41cf21223f4458aa6c749f6e47cdf2536fb7b20b Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Sun, 23 Oct 2022 19:58:53 +0100 Subject: [PATCH 418/751] moved install of radiroot to gap from gap_packages --- build/pkgs/gap/spkg-install.in | 1 + build/pkgs/gap_packages/spkg-install.in | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pkgs/gap/spkg-install.in b/build/pkgs/gap/spkg-install.in index 781eb758c01..e097e0a97d8 100644 --- a/build/pkgs/gap/spkg-install.in +++ b/build/pkgs/gap/spkg-install.in @@ -69,6 +69,7 @@ sdh_install \ pkg/packagemanager \ pkg/polenta \ pkg/polycyclic \ + pkg/radiroot \ pkg/resclasses \ pkg/sophus \ pkg/tomlib \ diff --git a/build/pkgs/gap_packages/spkg-install.in b/build/pkgs/gap_packages/spkg-install.in index f4db33d0862..0925540114b 100644 --- a/build/pkgs/gap_packages/spkg-install.in +++ b/build/pkgs/gap_packages/spkg-install.in @@ -32,7 +32,6 @@ sdh_install \ polymaking \ qpa \ quagroup \ - radiroot \ repsn \ singular \ sla \ From 2f552b06502214985b4ca1f425e7524df16ff575 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Sun, 23 Oct 2022 20:02:22 +0100 Subject: [PATCH 419/751] moved install of autodoc and utils to gap from gap_packages --- build/pkgs/gap/spkg-install.in | 2 ++ build/pkgs/gap_packages/spkg-install.in | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/pkgs/gap/spkg-install.in b/build/pkgs/gap/spkg-install.in index e097e0a97d8..ea071134a86 100644 --- a/build/pkgs/gap/spkg-install.in +++ b/build/pkgs/gap/spkg-install.in @@ -58,6 +58,7 @@ sdh_install pkg/gapdoc pkg/primgrp pkg/smallgrp pkg/transgrp "$GAP_ROOT"/pkg # Also include atlasrep which is a dependency of tomlib sdh_install \ pkg/atlasrep \ + pkg/autodoc \ pkg/autpgrp \ pkg/alnuth \ pkg/crisp \ @@ -73,6 +74,7 @@ sdh_install \ pkg/resclasses \ pkg/sophus \ pkg/tomlib \ + pkg/utils \ "$GAP_ROOT"/pkg # Install the GAP startup script; ensure it is executable diff --git a/build/pkgs/gap_packages/spkg-install.in b/build/pkgs/gap_packages/spkg-install.in index 0925540114b..213e9439c04 100644 --- a/build/pkgs/gap_packages/spkg-install.in +++ b/build/pkgs/gap_packages/spkg-install.in @@ -12,7 +12,6 @@ cd "$PKG_SRC_DIR" sdh_install \ aclib \ - autodoc \ corelg \ crime \ cryst \ @@ -37,7 +36,6 @@ sdh_install \ sla \ sonata \ toric \ - utils \ "$PKG_DIR" install_compiled_pkg() From 32c4a63056d72ac5d2b5ef8e9477dcecc0d2e9a6 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Fri, 4 Nov 2022 14:01:37 +0000 Subject: [PATCH 420/751] don't use SAGE_LOCAL/share/gap, switch to GAP's "make install" also add a workaround for Semigroups (see comment in the code) --- build/pkgs/gap/spkg-install.in | 61 +++---------------------- build/pkgs/gap_packages/spkg-install.in | 16 +++---- 2 files changed, 12 insertions(+), 65 deletions(-) diff --git a/build/pkgs/gap/spkg-install.in b/build/pkgs/gap/spkg-install.in index ea071134a86..5284cfad1f5 100644 --- a/build/pkgs/gap/spkg-install.in +++ b/build/pkgs/gap/spkg-install.in @@ -8,8 +8,7 @@ export CFLAGS=$CFLAGS_NON_NATIVE export CXXFLAGS=$CXXFLAGS_NON_NATIVE GAP_BUILD_ROOT="$(pwd)" -GAP_ROOT="$SAGE_LOCAL/share/gap" -DESTDIR_GAP_ROOT="$SAGE_DESTDIR$GAP_ROOT" +GAP_ROOT="$SAGE_LOCAL/lib/gap" # Enable debug info if requested. # Note that -g3 allows you to use preprocessor macros in gdb which are widely used @@ -17,34 +16,14 @@ if [ "$SAGE_DEBUG" = yes ] ; then export CFLAGS="-O0 -g3 -DDEBUG_MASTERPOINTERS -DDEBUG_GLOBAL_BAGS -DDEBUG_FUNCTIONS_BAGS $CFLAGS" fi -sdh_configure $SAGE_CONFIGURE_GMP -sdh_make -j1 +# LDFLAGS hack below needed by Semigroups package +sdh_configure $SAGE_CONFIGURE_GMP LDFLAGS="-pthread" --prefix=$SAGE_LOCAL +sdh_make # GAP's "make install" is work in progress; we use bits and pieces of it # but we install many things manually. -sdh_make install-headers install-libgap - -# Install config.h, which is not currently handled by `make install-headers` -sdh_install build/config.h "$SAGE_LOCAL/include/gap" - -# Now install the gap executable as "gap-bin"; it will be called normally -# through our wrapper script that sets the appropriate GAP_ROOT -SAGE_BIN="$SAGE_LOCAL/bin" -mkdir -p "$SAGE_DESTDIR$SAGE_BIN" || sdh_die "Failed to create the directory $SAGE_BIN" - -./libtool --mode=install install gap "$SAGE_DESTDIR$SAGE_BIN/gap-bin" || \ - sdh_die "Failed to install gap-bin to $SAGE_BIN" - -./libtool --mode=install install gac "$SAGE_DESTDIR$SAGE_BIN/gac" || \ - sdh_die "Failed to install gac to $SAGE_BIN" - -# Now copy additional files GAP needs to run (and a few optional bits) into -# GAP_ROOT; we don't need everything from the source tree -sdh_install bin doc grp lib src tst sysinfo.gap "$GAP_ROOT" - -# GAP's copy of libtool is also used by the toolchain for build GAP packages -# (i.e. by gac) -sdh_install libtool "$GAP_ROOT" +sdh_make install +# sdh_make install-headers install-libgap # Install only the minimal packages GAP needs to run sdh_install pkg/gapdoc pkg/primgrp pkg/smallgrp pkg/transgrp "$GAP_ROOT"/pkg @@ -77,34 +56,6 @@ sdh_install \ pkg/utils \ "$GAP_ROOT"/pkg -# Install the GAP startup script; ensure it is executable -sdh_install -T ../gap "$SAGE_BIN/gap" -chmod +x "$SAGE_DESTDIR$SAGE_BIN/gap" - -# Create symlinks under $GAP_ROOT for these executables, as they are expected -# (especially when building kernel packages) to exist -ln -sf "../../bin/gap-bin" "$DESTDIR_GAP_ROOT/gap" -ln -sf "../../bin/gac" "$DESTDIR_GAP_ROOT/gac" - -# Fix the $GAP_ROOT/bin//src symlink to be relative (otherwise it links -# to the actual path of the sources GAP was compiled from) -for srclink in "$DESTDIR_GAP_ROOT"/bin/*/src; do - rm -f "$srclink" - ln -s "../../src" "$srclink" -done - -# Additional fixups for some files after they have been copied into their -# destination directory. gac and sysinfo.gap are generated files that contain -# in them hard-coded references to the GAP build directory, which will soon -# be going away. This breaks the build toolchain for some compiled GAP -# packages. We need to replace these paths with the final GAP_ROOT path. The -# below will work so long as neither of these paths contain '|', and if they do -# then god help you. https://trac.sagemath.org/ticket/27218 -sed -i -e "s|$GAP_BUILD_ROOT|$GAP_ROOT|g" \ - "$SAGE_DESTDIR$SAGE_BIN/gac" "$DESTDIR_GAP_ROOT/sysinfo.gap" \ - "$DESTDIR_GAP_ROOT/bin/gap.sh" "$DESTDIR_GAP_ROOT/doc/make_doc" || \ - sdh_die "Failed to fix up hard-coded paths in GAP build tools." - # TODO: This seems unnecessary--we are already installing all of doc/ to # GAP_ROOT, which is necessary for some functionality in GAP to work. Do # we need this? Maybe doc/gap could just be a symlink to gap/doc?? diff --git a/build/pkgs/gap_packages/spkg-install.in b/build/pkgs/gap_packages/spkg-install.in index 213e9439c04..6dff182a48f 100644 --- a/build/pkgs/gap_packages/spkg-install.in +++ b/build/pkgs/gap_packages/spkg-install.in @@ -1,4 +1,4 @@ -GAP_ROOT="$SAGE_LOCAL/share/gap" +GAP_ROOT="$SAGE_LOCAL/lib/gap" PKG_DIR="$GAP_ROOT/pkg" PKG_SRC_DIR="$(pwd)/src/pkg" @@ -43,20 +43,16 @@ install_compiled_pkg() local pkg="$1" # Install the bin/ dir (where compiled modules should end up) # under /lib/gap; we then symlink to it later - sdh_install bin "$SAGE_LOCAL/lib/gap/pkg/$pkg" + sdh_install * "$SAGE_LOCAL/lib/gap/pkg/$pkg" + # TODO: # Clean up any build artificts before installing the rest of the package # Also remove configure/Makefiles # Note: None, if any of the packages really have a proper install target - make clean # Works for some packages but not all - rm -rf bin/ - rm -rf configure configure.* config.* autogen.sh *.m4 Makefile* m4/ + #make clean # Works for some packages but not all + #rm -rf bin/ + #rm -rf configure configure.* config.* autogen.sh *.m4 Makefile* m4/ - # Create the bin/ symlink - ln -s "$SAGE_LOCAL/lib/gap/pkg/$pkg/bin" bin - - # Install the rest of the package files - sdh_install * "$PKG_DIR/$pkg" } # Build and install compiled packages: From 85849a25243d95c652e2fc65018757f0b921bd07 Mon Sep 17 00:00:00 2001 From: Antonio Rojas Date: Fri, 4 Nov 2022 20:27:16 +0100 Subject: [PATCH 421/751] Search for files in both lib/gap and share/gap `make install` installs files in both paths --- src/sage/env.py | 3 ++- src/sage/libs/gap/saved_workspace.py | 4 ++-- src/sage/libs/gap/util.pyx | 29 +--------------------------- 3 files changed, 5 insertions(+), 31 deletions(-) diff --git a/src/sage/env.py b/src/sage/env.py index 911f34b1bc6..65288c732ee 100644 --- a/src/sage/env.py +++ b/src/sage/env.py @@ -197,7 +197,8 @@ def var(key: str, *fallbacks: Optional[str], force: bool = False) -> Optional[st GRAPHS_DATA_DIR = var("GRAPHS_DATA_DIR", join(SAGE_SHARE, "graphs")) ELLCURVE_DATA_DIR = var("ELLCURVE_DATA_DIR", join(SAGE_SHARE, "ellcurves")) POLYTOPE_DATA_DIR = var("POLYTOPE_DATA_DIR", join(SAGE_SHARE, "reflexive_polytopes")) -GAP_ROOT_DIR = var("GAP_ROOT_DIR", join(SAGE_SHARE, "gap")) +GAP_LIB_DIR = var("GAP_LIB_DIR", join(SAGE_LOCAL, "lib", "gap")) +GAP_SHARE_DIR = var("GAP_SHARE_DIR", join(SAGE_SHARE, "gap")) THEBE_DIR = var("THEBE_DIR", join(SAGE_SHARE, "thebe")) COMBINATORIAL_DESIGN_DATA_DIR = var("COMBINATORIAL_DESIGN_DATA_DIR", join(SAGE_SHARE, "combinatorial_designs")) CREMONA_MINI_DATA_DIR = var("CREMONA_MINI_DATA_DIR", join(SAGE_SHARE, "cremona")) diff --git a/src/sage/libs/gap/saved_workspace.py b/src/sage/libs/gap/saved_workspace.py index ad5adec36d0..7636707f557 100644 --- a/src/sage/libs/gap/saved_workspace.py +++ b/src/sage/libs/gap/saved_workspace.py @@ -8,7 +8,7 @@ import os import glob -from sage.env import GAP_ROOT_DIR +from sage.env import GAP_LIB_DIR from sage.interfaces.gap_workspace import gap_workspace_file @@ -31,7 +31,7 @@ def timestamp(): """ libgap_dir = os.path.dirname(__file__) libgap_files = glob.glob(os.path.join(libgap_dir, '*')) - gap_packages = glob.glob(os.path.join(GAP_ROOT_DIR, 'pkg', '*')) + gap_packages = glob.glob(os.path.join(GAP_LIB_DIR, 'pkg', '*')) files = libgap_files + gap_packages if len(files) == 0: print('Unable to find LibGAP files.') diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx index 635098767d5..efc2bebe8cb 100644 --- a/src/sage/libs/gap/util.pyx +++ b/src/sage/libs/gap/util.pyx @@ -164,33 +164,6 @@ cdef void gasman_callback() with gil: ### Initialization of GAP ################################################## ############################################################################ -def gap_root(): - """ - Find the location of the GAP root install which is stored in the gap - startup script. - - EXAMPLES:: - - sage: from sage.libs.gap.util import gap_root - sage: gap_root() # random output - '/home/vbraun/opt/sage-5.3.rc0/local/gap/latest' - """ - if os.path.exists(sage.env.GAP_ROOT_DIR): - return sage.env.GAP_ROOT_DIR - - # Attempt to figure out the appropriate GAP_ROOT by reading the - # local/bin/gap shell script; this is an ugly hack that exists for - # historical reasons; the best approach to setting where Sage looks for - # the appropriate GAP_ROOT is to set the GAP_ROOT_DIR variable - SAGE_LOCAL = sage.env.SAGE_LOCAL - with open(os.path.join(SAGE_LOCAL, 'bin', 'gap')) as f: - gap_sh = f.read().splitlines() - gapdir = next(x for x in gap_sh if x.strip().startswith('GAP_ROOT')) - gapdir = gapdir.split('"')[1] - gapdir = gapdir.replace('$SAGE_LOCAL', SAGE_LOCAL) - return gapdir - - # To ensure that we call initialize_libgap only once. cdef bint _gap_is_initialized = False @@ -245,7 +218,7 @@ cdef initialize(): cdef char* argv[16] argv[0] = "sage" argv[1] = "-l" - s = str_to_bytes(gap_root(), FS_ENCODING, "surrogateescape") + s = str_to_bytes(sage.env.GAP_LIB_DIR + ";" + sage.env.GAP_SHARE_DIR, FS_ENCODING, "surrogateescape") argv[2] = s argv[3] = "-m" From 575c6b2de9acdf44cddd71b92c17ddf3236e3a25 Mon Sep 17 00:00:00 2001 From: Antonio Rojas Date: Fri, 4 Nov 2022 21:43:02 +0100 Subject: [PATCH 422/751] Create lib/gap/bin on install The 'packagemanager' package does not load without it --- build/pkgs/gap/spkg-install.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/pkgs/gap/spkg-install.in b/build/pkgs/gap/spkg-install.in index 5284cfad1f5..bb6c5486111 100644 --- a/build/pkgs/gap/spkg-install.in +++ b/build/pkgs/gap/spkg-install.in @@ -20,10 +20,10 @@ fi sdh_configure $SAGE_CONFIGURE_GMP LDFLAGS="-pthread" --prefix=$SAGE_LOCAL sdh_make -# GAP's "make install" is work in progress; we use bits and pieces of it -# but we install many things manually. sdh_make install # sdh_make install-headers install-libgap +# The 'packagemanager' package expects this /~https://github.com/gap-packages/PackageManager/issues/105 +mkdir -p "$SAGE_LOCAL/lib/gap/bin" # Install only the minimal packages GAP needs to run sdh_install pkg/gapdoc pkg/primgrp pkg/smallgrp pkg/transgrp "$GAP_ROOT"/pkg From 3a73005f917910762b146d53cb24a1be93534fd3 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Sun, 13 Nov 2022 20:00:45 +0000 Subject: [PATCH 423/751] ensure make gap-clean still works --- build/pkgs/gap/spkg-install.in | 2 +- build/pkgs/gap/spkg-legacy-uninstall | 4 +++- build/pkgs/gap/spkg-prerm.in | 6 ------ 3 files changed, 4 insertions(+), 8 deletions(-) delete mode 100644 build/pkgs/gap/spkg-prerm.in diff --git a/build/pkgs/gap/spkg-install.in b/build/pkgs/gap/spkg-install.in index bb6c5486111..e2c8b4dca54 100644 --- a/build/pkgs/gap/spkg-install.in +++ b/build/pkgs/gap/spkg-install.in @@ -20,7 +20,7 @@ fi sdh_configure $SAGE_CONFIGURE_GMP LDFLAGS="-pthread" --prefix=$SAGE_LOCAL sdh_make -sdh_make install +sdh_make_install # sdh_make install-headers install-libgap # The 'packagemanager' package expects this /~https://github.com/gap-packages/PackageManager/issues/105 mkdir -p "$SAGE_LOCAL/lib/gap/bin" diff --git a/build/pkgs/gap/spkg-legacy-uninstall b/build/pkgs/gap/spkg-legacy-uninstall index d17eb939eb7..a8e5c59e1fb 100755 --- a/build/pkgs/gap/spkg-legacy-uninstall +++ b/build/pkgs/gap/spkg-legacy-uninstall @@ -4,6 +4,8 @@ rm -rf "$SAGE_LOCAL/gap/gap-4."* rm -rf "$SAGE_SHARE/gap" rm -f "$SAGE_LOCAL/gap/latest" rm -f "$SAGE_LOCAL/bin/gap" +rm -f "$SAGE_LOCAL/bin/gac" -# Remove old libgap headers +# Remove old libgap headers and library rm -rf "$SAGE_LOCAL/include/gap" +rm -rf "$SAGE_LOCAL/lib/gap" diff --git a/build/pkgs/gap/spkg-prerm.in b/build/pkgs/gap/spkg-prerm.in deleted file mode 100644 index 661d92621fa..00000000000 --- a/build/pkgs/gap/spkg-prerm.in +++ /dev/null @@ -1,6 +0,0 @@ -# These generated files are placed in directory provided by the SPKG, so -# delete the generated files first so that their parent directories can be -# removed during installation -GAP_ROOT="$SAGE_LOCAL/share/gap" -rm -f "$GAP_ROOT/pkg/atlasrep/datagens/"*.* -rm -f "$GAP_ROOT/pkg/atlasrep/dataword/"*.* From 3c1d422084c71cdded6efcfd0ac94d556450b96c Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Sun, 13 Nov 2022 23:29:22 +0000 Subject: [PATCH 424/751] with SAGE_CHECK=yes, one needs io installed to prevent hangs --- build/pkgs/gap/spkg-check.in | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/build/pkgs/gap/spkg-check.in b/build/pkgs/gap/spkg-check.in index d9791d33293..d2fccda6e04 100644 --- a/build/pkgs/gap/spkg-check.in +++ b/build/pkgs/gap/spkg-check.in @@ -3,6 +3,13 @@ cd src # #28728: Fix test failure in tst/testinstall/strings.tst export LC_CTYPE=en_US.UTF-8 +# #34391: in GAP 4.12 some packages need GAP package io +# to let tests run, otherwise this hangs. Thus we install io here. +cd pkg/io +./configure --with-gaproot=../.. +make +cd ../.. + make testinstall if [[ $? -ne 0 ]]; then exit 1 From b335ec90a9ffe1c245f25a928527ba83f13858b0 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Thu, 1 Dec 2022 17:36:01 +0000 Subject: [PATCH 425/751] backport GAP PR 5235 --- build/pkgs/gap/package-version.txt | 2 +- build/pkgs/gap/patches/pr5235.patch | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 build/pkgs/gap/patches/pr5235.patch diff --git a/build/pkgs/gap/package-version.txt b/build/pkgs/gap/package-version.txt index 53cf85e173b..df60b86d2d3 100644 --- a/build/pkgs/gap/package-version.txt +++ b/build/pkgs/gap/package-version.txt @@ -1 +1 @@ -4.12.1 +4.12.1.p1 diff --git a/build/pkgs/gap/patches/pr5235.patch b/build/pkgs/gap/patches/pr5235.patch new file mode 100644 index 00000000000..b96a2770039 --- /dev/null +++ b/build/pkgs/gap/patches/pr5235.patch @@ -0,0 +1,11 @@ +--- a/Makefile.rules ++++ b/Makefile.rules +@@ -303,7 +303,7 @@ else + # HACK: we need to point to the real GAP binary, not a shell script + # wrapper. We can remove this hack (and once again use SYSINFO_GAP) + # once we get rid of the shell script wrapper +- GAC_LDFLAGS = -bundle -bundle_loader $(SYSINFO_GAP2) ++ GAC_LDFLAGS = -bundle -flat_namespace -bundle_loader $(SYSINFO_GAP2) + else + GAC_CFLAGS = -fPIC + GAC_LDFLAGS = -shared From 5ed4447f11fc15c1afbf47ba3581e702c0fad953 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Sat, 7 Jan 2023 13:24:56 +0000 Subject: [PATCH 426/751] update GAP to 4.12.2 --- build/pkgs/gap/checksums.ini | 6 +++--- build/pkgs/gap/package-version.txt | 2 +- build/pkgs/gap/patches/pr5235.patch | 11 ----------- 3 files changed, 4 insertions(+), 15 deletions(-) delete mode 100644 build/pkgs/gap/patches/pr5235.patch diff --git a/build/pkgs/gap/checksums.ini b/build/pkgs/gap/checksums.ini index d7821a94d1b..b0ea8ba8818 100644 --- a/build/pkgs/gap/checksums.ini +++ b/build/pkgs/gap/checksums.ini @@ -1,5 +1,5 @@ tarball=gap-VERSION.tar.gz -sha1=72e1e31c16cb4b343dc0defef1357198c2e68ef5 -md5=daeb412b41a518903e60d39b94f8797b -cksum=1088892847 +sha1=a6e36f3f874a2c46f51561402634497eab705cca +md5=c5cd9f272f2703d7a3649ad7193b2d90 +cksum=2760477284 upstream_url=/~https://github.com/gap-system/gap/releases/download/vVERSION/gap-VERSION.tar.gz diff --git a/build/pkgs/gap/package-version.txt b/build/pkgs/gap/package-version.txt index df60b86d2d3..f1cd7de1de5 100644 --- a/build/pkgs/gap/package-version.txt +++ b/build/pkgs/gap/package-version.txt @@ -1 +1 @@ -4.12.1.p1 +4.12.2 diff --git a/build/pkgs/gap/patches/pr5235.patch b/build/pkgs/gap/patches/pr5235.patch deleted file mode 100644 index b96a2770039..00000000000 --- a/build/pkgs/gap/patches/pr5235.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/Makefile.rules -+++ b/Makefile.rules -@@ -303,7 +303,7 @@ else - # HACK: we need to point to the real GAP binary, not a shell script - # wrapper. We can remove this hack (and once again use SYSINFO_GAP) - # once we get rid of the shell script wrapper -- GAC_LDFLAGS = -bundle -bundle_loader $(SYSINFO_GAP2) -+ GAC_LDFLAGS = -bundle -flat_namespace -bundle_loader $(SYSINFO_GAP2) - else - GAC_CFLAGS = -fPIC - GAC_LDFLAGS = -shared From c70ae1226d470cb29db389f08802cce1f0432945 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Sat, 7 Jan 2023 15:00:13 +0000 Subject: [PATCH 427/751] bump libsemigroups to v2.3.2 --- build/pkgs/libsemigroups/checksums.ini | 6 +++--- build/pkgs/libsemigroups/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/libsemigroups/checksums.ini b/build/pkgs/libsemigroups/checksums.ini index a21c656daa1..4e13a36cb35 100644 --- a/build/pkgs/libsemigroups/checksums.ini +++ b/build/pkgs/libsemigroups/checksums.ini @@ -1,5 +1,5 @@ tarball=libsemigroups-VERSION.tar.gz -sha1=96f38260f9c7224c5e89ff065ea86f6702a24bad -md5=a1644b88b5bd7f0b1ff5f7a416faf10f -cksum=2033539785 +sha1=86375824b47ce4b0e23570122e873f67136d0c0a +md5=ff79ad5fbc8bfeb64d48faaf24106b98 +cksum=2845045455 upstream_url=/~https://github.com/libsemigroups/libsemigroups/releases/download/vVERSION/libsemigroups-VERSION.tar.gz diff --git a/build/pkgs/libsemigroups/package-version.txt b/build/pkgs/libsemigroups/package-version.txt index 2bf1c1ccf36..f90b1afc082 100644 --- a/build/pkgs/libsemigroups/package-version.txt +++ b/build/pkgs/libsemigroups/package-version.txt @@ -1 +1 @@ -2.3.1 +2.3.2 From e98eb692e4299d68ca75dae56df39fcd775c4e12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Thu, 3 Mar 2022 14:47:00 -0300 Subject: [PATCH 428/751] gap: do not directly dlopen() the gap library This needs the soname (as in sage.env.GAP_SO) which has issues for system gap as explained in #33446. Instead we dlopen() the extension module sage.libs.gap.util which, having a link time dependency to libgap, will indirectly dlopen() it. For the record: by the time we run dlopen() the libgap should be already loaded. The purpose of doing it is to change mode to RTLD_GLOBAL so that symbols in libgap are placed in the global symbol table. This is required to compiled load gap packages. An easy test that this is working ok is: sage: libgap.LoadPackage("io") true This requires optional spkg `gap_packages` to be installed. --- src/sage/libs/gap/util.pyx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/sage/libs/gap/util.pyx b/src/sage/libs/gap/util.pyx index efc2bebe8cb..eaa659d64c7 100644 --- a/src/sage/libs/gap/util.pyx +++ b/src/sage/libs/gap/util.pyx @@ -13,7 +13,7 @@ Utility functions for GAP #***************************************************************************** from libc.signal cimport signal, SIGCHLD, SIG_DFL -from posix.dlfcn cimport dlopen, dlclose, RTLD_NOW, RTLD_GLOBAL +from posix.dlfcn cimport dlopen, dlclose, dlerror, RTLD_LAZY, RTLD_GLOBAL from cpython.exc cimport PyErr_Fetch, PyErr_Restore from cpython.object cimport Py_LT, Py_LE, Py_EQ, Py_NE, Py_GT, Py_GE @@ -205,12 +205,12 @@ cdef initialize(): # this isn't portable cdef void* handle - libgapname = str_to_bytes(sage.env.GAP_SO) - handle = dlopen(libgapname, RTLD_NOW | RTLD_GLOBAL) + # reload the current module to force reload of libgap (see #33446) + lib = str_to_bytes(__loader__.path, FS_ENCODING, "surrogateescape") + handle = dlopen(lib, RTLD_GLOBAL|RTLD_LAZY) if handle is NULL: - raise RuntimeError( - "Could not dlopen() libgap even though it should already " - "be loaded!") + err = dlerror() + raise RuntimeError(f"Could not reload gap library with RTLD_GLOBAL ({err})") dlclose(handle) # Define argv variable, which we will pass in to From 177eb5dcc20e10ccd122a83d43e08fde19131467 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Thu, 3 Mar 2022 23:00:07 -0300 Subject: [PATCH 429/751] singular: do not directly dlopen() the singular library Same as for gap in the previous commit. Instead of requiring the soname (as in sage.env.LIBSINGULAR_PATH) we dlopen() the extension module sage.libs.singular.singular which will indirectly dlopen() libSingular. --- src/sage/libs/singular/singular.pyx | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/sage/libs/singular/singular.pyx b/src/sage/libs/singular/singular.pyx index d8ea7b07f3c..4beb1774df9 100644 --- a/src/sage/libs/singular/singular.pyx +++ b/src/sage/libs/singular/singular.pyx @@ -1705,14 +1705,7 @@ cdef object si2sa_intvec(intvec *v): cdef extern from *: # hack to get at cython macro int unlikely(int) -cdef extern from "dlfcn.h": - void *dlopen(char *, long) - char *dlerror() - void dlclose(void *handle) - -cdef extern from "dlfcn.h": - cdef long RTLD_LAZY - cdef long RTLD_GLOBAL +from posix.dlfcn cimport dlopen, dlclose, dlerror, RTLD_LAZY, RTLD_GLOBAL cdef int overflow_check(unsigned long e, ring *_ring) except -1: """ @@ -1762,8 +1755,6 @@ cdef init_libsingular(): cdef void *handle = NULL - from sage.env import LIBSINGULAR_PATH - lib = str_to_bytes(LIBSINGULAR_PATH, FS_ENCODING, "surrogateescape") # This is a workaround for /~https://github.com/Singular/Singular/issues/1113 # and can be removed once that fix makes it into release of Singular that @@ -1780,10 +1771,12 @@ cdef init_libsingular(): import platform if not platform.system().startswith("CYGWIN"): + # reload the current module to force reload of libSingular (see #33446) + lib = str_to_bytes(__loader__.path, FS_ENCODING, "surrogateescape") handle = dlopen(lib, RTLD_GLOBAL|RTLD_LAZY) if not handle: err = dlerror() - raise ImportError(f"cannot load Singular library from {LIBSINGULAR_PATH} ({err})") + raise RuntimeError(f"Could not reload Singular library with RTLD_GLOBAL ({err})") # load SINGULAR siInit(lib) From 3a46e87b1031c5fb41322a554c18dc7881179979 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Fri, 4 Mar 2022 16:37:34 -0300 Subject: [PATCH 430/751] singular: remove LIBSINGULAR_PATH, no longer needed --- build/pkgs/singular/spkg-configure.m4 | 63 +-------------------------- pkgs/sage-conf/_sage_conf/_conf.py.in | 3 -- src/sage/env.py | 6 --- 3 files changed, 1 insertion(+), 71 deletions(-) diff --git a/build/pkgs/singular/spkg-configure.m4 b/build/pkgs/singular/spkg-configure.m4 index d4d145defe3..6a85631f624 100644 --- a/build/pkgs/singular/spkg-configure.m4 +++ b/build/pkgs/singular/spkg-configure.m4 @@ -9,52 +9,7 @@ SAGE_SPKG_CONFIGURE([singular], [ AC_MSG_CHECKING([that Singular's help is working]) AS_IF([test x`printf "system(\"--browser\", \"builtin\"); \n help;" | Singular 2>&1 | grep "error occurred"` = x], [ AC_MSG_RESULT(yes) - dnl We have Singular. Now determine the shared library path on - dnl platforms on which sage.libs.singular needs to reload the library with RTLD_GLOBAL. - AS_CASE([$host_os], - [cygwin*], [dnl Nothing to do - ], - [dnl Use pkg-config to get singular's libdir while we're at it. As a - dnl moral compromise for using pkg-config, this ultimately allows us - dnl to pass an absolute path to dlopen(), which is the only approach - dnl that POSIX guarantees will work. - PKG_CHECK_VAR([SINGULAR_LIB_DIR], [Singular], [libdir]) - dnl The acl_shlibext variable is set in the top-level configure.ac. - AC_LANG_PUSH(C) - ORIG_LIBS="${LIBS}" - LIBS="${LIBS} -ldl" - AC_MSG_CHECKING([if we can dlopen($LIBSINGULAR_PATH)]) - LIBSINGULAR_PATH="${SINGULAR_LIB_DIR}/libSingular.${acl_shlibext}" - - dnl if we can dlopen() it, substitute the name for sage_conf; - dnl otherwise, fall back to using the SPKG. - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[void* h = dlopen("${LIBSINGULAR_PATH}", RTLD_LAZY | RTLD_GLOBAL); - if (h == 0) { return 1; } else { return dlclose(h); }]] - )], [ - AC_MSG_RESULT(yes) - ], [ - dnl try Debian-specific name - LIBSINGULAR_PATH="${SINGULAR_LIB_DIR}/libsingular-Singular.${acl_shlibext}" - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[void* h = dlopen("${LIBSINGULAR_PATH}", RTLD_LAZY | RTLD_GLOBAL); - if (h == 0) { return 1; } else { return dlclose(h); }]] - )], [ - AC_MSG_RESULT(yes) - ], [ - AC_MSG_RESULT(no) - sage_spkg_install_singular=yes - ], [AC_MSG_RESULT(yes)]) - ], [AC_MSG_RESULT(yes)]) - - AC_LANG_POP() - LIBS="${ORIG_LIBS}" - ] - )], [ + ], [ AC_MSG_RESULT(no) sage_spkg_install_singular=yes ] @@ -64,20 +19,4 @@ SAGE_SPKG_CONFIGURE([singular], [ ]) ]) ]) -],[],[],[ - dnl Post-check phase - dnl We make the sage_conf substitutions here, because the "default" - dnl substitution needs to be made even if we skipped the system-Singular - dnl checks themselves. - AS_IF([test "x${sage_spkg_install_singular}" = "xyes"], [ - AS_CASE([$host_os], - [cygwin*], [dnl Nothing to do - ], - [dnl Set shared library path, needed for reloading the library with RTLD_GLOBAL - LIBSINGULAR_PATH="\$SAGE_LOCAL/lib/libSingular.${acl_shlibext}" - ] - ) - ]) - - AC_SUBST(LIBSINGULAR_PATH, "${LIBSINGULAR_PATH}") ]) diff --git a/pkgs/sage-conf/_sage_conf/_conf.py.in b/pkgs/sage-conf/_sage_conf/_conf.py.in index 6cd28f558a8..d66bdb3d264 100644 --- a/pkgs/sage-conf/_sage_conf/_conf.py.in +++ b/pkgs/sage-conf/_sage_conf/_conf.py.in @@ -55,9 +55,6 @@ THREEJS_DIR = SAGE_LOCAL + "/share/threejs-sage" OPENMP_CFLAGS = "@OPENMP_CFLAGS@" OPENMP_CXXFLAGS = "@OPENMP_CXXFLAGS@" -# The full absolute path to the main Singular library. -LIBSINGULAR_PATH = "@LIBSINGULAR_PATH@".replace('$SAGE_LOCAL', SAGE_LOCAL) - # Installation location of wheels. This is determined at configuration time # and does not depend on the installation location of sage-conf. SAGE_SPKG_WHEELS = "@SAGE_VENV@".replace('${SAGE_LOCAL}', SAGE_LOCAL) + "/var/lib/sage/wheels" diff --git a/src/sage/env.py b/src/sage/env.py index 65288c732ee..fc60a4b4710 100644 --- a/src/sage/env.py +++ b/src/sage/env.py @@ -230,12 +230,6 @@ def var(key: str, *fallbacks: Optional[str], force: bool = False) -> Optional[st LIE_INFO_DIR = var("LIE_INFO_DIR", join(SAGE_LOCAL, "lib", "LiE")) SINGULAR_BIN = var("SINGULAR_BIN") or "Singular" -# The path to libSingular, to be passed to dlopen(). This will -# typically be set to an absolute path in sage_conf, but the relative -# fallback path here works on systems where dlopen() searches the -# system's library locations. -LIBSINGULAR_PATH = var("LIBSINGULAR_PATH", "libSingular.so") - # OpenMP OPENMP_CFLAGS = var("OPENMP_CFLAGS", "") OPENMP_CXXFLAGS = var("OPENMP_CXXFLAGS", "") From b8058e946d5594f79053d262926fd4c206666615 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Fri, 4 Mar 2022 15:49:26 -0300 Subject: [PATCH 431/751] Revert "src/sage/interfaces/gap_workspace.py: Use hash of GAP_SO to disambiguate the workspace file, not SAGE_LOCAL" This reverts commit a801e6d85bd420b60ea75b1671856eb43ac6b18b. See #33446. --- src/sage/interfaces/gap_workspace.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/sage/interfaces/gap_workspace.py b/src/sage/interfaces/gap_workspace.py index 33a87dd5076..953dc85116f 100644 --- a/src/sage/interfaces/gap_workspace.py +++ b/src/sage/interfaces/gap_workspace.py @@ -16,7 +16,7 @@ import os import time import hashlib -from sage.env import DOT_SAGE, GAP_SO +from sage.env import DOT_SAGE, SAGE_LOCAL def gap_workspace_file(system="gap", name="workspace", dir=None): @@ -59,10 +59,7 @@ def gap_workspace_file(system="gap", name="workspace", dir=None): if dir is None: dir = os.path.join(DOT_SAGE, 'gap') - if GAP_SO: - h = hashlib.sha1(GAP_SO.encode('utf-8')).hexdigest() - else: - h = 'unknown' + h = hashlib.sha1(SAGE_LOCAL.encode('utf-8')).hexdigest() return os.path.join(dir, '%s-%s-%s' % (system, name, h)) From 5919d549298b5d03b92baac5ea1c182cd5d4863c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Fri, 4 Mar 2022 16:38:49 -0300 Subject: [PATCH 432/751] gap: remove GAP_SO, no longer needed --- src/sage/env.py | 75 ------------------------------------------------- 1 file changed, 75 deletions(-) diff --git a/src/sage/env.py b/src/sage/env.py index fc60a4b4710..5f7aca8599c 100644 --- a/src/sage/env.py +++ b/src/sage/env.py @@ -250,81 +250,6 @@ def var(key: str, *fallbacks: Optional[str], force: bool = False) -> Optional[st SAGE_GAP_COMMAND = var('SAGE_GAP_COMMAND', _gap_cmd) -def _get_shared_lib_path(*libnames: str) -> Optional[str]: - """ - Return the full path to a shared library file installed in - ``$SAGE_LOCAL/lib`` or the directories associated with the - Python sysconfig. - - This can also be passed more than one library name (e.g. for cases where - some library may have multiple names depending on the platform) in which - case the first one found is returned. - - This supports most *NIX variants (in which ``lib.so`` is found - under ``$SAGE_LOCAL/lib``), macOS (same, but with the ``.dylib`` - extension), and Cygwin (under ``$SAGE_LOCAL/bin/cyg.dll``, - or ``$SAGE_LOCAL/bin/cyg-*.dll`` for versioned DLLs). - - For distributions like Debian that use a multiarch layout, we also try the - multiarch lib paths (i.e. ``/usr/lib//``). - - This returns ``None`` if no matching library file could be found. - - EXAMPLES:: - - sage: from sage.env import _get_shared_lib_path - sage: "gap" in _get_shared_lib_path("gap") - True - sage: _get_shared_lib_path("an_absurd_lib") is None - True - - """ - - for libname in libnames: - search_directories: List[Path] = [] - patterns: List[str] = [] - if sys.platform == 'cygwin': - # Later down we take the first matching DLL found, so search - # SAGE_LOCAL first so that it takes precedence - if SAGE_LOCAL: - search_directories.append(Path(SAGE_LOCAL) / 'bin') - search_directories.append(Path(sysconfig.get_config_var('BINDIR'))) - # Note: The following is not very robust, since if there are multible - # versions for the same library this just selects one more or less - # at arbitrary. However, practically speaking, on Cygwin, there - # will only ever be one version - patterns = [f'cyg{libname}.dll', f'cyg{libname}-*.dll'] - else: - if sys.platform == 'darwin': - ext = 'dylib' - else: - ext = 'so' - - if SAGE_LOCAL: - search_directories.append(Path(SAGE_LOCAL) / 'lib') - libdir = sysconfig.get_config_var('LIBDIR') - if libdir is not None: - libdir = Path(libdir) - search_directories.append(libdir) - - multiarchlib = sysconfig.get_config_var('MULTIARCH') - if multiarchlib is not None: - search_directories.append(libdir / multiarchlib), - - patterns = [f'lib{libname}.{ext}'] - - for directory in search_directories: - for pattern in patterns: - path = next(directory.glob(pattern), None) - if path is not None: - return str(path.resolve()) - - # Just return None if no files were found - return None - -# locate libgap shared object -GAP_SO = var("GAP_SO", _get_shared_lib_path("gap", "")) - # post process if DOT_SAGE is not None and ' ' in DOT_SAGE: if UNAME[:6] == 'CYGWIN': From e11571689b34f407a0ad47200cac580fecb99a89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sun, 6 Mar 2022 12:10:37 -0300 Subject: [PATCH 433/751] gap_workspace_file: include hostname and gap version --- src/sage/interfaces/gap_workspace.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/sage/interfaces/gap_workspace.py b/src/sage/interfaces/gap_workspace.py index 953dc85116f..8c03b6b5de4 100644 --- a/src/sage/interfaces/gap_workspace.py +++ b/src/sage/interfaces/gap_workspace.py @@ -16,7 +16,8 @@ import os import time import hashlib -from sage.env import DOT_SAGE, SAGE_LOCAL +import subprocess +from sage.env import DOT_SAGE, SAGE_LOCAL, HOSTNAME, GAP_ROOT_DIR def gap_workspace_file(system="gap", name="workspace", dir=None): @@ -59,8 +60,12 @@ def gap_workspace_file(system="gap", name="workspace", dir=None): if dir is None: dir = os.path.join(DOT_SAGE, 'gap') - h = hashlib.sha1(SAGE_LOCAL.encode('utf-8')).hexdigest() - return os.path.join(dir, '%s-%s-%s' % (system, name, h)) + data = SAGE_LOCAL + sysinfo = os.path.join(GAP_ROOT_DIR, "sysinfo.gap") + if os.path.exists(sysinfo): + data += subprocess.getoutput(f'. "{sysinfo}" && echo ":$GAP_VERSION:$GAParch"') + h = hashlib.sha1(data.encode('utf-8')).hexdigest() + return os.path.join(dir, '%s-%s-%s-%s' % (system, name, HOSTNAME, h)) def prepare_workspace_dir(dir=None): From ac4b671caa78fcb460164ddef5607b993e7af464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sat, 12 Nov 2022 12:00:08 -0300 Subject: [PATCH 434/751] gap_workspace_file: use GAP_LIB_DIR and GAP_SHARE_DIR --- src/sage/interfaces/gap_workspace.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/sage/interfaces/gap_workspace.py b/src/sage/interfaces/gap_workspace.py index 8c03b6b5de4..03b40be6856 100644 --- a/src/sage/interfaces/gap_workspace.py +++ b/src/sage/interfaces/gap_workspace.py @@ -17,7 +17,7 @@ import time import hashlib import subprocess -from sage.env import DOT_SAGE, SAGE_LOCAL, HOSTNAME, GAP_ROOT_DIR +from sage.env import DOT_SAGE, HOSTNAME, GAP_LIB_DIR, GAP_SHARE_DIR def gap_workspace_file(system="gap", name="workspace", dir=None): @@ -60,12 +60,13 @@ def gap_workspace_file(system="gap", name="workspace", dir=None): if dir is None: dir = os.path.join(DOT_SAGE, 'gap') - data = SAGE_LOCAL - sysinfo = os.path.join(GAP_ROOT_DIR, "sysinfo.gap") - if os.path.exists(sysinfo): - data += subprocess.getoutput(f'. "{sysinfo}" && echo ":$GAP_VERSION:$GAParch"') + data = f'{GAP_LIB_DIR}:{GAP_SHARE_DIR}' + for path in GAP_LIB_DIR, GAP_SHARE_DIR: + sysinfo = os.path.join(path, "sysinfo.gap") + if os.path.exists(sysinfo): + data += subprocess.getoutput(f'. "{sysinfo}" && echo ":$GAP_VERSION:$GAParch"') h = hashlib.sha1(data.encode('utf-8')).hexdigest() - return os.path.join(dir, '%s-%s-%s-%s' % (system, name, HOSTNAME, h)) + return os.path.join(dir, f'{system}-{name}-{HOSTNAME}-{h}') def prepare_workspace_dir(dir=None): From 6da7a3d501dcd9d43bdc25bc18dca2ab8b489d1e Mon Sep 17 00:00:00 2001 From: Rohan Garg <76916164+Sandstorm831@users.noreply.github.com> Date: Sun, 12 Feb 2023 22:28:34 +0530 Subject: [PATCH 435/751] corrected TeX maths in docstrings --- src/sage/combinat/posets/linear_extensions.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/sage/combinat/posets/linear_extensions.py b/src/sage/combinat/posets/linear_extensions.py index 3cfdee843b1..e17bd172108 100644 --- a/src/sage/combinat/posets/linear_extensions.py +++ b/src/sage/combinat/posets/linear_extensions.py @@ -256,14 +256,14 @@ def is_supergreedy(self): r"""" Return ``True`` if the linear extension is supergreedy. - A linear extension $[x_1 Date: Sun, 12 Feb 2023 17:39:59 +0000 Subject: [PATCH 436/751] tagged tests at long time --- src/sage/combinat/designs/difference_family.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index be6e029b0dc..c9949678e3f 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -2300,7 +2300,7 @@ def supplementary_difference_set(n, existence=False, check=True): EXAMPLES:: sage: from sage.combinat.designs.difference_family import supplementary_difference_set - sage: S1, S2, S3, S4 = supplementary_difference_set(191) + sage: S1, S2, S3, S4 = supplementary_difference_set(191) # long time If existence is ``True``, the function returns a boolean :: @@ -2313,7 +2313,7 @@ def supplementary_difference_set(n, existence=False, check=True): sage: from sage.combinat.designs.difference_family import is_supplementary_difference_set sage: S1, S2, S3, S4 = supplementary_difference_set(191, check=False) - sage: is_supplementary_difference_set([S1, S2, S3, S4], 191, len(S1)+len(S2)+len(S3)+len(S4)-191) + sage: is_supplementary_difference_set([S1, S2, S3, S4], 191, len(S1)+len(S2)+len(S3)+len(S4)-191) # long time True sage: S1, S2, S3, S4 = supplementary_difference_set(37, check=False) sage: supplementary_difference_set(7) From 8c2f0f82fda8c5ac6fe4cc9db9d4256c16f24de5 Mon Sep 17 00:00:00 2001 From: Jonathan Kliem Date: Sun, 12 Feb 2023 19:33:21 +0100 Subject: [PATCH 437/751] refactor: Use all-caps for enum of face iterator status --- .../combinatorial_face.pyx | 2 +- .../face_iterator.pxd | 8 ++--- .../face_iterator.pyx | 30 +++++++++---------- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx index b82b60ffeec..5f81c21613c 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/combinatorial_face.pyx @@ -177,7 +177,7 @@ cdef class CombinatorialFace(SageObject): self.atoms = it.atoms self.coatoms = it.coatoms - if it.structure.face_status == FaceStatus.not_initialized: + if it.structure.face_status == FaceStatus.NOT_INITIALIZED: raise LookupError("face iterator not set to a face") face_init(self.face, self.coatoms.n_atoms(), self.coatoms.n_coatoms()) diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pxd b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pxd index af4f327736b..1dd74505306 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pxd +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pxd @@ -6,10 +6,10 @@ from .face_list_data_structure cimport face_list_t from .combinatorial_face cimport CombinatorialFace cdef enum FaceStatus: - not_initialized - initialized - ignore_subsets - only_visit_subsets + NOT_INITIALIZED + INITIALIZED + IGNORE_SUBSETS + ONLY_VISIT_SUBSETS cdef struct iter_s: bint dual # if 1, then iterate over dual Polyhedron diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx index 84ca007466b..8c4de45de6c 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx @@ -414,7 +414,7 @@ cdef class FaceIterator_base(SageObject): self.structure.visited_all[self.structure.dimension -1].n_faces = 0 else: self.structure.visited_all[self.structure.dimension -1].n_faces = 1 - self.structure.face_status = FaceStatus.not_initialized + self.structure.face_status = FaceStatus.NOT_INITIALIZED self.structure.new_faces[self.structure.dimension - 1].n_faces = self.coatoms.n_faces() self.structure.current_dimension = self.structure.dimension - 1 self.structure.highest_dimension = self.structure.dimension - 1 @@ -460,7 +460,7 @@ cdef class FaceIterator_base(SageObject): sage: next(it).ambient_V_indices() == it.current().ambient_V_indices() True """ - if unlikely(self.structure.face_status == FaceStatus.not_initialized): + if unlikely(self.structure.face_status == FaceStatus.NOT_INITIALIZED): raise ValueError("iterator not set to a face yet") return CombinatorialFace(self) @@ -888,7 +888,7 @@ cdef class FaceIterator_base(SageObject): sage: it._meet_of_coatoms(1, 2) A -1-dimensional face of a Polyhedron in QQ^2 """ - if unlikely(self.structure.face_status != FaceStatus.not_initialized): + if unlikely(self.structure.face_status != FaceStatus.NOT_INITIALIZED): raise ValueError("please reset the face iterator") if unlikely(self.structure.output_dimension != -2): raise ValueError("face iterator must not have the output dimension specified") @@ -994,7 +994,7 @@ cdef class FaceIterator_base(SageObject): ... IndexError: atoms out of range """ - if unlikely(self.structure.face_status != FaceStatus.not_initialized): + if unlikely(self.structure.face_status != FaceStatus.NOT_INITIALIZED): raise ValueError("please reset the face iterator") if unlikely(self.structure.output_dimension != -2): raise ValueError("face iterator must not have the output dimension specified") @@ -1049,14 +1049,14 @@ cdef class FaceIterator_base(SageObject): See :meth:`FaceIterator_base.ignore_subfaces` and :meth:`FaceIterator_base.ignore_supfaces`. """ - if unlikely(self.structure.face_status == FaceStatus.not_initialized): + if unlikely(self.structure.face_status == FaceStatus.NOT_INITIALIZED): raise ValueError("iterator not set to a face yet") - if unlikely(self.structure.face_status == FaceStatus.only_visit_subsets): + if unlikely(self.structure.face_status == FaceStatus.ONLY_VISIT_SUBSETS): # The iterator is consumed, if it was just set to visit only subsets # next thing to ignore subsets. self.structure.current_dimension = self.structure.dimension return 0 - if unlikely(self.structure.face_status == FaceStatus.ignore_subsets): + if unlikely(self.structure.face_status == FaceStatus.IGNORE_SUBSETS): # Nothing to do. return 0 # The current face is added to ``visited_all``. @@ -1065,7 +1065,7 @@ cdef class FaceIterator_base(SageObject): # as there are no new faces. add_face_shallow(self.structure.visited_all[self.structure.current_dimension], self.structure.face) - self.structure.face_status = FaceStatus.ignore_subsets + self.structure.face_status = FaceStatus.IGNORE_SUBSETS def only_subfaces(self): r""" @@ -1177,9 +1177,9 @@ cdef class FaceIterator_base(SageObject): See :meth:`FaceIterator_base.only_subfaces` and :meth:`FaceIterator_base.only_supfaces`. """ - if unlikely(self.structure.face_status == FaceStatus.not_initialized): + if unlikely(self.structure.face_status == FaceStatus.NOT_INITIALIZED): raise ValueError("iterator not set to a face yet") - if unlikely(self.structure.face_status == FaceStatus.ignore_subsets): + if unlikely(self.structure.face_status == FaceStatus.IGNORE_SUBSETS): raise ValueError("cannot only visit subsets after ignoring a face") cdef face_list_t* faces = &self.structure.new_faces[self.structure.current_dimension] @@ -1191,7 +1191,7 @@ cdef class FaceIterator_base(SageObject): swap_faces(faces[0].faces[yet_to_visit], faces[0].faces[faces[0].n_faces - 1]) - self.structure.face_status = FaceStatus.only_visit_subsets + self.structure.face_status = FaceStatus.ONLY_VISIT_SUBSETS self.structure.yet_to_visit = 0 # This will work: # ``next_dimension`` will first call ``next_face_loop`` and then check @@ -1281,13 +1281,13 @@ cdef class FaceIterator_base(SageObject): if n_atoms == self.coatoms.n_atoms(): # The face is the universe. self.structure.face[0] = face[0] - self.structure.face_status = FaceStatus.initialized + self.structure.face_status = FaceStatus.INITIALIZED self.structure.current_dimension = self.structure.dimension return 0 elif n_atoms == 0: # The face is the empty face. self.structure.face[0] = face[0] - self.structure.face_status = FaceStatus.initialized + self.structure.face_status = FaceStatus.INITIALIZED self.structure.current_dimension = -1 return 0 @@ -1928,7 +1928,7 @@ cdef inline int next_dimension(iter_t structure, size_t parallelization_depth=0) e.g. if it is ``1`` it will stop after having yield all faces of a facet """ cdef int max_dim = structure.highest_dimension - parallelization_depth - structure.face_status = FaceStatus.not_initialized + structure.face_status = FaceStatus.NOT_INITIALIZED while (not next_face_loop(structure)) and (structure.current_dimension <= max_dim): sig_check() structure._index += 1 @@ -1959,7 +1959,7 @@ cdef inline int next_face_loop(iter_t structure) nogil except -1: # Set ``face`` to the next face. structure.yet_to_visit -= 1 structure.face[0] = faces[0].faces[structure.yet_to_visit][0] - structure.face_status = FaceStatus.initialized + structure.face_status = FaceStatus.INITIALIZED return 1 if structure.current_dimension <= structure.lowest_dimension: From 4fc747e217d8331c18e88b7b398bfb728f1f2425 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Sun, 12 Feb 2023 18:48:42 +0000 Subject: [PATCH 438/751] further fixes to supergreedy docstring --- src/sage/combinat/posets/linear_extensions.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sage/combinat/posets/linear_extensions.py b/src/sage/combinat/posets/linear_extensions.py index e17bd172108..1a90a411b59 100644 --- a/src/sage/combinat/posets/linear_extensions.py +++ b/src/sage/combinat/posets/linear_extensions.py @@ -257,16 +257,16 @@ def is_supergreedy(self): Return ``True`` if the linear extension is supergreedy. A linear extension `[x_1 Date: Sun, 12 Feb 2023 21:20:46 +0100 Subject: [PATCH 439/751] minor style fixes --- src/sage/categories/simplicial_sets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/categories/simplicial_sets.py b/src/sage/categories/simplicial_sets.py index 6223c5b9d26..d760a4ac9bd 100644 --- a/src/sage/categories/simplicial_sets.py +++ b/src/sage/categories/simplicial_sets.py @@ -372,7 +372,7 @@ def _universal_cover_dict(self): G = FG.quotient(rels) char = {g : G.gen(i) for i,g in enumerate(gens)} for e in edges: - if not e in gens: + if e not in gens: char[e] = G.one() return (G, char) @@ -464,7 +464,7 @@ def covering_map(self, character): for d in range(1, self.dimension() + 1): for s in self.n_cells(d): - if not s in char.keys(): + if s not in char.keys(): if d==1 and s.is_degenerate(): char[s] = G.one() elif s.is_degenerate(): From e06e5829216e6b4a68c92976c837901341c0a7d1 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 12 Feb 2023 14:01:51 -0800 Subject: [PATCH 440/751] src/sage/rings/polynomial/infinite_polynomial_element.py: Use InfinitePolynomial in isinstance tests, not InfinitePolynomial_sparse --- src/sage/rings/polynomial/infinite_polynomial_element.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sage/rings/polynomial/infinite_polynomial_element.py b/src/sage/rings/polynomial/infinite_polynomial_element.py index a56e4f1a1b4..b51ba3fe08a 100644 --- a/src/sage/rings/polynomial/infinite_polynomial_element.py +++ b/src/sage/rings/polynomial/infinite_polynomial_element.py @@ -1267,14 +1267,14 @@ def __call__(self, *args, **kwargs): V = [] for kw in kwargs: value = kwargs[kw] - if isinstance(value, InfinitePolynomial_sparse): + if isinstance(value, InfinitePolynomial): kwargs[kw] = value._p V.append(kw) if hasattr(value._p, 'variables'): V.extend([str(x) for x in value._p.variables()]) args = list(args) for i, arg in enumerate(args): - if isinstance(arg, InfinitePolynomial_sparse): + if isinstance(arg, InfinitePolynomial): args[i] = arg._p if hasattr(arg._p, 'variables'): V.extend([str(x) for x in arg._p.variables()]) @@ -1550,11 +1550,11 @@ def __call__(self, *args, **kwargs): # Replace any InfinitePolynomials by their underlying polynomials for kw in kwargs: value = kwargs[kw] - if isinstance(value, InfinitePolynomial_sparse): + if isinstance(value, InfinitePolynomial): kwargs[kw] = value._p args = list(args) for i, arg in enumerate(args): - if isinstance(arg, InfinitePolynomial_sparse): + if isinstance(arg, InfinitePolynomial): args[i] = arg._p self._p = self.parent().polynomial_ring()(self._p) res = self._p(*args, **kwargs) From 118f756ddd5baff0974d46c9dc8192ae7e5a352c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 12 Feb 2023 15:36:22 -0800 Subject: [PATCH 441/751] tox.ini: Fix up --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 72fbcefe294..9ce8086648b 100644 --- a/tox.ini +++ b/tox.ini @@ -647,7 +647,7 @@ commands = docker-{arm64,armhf}: docker run --rm --privileged multiarch/qemu-user-static:register --reset docker: bash -c 'if [ x"{env:DOCKER_CONFIG_FILE:}" != x ]; then mkdir -p {envdir}/.docker && ln -sf $(realpath "{env:DOCKER_CONFIG_FILE:}") {envdir}/.docker/; fi' docker: bash -c 'for docker_target in {env:DOCKER_TARGETS:with-targets}; do \ - docker: BUILD_IMAGE_STEM=sage-$(echo {envname} | sed "s/-docker//;s/-incremental//"); \ + docker: BUILD_IMAGE_STEM=sage-$(echo {envname} | sed "s/docker-//;s/-incremental//"); \ docker: BUILD_IMAGE=$DOCKER_PUSH_REPOSITORY$BUILD_IMAGE_STEM-$docker_target; \ docker: BUILD_TAG=$(git describe --dirty --always); \ docker: TAG_ARGS=$(for tag in $BUILD_TAG {env:EXTRA_DOCKER_TAGS:}; do echo --tag $BUILD_IMAGE:$tag; done); \ From 8f5b79901fa874f60f308b4ee93ac867de8fd784 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 12 Feb 2023 20:47:15 -0800 Subject: [PATCH 442/751] src/sage/combinat/schubert_polynomial.py: Use isinstance(..., InfinitePolynomial) without _sparse --- src/sage/combinat/schubert_polynomial.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/combinat/schubert_polynomial.py b/src/sage/combinat/schubert_polynomial.py index 8650e599300..a0a682e985e 100644 --- a/src/sage/combinat/schubert_polynomial.py +++ b/src/sage/combinat/schubert_polynomial.py @@ -80,7 +80,7 @@ from sage.misc.cachefunc import cached_method from sage.rings.integer import Integer from sage.rings.integer_ring import ZZ -from sage.rings.polynomial.infinite_polynomial_element import InfinitePolynomial_sparse +from sage.rings.polynomial.infinite_polynomial_element import InfinitePolynomial from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.rings.polynomial.multi_polynomial import MPolynomial import sage.libs.symmetrica.all as symmetrica @@ -463,7 +463,7 @@ def _element_constructor_(self, x): return self._from_dict({perm: self.base_ring().one()}) elif isinstance(x, MPolynomial): return symmetrica.t_POLYNOM_SCHUBERT(x) - elif isinstance(x, InfinitePolynomial_sparse): + elif isinstance(x, InfinitePolynomial): R = x.polynomial().parent() # massage the term order to be what symmetrica expects S = PolynomialRing(R.base_ring(), From 2cf748ad5a78bda4339f6f14c26248ed4d6b2ea8 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 13 Feb 2023 13:54:44 +0800 Subject: [PATCH 443/751] Fix conda ci on ubuntu by downgrading conda --- .github/workflows/ci-conda.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci-conda.yml b/.github/workflows/ci-conda.yml index bc1f1c5a634..448b0e4d45a 100644 --- a/.github/workflows/ci-conda.yml +++ b/.github/workflows/ci-conda.yml @@ -41,6 +41,13 @@ jobs: bash ~/miniconda.sh -b -p $HOME/miniconda echo "CONDA=$HOME/miniconda" >> $GITHUB_ENV + # Workaround for /~https://github.com/actions/runner-images/issues/6910 / /~https://github.com/conda/conda/issues/12303 + - name: Downgrade conda + if: matrix.os == 'ubuntu-latest' + run: | + conda config --set allow_conda_downgrades true + conda install conda=4.12.0 -y + - name: Create conda environment files run: ./bootstrap-conda From 6bbcc47baaad6e3413d0a74f3925cfc98ff9602e Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 13 Feb 2023 14:03:18 +0800 Subject: [PATCH 444/751] Update python versions --- .github/workflows/ci-conda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-conda.yml b/.github/workflows/ci-conda.yml index 448b0e4d45a..4a3f2062873 100644 --- a/.github/workflows/ci-conda.yml +++ b/.github/workflows/ci-conda.yml @@ -23,7 +23,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest] - python: [3.8, 3.9] + python: [3.9, 3.10, 3.11] conda-env: [environment, environment-optional] steps: From d7f497aeda3971dff6aae40d685a092972c0dc02 Mon Sep 17 00:00:00 2001 From: Tobias Diez Date: Mon, 13 Feb 2023 14:09:36 +0800 Subject: [PATCH 445/751] Specify python version as string --- .github/workflows/ci-conda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-conda.yml b/.github/workflows/ci-conda.yml index 4a3f2062873..fd5235a5aa2 100644 --- a/.github/workflows/ci-conda.yml +++ b/.github/workflows/ci-conda.yml @@ -23,7 +23,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest] - python: [3.9, 3.10, 3.11] + python: ['3.9', '3.10', '3.11'] conda-env: [environment, environment-optional] steps: From 2f127ffa65568d02e4c372c03f27e8e2765b1f65 Mon Sep 17 00:00:00 2001 From: Sebastian Oehms Date: Fri, 10 Feb 2023 18:52:52 +0100 Subject: [PATCH 446/751] add_note_to_knotinfo_interface initial --- src/sage/knots/knotinfo.py | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/sage/knots/knotinfo.py b/src/sage/knots/knotinfo.py index cefd33aebb4..a17f0f7e3b7 100644 --- a/src/sage/knots/knotinfo.py +++ b/src/sage/knots/knotinfo.py @@ -48,6 +48,12 @@ the according documentation of :meth:`KnotInfoBase.homfly_polynomial`, :meth:`KnotInfoBase.jones_polynomial` and :meth:`KnotInfoBase.alexander_polynomial`. +Furthermore, note that not all columns available in the database are visible on the web +pages (see also the related note under :meth:`KnotInfoBase.khovanov_polynomial`). +It is planned to remove non-visible columns from the database in the future (see +the `Python Wrapper `__ for +updated information). + EXAMPLES:: sage: from sage.knots.knotinfo import KnotInfo @@ -1714,9 +1720,23 @@ def khovanov_polynomial(self, var1='q', var2='t', base_ring=ZZ, original=False): .. NOTE :: - The Khovanov polynomial given in KnotInfo corresponds to the mirror - image of the given knot for a `list of 140 exceptions - `__. + The data used here were calculated with the program + `KhoHo `__. They are no longer + visible on the website as of October 30, 2022. Instead, data + computed with `KnotJob `__ + are now displayed. The latter program is more accurate in terms of + orientation and reflection as it is based on `PD` code. + + Even if they are not visible on the website, the data produced by + `KhoHo` are still available in the database. But maybe this will be + discontinued (check out the `Python wrapper `__ for updated information). + This interface will be adapted to the changes in an upcoming + release. + + Since the results of `KhoHo` were computed using the `DT` notation, + the Khovanov polynomial returned by this method belongs to the + mirror image of the given knot for a `list of 140 exceptions + `__. EXAMPLES:: From 9e3ebef4b2f6f5d0266d32b1563cb179ad8e25bd Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 13 Feb 2023 08:02:40 +0100 Subject: [PATCH 447/751] fix typos --- src/sage/knots/knotinfo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sage/knots/knotinfo.py b/src/sage/knots/knotinfo.py index a17f0f7e3b7..8233b55077f 100644 --- a/src/sage/knots/knotinfo.py +++ b/src/sage/knots/knotinfo.py @@ -1725,15 +1725,15 @@ def khovanov_polynomial(self, var1='q', var2='t', base_ring=ZZ, original=False): visible on the website as of October 30, 2022. Instead, data computed with `KnotJob `__ are now displayed. The latter program is more accurate in terms of - orientation and reflection as it is based on `PD` code. + orientation and reflection as it is based on ``PD`` code. Even if they are not visible on the website, the data produced by - `KhoHo` are still available in the database. But maybe this will be + ``KhoHo`` are still available in the database. But maybe this will be discontinued (check out the `Python wrapper `__ for updated information). This interface will be adapted to the changes in an upcoming release. - Since the results of `KhoHo` were computed using the `DT` notation, + Since the results of ``KhoHo`` were computed using the ``DT`` notation, the Khovanov polynomial returned by this method belongs to the mirror image of the given knot for a `list of 140 exceptions `__. From 604c9160f1ed6b9ff05260994c4d37853969666d Mon Sep 17 00:00:00 2001 From: jnash10 Date: Mon, 13 Feb 2023 17:05:25 +0530 Subject: [PATCH 448/751] added check for invalid range --- src/sage/plot/misc.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/sage/plot/misc.py b/src/sage/plot/misc.py index 37a8000f9aa..1b279b5bb5d 100644 --- a/src/sage/plot/misc.py +++ b/src/sage/plot/misc.py @@ -139,6 +139,13 @@ def setup_for_eval_on_grid(funcs, else: vars, free_vars = unify_arguments(funcs) + #check for invalid range entered by user + if (ranges[0][-2]>ranges[0][-1]): + raise ValueError("xrange not correctly defined: xmin(={}) > xmax(={})".format(ranges[0][-2], ranges[0][-1])) + + if (ranges[1][-2]>ranges[1][-1]): + raise ValueError("xrange not correctly defined: ymin(={}) > ymax(={})".format(ranges[1][-2], ranges[1][-1])) + # pad the variables if we don't have enough nargs = len(ranges) if len(vars) < nargs: From bb8cc91edf2b789fa42fb7191b6a1e8969431b5f Mon Sep 17 00:00:00 2001 From: Rohan Garg <76916164+Sandstorm831@users.noreply.github.com> Date: Mon, 13 Feb 2023 17:56:40 +0530 Subject: [PATCH 449/751] Added Reference --- src/sage/combinat/posets/linear_extensions.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sage/combinat/posets/linear_extensions.py b/src/sage/combinat/posets/linear_extensions.py index 1a90a411b59..502ccb4cf23 100644 --- a/src/sage/combinat/posets/linear_extensions.py +++ b/src/sage/combinat/posets/linear_extensions.py @@ -268,6 +268,7 @@ def is_supergreedy(self): Informally, a linear extension is supergreedy if it "always goes up and receedes the least"; in other words, supergreedy linear extensions are depth-first linear extensions. + `Reference `_ EXAMPLES:: From f27866a8a6cd11d0cb0fa753f3331fcabcabf018 Mon Sep 17 00:00:00 2001 From: Travis Scrimshaw Date: Mon, 13 Feb 2023 21:43:51 +0900 Subject: [PATCH 450/751] Made the key polynomials know their degree. --- src/sage/combinat/key_polynomial.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/sage/combinat/key_polynomial.py b/src/sage/combinat/key_polynomial.py index be4d5aa8c04..dbc50ee1844 100644 --- a/src/sage/combinat/key_polynomial.py +++ b/src/sage/combinat/key_polynomial.py @@ -29,6 +29,7 @@ # **************************************************************************** from sage.categories.graded_algebras_with_basis import GradedAlgebrasWithBasis +from sage.misc.cachefunc import cached_method from sage.combinat.integer_vector import IntegerVectors from sage.combinat.free_module import CombinatorialFreeModule from sage.combinat.permutation import Permutation @@ -558,6 +559,7 @@ def __getitem__(self, c): c = C(c) return self._monomial(c) + @cached_method def one_basis(self): r""" Return the basis element indexing the identity. @@ -576,6 +578,22 @@ def one_basis(self): return self._indices([0] * self._k) return self._indices([]) + def degree_on_basis(self, alpha): + """ + Return the degree of the basis element indexed by ``alpha``. + + EXAMPLES:: + + sage: k = KeyPolynomials(QQ) + sage: k.degree_on_basis([2,1,0,2]) + 5 + + sage: k = KeyPolynomials(QQ, 5) + sage: k.degree_on_basis([2,1,0,2,0]) + 5 + """ + return ZZ(sum(alpha)) + def polynomial_ring(self): r""" Return the polynomial ring associated to ``self``. From 858a46fd605454ddbd5460cf3d49fa9b94117a3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Mon, 13 Feb 2023 15:08:54 +0100 Subject: [PATCH 451/751] fix pep E303 in modular/ and algebras/ --- src/sage/algebras/splitting_algebra.py | 54 ++++++++----------- src/sage/modular/abvar/cuspidal_subgroup.py | 6 +-- src/sage/modular/abvar/morphism.py | 21 ++++---- .../modular/arithgroup/arithgroup_perm.py | 5 +- .../modular/arithgroup/congroup_gamma0.py | 8 +-- src/sage/modular/local_comp/local_comp.py | 5 +- src/sage/modular/modform/ambient_R.py | 1 - .../modular/modform/cuspidal_submodule.py | 15 +++--- src/sage/modular/modform/eis_series.py | 1 - src/sage/modular/modform/numerical.py | 2 - src/sage/modular/modform/ring.py | 4 +- src/sage/modular/modform/vm_basis.py | 10 ++-- .../modform_hecketriangle/abstract_space.py | 2 - .../modform_hecketriangle/constructor.py | 1 - src/sage/modular/modsym/ambient.py | 13 +---- src/sage/modular/modsym/subspace.py | 21 +++----- src/sage/modular/modsym/tests.py | 7 ++- src/sage/modular/overconvergent/genus0.py | 14 ++--- src/sage/modular/pollack_stevens/modsym.py | 13 +++-- 19 files changed, 80 insertions(+), 123 deletions(-) diff --git a/src/sage/algebras/splitting_algebra.py b/src/sage/algebras/splitting_algebra.py index e19a2bb6d9a..2ca3881bbcf 100644 --- a/src/sage/algebras/splitting_algebra.py +++ b/src/sage/algebras/splitting_algebra.py @@ -318,15 +318,14 @@ def __init__(self, monic_polynomial, names='X', iterate=True, warning=True): self._splitting_roots = [self(root) for root in self._splitting_roots] verbose("splitting_roots: %s embedded" % (self._splitting_roots)) - - # ------------------------------------------------------------------------------------------- + # -------------------------------------------------------------------- # try to calculate inverses of the roots. This is possible if the original polynomial # has an invertible constant term. For example let cf = [-w, v,-u, 1] that is # p = h^3 -u*h^2 + v*h -w, than u = x + y + z, v = x*y + x*z + y*z, w = x*y*z. If # w is invertible then 1/x = (v -(u-x)*x)/w, 1/y = (v -(u-y)*y)/w, 1/z = (v -(u-z)*z)/w - # ------------------------------------------------------------------------------------------- + # ----------------------------------------------------------------- # first find the polynomial with invertible constant coefficient - # ------------------------------------------------------------------------------------------- + # ----------------------------------------------------------------- cf0_inv = None for cf in self._coefficients_list: cf0 = cf[0] @@ -338,11 +337,10 @@ def __init__(self, monic_polynomial, names='X', iterate=True, warning=True): except NotImplementedError: verbose("constant coefficient: %s not invertibe" %(cf0)) - - # ---------------------------------------------------------------------------------- - # assuming that cf splits into linear factors over self and the _splitting_roots - # are its roots we can calculate inverses - # ---------------------------------------------------------------------------------- + # ------------------------------------------------------------------ + # assuming that cf splits into linear factors over self + # and the _splitting_roots are its roots we can calculate inverses + # ------------------------------------------------------------------ if cf0_inv is not None: deg_cf = len(cf)-1 pf = P(cf) @@ -362,12 +360,11 @@ def __init__(self, monic_polynomial, names='X', iterate=True, warning=True): self._invertible_elements.update({v: k}) return - - ####################################################################################################################### - # --------------------------------------------------------------------------------------------------------------------- + ######################################################################## + # ---------------------------------------------------------------------- # overloaded inherited methods - # --------------------------------------------------------------------------------------------------------------------- - ####################################################################################################################### + # ---------------------------------------------------------------------- + ######################################################################## def __reduce__(self): r""" Used in pickling. @@ -397,7 +394,6 @@ def __reduce__(self): defining_polynomial = par_pol(definig_coefficients) return self.__class__, (defining_polynomial, self._root_names, self._iterate, False) - def _repr_(self): r""" Return a string representation of ``self``. @@ -514,20 +510,17 @@ def hom(self, im_gens, codomain=None, check=True, base_map=None): lift = self.lifting_map() return hom_from_cover*lift - - - ####################################################################################################################### - # --------------------------------------------------------------------------------------------------------------------- + ################################################################### + # ----------------------------------------------------------------- # local methods - # --------------------------------------------------------------------------------------------------------------------- - ####################################################################################################################### + # ----------------------------------------------------------------- + ################################################################### - - ####################################################################################################################### - # --------------------------------------------------------------------------------------------------------------------- + ################################################################### + # ----------------------------------------------------------------- # global methods - # --------------------------------------------------------------------------------------------------------------------- - ####################################################################################################################### + # ----------------------------------------------------------------- + ################################################################### def is_completely_split(self): r""" @@ -727,7 +720,6 @@ def create_roots(monic_polynomial, warning=True): roots = [(r, 1) for r in ext_ring.splitting_roots()] return roots - deg_pol = monic_polynomial.degree() if not root_names: from sage.structure.category_object import normalize_names @@ -740,12 +732,12 @@ def create_roots(monic_polynomial, warning=True): pass if not root_list: - # ------------------------------------------------------------------------------ + # -------------------------------------------------------------- # no roots found: find roots in an appropriate extension ring - # ------------------------------------------------------------------------------ + # -------------------------------------------------------------- verbose("no roots in base_ring") - if len(name_list) > deg_pol -1: - name_list = [name_list[i] for i in range(deg_pol-1)] + if len(name_list) > deg_pol - 1: + name_list = [name_list[i] for i in range(deg_pol - 1)] roots = create_roots(monic_polynomial, warning=warning) else: diff --git a/src/sage/modular/abvar/cuspidal_subgroup.py b/src/sage/modular/abvar/cuspidal_subgroup.py index 136f6cf23e4..2113272d2c4 100644 --- a/src/sage/modular/abvar/cuspidal_subgroup.py +++ b/src/sage/modular/abvar/cuspidal_subgroup.py @@ -211,7 +211,6 @@ def _repr_(self): """ return "Cuspidal subgroup %sover QQ of %s"%(self._invariants_repr(), self.abelian_variety()) - def lattice(self): """ Returned cached tuple of vectors that define elements of the @@ -219,10 +218,8 @@ def lattice(self): OUTPUT: - - ``tuple`` - cached - EXAMPLES:: sage: J = J0(27) @@ -265,8 +262,7 @@ def _repr_(self): sage: G._repr_() 'Finite subgroup with invariants [3] over QQ of Abelian variety J0(27) of dimension 1' """ - return "Subgroup generated by differences of rational cusps %sover QQ of %s"%(self._invariants_repr(), self.abelian_variety()) - + return "Subgroup generated by differences of rational cusps %sover QQ of %s" % (self._invariants_repr(), self.abelian_variety()) def lattice(self): """ diff --git a/src/sage/modular/abvar/morphism.py b/src/sage/modular/abvar/morphism.py index a57f4d0b66c..f0f3c065577 100644 --- a/src/sage/modular/abvar/morphism.py +++ b/src/sage/modular/abvar/morphism.py @@ -48,6 +48,7 @@ from .finite_subgroup import TorsionPoint + class Morphism_abstract(sage.modules.matrix_morphism.MatrixMorphism_abstract): """ A morphism between modular abelian varieties. @@ -184,7 +185,6 @@ def cokernel(self): self.__cokernel = C return C - def kernel(self): """ Return the kernel of this morphism. @@ -246,7 +246,6 @@ def kernel(self): return K, abvar - def factor_out_component_group(self): r""" View self as a morphism `f:A \to B`. Then `\ker(f)` @@ -286,7 +285,7 @@ def factor_out_component_group(self): L = A.image() # Saturate the image of the matrix corresponding to self. Lsat = L.saturation() - if L == Lsat: # easy case + if L == Lsat: # easy case self.__factor_out = self return self # Now find a matrix whose rows map exactly onto the @@ -308,9 +307,9 @@ def factor_out_component_group(self): # R/L' = (M+L')/L' = M/(L'/\M) = M/Lsat # which is torsion free! - Q = self.codomain() - M = Q.lattice() - one_over_n = ZZ(1)/n + Q = self.codomain() + M = Q.lattice() + one_over_n = ZZ.one() / n Lprime = (one_over_n * self.matrix() * M.basis_matrix()).row_module(ZZ) # This R is a lattice in the ambient space for B. @@ -546,7 +545,7 @@ def _image_of_finite_subgroup(self, G): B = G._relative_basis_matrix() * self.restrict_domain(G.abelian_variety()).matrix() * self.codomain().lattice().basis_matrix() lattice = B.row_module(ZZ) return self.codomain().finite_subgroup(lattice, - field_of_definition=G.field_of_definition()) + field_of_definition=G.field_of_definition()) def _image_of_abvar(self, A): """ @@ -654,11 +653,12 @@ def restrict_domain(self, sub): L = self.domain().lattice() B = sub.lattice().basis() - ims = sum([ (L(b)*self.matrix()).list() for b in B], []) + ims = sum(((L(b) * self.matrix()).list() for b in B), []) MS = matrix_space.MatrixSpace(self.base_ring(), len(B), self.codomain().rank()) H = sub.Hom(self.codomain(), self.category_for()) return H(MS(ims)) + class DegeneracyMap(Morphism): def __init__(self, parent, A, t, side="left"): """ @@ -714,7 +714,8 @@ def _repr_(self): sage: J0(22).degeneracy_map(44)._repr_() 'Degeneracy map from Abelian variety J0(22) of dimension 2 to Abelian variety J0(44) of dimension 4 defined by [1]' """ - return "Degeneracy map from %s to %s defined by %s"%(self.domain(), self.codomain(), self._t) + return "Degeneracy map from %s to %s defined by %s" % (self.domain(), self.codomain(), self._t) + class HeckeOperator(Morphism): """ @@ -761,7 +762,7 @@ def _repr_(self): sage: J.hecke_operator(2)._repr_() 'Hecke operator T_2 on Abelian variety J0(37) of dimension 2' """ - return "Hecke operator T_%s on %s"%(self.__n, self.__abvar) + return "Hecke operator T_%s on %s" % (self.__n, self.__abvar) def index(self): """ diff --git a/src/sage/modular/arithgroup/arithgroup_perm.py b/src/sage/modular/arithgroup/arithgroup_perm.py index 34a87cca043..8d2c2f1a19e 100644 --- a/src/sage/modular/arithgroup/arithgroup_perm.py +++ b/src/sage/modular/arithgroup/arithgroup_perm.py @@ -1216,11 +1216,10 @@ def coset_graph(self, Looped multi-digraph on 2 vertices """ from sage.graphs.digraph import DiGraph - res = DiGraph(multiedges=True,loops=True) + res = DiGraph(multiedges=True, loops=True) res.add_vertices(list(range(self.index()))) - - if right_cosets: # invert the permutations + if right_cosets: # invert the permutations S2 = [None]*self.index() S3 = [None]*self.index() L = [None]*self.index() diff --git a/src/sage/modular/arithgroup/congroup_gamma0.py b/src/sage/modular/arithgroup/congroup_gamma0.py index 5a4b31bce86..ab38f518bb9 100644 --- a/src/sage/modular/arithgroup/congroup_gamma0.py +++ b/src/sage/modular/arithgroup/congroup_gamma0.py @@ -104,7 +104,6 @@ class Gamma0_class(GammaH_class): """ - def __init__(self, level): r""" The congruence subgroup `\Gamma_0(N)`. @@ -482,13 +481,14 @@ def ncusps(self): [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2] """ n = self.level() - return sum([euler_phi(gcd(d,n//d)) for d in n.divisors()]) - + return sum(euler_phi(gcd(d, n // d)) for d in n.divisors()) def nu2(self): r""" Return the number of elliptic points of order 2 for this congruence - subgroup `\Gamma_0(N)`. The number of these is given by a standard formula: + subgroup `\Gamma_0(N)`. + + The number of these is given by a standard formula: 0 if `N` is divisible by 4 or any prime congruent to -1 mod 4, and otherwise `2^d` where d is the number of odd primes dividing `N`. diff --git a/src/sage/modular/local_comp/local_comp.py b/src/sage/modular/local_comp/local_comp.py index 693843b1afe..4a8ec0195f5 100644 --- a/src/sage/modular/local_comp/local_comp.py +++ b/src/sage/modular/local_comp/local_comp.py @@ -885,9 +885,8 @@ def characters(self): G = G.base_extend(F) c1q2, c2q2 = flatten([[x]*e for x,e in theta_poly.roots(G.base_ring())]) - - pairA = [ [c1q, c1q2], [c2q,c2q2] ] - pairB = [ [c1q, c2q2], [c2q, c1q2] ] + pairA = [[c1q, c1q2], [c2q, c2q2]] + pairB = [[c1q, c2q2], [c2q, c1q2]] A_fail = 0 B_fail = 0 diff --git a/src/sage/modular/modform/ambient_R.py b/src/sage/modular/modform/ambient_R.py index 91e3f97b603..3e1cbbf158d 100644 --- a/src/sage/modular/modform/ambient_R.py +++ b/src/sage/modular/modform/ambient_R.py @@ -147,7 +147,6 @@ def cuspidal_submodule(self): """ return CuspidalSubmodule_R(self) - def change_ring(self, R): r""" Return this modular forms space with the base ring changed to the ring R. diff --git a/src/sage/modular/modform/cuspidal_submodule.py b/src/sage/modular/modform/cuspidal_submodule.py index 4b123ec8dc9..a39a66e44ee 100644 --- a/src/sage/modular/modform/cuspidal_submodule.py +++ b/src/sage/modular/modform/cuspidal_submodule.py @@ -174,15 +174,16 @@ def modular_symbols(self, sign=0): A = self.ambient_module() return A.modular_symbols(sign).cuspidal_submodule() - def change_ring(self, R): r""" - Change the base ring of self to R, when this makes sense. This differs - from :meth:`~sage.modular.modform.space.ModularFormsSpace.base_extend` - in that there may not be a canonical map from self to the new space, as - in the first example below. If this space has a character then this may - fail when the character cannot be defined over R, as in the second - example. + Change the base ring of ``self`` to ``R``, when this makes sense. + + This differs from + :meth:`~sage.modular.modform.space.ModularFormsSpace.base_extend` + in that there may not be a canonical map from ``self`` to the new + space, as in the first example below. If this space has a + character then this may fail when the character cannot be + defined over ``R``, as in the second example. EXAMPLES:: diff --git a/src/sage/modular/modform/eis_series.py b/src/sage/modular/modform/eis_series.py index 351577db16e..6b2e6d187ea 100644 --- a/src/sage/modular/modform/eis_series.py +++ b/src/sage/modular/modform/eis_series.py @@ -243,7 +243,6 @@ def __find_eisen_chars(character, k): V.insert(0, (chi, chi_inv, t)) return V - eps = character if eps(-1) != (-1)**k: return [] diff --git a/src/sage/modular/modform/numerical.py b/src/sage/modular/modform/numerical.py index 1f7e8decd55..ad52403f471 100644 --- a/src/sage/modular/modform/numerical.py +++ b/src/sage/modular/modform/numerical.py @@ -287,8 +287,6 @@ def _easy_vector(self): if E.nrows() == 0: return x - - def best_row(M): """ Find the best row among rows of M, i.e. the row diff --git a/src/sage/modular/modform/ring.py b/src/sage/modular/modform/ring.py index 3a56864da97..f98a0b0adf8 100644 --- a/src/sage/modular/modform/ring.py +++ b/src/sage/modular/modform/ring.py @@ -803,7 +803,6 @@ def generators(self, maxweight=8, prec=10, start_gens=[], start_weight=2): return ret - def gen_forms(self, maxweight=8, start_gens=[], start_weight=2): r""" Return a list of modular forms generating this ring (as an algebra over @@ -1070,9 +1069,8 @@ def cuspidal_ideal_generators(self, maxweight=8, prec=None): k = 2 G = [] - while k <= maxweight: - t = verbose("Looking for cusp generators in weight %s" % k) + t = verbose(f"Looking for cusp generators in weight {k}") kprec = self.modular_forms_of_weight(k).sturm_bound() diff --git a/src/sage/modular/modform/vm_basis.py b/src/sage/modular/modform/vm_basis.py index 4ac4f8c36a0..559c36828e9 100644 --- a/src/sage/modular/modform/vm_basis.py +++ b/src/sage/modular/modform/vm_basis.py @@ -200,21 +200,21 @@ def victor_miller_basis(k, prec=10, cusp_only=False, var='q'): Fprod._unsafe_mutate_truncate(prec) Dprod._unsafe_mutate_truncate(prec) - - P = PowerSeriesRing(ZZ,var) - if cusp_only : + P = PowerSeriesRing(ZZ, var) + if cusp_only: for i in range(1,n+1) : for j in range(1, i) : ls[j] = ls[j] - ls[j][i]*ls[i] return Sequence([P(l.list()).add_bigoh(prec) for l in ls[1:]],cr=True) else : - for i in range(1,n+1) : - for j in range(i) : + for i in range(1,n+1): + for j in range(i): ls[j] = ls[j] - ls[j][i]*ls[i] return Sequence([P(l.list()).add_bigoh(prec) for l in ls], cr=True) + def _delta_poly(prec=10): """ Return the q-expansion of Delta as a FLINT polynomial. Used internally by diff --git a/src/sage/modular/modform_hecketriangle/abstract_space.py b/src/sage/modular/modform_hecketriangle/abstract_space.py index efd12339000..8ecd0974d39 100644 --- a/src/sage/modular/modform_hecketriangle/abstract_space.py +++ b/src/sage/modular/modform_hecketriangle/abstract_space.py @@ -2070,7 +2070,6 @@ def construct_quasi_form(self, laurent_series, order_1=ZZ(0), check=True, ration return el - @cached_method def q_basis(self, m=None, min_exp=0, order_1=ZZ(0)): r""" @@ -2363,7 +2362,6 @@ def rationalize_coefficient(coeff, m): return laurent_series - # DEFAULT METHODS (should be overwritten in concrete classes) def _an_element_(self): diff --git a/src/sage/modular/modform_hecketriangle/constructor.py b/src/sage/modular/modform_hecketriangle/constructor.py index 7d182bb2147..15ddd6e4c9d 100644 --- a/src/sage/modular/modform_hecketriangle/constructor.py +++ b/src/sage/modular/modform_hecketriangle/constructor.py @@ -159,7 +159,6 @@ def rational_type(f, n=ZZ(3), base_ring=ZZ): # elem, homo, k, ep, analytic_type return (False, False, None, None, None) - # Determine whether f is homogeneous if (len(ep_num) == 1 and dhom(hom_num).is_homogeneous()): homo = True diff --git a/src/sage/modular/modsym/ambient.py b/src/sage/modular/modsym/ambient.py index 627f1c567e7..37b1c46a06c 100644 --- a/src/sage/modular/modsym/ambient.py +++ b/src/sage/modular/modsym/ambient.py @@ -345,7 +345,6 @@ def manin_gens_to_basis(self): self.compute_presentation() return self._manin_gens_to_basis - ##################################################################### # Coercion ##################################################################### @@ -479,8 +478,7 @@ def _element_constructor_(self, x, computed_with_hecke=False): else: return self.modular_symbol(x) - raise TypeError("No coercion of %s into %s defined."%(x, self)) - + raise TypeError("No coercion of %s into %s defined." % (x, self)) def change_ring(self, R): r""" @@ -1021,7 +1019,6 @@ def _compute_hecke_matrix_prime(self, p, rows=None): self._hecke_matrices[(p,rows)] = Tp return Tp - def __heilbronn_operator(self, M, H, t=1): r""" Return the matrix function to the space `M` defined by `H`, `t`. @@ -1964,7 +1961,6 @@ def modular_symbols_of_sign(self, sign): return self return modsym.ModularSymbols(self.group(), self.weight(), sign=sign, base_ring=self.base_ring()) - def modular_symbols_of_weight(self, k): r""" Return a space of modular symbols with the same defining @@ -2615,7 +2611,6 @@ def __init__(self, N, k, sign, F, custom_init=None, category=None): sign=sign, base_ring=F, custom_init=custom_init, category=category) - def _dimension_formula(self): r""" Return the dimension of this space using the formula. @@ -2635,7 +2630,7 @@ def _dimension_formula(self): if k % 2: return 0 elif k > 2: - return 2*self.group().dimension_cusp_forms(k) + self.group().ncusps() + return 2 * self.group().dimension_cusp_forms(k) + self.group().ncusps() else: return 2*self.group().dimension_cusp_forms(k) + self.group().ncusps() - 1 else: @@ -2677,7 +2672,6 @@ def _cuspidal_submodule_dimension_formula(self): else: raise NotImplementedError - def _degeneracy_raising_matrix_1(self, M): r""" Return the matrix of the degeneracy map (with t = 1) to level @@ -2739,7 +2733,6 @@ def _degeneracy_raising_matrix_1(self, M): A = MS(rows) return A - def _cuspidal_new_submodule_dimension_formula(self): r""" Return the dimension of the new cuspidal subspace, via the formula. @@ -2982,7 +2975,6 @@ def _cuspidal_new_submodule_dimension_formula(self): else: raise NotImplementedError - def _compute_hecke_matrix_prime(self, p, rows=None): r""" Compute and return the matrix of the `p`-th Hecke operator. @@ -3282,7 +3274,6 @@ def _cuspidal_new_submodule_dimension_formula(self): m = 1 return m * self.group().dimension_new_cusp_forms(self.weight()) - def _compute_hecke_matrix_prime_power(self, p, r): r""" Compute and return the matrix of the Hecke operator `T(p^r)`. diff --git a/src/sage/modular/modsym/subspace.py b/src/sage/modular/modsym/subspace.py index c1f70471c0f..3c496534955 100644 --- a/src/sage/modular/modsym/subspace.py +++ b/src/sage/modular/modsym/subspace.py @@ -1,8 +1,7 @@ """ Subspace of ambient spaces of modular symbols """ - -#***************************************************************************** +# **************************************************************************** # Sage: Open Source Mathematical Software # # Copyright (C) 2005 William Stein @@ -16,18 +15,14 @@ # # The full text of the GPL is available at: # -# http://www.gnu.org/licenses/ -#***************************************************************************** - +# https://www.gnu.org/licenses/ +# **************************************************************************** import sage.modular.hecke.all as hecke - import sage.structure.factorization - import sage.modular.modsym.space - class ModularSymbolsSubspace(sage.modular.modsym.space.ModularSymbolsSpace, hecke.HeckeSubmodule): """ Subspace of ambient space of modular symbols @@ -175,10 +170,11 @@ def cuspidal_submodule(self): self.__cuspidal_submodule = S.intersection(self) return self.__cuspidal_submodule - def dual_star_involution_matrix(self): """ - Return the matrix of the dual star involution, which is induced by + Return the matrix of the dual star involution. + + This involution is induced by complex conjugation on the linear dual of modular symbols. EXAMPLES:: @@ -363,21 +359,18 @@ def is_eisenstein(self): self.__is_eisenstein = self.is_submodule(C) return self.__is_eisenstein - def _compute_sign_subspace(self, sign, compute_dual=True): """ - Return the subspace of self that is fixed under the star + Return the subspace of ``self`` that is fixed under the star involution. INPUT: - - ``sign`` - int (either -1 or +1) - ``compute_dual`` - bool (default: True) also compute dual subspace. This are useful for many algorithms. - OUTPUT: subspace of modular symbols EXAMPLES:: diff --git a/src/sage/modular/modsym/tests.py b/src/sage/modular/modsym/tests.py index 4fd47dda376..cb9e19cc8b1 100644 --- a/src/sage/modular/modsym/tests.py +++ b/src/sage/modular/modsym/tests.py @@ -310,12 +310,11 @@ def test_csns_nscs(self): M = self._modular_symbols_space() V1 = M.cuspidal_submodule().new_submodule() V2 = M.new_submodule().cuspidal_submodule() - assert V1 == V2, "Test failed for M=\"%s\", where the new cuspidal and cuspidal new spaces are computed differently."%M + assert V1 == V2, "Test failed for M=\"%s\", where the new cuspidal and cuspidal new spaces are computed differently." % M d = M._cuspidal_new_submodule_dimension_formula() assert d == V1.dimension(), \ - "Test failed for M=\"%s\", where computed dimension is %s but formula dimension is %s."%( - M, V1.dimension(), d) - + "Test failed for M=\"%s\", where computed dimension is %s but formula dimension is %s." % ( + M, V1.dimension(), d) def test_decomposition(self): """ diff --git a/src/sage/modular/overconvergent/genus0.py b/src/sage/modular/overconvergent/genus0.py index 972ef7eed45..09f39d33785 100644 --- a/src/sage/modular/overconvergent/genus0.py +++ b/src/sage/modular/overconvergent/genus0.py @@ -851,11 +851,10 @@ def coordinate_vector(self, x): return self.base_extend(x.base_ring()).coordinate_vector(x) if x.parent() != self: - x = self(x) + x = self(x) return vector(self.base_ring(), x.gexp().padded_list(x.gexp().prec())) - ########################################################## # Pointless routines required by parent class definition # ########################################################## @@ -926,13 +925,11 @@ def hecke_operator(self, f, m): else: return hecke_operator_on_qexp(f, m, self.weight().k(), eps=self.weight().chi()) - - def _convert_to_basis(self, qexp): r""" Given a `q`-expansion, converts it to a vector in the basis of this space, to the maximum possible precision (which is the minimum of the - `q`-adic precision of the `q`-expansion and the precision of self). + `q`-adic precision of the `q`-expansion and the precision of ``self``). EXAMPLES:: @@ -1014,7 +1011,6 @@ def hecke_matrix(self, m, n, use_recurrence=False, exact_arith=False): raise ValueError("n is too large computing initial conds: can't work out u[%s,%s]" % (i,j)) mat[i,j] = 0 - else: l = self._convert_to_basis(self.hecke_operator(self._basis_cache[j], m)) for i in range(self.prime()): @@ -1210,7 +1206,6 @@ def recurrence_matrix(self, use_smithline=True): self._cached_recurrence_matrix.set_immutable() return self._cached_recurrence_matrix - def _discover_recurrence_matrix(self, use_smithline=True): r""" Does hard work of calculating recurrence matrix, which is cached to avoid doing this every time. @@ -1329,10 +1324,11 @@ def __init__(self, parent, gexp=None, qexp=None): self._eigenvalue = None self._slope = None - def _add_(self, other): r""" - Add self to other (where other has the same parent as self). + Add ``self`` to ``other``. + + Here ``other`` has the same parent as ``self``. EXAMPLES:: diff --git a/src/sage/modular/pollack_stevens/modsym.py b/src/sage/modular/pollack_stevens/modsym.py index 0d0f064445c..dadc9df4617 100644 --- a/src/sage/modular/pollack_stevens/modsym.py +++ b/src/sage/modular/pollack_stevens/modsym.py @@ -1439,7 +1439,6 @@ def _find_extraprec(self, p, M, alpha, check): newM += -s return newM, eisenloss, q, aq - def p_stabilize_and_lift(self, p, M, alpha=None, ap=None, new_base_ring=None, ordinary=True, algorithm='greenberg', eigensymbol=False, @@ -1531,7 +1530,7 @@ def reduce_precision(self, M): def precision_relative(self): r""" - Return the number of moments of each value of self + Return the number of moments of each value of ``self``. EXAMPLES:: @@ -1541,14 +1540,14 @@ def precision_relative(self): sage: f.precision_relative() 1 """ - return min([len(a._moments) for a in self._map]) - + return min(len(a._moments) for a in self._map) def specialize(self, new_base_ring=None): r""" - Return the underlying classical symbol of weight `k` - i.e., - applies the canonical map `D_k \to Sym^k` to all values of - self. + Return the underlying classical symbol of weight `k`. + + Namely, this applies the canonical map `D_k \to Sym^k` to all + values of ``self``. EXAMPLES:: From dc3009a0c780e328d4ed18ef36d86a602e1168d1 Mon Sep 17 00:00:00 2001 From: Martin Rubey Date: Mon, 13 Feb 2023 15:27:54 +0100 Subject: [PATCH 452/751] reviewer's suggestions --- src/sage/combinat/bijectionist.py | 145 +++++++++++++++++------------- 1 file changed, 83 insertions(+), 62 deletions(-) diff --git a/src/sage/combinat/bijectionist.py b/src/sage/combinat/bijectionist.py index 6e756891977..8844f4f3602 100644 --- a/src/sage/combinat/bijectionist.py +++ b/src/sage/combinat/bijectionist.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- r""" A bijectionist's toolkit @@ -36,9 +35,23 @@ A guided tour ============= -EXAMPLES: +Consider the following combinatorial statistics on a permutation: -We find a statistic `s` such that `(s, wex, fix) \sim (llis, des, adj)`:: + * `wex`, the number of weak excedences, + * `fix`, the number of fixed points, + * `des`, the number of descents (after appending `0`), + * `adj`, the number of adjacencies (after appending `0`), and + * `llis`, the length of a longest increasing subsequence. + +Moreover, let `rot` be action of rotation on a permutation, i.e., the +conjugation with the long cycle. + +It is known that there must exist a statistic `s` on permutations, +which is equidistributed with `llis` but additionally invariant under +`rot`. However, at least very small cases do not contradict the +possibility that one can even find a statistic `s`, invariant under +`rot` and such that `(s, wex, fix) \sim (llis, des, adj)`. Let us +check this for permutations of size at most `3`:: sage: N = 3 sage: A = B = [pi for n in range(N+1) for pi in Permutations(n)] @@ -119,15 +132,17 @@ [3, 1, 2]: 3, [3, 2, 1]: 2} -There is no rotation invariant statistic on non crossing set partitions which -is equidistributed with the Strahler number on ordered trees:: +On the other hand, we can check that there is no rotation invariant +statistic on non-crossing set partitions which is equidistributed +with the Strahler number on ordered trees:: - sage: N = 8; + sage: N = 8 sage: A = [SetPartition(d.to_noncrossing_partition()) for n in range(N) for d in DyckWords(n)] sage: B = [t for n in range(1, N+1) for t in OrderedTrees(n)] sage: def theta(m): return SetPartition([[i % m.size() + 1 for i in b] for b in m]) -The following code is equivalent to ``tau = findstat(397)``:: +Code for the Strahler number can be obtained from FindStat. The +following code is equivalent to ``tau = findstat(397)``:: sage: def tau(T): ....: if len(T) == 0: @@ -146,7 +161,8 @@ sage: list(bij.solutions_iterator()) [] -An example identifying `s` and `S`:: +Next we demonstrate how to search for a bijection, instead An example +identifying `s` and `S`:: sage: N = 4 sage: A = [dyck_word for n in range(1, N) for dyck_word in DyckWords(n)] @@ -342,7 +358,7 @@ sage: bij = Bijectionist(A, B, tau, value_restrictions=((Permutation([1, 2]), [4, 5]),)) Traceback (most recent call last): ... - ValueError: No possible values found for singleton block [[1, 2]] + ValueError: no possible values found for singleton block [[1, 2]] """ # **************************************************************************** @@ -392,9 +408,8 @@ class Bijectionist(SageObject): - ``pi_rho`` -- (optional) a list of triples ``(k, pi, rho)``, where - - ``pi`` -- a ``k``-ary operation composing objects in ``A`` and - - - ``rho`` -- a ``k``-ary function composing statistic values in `Z` + * ``pi`` -- a ``k``-ary operation composing objects in ``A`` and + * ``rho`` -- a ``k``-ary function composing statistic values in ``Z`` - ``elements_distributions`` -- (optional) a list of pairs ``(tA, tZ)``, specifying the distributions of ``tA`` @@ -468,7 +483,7 @@ class Bijectionist(SageObject): methods a second time overrides the previous specification. """ - def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], + def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=None, pi_rho=tuple(), phi_psi=tuple(), Q=None, elements_distributions=tuple(), value_restrictions=tuple(), solver=None, key=None): @@ -518,6 +533,8 @@ def __init__(self, A, B, tau=None, alpha_beta=tuple(), P=[], except TypeError: self._Z = list(self._Z) self._sorter["Z"] = lambda x: list(x) + if P is None: + P = [] # set optional inputs self.set_statistics(*alpha_beta) @@ -701,7 +718,7 @@ def set_statistics(self, *alpha_beta): sage: bij.set_statistics((wex, fix)) Traceback (most recent call last): ... - ValueError: Statistics alpha and beta are not equidistributed! + ValueError: statistics alpha and beta are not equidistributed TESTS: @@ -750,13 +767,13 @@ def set_statistics(self, *alpha_beta): for b in self._B: v = self._beta(b) if v not in self._statistics_fibers: - raise ValueError(f"Statistics alpha and beta do not have the same image, {v} is not a value of alpha, but of beta!") + raise ValueError(f"statistics alpha and beta do not have the same image, {v} is not a value of alpha, but of beta") self._statistics_fibers[v][1].append(b) # check compatibility if not all(len(fiber[0]) == len(fiber[1]) for fiber in self._statistics_fibers.values()): - raise ValueError("Statistics alpha and beta are not equidistributed!") + raise ValueError("statistics alpha and beta are not equidistributed") self._W = list(self._statistics_fibers) @@ -810,8 +827,8 @@ def statistics_table(self, header=True): INPUT: - - ``header`` -- (optional, default: ``True``) whether to include a - header with the standard greek letters. + - ``header`` -- (default: ``True``) whether to include a + header with the standard Greek letters OUTPUT: @@ -1023,7 +1040,7 @@ def set_value_restrictions(self, *value_restrictions): sage: bij._compute_possible_block_values() Traceback (most recent call last): ... - ValueError: No possible values found for singleton block [[1, 2]] + ValueError: no possible values found for singleton block [[1, 2]] sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] sage: tau = Permutation.longest_increasing_subsequence_length @@ -1033,7 +1050,7 @@ def set_value_restrictions(self, *value_restrictions): sage: bij._compute_possible_block_values() Traceback (most recent call last): ... - ValueError: No possible values found for block [[1, 2], [2, 1]] + ValueError: no possible values found for block [[1, 2], [2, 1]] sage: A = B = [permutation for n in range(4) for permutation in Permutations(n)] sage: tau = Permutation.longest_increasing_subsequence_length @@ -1041,7 +1058,7 @@ def set_value_restrictions(self, *value_restrictions): sage: bij.set_value_restrictions(((1, 2), [4, 5, 6])) Traceback (most recent call last): ... - AssertionError: Element (1, 2) was not found in A + AssertionError: element (1, 2) was not found in A """ # it might be much cheaper to construct the sets as subsets @@ -1052,7 +1069,7 @@ def set_value_restrictions(self, *value_restrictions): set_Z = set(self._Z) self._restrictions_possible_values = {a: set_Z for a in self._A} for a, values in value_restrictions: - assert a in self._A, f"Element {a} was not found in A" + assert a in self._A, f"element {a} was not found in A" self._restrictions_possible_values[a] = self._restrictions_possible_values[a].intersection(values) def _compute_possible_block_values(self): @@ -1073,7 +1090,7 @@ def _compute_possible_block_values(self): sage: bij._compute_possible_block_values() Traceback (most recent call last): ... - ValueError: No possible values found for singleton block [[1, 2]] + ValueError: no possible values found for singleton block [[1, 2]] """ self._possible_block_values = {} # P -> Power(Z) @@ -1083,9 +1100,9 @@ def _compute_possible_block_values(self): self._possible_block_values[p] = _non_copying_intersection(sets) if not self._possible_block_values[p]: if len(block) == 1: - raise ValueError(f"No possible values found for singleton block {block}") + raise ValueError(f"no possible values found for singleton block {block}") else: - raise ValueError(f"No possible values found for block {block}") + raise ValueError(f"no possible values found for block {block}") def set_distributions(self, *elements_distributions): r""" @@ -1229,11 +1246,11 @@ def set_distributions(self, *elements_distributions): sage: bij.set_distributions(([Permutation([1, 2, 3, 4])], [1])) Traceback (most recent call last): ... - ValueError: Element [1, 2, 3, 4] was not found in A! + ValueError: element [1, 2, 3, 4] was not found in A sage: bij.set_distributions(([Permutation([1, 2, 3])], [-1])) Traceback (most recent call last): ... - ValueError: Value -1 was not found in tau(A)! + ValueError: value -1 was not found in tau(A) Note that the same error occurs when an element that is not the first element of the list is not in `A`. @@ -1244,9 +1261,9 @@ def set_distributions(self, *elements_distributions): assert len(tA) == len(tZ), f"{tA} and {tZ} are not of the same size!" for a, z in zip(tA, tZ): if a not in self._A: - raise ValueError(f"Element {a} was not found in A!") + raise ValueError(f"element {a} was not found in A") if z not in self._Z: - raise ValueError(f"Value {z} was not found in tau(A)!") + raise ValueError(f"value {z} was not found in tau(A)") self._elements_distributions = tuple(elements_distributions) def set_intertwining_relations(self, *pi_rho): @@ -1442,7 +1459,7 @@ def set_homomesic(self, Q): INPUT: - - ``Q`` -- a set partition of ``A``. + - ``Q`` -- a set partition of ``A`` EXAMPLES:: @@ -1698,15 +1715,15 @@ def possible_values(self, p=None, optimal=False): INPUT: - - ``p`` -- (optional, default: ``None``) -- a block of `P`, or - an element of a block of `P`, or a list of these + - ``p`` -- (optional) a block of `P`, or an element of a + block of `P`, or a list of these - - ``optimal`` -- (optional, default: ``False``) whether or - not to compute the minimal possible set of statistic values. + - ``optimal`` -- (default: ``False``) whether or not to + compute the minimal possible set of statistic values .. NOTE:: - computing the minimal possible set of statistic values + Computing the minimal possible set of statistic values may be computationally expensive. .. TODO:: @@ -1758,6 +1775,7 @@ def possible_values(self, p=None, optimal=False): {'a': {0, 1}, 'b': {0, 1}} sage: bij.possible_values(p="a", optimal=True) {'a': set(), 'b': set()} + """ # convert input to set of block representatives blocks = set() @@ -1896,15 +1914,16 @@ def _find_counterexample(self, P, s0, d, on_blocks): INPUT: - - ``P``, the representatives of the blocks, or `A` if - ``on_blocks`` is ``False``. + - ``P`` -- the representatives of the blocks, or `A` if + ``on_blocks`` is ``False`` - - ``s0``, a solution. + - ``s0`` -- a solution - - ``d``, a subset of `A`, in the form of a dict from `A` to `\{0, 1\}`. + - ``d`` -- a subset of `A`, in the form of a dict from `A` to + `\{0, 1\}` - - ``on_blocks``, whether to return the counter example on - blocks or on elements. + - ``on_blocks`` -- whether to return the counterexample on + blocks or on elements EXAMPLES:: @@ -1920,6 +1939,7 @@ def _find_counterexample(self, P, s0, d, on_blocks): sage: d = {'a': 1, 'b': 0, 'c': 0, 'd': 0, 'e': 0} sage: bij._find_counterexample(bij._A, s0, d, False) {'a': 2, 'b': 2, 'c': 1, 'd': 3, 'e': 1} + """ bmilp = self._bmilp for z in self._Z: @@ -2446,8 +2466,9 @@ def solutions_iterator(self): class _BijectionistMILP(): r""" - Wrapper class for the MixedIntegerLinearProgram (MILP). This - class is used to manage the MILP, add constraints, solve the + Wrapper class for the MixedIntegerLinearProgram (MILP). + + This class is used to manage the MILP, add constraints, solve the problem and check for uniqueness of solution values. """ def __init__(self, bijectionist: Bijectionist, solutions=None): @@ -2458,10 +2479,10 @@ def __init__(self, bijectionist: Bijectionist, solutions=None): - ``bijectionist`` -- an instance of :class:`Bijectionist`. - - ``solutions`` -- (optional, default: ``None``) a list of solutions of - the problem, each provided as a dictionary mapping `(a, z)` to a - Boolean, such that at least one element from each block of `P` - appears as `a`. + - ``solutions`` -- (optional) a list of solutions of the + problem, each provided as a dictionary mapping `(a, z)` to + a boolean, such that at least one element from each block + of `P` appears as `a`. .. TODO:: @@ -2585,8 +2606,8 @@ def _prepare_solution(self, on_blocks, solution): INPUT: - - ``on_blocks``, whether to return the solution on blocks or - on all elements + - ``on_blocks`` -- whether to return the solution on blocks + or on all elements TESTS:: @@ -2621,10 +2642,10 @@ def solutions_iterator(self, on_blocks, additional_constraints): INPUT: - ``additional_constraints`` -- a list of constraints for the - underlying MILP. + underlying MILP - ``on_blocks``, whether to return the solution on blocks or - on all elements. + on all elements TESTS:: @@ -2689,8 +2710,8 @@ def _add_solution(self, solution): INPUT: - - ``solution``, a dictionary from the indices of the MILP to - Boolean. + - ``solution`` -- a dictionary from the indices of the MILP to + a boolean EXAMPLES:: @@ -2727,10 +2748,10 @@ def _is_solution(self, constraint, values): INPUT: - - ``constraint``, a + - ``constraint`` -- a :class:`sage.numerical.linear_functions.LinearConstraint`. - - ``values``, a candidate for a solution of the MILP as a + - ``values`` -- a candidate for a solution of the MILP as a dictionary from pairs `(a, z)\in A\times Z` to `0` or `1`, specifying whether `a` is mapped to `z`. @@ -2750,7 +2771,7 @@ def _is_solution(self, constraint, values): """ index_block_value_dict = {} for (p, z), v in self._x.items(): - variable_index = next(iter(v.dict().keys())) + variable_index = next(iter(v.dict())) index_block_value_dict[variable_index] = (p, z) def evaluate(f): @@ -2793,8 +2814,8 @@ def add_alpha_beta_constraints(self): W = self._bijectionist._W Z = self._bijectionist._Z zero = self.milp.linear_functions_parent().zero() - AZ_matrix = [[zero]*len(W) for _ in range(len(Z))] - B_matrix = [[zero]*len(W) for _ in range(len(Z))] + AZ_matrix = [[zero] * len(W) for _ in range(len(Z))] + B_matrix = [[zero] * len(W) for _ in range(len(Z))] W_dict = {w: i for i, w in enumerate(W)} Z_dict = {z: i for i, z in enumerate(Z)} @@ -2922,7 +2943,7 @@ def add_intertwining_relation_constraints(self): P = self._bijectionist._P for composition_index, pi_rho in enumerate(self._bijectionist._pi_rho): pi_blocks = set() - for a_tuple in itertools.product(*([A]*pi_rho.numargs)): + for a_tuple in itertools.product(A, repeat=pi_rho.numargs): if pi_rho.domain is not None and not pi_rho.domain(*a_tuple): continue a = pi_rho.pi(*a_tuple) @@ -3048,7 +3069,7 @@ def _invert_dict(d): INPUT: - - ``d``, a ``dict``. + - ``d`` -- a dict EXAMPLES:: @@ -3071,7 +3092,7 @@ def _disjoint_set_roots(d): INPUT: - - ``d``, a ``sage.sets.disjoint_set.DisjointSet_of_hashables`` + - ``d`` -- a :class:`sage.sets.disjoint_set.DisjointSet_of_hashables` EXAMPLES:: @@ -3125,7 +3146,7 @@ def _non_copying_intersection(sets): ....: [(3,i,j) for i in [-2,-1,0,1,2] for j in [-1,1]]] Note that adding ``[(2,-2,-1), (2,2,-1), (2,-2,1), (2,2,1)]`` makes -it take (seemingly) forever.:: +it take (seemingly) forever:: sage: def c1(a, b): return (a[0]+b[0], a[1]*b[1], a[2]*b[2]) sage: def c2(a): return (a[0], -a[1], a[2]) From 0d3ec5e28433ed8859f39a0bddc3b24b466913a0 Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Mon, 13 Feb 2023 15:44:29 +0000 Subject: [PATCH 453/751] Fix docstrings --- src/sage/combinat/designs/difference_family.py | 6 +++--- src/sage/combinat/matrices/hadamard_matrix.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index c9949678e3f..61653c14685 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -2272,18 +2272,18 @@ def generate_set(index_set, cosets): def supplementary_difference_set(n, existence=False, check=True): - r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where skew and `n_1 + n_2 + n_3 + n_4 = n+\lambda`. + r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where `n_1 + n_2 + n_3 + n_4 = n+\lambda`. These sets are constructed from available data, as described in [Djo1994a]_. - The data for `n=191` is taken from [Djo2008c]_, and date for `n=239` is from [Djo1994b]_. + The data for `n=191` is taken from [Djo2008c]_, and data for `n=239` is from [Djo1994b]_. Additional SDS are constructed using :func:`skew_supplementary_difference_set`. INPUT: - ``n`` -- integer, the parameter of the supplementary difference set. - - ``existence`` -- boolean (dafault False). If true, only check whether the + - ``existence`` -- boolean (default False). If true, only check whether the supplementary difference sets can be constructed. - ``check`` -- boolean (default True). If true, check that the sets are diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 760d73e6f86..b65a412ab63 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -180,7 +180,7 @@ def symmetric_conference_matrix_paley(n): and 1s and -1s elsewhere, satisfying `CC^\top=(n-1)I`. This construction assumes that `q = n-1` is a prime power, with `q \cong 1 \mod 4`. See [Hora]_ or [Lon2013]_. - These matrices are used in the :func:`hadamard_matrix_paleyII`. + These matrices are used in :func:`hadamard_matrix_paleyII`. INPUT: @@ -300,7 +300,7 @@ def hadamard_matrix_miyamoto_construction(n, existence=False, check=True): If ``existence`` is false, returns the Hadamard matrix of order `n`. It raises an error if no data is available to construct the matrix of the given order, - or if `n` is not a multiple of `4`. + or if `n` does not satisfies the constraints. If ``existence`` is true, returns a boolean representing whether the matrix can be constructed or not. @@ -338,7 +338,7 @@ def hadamard_matrix_miyamoto_construction(n, existence=False, check=True): q = n // 4 if existence: - return is_prime_power(q) and q % 4 == 1 and hadamard_matrix(q-1, existence=True) + return is_prime_power(q) and q % 4 == 1 and hadamard_matrix(q-1, existence=True) is True if not (is_prime_power(q) and q % 4 == 1 and hadamard_matrix(q-1, existence=True)): raise ValueError(f'The order {n} is not covered by Miyamoto construction.') @@ -921,7 +921,7 @@ def hadamard_matrix_from_sds(n, existence=False, check=True): Given four SDS with parameters `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` with `n_1 + n_2 + n_3 + n_4 = n+\lambda` we can construct four (-1,+1) sequences `a_i = (a_{i,0},...,a_{i,n-1})` - where `a_{i,j} = -1` iff `j \in S_i`. This will be the fist rows of four circulant + where `a_{i,j} = -1` iff `j \in S_i`. These will be the fist rows of four circulant matrices `A_1, A_2, A_3, A_4` which, when plugged into the Goethals-Seidel array, create an Hadamard matrix of order `4n` (see [Djo1994b]_). From 2367bc9685579e0a554a1371f6b919e532ab6845 Mon Sep 17 00:00:00 2001 From: Jonathan Kliem Date: Mon, 13 Feb 2023 20:27:15 +0100 Subject: [PATCH 454/751] improvements suggested by reviewer --- src/sage/data_structures/list_of_pairs.pyx | 5 +++- .../combinatorial_polyhedron/base.pyx | 27 +++++++++---------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/sage/data_structures/list_of_pairs.pyx b/src/sage/data_structures/list_of_pairs.pyx index 03ad6268277..29e91492ced 100644 --- a/src/sage/data_structures/list_of_pairs.pyx +++ b/src/sage/data_structures/list_of_pairs.pyx @@ -41,6 +41,9 @@ cdef class ListOfPairs: self.length += 1 cdef inline pair_s* get(self, size_t index) except NULL: + """ + Return a pointer to a pair of the list corresponding to the ``index``. + """ if not (0 <= index < self.length): raise IndexError @@ -100,7 +103,7 @@ cdef class ListOfPairs: cdef size_t first, second (first, second) = value - if (index == self.length): + if index == self.length: self.add(first, second) return diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx index 62ee57c25ff..1d5334a97b3 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx @@ -1461,18 +1461,15 @@ cdef class CombinatorialPolyhedron(SageObject): cdef pair_s ridge if add_equations and names: - def get_ridge(size_t i): - ridge = self._ridges.get(i)[0] - return ((f(ridge.first),) + self.equations(), - (f(ridge.second),) + self.equations()) - + return tuple( + ((f(self._ridges.get(i)[0].first),) + self.equations(), + (f(self._ridges.get(i)[0].second),) + self.equations()) + for i in range (n_ridges)) else: - def get_ridge(size_t i): - ridge = self._ridges.get(i)[0] - return (f(ridge.first), f(ridge.second)) - - cdef size_t j - return tuple(get_ridge(j) for j in range(n_ridges)) + return tuple( + (f(self._ridges.get(i)[0].first), + f(self._ridges.get(i)[0].second)) + for i in range (n_ridges)) @cached_method def facet_adjacency_matrix(self, algorithm=None): @@ -2110,7 +2107,7 @@ cdef class CombinatorialPolyhedron(SageObject): # For each face in the iterator, check if its a simplex. face_iter.structure.lowest_dimension = 2 # every 1-face is a simplex d = face_iter.next_dimension() - while (d < dim): + while d < dim: sig_check() if face_iter.n_atom_rep() == d + 1: # The current face is a simplex. @@ -2221,7 +2218,7 @@ cdef class CombinatorialPolyhedron(SageObject): # For each coface in the iterator, check if its a simplex. coface_iter.structure.lowest_dimension = 2 # every coface of dimension 1 is a simplex d = coface_iter.next_dimension() - while (d < dim): + while d < dim: sig_check() if coface_iter.n_atom_rep() == d + 1: # The current coface is a simplex. @@ -3721,13 +3718,13 @@ cdef class CombinatorialPolyhedron(SageObject): dimension_one = 0 if dim > -1: - while (f_vector[dimension_one + 1] == 0): + while f_vector[dimension_one + 1] == 0: # Taking care of cases, where there might be no faces # of dimension 0, 1, etc (``n_lines > 0``). dimension_one += 1 dimension_two = -1 - while (dimension_one < dim + 1): + while dimension_one < dim + 1: already_seen = sum(f_vector[j] for j in range(dimension_two + 1)) already_seen_next = already_seen + f_vector[dimension_two + 1] From 98974d57db4e76bece9f13d87e5d3083e72a3cc7 Mon Sep 17 00:00:00 2001 From: Jonathan Kliem Date: Mon, 13 Feb 2023 20:40:21 +0100 Subject: [PATCH 455/751] use attribute access to derefence --- src/sage/data_structures/list_of_pairs.pyx | 10 ++--- .../combinatorial_polyhedron/base.pyx | 44 ++++++++----------- 2 files changed, 23 insertions(+), 31 deletions(-) diff --git a/src/sage/data_structures/list_of_pairs.pyx b/src/sage/data_structures/list_of_pairs.pyx index 29e91492ced..258320353a0 100644 --- a/src/sage/data_structures/list_of_pairs.pyx +++ b/src/sage/data_structures/list_of_pairs.pyx @@ -72,7 +72,7 @@ cdef class ListOfPairs: ... OverflowError: can't convert negative value to size_t """ - cdef pair_s pair = self.get(index)[0] + cdef pair_s* pair = self.get(index) return (smallInteger(pair.first), smallInteger(pair.second)) def __setitem__(self, size_t index, value): @@ -108,8 +108,8 @@ cdef class ListOfPairs: return cdef pair_s* pair_pt = self.get(index) - pair_pt[0].first = first - pair_pt[0].second = second + pair_pt.first = first + pair_pt.second = second cdef inline int add(self, size_t first, size_t second) except -1: """ @@ -117,5 +117,5 @@ cdef class ListOfPairs: """ self.enlarge() cdef pair_s* last = self.get(self.length - 1) - last[0].first = first - last[0].second = second + last.first = first + last.second = second diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx index 1d5334a97b3..f88585f1d4a 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/base.pyx @@ -102,9 +102,8 @@ from .conversions \ from .conversions cimport Vrep_list_to_bit_rep from sage.misc.cachefunc import cached_method -from sage.data_structures.list_of_pairs cimport pair_s -from sage.rings.integer cimport smallInteger -from cysignals.signals cimport sig_check +from sage.rings.integer cimport smallInteger +from cysignals.signals cimport sig_check from .face_data_structure cimport face_len_atoms, face_init, face_free from .face_iterator cimport iter_t, parallel_f_vector @@ -1232,15 +1231,10 @@ cdef class CombinatorialPolyhedron(SageObject): def f(size_t i): return smallInteger(i) - # Getting the indices of the `i`-th edge. - cdef pair_s edge - - def get_edge(size_t i): - edge = self._edges.get(i)[0] - return (f(edge.first), f(edge.second)) - cdef size_t j - return tuple(get_edge(j) for j in range(self._edges.length)) + return tuple((f(self._edges.get(j).first), + f(self._edges.get(j).second)) + for j in range(self._edges.length)) def vertex_graph(self, names=True, algorithm=None): r""" @@ -1328,14 +1322,14 @@ cdef class CombinatorialPolyhedron(SageObject): from sage.matrix.constructor import matrix cdef Matrix_dense adjacency_matrix = matrix( ZZ, self.n_Vrepresentation(), self.n_Vrepresentation(), 0) - cdef size_t i - cdef pair_s edge + cdef size_t i, first, second self._compute_edges(self._algorithm_to_dual(algorithm)) for i in range(self._edges.length): - edge = self._edges.get(i)[0] - adjacency_matrix.set_unsafe_int(edge.first, edge.second, 1) - adjacency_matrix.set_unsafe_int(edge.second, edge.first, 1) + first = self._edges.get(i).first + second = self._edges.get(i).second + adjacency_matrix.set_unsafe_int(first, second, 1) + adjacency_matrix.set_unsafe_int(second, first, 1) adjacency_matrix.set_immutable() return adjacency_matrix @@ -1458,17 +1452,15 @@ cdef class CombinatorialPolyhedron(SageObject): def f(size_t i): return smallInteger(i) - cdef pair_s ridge - if add_equations and names: return tuple( - ((f(self._ridges.get(i)[0].first),) + self.equations(), - (f(self._ridges.get(i)[0].second),) + self.equations()) + ((f(self._ridges.get(i).first),) + self.equations(), + (f(self._ridges.get(i).second),) + self.equations()) for i in range (n_ridges)) else: return tuple( - (f(self._ridges.get(i)[0].first), - f(self._ridges.get(i)[0].second)) + (f(self._ridges.get(i).first), + f(self._ridges.get(i).second)) for i in range (n_ridges)) @cached_method @@ -1514,13 +1506,13 @@ cdef class CombinatorialPolyhedron(SageObject): cdef Matrix_dense adjacency_matrix = matrix( ZZ, self.n_facets(), self.n_facets(), 0) cdef size_t i - cdef pair_s ridge self._compute_ridges(self._algorithm_to_dual(algorithm)) for i in range(self._ridges.length): - ridge = self._ridges.get(i)[0] - adjacency_matrix.set_unsafe_int(ridge.first, ridge.second, 1) - adjacency_matrix.set_unsafe_int(ridge.second, ridge.first, 1) + first = self._ridges.get(i).first + second = self._ridges.get(i).second + adjacency_matrix.set_unsafe_int(first, second, 1) + adjacency_matrix.set_unsafe_int(second, first, 1) adjacency_matrix.set_immutable() return adjacency_matrix From b6af6e7aa20b4d8119772af0fe88001ef3548cc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Mon, 13 Feb 2023 21:33:08 +0100 Subject: [PATCH 456/751] fixing most of pycodestyle E271 --- src/sage/algebras/fusion_rings/f_matrix.py | 4 +--- src/sage/categories/function_fields.py | 2 +- src/sage/coding/information_set_decoder.py | 10 ++++----- src/sage/combinat/matrices/hadamard_matrix.py | 4 ++-- src/sage/combinat/t_sequences.py | 2 +- src/sage/crypto/mq/sr.py | 4 ++-- src/sage/databases/knotinfo_db.py | 6 ++--- src/sage/games/quantumino.py | 4 ++-- src/sage/geometry/cone.py | 5 ++--- .../hyperbolic_space/hyperbolic_isometry.py | 2 +- src/sage/geometry/lattice_polytope.py | 4 ++-- src/sage/geometry/polyhedron/base5.py | 22 +++++++++++-------- src/sage/geometry/ribbon_graph.py | 12 +++++----- .../parametrized_surface3d.py | 14 +++++------- src/sage/graphs/generic_graph.py | 4 ++-- src/sage/groups/cubic_braid.py | 17 ++++++-------- src/sage/groups/perm_gps/cubegroup.py | 16 +++++++------- src/sage/interacts/library.py | 2 +- src/sage/interfaces/maxima_abstract.py | 18 +++++++-------- src/sage/interfaces/tides.py | 7 +----- src/sage/knots/knotinfo.py | 18 +++++++-------- src/sage/knots/link.py | 12 +++++----- .../differentiable/affine_connection.py | 6 ++--- .../manifolds/differentiable/vectorfield.py | 4 ++-- src/sage/modular/hecke/hecke_operator.py | 11 ++++------ src/sage/modular/overconvergent/all.py | 2 +- src/sage/modules/free_module.py | 2 +- .../numerical/interactive_simplex_method.py | 2 +- src/sage/quadratic_forms/genera/genus.py | 4 ++-- .../quadratic_form__ternary_Tornaria.py | 5 ++--- src/sage/sets/non_negative_integers.py | 2 +- src/sage/symbolic/units.py | 2 +- .../tensor/modules/tensor_with_indices.py | 7 +++--- 33 files changed, 110 insertions(+), 126 deletions(-) diff --git a/src/sage/algebras/fusion_rings/f_matrix.py b/src/sage/algebras/fusion_rings/f_matrix.py index 82b5d764fa6..734d9cffa24 100644 --- a/src/sage/algebras/fusion_rings/f_matrix.py +++ b/src/sage/algebras/fusion_rings/f_matrix.py @@ -10,12 +10,10 @@ # Distributed under the terms of the GNU General Public License (GPL) # https://www.gnu.org/licenses/ # **************************************************************************** - - from copy import deepcopy from ctypes import cast, py_object from itertools import product, zip_longest -from multiprocessing import Pool, cpu_count, set_start_method, shared_memory +from multiprocessing import Pool, cpu_count, set_start_method, shared_memory import numpy as np from os import getpid, remove import pickle diff --git a/src/sage/categories/function_fields.py b/src/sage/categories/function_fields.py index 6c30067e53f..4536973233d 100644 --- a/src/sage/categories/function_fields.py +++ b/src/sage/categories/function_fields.py @@ -65,7 +65,7 @@ def _call_(self, x): try: return x.function_field() except AttributeError: - raise TypeError("unable to canonically associate a function field to %s"%x) + raise TypeError("unable to canonically associate a function field to %s" % x) class ParentMethods: pass diff --git a/src/sage/coding/information_set_decoder.py b/src/sage/coding/information_set_decoder.py index a2cbf94fc5e..85ac6923849 100644 --- a/src/sage/coding/information_set_decoder.py +++ b/src/sage/coding/information_set_decoder.py @@ -475,16 +475,16 @@ def decode(self, r): # I was not an information set continue Gt = Gi_inv * G - #step 2. + # step 2. y = r - vector([r[i] for i in I]) * Gt g = Gt.rows() - #step 3. - for pi in range(p+1): + # step 3. + for pi in range(p + 1): for A in itertools.combinations(range(k), pi): for m in itertools.product(Fstar, repeat=pi): - e = y - sum(m[i]*g[A[i]] for i in range(pi)) + e = y - sum(m[i] * g[A[i]] for i in range(pi)) errs = e.hamming_weight() - if errs >= tau[0] and errs <= tau[1]: + if tau[0] <= errs <= tau[1]: return r - e def calibrate(self): diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 91f73d29101..3f97f532113 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -389,9 +389,9 @@ def williamson_hadamard_matrix_smallcases(n, existence=False, check=True): ... ValueError: The Williamson type Hadamard matrix of order 100 is not yet implemented. """ - assert n%4 == 0 + assert n % 4 == 0 - if not williamson_type_quadruples_smallcases(n//4, existence=True): + if not williamson_type_quadruples_smallcases(n // 4, existence=True): if existence: return False raise ValueError("The Williamson type Hadamard matrix of order %s is not yet implemented." % n) diff --git a/src/sage/combinat/t_sequences.py b/src/sage/combinat/t_sequences.py index 883d55c87bd..b86b8a1ef27 100644 --- a/src/sage/combinat/t_sequences.py +++ b/src/sage/combinat/t_sequences.py @@ -44,7 +44,7 @@ from sage.structure.sequence import Sequence -def _nonperiodic_autocorrelation(sequences, j): +def _nonperiodic_autocorrelation(sequences, j): r""" Compute the nonperiodic autocorrelation of a familiy of sequences. diff --git a/src/sage/crypto/mq/sr.py b/src/sage/crypto/mq/sr.py index 81ae146e204..0860c58ebaa 100644 --- a/src/sage/crypto/mq/sr.py +++ b/src/sage/crypto/mq/sr.py @@ -876,11 +876,11 @@ def sbox(self, inversion_only=False): if not inversion_only: with AllowZeroInversionsContext(self): S = [self.sub_byte(elem) for elem in sorted(k)] - return SBox(S) + return SBox(S) else: e = self.e S = [elem ** (2**e - 2) for elem in sorted(k)] - return SBox(S) + return SBox(S) def shift_rows(self, d): r""" diff --git a/src/sage/databases/knotinfo_db.py b/src/sage/databases/knotinfo_db.py index d70e6be6bac..29786ee56b2 100644 --- a/src/sage/databases/knotinfo_db.py +++ b/src/sage/databases/knotinfo_db.py @@ -596,10 +596,10 @@ def _create_data_sobj(self, sobj_path=None): for col in cols: val_list = [] - if col.column_type() != col.types.OnlyLinks: - for i in range(1 , len_knots): + if col.column_type() != col.types.OnlyLinks: + for i in range(1, len_knots): if col.name == self._names_column: - row_dict[self._knot_prefix + knot_list[i][col.name]] = [i - 1 , 1] + row_dict[self._knot_prefix + knot_list[i][col.name]] = [i - 1, 1] val_list.append(knot_list[i][col.name]) diff --git a/src/sage/games/quantumino.py b/src/sage/games/quantumino.py index dd52254bef7..98332762613 100644 --- a/src/sage/games/quantumino.py +++ b/src/sage/games/quantumino.py @@ -413,7 +413,7 @@ class QuantuminoSolver(SageObject): Quantumino solver for the box (5, 4, 4) Aside pentamino number: 12 """ - def __init__(self, aside, box=(5,8,2)): + def __init__(self, aside, box=(5, 8, 2)): r""" Constructor. @@ -424,7 +424,7 @@ def __init__(self, aside, box=(5,8,2)): Quantumino solver for the box (5, 8, 2) Aside pentamino number: 9 """ - if not 0 <= aside < 17: + if not(0 <= aside < 17): raise ValueError("aside (=%s) must be between 0 and 16" % aside) self._aside = aside self._box = box diff --git a/src/sage/geometry/cone.py b/src/sage/geometry/cone.py index 3d9cb0766fc..cf74a7ecac6 100644 --- a/src/sage/geometry/cone.py +++ b/src/sage/geometry/cone.py @@ -6639,7 +6639,7 @@ def random_cone(lattice=None, min_ambient_dim=0, max_ambient_dim=None, msg = 'all cones are solid when max_ambient_dim is zero.' raise ValueError(msg) if (max_ambient_dim is not None and - min_rays > 2*(max_ambient_dim - 1)): + min_rays > 2 * (max_ambient_dim - 1)): msg = 'every cone is solid when ' msg += 'min_rays > 2*(max_ambient_dim - 1).' raise ValueError(msg) @@ -6647,12 +6647,11 @@ def random_cone(lattice=None, min_ambient_dim=0, max_ambient_dim=None, if lattice.dimension() == 0: msg = 'all cones in the given lattice are solid.' raise ValueError(msg) - if min_rays > 2*(lattice.dimension() - 1): + if min_rays > 2 * (lattice.dimension() - 1): msg = 'every cone is solid when min_rays > 2*(d - 1) ' msg += 'where d is the dimension of the given lattice.' raise ValueError(msg) - # Now that we've sanity-checked our parameters, we can massage the # min/maxes for (non-)solid cones. It doesn't violate the user's # expectation to increase a minimum, decrease a maximum, or fix an diff --git a/src/sage/geometry/hyperbolic_space/hyperbolic_isometry.py b/src/sage/geometry/hyperbolic_space/hyperbolic_isometry.py index 9e3e8d3fc88..2de12812ddc 100644 --- a/src/sage/geometry/hyperbolic_space/hyperbolic_isometry.py +++ b/src/sage/geometry/hyperbolic_space/hyperbolic_isometry.py @@ -218,7 +218,7 @@ def __hash__(self): if self.domain().is_isometry_group_projective(): # Special care must be taken for projective groups m = matrix(self._matrix.nrows(), - [abs(x) for x in self._matrix.list()]) + [abs(x) for x in self._matrix.list()]) m.set_immutable() else: m = self._matrix diff --git a/src/sage/geometry/lattice_polytope.py b/src/sage/geometry/lattice_polytope.py index 0b30f206cbe..1b428f1c19e 100644 --- a/src/sage/geometry/lattice_polytope.py +++ b/src/sage/geometry/lattice_polytope.py @@ -3335,8 +3335,8 @@ def index_of_max(iterable): ccf = cf # Now let us find out where the end of the # next symmetry block is: - if h < c+1: - h = S[h-1] + if h < c + 1: + h = S[h - 1] s = n_p # Check through this block for each possible permutation while s > 0: diff --git a/src/sage/geometry/polyhedron/base5.py b/src/sage/geometry/polyhedron/base5.py index 04d1fa0314b..9cbddcc70ea 100644 --- a/src/sage/geometry/polyhedron/base5.py +++ b/src/sage/geometry/polyhedron/base5.py @@ -934,14 +934,14 @@ def product(self, other): new_vertices = (tuple(x) + tuple(y) for x in self.vertex_generator() for y in other.vertex_generator()) - self_zero = tuple(0 for _ in range( self.ambient_dim())) + self_zero = tuple(0 for _ in range( self.ambient_dim())) other_zero = tuple(0 for _ in range(other.ambient_dim())) - rays = chain((tuple(r) + other_zero for r in self.ray_generator()), - (self_zero + tuple(r) for r in other.ray_generator())) + rays = chain((tuple(r) + other_zero for r in self.ray_generator()), + (self_zero + tuple(r) for r in other.ray_generator())) - lines = chain((tuple(l) + other_zero for l in self.line_generator()), - (self_zero + tuple(l) for l in other.line_generator())) + lines = chain((tuple(l) + other_zero for l in self.line_generator()), + (self_zero + tuple(l) for l in other.line_generator())) if self.n_vertices() == 0 or other.n_vertices() == 0: # In this case we obtain the empty polyhedron. @@ -950,11 +950,15 @@ def product(self, other): rays = () lines = () - ieqs = chain((tuple(i) + other_zero for i in self.inequality_generator()), - ((i.b(),) + self_zero + tuple(i.A()) for i in other.inequality_generator())) + ieqs = chain((tuple(i) + other_zero + for i in self.inequality_generator()), + ((i.b(),) + self_zero + tuple(i.A()) + for i in other.inequality_generator())) - eqns = chain((tuple(e) + other_zero for e in self.equation_generator()), - ((e.b(),) + self_zero + tuple(e.A()) for e in other.equation_generator())) + eqns = chain((tuple(e) + other_zero + for e in self.equation_generator()), + ((e.b(),) + self_zero + tuple(e.A()) + for e in other.equation_generator())) pref_rep = 'Vrep' if self.n_vertices() + self.n_rays() + other.n_vertices() + other.n_rays() \ <= self.n_inequalities() + other.n_inequalities() else 'Hrep' diff --git a/src/sage/geometry/ribbon_graph.py b/src/sage/geometry/ribbon_graph.py index 6cc269c6b99..ed41f57f7dd 100644 --- a/src/sage/geometry/ribbon_graph.py +++ b/src/sage/geometry/ribbon_graph.py @@ -956,19 +956,19 @@ def homology_basis(self): [[25, 26]], [[27, 28]]] """ - aux_sigma = [list(x) for x in self._sigma.cycle_tuples(singletons=True)] + aux_sigma = [list(x) for x in self._sigma.cycle_tuples(singletons=True)] basis = [[list(x)] for x in self.reduced()._rho.cycle_tuples()] - #Now we define center as the set of edges that were contracted - #in reduced() this set is contractible and can be define as the - #complement of reduced_rho in rho + # Now we define center as the set of edges that were contracted + # in reduced() this set is contractible and can be define as the + # complement of reduced_rho in rho center = [list(x) for x in self._rho.cycle_tuples() if (x not in self.reduced()._rho.cycle_tuples())] - #We define an auxiliary list 'vertices' that will contain the - #vertices (cycles of sigma) corresponding to each half edge. + # We define an auxiliary list 'vertices' that will contain the + # vertices (cycles of sigma) corresponding to each half edge. vertices = [] diff --git a/src/sage/geometry/riemannian_manifolds/parametrized_surface3d.py b/src/sage/geometry/riemannian_manifolds/parametrized_surface3d.py index e1021f66a97..55d5609a861 100644 --- a/src/sage/geometry/riemannian_manifolds/parametrized_surface3d.py +++ b/src/sage/geometry/riemannian_manifolds/parametrized_surface3d.py @@ -905,28 +905,24 @@ def orthonormal_frame(self, coordinates='ext'): 0 sage: sphere.first_fundamental_form(frame_int[2], frame_int[2]) 1 - """ - - from sage.symbolic.constants import pi if coordinates not in ['ext', 'int']: raise ValueError("Coordinate system must be exterior ('ext') " "or interior ('int').") - c = self.first_fundamental_form_coefficient([1,1]) + c = self.first_fundamental_form_coefficient([1, 1]) if coordinates == 'ext': f1 = self.natural_frame()[1] - E1 = _simplify_full_rad(f1/sqrt(c)) + E1 = _simplify_full_rad(f1 / sqrt(c)) E2 = _simplify_full_rad( self.normal_vector(normalized=True).cross_product(E1)) else: - E1 = vector([_simplify_full_rad(1/sqrt(c)), 0]) - E2 = (self.rotation(pi/2)*E1).simplify_full() - return {1:E1, 2:E2} - + E1 = vector([_simplify_full_rad(1 / sqrt(c)), 0]) + E2 = (self.rotation(pi / 2) * E1).simplify_full() + return {1: E1, 2: E2} def orthonormal_frame_vector(self, index, coordinates='ext'): r""" diff --git a/src/sage/graphs/generic_graph.py b/src/sage/graphs/generic_graph.py index fa48183ecc4..633a97a5e75 100644 --- a/src/sage/graphs/generic_graph.py +++ b/src/sage/graphs/generic_graph.py @@ -20933,7 +20933,7 @@ def plot3d(self, bgcolor=(1, 1, 1), vertex_colors = {(1, 0, 0) : list(self)} if color_by_label: - if edge_colors is None: + if edge_colors is None: # do the coloring edge_colors = self._color_by_label(format=color_by_label) elif edge_colors is None: @@ -20975,7 +20975,7 @@ def plot3d(self, bgcolor=(1, 1, 1), vertex_size=vertex_size, pos3d=pos3d, **kwds) if color_by_label: - if edge_colors is None: + if edge_colors is None: # do the coloring edge_colors = self._color_by_label(format=color_by_label) diff --git a/src/sage/groups/cubic_braid.py b/src/sage/groups/cubic_braid.py index a9465ef2b3d..cd8b342ff6b 100644 --- a/src/sage/groups/cubic_braid.py +++ b/src/sage/groups/cubic_braid.py @@ -462,7 +462,7 @@ def burau_matrix(self, root_bur=None, domain=None, characteristic=None, if domain is not None: if isinstance(domain, UniversalCyclotomicField): - if root_bur is None: + if root_bur is None: if unitary: root_bur = domain.gen(12) else: @@ -503,7 +503,7 @@ def find_root(domain): except ValueError: raise ValueError('characteristic must be in integer') - if not characteristic.is_zero() and not characteristic.is_prime(): + if not characteristic.is_zero() and not characteristic.is_prime(): raise ValueError('characteristic must be a prime') if characteristic.is_zero(): if unitary: @@ -991,7 +991,6 @@ def _test_matrix_group(self, **options): self._internal_test_attached_group(matrix_grpF7, tester) return - def _test_reflection_group(self, **options): r""" Check the reflection group properties. @@ -1007,7 +1006,7 @@ def _test_reflection_group(self, **options): sage: CBG2 = CubicBraidGroup(2) sage: CBG2._test_reflection_group() """ - if self._cbg_type == CubicBraidGroup.type.Coxeter and self.is_finite() and self.strands() > 2: + if self._cbg_type == CubicBraidGroup.type.Coxeter and self.is_finite() and self.strands() > 2: from sage.combinat.root_system.reflection_group_real import is_chevie_available if is_chevie_available(): tester = self._tester(**options) @@ -1015,7 +1014,6 @@ def _test_reflection_group(self, **options): self._internal_test_attached_group(reflgrp, tester) return - # ------------------------------------------------------------------------------- # ------------------------------------------------------------------------------- # local utility-methods @@ -1258,9 +1256,9 @@ def create_unitary_realization(self, m): for j in range(mthird): pos = 3*(j+1)-1 transvections.append(xbas[pos-1]) # t_{3i} = x_{3i-1} - if pos +1 < m: + if pos +1 < m: transvections.append(xbas[pos-1]+xbas[pos]+xbas[pos+1]) # t_{3i+1} = x_{3i-1} + x_{3i} + x_{3i+1} - if pos +3 < m: + if pos +3 < m: transvections.append(xbas[pos+1]+xbas[pos+2]+xbas[pos+3]) # t_{3i+2} = x_{3i+1} + x_{3i+2} + x_{3i+3} # ----------------------------------------------------------- @@ -1797,8 +1795,8 @@ def as_reflection_group(self): from sage.combinat.root_system.reflection_group_real import ReflectionGroup - if self.strands() == 2: - reflection_group = ReflectionGroup([2 ,1 ,1]) + if self.strands() == 2: + reflection_group = ReflectionGroup([2, 1, 1]) elif self.strands() == 3: reflection_group = ReflectionGroup(4) elif self.strands() == 4: @@ -1810,7 +1808,6 @@ def as_reflection_group(self): reflection_group.register_conversion(hom_to_refl) return reflection_group - # ---------------------------------------------------------------------------------- # classical invariant form returns the invariant form of the classical realization # ---------------------------------------------------------------------------------- diff --git a/src/sage/groups/perm_gps/cubegroup.py b/src/sage/groups/perm_gps/cubegroup.py index 921c6201c43..3661c2afc10 100644 --- a/src/sage/groups/perm_gps/cubegroup.py +++ b/src/sage/groups/perm_gps/cubegroup.py @@ -431,21 +431,21 @@ def cubie_colors(label, state0): clr_any = named_colors['white'] state = inv_list(state0) if label == 1: - return [clr_any, named_colors[color_of_square(state[1-1])], clr_any] #ulb, + return [clr_any, named_colors[color_of_square(state[1-1])], clr_any] #ulb, if label == 2: - return [clr_any,named_colors[color_of_square(state[2-1])],clr_any] # ub, + return [clr_any,named_colors[color_of_square(state[2-1])],clr_any] # ub, if label == 3: - return [clr_any, named_colors[color_of_square(state[3-1])], named_colors[color_of_square(state[27-1])]] # ubr, + return [clr_any, named_colors[color_of_square(state[3-1])], named_colors[color_of_square(state[27-1])]] # ubr, if label == 4: - return [clr_any, named_colors[color_of_square(state[4-1])], clr_any] # ul, + return [clr_any, named_colors[color_of_square(state[4-1])], clr_any] # ul, if label == 5: - return [clr_any, named_colors[color_of_square(state[5-1])], named_colors[color_of_square(state[26-1])]] # ur, + return [clr_any, named_colors[color_of_square(state[5-1])], named_colors[color_of_square(state[26-1])]] # ur, if label == 6: - return [named_colors[color_of_square(state[17-1])], named_colors[color_of_square(state[6-1])], clr_any] # ufl, + return [named_colors[color_of_square(state[17-1])], named_colors[color_of_square(state[6-1])], clr_any] # ufl, if label == 7: - return [named_colors[color_of_square(state[18-1])], named_colors[color_of_square(state[7-1])], clr_any] # uf, + return [named_colors[color_of_square(state[18-1])], named_colors[color_of_square(state[7-1])], clr_any] # uf, if label == 8: - return [named_colors[color_of_square(state[19-1])], named_colors[color_of_square(state[8-1])], named_colors[color_of_square(state[25-1])]] # urf, + return [named_colors[color_of_square(state[19-1])], named_colors[color_of_square(state[8-1])], named_colors[color_of_square(state[25-1])]] # urf, if label == 17: return [named_colors[color_of_square(state[17-1])], named_colors[color_of_square(state[6-1])], clr_any] # flu if label == 18: diff --git a/src/sage/interacts/library.py b/src/sage/interacts/library.py index bb6dfbcf8f4..094db0c7be2 100644 --- a/src/sage/interacts/library.py +++ b/src/sage/interacts/library.py @@ -1032,7 +1032,7 @@ def _secant_method(f, a, b, maxn, h): L = sum(line([(c,k*i), (d,k*i)]) for i, (c,d) in enumerate(intervals) ) L += sum(line([(c,k*i-k/4), (c,k*i+k/4)]) for i, (c,d) in enumerate(intervals) ) L += sum(line([(d,k*i-k/4), (d,k*i+k/4)]) for i, (c,d) in enumerate(intervals) ) - S = sum(line([(c,f(c)), (d,f(d)), (d-(d-c)*f(d)/(f(d)-f(c)), 0)], color="green") for (c,d) in intervals) + S = sum(line([(c,f(c)), (d,f(d)), (d-(d-c)*f(d)/(f(d)-f(c)), 0)], color="green") for (c, d) in intervals) show(P + L + S, xmin=a, xmax=b) diff --git a/src/sage/interfaces/maxima_abstract.py b/src/sage/interfaces/maxima_abstract.py index cc1d88160bb..14062fa18a4 100644 --- a/src/sage/interfaces/maxima_abstract.py +++ b/src/sage/interfaces/maxima_abstract.py @@ -947,17 +947,17 @@ def solve_linear(self, eqns,vars): """ eqs = "[" for i in range(len(eqns)): - if i, , ] """ from sage.rings.integer import Integer - if not type(item) in (int, Integer): + if not type(item) in (int, Integer): raise ValueError('Item must be an integer') l = self.list() max_item = len(l) - if item < 0 or item > max_item: - raise ValueError('Item must be non negative and smaller than %s' %(max_item)) + if item < 0 or item > max_item: + raise ValueError('Item must be non negative and smaller than %s' % (max_item)) return l[item] @@ -2464,12 +2464,12 @@ def __call__(self, item): return self[item] from sage.rings.integer import Integer - if not type(item) in (int, Integer): + if not type(item) in (int, Integer): raise ValueError('Item must be an integer') - l =self.list() - max_item = len(l)+1 - if item < 1 or item > max_item: - raise ValueError('Item must be positive and smaller than %s' %(max_item)) + l = self.list() + max_item = len(l) + 1 + if item < 1 or item > max_item: + raise ValueError('Item must be positive and smaller than %s' % (max_item)) return l[item-1] diff --git a/src/sage/knots/link.py b/src/sage/knots/link.py index 12e159db251..00907779ec9 100644 --- a/src/sage/knots/link.py +++ b/src/sage/knots/link.py @@ -2914,14 +2914,14 @@ def homfly_polynomial(self, var1=None, var2=None, normalization='lm'): - http://mathworld.wolfram.com/HOMFLYPolynomial.html """ if not var1: - if normalization == 'az': + if normalization == 'az': var1 = 'a' elif normalization == 'vz': var1 = 'v' else: var1 = 'L' if not var2: - if normalization == 'lm': + if normalization == 'lm': var2 = 'M' else: var2 = 'z' @@ -4016,7 +4016,7 @@ def answer(L): if ach is None and achp is None: if unique: raise NotImplementedError('this link cannot be uniquely determined (unknown chirality)%s' %non_unique_hint) - elif L.is_amphicheiral() or L.is_amphicheiral(positive=True): + elif L.is_amphicheiral() or L.is_amphicheiral(positive=True): chiral = False if not chiral: @@ -4192,13 +4192,13 @@ def is_isotopic(self, other): try: ki, m = self.get_knotinfo() - verbose('KnotInfo self: %s mirrored %s' %(ki, m)) + verbose('KnotInfo self: %s mirrored %s' % (ki, m)) try: if ki.is_unique(): try: kio = other.get_knotinfo() - verbose('KnotInfo other: %s mirrored %s' %kio) - return (ki, m) == kio + verbose('KnotInfo other: %s mirrored %s' % kio) + return (ki, m) == kio except NotImplementedError: pass except AttributeError: diff --git a/src/sage/manifolds/differentiable/affine_connection.py b/src/sage/manifolds/differentiable/affine_connection.py index 008f13be22e..1380cc316ed 100644 --- a/src/sage/manifolds/differentiable/affine_connection.py +++ b/src/sage/manifolds/differentiable/affine_connection.py @@ -2210,7 +2210,7 @@ def connection_form(self, i, j, frame=None): comega[k] = coef_frame[[i1,j1,k]] forms[(i1,j1)] = omega self._connection_forms[frame] = forms - return self._connection_forms[frame][(i,j)] + return self._connection_forms[frame][(i,j)] def torsion_form(self, i, frame=None): r""" @@ -2312,7 +2312,7 @@ def torsion_form(self, i, frame=None): ctheta[k,l] = torsion_comp[[i1,k,l]] forms[i1] = theta self._torsion_forms[frame] = forms - return self._torsion_forms[frame][i] + return self._torsion_forms[frame][i] def curvature_form(self, i, j, frame=None): r""" @@ -2422,7 +2422,7 @@ def curvature_form(self, i, j, frame=None): comega[k,l] = riemann_comp[[i1,j1,k,l]] forms[(i1,j1)] = omega self._curvature_forms[frame] = forms - return self._curvature_forms[frame][(i,j)] + return self._curvature_forms[frame][(i, j)] def set_calc_order(self, symbol, order, truncate=False): r""" diff --git a/src/sage/manifolds/differentiable/vectorfield.py b/src/sage/manifolds/differentiable/vectorfield.py index acf07f25aca..ecd41a9882f 100644 --- a/src/sage/manifolds/differentiable/vectorfield.py +++ b/src/sage/manifolds/differentiable/vectorfield.py @@ -799,8 +799,8 @@ def plot(self, chart=None, ambient_coords=None, mapping=None, list_xx = [] while ind != ind_max: - for i in range(ncp): - xx[ind_coord[i]] = xmin[i] + ind[i]*step_tab[i] + for i in range(ncp): + xx[ind_coord[i]] = xmin[i] + ind[i] * step_tab[i] if chart_domain.valid_coordinates(*xx, tolerance=1e-13, parameters=parameters): diff --git a/src/sage/modular/hecke/hecke_operator.py b/src/sage/modular/hecke/hecke_operator.py index 0974629977d..df65f1b526d 100644 --- a/src/sage/modular/hecke/hecke_operator.py +++ b/src/sage/modular/hecke/hecke_operator.py @@ -1,8 +1,7 @@ """ Hecke operators """ - -#***************************************************************************** +# **************************************************************************** # Copyright (C) 2004 William Stein # # Distributed under the terms of the GNU General Public License (GPL) @@ -14,15 +13,13 @@ # # The full text of the GPL is available at: # -# http://www.gnu.org/licenses/ -#***************************************************************************** - - +# https://www.gnu.org/licenses/ +# **************************************************************************** from sage.structure.element import AlgebraElement from sage.structure.richcmp import richcmp, rich_to_bool from sage.categories.homset import End import sage.arith.all as arith -from sage.rings.integer import Integer +from sage.rings.integer import Integer from . import algebra from . import morphism diff --git a/src/sage/modular/overconvergent/all.py b/src/sage/modular/overconvergent/all.py index a6a3b8d158b..11e23071854 100644 --- a/src/sage/modular/overconvergent/all.py +++ b/src/sage/modular/overconvergent/all.py @@ -1,4 +1,4 @@ -from .weightspace import WeightSpace_constructor as pAdicWeightSpace +from .weightspace import WeightSpace_constructor as pAdicWeightSpace from .genus0 import OverconvergentModularForms diff --git a/src/sage/modules/free_module.py b/src/sage/modules/free_module.py index cd0cfdde32d..9deea7e1458 100644 --- a/src/sage/modules/free_module.py +++ b/src/sage/modules/free_module.py @@ -5653,7 +5653,7 @@ def basis(self): """ try: return self.__basis - except AttributeError: + except AttributeError: ZERO = self(0) one = self.coordinate_ring().one() w = [] diff --git a/src/sage/numerical/interactive_simplex_method.py b/src/sage/numerical/interactive_simplex_method.py index 0210d9aea87..3b7e29e9f6f 100644 --- a/src/sage/numerical/interactive_simplex_method.py +++ b/src/sage/numerical/interactive_simplex_method.py @@ -785,7 +785,7 @@ def _latex_(self): latex(xj), r"\geq" if vt == ">=" else r"\leq") for xj, vt in zip(x, self._variable_types) if vt)) lines.append(r"\end{array}") - return "\n".join(lines) + return "\n".join(lines) def _repr_(self): r""" diff --git a/src/sage/quadratic_forms/genera/genus.py b/src/sage/quadratic_forms/genera/genus.py index 0fc43f33c62..c400f73da49 100644 --- a/src/sage/quadratic_forms/genera/genus.py +++ b/src/sage/quadratic_forms/genera/genus.py @@ -676,10 +676,10 @@ def canonical_2_adic_trains(genus_symbol_quintuple_list, compartments=None): trains = [] new_train = [0] - for i in range(1,len(symbol)-1): + for i in range(1, len(symbol) - 1): # start a new train if there are two adjacent even symbols prev, cur = symbol[i-1:i+1] - if cur[0] - prev[0] > 2: + if cur[0] - prev[0] > 2: trains.append(new_train) new_train = [i] # create a new train starting at elif (cur[0] - prev[0] == 2) and cur[3]*prev[3] == 0: diff --git a/src/sage/quadratic_forms/quadratic_form__ternary_Tornaria.py b/src/sage/quadratic_forms/quadratic_form__ternary_Tornaria.py index 22334a8e857..ae836c20ce3 100644 --- a/src/sage/quadratic_forms/quadratic_form__ternary_Tornaria.py +++ b/src/sage/quadratic_forms/quadratic_form__ternary_Tornaria.py @@ -331,7 +331,7 @@ def clifford_invariant(self, p): 1 """ n = self.dim() % 8 - if n == 1 or n == 2: + if n == 1 or n == 2: s = 1 elif n == 3 or n == 4: s = hilbert_symbol(-1, -self.disc(), p) @@ -586,12 +586,11 @@ def is_zero(self, v, p=0) -> bool: True sage: Q1.is_zero([1,1,0], 2) False - """ norm = self(v) if p != 0: norm = norm % p - return norm == 0 + return norm == 0 def is_zero_nonsingular(self, v, p=0) -> bool: diff --git a/src/sage/sets/non_negative_integers.py b/src/sage/sets/non_negative_integers.py index 9b5def119e0..29edc3a11a1 100644 --- a/src/sage/sets/non_negative_integers.py +++ b/src/sage/sets/non_negative_integers.py @@ -115,7 +115,7 @@ def __contains__(self, elt): """ try: i = Integer(elt) - return i >= Integer(0) and i == elt + return i >= Integer(0) and i == elt except (TypeError, ValueError): return False diff --git a/src/sage/symbolic/units.py b/src/sage/symbolic/units.py index 9b5407786e1..8445499cb01 100644 --- a/src/sage/symbolic/units.py +++ b/src/sage/symbolic/units.py @@ -1458,7 +1458,7 @@ def convert_temperature(expr, target): target_temp = target.variables()[0] a = sage_eval(unitdict['temperature'][str(expr_temp)], locals={'x': coeff}) - if target is None or target_temp == units.temperature.kelvin: + if target is None or target_temp == units.temperature.kelvin: return a[0]*units.temperature.kelvin elif target_temp == units.temperature.celsius or target_temp == units.temperature.centigrade: return a[1]*target_temp diff --git a/src/sage/tensor/modules/tensor_with_indices.py b/src/sage/tensor/modules/tensor_with_indices.py index fd5eaf6824b..1e658682d41 100644 --- a/src/sage/tensor/modules/tensor_with_indices.py +++ b/src/sage/tensor/modules/tensor_with_indices.py @@ -628,7 +628,6 @@ def __mul__(self, other): True sage: s[:] [3, -6, 9] - """ if not isinstance(other, TensorWithIndices): raise TypeError("the second item of * must be a tensor with " + @@ -636,12 +635,12 @@ def __mul__(self, other): contraction_pairs = [] for ind in self._con: if ind != '.': - if ind in other._cov: + if ind in other._cov: pos1 = self._con.index(ind) pos2 = other._tensor._tensor_type[0] + other._cov.index(ind) contraction_pairs.append((pos1, pos2)) if ind in other._con: - raise IndexError("the index {} appears twice ".format(ind) + raise IndexError(f"the index {ind} appears twice " + "in a contravariant position") for ind in self._cov: if ind != '.': @@ -650,7 +649,7 @@ def __mul__(self, other): pos2 = other._con.index(ind) contraction_pairs.append((pos1, pos2)) if ind in other._cov: - raise IndexError("the index {} appears twice ".format(ind) + raise IndexError(f"the index {ind} appears twice " + "in a covariant position") if not contraction_pairs: # No contraction is performed: the tensor product is returned From 9e0baabe7550945b81b5d63c50feb2e1a64fa6ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6ppe?= Date: Mon, 13 Feb 2023 18:56:16 -0800 Subject: [PATCH 457/751] Update src/sage/stats/distributions/discrete_gaussian_polynomial.py Co-authored-by: Tobias Diez --- src/sage/stats/distributions/discrete_gaussian_polynomial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/stats/distributions/discrete_gaussian_polynomial.py b/src/sage/stats/distributions/discrete_gaussian_polynomial.py index fb4c4453ca3..0f4e7e59361 100644 --- a/src/sage/stats/distributions/discrete_gaussian_polynomial.py +++ b/src/sage/stats/distributions/discrete_gaussian_polynomial.py @@ -55,7 +55,7 @@ #*****************************************************************************/ from sage.rings.real_mpfr import RR -from sage.rings.integer_ring import Z as ZZ +from sage.rings.integer_ring import ZZ from .discrete_gaussian_integer import DiscreteGaussianDistributionIntegerSampler from sage.structure.sage_object import SageObject From 69d9a4904e8a3f05c1f93173c6881ef00c32e037 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 13 Feb 2023 19:08:08 -0800 Subject: [PATCH 458/751] git grep -l -E ' (Q as QQ|Z as ZZ)' | xargs sed -i.bak 's/ Q as QQ/ QQ/;s/ Z as ZZ/ ZZ/;' --- src/sage/libs/gap/element.pyx | 4 ++-- src/sage/libs/giac/giac.pyx | 4 ++-- src/sage/numerical/backends/generic_backend.pyx | 2 +- src/sage/numerical/interactive_simplex_method.py | 4 ++-- src/sage/stats/distributions/discrete_gaussian_lattice.py | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/sage/libs/gap/element.pyx b/src/sage/libs/gap/element.pyx index 7ce70bda06a..5df52f23be4 100644 --- a/src/sage/libs/gap/element.pyx +++ b/src/sage/libs/gap/element.pyx @@ -27,8 +27,8 @@ from sage.cpython.string cimport str_to_bytes, char_to_str from sage.misc.cachefunc import cached_method from sage.structure.sage_object cimport SageObject from sage.structure.parent import Parent -from sage.rings.integer_ring import Z as ZZ -from sage.rings.rational_field import Q as QQ +from sage.rings.integer_ring import ZZ +from sage.rings.rational_field import QQ from sage.rings.real_double import RDF from sage.groups.perm_gps.permgroup_element cimport PermutationGroupElement diff --git a/src/sage/libs/giac/giac.pyx b/src/sage/libs/giac/giac.pyx index 1294164de2e..b555466e36d 100644 --- a/src/sage/libs/giac/giac.pyx +++ b/src/sage/libs/giac/giac.pyx @@ -154,8 +154,8 @@ from sage.ext.stdsage cimport PY_NEW from sage.libs.gmp.mpz cimport mpz_t, mpz_init_set -from sage.rings.integer_ring import Z as ZZ -from sage.rings.rational_field import Q as QQ +from sage.rings.integer_ring import ZZ +from sage.rings.rational_field import QQ from sage.rings.finite_rings.integer_mod_ring import IntegerModRing from sage.rings.integer cimport Integer from sage.rings.rational cimport Rational diff --git a/src/sage/numerical/backends/generic_backend.pyx b/src/sage/numerical/backends/generic_backend.pyx index 1057fb3b519..886dc255278 100644 --- a/src/sage/numerical/backends/generic_backend.pyx +++ b/src/sage/numerical/backends/generic_backend.pyx @@ -1759,7 +1759,7 @@ cpdef GenericBackend get_solver(constraint_generation = False, solver = None, ba if base_ring is not None: base_ring = base_ring.fraction_field() - from sage.rings.rational_field import Q as QQ + from sage.rings.rational_field import QQ from sage.rings.real_double import RDF if base_ring is QQ: solver = "Ppl" diff --git a/src/sage/numerical/interactive_simplex_method.py b/src/sage/numerical/interactive_simplex_method.py index 209fd1fc724..2de42d4c2e5 100644 --- a/src/sage/numerical/interactive_simplex_method.py +++ b/src/sage/numerical/interactive_simplex_method.py @@ -197,9 +197,9 @@ lazy_import("sage.plot.all", ["Graphics", "arrow", "line", "point", "rainbow", "text"]) from sage.rings.infinity import Infinity from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing -from sage.rings.rational_field import Q as QQ +from sage.rings.rational_field import QQ from sage.rings.real_double import RDF -from sage.rings.integer_ring import Z as ZZ +from sage.rings.integer_ring import ZZ from sage.structure.all import SageObject from sage.symbolic.ring import SR diff --git a/src/sage/stats/distributions/discrete_gaussian_lattice.py b/src/sage/stats/distributions/discrete_gaussian_lattice.py index 5a05a0cb2c8..766cb2d4a41 100644 --- a/src/sage/stats/distributions/discrete_gaussian_lattice.py +++ b/src/sage/stats/distributions/discrete_gaussian_lattice.py @@ -60,8 +60,8 @@ from sage.functions.other import ceil from sage.rings.real_mpfr import RealField from sage.rings.real_mpfr import RR -from sage.rings.integer_ring import Z as ZZ -from sage.rings.rational_field import Q as QQ +from sage.rings.integer_ring import ZZ +from sage.rings.rational_field import QQ from .discrete_gaussian_integer import DiscreteGaussianDistributionIntegerSampler from sage.structure.sage_object import SageObject from sage.matrix.constructor import matrix, identity_matrix From 91e638c940d810b2363341bb098b716c243bc836 Mon Sep 17 00:00:00 2001 From: Aram Dermenjian Date: Tue, 14 Feb 2023 11:27:44 +0000 Subject: [PATCH 459/751] Fix French notation for Tableau --- src/sage/combinat/tableau.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/sage/combinat/tableau.py b/src/sage/combinat/tableau.py index 1105a3ea177..70b9d148b04 100644 --- a/src/sage/combinat/tableau.py +++ b/src/sage/combinat/tableau.py @@ -889,25 +889,31 @@ def plot(self, descents=False): if descents and not self.is_standard(): raise ValueError("the tableau must be standard for 'descents=True'") + # For English we build up to down for French, down to up + if self.parent().options('convention') == "English": + m = 1 + else: + m = -1 + p = self.shape() G = line([(0,0),(p[0],0)], axes=False, figsize=1.5) for i in range(len(p)): - G += line([(0,-i-1), (p[i],-i-1)]) + G += line([(0,m*(-i-1)), (p[i],m*(-i-1))]) r = p.conjugate() - G += line([(0,0),(0,-r[0])]) + G += line([(0,0),(0,m*-r[0])]) for i in range(len(r)): - G += line([(i+1,0),(i+1,-r[i])]) + G += line([(i+1,0),(i+1,m*-r[i])]) if descents: t = StandardTableau(self) for i in t.standard_descents(): c = t.cells_containing(i)[0] - G += polygon([(c[1],-c[0]), (c[1]+1,-c[0]), (c[1]+1,-c[0]-1), (c[1],-c[0]-1)], rgbcolor=(1,0,1)) + G += polygon([(c[1],m*c[0]), (c[1]+1,m*c[0]), (c[1]+1,m*(-c[0]-1)), (c[1],m*(-c[0]-1))], rgbcolor=(1,0,1)) for c in self.cells(): - G += text(str(self.entry(c)), (c[1]+0.5,-c[0]-0.5)) + G += text(str(self.entry(c)), (c[1]+0.5,m*(-c[0]-0.5))) return G From 2bdb515a60867b9ae8282a7c11ce4ea368f49c4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Mon, 13 Feb 2023 23:22:21 -0300 Subject: [PATCH 460/751] Fix a very slow doctest in data_structures/stream.py This single test used to take ~ 200s, now it takes ~ 0.5s. Marked long time since the other 769 tests together take < 1s. --- src/sage/data_structures/stream.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/data_structures/stream.py b/src/sage/data_structures/stream.py index f8f6dc6a186..002e925f02f 100644 --- a/src/sage/data_structures/stream.py +++ b/src/sage/data_structures/stream.py @@ -2090,8 +2090,8 @@ def compute_product(self, n, la): sage: f = Stream_exact([1]) # irrelevant for this test sage: g = Stream_function(lambda n: s[n], True, 0) sage: h = Stream_plethysm(f, g, True, p) - sage: B = p[2, 2, 1](sum(s[i] for i in range(7))) - sage: all(h.compute_product(k, Partition([2, 2, 1])) == B.restrict_degree(k) for k in range(7)) + sage: B = p[2, 2, 1](sum(p(s[i]) for i in range(7))) # long time + sage: all(h.compute_product(k, Partition([2, 2, 1])) == B.restrict_degree(k) for k in range(7)) # long time True """ # This is the approximate order of the result From 40db71da2dd06f7793d78e0d68ca171ec752a574 Mon Sep 17 00:00:00 2001 From: Sandstorm831 Date: Tue, 14 Feb 2023 18:54:25 +0530 Subject: [PATCH 461/751] adding reference --- src/doc/en/reference/references/index.rst | 4 ++++ src/sage/combinat/posets/linear_extensions.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/doc/en/reference/references/index.rst b/src/doc/en/reference/references/index.rst index 5a7eb0a163c..8b9cbe67583 100644 --- a/src/doc/en/reference/references/index.rst +++ b/src/doc/en/reference/references/index.rst @@ -3821,6 +3821,10 @@ REFERENCES: *Bethe ansatz and inverse scattering transform in a periodic box-ball system*, Nuclear Phys. B **747**, no. 3 (2006), 354--397. +.. [KTZ1987] Kierstead, H.A., Trotter, W.T. & Zhou, B. Representing an ordered + set as the intersection of super greedy linear extensions. Order 4, + 293-311 (1987). + :doi:`10.1007/BF00337892` .. [Kuh1987] \W. Kühnel, "Minimal triangulations of Kummer varieties", Abh. Math. Sem. Univ. Hamburg 57 (1987), 7-20. diff --git a/src/sage/combinat/posets/linear_extensions.py b/src/sage/combinat/posets/linear_extensions.py index 502ccb4cf23..23d2688bd72 100644 --- a/src/sage/combinat/posets/linear_extensions.py +++ b/src/sage/combinat/posets/linear_extensions.py @@ -268,7 +268,7 @@ def is_supergreedy(self): Informally, a linear extension is supergreedy if it "always goes up and receedes the least"; in other words, supergreedy linear extensions are depth-first linear extensions. - `Reference `_ + For more details see [KTZ1987]_. EXAMPLES:: From 04dcc93a84c2eaea08ad4738a53bc07f65343a78 Mon Sep 17 00:00:00 2001 From: Aram Dermenjian Date: Tue, 14 Feb 2023 14:26:34 +0000 Subject: [PATCH 462/751] Add plots for examples --- src/sage/combinat/tableau.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/sage/combinat/tableau.py b/src/sage/combinat/tableau.py index 70b9d148b04..c08358032c1 100644 --- a/src/sage/combinat/tableau.py +++ b/src/sage/combinat/tableau.py @@ -860,6 +860,27 @@ def plot(self, descents=False): r""" Return a plot ``self``. + If English notation is set then the first row of the tableau is on the + top: + + .. PLOT:: + :width: 200 px + + t = Tableau([[1,2],[2,3]]) + Tableaux.options.convention="english" + sphinx_plot(t.plot()) + + Whereas if French notation is set, the first row of the tableau is on + the bottom: + + .. PLOT:: + :width: 200 px + + t = Tableau([[1,2],[2,3]]) + Tableaux.options.convention="french" + sphinx_plot(t.plot()) + Tableaux.options.convention="english" + INPUT: - ``descents`` -- boolean (default: ``False``); if ``True``, From ed1ee83286bd370448b27f6386c63db374920807 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 14 Feb 2023 11:23:30 -0800 Subject: [PATCH 463/751] src/sage/combinat/necklace.py: Add missing import --- src/sage/combinat/necklace.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sage/combinat/necklace.py b/src/sage/combinat/necklace.py index e6c4e6b03ec..97bd24f8250 100644 --- a/src/sage/combinat/necklace.py +++ b/src/sage/combinat/necklace.py @@ -26,8 +26,9 @@ from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets from sage.combinat.composition import Composition from sage.combinat.misc import DoublyLinkedList -from sage.rings.integer import Integer from sage.misc.misc_c import prod +from sage.rings.integer import Integer +from sage.rings.integer_ring import ZZ from sage.structure.parent import Parent from sage.structure.unique_representation import UniqueRepresentation From 10d2e1cca9684b5306dcc4473f6cb9f3913800f1 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 14 Feb 2023 11:29:47 -0800 Subject: [PATCH 464/751] git grep -l 'GCD as gcd' src/sage/{algebras,combinat,matroids} | xargs sed -i.bak 's/GCD as gcd/gcd/' --- src/sage/algebras/quatalg/quaternion_algebra.py | 2 +- src/sage/combinat/ncsf_qsym/qsym.py | 2 +- src/sage/combinat/necklace.py | 2 +- src/sage/combinat/partition.py | 2 +- src/sage/combinat/sf/jack.py | 2 +- src/sage/combinat/sf/sfa.py | 2 +- src/sage/combinat/tamari_lattices.py | 2 +- src/sage/combinat/words/lyndon_word.py | 2 +- src/sage/combinat/words/word_generators.py | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py index 768779a561c..185fd3f4baf 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra.py +++ b/src/sage/algebras/quatalg/quaternion_algebra.py @@ -38,7 +38,7 @@ from sage.arith.misc import (hilbert_conductor_inverse, hilbert_conductor, factor, - GCD as gcd, + gcd, kronecker as kronecker_symbol, valuation) from sage.rings.real_mpfr import RR diff --git a/src/sage/combinat/ncsf_qsym/qsym.py b/src/sage/combinat/ncsf_qsym/qsym.py index 04a27e7e0ca..8bdef2fa7dd 100644 --- a/src/sage/combinat/ncsf_qsym/qsym.py +++ b/src/sage/combinat/ncsf_qsym/qsym.py @@ -3688,7 +3688,7 @@ def _precompute_M(self, n): M = self.realization_of().M() if l <= n: from sage.misc.cachefunc import cached_function - from sage.arith.misc import GCD as gcd + from sage.arith.misc import gcd @cached_function def monolambda(I): diff --git a/src/sage/combinat/necklace.py b/src/sage/combinat/necklace.py index 97bd24f8250..bcfb0d45185 100644 --- a/src/sage/combinat/necklace.py +++ b/src/sage/combinat/necklace.py @@ -22,7 +22,7 @@ # https://www.gnu.org/licenses/ # **************************************************************************** -from sage.arith.misc import divisors, euler_phi, factorial, GCD as gcd +from sage.arith.misc import divisors, euler_phi, factorial, gcd from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets from sage.combinat.composition import Composition from sage.combinat.misc import DoublyLinkedList diff --git a/src/sage/combinat/partition.py b/src/sage/combinat/partition.py index c4d45ae16c0..5dcea144623 100644 --- a/src/sage/combinat/partition.py +++ b/src/sage/combinat/partition.py @@ -283,7 +283,7 @@ from copy import copy from itertools import accumulate -from sage.arith.misc import binomial, factorial, GCD as gcd, multinomial +from sage.arith.misc import binomial, factorial, gcd, multinomial from sage.libs.pari.all import pari from sage.libs.flint.arith import number_of_partitions as flint_number_of_partitions from sage.structure.global_options import GlobalOptions diff --git a/src/sage/combinat/sf/jack.py b/src/sage/combinat/sf/jack.py index 2884786f4d6..7c067bcdf03 100644 --- a/src/sage/combinat/sf/jack.py +++ b/src/sage/combinat/sf/jack.py @@ -33,7 +33,7 @@ import sage.categories.all from sage.rings.integer import Integer from sage.rings.rational_field import QQ -from sage.arith.misc import GCD as gcd +from sage.arith.misc import gcd from sage.arith.functions import lcm from sage.rings.fraction_field import is_FractionField from sage.misc.misc_c import prod diff --git a/src/sage/combinat/sf/sfa.py b/src/sage/combinat/sf/sfa.py index 8f6c7807a2e..6a2fc0412d8 100644 --- a/src/sage/combinat/sf/sfa.py +++ b/src/sage/combinat/sf/sfa.py @@ -4711,7 +4711,7 @@ def arithmetic_product(self, x): parent = self.parent() if parent.has_coerce_map_from(QQ): from sage.combinat.partition import Partition - from sage.arith.misc import GCD as gcd + from sage.arith.misc import gcd from sage.arith.functions import lcm from itertools import product, repeat, chain p = parent.realization_of().power() diff --git a/src/sage/combinat/tamari_lattices.py b/src/sage/combinat/tamari_lattices.py index ba4de2ad8fb..6ef7dd06cdc 100644 --- a/src/sage/combinat/tamari_lattices.py +++ b/src/sage/combinat/tamari_lattices.py @@ -48,7 +48,7 @@ # **************************************************************************** from __future__ import annotations from sage.combinat.posets.lattices import LatticePoset, MeetSemilattice -from sage.arith.misc import GCD as gcd +from sage.arith.misc import gcd def paths_in_triangle(i, j, a, b) -> list[tuple[int, ...]]: diff --git a/src/sage/combinat/words/lyndon_word.py b/src/sage/combinat/words/lyndon_word.py index 1d5614cd277..2a28f615a2c 100644 --- a/src/sage/combinat/words/lyndon_word.py +++ b/src/sage/combinat/words/lyndon_word.py @@ -12,7 +12,7 @@ # https://www.gnu.org/licenses/ # **************************************************************************** -from sage.arith.misc import divisors, GCD as gcd, moebius, multinomial +from sage.arith.misc import divisors, gcd, moebius, multinomial from sage.combinat.combinat_cython import lyndon_word_iterator from sage.combinat.composition import Composition, Compositions from sage.combinat.necklace import _sfc diff --git a/src/sage/combinat/words/word_generators.py b/src/sage/combinat/words/word_generators.py index b08766fda79..66c5f25eda7 100644 --- a/src/sage/combinat/words/word_generators.py +++ b/src/sage/combinat/words/word_generators.py @@ -66,7 +66,7 @@ from sage.combinat.words.finite_word import FiniteWord_class, Factorization from sage.combinat.words.words import FiniteWords, InfiniteWords from sage.combinat.words.morphism import WordMorphism -from sage.arith.misc import GCD as gcd +from sage.arith.misc import gcd from sage.misc.decorators import rename_keyword From 85b1af37586ff04a07ffbd745679345cfbb9990b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Tue, 14 Feb 2023 21:21:36 +0100 Subject: [PATCH 465/751] fix pep8 E303 in various folders (plot, quadratic forms, etc) --- src/sage/plot/animate.py | 1 - src/sage/plot/matrix_plot.py | 2 -- src/sage/plot/plot.py | 2 -- src/sage/plot/plot3d/tri_plot.py | 6 ------ src/sage/plot/primitive.py | 2 -- src/sage/quadratic_forms/constructions.py | 1 - src/sage/quadratic_forms/genera/genus.py | 17 ----------------- src/sage/quadratic_forms/quadratic_form.py | 16 ---------------- .../quadratic_form__count_local_2.py | 5 ----- .../quadratic_form__equivalence_testing.py | 3 --- .../quadratic_form__local_density_interfaces.py | 2 -- .../quadratic_form__local_field_invariants.py | 1 - .../quadratic_form__local_normal_form.py | 4 ---- .../quadratic_forms/quadratic_form__mass.py | 1 - ...uadratic_form__mass__Conway_Sloane_masses.py | 7 ------- .../quadratic_form__mass__Siegel_densities.py | 1 - .../quadratic_form__siegel_product.py | 10 ---------- .../quadratic_form__split_local_covering.py | 2 -- .../quadratic_forms/quadratic_form__theta.py | 3 --- src/sage/repl/rich_output/output_graphics3d.py | 10 +++------- src/sage/sandpiles/examples.py | 3 +-- src/sage/sets/disjoint_union_enumerated_sets.py | 2 -- src/sage/sets/set_from_iterator.py | 1 - src/sage/structure/factorization.py | 2 -- src/sage/structure/set_factories.py | 2 -- src/sage/symbolic/constants.py | 5 ----- src/sage/symbolic/units.py | 1 - 27 files changed, 4 insertions(+), 108 deletions(-) diff --git a/src/sage/plot/animate.py b/src/sage/plot/animate.py index c835ab823a4..1fc61ad0dd7 100644 --- a/src/sage/plot/animate.py +++ b/src/sage/plot/animate.py @@ -850,7 +850,6 @@ def show(self, delay=None, iterations=None, **kwds): dm = get_display_manager() dm.display_immediately(self, **kwds) - def ffmpeg(self, savefile=None, show_path=False, output_format=None, ffmpeg_options='', delay=None, iterations=0, pix_fmt='rgb24'): r""" diff --git a/src/sage/plot/matrix_plot.py b/src/sage/plot/matrix_plot.py index f62d362ea11..65aeac627f4 100644 --- a/src/sage/plot/matrix_plot.py +++ b/src/sage/plot/matrix_plot.py @@ -243,7 +243,6 @@ def _render_on_subplot(self, subplot): subplot.xaxis.set_ticks_position('both') #only tick marks, not tick labels - @suboptions('colorbar', orientation='vertical', format=None) @suboptions('subdivision',boundaries=None, style=None) @options(aspect_ratio=1, axes=False, cmap='Greys', colorbar=False, @@ -585,7 +584,6 @@ def matrix_plot(mat, xrange=None, yrange=None, **options): else: sparse = False - try: if sparse: xy_data_array = mat diff --git a/src/sage/plot/plot.py b/src/sage/plot/plot.py index 48f84060c8c..b00ddae2f03 100644 --- a/src/sage/plot/plot.py +++ b/src/sage/plot/plot.py @@ -2513,8 +2513,6 @@ def golden_rainbow(i,lightness=0.4): return G - - ########## misc functions ################### @options(aspect_ratio=1.0) diff --git a/src/sage/plot/plot3d/tri_plot.py b/src/sage/plot/plot3d/tri_plot.py index dfe525409bb..2b6f735a72b 100644 --- a/src/sage/plot/plot3d/tri_plot.py +++ b/src/sage/plot/plot3d/tri_plot.py @@ -217,7 +217,6 @@ def get_colors(self, list): return list - class TrianglePlot: """ Recursively plots a function of two variables by building squares of 4 triangles, checking at @@ -302,7 +301,6 @@ def fcn(x,y): avg_z = (vertices[0][2] + vertices[1][2] + vertices[2][2])/3 o.set_color(colors[int(num_colors * (avg_z - self._min) / zrange)]) - def plot_block(self, min_x, mid_x, max_x, min_y, mid_y, max_y, sw_z, nw_z, se_z, ne_z, mid_z, depth): """ Recursive triangulation function for plotting. @@ -400,7 +398,6 @@ def plot_block(self, min_x, mid_x, max_x, min_y, mid_y, max_y, sw_z, nw_z, se_z, mid_se_z = self._fcn(qtr3_x,qtr1_y) mid_ne_z = self._fcn(qtr3_x,qtr3_y) - self.extrema([mid_w_z[0], mid_n_z[0], mid_e_z[0], mid_s_z[0], mid_sw_z[0], mid_se_z[0], mid_nw_z[0], mid_sw_z[0]]) # recurse into the sub-squares @@ -440,7 +437,6 @@ def plot_block(self, min_x, mid_x, max_x, min_y, mid_y, max_y, sw_z, nw_z, se_z, ne = [(max_x,max_y,ne_z[0]),ne_z[1]] c = [[(mid_x,mid_y,mid_z[0]),mid_z[1]]] - left = [sw,nw] left_c = c top = [nw,ne] @@ -499,7 +495,6 @@ def interface(self, n, p, p_c, q, q_c): self.triangulate(m, mpc) self.triangulate(m, mqc) - def triangulate(self, p, c): """ Pass in a list of edge points (p) and center points (c). @@ -523,7 +518,6 @@ def triangulate(self, p, c): for i in range(0,len(p)-1): self._objects.append(self._triangle_factory.smooth_triangle(p[i][0], p[i+1][0], c[i][0],p[i][1], p[i+1][1], c[i][1])) - def extrema(self, list): """ If the num_colors option has been set, this expands the TrianglePlot's _min and _max diff --git a/src/sage/plot/primitive.py b/src/sage/plot/primitive.py index 4510a571399..20c2987142f 100644 --- a/src/sage/plot/primitive.py +++ b/src/sage/plot/primitive.py @@ -56,7 +56,6 @@ def __init__(self, options): """ self._options = options - def _allowed_options(self): """ Return the allowed options for a graphics primitive. @@ -216,7 +215,6 @@ def _repr_(self): return "Graphics primitive" - class GraphicPrimitive_xydata(GraphicPrimitive): def get_minmax_data(self): """ diff --git a/src/sage/quadratic_forms/constructions.py b/src/sage/quadratic_forms/constructions.py index dd9f83216d3..70fe02979fe 100644 --- a/src/sage/quadratic_forms/constructions.py +++ b/src/sage/quadratic_forms/constructions.py @@ -11,7 +11,6 @@ from sage.quadratic_forms.quadratic_form import QuadraticForm - def BezoutianQuadraticForm(f, g): r""" Compute the Bezoutian of two polynomials defined over a common base ring. This is defined by diff --git a/src/sage/quadratic_forms/genera/genus.py b/src/sage/quadratic_forms/genera/genus.py index 0fc43f33c62..d4bb8e48124 100644 --- a/src/sage/quadratic_forms/genera/genus.py +++ b/src/sage/quadratic_forms/genera/genus.py @@ -410,7 +410,6 @@ def LocalGenusSymbol(A, p): return Genus_Symbol_p_adic_ring(p, symbol) - def is_GlobalGenus(G): r""" Return if `G` represents the genus of a global quadratic form or lattice. @@ -465,7 +464,6 @@ def is_GlobalGenus(G): return True - def is_2_adic_genus(genus_symbol_quintuple_list): r""" Given a `2`-adic local symbol (as the underlying list of quintuples) @@ -527,7 +525,6 @@ def is_2_adic_genus(genus_symbol_quintuple_list): return True - def canonical_2_adic_compartments(genus_symbol_quintuple_list): r""" Given a `2`-adic local symbol (as the underlying list of quintuples) @@ -956,7 +953,6 @@ def p_adic_symbol(A, p, val): return [ [s[0]+m0] + s[1:] for s in sym + p_adic_symbol(A, p, val) ] - def is_even_matrix(A): r""" Determines if the integral symmetric matrix `A` is even @@ -990,7 +986,6 @@ def is_even_matrix(A): return True, -1 - def split_odd(A): r""" Given a non-degenerate Gram matrix `A (\mod 8)`, return a splitting @@ -1080,7 +1075,6 @@ def split_odd(A): return u, B - def trace_diag_mod_8(A): r""" Return the trace of the diagonalised form of `A` of an integral @@ -1487,7 +1481,6 @@ def __eq__(self, other): return False return self.canonical_symbol() == other.canonical_symbol() - def __ne__(self, other): r""" Determines if two genus symbols are unequal (not just inequivalent!). @@ -1523,7 +1516,6 @@ def __ne__(self, other): """ return not self == other - # Added these two methods to make this class iterable... #def __getitem__(self, i): # return self._symbol[i] @@ -1765,7 +1757,6 @@ def canonical_symbol(self): else: return self._symbol - def gram_matrix(self, check=True): r""" Return a gram matrix of a representative of this local genus. @@ -2044,7 +2035,6 @@ def number_of_blocks(self): """ return len(self._symbol) - def determinant(self): r""" Returns the (`p`-part of the) determinant (square-class) of the @@ -2339,7 +2329,6 @@ def trains(self): symbol = self._symbol return canonical_2_adic_trains(symbol) - def compartments(self): r""" Compute the indices for each of the compartments in this local genus @@ -2442,7 +2431,6 @@ def __init__(self, signature_pair, local_symbols, representative=None, check=Tru self._signature = signature_pair self._local_symbols = local_symbols - def __repr__(self): r""" Return a string representing the global genus symbol. @@ -2509,7 +2497,6 @@ def _latex_(self): rep += r"\\ " + s._latex_() return rep - def __eq__(self, other): r""" Determines if two global genus symbols are equal (not just equivalent!). @@ -2562,8 +2549,6 @@ def __eq__(self, other): return False return True - - def __ne__(self, other): r""" Determine if two global genus symbols are unequal (not just inequivalent!). @@ -2716,7 +2701,6 @@ def _improper_spinor_kernel(self): K = A.subgroup(K.gens() + (j,)) return A, K - def spinor_generators(self, proper): r""" Return the spinor generators. @@ -2807,7 +2791,6 @@ def _proper_is_improper(self): j = A.delta(r) # diagonal embedding of r return j in K, j - def signature(self): r""" Return the signature of this genus. diff --git a/src/sage/quadratic_forms/quadratic_form.py b/src/sage/quadratic_forms/quadratic_form.py index c4e97d97c50..fd26710736d 100644 --- a/src/sage/quadratic_forms/quadratic_form.py +++ b/src/sage/quadratic_forms/quadratic_form.py @@ -424,7 +424,6 @@ class QuadraticForm(SageObject): local_genus_symbol, \ CS_genus_symbol_list - # Routines to compute local masses for ZZ. from sage.quadratic_forms.quadratic_form__mass import \ shimura_mass__maximal, \ @@ -489,8 +488,6 @@ class QuadraticForm(SageObject): # Routines for solving equations of the form Q(x) = c. from sage.quadratic_forms.qfsolve import solve - - def __init__(self, R, n=None, entries=None, unsafe_initialization=False, number_of_automorphisms=None, determinant=None): """ EXAMPLES:: @@ -629,7 +626,6 @@ def list_external_initializations(self): """ return deepcopy(self._external_initialization_list) - def __pari__(self): """ Return a PARI-formatted Hessian matrix for Q. @@ -681,7 +677,6 @@ def _repr_(self): out_str += "]" return out_str - def _latex_(self): """ Give a LaTeX representation for the quadratic form given as an upper-triangular matrix of coefficients. @@ -911,8 +906,6 @@ def sum_by_coefficients_with(self, right): # return QuadraticForm(self.base_ring(), self.dim(), [c * self.__coeffs[i] for i in range(len(self.__coeffs))]) # ========================================================================================================================= - - def __call__(self, v): """ Evaluate this quadratic form Q on a vector or matrix of elements @@ -1025,8 +1018,6 @@ def __call__(self, v): raise TypeError - - # ===================================================================================================== def _is_even_symmetric_matrix_(self, A, R=None): @@ -1341,8 +1332,6 @@ def from_polynomial(poly): coeffs.append(poly.monomial_coefficient(v*w)) return QuadraticForm(base, len(vs), coeffs) - - def is_primitive(self): """ Determines if the given integer-valued form is primitive @@ -1434,7 +1423,6 @@ def base_ring(self): """ return self.__base_ring - def coefficients(self): """ Gives the matrix of upper triangular coefficients, @@ -1449,7 +1437,6 @@ def coefficients(self): """ return self.__coeffs - def det(self): """ Gives the determinant of the Gram matrix of 2*Q, or @@ -1478,7 +1465,6 @@ def det(self): self.__det = new_det return new_det - def Gram_det(self): """ Gives the determinant of the Gram matrix of Q. @@ -1496,7 +1482,6 @@ def Gram_det(self): """ return self.det() / ZZ(2**self.dim()) - def base_change_to(self, R): """ Alters the quadratic form to have all coefficients @@ -1581,7 +1566,6 @@ def level(self): warn("Warning -- The level of a quadratic form over a field is always 1. Do you really want to do this?!?") #raise RuntimeError, "Warning -- The level of a quadratic form over a field is always 1. Do you really want to do this?!?" - # Check invertibility and find the inverse try: mat_inv = self.matrix()**(-1) diff --git a/src/sage/quadratic_forms/quadratic_form__count_local_2.py b/src/sage/quadratic_forms/quadratic_form__count_local_2.py index 54b072109f3..6b4eebd26fc 100644 --- a/src/sage/quadratic_forms/quadratic_form__count_local_2.py +++ b/src/sage/quadratic_forms/quadratic_form__count_local_2.py @@ -68,10 +68,6 @@ def count_congruence_solutions_as_vector(self, p, k, m, zvec, nzvec): return CountAllLocalTypesNaive(self, p, k, m, zvec, nzvec) - - - - ##/////////////////////////////////////////// ##/// Front-ends for our counting routines // ##/////////////////////////////////////////// @@ -102,7 +98,6 @@ def count_congruence_solutions(self, p, k, m, zvec, nzvec): return CountAllLocalTypesNaive(self, p, k, m, zvec, nzvec)[0] - def count_congruence_solutions__good_type(self, p, k, m, zvec, nzvec): """ Counts the good-type solutions of Q(x) = m (mod p^k) satisfying the diff --git a/src/sage/quadratic_forms/quadratic_form__equivalence_testing.py b/src/sage/quadratic_forms/quadratic_form__equivalence_testing.py index b69bb6abf9d..a761558d7d0 100644 --- a/src/sage/quadratic_forms/quadratic_form__equivalence_testing.py +++ b/src/sage/quadratic_forms/quadratic_form__equivalence_testing.py @@ -218,7 +218,6 @@ def has_equivalent_Jordan_decomposition_at_prime(self, other, p): if len(self_jordan) != len(other_jordan): return False - # Deal with odd primes: Check that the Jordan component scales, dimensions, and discriminants are the same if p != 2: for i in range(len(self_jordan)): @@ -230,14 +229,12 @@ def has_equivalent_Jordan_decomposition_at_prime(self, other, p): # All tests passed for an odd prime. return True - # For p = 2: Check that all Jordan Invariants are the same. elif p == 2: # Useful definition t = len(self_jordan) # Define t = Number of Jordan components - # Check that all Jordan Invariants are the same (scale, dim, and norm) for i in range(t): if (self_jordan[i][0] != other_jordan[i][0]) \ diff --git a/src/sage/quadratic_forms/quadratic_form__local_density_interfaces.py b/src/sage/quadratic_forms/quadratic_form__local_density_interfaces.py index aa4fb04ad63..9bffe45f1d5 100644 --- a/src/sage/quadratic_forms/quadratic_form__local_density_interfaces.py +++ b/src/sage/quadratic_forms/quadratic_form__local_density_interfaces.py @@ -57,7 +57,6 @@ def local_density(self, p, m): if ((m != 0) and (valuation(m,p) < p_valuation)): # Note: The (m != 0) condition protects taking the valuation of zero. return QQ(0) - # If the form is imprimitive, rescale it and call the local density routine p_adjustment = QQ(1) / p**p_valuation m_prim = QQ(m) / p**p_valuation @@ -133,7 +132,6 @@ def local_primitive_density(self, p, m): if ((m != 0) and (valuation(m,p) < p_valuation)): # Note: The (m != 0) condition protects taking the valuation of zero. return QQ(0) - # If the form is imprimitive, rescale it and call the local density routine p_adjustment = QQ(1) / p**p_valuation m_prim = QQ(m) / p**p_valuation diff --git a/src/sage/quadratic_forms/quadratic_form__local_field_invariants.py b/src/sage/quadratic_forms/quadratic_form__local_field_invariants.py index 3556c101705..28f91e5c6fb 100644 --- a/src/sage/quadratic_forms/quadratic_form__local_field_invariants.py +++ b/src/sage/quadratic_forms/quadratic_form__local_field_invariants.py @@ -342,7 +342,6 @@ def signature_vector(self): return (p, n, z) - def signature(self): """ Returns the signature of the quadratic form, defined as: diff --git a/src/sage/quadratic_forms/quadratic_form__local_normal_form.py b/src/sage/quadratic_forms/quadratic_form__local_normal_form.py index 429c7c68896..f03ccbc688f 100644 --- a/src/sage/quadratic_forms/quadratic_form__local_normal_form.py +++ b/src/sage/quadratic_forms/quadratic_form__local_normal_form.py @@ -303,16 +303,13 @@ def jordan_blocks_by_scale_and_unimodular(self, p, safe_flag=True): if not hasattr(self, '__jordan_blocks_by_scale_and_unimodular_dict'): self.__jordan_blocks_by_scale_and_unimodular_dict = {} - # Deal with zero dim'l forms if self.dim() == 0: return [] - # Find the Local Normal form of Q at p Q1 = self.local_normal_form(p) - # Parse this into Jordan Blocks n = Q1.dim() tmp_Jordan_list = [] @@ -349,7 +346,6 @@ def jordan_blocks_by_scale_and_unimodular(self, p, safe_flag=True): # Add the last block tmp_Jordan_list += [(start_scale, Q1.extract_variables(range(start_ind, n)).scale_by_factor(ZZ(1) / QQ(p)**(start_scale)))] - # Cache the result self.__jordan_blocks_by_scale_and_unimodular_dict[p] = tmp_Jordan_list diff --git a/src/sage/quadratic_forms/quadratic_form__mass.py b/src/sage/quadratic_forms/quadratic_form__mass.py index 9f7de214b6a..8de97aaebc3 100644 --- a/src/sage/quadratic_forms/quadratic_form__mass.py +++ b/src/sage/quadratic_forms/quadratic_form__mass.py @@ -50,7 +50,6 @@ def shimura_mass__maximal(self): pass - def GHY_mass__maximal(self): """ Use the GHY formula to compute the mass of a (maximal?) quadratic diff --git a/src/sage/quadratic_forms/quadratic_form__mass__Conway_Sloane_masses.py b/src/sage/quadratic_forms/quadratic_form__mass__Conway_Sloane_masses.py index 65c524db39a..2a52e8584dd 100644 --- a/src/sage/quadratic_forms/quadratic_form__mass__Conway_Sloane_masses.py +++ b/src/sage/quadratic_forms/quadratic_form__mass__Conway_Sloane_masses.py @@ -109,7 +109,6 @@ def parity(self, allow_rescaling_flag=True): return "even" - def is_even(self, allow_rescaling_flag=True): """ Returns true iff after rescaling by some appropriate factor, the @@ -150,7 +149,6 @@ def is_odd(self, allow_rescaling_flag=True): return self.parity(allow_rescaling_flag) == "odd" - def conway_species_list_at_odd_prime(self, p): """ Returns an integer called the 'species' which determines the type @@ -221,7 +219,6 @@ def conway_species_list_at_odd_prime(self, p): return species_list - def conway_species_list_at_2(self): """ Returns an integer called the 'species' which determines the type @@ -300,7 +297,6 @@ def conway_species_list_at_2(self): # Append the species to the list species_list.append(species) - if jordan_list[-1].is_odd(): # Add an entry for the unlisted "s_max + 1" Jordan component as well. species_list.append(1) @@ -308,8 +304,6 @@ def conway_species_list_at_2(self): return species_list - - def conway_octane_of_this_unimodular_Jordan_block_at_2(self): """ Determines the 'octane' of this full unimodular Jordan block at @@ -355,7 +349,6 @@ def conway_octane_of_this_unimodular_Jordan_block_at_2(self): tmp_diag_vec[0] = u # This should be an odd integer! ind = 1 # The next index to diagonalize - # Use u to diagonalize the form -- WHAT ARE THE POSSIBLE LOCAL NORMAL FORMS? while ind < n: diff --git a/src/sage/quadratic_forms/quadratic_form__mass__Siegel_densities.py b/src/sage/quadratic_forms/quadratic_form__mass__Siegel_densities.py index 97b07023060..3cc83fcf02a 100644 --- a/src/sage/quadratic_forms/quadratic_form__mass__Siegel_densities.py +++ b/src/sage/quadratic_forms/quadratic_form__mass__Siegel_densities.py @@ -155,7 +155,6 @@ def Pall_mass_density_at_odd_prime(self, p): generic_factor *= (1 + legendre_symbol(((-1)**m) * d, p) * p**(-m)) jordan_mass_list = jordan_mass_list + [generic_factor] - # Step 3: Compute the local mass $\al_p$ at p. MJL = modified_jordan_list s = len(modified_jordan_list) diff --git a/src/sage/quadratic_forms/quadratic_form__siegel_product.py b/src/sage/quadratic_forms/quadratic_form__siegel_product.py index 1cf72a23745..c1c00ab2be4 100644 --- a/src/sage/quadratic_forms/quadratic_form__siegel_product.py +++ b/src/sage/quadratic_forms/quadratic_form__siegel_product.py @@ -20,7 +20,6 @@ from sage.misc.verbose import verbose - #/*! \brief Computes the product of all local densities for comparison with independently computed Eisenstein coefficients. # * # * \todo We fixed the generic factors to compensate for using the matrix of 2Q, but we need to document this better! =) @@ -95,7 +94,6 @@ def siegel_product(self, u): verbose("siegel_product Break 1. \n") verbose(" u = " + str(u) + "\n") - # Make the odd generic factors if ((n % 2) == 1): m = (n-1) // 2 @@ -115,12 +113,9 @@ def siegel_product(self, u): * QQ(sqrt((2 ** n) * f) / (u * d)) \ * abs(QuadraticBernoulliNumber(m, d1) / bernoulli(2*m)) - - # DIAGNOSTIC verbose("siegel_product Break 2. \n") - # Make the even generic factor if ((n % 2) == 0): m = n // 2 @@ -131,16 +126,13 @@ def siegel_product(self, u): #cout << " mpz_class(-1)^m = " << (mpz_class(-1)^m) << " and d = " << d << endl; #cout << " f = " << f << " and d1 = " << d1 << endl; - genericfactor = m / QQ(sqrt(f*d)) \ * ((u/2) ** (m-1)) * (f ** m) \ / abs(QuadraticBernoulliNumber(m, d1)) \ * (2 ** m) # This last factor compensates for using the matrix of 2*Q - ##return genericfactor - # Omit the generic factors in S and compute them separately omit = 1 include = 1 @@ -155,13 +147,11 @@ def siegel_product(self, u): for p in S_divisors: Q_normal = self.local_normal_form(p) - # DIAGNOSTIC verbose(" p = " + str(p) + " and its Kronecker symbol (d1/p) = (" + str(d1) + "/" + str(p) + ") is " + str(kronecker_symbol(d1, p)) + "\n") omit *= 1 / (1 - (kronecker_symbol(d1, p) / (p**m))) - # DIAGNOSTIC verbose(" omit = " + str(omit) + "\n") verbose(" Q_normal is \n" + str(Q_normal) + "\n") diff --git a/src/sage/quadratic_forms/quadratic_form__split_local_covering.py b/src/sage/quadratic_forms/quadratic_form__split_local_covering.py index 2fc02f60e56..ca5c3e68d14 100644 --- a/src/sage/quadratic_forms/quadratic_form__split_local_covering.py +++ b/src/sage/quadratic_forms/quadratic_form__split_local_covering.py @@ -190,7 +190,6 @@ def vectors_by_length(self, bound): # Initialize Q with zeros and Copy the Cholesky array into Q Q = self.cholesky_decomposition() - # 1. Initialize T = n * [RDF(0)] # Note: We index the entries as 0 --> n-1 U = n * [RDF(0)] @@ -354,7 +353,6 @@ def complementary_subform_to_vector(self, v): if not done_flag: raise RuntimeError("There is a problem cancelling out the matrix entries! =O") - # Return the complementary matrix return Q1.extract_variables(range(1,n)) diff --git a/src/sage/quadratic_forms/quadratic_form__theta.py b/src/sage/quadratic_forms/quadratic_form__theta.py index 7763c61a194..5a282713c3b 100644 --- a/src/sage/quadratic_forms/quadratic_form__theta.py +++ b/src/sage/quadratic_forms/quadratic_form__theta.py @@ -126,7 +126,6 @@ def theta_by_pari(self, Max, var_str='q', safe_flag=True): return PowerSeriesRing(ZZ, var_str)(theta_vec, Max) - # ------------- Compute the theta function by using an explicit Cholesky decomposition ------------ @@ -224,8 +223,6 @@ def theta_by_cholesky(self, q_prec): L[i] = floor(Z - U[i]) x[i] = ceil(-Z - U[i]) - 1 - - # 3a. Main loop x[i] += 1 while (x[i] > L[i]): diff --git a/src/sage/repl/rich_output/output_graphics3d.py b/src/sage/repl/rich_output/output_graphics3d.py index 959412570f0..46ff6d67ad1 100644 --- a/src/sage/repl/rich_output/output_graphics3d.py +++ b/src/sage/repl/rich_output/output_graphics3d.py @@ -4,17 +4,14 @@ This module defines the rich output types for 3-d scenes. """ - -#***************************************************************************** +# **************************************************************************** # Copyright (C) 2015 Volker Braun # # Distributed under the terms of the GNU General Public License (GPL) # as published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. -# http://www.gnu.org/licenses/ -#***************************************************************************** - - +# https://www.gnu.org/licenses/ +# **************************************************************************** import os import importlib.resources @@ -23,7 +20,6 @@ from sage.repl.rich_output.buffer import OutputBuffer - class OutputSceneJmol(OutputBase): def __init__(self, scene_zip, preview_png): diff --git a/src/sage/sandpiles/examples.py b/src/sage/sandpiles/examples.py index 9ccc08d314f..e38ce664483 100644 --- a/src/sage/sandpiles/examples.py +++ b/src/sage/sandpiles/examples.py @@ -139,8 +139,7 @@ def Diamond(self): sage: s.invariant_factors() [1, 1, 8] """ - return Sandpile(graphs.DiamondGraph(),0) - + return Sandpile(graphs.DiamondGraph(), 0) def Fan(self, n, deg_three_verts=False): """ diff --git a/src/sage/sets/disjoint_union_enumerated_sets.py b/src/sage/sets/disjoint_union_enumerated_sets.py index c1276dc9edf..8e272984619 100644 --- a/src/sage/sets/disjoint_union_enumerated_sets.py +++ b/src/sage/sets/disjoint_union_enumerated_sets.py @@ -313,7 +313,6 @@ def _repr_(self): """ return "Disjoint union of %s"%self._family - def _is_a(self, x): """ Check if a Sage object ``x`` belongs to ``self``. @@ -340,7 +339,6 @@ def _is_a(self, x): warn("%s is an infinite union\nThe default implementation of __contains__ can loop forever. Please overload it."%(self)) return any(x in a for a in self._family) - def __contains__(self, x): """ Check containment. diff --git a/src/sage/sets/set_from_iterator.py b/src/sage/sets/set_from_iterator.py index 74015c4433d..524ad3ae79b 100644 --- a/src/sage/sets/set_from_iterator.py +++ b/src/sage/sets/set_from_iterator.py @@ -162,7 +162,6 @@ def __init__(self, f, args=None, kwds=None, name=None, category=None, cache=Fals else: Parent.__init__(self, facade = True, category = EnumeratedSets()) - if name is not None: self.rename(name) diff --git a/src/sage/structure/factorization.py b/src/sage/structure/factorization.py index 7636f1a9ba7..b2caa14a285 100644 --- a/src/sage/structure/factorization.py +++ b/src/sage/structure/factorization.py @@ -188,7 +188,6 @@ from sage.misc.cachefunc import cached_method - @richcmp_method class Factorization(SageObject): """ @@ -964,7 +963,6 @@ def __radd__(self, left): """ return self.value() + left - def __rsub__(self, left): """ Return the (unfactored) difference of left and self. diff --git a/src/sage/structure/set_factories.py b/src/sage/structure/set_factories.py index badcbdc3897..f8b8e3643c9 100644 --- a/src/sage/structure/set_factories.py +++ b/src/sage/structure/set_factories.py @@ -792,8 +792,6 @@ def _repr_(self): self._parent_for) - - class BareFunctionPolicy(SetFactoryPolicy): r""" Policy where element are constructed using a bare function. diff --git a/src/sage/symbolic/constants.py b/src/sage/symbolic/constants.py index 87e3d3117ce..b5b8fe7ca33 100644 --- a/src/sage/symbolic/constants.py +++ b/src/sage/symbolic/constants.py @@ -347,7 +347,6 @@ def __reduce__(self): self._conversions, self._latex, self._mathml, self._domain)) - def domain(self): """ Returns the domain of this constant. This is either positive, @@ -815,7 +814,6 @@ def _real_double_(self, R): """ return R('1.61803398874989484820458') - def _mpfr_(self,R): """ EXAMPLES:: @@ -917,7 +915,6 @@ def _real_double_(self, R): """ return R.log2() - def _mpfr_(self,R): """ EXAMPLES:: @@ -1032,7 +1029,6 @@ def __init__(self, name='catalan'): Constant.__init__(self, name, conversions=conversions, domain='positive') - def _mpfr_(self, R): """ EXAMPLES:: @@ -1053,7 +1049,6 @@ def _real_double_(self, R): """ return R('0.91596559417721901505460351493252') - def __float__(self): """ EXAMPLES:: diff --git a/src/sage/symbolic/units.py b/src/sage/symbolic/units.py index 9b5407786e1..6d37d031179 100644 --- a/src/sage/symbolic/units.py +++ b/src/sage/symbolic/units.py @@ -886,7 +886,6 @@ def evalunitdict(): } - ############################################################################### # Dictionary for converting from derived units to base SI units. ############################################################################### From 9a8b269e42bf7d19168593105cc3623cbffcb49b Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 27 Jan 2023 21:03:41 -0800 Subject: [PATCH 466/751] sage.geometry.integral_points: Fall back to generic impl if matrix_integer_dense is not available --- ...ntegral_points.pyx => integral_points.pxi} | 28 ++++++++----------- src/sage/geometry/integral_points.py | 18 ++++++++++++ .../integral_points_generic_dense.pyx | 6 ++++ .../integral_points_integer_dense.pyx | 6 ++++ src/sage/matrix/matrix_space.py | 2 +- 5 files changed, 42 insertions(+), 18 deletions(-) rename src/sage/geometry/{integral_points.pyx => integral_points.pxi} (98%) create mode 100644 src/sage/geometry/integral_points.py create mode 100644 src/sage/geometry/integral_points_generic_dense.pyx create mode 100644 src/sage/geometry/integral_points_integer_dense.pyx diff --git a/src/sage/geometry/integral_points.pyx b/src/sage/geometry/integral_points.pxi similarity index 98% rename from src/sage/geometry/integral_points.pyx rename to src/sage/geometry/integral_points.pxi index 8b2e54b2d5d..e5ddce891a1 100644 --- a/src/sage/geometry/integral_points.pyx +++ b/src/sage/geometry/integral_points.pxi @@ -1,4 +1,3 @@ -#cython: wraparound=False, boundscheck=False r""" Cython helper methods to compute integral points in polyhedra. """ @@ -19,16 +18,11 @@ import itertools from sage.matrix.constructor import matrix, column_matrix, vector, diagonal_matrix from sage.rings.integer_ring import ZZ -from sage.rings.rational_field import QQ -from sage.rings.real_mpfr import RR from sage.rings.integer cimport Integer -from sage.arith.misc import GCD as gcd +from sage.arith.misc import gcd from sage.arith.functions import lcm -from sage.combinat.permutation import Permutation from sage.misc.misc_c import prod from sage.modules.free_module import FreeModule -from sage.modules.vector_integer_dense cimport Vector_integer_dense -from sage.matrix.matrix_integer_dense cimport Matrix_integer_dense ############################################################################## # The basic idea to enumerate the lattice points in the parallelotope @@ -140,8 +134,8 @@ cpdef tuple parallelotope_points(spanning_points, lattice): sage: len(parallelotope_points(rays, ZZ^4)) 967 """ - cdef Matrix_integer_dense VDinv - cdef Matrix_integer_dense R = matrix(spanning_points).transpose() + cdef MatrixClass VDinv + cdef MatrixClass R = matrix(spanning_points).transpose() e, d, VDinv = ray_matrix_normal_form(R) cdef tuple points = loop_over_parallelotope_points(e, d, VDinv, R, lattice) for p in points: @@ -183,8 +177,8 @@ cpdef tuple ray_matrix_normal_form(R): # The optimized version avoids constructing new matrices, vectors, and lattice points -cpdef tuple loop_over_parallelotope_points(e, d, Matrix_integer_dense VDinv, - Matrix_integer_dense R, lattice, +cpdef tuple loop_over_parallelotope_points(e, d, MatrixClass VDinv, + MatrixClass R, lattice, A=None, b=None): r""" The inner loop of :func:`parallelotope_points`. @@ -224,7 +218,7 @@ cpdef tuple loop_over_parallelotope_points(e, d, Matrix_integer_dense VDinv, s = ZZ.zero() # summation variable cdef list gens = [] gen = lattice(ZZ.zero()) - cdef Vector_integer_dense q_times_d = vector(ZZ, dim) + cdef VectorClass q_times_d = vector(ZZ, dim) for base in itertools.product(*[ range(i) for i in e ]): for i in range(dim): s = ZZ.zero() @@ -308,15 +302,15 @@ cpdef tuple simplex_points(vertices): cdef list rays = [vector(ZZ, list(v)) for v in vertices] if not rays: return () - cdef Vector_integer_dense origin = rays.pop() + cdef VectorClass origin = rays.pop() origin.set_immutable() if not rays: return (origin,) translate_points(rays, origin) # Find equation Ax<=b that cuts out simplex from parallelotope - cdef Matrix_integer_dense Rt = matrix(ZZ, rays) - cdef Matrix_integer_dense R = Rt.transpose() + cdef MatrixClass Rt = matrix(ZZ, rays) + cdef MatrixClass R = Rt.transpose() cdef int nrays = len(rays) cdef Integer b M = FreeModule(ZZ, nrays) @@ -335,7 +329,7 @@ cpdef tuple simplex_points(vertices): return points -cdef translate_points(v_list, Vector_integer_dense delta): +cdef translate_points(v_list, VectorClass delta): r""" Add ``delta`` to each vector in ``v_list``. """ @@ -568,7 +562,7 @@ cpdef rectangular_box_points(list box_min, list box_max, return loop_over_rectangular_box_points(box_min, box_max, inequalities, d, count_only) cdef list points = [] - cdef Vector_integer_dense v = vector(ZZ, d) + cdef VectorClass v = vector(ZZ, d) if not return_saturated: for p in loop_over_rectangular_box_points(box_min, box_max, inequalities, d, count_only): # v = vector(ZZ, perm_action(orig_perm, p)) # too slow diff --git a/src/sage/geometry/integral_points.py b/src/sage/geometry/integral_points.py new file mode 100644 index 00000000000..d349f8222b1 --- /dev/null +++ b/src/sage/geometry/integral_points.py @@ -0,0 +1,18 @@ +try: + from .integral_points_integer_dense import ( + parallelotope_points, + ray_matrix_normal_form, + loop_over_parallelotope_points, + simplex_points, + rectangular_box_points, + print_cache + ) +except ImportError: + from .integral_points_generic_dense import ( + parallelotope_points, + ray_matrix_normal_form, + loop_over_parallelotope_points, + simplex_points, + rectangular_box_points, + print_cache + ) diff --git a/src/sage/geometry/integral_points_generic_dense.pyx b/src/sage/geometry/integral_points_generic_dense.pyx new file mode 100644 index 00000000000..5ff619f44d4 --- /dev/null +++ b/src/sage/geometry/integral_points_generic_dense.pyx @@ -0,0 +1,6 @@ +#cython: wraparound=False, boundscheck=False + +from sage.modules.vector_integer_dense cimport Vector_integer_dense as VectorClass +from sage.matrix.matrix_dense cimport Matrix_dense as MatrixClass + +include "integral_points.pxi" diff --git a/src/sage/geometry/integral_points_integer_dense.pyx b/src/sage/geometry/integral_points_integer_dense.pyx new file mode 100644 index 00000000000..0151ffed5c0 --- /dev/null +++ b/src/sage/geometry/integral_points_integer_dense.pyx @@ -0,0 +1,6 @@ +#cython: wraparound=False, boundscheck=False + +from sage.modules.vector_integer_dense cimport Vector_integer_dense as VectorClass +from sage.matrix.matrix_integer_dense cimport Matrix_integer_dense as MatrixClass + +include "integral_points.pxi" diff --git a/src/sage/matrix/matrix_space.py b/src/sage/matrix/matrix_space.py index e889cee7905..818f8b01f5c 100644 --- a/src/sage/matrix/matrix_space.py +++ b/src/sage/matrix/matrix_space.py @@ -397,7 +397,7 @@ def get_matrix_class(R, nrows, ncols, sparse, implementation): else: return matrix_integer_sparse.Matrix_integer_sparse - if R is sage.rings.real_double.RDF or R is sage.rings.complex_double.CDF: + if isinstance(R, (sage.rings.abc.RealDoubleField, sage.rings.abc.ComplexDoubleField)): from . import matrix_double_sparse return matrix_double_sparse.Matrix_double_sparse From 2b6fb60309e417cc24accfc25d64c76c37991874 Mon Sep 17 00:00:00 2001 From: Travis Scrimshaw Date: Wed, 15 Feb 2023 14:05:55 +0900 Subject: [PATCH 467/751] Fixing the hashing of skew tableaux. --- src/sage/combinat/skew_tableau.py | 35 ++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/src/sage/combinat/skew_tableau.py b/src/sage/combinat/skew_tableau.py index 66c0a410f8f..5ed0965938a 100644 --- a/src/sage/combinat/skew_tableau.py +++ b/src/sage/combinat/skew_tableau.py @@ -148,11 +148,11 @@ def __eq__(self, other): INPUT: - ``other`` -- the element that ``self`` is compared to + - ``other`` -- the element that ``self`` is compared to OUTPUT: - A Boolean. + A boolean. TESTS:: @@ -161,6 +161,10 @@ def __eq__(self, other): False sage: t == SkewTableaux()([[None,1,2]]) True + sage: t == [(None,1,2)] + True + sage: t == [[None,1,2]] + True sage: s = SkewTableau([[1,2]]) sage: s == 0 @@ -171,7 +175,7 @@ def __eq__(self, other): if isinstance(other, (Tableau, SkewTableau)): return list(self) == list(other) else: - return list(self) == other + return list(self) == other or list(list(row) for row in self) == other def __ne__(self, other): r""" @@ -181,22 +185,33 @@ def __ne__(self, other): INPUT: - ``other`` -- the element that ``self`` is compared to + - ``other`` -- the element that ``self`` is compared to OUTPUT: - A Boolean. + A boolean. TESTS:: - sage: t = Tableau([[2,3],[1]]) + sage: t = SkewTableau([[None,1,2]]) sage: t != [] True """ - if isinstance(other, (Tableau, SkewTableau)): - return list(self) != list(other) - else: - return list(self) != other + return not (self == other) + + def __hash__(self): + """ + Return the hash of ``self``. + + EXAMPLES: + + Check that :trac:`35137` is fixed:: + + sage: t = SkewTableau([[None,1,2]]) + sage: hash(t) == hash(tuple(t)) + True + """ + return hash(tuple(self)) def check(self): r""" From 62ac140fddb5b34d944e5c2b2f88a92340e2790b Mon Sep 17 00:00:00 2001 From: Sanjay Rijal <37138338+zovelsanj@users.noreply.github.com> Date: Wed, 15 Feb 2023 11:06:51 +0545 Subject: [PATCH 468/751] reduced information Reduced `sage` and `sagemath` information as per [#35070](/~https://github.com/sagemath/sage/pull/35070#discussion_r1103826628) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3685bb8c4b3..40043bf7510 100644 --- a/README.md +++ b/README.md @@ -407,7 +407,7 @@ For installation of `sage` in python using `pip` you need to install `sagemath-s You need to install the `sage_conf`, a wheelhouse of various python packages. You can list the wheels using `ls $(sage-config SAGE_SPKG_WHEELS)`. After manual installation of these wheels, you can install the sage library, `sagemath-standard`. -**NOTE:** You can find `sage` and `sagemath` pip packages but it is worth noting that when importing `sage` with these packages you will encounter `ModuleNotFoundError: No module named 'sage'`. Indeed `pip install sage` installs `sage 0.0.0` which is literally an empty package. +**NOTE:** You can find `sage` and `sagemath` pip packages but with these packages, you will encounter `ModuleNotFoundError`. Troubleshooting --------------- From 60e3509a451278ef9d93eb6239a4fed4e7dbd548 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Tue, 14 Feb 2023 21:52:00 -0800 Subject: [PATCH 469/751] src/sage/geometry/integral_points.py: import more, for doctests --- src/sage/geometry/integral_points.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/sage/geometry/integral_points.py b/src/sage/geometry/integral_points.py index d349f8222b1..48153591bcf 100644 --- a/src/sage/geometry/integral_points.py +++ b/src/sage/geometry/integral_points.py @@ -5,7 +5,10 @@ loop_over_parallelotope_points, simplex_points, rectangular_box_points, - print_cache + print_cache, + Inequality_generic, + Inequality_int, + InequalityCollection, ) except ImportError: from .integral_points_generic_dense import ( @@ -14,5 +17,8 @@ loop_over_parallelotope_points, simplex_points, rectangular_box_points, - print_cache + print_cache, + Inequality_generic, + Inequality_int, + InequalityCollection, ) From 6f3416b8f4a5a21013c10bf38e465624eaffcd9c Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Wed, 15 Feb 2023 14:59:05 +0900 Subject: [PATCH 470/751] Edit the PR template --- .github/PULL_REQUEST_TEMPLATE.md | 35 +++++++++++++++----------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0ba5857b820..0710261fc34 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,29 +1,26 @@ - -### 📚 Description + + - +### :books: Description + + - + + -### 📝 Checklist +### :memo: Checklist - - + -- [ ] I have made sure that the title is self-explanatory and the description concisely explains the PR. -- [ ] I have linked an issue or discussion. +- [ ] The title is concise, informative, and self-explanatory. +- [ ] The description explains in detail what this PR is about. +- [ ] I have linked a relevant issue or discussion. - [ ] I have created tests covering the changes. - [ ] I have updated the documentation accordingly. -### ⌛ Dependencies - - +### :hourglass: Dependencies + + + From ee2149d4bc810c0185adcad9478874533672e520 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6ppe?= Date: Tue, 14 Feb 2023 21:59:11 -0800 Subject: [PATCH 471/751] README.md: Fix wording Co-authored-by: Alex J Best --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 40043bf7510..dbc22093aca 100644 --- a/README.md +++ b/README.md @@ -405,7 +405,7 @@ For installation of `sage` in python using `pip` you need to install `sagemath-s $ python3 -m pip install $(sage-config SAGE_SPKG_WHEELS)/*.whl $ python3 -m pip install sagemath-standard -You need to install the `sage_conf`, a wheelhouse of various python packages. You can list the wheels using `ls $(sage-config SAGE_SPKG_WHEELS)`. After manual installation of these wheels, you can install the sage library, `sagemath-standard`. +You need to install `sage_conf`, a wheelhouse of various python packages. You can list the wheels using `ls $(sage-config SAGE_SPKG_WHEELS)`. After manual installation of these wheels, you can install the sage library, `sagemath-standard`. **NOTE:** You can find `sage` and `sagemath` pip packages but with these packages, you will encounter `ModuleNotFoundError`. From e51619e27cf7756fe76e2c21aa1edf8f59047bcb Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Wed, 15 Feb 2023 15:10:08 +0900 Subject: [PATCH 472/751] More edits in dependencies section --- .github/PULL_REQUEST_TEMPLATE.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 0710261fc34..87de00728f8 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -10,8 +10,7 @@ ### :memo: Checklist - - + - [ ] The title is concise, informative, and self-explanatory. - [ ] The description explains in detail what this PR is about. @@ -21,6 +20,9 @@ ### :hourglass: Dependencies - - - + + + From 0fbbe9fa86cc19f0649d7716d0ee7a0a593f5c36 Mon Sep 17 00:00:00 2001 From: Tirthankar Mazumder <63574588+wermos@users.noreply.github.com> Date: Wed, 15 Feb 2023 12:37:15 +0530 Subject: [PATCH 473/751] Update README.md Fixed the path to the Sage logo. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1a0582d87c5..5c05c4150f3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - + # Sage: Open Source Mathematical Software From 02451487d79434f7104e70f8f9f213344ddf85a9 Mon Sep 17 00:00:00 2001 From: Aram Dermenjian Date: Wed, 15 Feb 2023 08:08:26 +0000 Subject: [PATCH 474/751] Make Tableau tests not as generic --- src/sage/combinat/tableau.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/combinat/tableau.py b/src/sage/combinat/tableau.py index c08358032c1..269734c2ce6 100644 --- a/src/sage/combinat/tableau.py +++ b/src/sage/combinat/tableau.py @@ -866,7 +866,7 @@ def plot(self, descents=False): .. PLOT:: :width: 200 px - t = Tableau([[1,2],[2,3]]) + t = Tableau([[1,2,3,4],[2,3],[5]]) Tableaux.options.convention="english" sphinx_plot(t.plot()) @@ -876,7 +876,7 @@ def plot(self, descents=False): .. PLOT:: :width: 200 px - t = Tableau([[1,2],[2,3]]) + t = Tableau([[1,2,3,4],[2,3],[5]]) Tableaux.options.convention="french" sphinx_plot(t.plot()) Tableaux.options.convention="english" From c60f1def292f88db601ba17348aaf6db5d12ea09 Mon Sep 17 00:00:00 2001 From: Kwankyu Lee Date: Wed, 15 Feb 2023 18:05:50 +0900 Subject: [PATCH 475/751] Keep dependencies as a list --- .github/PULL_REQUEST_TEMPLATE.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 87de00728f8..10367d46dbb 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,5 +1,6 @@ + ### :books: Description @@ -21,8 +22,8 @@ ### :hourglass: Dependencies From 362a0afd98216a2bcc0a36675cf788d17fada1f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Sun, 12 Feb 2023 10:35:41 +0100 Subject: [PATCH 476/751] move single_valued method of MZV to auxiliary F ring --- src/sage/modular/multiple_zeta.py | 8 +------- src/sage/modular/multiple_zeta_F_algebra.py | 22 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/src/sage/modular/multiple_zeta.py b/src/sage/modular/multiple_zeta.py index 6fd43f34560..9644e8d3a15 100644 --- a/src/sage/modular/multiple_zeta.py +++ b/src/sage/modular/multiple_zeta.py @@ -1108,13 +1108,7 @@ def single_valued(self): sage: Z(5,3).single_valued() == 14*Z(3)*Z(5) True """ - phi_im = self.phi() - zin = phi_im.parent() - phi_no_f2 = phi_im.without_f2() - sv = zin.sum_of_terms(((0, w), cf) - for (a, b), cf in phi_no_f2.coproduct() - for w in shuffle(a[1], b[1].reversal(), False)) - return rho_inverse(sv) + return rho_inverse(self.phi().single_valued()) def simplify(self): """ diff --git a/src/sage/modular/multiple_zeta_F_algebra.py b/src/sage/modular/multiple_zeta_F_algebra.py index 39e7dcad4e7..3dc2f4551f3 100644 --- a/src/sage/modular/multiple_zeta_F_algebra.py +++ b/src/sage/modular/multiple_zeta_F_algebra.py @@ -31,6 +31,7 @@ from sage.combinat.free_module import CombinatorialFreeModule from sage.combinat.words.words import Words from sage.combinat.words.finite_word import FiniteWord_class +from sage.combinat.words.shuffle_product import ShuffleProduct_w1w2 as shuffle from sage.misc.cachefunc import cached_method from sage.misc.lazy_attribute import lazy_attribute from sage.sets.integer_range import IntegerRange @@ -721,3 +722,24 @@ def without_f2(self): """ F = self.parent() return F._from_dict({(0, w): cf for (p, w), cf in self if not p}) + + def single_valued(self): + """ + Return the single-valued version of ``self``. + + EXAMPLES:: + + sage: from sage.modular.multiple_zeta_F_algebra import F_algebra + sage: F = F_algebra(QQ) + sage: t = 4*F("2")+F("3") + sage: t.single_valued() + 2*f3 + sage: t = 4*F("35")+F("27") + sage: t.single_valued() + 8*f3f5 + 8*f5f3 + """ + F = self.parent() + no_f2 = self.without_f2() + return F.sum_of_terms(((0, w), cf) + for (a, b), cf in no_f2.coproduct() + for w in shuffle(a[1], b[1].reversal(), False)) From 875738a1e6b01489dfbbc990b98d2ada2f9c671f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Wed, 15 Feb 2023 10:16:17 +0100 Subject: [PATCH 477/751] changes according to referee's comments --- src/doc/en/reference/references/index.rst | 3 +++ src/sage/modular/multiple_zeta.py | 8 +++++++- src/sage/modular/multiple_zeta_F_algebra.py | 6 +++--- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/doc/en/reference/references/index.rst b/src/doc/en/reference/references/index.rst index 5a7eb0a163c..b8ee7d75e9a 100644 --- a/src/doc/en/reference/references/index.rst +++ b/src/doc/en/reference/references/index.rst @@ -1180,6 +1180,9 @@ REFERENCES: moduli spaces to Feynman integrals*, in Contemporary Mathematics vol 539, pages 27-52, 2011. +.. [Bro2013] Francis Brown, *Single-valued motivic periods and multiple zeta + values*, Forum Math. Sigma 2 (2014), :doi:`10.1017/fms.2014.18`. + .. [Bro2016] \A.E. Brouwer, Personal communication, 2016. diff --git a/src/sage/modular/multiple_zeta.py b/src/sage/modular/multiple_zeta.py index 9644e8d3a15..b3674b5df78 100644 --- a/src/sage/modular/multiple_zeta.py +++ b/src/sage/modular/multiple_zeta.py @@ -1083,9 +1083,15 @@ def iterated(self): return self.parent().iterated(self) def single_valued(self): - """ + r""" Return the single-valued version of ``self``. + This is the projection map onto the sub-algebra of + single-valued motivic multiple zeta values, as defined by + F. Brown in [Bro2013]_. + + This morphism of algebras sends in particular `\zeta(2)` to `0`. + EXAMPLES:: sage: M = Multizetas(QQ) diff --git a/src/sage/modular/multiple_zeta_F_algebra.py b/src/sage/modular/multiple_zeta_F_algebra.py index 3dc2f4551f3..f2b21b9e668 100644 --- a/src/sage/modular/multiple_zeta_F_algebra.py +++ b/src/sage/modular/multiple_zeta_F_algebra.py @@ -716,7 +716,7 @@ def without_f2(self): sage: from sage.modular.multiple_zeta_F_algebra import F_algebra sage: F = F_algebra(QQ) - sage: t = 4*F("35")+F("27") + sage: t = 4 * F("35") + F("27") sage: t.without_f2() 4*f3f5 """ @@ -731,10 +731,10 @@ def single_valued(self): sage: from sage.modular.multiple_zeta_F_algebra import F_algebra sage: F = F_algebra(QQ) - sage: t = 4*F("2")+F("3") + sage: t = 4 * F("2") + F("3") sage: t.single_valued() 2*f3 - sage: t = 4*F("35")+F("27") + sage: t = 4 * F("35") + F("27") sage: t.single_valued() 8*f3f5 + 8*f5f3 """ From 53cbf193a750cbc4bf39cf41afd2200632e37a55 Mon Sep 17 00:00:00 2001 From: Kryzar Date: Wed, 15 Feb 2023 17:13:16 +0100 Subject: [PATCH 478/751] (fix) Fix an indentation problem in the doc --- .../function_field/drinfeld_modules/drinfeld_module.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py index c2f05bbdf56..e38df609682 100644 --- a/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py +++ b/src/sage/rings/function_field/drinfeld_modules/drinfeld_module.py @@ -267,10 +267,10 @@ class DrinfeldModule(Parent, UniqueRepresentation): sage: phi.j_invariant() # j-invariant 1 - A Drinfeld `\mathbb{F}_q[T]`-module can be seen as an Ore - polynomial with positive degree and constant coefficient - `\gamma(T)`, where `\gamma` is the base morphism. This analogy is - the motivation for the following methods:: + A Drinfeld `\mathbb{F}_q[T]`-module can be seen as an Ore polynomial + with positive degree and constant coefficient `\gamma(T)`, where + `\gamma` is the base morphism. This analogy is the motivation for + the following methods:: sage: phi.coefficients() [z, 1, 1] From 05bff634ff7a52bd8c6dd39feaea448b9daa91ad Mon Sep 17 00:00:00 2001 From: dcoudert Date: Wed, 15 Feb 2023 18:03:26 +0100 Subject: [PATCH 479/751] #33255: remove trailing whitespaces --- src/sage/graphs/generic_graph.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/graphs/generic_graph.py b/src/sage/graphs/generic_graph.py index 3c497ab00d8..19021cde1e9 100644 --- a/src/sage/graphs/generic_graph.py +++ b/src/sage/graphs/generic_graph.py @@ -1272,14 +1272,14 @@ def copy(self, weighted=None, data_structure=None, sparse=None, immutable=None, if (isinstance(self._backend, StaticSparseBackend) and (data_structure == 'static_sparse' or data_structure is None)): return self - + if data_structure is None: from sage.graphs.base.dense_graph import DenseGraphBackend if isinstance(self._backend, DenseGraphBackend): data_structure = "dense" else: data_structure = "sparse" - + G = self.__class__(self, name=self.name(), pos=copy(self._pos), weighted=weighted, hash_labels=hash_labels, data_structure=data_structure) From 9aac7409cd45f387ab304ece9bdca1b344e6e3be Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Thu, 26 Jan 2023 18:11:47 +0000 Subject: [PATCH 480/751] Store Williamson type matrices as strings --- src/sage/combinat/matrices/hadamard_matrix.py | 34 +++++++++---------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index bf915399d20..df799d902ce 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -354,31 +354,29 @@ def williamson_type_quadruples_smallcases(n, existence=False): ValueError: The Williamson type quadruple of order 123 is not yet implemented. """ db = { - 1: ([1], [1], [1], [1]), - 7: ([1, -1, -1, 1, 1, -1, -1], - [1, -1, 1, -1, -1, 1, -1], - [1, 1, -1, -1, -1, -1, 1], - [1, -1, -1, -1, -1, -1, -1]), - 9: ([1, -1, -1, -1, 1, 1, -1, -1, -1], - [1, -1, -1, 1, -1, -1, 1, -1, -1], - [1, -1, 1, -1, -1, -1, -1, 1, -1], - [1, 1, -1, -1, -1, -1, -1, -1, 1]), - 29: ([1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, 1], - [1, -1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, -1, 1, -1, -1, 1, 1, -1, -1, -1, 1, -1], - [1, 1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, 1, 1, -1, 1, 1, 1], - [1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1]), - 43: ([1, 1, -1, -1, -1, 1, 1, 1, 1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, 1, 1, -1, -1, -1, 1], - [1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, -1, 1, 1], - [1, 1, -1, 1, 1, 1, 1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 1, 1, 1, -1, 1], - [1, -1, -1, -1, 1, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, 1, 1, -1, 1, -1, 1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1]), + 1: ('+', '+', '+', '+'), + 7: ('+--++--', '+-+--+-', '++----+', '+------'), + 9: ('+---++---', '+--+--+--', '+-+----+-', '++------+'), + 29: ('+++---++--+-+----+-+--++---++', + '+-+---++--+-++++++-+--++---+-', + '++++-++-+---++++++---+-++-+++', + '++--+--+-+++-++++-+++-+--+--+'), + 43: ('++---++++-+--+--++--------++--+--+-++++---+', + '+++-+-++--+-+-++++-+----+-++++-+-+--++-+-++', + '++-++++++----+-+--++-++-++--+-+----++++++-+', + '+---++--++++-+-+++-++--++-+++-+-++++--++---'), } + def pmtoZ(s): + return [1 if x == '+' else -1 for x in s] + if existence: return n in db if n not in db: raise ValueError("The Williamson type quadruple of order %s is not yet implemented." % n) - a, b, c, d = map(vector, db[n]) + + a, b, c, d = map(lambda s: vector(pmtoZ(s)), db[n]) return a, b, c, d From 225770934c8e057c0a404beb748c8bb691bc73a4 Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Thu, 26 Jan 2023 18:44:26 +0000 Subject: [PATCH 481/751] Add more williamson type matrices --- src/sage/combinat/matrices/hadamard_matrix.py | 34 +++++++++++++++---- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index df799d902ce..3354952afd6 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -319,7 +319,7 @@ def williamson_type_quadruples_smallcases(n, existence=False): Williamson construction of Hadamard matrices. Namely, the function returns the first row of 4 `n\times n` circulant matrices with the properties described in :func:`sage.combinat.matrices.hadamard_matrix.hadamard_matrix_williamson_type`. - The matrices for n=29 and n=43 are given in [Ha83]_. + The matrices for `n = 3, 5, ..., 29, 37, 43` are given in [Ha83]_. INPUT: @@ -355,12 +355,32 @@ def williamson_type_quadruples_smallcases(n, existence=False): """ db = { 1: ('+', '+', '+', '+'), + 3: ('+++', '+--', '+--', '+--'), + 5: ('+-++-', '++--+', '+----', '+----'), 7: ('+--++--', '+-+--+-', '++----+', '+------'), 9: ('+---++---', '+--+--+--', '+-+----+-', '++------+'), - 29: ('+++---++--+-+----+-+--++---++', - '+-+---++--+-++++++-+--++---+-', - '++++-++-+---++++++---+-++-+++', - '++--+--+-+++-++++-+++-+--+--+'), + 11: ('++--------+', '++-+-++-+-+', '++-++--++-+', '+-++----++-'), + 13: ('++++-+--+-+++', '+---+-++-+---', '++---+--+---+', '++---+--+---+'), + 15: ('+-+---++++---+-', '++-++------++-+', + '++-++++--++++-+', '++-++-+--+-++-+'), + 17: ('+---+++----+++---', '++-+---+--+---+-+', + '+--+-++++++++-+--', '+-++-+++--+++-++-'), + 19: ('++--+++-+--+-+++--+', '++-++--+-++-+--++-+', + '+-+---++++++++---+-', '++--+-++++++++-+--+'), + 21: ('+--++++---++---++++--', '++++-+---+--+---+-+++', + '++--+-+-++--++-+-+--+', '++-+++++-+--+-+++++-+'), + 23: ('++---+---+-++-+---+---+', '+-++-++--++++++--++-++-', + '+++---++-+-++-+-++---++', '+++-+++-+------+-+++-++'), + 25: ('++++-+-+-+--++--+-+-+-+++', '++--+--+-++++++++-+--+--+', + '+++--+--++++--++++--+--++', '+-+--+++--++++++--+++--+-'), + 27: ('+--+--+-+++--++--+++-+--+--', '+++-++-+---++--++---+-++-++', + '+---+++++-+-++++-+-+++++---', '+---+++++-+-++++-+-+++++---'), + 29: ('+++---++--+-+----+-+--++---++', '+-+---++--+-++++++-+--++---+-', + '++++-++-+---++++++---+-++-+++', '++--+--+-+++-++++-+++-+--+--+'), + 37: ('+--+-+-+-++---+--++++--+---++-+-+-+--', + '+---++-++--+-+-++----++-+-+--++-++---', + '+++++-+-----++----++----++-----+-++++', + '+--+++-+-----+----++----+-----+-+++--'), 43: ('++---++++-+--+--++--------++--+--+-++++---+', '+++-+-++--+-+-++++-+----+-++++-+-+--++-+-++', '++-++++++----+-+--++-++-++--+-+----++++++-+', @@ -404,10 +424,10 @@ def williamson_hadamard_matrix_smallcases(n, existence=False, check=True): 116 x 116 dense matrix over Integer Ring... sage: williamson_hadamard_matrix_smallcases(172) 172 x 172 dense matrix over Integer Ring... - sage: williamson_hadamard_matrix_smallcases(100) + sage: williamson_hadamard_matrix_smallcases(1000) Traceback (most recent call last): ... - ValueError: The Williamson type Hadamard matrix of order 100 is not yet implemented. + ValueError: The Williamson type Hadamard matrix of order 1000 is not yet implemented. """ assert n % 4 == 0 From 9a9d661f80aadcb07e4572cf2d5da173199a713b Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Thu, 26 Jan 2023 19:28:08 +0000 Subject: [PATCH 482/751] Add other Williamson type matrices --- src/doc/en/reference/references/index.rst | 5 +++ src/sage/combinat/matrices/hadamard_matrix.py | 37 ++++++++++++++----- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/doc/en/reference/references/index.rst b/src/doc/en/reference/references/index.rst index cf75fe5eb36..1e218493aa9 100644 --- a/src/doc/en/reference/references/index.rst +++ b/src/doc/en/reference/references/index.rst @@ -4118,6 +4118,11 @@ REFERENCES: of a genus 2 Jacobian*, Mathematics of Computation 88 (2019), 889-929. :doi:`10.1090/mcom/3358`. +.. [Lon2013] \S. London, + *Constructing New Turyn Type Sequences, T-Sequences and Hadamard Matrices*. + PhD Thesis, University of Illinois at Chicago, 2013. + https://hdl.handle.net/10027/9916 + .. [LOS2012] \C. Lecouvey, M. Okado, M. Shimozono. "Affine crystals, one-dimensional sums and parabolic Lusztig `q`-analogues". Mathematische Zeitschrift. **271** (2012). Issue 3-4. diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 3354952afd6..5f4c829684d 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -319,7 +319,8 @@ def williamson_type_quadruples_smallcases(n, existence=False): Williamson construction of Hadamard matrices. Namely, the function returns the first row of 4 `n\times n` circulant matrices with the properties described in :func:`sage.combinat.matrices.hadamard_matrix.hadamard_matrix_williamson_type`. - The matrices for `n = 3, 5, ..., 29, 37, 43` are given in [Ha83]_. + The matrices for `n = 3, 5, ..., 29, 37, 43` are given in [Ha83]_. The matrices + for `n = 31, 33, 39, 41, 45, 49, 51, 55, 57, 61, 63` are given in [Lon2013]_. INPUT: @@ -377,14 +378,32 @@ def williamson_type_quadruples_smallcases(n, existence=False): '+---+++++-+-++++-+-+++++---', '+---+++++-+-++++-+-+++++---'), 29: ('+++---++--+-+----+-+--++---++', '+-+---++--+-++++++-+--++---+-', '++++-++-+---++++++---+-++-+++', '++--+--+-+++-++++-+++-+--+--+'), - 37: ('+--+-+-+-++---+--++++--+---++-+-+-+--', - '+---++-++--+-+-++----++-+-+--++-++---', - '+++++-+-----++----++----++-----+-++++', - '+--+++-+-----+----++----+-----+-+++--'), - 43: ('++---++++-+--+--++--------++--+--+-++++---+', - '+++-+-++--+-+-++++-+----+-++++-+-+--++-+-++', - '++-++++++----+-+--++-++-++--+-+----++++++-+', - '+---++--++++-+-+++-++--++-+++-+-++++--++---'), + 31: ('++++++-+--+---++++---+--+-+++++', '+--++---+-+-++----++-+-+---++--', + '+--++---+-+-++----++-+-+---++--', '+-----+-++-+++----+++-++-+-----'), + 33: ('++++++-+-+-+++------+++-+-+-+++++', '++-+-++-+----+++--+++----+-++-+-+', + '++--++-+++-+--+-++-+--+-+++-++--+', '+--++--+++++-++----++-+++++--++--'), + 37: ('+--+-+-+-++---+--++++--+---++-+-+-+--', '+---++-++--+-+-++----++-+-+--++-++---', + '+++++-+-----++----++----++-----+-++++', '+--+++-+-----+----++----+-----+-+++--'), + 39: ('+++--+-+-----+--++----++--+-----+-+--++', '+++--++-+---+-+--+----+--+-+---+-++--++', + '++++---+--++----+-+--+-+----++--+---+++', '+---++-+-+-----+++-++-+++-----+-+-++---'), + 41: ('++++--+-++++-++--++----++--++-++++-+--+++', '++++--+-++++-++--++----++--++-++++-+--+++', + '+++-++-+-+-+-----+++--+++-----+-+-+-++-++', '+--+--+-+-+-+++++---++---+++++-+-+-+--+--'), + 43: ('++---++++-+--+--++--------++--+--+-++++---+', '+++-+-++--+-+-++++-+----+-++++-+-+--++-+-++', + '++-++++++----+-+--++-++-++--+-+----++++++-+', '+---++--++++-+-+++-++--++-+++-+-++++--++---'), + 45: ('+++++-++----+-++--++-++-++--++-+----++-++++', '+++---++--+-+-+-++--------++-+-+-+--++---++', + '++-+-++++-+--+--+++--++--+++--+--+-++++-+-+', '+-++-----++++-+-+++-++++-+++-+-++++-----++-'), + 49: ('++++-++-+---++-+++---++-++-++---+++-++---+-++-+++', '++++-++-+---++-+++---++-++-++---+++-++---+-++-+++', + '+----+-++++--+-+++-+-+++--+++-+-+++-+--++++-+----', '+++++-+----++-+---+-+---++---+-+---+-++----+-++++'), + 51: ('+---+++-++-+-+++--+++++--++--+++++--+++-+-++-+++---', '----+++-++-+-+++--+++++--++--+++++--+++-+-++-+++---', + '-+--+----+-+++-+-+++++--+--+--+++++-+-+++-+----+--+', '-+--+----+-+++-+-+++++--+--+--+++++-+-+++-+----+--+'), + 55: ('+-+--+-+-++--+-+++++-+++--++++--+++-+++++-+--++-+-+--+-', '--+--+-+-++--+-+++++-+++--++++--+++-+++++-+--++-+-+--+-', + '+++----++-++--++----+-+-++++++++-+-+----++--++-++----++', '+++----++-++--++----+-+-++++++++-+-+----++--++-++----++'), + 57: ('+---++-+--++++-+++-++---+-++++++-+---++-+++-++++--+-++---', '----++-+--++++-+++-++---+-++++++-+---++-+++-++++--+-++---', + '--+-+-+++--+--+-++---+++++-++++-+++++---++-+--+--+++-+-+-', '--+-+-+++--+--+-++---+++++-++++-+++++---++-+--+--+++-+-+-'), + 61: ('++--+--++--+-+-++++--+-----+------+-----+--++++-+-+--++--+--+', '++--+--++--+-+-++++--+-----+------+-----+--++++-+-+--++--+--+', + '+---+-+-++++---++--+-++-+---++++++---+-++-+--++---++++-+-+---', '++++-+-+----+++--++-+--+-+++------+++-+--+-++--+++----+-+-+++'), + 63: ('++-+++--++-++--+--+-++-+-+++--------+++-+-++-+--+--++-++--+++-+', '-+-+++--++-++--+--+-++-+-+++--------+++-+-++-+--+--++-++--+++-+', + '++++-++-+-++++-+---+---+++---++++++---+++---+---+-++++-+-++-+++', '++++-++-+-++++-+---+---+++---++++++---+++---+---+-++++-+-++-+++'), } def pmtoZ(s): From 95073d25c5a0c5395b50e79516c5e4094acbf91c Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 08:58:24 +0000 Subject: [PATCH 483/751] Rename supplementary_difference_set_from_rel_diff_set --- .../combinat/designs/difference_family.py | 28 +++++++++---------- src/sage/combinat/matrices/hadamard_matrix.py | 10 +++---- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index 4257d4489e4..53e03023947 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -1618,8 +1618,8 @@ def is_supplementary_difference_set(Ks, v, lmbda): EXAMPLES:: - sage: from sage.combinat.designs.difference_family import supplementary_difference_set, is_supplementary_difference_set - sage: S1, S2, S3, S4 = supplementary_difference_set(17) + sage: from sage.combinat.designs.difference_family import supplementary_difference_set_from_rel_diff_set, is_supplementary_difference_set + sage: S1, S2, S3, S4 = supplementary_difference_set_from_rel_diff_set(17) sage: is_supplementary_difference_set([S1, S2, S3, S4], 16, 16) True sage: is_supplementary_difference_set([S1, S2, S3, S4], 16, 14) @@ -1651,7 +1651,7 @@ def is_supplementary_difference_set(Ks, v, lmbda): return True -def supplementary_difference_set(q, existence=False, check=True): +def supplementary_difference_set_from_rel_diff_set(q, existence=False, check=True): r"""Construct `4-\{2v; v, v+1, v, v; 2v\}` supplementary difference sets where `q=2v+1`. The sets are created from relative difference sets as detailed in Theorem 3.3 of [Spe1975]_. this construction @@ -1682,8 +1682,8 @@ def supplementary_difference_set(q, existence=False, check=True): EXAMPLES:: - sage: from sage.combinat.designs.difference_family import supplementary_difference_set - sage: supplementary_difference_set(17) #random + sage: from sage.combinat.designs.difference_family import supplementary_difference_set_from_rel_diff_set + sage: supplementary_difference_set_from_rel_diff_set(17) #random ([0, 2, 5, 6, 8, 10, 13, 14], [0, 1, 2, 6, 7, 9, 10, 14, 15], [0, 1, 2, 6, 11, 12, 13, 15], @@ -1691,31 +1691,31 @@ def supplementary_difference_set(q, existence=False, check=True): If existence is ``True``, the function returns a boolean:: - sage: supplementary_difference_set(7, existence=True) + sage: supplementary_difference_set_from_rel_diff_set(7, existence=True) False - sage: supplementary_difference_set(17, existence=True) + sage: supplementary_difference_set_from_rel_diff_set(17, existence=True) True TESTS:: sage: from sage.combinat.designs.difference_family import is_supplementary_difference_set - sage: is_supplementary_difference_set(supplementary_difference_set(17), 16, 16) + sage: is_supplementary_difference_set(supplementary_difference_set_from_rel_diff_set(17), 16, 16) True - sage: is_supplementary_difference_set(supplementary_difference_set(9), 8, 8) + sage: is_supplementary_difference_set(supplementary_difference_set_from_rel_diff_set(9), 8, 8) True - sage: supplementary_difference_set(7) + sage: supplementary_difference_set_from_rel_diff_set(7) Traceback (most recent call last): ... ValueError: There is no s for which m-1 is an odd prime power - sage: supplementary_difference_set(8) + sage: supplementary_difference_set_from_rel_diff_set(8) Traceback (most recent call last): ... ValueError: q must be an odd prime power - sage: supplementary_difference_set(8, existence=True) + sage: supplementary_difference_set_from_rel_diff_set(8, existence=True) False - sage: supplementary_difference_set(7, existence=True) + sage: supplementary_difference_set_from_rel_diff_set(7, existence=True) False - sage: supplementary_difference_set(1, existence=True) + sage: supplementary_difference_set_from_rel_diff_set(1, existence=True) False .. SEEALSO:: diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 5f4c829684d..2a2681e98fb 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -1170,7 +1170,7 @@ def hadamard_matrix_spence_construction(n, existence=False, check=True): r"""Create an Hadamard matrix of order `n` using Spence construction. This construction (detailed in [Spe1975]_), uses supplementary difference sets implemented in - :func:`sage.combinat.designs.difference_family.supplementary_difference_set` to create the + :func:`sage.combinat.designs.difference_family.supplementary_difference_set_from_rel_diff_set` to create the desired matrix. INPUT: @@ -1217,19 +1217,19 @@ def hadamard_matrix_spence_construction(n, existence=False, check=True): ... AssertionError """ - from sage.combinat.designs.difference_family import supplementary_difference_set + from sage.combinat.designs.difference_family import supplementary_difference_set_from_rel_diff_set assert n % 4 == 0 and n > 0 q = n//4 if existence: - return supplementary_difference_set(q, existence=True) + return supplementary_difference_set_from_rel_diff_set(q, existence=True) - if not supplementary_difference_set(q, existence=True): + if not supplementary_difference_set_from_rel_diff_set(q, existence=True): raise ValueError(f'The order {n} is not covered by Spence construction.') - S1, S2, S3, S4 = supplementary_difference_set(q, check=False) + S1, S2, S3, S4 = supplementary_difference_set_from_rel_diff_set(q, check=False) A1 = matrix.circulant([1 if j in S1 else -1 for j in range(q-1)]) A2 = matrix.circulant([1 if j in S4 else -1 for j in range(q-1)]) From 2ee94365ac2cb77ed039409e5f0f31441af8dd99 Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 12:10:26 +0000 Subject: [PATCH 484/751] Extract construction of sds --- .../combinat/designs/difference_family.py | 106 +++++++++++++++--- 1 file changed, 91 insertions(+), 15 deletions(-) diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index 53e03023947..4a4e6c09156 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -1629,7 +1629,7 @@ def is_supplementary_difference_set(Ks, v, lmbda): .. SEEALSO:: - :func:`supplementary_difference_set` + :func:`supplementary_difference_set_from_rel_diff_set` """ from sage.groups.additive_abelian.additive_abelian_group import AdditiveAbelianGroup @@ -1823,7 +1823,7 @@ def get_fixed_relative_difference_set(rel_diff_set, as_elements=False): `\{td | d\in R\}= R`. In addition, the set returned by this function will contain the element `0`. This is needed in the - construction of supplementary difference sets (see :func:`supplementary_difference_set`). + construction of supplementary difference sets (see :func:`supplementary_difference_set_from_rel_diff_set`). INPUT: @@ -2155,6 +2155,88 @@ def skew_supplementary_difference_set(n, existence=False, check=True): 267: [1, 4, 16, 64, 67, 91, 97, 121, 217, 223, 256], } + if existence: + return n in indices + + if n not in indices: + raise ValueError(f'Skew SDS of order {n} not yet implemented.') + + S1, S2, S3, S4 = _construction_supplementary_difference_set(n, H_db[n], indices[n], cosets_gens[n], check=False) + + if check: + lmbda = len(S1) + len(S2) + len(S3) + len(S4) - n + assert is_supplementary_difference_set([S1, S2, S3, S4], n, lmbda) + assert _is_skew_set(S1, n) + + return S1, S2, S3, S4 + + +def _construction_supplementary_difference_set(n, H, indices, cosets_gen, check=True): + r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where `n_1 + n_2 + n_3 + n_4 = n+\lambda`. + + This construction is described in [Djo1994]_. + + Let H be a subgroup of Zmod(n) of order `t`. We construct the `2s = n/t` cosets + `\alpha_0, .., \alpha_{2s-1}` by using the elements contained in a sequence `A`: + `\alpha_{2i} = a_iH` and `\alpha_{2i+1} = -\alpha_{2i}`. + + Then, we use four indices sets `J_1, J_2, J_3, J_4` to construct the four + supplementary difference sets: `S_i = \bigcup_{j\in J__i} \alpha_i`. Note that + if `J_i` contains the value `-1`, this function will add `0` to the set `S_i`. + + To construct a coset `\alpha_{2i}` by listing it directly, replace the `2i`-th + element of the list `A` with the desired set. + + INPUT: + + - ``n`` -- integer, the parameter of the supplementary difference set. + + - ``H`` -- list of integers, the set `H` used to construct the cosets. + + - ``indices`` -- list containing four list of integers, which are the sets + `J_1, J_2, J_3, J_4` described above. + + - ``cosets_gen`` -- list containing integers or list of integers, is the set `A` + described above. + + - ``check`` -- boolean (default True). If true, check that the sets + are supplementary difference sets. Setting this parameter to False may speed + up the computation considerably. + + OUTPUT: + + The function returns the 4 sets (containing integers modulo `n`). + + TESTS:: + + sage: from sage.combinat.designs.difference_family import is_supplementary_difference_set, _construction_supplementary_difference_set + sage: H = [1, 10, -11] + sage: cosets_gen = [1, 2, 3, 5, 6, 9] + sage: indices = [[0, 3, 5, 7, 9, 10], [0, 5, 6, 7, 8], [1, 2, 6, 7, 9], [2, 6, 8, 9, 10]] + sage: _construction_supplementary_difference_set(37, H, indices, cosets_gen) + ([1, 10, 26, 35, 17, 22, 34, 7, 33, 32, 24, 18, 31, 14, 29, 9, 16, 12], + [1, 10, 26, 34, 7, 33, 5, 13, 19, 32, 24, 18, 6, 23, 8], + [36, 27, 11, 2, 20, 15, 5, 13, 19, 32, 24, 18, 31, 14, 29], + [2, 20, 15, 5, 13, 19, 6, 23, 8, 31, 14, 29, 9, 16, 12]) + sage: H = [1, 16, 22] + sage: cosets_gen = [1, 2, 3, 4, 6, 8, [13]] + sage: indices = [[1, 3, 5, 6, 8, 10, 12], [0, 1, 5, 8, 12, 13], [1, 3, 4, 7, 9, 12, 13], [0, 1, 2, 3, 7, 8]] + sage: _construction_supplementary_difference_set(39, H, indices, cosets_gen) + ([38, 23, 17, 37, 7, 34, 36, 30, 12, 4, 25, 10, 6, 18, 15, 8, 11, 20, 13], + [1, 16, 22, 38, 23, 17, 36, 30, 12, 6, 18, 15, 13, 26], + [38, 23, 17, 37, 7, 34, 3, 9, 27, 35, 14, 29, 33, 21, 24, 13, 26], + [1, 16, 22, 38, 23, 17, 2, 32, 5, 37, 7, 34, 35, 14, 29, 6, 18, 15]) + sage: H = [1, 4, 11, 16, 21, -2, -8] + sage: cosets_gen = [1, 3, 7] + sage: indices = [[1, 2, 4], [1, 2, 4], [0, 2, 3], [3, 4, -1]] + sage: sets = _construction_supplementary_difference_set(43, H, indices, cosets_gen, check=False) + sage: is_supplementary_difference_set(sets, 43, 35) + True + + .. SEEALSO:: + + :func:`skew_supplementary_difference_set` + """ def generate_set(index_set, cosets): S = [] for idx in index_set: @@ -2164,17 +2246,11 @@ def generate_set(index_set, cosets): S += cosets[idx] return S - if existence: - return n in indices - - if n not in indices: - raise ValueError(f'Skew SDS of order {n} not yet implemented.') - Z = Zmod(n) - H = list(map(Z, H_db[n])) + H = list(map(Z, H)) cosets = [] - for el in cosets_gens[n]: + for el in cosets_gen: if isinstance(el, list): even_coset = [Z(x) for x in el] else: @@ -2183,18 +2259,18 @@ def generate_set(index_set, cosets): cosets.append(even_coset) cosets.append(odd_coset) - S1 = generate_set(indices[n][0], cosets) - S2 = generate_set(indices[n][1], cosets) - S3 = generate_set(indices[n][2], cosets) - S4 = generate_set(indices[n][3], cosets) + S1 = generate_set(indices[0], cosets) + S2 = generate_set(indices[1], cosets) + S3 = generate_set(indices[2], cosets) + S4 = generate_set(indices[3], cosets) if check: lmbda = len(S1) + len(S2) + len(S3) + len(S4) - n assert is_supplementary_difference_set([S1, S2, S3, S4], n, lmbda) - assert _is_skew_set(S1, n) return S1, S2, S3, S4 + def _is_skew_set(S, n): r"""Check if `S` is a skew set over the set of integers modulo `n`. From 49ee5c7f820dd45e38c44c549c6e710b7d18643c Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 12:46:15 +0000 Subject: [PATCH 485/751] Add construction for SDS --- src/doc/en/reference/references/index.rst | 12 +- .../combinat/designs/difference_family.py | 106 +++++++++++++++++- src/sage/combinat/matrices/hadamard_matrix.py | 2 +- 3 files changed, 113 insertions(+), 7 deletions(-) diff --git a/src/doc/en/reference/references/index.rst b/src/doc/en/reference/references/index.rst index 1e218493aa9..c3e036bfe88 100644 --- a/src/doc/en/reference/references/index.rst +++ b/src/doc/en/reference/references/index.rst @@ -2060,10 +2060,15 @@ REFERENCES: *Ten New Orders for Hadamard Matrices of Skew Type*, Publikacije Elektrotehničkog fakulteta. Serija Matematika 2 (1992): 47-59. -.. [Djo1994] \D. Đoković. +.. [Djo1994a] \D. Đoković. *Five New Orders for Hadamard Matrices of Skew Type*, Australasian Journal of Combinatorics 10 (1994): 259-264. +.. [Djo1994b] \D. Đoković. + *Two Hadamard matrices of order 956 of Goethals-Seidel type*, + Combinatorica 14(3) (1994): 375-377. + :doi:`10.1007/BF01212983` + .. [Djo2008a] \D. Đoković. *Skew-Hadamard matrices of orders 188 and 388 exist*, International Mathematical Forum 3 no.22 (2008): 1063-1068. @@ -2074,6 +2079,11 @@ REFERENCES: Journal of Combinatorial Designs 16 (2008): 493-498. :arxiv:`0706.1973` +.. [Djo2008c] \D. Đoković. + *Hadamard matrices of order 764 exist*, + Combinatorica 28(4) (2008): 487-489. + :doi:`10.1007/s00493-008-2384-z` + .. [Djo2023a] \D. Đoković. *Skew-Hadamard matrices of order 276*. :arxiv:`10.48550/ARXIV.2301.02751` diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index 4a4e6c09156..2ff4d125650 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -1929,12 +1929,12 @@ def is_fixed_relative_difference_set(R, q): def skew_supplementary_difference_set(n, existence=False, check=True): r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where `S_1` is skew and `n_1 + n_2 + n_3 + n_4 = n+\lambda`. - These sets are constructed from available data, as described in [Djo1994]_. The set `S_1 \subset G` is + These sets are constructed from available data, as described in [Djo1994a]_. The set `S_1 \subset G` is always skew, i.e. `S_1 \cap (-S_1) = \emptyset` and `S_1 \cup (-S_1) = G \setminus \{0\}`. The data is taken from: - * `n = 103, 151`: [Djo1994]_ + * `n = 103, 151`: [Djo1994a]_ * `n = 67, 113, 127, 157, 163, 181, 241`: [Djo1992a]_ * `n = 37, 43`: [Djo1992b]_ * `n = 39, 49, 65, 93, 121, 129, 133, 217, 219, 267`: [Djo1992c]_ @@ -2174,7 +2174,7 @@ def skew_supplementary_difference_set(n, existence=False, check=True): def _construction_supplementary_difference_set(n, H, indices, cosets_gen, check=True): r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where `n_1 + n_2 + n_3 + n_4 = n+\lambda`. - This construction is described in [Djo1994]_. + This construction is described in [Djo1994a]_. Let H be a subgroup of Zmod(n) of order `t`. We construct the `2s = n/t` cosets `\alpha_0, .., \alpha_{2s-1}` by using the elements contained in a sequence `A`: @@ -2184,7 +2184,7 @@ def _construction_supplementary_difference_set(n, H, indices, cosets_gen, check= supplementary difference sets: `S_i = \bigcup_{j\in J__i} \alpha_i`. Note that if `J_i` contains the value `-1`, this function will add `0` to the set `S_i`. - To construct a coset `\alpha_{2i}` by listing it directly, replace the `2i`-th + To construct a coset `\alpha_{2i}` by listing it directly, replace the `2i`-th element of the list `A` with the desired set. INPUT: @@ -2271,10 +2271,106 @@ def generate_set(index_set, cosets): return S1, S2, S3, S4 +def supplementary_difference_set(n, existence=False, check=True): + r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where skew and `n_1 + n_2 + n_3 + n_4 = n+\lambda`. + + These sets are constructed from available data, as described in [Djo1994a]_. + + The data for `n=191` is taken from [Djo2008c]_, and date for `n=239` is from [Djo1994b]_. + Additional SDS are constructed using :func:`skew_supplementary_difference_set`. + + INPUT: + + - ``n`` -- integer, the parameter of the supplementary difference set. + + - ``existence`` -- boolean (dafault False). If true, only check whether the + supplementary difference sets can be constructed. + + - ``check`` -- boolean (default True). If true, check that the sets are + supplementary difference sets before returning them. Setting this parameter + to False may speed up the computation considerably. + + OUTPUT: + + If ``existence`` is false, the function returns the 4 sets (containing integers + modulo `n`), or raises an error if data for the given ``n`` is not available. + If ``existence`` is true, the function returns a boolean representing whether + skew supplementary difference sets can be constructed. + + EXAMPLES:: + + sage: from sage.combinat.designs.difference_family import supplementary_difference_set + sage: S1, S2, S3, S4 = supplementary_difference_set(191) + + If existence is ``True``, the function returns a boolean :: + + sage: supplementary_difference_set(191, existence=True) + True + sage: supplementary_difference_set(17, existence=True) + False + + TESTS:: + + sage: from sage.combinat.designs.difference_family import is_supplementary_difference_set + sage: S1, S2, S3, S4 = supplementary_difference_set(191, check=False) + sage: is_supplementary_difference_set([S1, S2, S3, S4], 191, len(S1)+len(S2)+len(S3)+len(S4)-191) + True + sage: S1, S2, S3, S4 = supplementary_difference_set(37, check=False) + sage: supplementary_difference_set(7) + Traceback (most recent call last): + ... + ValueError: SDS of order 7 not yet implemented. + sage: supplementary_difference_set(7, existence=True) + False + sage: supplementary_difference_set(127, existence=True) + True + """ + + indices = { + 191: [[1, 7, 9, 10, 11, 13, 17, 18, 25, 26, 30, 31, 33, 34, 35, 36, 37], + [1, 4, 7, 9, 11, 12, 13, 14, 19, 21, 22, 23, 24, 25, 26, 29, 36, 37], + [0, 3, 4, 5, 7, 8, 9, 16, 17, 19, 24, 25, 29, 30, 31, 33, 35, 37], + [1, 3, 4, 5, 8, 11, 14, 18, 19, 20, 21, 23, 24, 25, 28, 29, 30, 32, 34, 35]], + 239: [[0, 1, 2, 3, 4, 5, 6, 7, 14, 18, 19, 21, 24, 25, 29, 30], + [0, 1, 3, 7, 9, 12, 15, 18, 20, 22, 26, 28, 29, 30, 31, 32, 33], + [2, 3, 4, 5, 8, 9, 10, 11, 13, 17, 19, 21, 22, 24, 27, 31, 32], + [0, 1, 2, 3, 6, 7, 8, 11, 13, 15, 17, 18, 19, 22, 25, 26, 27, 32, 33]], + } + + cosets_gens = { + 191: [1, 2, 3, 4, 6, 8, 9, 11, 12, 13, 16, 17, 18, 19, 22, 32, 36, 38, 41], + 239: [1, 2, 3, 4, 5, 6, 7, 8, 9, 13, 14, 15, 18, 21, 28, 35, 42], + } + + H_db = { + 191: [1, 39, 184, 109, 49], + 239: [1, 10, 24, 44, 98, 100, 201], + } + + if existence: + return n in indices or skew_supplementary_difference_set(n, existence=True) + + sets = None + if n in indices: + sets = _construction_supplementary_difference_set(n, H_db[n], indices[n], cosets_gens[n], check=False) + elif skew_supplementary_difference_set(n, existence=True): + sets = skew_supplementary_difference_set(n, check=False) + + if sets is None: + raise ValueError(f'SDS of order {n} not yet implemented.') + + S1, S2, S3, S4 = sets + if check: + lmbda = len(S1) + len(S2) + len(S3) + len(S4) - n + assert is_supplementary_difference_set([S1, S2, S3, S4], n, lmbda) + + return S1, S2, S3, S4 + + def _is_skew_set(S, n): r"""Check if `S` is a skew set over the set of integers modulo `n`. - From [Djo1994]_, a set `S \subset G` (where `G` is a finite abelian group of order `n`) is of skew + From [Djo1994a]_, a set `S \subset G` (where `G` is a finite abelian group of order `n`) is of skew type if `S_1 \cap (-S_1) = \emptyset` and `S_1 \cup (-S_1) = G\setminus \{0\}`. INPUT: diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 2a2681e98fb..9bf4a94a843 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -2298,7 +2298,7 @@ def skew_hadamard_matrix_324(): r""" Construct a skew Hadamard matrix of order 324. - The construction is taken from [Djo1994]_. It uses four supplementary difference sets `S_1, S_2, S_3, S_4`, + The construction is taken from [Djo1994a]_. It uses four supplementary difference sets `S_1, S_2, S_3, S_4`, with `S_1` of skew type. These are then used to generate four matrices of order `81`, which are inserted into the Goethals-Seidel array. From 383a1b9c3c0533d967722d165b07f0ef671139f7 Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 13:34:58 +0000 Subject: [PATCH 486/751] Add construction for hadamard matrix from sds --- src/sage/combinat/matrices/hadamard_matrix.py | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 9bf4a94a843..3e11e656ce9 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -775,6 +775,92 @@ def _construction_goethals_seidel_matrix(A, B, C, D): [-D*R, -C.T*R, B.T*R, A]]) +def hadamard_matrix_from_sds(n, existence=False, check=True): + r"""Construction of Hadamard matrices from supplementary difference sets. + + Given four SDS with parameters `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` with + `n_1 + n_2 + n_3 + n_4 = n+\lambda` we can construct four (-1,+1) sequences `a_i = (a_{i,0},...,a_{i,n-1})` + where `a_{i,j} = -1` iff `j \in S_i`. This will be the fist rows of four circulant + matrices `A_1, A_2, A_3, A_4` which, when plugged into the Goethals-Seidel array, create an + Hadamard matrix of order `4n` (see [Djo1994b]_). + + The supplementary difference sets are taken from + :func:`sage.combinat.designs.difference_family.supplementary_difference_set`. + + INPUT: + + - ``n`` -- integer, the order of the matrix to be constructed. + + - ``check`` -- boolean: if True (default), check the the matrix is a Hadamard + before returning. + + - ``existence`` -- boolean (default False): if True, only check if the matrix exists. + + OUTPUT: + + If ``existence`` is false, returns the Hadamard matrix of order `n`. It raises + an error if no data is available to construct the matrix of the given order, + or if `n` is not a multiple of `4`. + If ``existence`` is true, returns a boolean representing whether the matrix + can be constructed or not. + + EXAMPLES: + + By default The function returns the Hadamard matrix :: + + sage: from sage.combinat.matrices.hadamard_matrix import hadamard_matrix_from_sds + sage: hadamard_matrix_from_sds(148) + 148 x 148 dense matrix over Integer Ring... + + If ``existence`` is set to True, the function returns a boolean :: + + sage: hadamard_matrix_from_sds(764, existence=True) + True + + TESTS:: + + sage: from sage.combinat.matrices.hadamard_matrix import hadamard_matrix_from_sds, is_hadamard_matrix + sage: is_hadamard_matrix(hadamard_matrix_from_sds(172)) + True + sage: hadamard_matrix_from_sds(64, existence=True) + False + sage: hadamard_matrix_from_sds(64) + Traceback (most recent call last): + ... + ValueError: SDS of order 16 not yet implemented. + sage: hadamard_matrix_from_sds(14) + Traceback (most recent call last): + ... + ValueError: n must be a positive multiple of four. + """ + from sage.combinat.designs.difference_family import supplementary_difference_set + + if n <= 0 or n % 4 != 0: + raise ValueError(f'n must be a positive multiple of four.') + t = n // 4 + + if existence: + return supplementary_difference_set(t, existence=True) + + S1, S2, S3, S4 = supplementary_difference_set(t, check=False) + a = [-1 if i in S1 else 1 for i in range(t)] + b = [-1 if i in S2 else 1 for i in range(t)] + c = [-1 if i in S3 else 1 for i in range(t)] + d = [-1 if i in S4 else 1 for i in range(t)] + + if n == 956: + a, b, c, d = [-el for el in d], a, b, c + + A, B, C, D = map(matrix.circulant, [a, b, c, d]) + if check: + assert A*A.T+B*B.T+C*C.T+D*D.T == 4*t*I(t) + + H = _construction_goethals_seidel_matrix(A, B, C, D) + if check: + assert is_hadamard_matrix(H) + return H + + def hadamard_matrix_cooper_wallis_construction(x1, x2, x3, x4, A, B, C, D, check=True): r""" Create an Hadamard matrix using the contruction detailed in [CW1972]_. @@ -1538,6 +1624,10 @@ def hadamard_matrix(n, existence=False, check=True): if existence: return True M = turyn_type_hadamard_matrix_smallcases(n, check=False) + elif hadamard_matrix_from_sds(n, existence=True): + if existence: + return True + M = hadamard_matrix_from_sds(n, check=False) elif hadamard_matrix_spence_construction(n, existence=True): if existence: return True From 8901eb6da0486ec99d1afebcd956fc8bc47be87a Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 18:27:59 +0000 Subject: [PATCH 487/751] Create function to construct symmetric conference matrices --- src/sage/combinat/matrices/hadamard_matrix.py | 62 +++++++++++++++---- 1 file changed, 51 insertions(+), 11 deletions(-) diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 3e11e656ce9..6dcf34767ab 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -179,6 +179,56 @@ def hadamard_matrix_paleyI(n, normalize=True): return H +def symmetric_conference_matrix_paley(n): + r""" + Construct a symmetric conference matrix of order n. + + A conference matrix is an `n\times n` matrix `C` with 0s on the main diagonal + and 1s and -1s elsewhere, satisfying `CC^\top=(n-1)I`. This construction assumes + that `q = n-1` is a prime power, with `q \cong 1 \mod 4`. See [Hora]_ or [Lon2013]_. + + These matrices are used in the :func:`hadamard_matrix_paleyII`. + + INPUT: + + - ``n`` -- integer, the order of the symmetric conference matrix to consruct. + + EXAMPLES:: + + sage: from sage.combinat.matrices.hadamard_matrix import symmetric_conference_matrix_paley + sage: symmetric_conference_matrix_paley(6) + [ 0 1 1 1 1 1] + [ 1 0 1 -1 -1 1] + [ 1 1 0 1 -1 -1] + [ 1 -1 1 0 1 -1] + [ 1 -1 -1 1 0 1] + [ 1 1 -1 -1 1 0] + + TESTS:: + + sage: symmetric_conference_matrix_paley(5) + Traceback (most recent call last): + ... + ValueError: The order 5 is not covered by Paley construction of symmetric conference matrices. + """ + q = n - 1 + if not (is_prime_power(q) and (q % 4 == 1)): + raise ValueError("The order %s is not covered by Paley construction of symmetric conference matrices." % n) + + from sage.rings.finite_rings.finite_field_constructor import FiniteField + K = FiniteField(q, 'x') + K_list = list(K) + K_list.insert(0, K.zero()) + H = matrix(ZZ, [[(1 if (x-y).is_square() else -1) + for x in K_list] + for y in K_list]) + for i in range(n): + H[0, i] = 1 + H[i, 0] = 1 + H[i, i] = 0 + return H + + def hadamard_matrix_paleyII(n): r""" Implement the Paley type II construction. @@ -226,17 +276,7 @@ def hadamard_matrix_paleyII(n): if not (n % 2 == 0 and is_prime_power(q) and (q % 4 == 1)): raise ValueError("The order %s is not covered by the Paley type II construction." % n) - from sage.rings.finite_rings.finite_field_constructor import FiniteField - K = FiniteField(q, 'x') - K_list = list(K) - K_list.insert(0, K.zero()) - H = matrix(ZZ, [[(1 if (x-y).is_square() else -1) - for x in K_list] - for y in K_list]) - for i in range(q+1): - H[0, i] = 1 - H[i, 0] = 1 - H[i, i] = 0 + H = symmetric_conference_matrix_paley(q+1) tr = { 0: matrix(2, 2, [ 1, -1, -1, -1]), 1: matrix(2, 2, [ 1, 1, 1, -1]), From ed7a93933c24f8b2a1d6c9759fd62b9b4b9d521c Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Fri, 27 Jan 2023 19:23:12 +0000 Subject: [PATCH 488/751] Add miyamoto construction --- src/doc/en/reference/references/index.rst | 5 + src/sage/combinat/matrices/hadamard_matrix.py | 112 ++++++++++++++++++ 2 files changed, 117 insertions(+) diff --git a/src/doc/en/reference/references/index.rst b/src/doc/en/reference/references/index.rst index c3e036bfe88..70dda6c3940 100644 --- a/src/doc/en/reference/references/index.rst +++ b/src/doc/en/reference/references/index.rst @@ -4508,6 +4508,11 @@ REFERENCES: .. [Mit2008] \A. Mitra. *On the construction of M-sequences via primitive polynomials with a fast identification method*, International Journal of Electronics and Communication Engineering 2(9) (2008): 1991-1996. +.. [Miy1991] \M. Miyamoto. + *A construction of Hadamard matrices*, + Journal of Combinatorial Theory, Series A 57(1) (1991): 86-108. + :doi:`10.1016/0097-3165(91)90008-5` + .. [MKO1998] Hans Munthe--Kaas and Brynjulf Owren. *Computations in a free Lie algebra*. (1998). `Downloadable from Munthe-Kaas's website diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 6dcf34767ab..8078f9cecae 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -287,6 +287,114 @@ def hadamard_matrix_paleyII(n): return normalise_hadamard(H) +def hadamard_matrix_miyamoto_construction(n, existence=False, check=True): + r""" + Construct Hadamard matrix using Miyamoto construction. + + If `q = n/4` is a prime power, and there exists an Hadamard matrix of order + `q-1`, then a Hadamard matrix of order `n` can be constructed (see [Miy1991]_). + + INPUT: + + - ``n`` -- integer, the order of the matrix to be constructed. + + - ``check`` -- boolean: if True (default), check the the matrix is a Hadamard + before returning. + + - ``existence`` -- boolean (default False): if True, only check if the matrix exists. + + OUTPUT: + + If ``existence`` is false, returns the Hadamard matrix of order `n`. It raises + an error if no data is available to construct the matrix of the given order, + or if `n` is not a multiple of `4`. + If ``existence`` is true, returns a boolean representing whether the matrix + can be constructed or not. + + EXAMPLES: + + By default the function returns the Hadamard matrix :: + + sage: from sage.combinat.matrices.hadamard_matrix import hadamard_matrix_miyamoto_construction + sage: hadamard_matrix_miyamoto_construction(20) + 20 x 20 dense matrix over Integer Ring... + + If ``existence`` is set to True, the function returns a boolean :: + + sage: hadamard_matrix_miyamoto_construction(36, existence=True) + True + + TESTS:: + + sage: from sage.combinat.matrices.hadamard_matrix import is_hadamard_matrix + sage: is_hadamard_matrix(hadamard_matrix_miyamoto_construction(68, check=False)) + True + sage: hadamard_matrix_miyamoto_construction(64, existence=True) + False + sage: hadamard_matrix_miyamoto_construction(64) + Traceback (most recent call last): + ... + ValueError: The order 64 is not covered by Miyamoto construction. + sage: hadamard_matrix_miyamoto_construction(14) + Traceback (most recent call last): + ... + ValueError: No Hadamard matrix of order 14 exists. + """ + if n < 0 or n % 4 != 0: + raise ValueError(f'No Hadamard matrix of order {n} exists.') + + q = n // 4 + if existence: + return is_prime_power(q) and q % 4 == 1 and hadamard_matrix(q-1, existence=True) + + if not (is_prime_power(q) and q % 4 == 1 and hadamard_matrix(q-1, existence=True)): + raise ValueError(f'The order {n} is not covered by Miyamoto construction.') + + m = (q-1) // 2 + + C = symmetric_conference_matrix_paley(q + 1) + + neg = [i for i in range(2, m+2) if C[1, i] == -1] + pos = [i for i in range(m+2, 2*m+2) if C[1, i] == 1] + + for i, j in zip(neg, pos): + C.swap_rows(i, j) + C.swap_columns(i, j) + + C1 = -C.submatrix(row=2, col=2, nrows=m, ncols=m) + C2 = C.submatrix(row=2, col=m+2, nrows=m, ncols=m) + C4 = C.submatrix(row=m+2, col=m+2, nrows=m, ncols=m) + + K = hadamard_matrix(q - 1) + K1 = K.submatrix(row=0, col=0, nrows=(q-1)//2, ncols=(q-1)//2) + K2 = K.submatrix(row=0, col=(q-1)//2, nrows=(q-1)//2, ncols=(q-1)//2) + K3 = -K.submatrix(row=(q-1)//2, col=0, nrows=(q-1)//2, ncols=(q-1)//2) + K4 = K.submatrix(row=(q-1)//2, col=(q-1)//2, nrows=(q-1)//2, ncols=(q-1)//2) + + Zr = zero_matrix(m) + Us = [[C1, C2, Zr, Zr], [C2.T, C4, Zr, Zr], [Zr, Zr, C1, C2], [Zr, Zr, C2.T, C4]] + Vs = [[I(m), Zr, K1, K2], [Zr, I(m), K3, K4], [K1.T, K3.T, I(m), Zr], [K2.T, K4.T, Zr, I(m)]] + + def T(i, j): + return block_matrix([[Us[i][j]+Vs[i][j], Us[i][j]-Vs[i][j]], + [Us[i][j]-Vs[i][j], Us[i][j]+Vs[i][j]]]) + + e = matrix([[1] * (2*m)]) + one = matrix([1]) + H = block_matrix([[ one, -e, one, e, one, e, one, e], + [-e.T, T(0, 0), e.T, T(0, 1), e.T, T(0, 2), e.T, T(0, 3)], + [-one, -e, one, -e, one, e, -one, -e], + [-e.T, -T(1, 0), -e.T, T(1, 1), e.T, T(1, 2), -e.T, -T(1, 3)], + [-one, -e, -one, -e, one, -e, one, e], + [-e.T, -T(2, 0), -e.T, -T(2, 1), -e.T, T(2, 2), e.T, T(2, 3)], + [-one, -e, one, e, -one, -e, one, -e], + [-e.T, -T(3, 0), e.T, T(3, 1), -e.T, -T(3, 2), -e.T, T(3, 3)]]) + + if check: + assert is_hadamard_matrix(H) + return H + + def hadamard_matrix_williamson_type(a, b, c, d, check=True): r""" Construction of Williamson type Hadamard matrix. @@ -1664,6 +1772,10 @@ def hadamard_matrix(n, existence=False, check=True): if existence: return True M = turyn_type_hadamard_matrix_smallcases(n, check=False) + elif hadamard_matrix_miyamoto_construction(n, existence=True): + if existence: + return True + M = hadamard_matrix_miyamoto_construction(n, check=False) elif hadamard_matrix_from_sds(n, existence=True): if existence: return True From da46f5813237f8b9c68b1cc1b8b86af15484f340 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Sun, 12 Feb 2023 17:39:59 +0000 Subject: [PATCH 489/751] tagged tests at long time --- src/sage/combinat/designs/difference_family.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index 2ff4d125650..3afad208d7c 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -2300,7 +2300,7 @@ def supplementary_difference_set(n, existence=False, check=True): EXAMPLES:: sage: from sage.combinat.designs.difference_family import supplementary_difference_set - sage: S1, S2, S3, S4 = supplementary_difference_set(191) + sage: S1, S2, S3, S4 = supplementary_difference_set(191) # long time If existence is ``True``, the function returns a boolean :: @@ -2313,7 +2313,7 @@ def supplementary_difference_set(n, existence=False, check=True): sage: from sage.combinat.designs.difference_family import is_supplementary_difference_set sage: S1, S2, S3, S4 = supplementary_difference_set(191, check=False) - sage: is_supplementary_difference_set([S1, S2, S3, S4], 191, len(S1)+len(S2)+len(S3)+len(S4)-191) + sage: is_supplementary_difference_set([S1, S2, S3, S4], 191, len(S1)+len(S2)+len(S3)+len(S4)-191) # long time True sage: S1, S2, S3, S4 = supplementary_difference_set(37, check=False) sage: supplementary_difference_set(7) From f1f11cc4651291499a1d54e3f7271a2f1c24cad6 Mon Sep 17 00:00:00 2001 From: Matteo Cati Date: Mon, 13 Feb 2023 15:44:29 +0000 Subject: [PATCH 490/751] Fix docstrings --- src/sage/combinat/designs/difference_family.py | 6 +++--- src/sage/combinat/matrices/hadamard_matrix.py | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index 3afad208d7c..90df86e3e41 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -2272,18 +2272,18 @@ def generate_set(index_set, cosets): def supplementary_difference_set(n, existence=False, check=True): - r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where skew and `n_1 + n_2 + n_3 + n_4 = n+\lambda`. + r"""Construct `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` supplementary difference sets where `n_1 + n_2 + n_3 + n_4 = n+\lambda`. These sets are constructed from available data, as described in [Djo1994a]_. - The data for `n=191` is taken from [Djo2008c]_, and date for `n=239` is from [Djo1994b]_. + The data for `n=191` is taken from [Djo2008c]_, and data for `n=239` is from [Djo1994b]_. Additional SDS are constructed using :func:`skew_supplementary_difference_set`. INPUT: - ``n`` -- integer, the parameter of the supplementary difference set. - - ``existence`` -- boolean (dafault False). If true, only check whether the + - ``existence`` -- boolean (default False). If true, only check whether the supplementary difference sets can be constructed. - ``check`` -- boolean (default True). If true, check that the sets are diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 8078f9cecae..0434d20d8c2 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -187,7 +187,7 @@ def symmetric_conference_matrix_paley(n): and 1s and -1s elsewhere, satisfying `CC^\top=(n-1)I`. This construction assumes that `q = n-1` is a prime power, with `q \cong 1 \mod 4`. See [Hora]_ or [Lon2013]_. - These matrices are used in the :func:`hadamard_matrix_paleyII`. + These matrices are used in :func:`hadamard_matrix_paleyII`. INPUT: @@ -307,7 +307,7 @@ def hadamard_matrix_miyamoto_construction(n, existence=False, check=True): If ``existence`` is false, returns the Hadamard matrix of order `n`. It raises an error if no data is available to construct the matrix of the given order, - or if `n` is not a multiple of `4`. + or if `n` does not satisfies the constraints. If ``existence`` is true, returns a boolean representing whether the matrix can be constructed or not. @@ -345,7 +345,7 @@ def hadamard_matrix_miyamoto_construction(n, existence=False, check=True): q = n // 4 if existence: - return is_prime_power(q) and q % 4 == 1 and hadamard_matrix(q-1, existence=True) + return is_prime_power(q) and q % 4 == 1 and hadamard_matrix(q-1, existence=True) is True if not (is_prime_power(q) and q % 4 == 1 and hadamard_matrix(q-1, existence=True)): raise ValueError(f'The order {n} is not covered by Miyamoto construction.') @@ -928,7 +928,7 @@ def hadamard_matrix_from_sds(n, existence=False, check=True): Given four SDS with parameters `4-\{n; n_1, n_2, n_3, n_4; \lambda\}` with `n_1 + n_2 + n_3 + n_4 = n+\lambda` we can construct four (-1,+1) sequences `a_i = (a_{i,0},...,a_{i,n-1})` - where `a_{i,j} = -1` iff `j \in S_i`. This will be the fist rows of four circulant + where `a_{i,j} = -1` iff `j \in S_i`. These will be the fist rows of four circulant matrices `A_1, A_2, A_3, A_4` which, when plugged into the Goethals-Seidel array, create an Hadamard matrix of order `4n` (see [Djo1994b]_). From d3618f1a4a4597471059023e2301958947a72c94 Mon Sep 17 00:00:00 2001 From: dcoudert Date: Wed, 15 Feb 2023 23:24:46 +0100 Subject: [PATCH 491/751] #33255: trailing whitespaces in bipartite_graph.py --- src/sage/graphs/bipartite_graph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/graphs/bipartite_graph.py b/src/sage/graphs/bipartite_graph.py index 0e304aedd65..d4abf9aa747 100644 --- a/src/sage/graphs/bipartite_graph.py +++ b/src/sage/graphs/bipartite_graph.py @@ -594,7 +594,7 @@ def __hash__(self): use_labels = self._use_labels_for_hash() edge_items = self.edge_iterator(labels=use_labels) if self.allows_multiple_edges(): - from collections import Counter + from collections import Counter edge_items = Counter(edge_items).items() return hash((frozenset(self.left), frozenset(self.right), frozenset(edge_items))) From 29ad54e19521db0c0f14283f03dec47dea6d6e03 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 16 Feb 2023 10:16:40 -0800 Subject: [PATCH 492/751] Replace relative imports by absolute imports because pytest --- src/sage/combinat/partition_algebra.py | 11 ++++---- src/sage/combinat/permutation.py | 19 ++++++------- src/sage/combinat/sf/elementary.py | 3 +- src/sage/combinat/sf/homogeneous.py | 3 +- src/sage/combinat/similarity_class_type.py | 8 ++---- src/sage/combinat/species/cycle_species.py | 8 ++---- src/sage/combinat/tableau.py | 32 +++++++++++----------- src/sage/combinat/words/lyndon_word.py | 5 ++-- 8 files changed, 40 insertions(+), 49 deletions(-) diff --git a/src/sage/combinat/partition_algebra.py b/src/sage/combinat/partition_algebra.py index 2b5ab365f6e..9136b682c59 100644 --- a/src/sage/combinat/partition_algebra.py +++ b/src/sage/combinat/partition_algebra.py @@ -17,18 +17,17 @@ # **************************************************************************** from sage.arith.misc import binomial, factorial from sage.categories.algebras_with_basis import AlgebrasWithBasis +from sage.combinat.combinat import catalan_number +from sage.combinat.free_module import CombinatorialFreeModule +from sage.combinat.permutation import Permutations +from sage.combinat.set_partition import SetPartition, SetPartitions, SetPartitions_set +from sage.combinat.subset import Subsets from sage.functions.all import ceil from sage.graphs.graph import Graph from sage.rings.integer_ring import ZZ from sage.rings.rational_field import QQ from sage.sets.set import Set, Set_generic -from .combinat import catalan_number -from .free_module import CombinatorialFreeModule -from .permutation import Permutations -from .set_partition import SetPartition, SetPartitions, SetPartitions_set -from .subset import Subsets - def _int_or_half_int(k): r""" diff --git a/src/sage/combinat/permutation.py b/src/sage/combinat/permutation.py index fb780da0e2c..a483d63200f 100644 --- a/src/sage/combinat/permutation.py +++ b/src/sage/combinat/permutation.py @@ -247,6 +247,15 @@ from sage.categories.finite_weyl_groups import FiniteWeylGroups from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets from sage.categories.sets_with_grading import SetsWithGrading +from sage.combinat.backtrack import GenericBacktracker +from sage.combinat.combinat import CombinatorialElement, catalan_number +from sage.combinat.combinatorial_map import combinatorial_map +from sage.combinat.composition import Composition +from sage.combinat.permutation_cython import (left_action_product, right_action_product, + left_action_same_n, right_action_same_n, + map_to_list, next_perm) +from sage.combinat.rsk import RSK, RSK_inverse +from sage.combinat.tools import transitive_ideal from sage.graphs.digraph import DiGraph from sage.groups.perm_gps.permgroup_element import PermutationGroupElement from sage.groups.perm_gps.permgroup_named import SymmetricGroup @@ -262,16 +271,6 @@ from sage.structure.parent import Parent from sage.structure.unique_representation import UniqueRepresentation -from .backtrack import GenericBacktracker -from .combinat import CombinatorialElement, catalan_number -from .combinatorial_map import combinatorial_map -from .composition import Composition -from .permutation_cython import (left_action_product, right_action_product, - left_action_same_n, right_action_same_n, - map_to_list, next_perm) -from .rsk import RSK, RSK_inverse -from .tools import transitive_ideal - class Permutation(CombinatorialElement): r""" diff --git a/src/sage/combinat/sf/elementary.py b/src/sage/combinat/sf/elementary.py index b9b7eaee976..8d242f55b84 100644 --- a/src/sage/combinat/sf/elementary.py +++ b/src/sage/combinat/sf/elementary.py @@ -19,11 +19,10 @@ #***************************************************************************** from sage.arith.misc import binomial, factorial from sage.combinat.partition import Partition +from sage.combinat.sf import multiplicative, classical from sage.misc.misc_c import prod from sage.rings.infinity import infinity -from . import multiplicative, classical - ################################### # # diff --git a/src/sage/combinat/sf/homogeneous.py b/src/sage/combinat/sf/homogeneous.py index 26a4df3ee14..b97bfae074c 100644 --- a/src/sage/combinat/sf/homogeneous.py +++ b/src/sage/combinat/sf/homogeneous.py @@ -27,11 +27,10 @@ #################################### from sage.arith.misc import binomial, factorial from sage.combinat.partition import Partition +from sage.combinat.sf import multiplicative, classical from sage.misc.misc_c import prod from sage.rings.infinity import infinity -from . import multiplicative, classical - class SymmetricFunctionAlgebra_homogeneous(multiplicative.SymmetricFunctionAlgebra_multiplicative): def __init__(self, Sym): diff --git a/src/sage/combinat/similarity_class_type.py b/src/sage/combinat/similarity_class_type.py index 23692c87da1..923dc64cb0d 100644 --- a/src/sage/combinat/similarity_class_type.py +++ b/src/sage/combinat/similarity_class_type.py @@ -192,6 +192,9 @@ class type, it is also possible to compute the number of classes of that type from sage.arith.misc import divisors, factorial, moebius from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets +from sage.combinat.combinat import CombinatorialElement +from sage.combinat.misc import IterableFunctionCall +from sage.combinat.partition import Partitions, Partition from sage.misc.cachefunc import cached_in_parent_method, cached_function from sage.misc.inherit_comparison import InheritComparisonClasscallMetaclass from sage.misc.misc_c import prod @@ -203,11 +206,6 @@ class type, it is also possible to compute the number of classes of that type from sage.structure.parent import Parent from sage.structure.unique_representation import UniqueRepresentation -from .combinat import CombinatorialElement -from .misc import IterableFunctionCall -from .partition import Partitions, Partition - - @cached_function def fq(n, q=None): diff --git a/src/sage/combinat/species/cycle_species.py b/src/sage/combinat/species/cycle_species.py index f4c8b24201d..20d89a770db 100644 --- a/src/sage/combinat/species/cycle_species.py +++ b/src/sage/combinat/species/cycle_species.py @@ -13,13 +13,11 @@ #***************************************************************************** from sage.arith.misc import divisors, euler_phi +from sage.combinat.species.misc import accept_size +from sage.combinat.species.species import GenericCombinatorialSpecies +from sage.combinat.species.structure import GenericSpeciesStructure from sage.structure.unique_representation import UniqueRepresentation -from .misc import accept_size -from .species import GenericCombinatorialSpecies -from .structure import GenericSpeciesStructure - - class CycleSpeciesStructure(GenericSpeciesStructure): def __repr__(self): diff --git a/src/sage/combinat/tableau.py b/src/sage/combinat/tableau.py index 7fee9ef3a99..5d0fb107734 100644 --- a/src/sage/combinat/tableau.py +++ b/src/sage/combinat/tableau.py @@ -86,34 +86,34 @@ # **************************************************************************** from itertools import repeat +import sage.libs.symmetrica.all as symmetrica +import sage.misc.prandom as random + from sage.arith.misc import binomial, factorial, multinomial from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets from sage.categories.sets_cat import Sets +from sage.combinat import permutation +from sage.combinat.combinatorial_map import combinatorial_map +from sage.combinat.composition import Composition, Compositions +from sage.combinat.integer_vector import IntegerVectors, integer_vectors_nk_fast_iter +from sage.combinat.posets.posets import Poset from sage.groups.perm_gps.permgroup import PermutationGroup +from sage.misc.inherit_comparison import InheritComparisonClasscallMetaclass +from sage.misc.misc import powerset +from sage.misc.misc_c import prod +from sage.misc.persist import register_unpickle_override +from sage.rings.finite_rings.integer_mod_ring import IntegerModRing +from sage.rings.infinity import PlusInfinity +from sage.rings.integer import Integer from sage.sets.disjoint_union_enumerated_sets import DisjointUnionEnumeratedSets from sage.sets.family import Family from sage.sets.non_negative_integers import NonNegativeIntegers from sage.structure.global_options import GlobalOptions -from sage.structure.unique_representation import UniqueRepresentation from sage.structure.list_clone import ClonableList from sage.structure.parent import Parent from sage.structure.richcmp import richcmp, richcmp_method -from sage.misc.persist import register_unpickle_override -from sage.misc.inherit_comparison import InheritComparisonClasscallMetaclass -from sage.rings.finite_rings.integer_mod_ring import IntegerModRing -from sage.rings.infinity import PlusInfinity -from sage.rings.integer import Integer -import sage.libs.symmetrica.all as symmetrica -import sage.misc.prandom as random -from sage.misc.misc_c import prod -from sage.misc.misc import powerset - -from . import permutation -from .combinatorial_map import combinatorial_map -from .composition import Composition, Compositions -from .integer_vector import IntegerVectors, integer_vectors_nk_fast_iter -from .posets.posets import Poset +from sage.structure.unique_representation import UniqueRepresentation @richcmp_method diff --git a/src/sage/combinat/words/lyndon_word.py b/src/sage/combinat/words/lyndon_word.py index 2a28f615a2c..6adb96421e5 100644 --- a/src/sage/combinat/words/lyndon_word.py +++ b/src/sage/combinat/words/lyndon_word.py @@ -16,13 +16,12 @@ from sage.combinat.combinat_cython import lyndon_word_iterator from sage.combinat.composition import Composition, Compositions from sage.combinat.necklace import _sfc +from sage.combinat.words.finite_word import FiniteWord_class +from sage.combinat.words.words import FiniteWords from sage.rings.integer import Integer from sage.structure.parent import Parent from sage.structure.unique_representation import UniqueRepresentation -from .finite_word import FiniteWord_class -from .words import FiniteWords - def LyndonWords(e=None, k=None): """ From ef98cb5f8392e6c1fde0e28df81e47c00e6f8097 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 16 Feb 2023 14:41:21 -0800 Subject: [PATCH 493/751] Replace relative imports by absolute imports because pytest --- src/sage/functions/hypergeometric.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/sage/functions/hypergeometric.py b/src/sage/functions/hypergeometric.py index 04ea78910b0..752b8422fc6 100644 --- a/src/sage/functions/hypergeometric.py +++ b/src/sage/functions/hypergeometric.py @@ -166,6 +166,11 @@ from sage.arith.misc import binomial, factorial, rising_factorial from sage.calculus.functional import derivative +from sage.functions.error import erf +from sage.functions.gamma import gamma +from sage.functions.hyperbolic import cosh, sinh +from sage.functions.log import exp, log +from sage.functions.other import sqrt, real_part from sage.libs.mpmath import utils as mpmath_utils from sage.misc.latex import latex from sage.misc.misc_c import prod @@ -179,12 +184,6 @@ from sage.symbolic.function import BuiltinFunction from sage.symbolic.ring import SR -from .error import erf -from .gamma import gamma -from .hyperbolic import cosh, sinh -from .log import exp, log -from .other import sqrt, real_part - def rational_param_as_tuple(x): r""" From 7ecdd57bf0263a60458a6adfec53e8a68c913352 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 26 Jan 2023 20:54:48 -0800 Subject: [PATCH 494/751] src/sage/geometry/polyhedron: Add # optional - sage.combinat, sage.groups, sage.plot, sage.rings.number_field, sage.symbolic --- .../polyhedron/backend_number_field.py | 6 +- src/sage/geometry/polyhedron/base.py | 16 +- src/sage/geometry/polyhedron/base2.py | 36 ++-- src/sage/geometry/polyhedron/base5.py | 24 +-- src/sage/geometry/polyhedron/base6.py | 78 ++++----- src/sage/geometry/polyhedron/base7.py | 42 ++--- src/sage/geometry/polyhedron/constructor.py | 8 +- .../polyhedron/generating_function.py | 1 + src/sage/geometry/polyhedron/library.py | 159 +++++++++--------- src/sage/geometry/polyhedron/parent.py | 14 +- src/sage/geometry/polyhedron/plot.py | 105 ++++++------ src/sage/numerical/all__sagemath_polyhedra.py | 9 + .../backends/all__sagemath_polyhedra.py | 0 13 files changed, 263 insertions(+), 235 deletions(-) create mode 100644 src/sage/numerical/all__sagemath_polyhedra.py create mode 100644 src/sage/numerical/backends/all__sagemath_polyhedra.py diff --git a/src/sage/geometry/polyhedron/backend_number_field.py b/src/sage/geometry/polyhedron/backend_number_field.py index 437550de3aa..a963ad9d770 100644 --- a/src/sage/geometry/polyhedron/backend_number_field.py +++ b/src/sage/geometry/polyhedron/backend_number_field.py @@ -119,11 +119,11 @@ def _init_from_Vrepresentation(self, vertices, rays, lines, Check that the coordinates of a vertex get simplified in the Symbolic Ring:: - sage: p = Polyhedron(ambient_dim=2, base_ring=SR, backend='number_field') + sage: p = Polyhedron(ambient_dim=2, base_ring=SR, backend='number_field') # optional - sage.symbolic sage: from sage.geometry.polyhedron.backend_number_field import Polyhedron_number_field - sage: Polyhedron_number_field._init_from_Vrepresentation(p, [(0,1/2),(sqrt(2),0),(4,5/6)], [], []); p + sage: Polyhedron_number_field._init_from_Vrepresentation(p, [(0,1/2),(sqrt(2),0),(4,5/6)], [], []); p # optional - sage.symbolic A 2-dimensional polyhedron in (Symbolic Ring)^2 defined as the convex hull of 3 vertices - sage: p.vertices()[0][0] + sage: p.vertices()[0][0] # optional - sage.symbolic 0 """ (vertices, rays, lines), internal_base_ring \ diff --git a/src/sage/geometry/polyhedron/base.py b/src/sage/geometry/polyhedron/base.py index 77a11c53d21..9704f6ea607 100644 --- a/src/sage/geometry/polyhedron/base.py +++ b/src/sage/geometry/polyhedron/base.py @@ -318,11 +318,11 @@ def boundary_complex(self): sage: oc = polytopes.octahedron() sage: sc_oc = oc.boundary_complex() - sage: fl_oc = oc.face_lattice() - sage: fl_sc = sc_oc.face_poset() - sage: [len(x) for x in fl_oc.level_sets()] + sage: fl_oc = oc.face_lattice() # optional - sage.combinat + sage: fl_sc = sc_oc.face_poset() # optional - sage.combinat + sage: [len(x) for x in fl_oc.level_sets()] # optional - sage.combinat [1, 6, 12, 8, 1] - sage: [len(x) for x in fl_sc.level_sets()] + sage: [len(x) for x in fl_sc.level_sets()] # optional - sage.combinat [6, 12, 8] sage: sc_oc.euler_characteristic() 2 @@ -1056,7 +1056,7 @@ def bounding_box(self, integral=False, integral_hull=False): (None, None) sage: Polyhedron([ (1/3,2/3), (3/3, 4/3) ]).bounding_box(integral_hull=True) ((1, 1), (1, 1)) - sage: polytopes.buckyball(exact=False).bounding_box() + sage: polytopes.buckyball(exact=False).bounding_box() # optional - sage.groups ((-0.8090169944, -0.8090169944, -0.8090169944), (0.8090169944, 0.8090169944, 0.8090169944)) TESTS:: @@ -1161,12 +1161,12 @@ def _polymake_init_(self): Floating-point polyhedron:: - sage: P = polytopes.dodecahedron(exact=False); P + sage: P = polytopes.dodecahedron(exact=False); P # optional - sage.groups A 3-dimensional polyhedron in RDF^3 defined as the convex hull of 20 vertices - sage: print("There may be a recompilation warning"); PP = polymake(P); PP # optional - jupymake + sage: print("There may be a recompilation warning"); PP = polymake(P); PP # optional - jupymake # optional - sage.groups There may be a recompilation warning... Polytope[...] - sage: sorted(PP.VERTICES[:], key=repr)[0] # optional - jupymake + sage: sorted(PP.VERTICES[:], key=repr)[0] # optional - jupymake # optional - sage.groups 1 -0.472135955 0 -1.236067978 """ diff --git a/src/sage/geometry/polyhedron/base2.py b/src/sage/geometry/polyhedron/base2.py index 9afeeaaef1f..fa0765795cb 100644 --- a/src/sage/geometry/polyhedron/base2.py +++ b/src/sage/geometry/polyhedron/base2.py @@ -262,21 +262,21 @@ def h_star_vector(self): volume = `\frac{1}{dim(S)!}`) is always 1. Here we test this on simplices up to dimension 3:: - sage: s1 = polytopes.simplex(1,backend='normaliz') # optional - pynormaliz - sage: s2 = polytopes.simplex(2,backend='normaliz') # optional - pynormaliz - sage: s3 = polytopes.simplex(3,backend='normaliz') # optional - pynormaliz - sage: [s1.h_star_vector(),s2.h_star_vector(),s3.h_star_vector()] # optional - pynormaliz + sage: s1 = polytopes.simplex(1,backend='normaliz') # optional - pynormaliz + sage: s2 = polytopes.simplex(2,backend='normaliz') # optional - pynormaliz + sage: s3 = polytopes.simplex(3,backend='normaliz') # optional - pynormaliz + sage: [s1.h_star_vector(), s2.h_star_vector(), s3.h_star_vector()] # optional - pynormaliz [[1], [1], [1]] For a less trivial example, we compute the `h^*`-vector of the `0/1`-cube, which has the Eulerian numbers `(3,i)` for `i \in [0,2]` as an `h^*`-vector:: - sage: cube = polytopes.cube(intervals='zero_one', backend='normaliz') # optional - pynormaliz - sage: cube.h_star_vector() # optional - pynormaliz + sage: cube = polytopes.cube(intervals='zero_one', backend='normaliz') # optional - pynormaliz + sage: cube.h_star_vector() # optional - pynormaliz [1, 4, 1] - sage: from sage.combinat.combinat import eulerian_number - sage: [eulerian_number(3,i) for i in range(3)] + sage: from sage.combinat.combinat import eulerian_number # optional - sage.combinat + sage: [eulerian_number(3,i) for i in range(3)] # optional - sage.combinat [1, 4, 1] TESTS:: @@ -293,8 +293,8 @@ def h_star_vector(self): ... TypeError: The h_star vector is only defined for lattice polytopes - sage: t2 = Polyhedron(vertices=[[AA(sqrt(2))],[1/2]]) - sage: t2.h_star_vector() + sage: t2 = Polyhedron(vertices=[[AA(sqrt(2))], [1/2]]) # optional - sage.rings.number_field + sage: t2.h_star_vector() # optional - sage.rings.number_field Traceback (most recent call last): ... TypeError: The h_star vector is only defined for lattice polytopes @@ -767,15 +767,15 @@ def generating_function_of_integral_points(self, **kwds): sage: P2 = ( ....: Polyhedron(ieqs=[(0, 0, 0, 1), (0, 0, 1, 0), (0, 1, 0, -1)]), ....: Polyhedron(ieqs=[(0, -1, 0, 1), (0, 1, 0, 0), (0, 0, 1, 0)])) - sage: P2[0].generating_function_of_integral_points(sort_factors=True) + sage: P2[0].generating_function_of_integral_points(sort_factors=True) # optional - sage.combinat 1 * (-y0 + 1)^-1 * (-y1 + 1)^-1 * (-y0*y2 + 1)^-1 - sage: P2[1].generating_function_of_integral_points(sort_factors=True) + sage: P2[1].generating_function_of_integral_points(sort_factors=True) # optional - sage.combinat 1 * (-y1 + 1)^-1 * (-y2 + 1)^-1 * (-y0*y2 + 1)^-1 sage: (P2[0] & P2[1]).Hrepresentation() (An equation (1, 0, -1) x + 0 == 0, An inequality (1, 0, 0) x + 0 >= 0, An inequality (0, 1, 0) x + 0 >= 0) - sage: (P2[0] & P2[1]).generating_function_of_integral_points(sort_factors=True) + sage: (P2[0] & P2[1]).generating_function_of_integral_points(sort_factors=True) # optional - sage.combinat 1 * (-y1 + 1)^-1 * (-y0*y2 + 1)^-1 The number of integer partitions @@ -784,16 +784,16 @@ def generating_function_of_integral_points(self, **kwds): sage: P = Polyhedron(ieqs=[(-1, 1, 0, 0, 0, 0), (0, -1, 1, 0, 0, 0), ....: (0, 0, -1, 1, 0, 0), (0, 0, 0, -1, 1, 0), ....: (0, 0, 0, 0, -1, 1)]) - sage: f = P.generating_function_of_integral_points(sort_factors=True); f + sage: f = P.generating_function_of_integral_points(sort_factors=True); f # optional - sage.combinat y0*y1*y2*y3*y4 * (-y4 + 1)^-1 * (-y3*y4 + 1)^-1 * (-y2*y3*y4 + 1)^-1 * (-y1*y2*y3*y4 + 1)^-1 * (-y0*y1*y2*y3*y4 + 1)^-1 - sage: f = f.value() - sage: P. = PowerSeriesRing(ZZ) - sage: c = f.subs({y: z for y in f.parent().gens()}); c + sage: f = f.value() # optional - sage.combinat + sage: P. = PowerSeriesRing(ZZ) # optional - sage.combinat + sage: c = f.subs({y: z for y in f.parent().gens()}); c # optional - sage.combinat z^5 + z^6 + 2*z^7 + 3*z^8 + 5*z^9 + 7*z^10 + 10*z^11 + 13*z^12 + 18*z^13 + 23*z^14 + 30*z^15 + 37*z^16 + 47*z^17 + 57*z^18 + 70*z^19 + 84*z^20 + 101*z^21 + 119*z^22 + 141*z^23 + 164*z^24 + O(z^25) - sage: [Partitions(k, length=5).cardinality() for k in range(5,20)] == \ + sage: [Partitions(k, length=5).cardinality() for k in range(5,20)] == \ # optional - sage.combinat ....: c.truncate().coefficients(sparse=False)[5:20] True diff --git a/src/sage/geometry/polyhedron/base5.py b/src/sage/geometry/polyhedron/base5.py index 04d1fa0314b..d83a1593e54 100644 --- a/src/sage/geometry/polyhedron/base5.py +++ b/src/sage/geometry/polyhedron/base5.py @@ -1348,11 +1348,13 @@ def intersection(self, other): Check that :trac:`19012` is fixed:: - sage: K. = QuadraticField(5) - sage: P = Polyhedron([[0,0],[0,a],[1,1]]) - sage: Q = Polyhedron(ieqs=[[-1,a,1]]) - sage: P.intersection(Q) - A 2-dimensional polyhedron in (Number Field in a with defining polynomial x^2 - 5 with a = 2.236067977499790?)^2 defined as the convex hull of 4 vertices + sage: K. = QuadraticField(5) # optional - sage.rings.number_field + sage: P = Polyhedron([[0, 0], [0, a], [1, 1]]) # optional - sage.rings.number_field + sage: Q = Polyhedron(ieqs=[[-1, a, 1]]) # optional - sage.rings.number_field + sage: P.intersection(Q) # optional - sage.rings.number_field + A 2-dimensional polyhedron in + (Number Field in a with defining polynomial x^2 - 5 with a = 2.236067977499790?)^2 + defined as the convex hull of 4 vertices """ new_ieqs = self.inequalities() + other.inequalities() new_eqns = self.equations() + other.equations() @@ -1993,7 +1995,7 @@ def face_truncation(self, face, linear_coefficients=None, cut_frac=None): A vertex at (-1/3, 1, 1), A vertex at (-1/3, 1, -1), A vertex at (-1/3, -1, -1)) - sage: face_trunc.face_lattice().is_isomorphic(Cube.face_lattice()) + sage: face_trunc.face_lattice().is_isomorphic(Cube.face_lattice()) # optional - sage.combinat True TESTS: @@ -2227,10 +2229,10 @@ def wedge(self, face, width=1): sage: W1.is_combinatorially_isomorphic(triangular_prism) # optional - sage.graphs # optional - sage.rings.number_field True - sage: Q = polytopes.hypersimplex(4,2) - sage: W2 = Q.wedge(Q.faces(2)[7]); W2 + sage: Q = polytopes.hypersimplex(4,2) # optional - sage.combinat + sage: W2 = Q.wedge(Q.faces(2)[7]); W2 # optional - sage.combinat A 4-dimensional polyhedron in QQ^5 defined as the convex hull of 9 vertices - sage: W2.vertices() + sage: W2.vertices() # optional - sage.combinat (A vertex at (1, 1, 0, 0, 1), A vertex at (1, 1, 0, 0, -1), A vertex at (1, 0, 1, 0, 1), @@ -2241,9 +2243,9 @@ def wedge(self, face, width=1): A vertex at (0, 1, 1, 0, 0), A vertex at (0, 1, 0, 1, 0)) - sage: W3 = Q.wedge(Q.faces(1)[11]); W3 + sage: W3 = Q.wedge(Q.faces(1)[11]); W3 # optional - sage.combinat A 4-dimensional polyhedron in QQ^5 defined as the convex hull of 10 vertices - sage: W3.vertices() + sage: W3.vertices() # optional - sage.combinat (A vertex at (1, 1, 0, 0, -2), A vertex at (1, 1, 0, 0, 2), A vertex at (1, 0, 1, 0, -2), diff --git a/src/sage/geometry/polyhedron/base6.py b/src/sage/geometry/polyhedron/base6.py index 2dd1117ad79..a279898247e 100644 --- a/src/sage/geometry/polyhedron/base6.py +++ b/src/sage/geometry/polyhedron/base6.py @@ -45,9 +45,9 @@ class Polyhedron_base6(Polyhedron_base5): sage: from sage.geometry.polyhedron.base6 import Polyhedron_base6 sage: P = polytopes.cube() - sage: Polyhedron_base6.plot(P) + sage: Polyhedron_base6.plot(P) # optional - sage.plot Graphics3d Object - sage: print(Polyhedron_base6.tikz(P, output_type='TikzPicture')) + sage: print(Polyhedron_base6.tikz(P, output_type='TikzPicture')) # optional - sage.plot \RequirePackage{luatex85} \documentclass[tikz]{standalone} \begin{document} @@ -130,7 +130,7 @@ class Polyhedron_base6(Polyhedron_base5): \end{document} sage: Q = polytopes.hypercube(4) - sage: Polyhedron_base6.show(Q) + sage: Polyhedron_base6.show(Q) # optional - sage.plot sage: Polyhedron_base6.schlegel_projection(Q) The projection of a polyhedron into 3 dimensions @@ -383,25 +383,25 @@ def plot(self, sage: halfspace = Polyhedron(rays=[(0, 0, 1)], lines=[(1, 0, 0), (0, 1, 0)]) sage: len(halfspace.projection().arrows) 5 - sage: halfspace.plot(fill=(0,1,0)) + sage: halfspace.plot(fill=(0, 1, 0)) # optional - sage.plot Graphics3d Object sage: fullspace = Polyhedron(lines=[(1, 0, 0), (0, 1, 0), (0, 0, 1)]) sage: len(fullspace.projection().arrows) 6 - sage: fullspace.plot(color=(1,0,0), alpha=0.5) + sage: fullspace.plot(color=(1, 0, 0), alpha=0.5) # optional - sage.plot Graphics3d Object sage: cone = Polyhedron(rays=[(1, 0, 0), (0, 1, 0), (0, 0, 1)]) - sage: cone.plot(fill='rainbow', alpha=0.6) + sage: cone.plot(fill='rainbow', alpha=0.6) # optional - sage.plot Graphics3d Object - sage: p = Polyhedron(vertices=[(0,0,0),(1,0,0)],rays=[(-1,1,0),(1,1,0),(0,0,1)]) - sage: p.plot(fill='mediumspringgreen', point='red', size=30, width=2) + sage: p = Polyhedron(vertices=[(0, 0, 0), (1, 0, 0)], rays=[(-1, 1, 0), (1, 1, 0), (0, 0, 1)]) + sage: p.plot(fill='mediumspringgreen', point='red', size=30, width=2) # optional - sage.plot Graphics3d Object - sage: cylinder = Polyhedron(vertices = [(0, 0, 0), (1, 0, 0), (0, 1, 0)], lines=[(0, 0, 1)]) - sage: cylinder.plot(fill='red') # check it is not all black + sage: cylinder = Polyhedron(vertices=[(0, 0, 0), (1, 0, 0), (0, 1, 0)], lines=[(0, 0, 1)]) + sage: cylinder.plot(fill='red') # check it is not all black # optional - sage.plot Graphics3d Object - sage: quarter = Polyhedron(rays = [(-1, 0, 0), (1, 0, 0), (0, 1, 0), (0, 0, 1)]) - sage: quarter.plot(fill='rainbow') # check it is not all black nor with too many colors + sage: quarter = Polyhedron(rays=[(-1, 0, 0), (1, 0, 0), (0, 1, 0), (0, 0, 1)]) + sage: quarter.plot(fill='rainbow') # check it is not all black nor with too many colors # optional - sage.plot Graphics3d Object """ def merge_options(*opts): @@ -545,8 +545,8 @@ def tikz(self, view=[0, 0, 1], angle=0, scale=1, EXAMPLES:: sage: co = polytopes.cuboctahedron() - sage: Img = co.tikz([0,0,1], 0, output_type='TikzPicture') - sage: Img + sage: Img = co.tikz([0, 0, 1], 0, output_type='TikzPicture') # optional - sage.plot + sage: Img # optional - sage.plot \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}% @@ -563,7 +563,7 @@ def tikz(self, view=[0, 0, 1], angle=0, scale=1, %% \end{tikzpicture} \end{document} - sage: print('\n'.join(Img.content().splitlines()[12:21])) + sage: print('\n'.join(Img.content().splitlines()[12:21])) # optional - sage.plot %% with the command: ._tikz_3d_in_3d and parameters: %% view = [0, 0, 1] %% angle = 0 @@ -582,8 +582,8 @@ def tikz(self, view=[0, 0, 1], angle=0, scale=1, When output type is a :class:`sage.misc.latex_standalone.TikzPicture`:: sage: co = polytopes.cuboctahedron() - sage: t = co.tikz([674,108,-731], 112, output_type='TikzPicture') - sage: t + sage: t = co.tikz([674, 108, -731], 112, output_type='TikzPicture') # optional - sage.plot + sage: t # optional - sage.plot \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}% @@ -600,7 +600,7 @@ def tikz(self, view=[0, 0, 1], angle=0, scale=1, %% \end{tikzpicture} \end{document} - sage: path_to_file = t.pdf() # not tested + sage: path_to_file = t.pdf() # not tested # optional - sage.plot """ return self.projection().tikz(view, angle, scale, @@ -692,8 +692,8 @@ def gale_transform(self): Check that :trac:`29073` is fixed:: - sage: P = polytopes.icosahedron(exact=False) - sage: sum(P.gale_transform()).norm() < 1e-15 + sage: P = polytopes.icosahedron(exact=False) # optional - sage.groups + sage: sum(P.gale_transform()).norm() < 1e-15 # optional - sage.groups True """ if not self.is_compact(): @@ -784,8 +784,8 @@ def render_solid(self, **kwds): EXAMPLES:: sage: p = polytopes.hypercube(3) - sage: p_solid = p.render_solid(opacity = .7) - sage: type(p_solid) + sage: p_solid = p.render_solid(opacity=.7) # optional - sage.plot + sage: type(p_solid) # optional - sage.plot """ proj = self.projection() @@ -803,8 +803,8 @@ def render_wireframe(self, **kwds): EXAMPLES:: sage: p = Polyhedron([[1,2,],[1,1],[0,0]]) - sage: p_wireframe = p.render_wireframe() - sage: p_wireframe._objects + sage: p_wireframe = p.render_wireframe() # optional - sage.plot + sage: p_wireframe._objects # optional - sage.plot [Line defined by 2 points, Line defined by 2 points, Line defined by 2 points] """ proj = self.projection() @@ -1562,44 +1562,44 @@ def affine_hull_manifold(self, name=None, latex_name=None, start_index=0, ambien EXAMPLES:: - sage: triangle = Polyhedron([(1,0,0), (0,1,0), (0,0,1)]); triangle + sage: triangle = Polyhedron([(1, 0, 0), (0, 1, 0), (0, 0, 1)]); triangle A 2-dimensional polyhedron in ZZ^3 defined as the convex hull of 3 vertices - sage: A = triangle.affine_hull_manifold(name='A'); A + sage: A = triangle.affine_hull_manifold(name='A'); A # optional - sage.symbolic 2-dimensional Riemannian submanifold A embedded in the Euclidean space E^3 - sage: A.embedding().display() + sage: A.embedding().display() # optional - sage.symbolic A → E^3 (x0, x1) ↦ (x, y, z) = (t0 + x0, t0 + x1, t0 - x0 - x1 + 1) - sage: A.embedding().inverse().display() + sage: A.embedding().inverse().display() # optional - sage.symbolic E^3 → A (x, y, z) ↦ (x0, x1) = (x, y) - sage: A.adapted_chart() + sage: A.adapted_chart() # optional - sage.symbolic [Chart (E^3, (x0_E3, x1_E3, t0_E3))] - sage: A.normal().display() + sage: A.normal().display() # optional - sage.symbolic n = 1/3*sqrt(3) e_x + 1/3*sqrt(3) e_y + 1/3*sqrt(3) e_z - sage: A.induced_metric() # Need to call this before volume_form + sage: A.induced_metric() # Need to call this before volume_form # optional - sage.symbolic Riemannian metric gamma on the 2-dimensional Riemannian submanifold A embedded in the Euclidean space E^3 - sage: A.volume_form() + sage: A.volume_form() # optional - sage.symbolic 2-form eps_gamma on the 2-dimensional Riemannian submanifold A embedded in the Euclidean space E^3 Orthogonal version:: - sage: A = triangle.affine_hull_manifold(name='A', orthogonal=True); A + sage: A = triangle.affine_hull_manifold(name='A', orthogonal=True); A # optional - sage.symbolic 2-dimensional Riemannian submanifold A embedded in the Euclidean space E^3 - sage: A.embedding().display() + sage: A.embedding().display() # optional - sage.symbolic A → E^3 (x0, x1) ↦ (x, y, z) = (t0 - 1/2*x0 - 1/3*x1 + 1, t0 + 1/2*x0 - 1/3*x1, t0 + 2/3*x1) - sage: A.embedding().inverse().display() + sage: A.embedding().inverse().display() # optional - sage.symbolic E^3 → A (x, y, z) ↦ (x0, x1) = (-x + y + 1, -1/2*x - 1/2*y + z + 1/2) Arrangement of affine hull of facets:: sage: D = polytopes.dodecahedron() # optional - sage.rings.number_field - sage: E3 = EuclideanSpace(3) # optional - sage.rings.number_field - sage: submanifolds = [ # optional - sage.rings.number_field + sage: E3 = EuclideanSpace(3) # optional - sage.rings.number_field # optional - sage.symbolic + sage: submanifolds = [ # optional - sage.rings.number_field # optional - sage.symbolic ....: F.as_polyhedron().affine_hull_manifold(name=f'F{i}', orthogonal=True, ambient_space=E3) ....: for i, F in enumerate(D.facets())] - sage: sum(FM.plot({}, srange(-2, 2, 0.1), srange(-2, 2, 0.1), opacity=0.2) # not tested # optional - sage.plot # optional - sage.rings.number_field + sage: sum(FM.plot({}, srange(-2, 2, 0.1), srange(-2, 2, 0.1), opacity=0.2) # not tested # optional - sage.symbolic # optional - sage.plot # optional - sage.rings.number_field ....: for FM in submanifolds) + D.plot() Graphics3d Object @@ -1607,7 +1607,7 @@ def affine_hull_manifold(self, name=None, latex_name=None, start_index=0, ambien sage: cube = polytopes.cube(); cube A 3-dimensional polyhedron in ZZ^3 defined as the convex hull of 8 vertices - sage: cube.affine_hull_manifold() + sage: cube.affine_hull_manifold() # optional - sage.symbolic Euclidean space E^3 """ diff --git a/src/sage/geometry/polyhedron/base7.py b/src/sage/geometry/polyhedron/base7.py index db828e2eb0a..021eaa679ac 100644 --- a/src/sage/geometry/polyhedron/base7.py +++ b/src/sage/geometry/polyhedron/base7.py @@ -44,12 +44,15 @@ class Polyhedron_base7(Polyhedron_base6): TESTS:: sage: from sage.geometry.polyhedron.base7 import Polyhedron_base7 - sage: P = polytopes.associahedron(['A', 3]) - sage: Polyhedron_base7.centroid(P) + sage: P = polytopes.associahedron(['A', 3]) # optional - sage.combinat + sage: Polyhedron_base7.centroid(P) # optional - sage.combinat (81/632, 36/79, 81/632) - sage: Polyhedron_base7.triangulate(P) - (<0,1,2,13>, <0,1,7,13>, <0,2,5,13>, <0,6,7,12>, <0,6,8,13>, <0,6,12,13>, <0,7,12,13>, <1,2,7,12>, <1,2,12,13>, <1,7,12,13>, <2,3,7,12>, <2,3,12,13>, <3,4,7,12>, <3,11,12,13>, <6,8,9,12>, <6,8,12,13>, <6,9,10,12>, <8,9,12,13>) - sage: Polyhedron_base7.volume(P, measure='induced') + sage: Polyhedron_base7.triangulate(P) # optional - sage.combinat + (<0,1,2,13>, <0,1,7,13>, <0,2,5,13>, <0,6,7,12>, <0,6,8,13>, + <0,6,12,13>, <0,7,12,13>, <1,2,7,12>, <1,2,12,13>, <1,7,12,13>, + <2,3,7,12>, <2,3,12,13>, <3,4,7,12>, <3,11,12,13>, <6,8,9,12>, + <6,8,12,13>, <6,9,10,12>, <8,9,12,13>) + sage: Polyhedron_base7.volume(P, measure='induced') # optional - sage.combinat 79/3 """ @cached_method(do_pickle=True) @@ -88,8 +91,8 @@ def centroid(self, engine='auto', **kwds): sage: P.centroid() (1/4, 0, 0) - sage: P = polytopes.associahedron(['A',2]) - sage: P.centroid() + sage: P = polytopes.associahedron(['A', 2]) # optional - sage.combinat + sage: P.centroid() # optional - sage.combinat (2/21, 2/21) sage: P = polytopes.permutahedron(4, backend='normaliz') # optional - pynormaliz @@ -98,7 +101,7 @@ def centroid(self, engine='auto', **kwds): The method is not implemented for unbounded polyhedra:: - sage: P = Polyhedron(vertices=[(0,0)],rays=[(1,0),(0,1)]) + sage: P = Polyhedron(vertices=[(0, 0)], rays=[(1, 0), (0, 1)]) sage: P.centroid() Traceback (most recent call last): ... @@ -521,7 +524,7 @@ def volume(self, measure='ambient', engine='auto', **kwds): sage: P = Polyhedron([[0, 0], [1, 1]]) sage: P.volume() 0 - sage: P.volume(measure='induced') + sage: P.volume(measure='induced') # optional - sage.rings.number_field 1.414213562373095? sage: P.volume(measure='induced_rational') # optional -- latte_int 1 @@ -556,19 +559,19 @@ def volume(self, measure='ambient', engine='auto', **kwds): sage: P.volume(measure='induced_lattice',engine='latte') # optional - latte_int 3 - sage: Dexact = polytopes.dodecahedron() # optional - sage.rings.number_field - sage: v = Dexact.faces(2)[0].as_polyhedron().volume(measure='induced', engine='internal'); v # optional - sage.rings.number_field + sage: Dexact = polytopes.dodecahedron() # optional - sage.rings.number_field # optional - sage.groups + sage: v = Dexact.faces(2)[0].as_polyhedron().volume(measure='induced', engine='internal'); v # optional - sage.rings.number_field # optional - sage.groups 1.53406271079097? - sage: v = Dexact.faces(2)[4].as_polyhedron().volume(measure='induced', engine='internal'); v # optional - sage.rings.number_field + sage: v = Dexact.faces(2)[4].as_polyhedron().volume(measure='induced', engine='internal'); v # optional - sage.rings.number_field # optional - sage.groups 1.53406271079097? - sage: RDF(v) # abs tol 1e-9 # optional - sage.rings.number_field + sage: RDF(v) # abs tol 1e-9 # optional - sage.rings.number_field # optional - sage.groups 1.53406271079044 - sage: Dinexact = polytopes.dodecahedron(exact=False) - sage: w = Dinexact.faces(2)[2].as_polyhedron().volume(measure='induced', engine='internal'); RDF(w) # abs tol 1e-9 + sage: Dinexact = polytopes.dodecahedron(exact=False) # optional - sage.groups + sage: w = Dinexact.faces(2)[2].as_polyhedron().volume(measure='induced', engine='internal'); RDF(w) # abs tol 1e-9 # optional - sage.groups 1.5340627082974878 - sage: [polytopes.simplex(d).volume(measure='induced') for d in range(1,5)] == [sqrt(d+1)/factorial(d) for d in range(1,5)] + sage: [polytopes.simplex(d).volume(measure='induced') for d in range(1,5)] == [sqrt(d+1)/factorial(d) for d in range(1,5)] # optional - sage.rings.number_field True sage: I = Polyhedron([[-3, 0], [0, 9]]) @@ -804,9 +807,9 @@ def integrate(self, function, measure='ambient', **kwds): sage: R. = QQ[] sage: P = polytopes.simplex(2) - sage: V = AA(P.volume(measure='induced')); V.radical_expression() + sage: V = AA(P.volume(measure='induced')); V.radical_expression() # optional - sage.rings.number_field sage.symbolic 1/2*sqrt(3) - sage: P.integrate(R(1), measure='induced') == V # optional - latte_int + sage: P.integrate(R(1), measure='induced') == V # optional - latte_int # optional - sage.rings.number_field sage.symbolic True Computing the mass center:: @@ -951,7 +954,6 @@ def _integrate_latte_(self, polynomial, **kwds): sage: Polyhedron(vertices=[()]).integrate(R(42)) 42 """ - from sage.interfaces.latte import integrate from sage.rings.real_double import RDF if self.base_ring() == RDF: @@ -961,6 +963,8 @@ def _integrate_latte_(self, polynomial, **kwds): assert len(self.vertices()) == 1 vertex = tuple(vertices[0]) return polynomial(vertex) + + from sage.interfaces.latte import integrate return integrate(self.cdd_Hrepresentation(), polynomial, cdd=True, **kwds) diff --git a/src/sage/geometry/polyhedron/constructor.py b/src/sage/geometry/polyhedron/constructor.py index 7f11ac13593..971e36388f4 100644 --- a/src/sage/geometry/polyhedron/constructor.py +++ b/src/sage/geometry/polyhedron/constructor.py @@ -504,12 +504,12 @@ def Polyhedron(vertices=None, rays=None, lines=None, sage: Polyhedron(o, base_ring=QQ) A 2-dimensional polyhedron in QQ^2 defined as the convex hull of 4 vertices - sage: H. = HyperplaneArrangements(QQ) - sage: h = x + y - 1; h + sage: H. = HyperplaneArrangements(QQ) # optional - sage.combinat + sage: h = x + y - 1; h # optional - sage.combinat Hyperplane x + y - 1 - sage: Polyhedron(h, base_ring=ZZ) + sage: Polyhedron(h, base_ring=ZZ) # optional - sage.combinat A 1-dimensional polyhedron in ZZ^2 defined as the convex hull of 1 vertex and 1 line - sage: Polyhedron(h) + sage: Polyhedron(h) # optional - sage.combinat A 1-dimensional polyhedron in QQ^2 defined as the convex hull of 1 vertex and 1 line .. NOTE:: diff --git a/src/sage/geometry/polyhedron/generating_function.py b/src/sage/geometry/polyhedron/generating_function.py index 9fadd8f3e13..2c6cfccf200 100644 --- a/src/sage/geometry/polyhedron/generating_function.py +++ b/src/sage/geometry/polyhedron/generating_function.py @@ -1,3 +1,4 @@ +# sage.doctest: optional - sage.combinat r""" Generating Function of Polyhedron's Integral Points diff --git a/src/sage/geometry/polyhedron/library.py b/src/sage/geometry/polyhedron/library.py index e54d8a7efd1..f9fb4e192cd 100644 --- a/src/sage/geometry/polyhedron/library.py +++ b/src/sage/geometry/polyhedron/library.py @@ -1218,28 +1218,28 @@ def truncated_octahedron(self, backend=None): EXAMPLES:: - sage: co = polytopes.truncated_octahedron() - sage: co.f_vector() + sage: co = polytopes.truncated_octahedron() # optional - sage.combinat + sage: co.f_vector() # optional - sage.combinat (1, 24, 36, 14, 1) Its facets are 6 squares and 8 hexagons:: - sage: sum(1 for f in co.facets() if len(f.vertices()) == 4) + sage: sum(1 for f in co.facets() if len(f.vertices()) == 4) # optional - sage.combinat 6 - sage: sum(1 for f in co.facets() if len(f.vertices()) == 6) + sage: sum(1 for f in co.facets() if len(f.vertices()) == 6) # optional - sage.combinat 8 Some more computation:: - sage: co.volume() + sage: co.volume() # optional - sage.combinat 32 - sage: co.ehrhart_polynomial() # optional - latte_int + sage: co.ehrhart_polynomial() # optional - latte_int # optional - sage.combinat 32*t^3 + 18*t^2 + 6*t + 1 TESTS:: - sage: to_norm = polytopes.truncated_octahedron(backend='normaliz') # optional - pynormaliz - sage: TestSuite(to_norm).run() # optional - pynormaliz + sage: to_norm = polytopes.truncated_octahedron(backend='normaliz') # optional - pynormaliz sage.combinat + sage: TestSuite(to_norm).run() # optional - pynormaliz sage.combinat """ v = [(0, e, f) for e in [-1, 1] for f in [-2, 2]] v = [(xyz[sigma(1) - 1], xyz[sigma(2) - 1], xyz[sigma(3) - 1]) @@ -1416,33 +1416,33 @@ def buckyball(self, exact=True, base_ring=None, backend=None): EXAMPLES:: - sage: bb = polytopes.buckyball() # long time - 6secs # optional - sage.rings.number_field - sage: bb.f_vector() # long time # optional - sage.rings.number_field + sage: bb = polytopes.buckyball() # long time - 6secs # optional - sage.groups # optional - sage.rings.number_field + sage: bb.f_vector() # long time # optional - sage.groups # optional - sage.rings.number_field (1, 60, 90, 32, 1) - sage: bb.base_ring() # long time # optional - sage.rings.number_field + sage: bb.base_ring() # long time # optional - sage.groups # optional - sage.rings.number_field Number Field in sqrt5 with defining polynomial x^2 - 5 with sqrt5 = 2.236067977499790? A much faster implementation using floating point approximations:: - sage: bb = polytopes.buckyball(exact=False) - sage: bb.f_vector() + sage: bb = polytopes.buckyball(exact=False) # optional - sage.groups + sage: bb.f_vector() # optional - sage.groups (1, 60, 90, 32, 1) - sage: bb.base_ring() + sage: bb.base_ring() # optional - sage.groups Real Double Field Its facets are 5 regular pentagons and 6 regular hexagons:: - sage: sum(1 for f in bb.facets() if len(f.vertices()) == 5) + sage: sum(1 for f in bb.facets() if len(f.vertices()) == 5) # optional - sage.groups 12 - sage: sum(1 for f in bb.facets() if len(f.vertices()) == 6) + sage: sum(1 for f in bb.facets() if len(f.vertices()) == 6) # optional - sage.groups 20 TESTS:: - sage: bb = polytopes.buckyball(backend='normaliz') # optional - pynormaliz # optional - sage.rings.number_field - sage: bb.f_vector() # optional - pynormaliz # optional - sage.rings.number_field + sage: bb = polytopes.buckyball(backend='normaliz') # optional - sage.groups # optional - sage.rings.number_field # optional - pynormaliz + sage: bb.f_vector() # optional - sage.groups # optional - sage.rings.number_field # optional - pynormaliz (1, 60, 90, 32, 1) - sage: bb.base_ring() # optional - pynormaliz # optional - sage.rings.number_field + sage: bb.base_ring() # optional - sage.groups # optional - sage.rings.number_field # optional - pynormaliz Number Field in sqrt5 with defining polynomial x^2 - 5 with sqrt5 = 2.236067977499790? """ @@ -1465,25 +1465,25 @@ def icosidodecahedron(self, exact=True, backend=None): EXAMPLES:: - sage: id = polytopes.icosidodecahedron() # optional - sage.rings.number_field - sage: id.f_vector() # optional - sage.rings.number_field + sage: id = polytopes.icosidodecahedron() # optional - sage.rings.number_field # optional - sage.groups + sage: id.f_vector() # optional - sage.rings.number_field # optional - sage.groups (1, 30, 60, 32, 1) TESTS:: - sage: id = polytopes.icosidodecahedron(exact=False); id + sage: id = polytopes.icosidodecahedron(exact=False); id # optional - sage.rings.number_field # optional - sage.groups A 3-dimensional polyhedron in RDF^3 defined as the convex hull of 30 vertices - sage: TestSuite(id).run(skip=["_test_is_combinatorially_isomorphic", + sage: TestSuite(id).run(skip=["_test_is_combinatorially_isomorphic", # optional - sage.rings.number_field # optional - sage.groups ....: "_test_product", ....: "_test_pyramid", ....: "_test_lawrence"]) - sage: id = polytopes.icosidodecahedron(backend='normaliz') # optional - pynormaliz # optional - sage.rings.number_field - sage: id.f_vector() # optional - pynormaliz # optional - sage.rings.number_field + sage: id = polytopes.icosidodecahedron(backend='normaliz') # optional - pynormaliz # optional - sage.rings.number_field # optional - sage.groups + sage: id.f_vector() # optional - pynormaliz # optional - sage.rings.number_field # optional - sage.groups (1, 30, 60, 32, 1) - sage: id.base_ring() # optional - pynormaliz # optional - sage.rings.number_field + sage: id.base_ring() # optional - pynormaliz # optional - sage.rings.number_field # optional - sage.groups Number Field in sqrt5 with defining polynomial x^2 - 5 with sqrt5 = 2.236067977499790? - sage: TestSuite(id).run() # long time # optional - pynormaliz # optional - sage.rings.number_field + sage: TestSuite(id).run() # long time # optional - pynormaliz # optional - sage.rings.number_field # optional - sage.groups """ from sage.rings.number_field.number_field import QuadraticField from itertools import product @@ -1694,15 +1694,15 @@ def pentakis_dodecahedron(self, exact=True, base_ring=None, backend=None): A much faster implementation is obtained when setting ``exact=False``:: - sage: pd = polytopes.pentakis_dodecahedron(exact=False) - sage: pd.n_vertices() + sage: pd = polytopes.pentakis_dodecahedron(exact=False) # optional - sage.groups + sage: pd.n_vertices() # optional - sage.groups 32 - sage: pd.n_inequalities() + sage: pd.n_inequalities() # optional - sage.groups 60 The 60 are triangles:: - sage: all(len(f.vertices()) == 3 for f in pd.facets()) + sage: all(len(f.vertices()) == 3 for f in pd.facets()) # optional - sage.groups True """ return self.buckyball(exact=exact, base_ring=base_ring, backend=backend).polar() @@ -2226,22 +2226,22 @@ def six_hundred_cell(self, exact=False, backend=None): EXAMPLES:: - sage: p600 = polytopes.six_hundred_cell() - sage: p600 + sage: p600 = polytopes.six_hundred_cell() # optional - sage.groups + sage: p600 # optional - sage.groups A 4-dimensional polyhedron in RDF^4 defined as the convex hull of 120 vertices - sage: p600.f_vector() # long time ~2sec + sage: p600.f_vector() # long time ~2sec # optional - sage.groups (1, 120, 720, 1200, 600, 1) Computation with exact coordinates is currently too long to be useful:: - sage: p600 = polytopes.six_hundred_cell(exact=True) # not tested - very long time - sage: len(list(p600.bounded_edges())) # not tested - very long time + sage: p600 = polytopes.six_hundred_cell(exact=True) # not tested - very long time # optional - sage.groups + sage: len(list(p600.bounded_edges())) # not tested - very long time # optional - sage.groups 720 TESTS:: - sage: p600 = polytopes.six_hundred_cell(exact=True, backend='normaliz') # optional - pynormaliz - sage: len(list(p600.bounded_edges())) # optional - pynormaliz, long time + sage: p600 = polytopes.six_hundred_cell(exact=True, backend='normaliz') # optional - pynormaliz # optional - sage.groups # optional - sage.rings.number_field + sage: len(list(p600.bounded_edges())) # optional - pynormaliz, long time # optional - sage.groups # optional - sage.rings.number_field 720 """ if exact: @@ -2297,8 +2297,8 @@ def grand_antiprism(self, exact=True, backend=None, verbose=False): Computation with the backend ``'normaliz'`` is instantaneous:: - sage: gap_norm = polytopes.grand_antiprism(backend='normaliz') # optional - pynormaliz - sage: gap_norm # optional - pynormaliz + sage: gap_norm = polytopes.grand_antiprism(backend='normaliz') # optional - pynormaliz # optional - sage.rings.number_field + sage: gap_norm # optional - pynormaliz # optional - sage.rings.number_field A 4-dimensional polyhedron in (Number Field in sqrt5 with defining polynomial x^2 - 5 with sqrt5 = 2.236067977499790?)^4 defined as the convex hull of 100 vertices @@ -2516,7 +2516,7 @@ def permutahedron(self, n, project=False, backend=None): A 3-dimensional polyhedron in RDF^3 defined as the convex hull of 24 vertices sage: perm4.plot() # optional - sage.plot Graphics3d Object - sage: perm4.graph().is_isomorphic(graphs.BubbleSortGraph(4)) + sage: perm4.graph().is_isomorphic(graphs.BubbleSortGraph(4)) # optional - sage.graphs True As both Hrepresentation an Vrepresentation are known, the permutahedron can be set @@ -2594,32 +2594,32 @@ def generalized_permutahedron(self, coxeter_type, point=None, exact=True, regula EXAMPLES:: - sage: perm_a3 = polytopes.generalized_permutahedron(['A',3]); perm_a3 + sage: perm_a3 = polytopes.generalized_permutahedron(['A',3]); perm_a3 # optional - sage.combinat A 3-dimensional polyhedron in QQ^3 defined as the convex hull of 24 vertices You can put the starting point along the hyperplane of the first generator:: - sage: perm_a3_011 = polytopes.generalized_permutahedron(['A',3],[0,1,1]); perm_a3_011 + sage: perm_a3_011 = polytopes.generalized_permutahedron(['A',3],[0,1,1]); perm_a3_011 # optional - sage.combinat A 3-dimensional polyhedron in QQ^3 defined as the convex hull of 12 vertices - sage: perm_a3_110 = polytopes.generalized_permutahedron(['A',3],[1,1,0]); perm_a3_110 + sage: perm_a3_110 = polytopes.generalized_permutahedron(['A',3],[1,1,0]); perm_a3_110 # optional - sage.combinat A 3-dimensional polyhedron in QQ^3 defined as the convex hull of 12 vertices sage: perm_a3_110.is_combinatorially_isomorphic(perm_a3_011) True - sage: perm_a3_101 = polytopes.generalized_permutahedron(['A',3],[1,0,1]); perm_a3_101 + sage: perm_a3_101 = polytopes.generalized_permutahedron(['A',3],[1,0,1]); perm_a3_101 # optional - sage.combinat A 3-dimensional polyhedron in QQ^3 defined as the convex hull of 12 vertices - sage: perm_a3_110.is_combinatorially_isomorphic(perm_a3_101) + sage: perm_a3_110.is_combinatorially_isomorphic(perm_a3_101) # optional - sage.combinat False - sage: perm_a3_011.f_vector() + sage: perm_a3_011.f_vector() # optional - sage.combinat (1, 12, 18, 8, 1) - sage: perm_a3_101.f_vector() + sage: perm_a3_101.f_vector() # optional - sage.combinat (1, 12, 24, 14, 1) The usual output does not necessarily give a polyhedron with isometric vertex figures:: - sage: perm_a2 = polytopes.generalized_permutahedron(['A',2]) - sage: perm_a2.vertices() + sage: perm_a2 = polytopes.generalized_permutahedron(['A',2]) # optional - sage.combinat + sage: perm_a2.vertices() # optional - sage.combinat (A vertex at (-1, -1), A vertex at (-1, 0), A vertex at (0, -1), @@ -2629,7 +2629,7 @@ def generalized_permutahedron(self, coxeter_type, point=None, exact=True, regula It works also with Coxeter types that lead to non-rational coordinates:: - sage: perm_b3 = polytopes.generalized_permutahedron(['B',3]); perm_b3 # long time # optional - sage.rings.number_field + sage: perm_b3 = polytopes.generalized_permutahedron(['B',3]); perm_b3 # long time # optional - sage.combinat # optional - sage.rings.number_field A 3-dimensional polyhedron in (Number Field in a with defining polynomial x^2 - 2 with a = 1.414213562373095?)^3 defined as the convex hull of 48 vertices @@ -2639,8 +2639,8 @@ def generalized_permutahedron(self, coxeter_type, point=None, exact=True, regula rational coordinates. We first do the computations using floating point approximations (``RDF``):: - sage: perm_a2_inexact = polytopes.generalized_permutahedron(['A',2], exact=False) - sage: sorted(perm_a2_inexact.vertices()) + sage: perm_a2_inexact = polytopes.generalized_permutahedron(['A',2], exact=False) # optional - sage.combinat + sage: sorted(perm_a2_inexact.vertices()) # optional - sage.combinat [A vertex at (-1.0, -1.0), A vertex at (-1.0, 0.0), A vertex at (0.0, -1.0), @@ -2648,8 +2648,9 @@ def generalized_permutahedron(self, coxeter_type, point=None, exact=True, regula A vertex at (1.0, 0.0), A vertex at (1.0, 1.0)] - sage: perm_a2_inexact_reg = polytopes.generalized_permutahedron(['A',2], exact=False, regular=True) - sage: sorted(perm_a2_inexact_reg.vertices()) + sage: perm_a2_inexact_reg = polytopes.generalized_permutahedron(['A',2], exact=False, # optional - sage.combinat + ....: regular=True) + sage: sorted(perm_a2_inexact_reg.vertices()) # optional - sage.combinat [A vertex at (-1.0, 0.0), A vertex at (-0.5, -0.8660254038), A vertex at (-0.5, 0.8660254038), @@ -2659,8 +2660,8 @@ def generalized_permutahedron(self, coxeter_type, point=None, exact=True, regula We can do the same computation using exact arithmetic with the field ``AA``:: - sage: perm_a2_reg = polytopes.generalized_permutahedron(['A',2], regular=True) # optional - sage.rings.number_field - sage: V = sorted(perm_a2_reg.vertices()); V # random # optional - sage.rings.number_field + sage: perm_a2_reg = polytopes.generalized_permutahedron(['A',2], regular=True) # optional - sage.combinat # optional - sage.rings.number_field + sage: V = sorted(perm_a2_reg.vertices()); V # random # optional - sage.combinat # optional - sage.rings.number_field [A vertex at (-1, 0), A vertex at (-1/2, -0.866025403784439?), A vertex at (-1/2, 0.866025403784439?), @@ -2671,60 +2672,60 @@ def generalized_permutahedron(self, coxeter_type, point=None, exact=True, regula Even though the numbers look like floating point approximations, the computation is actually exact. We can clean up the display a bit using ``exactify``:: - sage: for v in V: # optional - sage.rings.number_field + sage: for v in V: # optional - sage.combinat # optional - sage.rings.number_field ....: for x in v: ....: x.exactify() - sage: V # optional - sage.rings.number_field + sage: V # optional - sage.combinat # optional - sage.rings.number_field [A vertex at (-1, 0), A vertex at (-1/2, -0.866025403784439?), A vertex at (-1/2, 0.866025403784439?), A vertex at (1/2, -0.866025403784439?), A vertex at (1/2, 0.866025403784439?), A vertex at (1, 0)] - sage: perm_a2_reg.is_inscribed() # optional - sage.rings.number_field + sage: perm_a2_reg.is_inscribed() # optional - sage.combinat # optional - sage.rings.number_field True Larger examples take longer:: - sage: perm_a3_reg = polytopes.generalized_permutahedron(['A',3], regular=True); perm_a3_reg # long time # optional - sage.rings.number_field + sage: perm_a3_reg = polytopes.generalized_permutahedron(['A',3], regular=True); perm_a3_reg # long time # optional - sage.rings.number_field # optional - sage.combinat A 3-dimensional polyhedron in AA^3 defined as the convex hull of 24 vertices - sage: perm_a3_reg.is_inscribed() # long time # optional - sage.rings.number_field + sage: perm_a3_reg.is_inscribed() # long time # optional - sage.rings.number_field # optional - sage.combinat True - sage: perm_b3_reg = polytopes.generalized_permutahedron(['B',3], regular=True); perm_b3_reg # not tested - long time (12sec on 64 bits). + sage: perm_b3_reg = polytopes.generalized_permutahedron(['B',3], regular=True); perm_b3_reg # not tested # optional - sage.rings.number_field # optional - sage.combinat # long time (12sec on 64 bits) A 3-dimensional polyhedron in AA^3 defined as the convex hull of 48 vertices It is faster with the backend ``'number_field'``, which internally uses an embedded number field instead of doing the computations directly with the base ring (``AA``):: - sage: perm_a3_reg_nf = polytopes.generalized_permutahedron( # optional - sage.rings.number_field + sage: perm_a3_reg_nf = polytopes.generalized_permutahedron( # optional - sage.rings.number_field # optional - sage.combinat ....: ['A',3], regular=True, backend='number_field'); perm_a3_reg_nf A 3-dimensional polyhedron in AA^3 defined as the convex hull of 24 vertices - sage: perm_a3_reg_nf.is_inscribed() # optional - sage.rings.number_field + sage: perm_a3_reg_nf.is_inscribed() # optional - sage.rings.number_field # optional - sage.combinat True - sage: perm_b3_reg_nf = polytopes.generalized_permutahedron( # long time # optional - sage.rings.number_field + sage: perm_b3_reg_nf = polytopes.generalized_permutahedron( # long time # optional - sage.rings.number_field # optional - sage.combinat ....: ['B',3], regular=True, backend='number_field'); perm_b3_reg_nf A 3-dimensional polyhedron in AA^3 defined as the convex hull of 48 vertices It is even faster with the backend ``'normaliz'``:: - sage: perm_a3_reg_norm = polytopes.generalized_permutahedron( # optional - pynormaliz + sage: perm_a3_reg_norm = polytopes.generalized_permutahedron( # optional - pynormaliz # optional - sage.rings.number_field # optional - sage.combinat ....: ['A',3], regular=True, backend='normaliz'); perm_a3_reg_norm A 3-dimensional polyhedron in AA^3 defined as the convex hull of 24 vertices - sage: perm_a3_reg_norm.is_inscribed() # optional - pynormaliz + sage: perm_a3_reg_norm.is_inscribed() # optional - pynormaliz # optional - sage.rings.number_field # optional - sage.combinat True - sage: perm_b3_reg_norm = polytopes.generalized_permutahedron( # optional - pynormaliz + sage: perm_b3_reg_norm = polytopes.generalized_permutahedron( # optional - pynormaliz # optional - sage.rings.number_field # optional - sage.combinat ....: ['B',3], regular=True, backend='normaliz'); perm_b3_reg_norm A 3-dimensional polyhedron in AA^3 defined as the convex hull of 48 vertices The speedups from using backend ``'normaliz'`` allow us to go even further:: - sage: perm_h3 = polytopes.generalized_permutahedron(['H',3], backend='normaliz') # optional - pynormaliz - sage: perm_h3 # optional - pynormaliz + sage: perm_h3 = polytopes.generalized_permutahedron(['H',3], backend='normaliz') # optional - pynormaliz # optional - sage.rings.number_field # optional - sage.combinat + sage: perm_h3 # optional - pynormaliz # optional - sage.rings.number_field # optional - sage.combinat A 3-dimensional polyhedron in (Number Field in a with defining polynomial x^2 - 5 with a = 2.236067977499790?)^3 defined as the convex hull of 120 vertices - sage: perm_f4 = polytopes.generalized_permutahedron(['F',4], backend='normaliz') # long time # optional - pynormaliz - sage: perm_f4 # long time # optional - pynormaliz + sage: perm_f4 = polytopes.generalized_permutahedron(['F',4], backend='normaliz') # long time # optional - pynormaliz # optional - sage.rings.number_field # optional - sage.combinat + sage: perm_f4 # long time # optional - pynormaliz # optional - sage.rings.number_field # optional - sage.combinat A 4-dimensional polyhedron in (Number Field in a with defining polynomial x^2 - 2 with a = 1.414213562373095?)^4 defined as the convex hull of 1152 vertices @@ -2736,7 +2737,7 @@ def generalized_permutahedron(self, coxeter_type, point=None, exact=True, regula TESTS:: - sage: TestSuite(perm_h3).run() # optional - pynormaliz + sage: TestSuite(perm_h3).run() # optional - pynormaliz # optional - sage.rings.number_field # optional - sage.combinat """ from sage.combinat.root_system.coxeter_group import CoxeterGroup try: @@ -3225,7 +3226,7 @@ def hypercube(self, dim, intervals=None, backend=None): sage: P = polytopes.hypercube(2, [[1/2, 2], [0, 1]]) sage: P = polytopes.hypercube(2, [[1/2, 2], [0, 1.0]]) - sage: P = polytopes.hypercube(2, [[1/2, 2], [0, AA(2).sqrt()]]) + sage: P = polytopes.hypercube(2, [[1/2, 2], [0, AA(2).sqrt()]]) # optional - sage.rings.number_field sage: P = polytopes.hypercube(2, [[1/2, 2], [0, 1.0]], backend='ppl') Traceback (most recent call last): ... @@ -3412,16 +3413,16 @@ def parallelotope(self, generators, backend=None): sage: polytopes.parallelotope([[1,2,3,4],[0,1,0,7],[3,1,0,2],[0,0,1,0]]) A 4-dimensional polyhedron in ZZ^4 defined as the convex hull of 16 vertices - sage: K = QuadraticField(2, 'sqrt2') - sage: sqrt2 = K.gen() - sage: P = polytopes.parallelotope([ (1,sqrt2), (1,-1) ]); P + sage: K = QuadraticField(2, 'sqrt2') # optional - sage.rings.number_field + sage: sqrt2 = K.gen() # optional - sage.rings.number_field + sage: P = polytopes.parallelotope([(1, sqrt2), (1, -1)]); P # optional - sage.rings.number_field A 2-dimensional polyhedron in (Number Field in sqrt2 with defining polynomial x^2 - 2 with sqrt2 = 1.414213562373095?)^2 defined as the convex hull of 4 vertices TESTS:: - sage: TestSuite(P).run() + sage: TestSuite(P).run() # optional - sage.rings.number_field """ from sage.modules.free_module_element import vector generators = [vector(v) for v in generators] diff --git a/src/sage/geometry/polyhedron/parent.py b/src/sage/geometry/polyhedron/parent.py index 2b87a343b41..8e2e868294d 100644 --- a/src/sage/geometry/polyhedron/parent.py +++ b/src/sage/geometry/polyhedron/parent.py @@ -858,16 +858,18 @@ def _coerce_base_ring(self, other): Test that :trac:`28770` is fixed:: sage: z = QQ['z'].0 - sage: K = NumberField(z^2 - 2,'s') - sage: triangle_QQ._coerce_base_ring(K) + sage: K = NumberField(z^2 - 2, 's') # optional - sage.rings.number_field + sage: triangle_QQ._coerce_base_ring(K) # optional - sage.rings.number_field Number Field in s with defining polynomial z^2 - 2 - sage: triangle_QQ._coerce_base_ring(K.gen()) + sage: triangle_QQ._coerce_base_ring(K.gen()) # optional - sage.rings.number_field Number Field in s with defining polynomial z^2 - 2 sage: z = QQ['z'].0 - sage: K = NumberField(z^2 - 2,'s') - sage: K.gen()*polytopes.simplex(backend='field') - A 3-dimensional polyhedron in (Number Field in s with defining polynomial z^2 - 2)^4 defined as the convex hull of 4 vertices + sage: K = NumberField(z^2 - 2, 's') # optional - sage.rings.number_field + sage: K.gen() * polytopes.simplex(backend='field') # optional - sage.rings.number_field + A 3-dimensional polyhedron in + (Number Field in s with defining polynomial z^2 - 2)^4 + defined as the convex hull of 4 vertices """ from sage.structure.element import Element if isinstance(other, Element): diff --git a/src/sage/geometry/polyhedron/plot.py b/src/sage/geometry/polyhedron/plot.py index a4c30cadd0c..c53357404c6 100644 --- a/src/sage/geometry/polyhedron/plot.py +++ b/src/sage/geometry/polyhedron/plot.py @@ -341,23 +341,23 @@ def __init__(self, polyhedron, proj=projection_func_identity): EXAMPLES:: - sage: p = polytopes.icosahedron(exact=False) + sage: p = polytopes.icosahedron(exact=False) # optional - sage.groups sage: from sage.geometry.polyhedron.plot import Projection - sage: Projection(p) + sage: Projection(p) # optional - sage.groups The projection of a polyhedron into 3 dimensions sage: def pr_12(x): return [x[1],x[2]] - sage: Projection(p, pr_12) + sage: Projection(p, pr_12) # optional - sage.groups The projection of a polyhedron into 2 dimensions - sage: Projection(p, lambda x: [x[1],x[2]] ) # another way of doing the same projection + sage: Projection(p, lambda x: [x[1],x[2]] ) # another way of doing the same projection # optional - sage.groups The projection of a polyhedron into 2 dimensions - sage: _.plot() # plot of the projected icosahedron in 2d # optional - sage.plot + sage: _.plot() # plot of the projected icosahedron in 2d # optional - sage.plot # optional - sage.groups Graphics object consisting of 51 graphics primitives - sage: proj = Projection(p) - sage: proj.stereographic([1,2,3]) + sage: proj = Projection(p) # optional - sage.groups + sage: proj.stereographic([1,2,3]) # optional - sage.groups The projection of a polyhedron into 2 dimensions - sage: proj.plot() # optional - sage.plot + sage: proj.plot() # optional - sage.plot # optional - sage.groups Graphics object consisting of 51 graphics primitives - sage: TestSuite(proj).run(skip='_test_pickling') + sage: TestSuite(proj).run(skip='_test_pickling') # optional - sage.groups """ self.parent_polyhedron = polyhedron self.coords = Sequence([]) @@ -406,12 +406,12 @@ def __call__(self, proj=projection_func_identity): EXAMPLES:: - sage: p = polytopes.icosahedron(exact=False) + sage: p = polytopes.icosahedron(exact=False) # optional - sage.groups sage: from sage.geometry.polyhedron.plot import Projection - sage: pproj = Projection(p) + sage: pproj = Projection(p) # optional - sage.groups sage: from sage.geometry.polyhedron.plot import ProjectionFuncStereographic - sage: pproj_stereo = pproj.__call__(proj = ProjectionFuncStereographic([1,2,3])) - sage: sorted(pproj_stereo.polygons) + sage: pproj_stereo = pproj.__call__(proj=ProjectionFuncStereographic([1, 2, 3])) # optional - sage.groups + sage: sorted(pproj_stereo.polygons) # optional - sage.groups [[2, 0, 9], [3, 1, 10], [4, 0, 8], @@ -430,11 +430,11 @@ def identity(self): EXAMPLES:: - sage: p = polytopes.icosahedron(exact=False) + sage: p = polytopes.icosahedron(exact=False) # optional - sage.groups sage: from sage.geometry.polyhedron.plot import Projection - sage: pproj = Projection(p) - sage: ppid = pproj.identity() - sage: ppid.dimension + sage: pproj = Projection(p) # optional - sage.groups + sage: ppid = pproj.identity() # optional - sage.groups + sage: ppid.dimension # optional - sage.groups 3 """ return self(projection_func_identity) @@ -952,10 +952,10 @@ def render_points_2d(self, **kwds): EXAMPLES:: - sage: hex = polytopes.regular_polygon(6) - sage: proj = hex.projection() - sage: hex_points = proj.render_points_2d() # optional - sage.plot - sage: hex_points._objects # optional - sage.plot + sage: hex = polytopes.regular_polygon(6) # optional - sage.rings.number_field + sage: proj = hex.projection() # optional - sage.rings.number_field + sage: hex_points = proj.render_points_2d() # optional - sage.plot # optional - sage.rings.number_field + sage: hex_points._objects # optional - sage.plot # optional - sage.rings.number_field [Point set defined by 6 point(s)] """ return point2d(self.coordinates_of(self.points), **kwds) @@ -966,9 +966,9 @@ def render_outline_2d(self, **kwds): EXAMPLES:: - sage: penta = polytopes.regular_polygon(5) - sage: outline = penta.projection().render_outline_2d() # optional - sage.plot - sage: outline._objects[0] # optional - sage.plot + sage: penta = polytopes.regular_polygon(5) # optional - sage.rings.number_field + sage: outline = penta.projection().render_outline_2d() # optional - sage.plot # optional - sage.rings.number_field + sage: outline._objects[0] # optional - sage.plot # optional - sage.rings.number_field Line defined by 2 points """ wireframe = [] @@ -1291,11 +1291,11 @@ def tikz(self, view=[0, 0, 1], angle=0, scale=1, EXAMPLES:: - sage: P1 = polytopes.small_rhombicuboctahedron() - sage: Image1 = P1.projection().tikz([1,3,5], 175, scale=4, output_type='TikzPicture') - sage: type(Image1) + sage: P1 = polytopes.small_rhombicuboctahedron() # optional - sage.rings.number_field + sage: Image1 = P1.projection().tikz([1,3,5], 175, scale=4, output_type='TikzPicture') # optional - sage.rings.number_field + sage: type(Image1) # optional - sage.rings.number_field - sage: Image1 + sage: Image1 # optional - sage.rings.number_field \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}% @@ -1312,14 +1312,14 @@ def tikz(self, view=[0, 0, 1], angle=0, scale=1, %% \end{tikzpicture} \end{document} - sage: _ = Image1.tex('polytope-tikz1.tex') # not tested - sage: _ = Image1.png('polytope-tikz1.png') # not tested - sage: _ = Image1.pdf('polytope-tikz1.pdf') # not tested - sage: _ = Image1.svg('polytope-tikz1.svg') # not tested + sage: _ = Image1.tex('polytope-tikz1.tex') # not tested # optional - sage.rings.number_field + sage: _ = Image1.png('polytope-tikz1.png') # not tested # optional - sage.rings.number_field + sage: _ = Image1.pdf('polytope-tikz1.pdf') # not tested # optional - sage.rings.number_field + sage: _ = Image1.svg('polytope-tikz1.svg') # not tested # optional - sage.rings.number_field A second example:: - sage: P2 = Polyhedron(vertices=[[1, 1],[1, 2],[2, 1]]) + sage: P2 = Polyhedron(vertices=[[1, 1], [1, 2], [2, 1]]) sage: Image2 = P2.projection().tikz(scale=3, edge_color='blue!95!black', facet_color='orange!95!black', opacity=0.4, vertex_color='yellow', axis=True, output_type='TikzPicture') sage: Image2 \documentclass[tikz]{standalone} @@ -1354,10 +1354,12 @@ def tikz(self, view=[0, 0, 1], angle=0, scale=1, A third example:: - sage: P3 = Polyhedron(vertices=[[-1, -1, 2],[-1, 2, -1],[2, -1, -1]]) + sage: P3 = Polyhedron(vertices=[[-1, -1, 2], [-1, 2, -1], [2, -1, -1]]) sage: P3 A 2-dimensional polyhedron in ZZ^3 defined as the convex hull of 3 vertices - sage: Image3 = P3.projection().tikz([0.5,-1,-0.1], 55, scale=3, edge_color='blue!95!black',facet_color='orange!95!black', opacity=0.7, vertex_color='yellow', axis=True, output_type='TikzPicture') + sage: Image3 = P3.projection().tikz([0.5, -1, -0.1], 55, scale=3, edge_color='blue!95!black', # optional - sage.plot + ....: facet_color='orange!95!black', opacity=0.7, + ....: vertex_color='yellow', axis=True, output_type='TikzPicture') sage: Image3 \documentclass[tikz]{standalone} \begin{document} @@ -1600,21 +1602,23 @@ def _tikz_2d_in_3d(self, view, angle, scale, edge_color, facet_color, sage: P = Polyhedron(vertices=[[-1, -1, 2],[-1, 2, -1],[2, -1, -1]]) sage: P A 2-dimensional polyhedron in ZZ^3 defined as the convex hull of 3 vertices - sage: Image = P.projection()._tikz_2d_in_3d(view=[0.5,-1,-0.5], angle=55, scale=3, edge_color='blue!95!black', facet_color='orange', opacity=0.5, vertex_color='yellow', axis=True) - sage: print('\n'.join(Image.splitlines()[:4])) + sage: Image = P.projection()._tikz_2d_in_3d(view=[0.5, -1, -0.5], angle=55, scale=3, # optional - sage.plot + ....: edge_color='blue!95!black', facet_color='orange', + ....: opacity=0.5, vertex_color='yellow', axis=True) + sage: print('\n'.join(Image.splitlines()[:4])) # optional - sage.plot \begin{tikzpicture}% [x={(0.644647cm, -0.476559cm)}, y={(0.192276cm, 0.857859cm)}, z={(-0.739905cm, -0.192276cm)}, - sage: with open('polytope-tikz3.tex', 'w') as f: # not tested + sage: with open('polytope-tikz3.tex', 'w') as f: # not tested # optional - sage.plot ....: _ = f.write(Image) :: - sage: p = Polyhedron(vertices=[[1,0,0],[0,1,0],[0,0,1]]) + sage: p = Polyhedron(vertices=[[1, 0, 0], [0, 1, 0], [0, 0, 1]]) sage: proj = p.projection() - sage: Img = proj.tikz([1,1,1],130,axis=True, output_type='LatexExpr') - sage: print('\n'.join(Img.splitlines()[12:21])) + sage: Img = proj.tikz([1, 1, 1], 130, axis=True, output_type='LatexExpr') # optional - sage.plot + sage: print('\n'.join(Img.splitlines()[12:21])) # optional - sage.plot %% with the command: ._tikz_2d_in_3d and parameters: %% view = [1, 1, 1] %% angle = 130 @@ -1747,23 +1751,28 @@ def _tikz_3d_in_3d(self, view, angle, scale, edge_color, EXAMPLES:: - sage: P = polytopes.small_rhombicuboctahedron() - sage: Image = P.projection()._tikz_3d_in_3d([3,7,5], 100, scale=3, edge_color='blue', facet_color='orange', opacity=0.5, vertex_color='green', axis=True) - sage: type(Image) + sage: P = polytopes.small_rhombicuboctahedron() # optional - sage.rings.number_field + sage: Image = P.projection()._tikz_3d_in_3d([3, 7, 5], 100, scale=3, + ....: edge_color='blue', facet_color='orange', + ....: opacity=0.5, vertex_color='green', axis=True) + sage: type(Image) # optional - sage.rings.number_field sage: print('\n'.join(Image.splitlines()[:4])) \begin{tikzpicture}% [x={(-0.046385cm, 0.837431cm)}, y={(-0.243536cm, 0.519228cm)}, z={(0.968782cm, 0.170622cm)}, - sage: with open('polytope-tikz1.tex', 'w') as f: # not tested + sage: with open('polytope-tikz1.tex', 'w') as f: # not tested # optional - sage.rings.number_field ....: _ = f.write(Image) :: - sage: Associahedron = Polyhedron(vertices=[[1,0,1],[1,0,0],[1,1,0],[0,0,-1],[0,1,0],[-1,0,0],[0,1,1],[0,0,1],[0,-1,0]]).polar() - sage: ImageAsso = Associahedron.projection().tikz([-15,-755,-655], 116, scale=1, output_type='LatexExpr') - sage: print('\n'.join(ImageAsso.splitlines()[12:30])) + sage: Associahedron = Polyhedron(vertices=[[1, 0, 1], [1, 0, 0], [1, 1, 0], + ....: [0, 0, -1], [0, 1, 0], [-1, 0, 0], + ....: [0, 1, 1], [0, 0, 1], [0, -1, 0]]).polar() + sage: ImageAsso = Associahedron.projection().tikz([-15, -755, -655], 116, scale=1, # optional - sage.plot + ....: output_type='LatexExpr') + sage: print('\n'.join(ImageAsso.splitlines()[12:30])) # optional - sage.plot %% with the command: ._tikz_3d_in_3d and parameters: %% view = [-15, -755, -655] %% angle = 116 diff --git a/src/sage/numerical/all__sagemath_polyhedra.py b/src/sage/numerical/all__sagemath_polyhedra.py new file mode 100644 index 00000000000..6de2a9af502 --- /dev/null +++ b/src/sage/numerical/all__sagemath_polyhedra.py @@ -0,0 +1,9 @@ +from sage.misc.lazy_import import lazy_import + +lazy_import("sage.numerical.mip", ["MixedIntegerLinearProgram"]) +lazy_import("sage.numerical.sdp", ["SemidefiniteProgram"]) +lazy_import("sage.numerical.backends.generic_backend", ["default_mip_solver"]) +lazy_import("sage.numerical.backends.generic_sdp_backend", ["default_sdp_solver"]) + +lazy_import("sage.numerical.interactive_simplex_method", + ["InteractiveLPProblem", "InteractiveLPProblemStandardForm"]) diff --git a/src/sage/numerical/backends/all__sagemath_polyhedra.py b/src/sage/numerical/backends/all__sagemath_polyhedra.py new file mode 100644 index 00000000000..e69de29bb2d From f01367ad1034ce377598569f5a3cd4bf4d906957 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 27 Jan 2023 22:39:22 -0800 Subject: [PATCH 495/751] sage.geometry.polyhedron: More # optional --- src/sage/features/sagemath.py | 22 +++++++ src/sage/geometry/polyhedron/base.py | 24 +++---- src/sage/geometry/polyhedron/base6.py | 16 ++--- src/sage/geometry/polyhedron/base_QQ.py | 20 +++--- src/sage/geometry/polyhedron/constructor.py | 9 +-- src/sage/geometry/polyhedron/library.py | 62 +++++++++---------- src/sage/geometry/polyhedron/parent.py | 4 +- src/sage/geometry/polyhedron/plot.py | 35 +++++++---- .../polyhedron/ppl_lattice_polytope.py | 2 +- .../interfaces/all__sagemath_polyhedra.py | 0 .../numerical/backends/generic_backend.pyx | 3 +- 11 files changed, 115 insertions(+), 82 deletions(-) create mode 100644 src/sage/interfaces/all__sagemath_polyhedra.py diff --git a/src/sage/features/sagemath.py b/src/sage/features/sagemath.py index 58552614425..4085679dbd8 100644 --- a/src/sage/features/sagemath.py +++ b/src/sage/features/sagemath.py @@ -209,6 +209,27 @@ def __init__(self): PythonModule.__init__(self, 'sage.rings.real_double') +class sage__rings__real_mpfr(PythonModule): + r""" + A :class:`~sage.features.Feature` describing the presence of :mod:`sage.rings.real_mpfr`. + + EXAMPLES:: + + sage: from sage.features.sagemath import sage__rings__real_mpfr + sage: sage__rings__real_mpfr().is_present() # optional - sage.rings.real_mpfr + FeatureTestResult('sage.rings.real_mpfr', True) + """ + def __init__(self): + r""" + TESTS:: + + sage: from sage.features.sagemath import sage__rings__real_mpfr + sage: isinstance(sage__rings__real_mpfr(), sage__rings__real_mpfr) + True + """ + PythonModule.__init__(self, 'sage.rings.real_mpfr') + + class sage__symbolic(JoinFeature): r""" A :class:`~sage.features.Feature` describing the presence of :mod:`sage.symbolic`. @@ -263,4 +284,5 @@ def all_features(): sage__rings__number_field(), sage__rings__padics(), sage__rings__real_double(), + sage__rings__real_mpfr(), sage__symbolic()] diff --git a/src/sage/geometry/polyhedron/base.py b/src/sage/geometry/polyhedron/base.py index 9704f6ea607..f28560bad05 100644 --- a/src/sage/geometry/polyhedron/base.py +++ b/src/sage/geometry/polyhedron/base.py @@ -623,7 +623,7 @@ def hyperplane_arrangement(self): EXAMPLES:: sage: p = polytopes.hypercube(2) - sage: p.hyperplane_arrangement() + sage: p.hyperplane_arrangement() # optional - sage.combinat Arrangement <-t0 + 1 | -t1 + 1 | t1 + 1 | t0 + 1> """ names = tuple('t' + str(i) for i in range(self.ambient_dim())) @@ -966,16 +966,16 @@ def permutations_to_matrices(self, conj_class_reps, acting_group=None, additiona of the vertices of the square:: sage: square = Polyhedron(vertices=[[1,1],[-1,1],[-1,-1],[1,-1]], backend='normaliz') # optional - pynormaliz - sage: square.vertices() # optional - pynormaliz + sage: square.vertices() # optional - pynormaliz (A vertex at (-1, -1), A vertex at (-1, 1), A vertex at (1, -1), A vertex at (1, 1)) - sage: aut_square = square.restricted_automorphism_group(output = 'permutation') # optional - pynormaliz - sage: conj_reps = aut_square.conjugacy_classes_representatives() # optional - pynormaliz - sage: gens_dict = square.permutations_to_matrices(conj_reps); # optional - pynormaliz - sage: rotation_180 = aut_square([(0,3),(1,2)]) # optional - pynormaliz - sage: rotation_180,gens_dict[rotation_180] # optional - pynormaliz + sage: aut_square = square.restricted_automorphism_group(output='permutation') # optional - pynormaliz # optional - sage.groups + sage: conj_reps = aut_square.conjugacy_classes_representatives() # optional - pynormaliz # optional - sage.groups + sage: gens_dict = square.permutations_to_matrices(conj_reps); # optional - pynormaliz # optional - sage.groups + sage: rotation_180 = aut_square([(0,3),(1,2)]) # optional - pynormaliz # optional - sage.groups + sage: rotation_180, gens_dict[rotation_180] # optional - pynormaliz # optional - sage.groups ( [-1 0 0] [ 0 -1 0] @@ -985,11 +985,11 @@ def permutations_to_matrices(self, conj_class_reps, acting_group=None, additiona This example tests the functionality for additional elements:: sage: C = polytopes.cross_polytope(2) - sage: G = C.restricted_automorphism_group(output = 'permutation') - sage: conj_reps = G.conjugacy_classes_representatives() - sage: add_elt = G([(0,2,3,1)]) - sage: dict = C.permutations_to_matrices(conj_reps,additional_elts = [add_elt]) - sage: dict[add_elt] + sage: G = C.restricted_automorphism_group(output='permutation') # optional - sage.groups # optional - sage.rings.real_mpfr + sage: conj_reps = G.conjugacy_classes_representatives() # optional - sage.groups # optional - sage.rings.real_mpfr + sage: add_elt = G([(0, 2, 3, 1)]) # optional - sage.groups # optional - sage.rings.real_mpfr + sage: dict = C.permutations_to_matrices(conj_reps,additional_elts = [add_elt]) # optional - sage.groups # optional - sage.rings.real_mpfr + sage: dict[add_elt] # optional - sage.groups # optional - sage.rings.real_mpfr [ 0 1 0] [-1 0 0] [ 0 0 1] diff --git a/src/sage/geometry/polyhedron/base6.py b/src/sage/geometry/polyhedron/base6.py index a279898247e..cf6ffe8f2a2 100644 --- a/src/sage/geometry/polyhedron/base6.py +++ b/src/sage/geometry/polyhedron/base6.py @@ -573,7 +573,7 @@ def tikz(self, view=[0, 0, 1], angle=0, scale=1, %% opacity = 0.8 %% vertex_color = green %% axis = False - sage: print('\n'.join(Img.content().splitlines()[22:26])) + sage: print('\n'.join(Img.content().splitlines()[22:26])) # optional - sage.plot %% Coordinate of the vertices: %% \coordinate (-1.00000, -1.00000, 0.00000) at (-1.00000, -1.00000, 0.00000); @@ -860,17 +860,17 @@ def schlegel_projection(self, facet=None, position=None): sage: tfcube.facets()[4] A 3-dimensional face of a Polyhedron in QQ^4 defined as the convex hull of 4 vertices - sage: sp = tfcube.schlegel_projection(tfcube.facets()[4]) - sage: sp.plot() # optional - sage.plot + sage: sp = tfcube.schlegel_projection(tfcube.facets()[4]) # optional - sage.symbolic + sage: sp.plot() # optional - sage.plot # optional - sage.symbolic Graphics3d Object A different values of ``position`` changes the projection:: - sage: sp = tfcube.schlegel_projection(tfcube.facets()[4],1/2) - sage: sp.plot() # optional - sage.plot + sage: sp = tfcube.schlegel_projection(tfcube.facets()[4], 1/2) # optional - sage.symbolic + sage: sp.plot() # optional - sage.plot # optional - sage.symbolic Graphics3d Object - sage: sp = tfcube.schlegel_projection(tfcube.facets()[4],4) - sage: sp.plot() # optional - sage.plot + sage: sp = tfcube.schlegel_projection(tfcube.facets()[4], 4) # optional - sage.symbolic + sage: sp.plot() # optional - sage.plot # optional - sage.symbolic Graphics3d Object A value which is too large give a projection point that sees more than @@ -966,7 +966,7 @@ def _affine_hull_projection(self, *, sage: P = Polyhedron(V) sage: P.affine_hull_projection() A 4-dimensional polyhedron in ZZ^4 defined as the convex hull of 6 vertices - sage: P.affine_hull_projection(orthonormal=True) + sage: P.affine_hull_projection(orthonormal=True) # optional - sage.symbolic Traceback (most recent call last): ... ValueError: the base ring needs to be extended; try with "extend=True" diff --git a/src/sage/geometry/polyhedron/base_QQ.py b/src/sage/geometry/polyhedron/base_QQ.py index 0efcb15f1a2..de26b9acbd9 100644 --- a/src/sage/geometry/polyhedron/base_QQ.py +++ b/src/sage/geometry/polyhedron/base_QQ.py @@ -150,12 +150,12 @@ def integral_points_count(self, verbose=False, use_Hrepresentation=False, "Fibonacci" knapsacks (preprocessing helps a lot):: - sage: def fibonacci_knapsack(d, b, backend=None): + sage: def fibonacci_knapsack(d, b, backend=None): # optional - sage.combinat ....: lp = MixedIntegerLinearProgram(base_ring=QQ) ....: x = lp.new_variable(nonnegative=True) ....: lp.add_constraint(lp.sum(fibonacci(i+3)*x[i] for i in range(d)) <= b) ....: return lp.polyhedron(backend=backend) - sage: fibonacci_knapsack(20, 12).integral_points_count() # does not finish with preprocess=False + sage: fibonacci_knapsack(20, 12).integral_points_count() # does not finish with preprocess=False # optional - sage.combinat 33 TESTS: @@ -931,20 +931,20 @@ def fixed_subpolytopes(self, conj_class_reps): sage: p = polytopes.hypercube(2, backend = 'normaliz'); p # optional - pynormaliz A 2-dimensional polyhedron in ZZ^2 defined as the convex hull of 4 vertices - sage: aut_p = p.restricted_automorphism_group(output = 'permutation') # optional - pynormaliz - sage: aut_p.order() # optional - pynormaliz + sage: aut_p = p.restricted_automorphism_group(output='permutation') # optional - pynormaliz # optional - sage.groups + sage: aut_p.order() # optional - pynormaliz # optional - sage.groups 8 - sage: conj_list = aut_p.conjugacy_classes_representatives(); # optional - pynormaliz - sage: fixedpolytopes_dictionary = p.fixed_subpolytopes(conj_list) # optional - pynormaliz - sage: fixedpolytopes_dictionary[aut_p([(0,3),(1,2)])] # optional - pynormaliz + sage: conj_list = aut_p.conjugacy_classes_representatives(); # optional - pynormaliz # optional - sage.groups + sage: fixedpolytopes_dictionary = p.fixed_subpolytopes(conj_list) # optional - pynormaliz # optional - sage.groups + sage: fixedpolytopes_dictionary[aut_p([(0,3),(1,2)])] # optional - pynormaliz # optional - sage.groups A 0-dimensional polyhedron in QQ^2 defined as the convex hull of 1 vertex TESTS:: sage: P = Polyhedron(vertices=[[1, 1]], rays=[[1, 1]]) - sage: aut_P = P.restricted_automorphism_group(output = 'permutation') - sage: conj_list = aut_P.conjugacy_classes_representatives() - sage: P.fixed_subpolytopes(conj_list) + sage: aut_P = P.restricted_automorphism_group(output='permutation') # optional - sage.groups + sage: conj_list = aut_P.conjugacy_classes_representatives() # optional - sage.groups + sage: P.fixed_subpolytopes(conj_list) # optional - sage.groups Traceback (most recent call last): ... NotImplementedError: unbounded polyhedra are not supported diff --git a/src/sage/geometry/polyhedron/constructor.py b/src/sage/geometry/polyhedron/constructor.py index 971e36388f4..0a8cc1854ac 100644 --- a/src/sage/geometry/polyhedron/constructor.py +++ b/src/sage/geometry/polyhedron/constructor.py @@ -217,7 +217,7 @@ A 0-dimensional polyhedron in RDF^2 defined as the convex hull of 1 vertex sage: Polyhedron(vertices = [[1.12345678901234, 2.123456789012345]]) A 0-dimensional polyhedron in RDF^2 defined as the convex hull of 1 vertex - sage: Polyhedron(vertices = [[1.123456789012345, 2.123456789012345]]) + sage: Polyhedron(vertices = [[1.123456789012345, 2.123456789012345]]) # optional - sage.rings.real_mpfr Traceback (most recent call last): ... ValueError: the only allowed inexact ring is 'RDF' with backend 'cdd' @@ -563,18 +563,19 @@ def Polyhedron(vertices=None, rays=None, lines=None, Check that input with too many bits of precision returns an error (see :trac:`22552`):: - sage: Polyhedron(vertices=[(8.3319544851638732, 7.0567045956967727), (6.4876921900819049, 4.8435898415984129)]) + sage: Polyhedron(vertices=[(8.3319544851638732, 7.0567045956967727), # optional - sage.rings.real_mpfr + ....: (6.4876921900819049, 4.8435898415984129)]) Traceback (most recent call last): ... ValueError: the only allowed inexact ring is 'RDF' with backend 'cdd' Check that setting ``base_ring`` to a ``RealField`` returns an error (see :trac:`22552`):: - sage: Polyhedron(vertices =[(8.3, 7.0), (6.4, 4.8)], base_ring=RealField(40)) + sage: Polyhedron(vertices=[(8.3, 7.0), (6.4, 4.8)], base_ring=RealField(40)) # optional - sage.rings.real_mpfr Traceback (most recent call last): ... ValueError: no default backend for computations with Real Field with 40 bits of precision - sage: Polyhedron(vertices =[(8.3, 7.0), (6.4, 4.8)], base_ring=RealField(53)) + sage: Polyhedron(vertices=[(8.3, 7.0), (6.4, 4.8)], base_ring=RealField(53)) # optional - sage.rings.real_mpfr Traceback (most recent call last): ... ValueError: no default backend for computations with Real Field with 53 bits of precision diff --git a/src/sage/geometry/polyhedron/library.py b/src/sage/geometry/polyhedron/library.py index f9fb4e192cd..f621f9329ff 100644 --- a/src/sage/geometry/polyhedron/library.py +++ b/src/sage/geometry/polyhedron/library.py @@ -724,18 +724,18 @@ def icosahedron(self, exact=True, base_ring=None, backend=None): Its non exact version:: - sage: ico = polytopes.icosahedron(exact=False) - sage: ico.base_ring() + sage: ico = polytopes.icosahedron(exact=False) # optional - sage.groups + sage: ico.base_ring() # optional - sage.groups Real Double Field - sage: ico.volume() # known bug (trac 18214) + sage: ico.volume() # known bug (trac 18214) # optional - sage.groups 2.181694990... A version using `AA `:: - sage: ico = polytopes.icosahedron(base_ring=AA) # long time # optional - sage.rings.number_field - sage: ico.base_ring() # long time # optional - sage.rings.number_field + sage: ico = polytopes.icosahedron(base_ring=AA) # long time # optional - sage.rings.number_field # optional - sage.groups + sage: ico.base_ring() # long time # optional - sage.rings.number_field # optional - sage.groups Algebraic Real Field - sage: ico.volume() # long time # optional - sage.rings.number_field + sage: ico.volume() # long time # optional - sage.rings.number_field # optional - sage.groups 2.181694990624913? Note that if base ring is provided it must contain the square root of @@ -748,15 +748,15 @@ def icosahedron(self, exact=True, base_ring=None, backend=None): TESTS:: - sage: ico = polytopes.icosahedron(backend='normaliz') # optional - pynormaliz # optional - sage.rings.number_field - sage: ico.f_vector() # optional - pynormaliz # optional - sage.rings.number_field + sage: ico = polytopes.icosahedron(backend='normaliz') # optional - pynormaliz # optional - sage.rings.number_field # optional - sage.groups + sage: ico.f_vector() # optional - pynormaliz # optional - sage.rings.number_field # optional - sage.groups (1, 12, 30, 20, 1) - sage: ico.volume() # optional - pynormaliz # optional - sage.rings.number_field + sage: ico.volume() # optional - pynormaliz # optional - sage.rings.number_field # optional - sage.groups 5/12*sqrt5 + 5/4 - sage: TestSuite(ico).run() # optional - pynormaliz # optional - sage.rings.number_field + sage: TestSuite(ico).run() # optional - pynormaliz # optional - sage.rings.number_field # optional - sage.groups - sage: ico = polytopes.icosahedron(exact=False) - sage: TestSuite(ico).run(skip="_test_lawrence") + sage: ico = polytopes.icosahedron(exact=False) # optional - sage.groups + sage: TestSuite(ico).run(skip="_test_lawrence") # optional - sage.groups """ if base_ring is None and exact: @@ -798,31 +798,31 @@ def dodecahedron(self, exact=True, base_ring=None, backend=None): EXAMPLES:: - sage: d12 = polytopes.dodecahedron() # optional - sage.rings.number_field - sage: d12.f_vector() # optional - sage.rings.number_field + sage: d12 = polytopes.dodecahedron() # optional - sage.rings.number_field # optional - sage.groups + sage: d12.f_vector() # optional - sage.rings.number_field # optional - sage.groups (1, 20, 30, 12, 1) - sage: d12.volume() # optional - sage.rings.number_field + sage: d12.volume() # optional - sage.rings.number_field # optional - sage.groups -176*sqrt5 + 400 - sage: numerical_approx(_) # optional - sage.rings.number_field + sage: numerical_approx(_) # optional - sage.rings.number_field # optional - sage.groups 6.45203596003699 - sage: d12 = polytopes.dodecahedron(exact=False) - sage: d12.base_ring() + sage: d12 = polytopes.dodecahedron(exact=False) # optional - sage.groups + sage: d12.base_ring() # optional - sage.groups Real Double Field Here is an error with a field that does not contain `\sqrt(5)`:: - sage: polytopes.dodecahedron(base_ring=QQ) # optional - sage.symbolic + sage: polytopes.dodecahedron(base_ring=QQ) # optional - sage.symbolic # optional - sage.groups Traceback (most recent call last): ... TypeError: unable to convert 1/4*sqrt(5) + 1/4 to a rational TESTS:: - sage: d12 = polytopes.dodecahedron(backend='normaliz') # optional - pynormaliz # optional - sage.rings.number_field - sage: d12.f_vector() # optional - pynormaliz # optional - sage.rings.number_field + sage: d12 = polytopes.dodecahedron(backend='normaliz') # optional - pynormaliz # optional - sage.rings.number_field # optional - sage.groups + sage: d12.f_vector() # optional - pynormaliz # optional - sage.rings.number_field # optional - sage.groups (1, 20, 30, 12, 1) - sage: TestSuite(d12).run() # optional - pynormaliz # optional - sage.rings.number_field + sage: TestSuite(d12).run() # optional - pynormaliz # optional - sage.rings.number_field # optional - sage.groups """ return self.icosahedron(exact=exact, base_ring=base_ring, backend=backend).polar() @@ -1600,17 +1600,17 @@ def truncated_dodecahedron(self, exact=True, base_ring=None, backend=None): EXAMPLES:: - sage: td = polytopes.truncated_dodecahedron() - sage: td.f_vector() + sage: td = polytopes.truncated_dodecahedron() # optional - sage.rings.number_field + sage: td.f_vector() # optional - sage.rings.number_field (1, 60, 90, 32, 1) - sage: td.base_ring() + sage: td.base_ring() # optional - sage.rings.number_field Number Field in sqrt5 with defining polynomial x^2 - 5 with sqrt5 = 2.236067977499790? Its facets are 20 triangles and 12 regular decagons:: - sage: sum(1 for f in td.facets() if len(f.vertices()) == 3) + sage: sum(1 for f in td.facets() if len(f.vertices()) == 3) # optional - sage.rings.number_field 20 - sage: sum(1 for f in td.facets() if len(f.vertices()) == 10) + sage: sum(1 for f in td.facets() if len(f.vertices()) == 10) # optional - sage.rings.number_field 12 The faster implementation using floating point approximations does not @@ -1633,10 +1633,10 @@ def truncated_dodecahedron(self, exact=True, base_ring=None, backend=None): TESTS:: - sage: td = polytopes.truncated_dodecahedron(backend='normaliz') # optional - pynormaliz - sage: td.f_vector() # optional - pynormaliz + sage: td = polytopes.truncated_dodecahedron(backend='normaliz') # optional - pynormaliz # optional - sage.rings.number_field + sage: td.f_vector() # optional - pynormaliz # optional - sage.rings.number_field (1, 60, 90, 32, 1) - sage: td.base_ring() # optional - pynormaliz + sage: td.base_ring() # optional - pynormaliz # optional - sage.rings.number_field Number Field in sqrt5 with defining polynomial x^2 - 5 with sqrt5 = 2.236067977499790? """ @@ -2604,7 +2604,7 @@ def generalized_permutahedron(self, coxeter_type, point=None, exact=True, regula A 3-dimensional polyhedron in QQ^3 defined as the convex hull of 12 vertices sage: perm_a3_110 = polytopes.generalized_permutahedron(['A',3],[1,1,0]); perm_a3_110 # optional - sage.combinat A 3-dimensional polyhedron in QQ^3 defined as the convex hull of 12 vertices - sage: perm_a3_110.is_combinatorially_isomorphic(perm_a3_011) + sage: perm_a3_110.is_combinatorially_isomorphic(perm_a3_011) # optional - sage.combinat True sage: perm_a3_101 = polytopes.generalized_permutahedron(['A',3],[1,0,1]); perm_a3_101 # optional - sage.combinat A 3-dimensional polyhedron in QQ^3 defined as the convex hull of 12 vertices diff --git a/src/sage/geometry/polyhedron/parent.py b/src/sage/geometry/polyhedron/parent.py index 8e2e868294d..352b2b1481e 100644 --- a/src/sage/geometry/polyhedron/parent.py +++ b/src/sage/geometry/polyhedron/parent.py @@ -96,11 +96,11 @@ def Polyhedra(ambient_space_or_base_ring=None, ambient_dim=None, backend=None, * TESTS:: - sage: Polyhedra(RR, 3, backend='field') + sage: Polyhedra(RR, 3, backend='field') # optional - sage.rings.real_mpfr Traceback (most recent call last): ... ValueError: the 'field' backend for polyhedron cannot be used with non-exact fields - sage: Polyhedra(RR, 3) + sage: Polyhedra(RR, 3) # optional - sage.rings.real_mpfr Traceback (most recent call last): ... ValueError: no default backend for computations with Real Field with 53 bits of precision diff --git a/src/sage/geometry/polyhedron/plot.py b/src/sage/geometry/polyhedron/plot.py index c53357404c6..c54b92116f3 100644 --- a/src/sage/geometry/polyhedron/plot.py +++ b/src/sage/geometry/polyhedron/plot.py @@ -13,7 +13,7 @@ from math import pi -from sage.rings.real_double import RDF +from sage.misc.lazy_import import lazy_import from sage.structure.sage_object import SageObject from sage.modules.free_module_element import vector from sage.matrix.constructor import matrix, identity_matrix @@ -22,7 +22,6 @@ from sage.misc.latex import LatexExpr from sage.structure.sequence import Sequence -from sage.misc.lazy_import import lazy_import lazy_import("sage.plot.all", ["Graphics", "point2d", "line2d", "arrow", "polygon2d", "rainbow"]) lazy_import("sage.plot.plot3d.all", ["point3d", "line3d", "arrow3d", "polygons3d"]) lazy_import("sage.plot.plot3d.transform", "rotate_arbitrary") @@ -178,6 +177,8 @@ def __init__(self, projection_point): [ 0.7071067811... 0.7071067811...] sage: TestSuite(proj).run(skip='_test_pickling') """ + from sage.rings.real_double import RDF + self.projection_point = vector(projection_point) self.dim = self.projection_point.degree() @@ -227,6 +228,8 @@ def __call__(self, x): sage: proj.__call__(vector([1,0,0])) (0.5, 0.0) """ + from sage.rings.real_double import RDF + img = self.house * x denom = self.psize - img[self.dim - 1] if denom.is_zero(): @@ -279,6 +282,8 @@ def __init__(self, facet, projection_point): (2.0, 2.0, 0.0) sage: TestSuite(proj).run(skip='_test_pickling') """ + from sage.rings.real_double import RDF + self.facet = facet ineq = [h for h in facet.ambient_Hrepresentation() if h.is_inequality()][0] self.full_A = ineq.A() @@ -500,14 +505,14 @@ def schlegel(self, facet=None, position=None): sage: tcube4 = cube4.face_truncation(cube4.faces(0)[0]) sage: tcube4.facets()[4] A 3-dimensional face of a Polyhedron in QQ^4 defined as the convex hull of 4 vertices - sage: into_tetra = Projection(tcube4).schlegel(tcube4.facets()[4]) - sage: into_tetra.plot() # optional - sage.plot + sage: into_tetra = Projection(tcube4).schlegel(tcube4.facets()[4]) # optional - sage.symbolic + sage: into_tetra.plot() # optional - sage.plot # optional - sage.symbolic Graphics3d Object Taking a larger value for the position changes the image:: - sage: into_tetra_far = Projection(tcube4).schlegel(tcube4.facets()[4],4) - sage: into_tetra_far.plot() # optional - sage.plot + sage: into_tetra_far = Projection(tcube4).schlegel(tcube4.facets()[4], 4) # optional - sage.symbolic + sage: into_tetra_far.plot() # optional - sage.plot # optional - sage.symbolic Graphics3d Object A value which is too large or negative give a projection point that @@ -1360,7 +1365,7 @@ def tikz(self, view=[0, 0, 1], angle=0, scale=1, sage: Image3 = P3.projection().tikz([0.5, -1, -0.1], 55, scale=3, edge_color='blue!95!black', # optional - sage.plot ....: facet_color='orange!95!black', opacity=0.7, ....: vertex_color='yellow', axis=True, output_type='TikzPicture') - sage: Image3 + sage: Image3 # optional - sage.plot \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}% @@ -1377,10 +1382,10 @@ def tikz(self, view=[0, 0, 1], angle=0, scale=1, %% \end{tikzpicture} \end{document} - sage: _ = Image3.tex('polytope-tikz3.tex') # not tested - sage: _ = Image3.png('polytope-tikz3.png') # not tested - sage: _ = Image3.pdf('polytope-tikz3.pdf') # not tested - sage: _ = Image3.svg('polytope-tikz3.svg') # not tested + sage: _ = Image3.tex('polytope-tikz3.tex') # not tested # optional - sage.plot + sage: _ = Image3.png('polytope-tikz3.png') # not tested # optional - sage.plot + sage: _ = Image3.pdf('polytope-tikz3.pdf') # not tested # optional - sage.plot + sage: _ = Image3.svg('polytope-tikz3.svg') # not tested # optional - sage.plot A fourth example:: @@ -1633,6 +1638,8 @@ def _tikz_2d_in_3d(self, view, angle, scale, edge_color, facet_color, The ``facet_color`` is the filing color of the polytope (polygon). """ + from sage.rings.real_double import RDF + view_vector = vector(RDF, view) rot = rotate_arbitrary(view_vector, -(angle/360)*2*pi) rotation_matrix = rot[:2].transpose() @@ -1752,12 +1759,12 @@ def _tikz_3d_in_3d(self, view, angle, scale, edge_color, EXAMPLES:: sage: P = polytopes.small_rhombicuboctahedron() # optional - sage.rings.number_field - sage: Image = P.projection()._tikz_3d_in_3d([3, 7, 5], 100, scale=3, + sage: Image = P.projection()._tikz_3d_in_3d([3, 7, 5], 100, scale=3, # optional - sage.rings.number_field ....: edge_color='blue', facet_color='orange', ....: opacity=0.5, vertex_color='green', axis=True) sage: type(Image) # optional - sage.rings.number_field - sage: print('\n'.join(Image.splitlines()[:4])) + sage: print('\n'.join(Image.splitlines()[:4])) # optional - sage.rings.number_field \begin{tikzpicture}% [x={(-0.046385cm, 0.837431cm)}, y={(-0.243536cm, 0.519228cm)}, @@ -1792,6 +1799,8 @@ def _tikz_3d_in_3d(self, view, angle, scale, edge_color, \coordinate (1.00000, -1.00000, 0.00000) at (1.00000, -1.00000, 0.00000); \coordinate (1.00000, 0.00000, -1.00000) at (1.00000, 0.00000, -1.00000); """ + from sage.rings.real_double import RDF + view_vector = vector(RDF, view) rot = rotate_arbitrary(view_vector, -(angle/360)*2*pi) rotation_matrix = rot[:2].transpose() diff --git a/src/sage/geometry/polyhedron/ppl_lattice_polytope.py b/src/sage/geometry/polyhedron/ppl_lattice_polytope.py index d45f8a3991a..895c7fed0c3 100644 --- a/src/sage/geometry/polyhedron/ppl_lattice_polytope.py +++ b/src/sage/geometry/polyhedron/ppl_lattice_polytope.py @@ -48,7 +48,7 @@ sage: square = LatticePolytope_PPL((-1,-1),(-1,1),(1,-1),(1,1)) sage: fibers = [ f.vertices() for f in square.fibration_generator(1) ]; fibers [((1, 0), (-1, 0)), ((0, 1), (0, -1)), ((-1, -1), (1, 1)), ((-1, 1), (1, -1))] - sage: square.pointsets_mod_automorphism(fibers) + sage: square.pointsets_mod_automorphism(fibers) # optional - sage.groups (frozenset({(-1, -1), (1, 1)}), frozenset({(-1, 0), (1, 0)})) AUTHORS: diff --git a/src/sage/interfaces/all__sagemath_polyhedra.py b/src/sage/interfaces/all__sagemath_polyhedra.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/src/sage/numerical/backends/generic_backend.pyx b/src/sage/numerical/backends/generic_backend.pyx index 64d47f7bc2b..18e73ff68af 100644 --- a/src/sage/numerical/backends/generic_backend.pyx +++ b/src/sage/numerical/backends/generic_backend.pyx @@ -1759,7 +1759,8 @@ cpdef GenericBackend get_solver(constraint_generation = False, solver = None, ba if base_ring is not None: base_ring = base_ring.fraction_field() - from sage.rings.all import QQ, RDF + from sage.rings.rational_field import QQ + from sage.rings.real_double import RDF if base_ring is QQ: solver = "Ppl" elif solver in ["Interactivelp", "Ppl"] and not base_ring.is_exact(): From 6fd026b7915ff579f55417485022f68ed32ba703 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 27 Jan 2023 23:19:28 -0800 Subject: [PATCH 496/751] sage.geometry: More # optional --- src/sage/geometry/cone_catalog.py | 16 ++-- .../hyperplane_arrangement/affine_subspace.py | 10 +-- .../hyperplane_arrangement/arrangement.py | 90 ++++++++++--------- src/sage/geometry/linear_expression.py | 2 +- 4 files changed, 62 insertions(+), 56 deletions(-) diff --git a/src/sage/geometry/cone_catalog.py b/src/sage/geometry/cone_catalog.py index a3d1ffa670f..185391d261a 100644 --- a/src/sage/geometry/cone_catalog.py +++ b/src/sage/geometry/cone_catalog.py @@ -374,8 +374,8 @@ def rearrangement(p, ambient_dim=None, lattice=None): sage: ambient_dim = ZZ.random_element(2,10).abs() sage: p = ZZ.random_element(1, ambient_dim) sage: K = cones.rearrangement(p, ambient_dim) - sage: P = SymmetricGroup(ambient_dim).random_element().matrix() - sage: all( K.contains(P*r) for r in K ) + sage: P = SymmetricGroup(ambient_dim).random_element().matrix() # optional - sage.groups + sage: all(K.contains(P*r) for r in K) # optional - sage.groups True The smallest ``p`` components of every element of the rearrangement @@ -529,11 +529,11 @@ def schur(ambient_dim=None, lattice=None): sage: P = cones.schur(5) sage: Q = cones.nonnegative_orthant(5) - sage: G = ( g.change_ring(QQbar).normalized() for g in P ) - sage: H = ( h.change_ring(QQbar).normalized() for h in Q ) - sage: actual = max(arccos(u.inner_product(v)) for u in G for v in H) - sage: expected = 3*pi/4 - sage: abs(actual - expected).n() < 1e-12 + sage: G = ( g.change_ring(QQbar).normalized() for g in P ) # optional - sage.rings.number_fields + sage: H = ( h.change_ring(QQbar).normalized() for h in Q ) # optional - sage.rings.number_fields + sage: actual = max(arccos(u.inner_product(v)) for u in G for v in H) # optional - sage.rings.number_fields + sage: expected = 3*pi/4 # optional - sage.rings.number_fields + sage: abs(actual - expected).n() < 1e-12 # optional - sage.rings.number_fields True The dual of the Schur cone is the "downward monotonic cone" @@ -566,7 +566,7 @@ def schur(ambient_dim=None, lattice=None): True sage: x = V.random_element() sage: y = V.random_element() - sage: majorized_by(x,y) == ( (y-x) in S ) + sage: majorized_by(x,y) == ( (y-x) in S ) # optional - sage.rings.number_fields True If a ``lattice`` was given, it is actually used:: diff --git a/src/sage/geometry/hyperplane_arrangement/affine_subspace.py b/src/sage/geometry/hyperplane_arrangement/affine_subspace.py index 7c1065553c4..3b024b6f419 100644 --- a/src/sage/geometry/hyperplane_arrangement/affine_subspace.py +++ b/src/sage/geometry/hyperplane_arrangement/affine_subspace.py @@ -33,8 +33,8 @@ True sage: c < b False - sage: A = AffineSubspace([8,38,21,250], VectorSpace(GF(19),4)) - sage: A + sage: A = AffineSubspace([8,38,21,250], VectorSpace(GF(19),4)) # optional - sage.libs.pari + sage: A # optional - sage.libs.pari Affine space p + W where: p = (8, 0, 2, 3) W = Vector space of dimension 4 over Finite Field of size 19 @@ -384,9 +384,9 @@ def intersection(self, other): [] sage: A.intersection(C).intersection(B) - sage: D = AffineSubspace([1,2,3], VectorSpace(GF(5),3)) - sage: E = AffineSubspace([3,4,5], VectorSpace(GF(5),3)) - sage: D.intersection(E) + sage: D = AffineSubspace([1,2,3], VectorSpace(GF(5),3)) # optional - sage.libs.pari + sage: E = AffineSubspace([3,4,5], VectorSpace(GF(5),3)) # optional - sage.libs.pari + sage: D.intersection(E) # optional - sage.libs.pari Affine space p + W where: p = (3, 4, 0) W = Vector space of dimension 3 over Finite Field of size 5 diff --git a/src/sage/geometry/hyperplane_arrangement/arrangement.py b/src/sage/geometry/hyperplane_arrangement/arrangement.py index 5b2534677a1..b2438ed284f 100644 --- a/src/sage/geometry/hyperplane_arrangement/arrangement.py +++ b/src/sage/geometry/hyperplane_arrangement/arrangement.py @@ -60,30 +60,30 @@ The default base field is `\QQ`, the rational numbers. Finite fields are also supported:: - sage: H. = HyperplaneArrangements(GF(5)) - sage: a = H([(1,2,3), 4], [(5,6,7), 8]); a + sage: H. = HyperplaneArrangements(GF(5)) # optional - sage.libs.pari + sage: a = H([(1,2,3), 4], [(5,6,7), 8]); a # optional - sage.libs.pari Arrangement Number fields are also possible:: sage: x = var('x') - sage: NF. = NumberField(x**4 - 5*x**2 + 5,embedding=1.90) - sage: H. = HyperplaneArrangements(NF) - sage: A = H([[(-a**3 + 3*a, -a**2 + 4), 1], [(a**3 - 4*a, -1), 1], + sage: NF. = NumberField(x**4 - 5*x**2 + 5, embedding=1.90) # optional - sage.rings.number_field + sage: H. = HyperplaneArrangements(NF) # optional - sage.rings.number_field + sage: A = H([[(-a**3 + 3*a, -a**2 + 4), 1], [(a**3 - 4*a, -1), 1], # optional - sage.rings.number_field ....: [(0, 2*a**2 - 6), 1], [(-a**3 + 4*a, -1), 1], ....: [(a**3 - 3*a, -a**2 + 4), 1]]) - sage: A + sage: A # optional - sage.rings.number_field Arrangement of 5 hyperplanes of dimension 2 and rank 2 - sage: A.base_ring() + sage: A.base_ring() # optional - sage.rings.number_field Number Field in a with defining polynomial x^4 - 5*x^2 + 5 with a = 1.902113032590308? Notation (iii): a list or tuple of hyperplanes:: - sage: H. = HyperplaneArrangements(GF(5)) - sage: k = [x+i for i in range(4)]; k + sage: H. = HyperplaneArrangements(GF(5)) # optional - sage.libs.pari + sage: k = [x+i for i in range(4)]; k # optional - sage.libs.pari [Hyperplane x + 0*y + 0*z + 0, Hyperplane x + 0*y + 0*z + 1, Hyperplane x + 0*y + 0*z + 2, Hyperplane x + 0*y + 0*z + 3] - sage: H(k) + sage: H(k) # optional - sage.libs.pari Arrangement Notation (iv): using the library of arrangements:: @@ -264,10 +264,10 @@ sage: a = hyperplane_arrangements.semiorder(3) sage: a.has_good_reduction(5) True - sage: b = a.change_ring(GF(5)) + sage: b = a.change_ring(GF(5)) # optional - sage.libs.pari sage: pa = a.intersection_poset() - sage: pb = b.intersection_poset() - sage: pa.is_isomorphic(pb) + sage: pb = b.intersection_poset() # optional - sage.libs.pari + sage: pa.is_isomorphic(pb) # optional - sage.libs.pari True sage: a.face_vector() (0, 12, 30, 19) @@ -356,7 +356,6 @@ from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.geometry.hyperplane_arrangement.hyperplane import AmbientVectorSpace, Hyperplane -from sage.combinat.posets.posets import Poset class HyperplaneArrangementElement(Element): @@ -1129,7 +1128,7 @@ def change_ring(self, base_ring): sage: H. = HyperplaneArrangements(QQ) sage: A = H([(1,1), 0], [(2,3), -1]) - sage: A.change_ring(FiniteField(2)) + sage: A.change_ring(FiniteField(2)) # optional - sage.libs.pari Arrangement TESTS: @@ -1165,8 +1164,8 @@ def n_regions(self): sage: H. = HyperplaneArrangements(QQ) sage: A = H([(1,1), 0], [(2,3), -1], [(4,5), 3]) - sage: B = A.change_ring(FiniteField(7)) - sage: B.n_regions() + sage: B = A.change_ring(FiniteField(7)) # optional - sage.libs.pari + sage: B.n_regions() # optional - sage.libs.pari Traceback (most recent call last): ... TypeError: base field must have characteristic zero @@ -1174,16 +1173,21 @@ def n_regions(self): Check that :trac:`30749` is fixed:: sage: R. = QQ[] - sage: v1 = AA.polynomial_root(AA.common_polynomial(y^2 - 3), RIF(RR(1.7320508075688772), RR(1.7320508075688774))) - sage: v2 = QQbar.polynomial_root(AA.common_polynomial(y^4 - y^2 + 1), CIF(RIF(RR(0.8660254037844386), RR(0.86602540378443871)), RIF(-RR(0.50000000000000011), -RR(0.49999999999999994)))) - sage: my_vectors = (vector(AA, [-v1, -1, 1]), vector(AA, [0, 2, 1]), vector(AA,[v1, -1, 1]), vector(AA, [1, 0, 0]), vector(AA, [1/2, AA(-1/2*v2^3 + v2),0]), vector(AA, [-1/2, AA(-1/2*v2^3 + v2), 0])) - sage: H = HyperplaneArrangements(AA, names='xyz') - sage: x,y,z = H.gens() - sage: A = H(backend="normaliz") # optional - pynormaliz - sage: for v in my_vectors: # optional - pynormaliz + sage: v1 = AA.polynomial_root(AA.common_polynomial(y^2 - 3), # optional - sage.rings.number_field + ....: RIF(RR(1.7320508075688772), RR(1.7320508075688774))) + sage: v2 = QQbar.polynomial_root(AA.common_polynomial(y^4 - y^2 + 1), # optional - sage.rings.number_field + ....: CIF(RIF(RR(0.8660254037844386), RR(0.86602540378443871)), + ....: RIF(-RR(0.50000000000000011), -RR(0.49999999999999994)))) + sage: my_vectors = (vector(AA, [-v1, -1, 1]), vector(AA, [0, 2, 1]), vector(AA, [v1, -1, 1]), # optional - sage.rings.number_field + ....: vector(AA, [1, 0, 0]), vector(AA, [1/2, AA(-1/2*v2^3 + v2),0]), + ....: vector(AA, [-1/2, AA(-1/2*v2^3 + v2), 0])) + sage: H = HyperplaneArrangements(AA, names='xyz') # optional - sage.rings.number_field + sage: x,y,z = H.gens() # optional - sage.rings.number_field + sage: A = H(backend="normaliz") # optional - pynormaliz # optional - sage.rings.number_field + sage: for v in my_vectors: # optional - pynormaliz # optional - sage.rings.number_field ....: a, b, c = v ....: A = A.add_hyperplane(a*x + b*y + c*z) - sage: A.n_regions() # optional - pynormaliz + sage: A.n_regions() # optional - pynormaliz # optional - sage.rings.number_field 24 """ if self.base_ring().characteristic() != 0: @@ -1211,8 +1215,8 @@ def n_bounded_regions(self): sage: H. = HyperplaneArrangements(QQ) sage: A = H([(1,1),0], [(2,3),-1], [(4,5),3]) - sage: B = A.change_ring(FiniteField(7)) - sage: B.n_bounded_regions() + sage: B = A.change_ring(FiniteField(7)) # optional - sage.libs.pari + sage: B.n_bounded_regions() # optional - sage.libs.pari Traceback (most recent call last): ... TypeError: base field must have characteristic zero @@ -1243,14 +1247,14 @@ def has_good_reduction(self, p): EXAMPLES:: sage: a = hyperplane_arrangements.semiorder(3) - sage: a.has_good_reduction(5) + sage: a.has_good_reduction(5) # optional - sage.libs.pari True - sage: a.has_good_reduction(3) + sage: a.has_good_reduction(3) # optional - sage.libs.pari False - sage: b = a.change_ring(GF(3)) + sage: b = a.change_ring(GF(3)) # optional - sage.libs.pari sage: a.characteristic_polynomial() x^3 - 6*x^2 + 12*x - sage: b.characteristic_polynomial() # not equal to that for a + sage: b.characteristic_polynomial() # not equal to that for a # optional - sage.libs.pari x^3 - 6*x^2 + 10*x """ if self.base_ring() != QQ: @@ -1495,9 +1499,9 @@ def essentialization(self): Hyperplane arrangements in 1-dimensional linear space over Rational Field with coordinate x - sage: H. = HyperplaneArrangements(GF(2)) - sage: C = H([(1,1),1], [(1,1),0]) - sage: C.essentialization() + sage: H. = HyperplaneArrangements(GF(2)) # optional - sage.libs.pari + sage: C = H([(1,1),1], [(1,1),0]) # optional - sage.libs.pari + sage: C.essentialization() # optional - sage.libs.pari Arrangement sage: h = hyperplane_arrangements.semiorder(4) @@ -1587,9 +1591,9 @@ def sign_vector(self, p): TESTS:: - sage: H. = HyperplaneArrangements(GF(3)) - sage: A = H(x, y) - sage: A.sign_vector([1, 2]) + sage: H. = HyperplaneArrangements(GF(3)) # optional - sage.libs.pari + sage: A = H(x, y) # optional - sage.libs.pari + sage: A.sign_vector([1, 2]) # optional - sage.libs.pari Traceback (most recent call last): ... ValueError: characteristic must be zero @@ -1992,6 +1996,8 @@ def poset_of_regions(self, B=None, numbered_labels=True): sage: A.poset_of_regions(B=base_region) Finite poset containing 14 elements """ + from sage.combinat.posets.posets import Poset + # We use RX to keep track of indexes and R to keep track of which regions # we've already hit. This poset is graded, so we can go one set at a time RX = self.regions() @@ -2480,7 +2486,7 @@ def face_semigroup_algebra(self, field=None, names='e'): sage: (e3 + 2*e4) * (e1 - e7) e4 - e6 - sage: U3 = a.face_semigroup_algebra(field=GF(3)); U3 + sage: U3 = a.face_semigroup_algebra(field=GF(3)); U3 # optional - sage.libs.pari Finite-dimensional algebra of degree 13 over Finite Field of size 3 TESTS: @@ -2550,8 +2556,8 @@ def region_containing_point(self, p): TESTS:: sage: A = H([(1,1),0], [(2,3),-1], [(4,5),3]) - sage: B = A.change_ring(FiniteField(7)) - sage: B.region_containing_point((1,2)) + sage: B = A.change_ring(FiniteField(7)) # optional - sage.libs.pari + sage: B.region_containing_point((1,2)) # optional - sage.libs.pari Traceback (most recent call last): ... ValueError: base field must have characteristic zero @@ -2991,8 +2997,8 @@ def matroid(self): intersection lattice:: sage: f = sum([list(M.flats(i)) for i in range(M.rank()+1)], []) - sage: PF = Poset([f, lambda x,y: x < y]) - sage: PF.is_isomorphic(A.intersection_poset()) + sage: PF = Poset([f, lambda x, y: x < y]) # optional - sage.combinat + sage: PF.is_isomorphic(A.intersection_poset()) # optional - sage.combinat True """ if not self.is_central(): diff --git a/src/sage/geometry/linear_expression.py b/src/sage/geometry/linear_expression.py index 7f4a91b3194..b62e17193a3 100644 --- a/src/sage/geometry/linear_expression.py +++ b/src/sage/geometry/linear_expression.py @@ -440,7 +440,7 @@ def evaluate(self, point): 9 sage: ex([1,1]) # syntactic sugar 9 - sage: ex([pi, e]) + sage: ex([pi, e]) # optional - sage.symbolic 2*pi + 3*e + 4 """ try: From 9400f51a2bda96c44fc1928b7de4dda13292daf3 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 26 Jan 2023 17:47:39 -0800 Subject: [PATCH 497/751] src/sage/rings/integer.pyx: Mark doctests # optional - sage.libs.pari, sage.rings.number_field, sage.symbolic --- src/sage/features/sagemath.py | 21 ++ src/sage/rings/integer.pyx | 372 +++++++++++++++++----------------- 2 files changed, 207 insertions(+), 186 deletions(-) diff --git a/src/sage/features/sagemath.py b/src/sage/features/sagemath.py index 4085679dbd8..fdcd07944e3 100644 --- a/src/sage/features/sagemath.py +++ b/src/sage/features/sagemath.py @@ -122,6 +122,27 @@ def __init__(self): [PythonModule('sage.groups.perm_gps.permgroup')]) +class sage__libs__pari(JoinFeature): + r""" + A :class:`sage.features.Feature` describing the presence of :mod:`sage.libs.pari`. + + EXAMPLES:: + + sage: from sage.features.sagemath import sage__libs__pari + sage: sage__libs__pari().is_present() # optional - sage.libs.pari + FeatureTestResult('sage.libs.pari', True) + """ + def __init__(self): + r""" + TESTS:: + + sage: from sage.features.sagemath import sage__libs__pari + sage: isinstance(sage__libs__pari(), sage__libs__pari) + True + """ + JoinFeature.__init__(self, 'sage.libs.pari', + [PythonModule('sage.libs.pari.convert_sage')]) + class sage__plot(JoinFeature): r""" A :class:`~sage.features.Feature` describing the presence of :mod:`sage.plot`. diff --git a/src/sage/rings/integer.pyx b/src/sage/rings/integer.pyx index c43319942fb..f038e747472 100644 --- a/src/sage/rings/integer.pyx +++ b/src/sage/rings/integer.pyx @@ -425,9 +425,9 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): Conversion from PARI:: - sage: Integer(pari('-10380104371593008048799446356441519384')) + sage: Integer(pari('-10380104371593008048799446356441519384')) # optional - sage.libs.pari -10380104371593008048799446356441519384 - sage: Integer(pari('Pol([-3])')) + sage: Integer(pari('Pol([-3])')) # optional - sage.libs.pari -3 Conversion from gmpy2:: @@ -463,11 +463,11 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): -901824309821093821093812093810928309183091832091 sage: ZZ(RR(2.0)^80) 1208925819614629174706176 - sage: ZZ(QQbar(sqrt(28-10*sqrt(3)) + sqrt(3))) + sage: ZZ(QQbar(sqrt(28-10*sqrt(3)) + sqrt(3))) # optional - sage.rings.number_field, sage.symbolic 5 - sage: ZZ(AA(32).nth_root(5)) + sage: ZZ(AA(32).nth_root(5)) # optional - sage.rings.number_field 2 - sage: ZZ(pari('Mod(-3,7)')) + sage: ZZ(pari('Mod(-3,7)')) # optional - sage.libs.pari 4 sage: ZZ('sage') Traceback (most recent call last): @@ -498,7 +498,7 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): :: - sage: k = GF(2) + sage: k = GF(2) # optional - sage.libs.pari sage: ZZ( (k(0),k(1)), 2) 2 @@ -535,40 +535,40 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): Test conversion from PARI (:trac:`11685`):: - sage: ZZ(pari(-3)) + sage: ZZ(pari(-3)) # optional - sage.libs.pari -3 - sage: ZZ(pari("-3.0")) + sage: ZZ(pari("-3.0")) # optional - sage.libs.pari -3 - sage: ZZ(pari("-3.5")) + sage: ZZ(pari("-3.5")) # optional - sage.libs.pari Traceback (most recent call last): ... TypeError: Attempt to coerce non-integral real number to an Integer - sage: ZZ(pari("1e100")) + sage: ZZ(pari("1e100")) # optional - sage.libs.pari Traceback (most recent call last): ... PariError: precision too low in truncr (precision loss in truncation) - sage: ZZ(pari("10^50")) + sage: ZZ(pari("10^50")) # optional - sage.libs.pari 100000000000000000000000000000000000000000000000000 - sage: ZZ(pari("Pol(3)")) + sage: ZZ(pari("Pol(3)")) # optional - sage.libs.pari 3 - sage: ZZ(GF(3^20,'t')(1)) + sage: ZZ(GF(3^20,'t')(1)) # optional - sage.libs.pari 1 - sage: ZZ(pari(GF(3^20,'t')(1))) + sage: ZZ(pari(GF(3^20,'t')(1))) # optional - sage.libs.pari 1 sage: x = polygen(QQ) - sage: K. = NumberField(x^2+3) - sage: ZZ(a^2) + sage: K. = NumberField(x^2+3) # optional - sage.rings.number_field + sage: ZZ(a^2) # optional - sage.rings.number_field -3 - sage: ZZ(pari(a)^2) + sage: ZZ(pari(a)^2) # optional - sage.libs.pari, sage.rings.number_field -3 - sage: ZZ(pari("Mod(x, x^3+x+1)")) # Note error message refers to lifted element + sage: ZZ(pari("Mod(x, x^3+x+1)")) # Note error message refers to lifted element # optional - sage.libs.pari Traceback (most recent call last): ... TypeError: Unable to coerce PARI x to an Integer Test coercion of p-adic with negative valuation:: - sage: ZZ(pari(Qp(11)(11^-7))) + sage: ZZ(pari(Qp(11)(11^-7))) # optional - sage.libs.pari Traceback (most recent call last): ... TypeError: Cannot convert p-adic with negative valuation to an integer @@ -769,8 +769,8 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): EXAMPLES:: sage: n = -10 - sage: R = GF(17) - sage: n._im_gens_(R, [R(1)]) + sage: R = GF(17) # optional - sage.libs.pari + sage: n._im_gens_(R, [R(1)]) # optional - sage.libs.pari 7 """ return codomain.coerce(self) @@ -2008,7 +2008,7 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): Traceback (most recent call last): ... ZeroDivisionError: rational division by zero - sage: 3 / QQbar.zero() + sage: 3 / QQbar.zero() # optional - sage.rings.number_field Traceback (most recent call last): ... ZeroDivisionError: division by zero in algebraic field @@ -2113,7 +2113,7 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): 1 sage: 2^-0 1 - sage: (-1)^(1/3) + sage: (-1)^(1/3) # optional - sage.symbolic (-1)^(1/3) For consistency with Python and MPFR, 0^0 is defined to be 1 in @@ -2140,7 +2140,7 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): We raise 2 to various interesting exponents:: - sage: 2^x # symbolic x + sage: 2^x # symbolic x # optional - sage.symbolic 2^x sage: 2^1.5 # real number 2.82842712474619 @@ -2151,19 +2151,19 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): sage: r = 2 ^ int(-3); r; type(r) 1/8 - sage: f = 2^(sin(x)-cos(x)); f + sage: f = 2^(sin(x)-cos(x)); f # optional - sage.symbolic 2^(-cos(x) + sin(x)) sage: f(x=3) 2^(-cos(3) + sin(3)) A symbolic sum:: - sage: x,y,z = var('x,y,z') - sage: 2^(x+y+z) + sage: x, y, z = var('x,y,z') # optional - sage.symbolic + sage: 2^(x + y + z) # optional - sage.symbolic 2^(x + y + z) - sage: 2^(1/2) + sage: 2^(1/2) # optional - sage.symbolic sqrt(2) - sage: 2^(-1/2) + sage: 2^(-1/2) # optional - sage.symbolic 1/2*sqrt(2) TESTS:: @@ -2767,13 +2767,13 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): EXAMPLES:: - sage: Integer(124).log(5) + sage: Integer(124).log(5) # optional - sage.symbolic log(124)/log(5) - sage: Integer(124).log(5,100) + sage: Integer(124).log(5, 100) 2.9950093311241087454822446806 sage: Integer(125).log(5) 3 - sage: Integer(125).log(5,prec=53) + sage: Integer(125).log(5, prec=53) 3.00000000000000 sage: log(Integer(125)) 3*log(5) @@ -2781,7 +2781,7 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): For extremely large numbers, this works:: sage: x = 3^100000 - sage: log(x,3) + sage: log(x, 3) 100000 With the new Pynac symbolic backend, log(x) also @@ -2829,7 +2829,7 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): TESTS:: - sage: (-2).log(3) + sage: (-2).log(3) # optional - sage.symbolic (I*pi + log(2))/log(3) """ cdef int self_sgn @@ -2886,21 +2886,21 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): EXAMPLES:: - sage: Integer(8).exp() + sage: Integer(8).exp() # optional - sage.symbolic e^8 - sage: Integer(8).exp(prec=100) + sage: Integer(8).exp(prec=100) # optional - sage.symbolic 2980.9579870417282747435920995 - sage: exp(Integer(8)) + sage: exp(Integer(8)) # optional - sage.symbolic e^8 For even fairly large numbers, this may not be useful. :: - sage: y=Integer(145^145) - sage: y.exp() + sage: y = Integer(145^145) + sage: y.exp() # optional - sage.symbolic e^25024207011349079210459585279553675697932183658421565260323592409432707306554163224876110094014450895759296242775250476115682350821522931225499163750010280453185147546962559031653355159703678703793369785727108337766011928747055351280379806937944746847277089168867282654496776717056860661614337004721164703369140625 - sage: y.exp(prec=53) # default RealField precision + sage: y.exp(prec=53) # default RealField precision # optional - sage.symbolic +infinity """ from sage.functions.all import exp @@ -3015,21 +3015,21 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): :: sage: n = 2^551 - 1 - sage: L = n.divisors() - sage: len(L) + sage: L = n.divisors() # optional - sage.libs.pari + sage: len(L) # optional - sage.libs.pari 256 - sage: L[-1] == n + sage: L[-1] == n # optional - sage.libs.pari True TESTS: Overflow:: - sage: prod(primes_first_n(64)).divisors() + sage: prod(primes_first_n(64)).divisors() # optional - sage.libs.pari Traceback (most recent call last): ... OverflowError: value too large - sage: prod(primes_first_n(58)).divisors() + sage: prod(primes_first_n(58)).divisors() # optional - sage.libs.pari Traceback (most recent call last): ... OverflowError: value too large # 32-bit @@ -3039,8 +3039,8 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): (the ``divisors`` call below allocates about 800 MB every time, so a memory leak will not go unnoticed):: - sage: n = prod(primes_first_n(25)) - sage: for i in range(20): # long time + sage: n = prod(primes_first_n(25)) # optional - sage.libs.pari + sage: for i in range(20): # long time # optional - sage.libs.pari ....: try: ....: alarm(RDF.random_element(1e-3, 0.5)) ....: _ = n.divisors() @@ -3322,9 +3322,9 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): This example caused trouble in :trac:`6083`:: - sage: a = next_prime(2**31) - sage: b = Integers(a)(100) - sage: a % b + sage: a = next_prime(2**31) # optional - sage.libs.pari + sage: b = Integers(a)(100) # optional - sage.libs.pari + sage: a % b # optional - sage.libs.pari Traceback (most recent call last): ... ArithmeticError: reduction modulo 100 not defined @@ -3678,26 +3678,26 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): EXAMPLES:: - sage: n = next_prime(10^6)*next_prime(10^7); n.trial_division() + sage: n = next_prime(10^6)*next_prime(10^7); n.trial_division() # optional - sage.libs.pari 1000003 - sage: (-n).trial_division() + sage: (-n).trial_division() # optional - sage.libs.pari 1000003 - sage: n.trial_division(bound=100) + sage: n.trial_division(bound=100) # optional - sage.libs.pari 10000049000057 - sage: n.trial_division(bound=-10) + sage: n.trial_division(bound=-10) # optional - sage.libs.pari Traceback (most recent call last): ... ValueError: bound must be positive - sage: n.trial_division(bound=0) + sage: n.trial_division(bound=0) # optional - sage.libs.pari Traceback (most recent call last): ... ValueError: bound must be positive - sage: ZZ(0).trial_division() + sage: ZZ(0).trial_division() # optional - sage.libs.pari Traceback (most recent call last): ... ValueError: self must be nonzero - sage: n = next_prime(10^5) * next_prime(10^40); n.trial_division() + sage: n = next_prime(10^5) * next_prime(10^40); n.trial_division() # optional - sage.libs.pari 100003 sage: n.trial_division(bound=10^4) 1000030000000000000000000000000000000012100363 @@ -3705,17 +3705,17 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): 1000030000000000000000000000000000000012100363 sage: (-n).trial_division() 100003 - sage: n = 2 * next_prime(10^40); n.trial_division() + sage: n = 2 * next_prime(10^40); n.trial_division() # optional - sage.libs.pari 2 - sage: n = 3 * next_prime(10^40); n.trial_division() + sage: n = 3 * next_prime(10^40); n.trial_division() # optional - sage.libs.pari 3 - sage: n = 5 * next_prime(10^40); n.trial_division() + sage: n = 5 * next_prime(10^40); n.trial_division() # optional - sage.libs.pari 5 - sage: n = 2 * next_prime(10^4); n.trial_division() + sage: n = 2 * next_prime(10^4); n.trial_division() # optional - sage.libs.pari 2 - sage: n = 3 * next_prime(10^4); n.trial_division() + sage: n = 3 * next_prime(10^4); n.trial_division() # optional - sage.libs.pari 3 - sage: n = 5 * next_prime(10^4); n.trial_division() + sage: n = 5 * next_prime(10^4); n.trial_division() # optional - sage.libs.pari 5 You can specify a starting point:: @@ -3839,7 +3839,7 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): EXAMPLES:: - sage: n = 2^100 - 1; n.factor() + sage: n = 2^100 - 1; n.factor() # optional - sage.libs.pari 3 * 5^3 * 11 * 31 * 41 * 101 * 251 * 601 * 1801 * 4051 * 8101 * 268501 This factorization can be converted into a list of pairs `(p, @@ -3866,9 +3866,9 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): that appear in the factorization:: sage: n = 920384092842390423848290348203948092384082349082 - sage: n.factor(proof=False) + sage: n.factor(proof=False) # optional - sage.libs.pari 2 * 11 * 1531 * 4402903 * 10023679 * 619162955472170540533894518173 - sage: n.factor(proof=True) + sage: n.factor(proof=True) # optional - sage.libs.pari 2 * 11 * 1531 * 4402903 * 10023679 * 619162955472170540533894518173 We factor using trial division only:: @@ -3878,10 +3878,10 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): We factor using a quadratic sieve algorithm:: - sage: p = next_prime(10^20) - sage: q = next_prime(10^21) - sage: n = p*q - sage: n.factor(algorithm='qsieve') + sage: p = next_prime(10^20) # optional - sage.libs.pari + sage: q = next_prime(10^21) # optional - sage.libs.pari + sage: n = p * q # optional - sage.libs.pari + sage: n.factor(algorithm='qsieve') # optional - sage.libs.pari doctest:... RuntimeWarning: the factorization returned by qsieve may be incomplete (the factors may not be prime) or even wrong; see qsieve? for details @@ -3889,10 +3889,10 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): We factor using the elliptic curve method:: - sage: p = next_prime(10^15) - sage: q = next_prime(10^21) - sage: n = p*q - sage: n.factor(algorithm='ecm') + sage: p = next_prime(10^15) # optional - sage.libs.pari + sage: q = next_prime(10^21) # optional - sage.libs.pari + sage: n = p * q # optional - sage.libs.pari + sage: n.factor(algorithm='ecm') # optional - sage.libs.pari 1000000000000037 * 1000000000000000000117 TESTS:: @@ -4776,23 +4776,23 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): EXAMPLES:: - sage: 144.perfect_power() + sage: 144.perfect_power() # optional - sage.libs.pari (12, 2) - sage: 1.perfect_power() + sage: 1.perfect_power() # optional - sage.libs.pari (1, 1) - sage: 0.perfect_power() + sage: 0.perfect_power() # optional - sage.libs.pari (0, 1) - sage: (-1).perfect_power() + sage: (-1).perfect_power() # optional - sage.libs.pari (-1, 1) - sage: (-8).perfect_power() + sage: (-8).perfect_power() # optional - sage.libs.pari (-2, 3) - sage: (-4).perfect_power() + sage: (-4).perfect_power() # optional - sage.libs.pari (-4, 1) - sage: (101^29).perfect_power() + sage: (101^29).perfect_power() # optional - sage.libs.pari (101, 29) - sage: (-243).perfect_power() + sage: (-243).perfect_power() # optional - sage.libs.pari (-3, 5) - sage: (-64).perfect_power() + sage: (-64).perfect_power() # optional - sage.libs.pari (-4, 3) """ parians = self.__pari__().ispower() @@ -5079,55 +5079,55 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): EXAMPLES:: - sage: 17.is_prime_power() + sage: 17.is_prime_power() # optional - sage.libs.pari True - sage: 10.is_prime_power() + sage: 10.is_prime_power() # optional - sage.libs.pari False - sage: 64.is_prime_power() + sage: 64.is_prime_power() # optional - sage.libs.pari True - sage: (3^10000).is_prime_power() + sage: (3^10000).is_prime_power() # optional - sage.libs.pari True - sage: (10000).is_prime_power() + sage: (10000).is_prime_power() # optional - sage.libs.pari False - sage: (-3).is_prime_power() + sage: (-3).is_prime_power() # optional - sage.libs.pari False - sage: 0.is_prime_power() + sage: 0.is_prime_power() # optional - sage.libs.pari False - sage: 1.is_prime_power() + sage: 1.is_prime_power() # optional - sage.libs.pari False - sage: p = next_prime(10^20); p + sage: p = next_prime(10^20); p # optional - sage.libs.pari 100000000000000000039 - sage: p.is_prime_power() + sage: p.is_prime_power() # optional - sage.libs.pari True - sage: (p^97).is_prime_power() + sage: (p^97).is_prime_power() # optional - sage.libs.pari True - sage: (p+1).is_prime_power() + sage: (p+1).is_prime_power() # optional - sage.libs.pari False With the ``get_data`` keyword set to ``True``:: - sage: (3^100).is_prime_power(get_data=True) + sage: (3^100).is_prime_power(get_data=True) # optional - sage.libs.pari (3, 100) - sage: 12.is_prime_power(get_data=True) + sage: 12.is_prime_power(get_data=True) # optional - sage.libs.pari (12, 0) - sage: (p^97).is_prime_power(get_data=True) + sage: (p^97).is_prime_power(get_data=True) # optional - sage.libs.pari (100000000000000000039, 97) - sage: q = p.next_prime(); q + sage: q = p.next_prime(); q # optional - sage.libs.pari 100000000000000000129 - sage: (p*q).is_prime_power(get_data=True) + sage: (p*q).is_prime_power(get_data=True) # optional - sage.libs.pari (10000000000000000016800000000000000005031, 0) The method works for large entries when `proof=False`:: sage: proof.arithmetic(False) - sage: ((10^500 + 961)^4).is_prime_power() + sage: ((10^500 + 961)^4).is_prime_power() # optional - sage.libs.pari True sage: proof.arithmetic(True) We check that :trac:`4777` is fixed:: sage: n = 150607571^14 - sage: n.is_prime_power() + sage: n.is_prime_power() # optional - sage.libs.pari True """ if mpz_sgn(self.value) <= 0: @@ -5201,26 +5201,26 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): EXAMPLES:: sage: z = 2^31 - 1 - sage: z.is_prime() + sage: z.is_prime() # optional - sage.libs.pari True sage: z = 2^31 - sage: z.is_prime() + sage: z.is_prime() # optional - sage.libs.pari False sage: z = 7 - sage: z.is_prime() + sage: z.is_prime() # optional - sage.libs.pari True sage: z = -7 - sage: z.is_prime() + sage: z.is_prime() # optional - sage.libs.pari False - sage: z.is_irreducible() + sage: z.is_irreducible() # optional - sage.libs.pari True :: sage: z = 10^80 + 129 - sage: z.is_prime(proof=False) + sage: z.is_prime(proof=False) # optional - sage.libs.pari True - sage: z.is_prime(proof=True) + sage: z.is_prime(proof=True) # optional - sage.libs.pari True When starting Sage the arithmetic proof flag is True. We can change @@ -5229,12 +5229,12 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): sage: proof.arithmetic() True sage: n = 10^100 + 267 - sage: timeit("n.is_prime()") # not tested + sage: timeit("n.is_prime()") # not tested # optional - sage.libs.pari 5 loops, best of 3: 163 ms per loop sage: proof.arithmetic(False) sage: proof.arithmetic() False - sage: timeit("n.is_prime()") # not tested + sage: timeit("n.is_prime()") # not tested # optional - sage.libs.pari 1000 loops, best of 3: 573 us per loop ALGORITHM: @@ -5251,7 +5251,7 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): ....: if tab[i]: ....: for j in range(2*i, size, i): ....: tab[j] = 0 - sage: all(ZZ(i).is_prime() == b for i,b in enumerate(tab)) + sage: all(ZZ(i).is_prime() == b for i,b in enumerate(tab)) # optional - sage.libs.pari True """ if mpz_sgn(self.value) <= 0: @@ -5314,16 +5314,16 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): EXAMPLES:: sage: z = 2^31 - 1 - sage: z.is_irreducible() + sage: z.is_irreducible() # optional - sage.libs.pari True sage: z = 2^31 - sage: z.is_irreducible() + sage: z.is_irreducible() # optional - sage.libs.pari False sage: z = 7 - sage: z.is_irreducible() + sage: z.is_irreducible() # optional - sage.libs.pari True sage: z = -7 - sage: z.is_irreducible() + sage: z.is_irreducible() # optional - sage.libs.pari True """ cdef Integer n = self if self >= 0 else -self @@ -5343,10 +5343,10 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): EXAMPLES:: sage: z = 2^31 - 1 - sage: z.is_pseudoprime() + sage: z.is_pseudoprime() # optional - sage.libs.pari True sage: z = 2^31 - sage: z.is_pseudoprime() + sage: z.is_pseudoprime() # optional - sage.libs.pari False """ return self.__pari__().ispseudoprime() @@ -5367,17 +5367,17 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): EXAMPLES:: sage: x = 10^200 + 357 - sage: x.is_pseudoprime() + sage: x.is_pseudoprime() # optional - sage.libs.pari True - sage: (x^12).is_pseudoprime_power() + sage: (x^12).is_pseudoprime_power() # optional - sage.libs.pari True - sage: (x^12).is_pseudoprime_power(get_data=True) + sage: (x^12).is_pseudoprime_power(get_data=True) # optional - sage.libs.pari (1000...000357, 12) - sage: (997^100).is_pseudoprime_power() + sage: (997^100).is_pseudoprime_power() # optional - sage.libs.pari True - sage: (998^100).is_pseudoprime_power() + sage: (998^100).is_pseudoprime_power() # optional - sage.libs.pari False - sage: ((10^1000 + 453)^2).is_pseudoprime_power() + sage: ((10^1000 + 453)^2).is_pseudoprime_power() # optional - sage.libs.pari True TESTS:: @@ -5386,7 +5386,7 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): False sage: (-1).is_pseudoprime_power() False - sage: 1.is_pseudoprime_power() + sage: 1.is_pseudoprime_power() # optional - sage.libs.pari False """ return self.is_prime_power(proof=False, get_data=get_data) @@ -5453,20 +5453,20 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): EXAMPLES:: - sage: K = NumberField(x^2 - 2, 'beta') + sage: K = NumberField(x^2 - 2, 'beta') # optional - sage.rings.number_field sage: n = 4 - sage: n.is_norm(K) + sage: n.is_norm(K) # optional - sage.rings.number_field True - sage: 5.is_norm(K) + sage: 5.is_norm(K) # optional - sage.rings.number_field False sage: 7.is_norm(QQ) True - sage: n.is_norm(K, element=True) + sage: n.is_norm(K, element=True) # optional - sage.rings.number_field (True, -4*beta + 6) - sage: n.is_norm(K, element=True)[1].norm() + sage: n.is_norm(K, element=True)[1].norm() # optional - sage.rings.number_field 4 sage: n = 5 - sage: n.is_norm(K, element=True) + sage: n.is_norm(K, element=True) # optional - sage.rings.number_field (False, None) sage: n = 7 sage: n.is_norm(QQ, element=True) @@ -5482,15 +5482,14 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): EXAMPLES:: - sage: 3._bnfisnorm(QuadraticField(-1, 'i')) + sage: 3._bnfisnorm(QuadraticField(-1, 'i')) # optional - sage.rings.number_field (1, 3) - sage: 7._bnfisnorm(CyclotomicField(7)) + sage: 7._bnfisnorm(CyclotomicField(7)) # optional - sage.rings.number_field (zeta7^5 - zeta7^2, 1) """ from sage.rings.rational_field import QQ return QQ(self)._bnfisnorm(K, proof=proof, extra_primes=extra_primes) - def jacobi(self, b): r""" Calculate the Jacobi symbol `\left(\frac{self}{b}\right)`. @@ -5585,11 +5584,11 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): EXAMPLES:: - sage: (-163).class_number() + sage: (-163).class_number() # optional - sage.libs.pari 1 - sage: (-104).class_number() + sage: (-104).class_number() # optional - sage.libs.pari 6 - sage: [((4*n+1),(4*n+1).class_number()) for n in [21..29]] + sage: [((4*n+1),(4*n+1).class_number()) for n in [21..29]] # optional - sage.libs.pari [(85, 2), (89, 1), (93, 1), @@ -5621,13 +5620,14 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): ... ValueError: class_number only defined for integers congruent to 0 or 1 modulo 4 """ - global objtogen - if objtogen is None: - from cypari2.gen import objtogen if self.is_square(): raise ValueError("class_number not defined for square integers") if self % 4 not in [0, 1]: raise ValueError("class_number only defined for integers congruent to 0 or 1 modulo 4") + + global objtogen + if objtogen is None: + from cypari2.gen import objtogen flag = self < 0 and proof return objtogen(self).qfbclassno(flag).sage() @@ -5670,8 +5670,8 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): 2 sage: a.squarefree_part(bound=2**14) 2 - sage: a = 7^3 * next_prime(2^100)^2 * next_prime(2^200) - sage: a / a.squarefree_part(bound=1000) + sage: a = 7^3 * next_prime(2^100)^2 * next_prime(2^200) # optional - sage.libs.pari + sage: a / a.squarefree_part(bound=1000) # optional - sage.libs.pari 49 """ cdef Integer z @@ -5718,17 +5718,17 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): EXAMPLES:: - sage: (-37).next_probable_prime() + sage: (-37).next_probable_prime() # optional - sage.libs.pari 2 - sage: (100).next_probable_prime() + sage: (100).next_probable_prime() # optional - sage.libs.pari 101 - sage: (2^512).next_probable_prime() + sage: (2^512).next_probable_prime() # optional - sage.libs.pari 13407807929942597099574024998205846127479365820592393377723561443721764030073546976801874298166903427690031858186486050853753882811946569946433649006084171 - sage: 0.next_probable_prime() + sage: 0.next_probable_prime() # optional - sage.libs.pari 2 - sage: 126.next_probable_prime() + sage: 126.next_probable_prime() # optional - sage.libs.pari 127 - sage: 144168.next_probable_prime() + sage: 144168.next_probable_prime() # optional - sage.libs.pari 144169 """ return Integer( self.__pari__().nextprime(True) ) @@ -5747,23 +5747,23 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): EXAMPLES:: - sage: 100.next_prime() + sage: 100.next_prime() # optional - sage.libs.pari 101 - sage: (10^50).next_prime() + sage: (10^50).next_prime() # optional - sage.libs.pari 100000000000000000000000000000000000000000000000151 Use ``proof=False``, which is way faster since it does not need a primality proof:: - sage: b = (2^1024).next_prime(proof=False) - sage: b - 2^1024 + sage: b = (2^1024).next_prime(proof=False) # optional - sage.libs.pari + sage: b - 2^1024 # optional - sage.libs.pari 643 :: - sage: Integer(0).next_prime() + sage: Integer(0).next_prime() # optional - sage.libs.pari 2 - sage: Integer(1001).next_prime() + sage: Integer(1001).next_prime() # optional - sage.libs.pari 1009 """ # Use PARI to compute the next *pseudo*-prime @@ -5792,11 +5792,11 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): EXAMPLES:: - sage: 10.previous_prime() + sage: 10.previous_prime() # optional - sage.libs.pari 7 - sage: 7.previous_prime() + sage: 7.previous_prime() # optional - sage.libs.pari 5 - sage: 14376485.previous_prime() + sage: 14376485.previous_prime() # optional - sage.libs.pari 14376463 sage: 2.previous_prime() @@ -5807,8 +5807,8 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): An example using ``proof=False``, which is way faster since it does not need a primality proof:: - sage: b = (2^1024).previous_prime(proof=False) - sage: 2^1024 - b + sage: b = (2^1024).previous_prime(proof=False) # optional - sage.libs.pari + sage: 2^1024 - b # optional - sage.libs.pari 105 """ if mpz_cmp_ui(self.value, 2) <= 0: @@ -5848,23 +5848,23 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): sage: (-1).next_prime_power() 2 - sage: 2.next_prime_power() + sage: 2.next_prime_power() # optional - sage.libs.pari 3 - sage: 103.next_prime_power() + sage: 103.next_prime_power() # optional - sage.libs.pari 107 - sage: 107.next_prime_power() + sage: 107.next_prime_power() # optional - sage.libs.pari 109 - sage: 2044.next_prime_power() + sage: 2044.next_prime_power() # optional - sage.libs.pari 2048 TESTS:: - sage: [(2**k-1).next_prime_power() for k in range(1,10)] + sage: [(2**k-1).next_prime_power() for k in range(1,10)] # optional - sage.libs.pari [2, 4, 8, 16, 32, 64, 128, 256, 512] - sage: [(2**k).next_prime_power() for k in range(10)] + sage: [(2**k).next_prime_power() for k in range(10)] # optional - sage.libs.pari [2, 3, 5, 9, 17, 37, 67, 131, 257, 521] - sage: for _ in range(10): + sage: for _ in range(10): # optional - sage.libs.pari ....: n = ZZ.random_element(2**256).next_prime_power() ....: m = n.next_prime_power().previous_prime_power() ....: assert m == n, "problem with n = {}".format(n) @@ -5912,13 +5912,13 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): EXAMPLES:: - sage: 3.previous_prime_power() + sage: 3.previous_prime_power() # optional - sage.libs.pari 2 - sage: 103.previous_prime_power() + sage: 103.previous_prime_power() # optional - sage.libs.pari 101 - sage: 107.previous_prime_power() + sage: 107.previous_prime_power() # optional - sage.libs.pari 103 - sage: 2044.previous_prime_power() + sage: 2044.previous_prime_power() # optional - sage.libs.pari 2039 sage: 2.previous_prime_power() @@ -5928,12 +5928,12 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): TESTS:: - sage: [(2**k+1).previous_prime_power() for k in range(1,10)] + sage: [(2**k+1).previous_prime_power() for k in range(1,10)] # optional - sage.libs.pari [2, 4, 8, 16, 32, 64, 128, 256, 512] - sage: [(2**k).previous_prime_power() for k in range(2, 10)] + sage: [(2**k).previous_prime_power() for k in range(2, 10)] # optional - sage.libs.pari [3, 7, 13, 31, 61, 127, 251, 509] - sage: for _ in range(10): + sage: for _ in range(10): # optional - sage.libs.pari ....: n = ZZ.random_element(3,2**256).previous_prime_power() ....: m = n.previous_prime_power().next_prime_power() ....: assert m == n, "problem with n = {}".format(n) @@ -6002,11 +6002,11 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): EXAMPLES:: - sage: 100.is_squarefree() + sage: 100.is_squarefree() # optional - sage.libs.pari False - sage: 102.is_squarefree() + sage: 102.is_squarefree() # optional - sage.libs.pari True - sage: 0.is_squarefree() + sage: 0.is_squarefree() # optional - sage.libs.pari False """ return self.__pari__().issquarefree() @@ -6018,16 +6018,16 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): EXAMPLES:: sage: n = 9390823 - sage: m = n.__pari__(); m + sage: m = n.__pari__(); m # optional - sage.libs.pari 9390823 - sage: type(m) + sage: type(m) # optional - sage.libs.pari TESTS:: sage: n = 10^10000000 - sage: m = n.__pari__() # crash from trac 875 - sage: m % 1234567 + sage: m = n.__pari__() # crash from trac 875 # optional - sage.libs.pari + sage: m % 1234567 # optional - sage.libs.pari 1041334 """ @@ -6232,19 +6232,19 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): 12 sage: sqrt(Integer(144)) 12 - sage: Integer(102).sqrt() + sage: Integer(102).sqrt() # optional - sage.symbolic sqrt(102) :: sage: n = 2 - sage: n.sqrt(all=True) + sage: n.sqrt(all=True) # optional - sage.symbolic [sqrt(2), -sqrt(2)] sage: n.sqrt(prec=10) 1.4 sage: n.sqrt(prec=100) 1.4142135623730950488016887242 - sage: n.sqrt(prec=100,all=True) + sage: n.sqrt(prec=100, all=True) [1.4142135623730950488016887242, -1.4142135623730950488016887242] sage: n.sqrt(extend=False) Traceback (most recent call last): @@ -6261,7 +6261,7 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): TESTS:: - sage: type(5.sqrt()) + sage: type(5.sqrt()) # optional - sage.symbolic sage: type(5.sqrt(prec=53)) @@ -6887,7 +6887,7 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): sage: 10.binomial(2) 45 - sage: 10.binomial(2, algorithm='pari') + sage: 10.binomial(2, algorithm='pari') # optional - sage.libs.pari 45 sage: 10.binomial(-2) 0 @@ -6929,7 +6929,7 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): check for reliable interrupting, see :trac:`18919`:: sage: from cysignals import AlarmInterrupt - sage: for i in [1..10]: # long time (5s) + sage: for i in [1..10]: # long time (5s) # optional - sage.libs.pari ....: try: ....: alarm(i/11) ....: (2^100).binomial(2^22, algorithm='pari') From a1d822dc93b0396b4a0407fe6132498a44270769 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 15 Feb 2023 13:20:53 -0800 Subject: [PATCH 498/751] src/sage/geometry/polyhedron/base2.py, src/sage/rings/integer.pyx: Reviewer fixes to # optional tags --- src/sage/geometry/polyhedron/base2.py | 4 ++-- src/sage/rings/integer.pyx | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/sage/geometry/polyhedron/base2.py b/src/sage/geometry/polyhedron/base2.py index fa0765795cb..69d4204e29c 100644 --- a/src/sage/geometry/polyhedron/base2.py +++ b/src/sage/geometry/polyhedron/base2.py @@ -793,8 +793,8 @@ def generating_function_of_integral_points(self, **kwds): z^5 + z^6 + 2*z^7 + 3*z^8 + 5*z^9 + 7*z^10 + 10*z^11 + 13*z^12 + 18*z^13 + 23*z^14 + 30*z^15 + 37*z^16 + 47*z^17 + 57*z^18 + 70*z^19 + 84*z^20 + 101*z^21 + 119*z^22 + 141*z^23 + 164*z^24 + O(z^25) - sage: [Partitions(k, length=5).cardinality() for k in range(5,20)] == \ # optional - sage.combinat - ....: c.truncate().coefficients(sparse=False)[5:20] + sage: ([Partitions(k, length=5).cardinality() for k in range(5,20)] == # optional - sage.combinat + ....: c.truncate().coefficients(sparse=False)[5:20]) True .. SEEALSO:: diff --git a/src/sage/rings/integer.pyx b/src/sage/rings/integer.pyx index f038e747472..49fe893d5c8 100644 --- a/src/sage/rings/integer.pyx +++ b/src/sage/rings/integer.pyx @@ -499,7 +499,7 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): :: sage: k = GF(2) # optional - sage.libs.pari - sage: ZZ( (k(0),k(1)), 2) + sage: ZZ((k(0),k(1)), 2) # optional - sage.libs.pari 2 :: @@ -3699,11 +3699,11 @@ cdef class Integer(sage.structure.element.EuclideanDomainElement): sage: n = next_prime(10^5) * next_prime(10^40); n.trial_division() # optional - sage.libs.pari 100003 - sage: n.trial_division(bound=10^4) + sage: n.trial_division(bound=10^4) # optional - sage.libs.pari 1000030000000000000000000000000000000012100363 - sage: (-n).trial_division(bound=10^4) + sage: (-n).trial_division(bound=10^4) # optional - sage.libs.pari 1000030000000000000000000000000000000012100363 - sage: (-n).trial_division() + sage: (-n).trial_division() # optional - sage.libs.pari 100003 sage: n = 2 * next_prime(10^40); n.trial_division() # optional - sage.libs.pari 2 From d6ffafd55a1275eb632133d05aeeea1620f88ece Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Wed, 15 Feb 2023 13:24:10 -0800 Subject: [PATCH 499/751] src/sage/features/sagemath.py (all_features): Add sage.libs.pari --- src/sage/features/sagemath.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/sage/features/sagemath.py b/src/sage/features/sagemath.py index fdcd07944e3..3cb66162f07 100644 --- a/src/sage/features/sagemath.py +++ b/src/sage/features/sagemath.py @@ -143,6 +143,7 @@ def __init__(self): JoinFeature.__init__(self, 'sage.libs.pari', [PythonModule('sage.libs.pari.convert_sage')]) + class sage__plot(JoinFeature): r""" A :class:`~sage.features.Feature` describing the presence of :mod:`sage.plot`. @@ -301,6 +302,7 @@ def all_features(): sage__geometry__polyhedron(), sage__graphs(), sage__groups(), + sage__libs__pari(), sage__plot(), sage__rings__number_field(), sage__rings__padics(), From f7ec6a116705fb08506e02139f89bf2aabfc879d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 16 Feb 2023 18:38:29 -0800 Subject: [PATCH 500/751] src/sage/geometry/polyhedral_complex.py: Mark # optional - sage.graphs --- src/sage/geometry/polyhedral_complex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/geometry/polyhedral_complex.py b/src/sage/geometry/polyhedral_complex.py index 913a788b5df..629a4f9ba2a 100644 --- a/src/sage/geometry/polyhedral_complex.py +++ b/src/sage/geometry/polyhedral_complex.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# sage.doctest: optional - sage.graphs r""" Finite polyhedral complexes From 4aa626402d1f24565e151dc47ff3714a060fc8dd Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 16 Feb 2023 20:55:56 -0800 Subject: [PATCH 501/751] sage.geometry.triangulation: More # optional --- src/sage/geometry/triangulation/point_configuration.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sage/geometry/triangulation/point_configuration.py b/src/sage/geometry/triangulation/point_configuration.py index f970a5faf4a..3ad39184f37 100644 --- a/src/sage/geometry/triangulation/point_configuration.py +++ b/src/sage/geometry/triangulation/point_configuration.py @@ -1146,10 +1146,10 @@ def restricted_automorphism_group(self): EXAMPLES:: sage: pyramid = PointConfiguration([[1,0,0],[0,1,1],[0,1,-1],[0,-1,-1],[0,-1,1]]) - sage: G = pyramid.restricted_automorphism_group() - sage: G == PermutationGroup([[(3,5)], [(2,3),(4,5)], [(2,4)]]) + sage: G = pyramid.restricted_automorphism_group() # optional - sage.graphs, sage.groups + sage: G == PermutationGroup([[(3,5)], [(2,3),(4,5)], [(2,4)]]) # optional - sage.graphs, sage.groups True - sage: DihedralGroup(4).is_isomorphic(G) + sage: DihedralGroup(4).is_isomorphic(G) # optional - sage.graphs, sage.groups True The square with an off-center point in the middle. Note that @@ -1157,9 +1157,9 @@ def restricted_automorphism_group(self): `D_4` of the convex hull:: sage: square = PointConfiguration([(3/4,3/4),(1,1),(1,-1),(-1,-1),(-1,1)]) - sage: square.restricted_automorphism_group() + sage: square.restricted_automorphism_group() # optional - sage.graphs, sage.groups Permutation Group with generators [(3,5)] - sage: DihedralGroup(1).is_isomorphic(_) + sage: DihedralGroup(1).is_isomorphic(_) # optional - sage.graphs, sage.groups True """ v_list = [ vector(p.projective()) for p in self ] From 30cabf8b98081d8f74e2aeebfe968d6a53bd2c65 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 16 Feb 2023 22:16:49 -0800 Subject: [PATCH 502/751] src/sage/rings/integer_ring.pyx: One cimport instead of import --- src/sage/rings/integer_ring.pyx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sage/rings/integer_ring.pyx b/src/sage/rings/integer_ring.pyx index 39661e76d62..beb5714293b 100644 --- a/src/sage/rings/integer_ring.pyx +++ b/src/sage/rings/integer_ring.pyx @@ -59,8 +59,7 @@ import sage.rings.ideal from sage.categories.basic import EuclideanDomains from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets from sage.structure.coerce cimport is_numpy_type -from sage.structure.element cimport parent -from sage.structure.element import NumberFieldElement +from sage.structure.element cimport parent, NumberFieldElement from sage.structure.parent_gens import ParentWithGens from sage.structure.parent cimport Parent from sage.structure.richcmp cimport rich_to_bool From 487bd40ca8ff16921131b5d6b49fb76bb8a923df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Fri, 17 Feb 2023 15:09:22 +0100 Subject: [PATCH 503/751] fix all pycodestyle E303 warnings in all folders c* --- src/sage/calculus/calculus.py | 1 - src/sage/categories/affine_weyl_groups.py | 1 - src/sage/categories/algebras_with_basis.py | 1 - src/sage/categories/category.py | 2 -- src/sage/categories/classical_crystals.py | 1 - src/sage/categories/coalgebras.py | 1 - ...x_reflection_or_generalized_coxeter_groups.py | 1 - src/sage/categories/crystals.py | 1 - .../graded_connected_hopf_algebras_with_basis.py | 1 - src/sage/categories/examples/sets_cat.py | 6 ------ .../categories/examples/with_realizations.py | 1 - .../filtered_hopf_algebras_with_basis.py | 1 - .../finite_dimensional_algebras_with_basis.py | 2 -- ...dimensional_semisimple_algebras_with_basis.py | 1 - .../categories/generalized_coxeter_groups.py | 1 - src/sage/categories/graded_modules_with_basis.py | 1 - src/sage/categories/hecke_modules.py | 1 - src/sage/categories/semigroups.py | 1 - src/sage/categories/sets_cat.py | 1 - src/sage/categories/topological_spaces.py | 1 - src/sage/categories/weyl_groups.py | 2 -- src/sage/coding/encoder.py | 1 - src/sage/coding/extended_code.py | 16 ---------------- src/sage/coding/golay_code.py | 2 -- src/sage/coding/guruswami_sudan/gs_decoder.py | 3 --- src/sage/coding/information_set_decoder.py | 4 ---- src/sage/coding/linear_code_no_metric.py | 1 - src/sage/coding/punctured_code.py | 9 --------- src/sage/coding/self_dual_codes.py | 1 - src/sage/combinat/designs/bibd.py | 2 -- src/sage/combinat/designs/database.py | 1 - src/sage/combinat/designs/difference_family.py | 4 ---- src/sage/combinat/designs/ext_rep.py | 1 - .../combinat/designs/incidence_structures.py | 1 - .../designs/orthogonal_arrays_build_recursive.py | 1 - .../designs/steiner_quadruple_systems.py | 5 ----- src/sage/combinat/k_tableau.py | 1 - src/sage/combinat/matrices/hadamard_matrix.py | 2 -- src/sage/combinat/root_system/type_B.py | 1 - src/sage/combinat/root_system/type_D.py | 1 - src/sage/combinat/t_sequences.py | 2 -- src/sage/combinat/vector_partition.py | 1 - src/sage/crypto/block_cipher/miniaes.py | 1 - src/sage/crypto/lwe.py | 2 -- src/sage/crypto/mq/sr.py | 7 ------- 45 files changed, 99 deletions(-) diff --git a/src/sage/calculus/calculus.py b/src/sage/calculus/calculus.py index 00da3f9d4af..4fe341a76ca 100644 --- a/src/sage/calculus/calculus.py +++ b/src/sage/calculus/calculus.py @@ -2442,7 +2442,6 @@ def maxima_options(**kwds): syms_default = dict(syms_cur) - def _find_var(name, interface=None): """ Function to pass to Parser for constructing diff --git a/src/sage/categories/affine_weyl_groups.py b/src/sage/categories/affine_weyl_groups.py index 285fe9e45ab..6bc26562b8e 100644 --- a/src/sage/categories/affine_weyl_groups.py +++ b/src/sage/categories/affine_weyl_groups.py @@ -14,7 +14,6 @@ from sage.categories.finite_enumerated_sets import FiniteEnumeratedSets - class AffineWeylGroups(Category_singleton): """ The category of affine Weyl groups diff --git a/src/sage/categories/algebras_with_basis.py b/src/sage/categories/algebras_with_basis.py index dbd7a9a43a1..d2296873b59 100644 --- a/src/sage/categories/algebras_with_basis.py +++ b/src/sage/categories/algebras_with_basis.py @@ -274,7 +274,6 @@ def one(self): # version of module morphism, this would not take # advantage of the block structure - class TensorProducts(TensorProductsCategory): """ The category of algebras with basis constructed by tensor product of algebras with basis diff --git a/src/sage/categories/category.py b/src/sage/categories/category.py index f70455cf1a0..9c6c53470c0 100644 --- a/src/sage/categories/category.py +++ b/src/sage/categories/category.py @@ -1470,7 +1470,6 @@ def _test_category(self, **options): _cmp_key = _cmp_key - ########################################################################## # Construction of the associated abstract classes for parents, elements, ... ########################################################################## @@ -2817,7 +2816,6 @@ def _make_named_class(self, name, method_provider, cache=False, **options): self._make_named_class_cache[key] = result return result - @abstract_method def _make_named_class_key(self, name): r""" diff --git a/src/sage/categories/classical_crystals.py b/src/sage/categories/classical_crystals.py index 490337d0bda..9650dae15a2 100644 --- a/src/sage/categories/classical_crystals.py +++ b/src/sage/categories/classical_crystals.py @@ -107,7 +107,6 @@ def additional_structure(self): """ return None - class ParentMethods: def demazure_character(self, w, f=None): diff --git a/src/sage/categories/coalgebras.py b/src/sage/categories/coalgebras.py index 22a385d5f0d..6e23888617e 100644 --- a/src/sage/categories/coalgebras.py +++ b/src/sage/categories/coalgebras.py @@ -79,7 +79,6 @@ def counit(self, x): and Hopf algebras using the counit. """ - @abstract_method def coproduct(self, x): """ diff --git a/src/sage/categories/complex_reflection_or_generalized_coxeter_groups.py b/src/sage/categories/complex_reflection_or_generalized_coxeter_groups.py index 6ddd62e0099..004bc2331ce 100644 --- a/src/sage/categories/complex_reflection_or_generalized_coxeter_groups.py +++ b/src/sage/categories/complex_reflection_or_generalized_coxeter_groups.py @@ -842,7 +842,6 @@ def is_reducible(self): """ return not self.is_irreducible() - class ElementMethods: def apply_simple_reflection_left(self, i): r""" diff --git a/src/sage/categories/crystals.py b/src/sage/categories/crystals.py index 980bebc9f84..f74340cf25d 100644 --- a/src/sage/categories/crystals.py +++ b/src/sage/categories/crystals.py @@ -388,7 +388,6 @@ def __iter__(self, index_set=None, max_depth=float('inf')): R = RecursivelyEnumeratedSet(self.module_generators, succ, structure=None) return R.breadth_first_search_iterator(max_depth) - def subcrystal(self, index_set=None, generators=None, max_depth=float("inf"), direction="both", contained=None, virtualization=None, scaling_factors=None, diff --git a/src/sage/categories/examples/graded_connected_hopf_algebras_with_basis.py b/src/sage/categories/examples/graded_connected_hopf_algebras_with_basis.py index 4e044441d2c..b67e01a4b02 100644 --- a/src/sage/categories/examples/graded_connected_hopf_algebras_with_basis.py +++ b/src/sage/categories/examples/graded_connected_hopf_algebras_with_basis.py @@ -44,7 +44,6 @@ def __init__(self, base_ring): CombinatorialFreeModule.__init__(self, base_ring, NonNegativeIntegers(), category=GradedHopfAlgebrasWithBasis(base_ring).Connected()) - @cached_method def one_basis(self): """ diff --git a/src/sage/categories/examples/sets_cat.py b/src/sage/categories/examples/sets_cat.py index 93cc264580d..cd5201e2c43 100644 --- a/src/sage/categories/examples/sets_cat.py +++ b/src/sage/categories/examples/sets_cat.py @@ -149,9 +149,6 @@ def _element_constructor_(self, e): element_class = Integer - - - from sage.misc.abstract_method import abstract_method class PrimeNumbers_Abstract(UniqueRepresentation, Parent): """ @@ -556,9 +553,6 @@ def _integer_(self, IntRing): return IntRing(self.value) - - - #*************************************************************************# class PrimeNumbers_Facade(PrimeNumbers_Abstract): r""" diff --git a/src/sage/categories/examples/with_realizations.py b/src/sage/categories/examples/with_realizations.py index 06e060f8925..d99cfba3a3a 100644 --- a/src/sage/categories/examples/with_realizations.py +++ b/src/sage/categories/examples/with_realizations.py @@ -301,7 +301,6 @@ def super_categories(self): return [A.Realizations(), category.Realizations().WithBasis()] - class ParentMethods: def from_set(self, *args): diff --git a/src/sage/categories/filtered_hopf_algebras_with_basis.py b/src/sage/categories/filtered_hopf_algebras_with_basis.py index d93f89422da..08888c78313 100644 --- a/src/sage/categories/filtered_hopf_algebras_with_basis.py +++ b/src/sage/categories/filtered_hopf_algebras_with_basis.py @@ -65,7 +65,6 @@ def super_categories(self): R = self.base_category().base_ring() return [HopfAlgebras(R).Filtered()] - class Connected(CategoryWithAxiom_over_base_ring): class ParentMethods: @cached_method diff --git a/src/sage/categories/finite_dimensional_algebras_with_basis.py b/src/sage/categories/finite_dimensional_algebras_with_basis.py index 6d2a713ece1..542cf09d425 100644 --- a/src/sage/categories/finite_dimensional_algebras_with_basis.py +++ b/src/sage/categories/finite_dimensional_algebras_with_basis.py @@ -313,7 +313,6 @@ def semisimple_quotient(self): result.rename("Semisimple quotient of {}".format(self)) return result - @cached_method def center_basis(self): r""" @@ -819,7 +818,6 @@ def peirce_summand(self, ei, ej): return self.submodule([self.from_vector(v) for v in ideal.basis()], already_echelonized=True) - def peirce_decomposition(self, idempotents=None, check=True): r""" Return a Peirce decomposition of ``self``. diff --git a/src/sage/categories/finite_dimensional_semisimple_algebras_with_basis.py b/src/sage/categories/finite_dimensional_semisimple_algebras_with_basis.py index 36ad56fdaae..59ab6a9a8ad 100644 --- a/src/sage/categories/finite_dimensional_semisimple_algebras_with_basis.py +++ b/src/sage/categories/finite_dimensional_semisimple_algebras_with_basis.py @@ -105,7 +105,6 @@ def central_orthogonal_idempotents(self): return tuple([x.lift() for x in self.center().central_orthogonal_idempotents()]) - class Commutative(CategoryWithAxiom_over_base_ring): class ParentMethods: diff --git a/src/sage/categories/generalized_coxeter_groups.py b/src/sage/categories/generalized_coxeter_groups.py index 8a92209299e..a59da41b3f1 100644 --- a/src/sage/categories/generalized_coxeter_groups.py +++ b/src/sage/categories/generalized_coxeter_groups.py @@ -68,7 +68,6 @@ def additional_structure(self): """ return None - class Finite(CategoryWithAxiom): """ The category of finite generalized Coxeter groups. diff --git a/src/sage/categories/graded_modules_with_basis.py b/src/sage/categories/graded_modules_with_basis.py index a53b1de91dd..1868147bedb 100644 --- a/src/sage/categories/graded_modules_with_basis.py +++ b/src/sage/categories/graded_modules_with_basis.py @@ -67,7 +67,6 @@ def degree_negation(self, element): for key, value in element.monomial_coefficients(copy=False).items()]) - def submodule(self, gens, check=True, already_echelonized=False, unitriangular=False, support_order=None, category=None, *args, **opts): diff --git a/src/sage/categories/hecke_modules.py b/src/sage/categories/hecke_modules.py index 88331973496..6b593d4fb3a 100644 --- a/src/sage/categories/hecke_modules.py +++ b/src/sage/categories/hecke_modules.py @@ -84,7 +84,6 @@ def super_categories(self): R = self.base_ring() return [ModulesWithBasis(R)] - def _repr_object_names(self): """ Return the names of the objects of this category. diff --git a/src/sage/categories/semigroups.py b/src/sage/categories/semigroups.py index d053b20e3c0..8e60690e631 100644 --- a/src/sage/categories/semigroups.py +++ b/src/sage/categories/semigroups.py @@ -510,7 +510,6 @@ def _pow_int(self, n): raise ArithmeticError("only positive powers are supported in a semigroup") return generic_power(self, n) - class SubcategoryMethods: @cached_method diff --git a/src/sage/categories/sets_cat.py b/src/sage/categories/sets_cat.py index 9f9bab84e23..bc3c55e9029 100644 --- a/src/sage/categories/sets_cat.py +++ b/src/sage/categories/sets_cat.py @@ -2215,7 +2215,6 @@ def example(self): S3 = FiniteEnumeratedSets().example() return cartesian_product([S1, S2, S3]) - class ParentMethods: def __iter__(self): r""" diff --git a/src/sage/categories/topological_spaces.py b/src/sage/categories/topological_spaces.py index 409e6cdcd8f..7ab806e6a2b 100644 --- a/src/sage/categories/topological_spaces.py +++ b/src/sage/categories/topological_spaces.py @@ -141,7 +141,6 @@ def extra_super_categories(self): """ return [TopologicalSpaces().Connected()] - class Compact(CategoryWithAxiom): """ The category of compact topological spaces. diff --git a/src/sage/categories/weyl_groups.py b/src/sage/categories/weyl_groups.py index c6b0338e441..ed094d6554d 100644 --- a/src/sage/categories/weyl_groups.py +++ b/src/sage/categories/weyl_groups.py @@ -349,7 +349,6 @@ def is_pieri_factor(self): return self in self.parent().pieri_factors() - def left_pieri_factorizations(self, max_length=None): r""" Returns all factorizations of ``self`` as `uv`, where `u` @@ -494,7 +493,6 @@ def stanley_symmetric_function_as_polynomial(self, max_length=None): for (u,v) in self.left_pieri_factorizations(max_length) if u != W.one())) - def stanley_symmetric_function(self): r""" Return the affine Stanley symmetric function indexed by ``self``. diff --git a/src/sage/coding/encoder.py b/src/sage/coding/encoder.py index 56f244e3ab9..ba1070633fd 100644 --- a/src/sage/coding/encoder.py +++ b/src/sage/coding/encoder.py @@ -194,7 +194,6 @@ def __call__(self, m): """ return self.encode(m) - def unencode(self, c, nocheck=False): r""" Return the message corresponding to the codeword ``c``. diff --git a/src/sage/coding/extended_code.py b/src/sage/coding/extended_code.py index 83c3c0143c4..6065d4c2c96 100644 --- a/src/sage/coding/extended_code.py +++ b/src/sage/coding/extended_code.py @@ -179,14 +179,6 @@ def random_element(self): return vector(F, c_list) - - - - - - - - class ExtendedCodeExtendedMatrixEncoder(Encoder): r""" Encoder using original code's generator matrix to compute the extended code's one. @@ -286,14 +278,6 @@ def generator_matrix(self): return M - - - - - - - - class ExtendedCodeOriginalCodeDecoder(Decoder): r""" Decoder which decodes through a decoder over the original code. diff --git a/src/sage/coding/golay_code.py b/src/sage/coding/golay_code.py index 029c572209e..16d395ffc15 100644 --- a/src/sage/coding/golay_code.py +++ b/src/sage/coding/golay_code.py @@ -396,8 +396,6 @@ def parity_check_matrix(self): return H - - ####################### registration ############################### GolayCode._registered_encoders["GeneratorMatrix"] = LinearCodeGeneratorMatrixEncoder diff --git a/src/sage/coding/guruswami_sudan/gs_decoder.py b/src/sage/coding/guruswami_sudan/gs_decoder.py index bfc04fee8ed..830d49238dc 100644 --- a/src/sage/coding/guruswami_sudan/gs_decoder.py +++ b/src/sage/coding/guruswami_sudan/gs_decoder.py @@ -534,8 +534,6 @@ def gs_satisfactory(tau, s, l, C = None, n_k = None): n,k = n_k_params(C, n_k) return l > 0 and s > 0 and n * s * (s+1) < (l+1) * (2*s*(n-tau) - (k-1) * l) - - ####################### decoder itself ############################### def __init__(self, code, tau = None, parameters = None, interpolation_alg = None, root_finder = None): r""" @@ -712,7 +710,6 @@ def parameters(self): """ return (self._s, self._ell) - def multiplicity(self): r""" Returns the multiplicity parameter of ``self``. diff --git a/src/sage/coding/information_set_decoder.py b/src/sage/coding/information_set_decoder.py index a2cbf94fc5e..31f6a255643 100644 --- a/src/sage/coding/information_set_decoder.py +++ b/src/sage/coding/information_set_decoder.py @@ -341,8 +341,6 @@ def _latex_(self): return "\\textnormal{{ISD Algorithm ({}) for }}{} \\textnormal{{decoding {} errors}}".format(self._algorithm_name, self.code()._latex_(), _format_decoding_interval(self.decoding_interval())) - - class LeeBrickellISDAlgorithm(InformationSetAlgorithm): r""" The Lee-Brickell algorithm for information-set decoding. @@ -625,8 +623,6 @@ def _calibrate_select(self, estimates): self._time_estimate = estimates[search_size] - - class LinearCodeInformationSetDecoder(Decoder): r""" Information-set decoder for any linear code. diff --git a/src/sage/coding/linear_code_no_metric.py b/src/sage/coding/linear_code_no_metric.py index 9610c4e31ce..5072be89a0e 100644 --- a/src/sage/coding/linear_code_no_metric.py +++ b/src/sage/coding/linear_code_no_metric.py @@ -1148,7 +1148,6 @@ def __init__(self, code, systematic_positions=None): # Test that the systematic positions are an information set self.generator_matrix() - def __eq__(self, other): r""" Tests equality between LinearCodeSystematicEncoder objects. diff --git a/src/sage/coding/punctured_code.py b/src/sage/coding/punctured_code.py index 4b3ae5f0a39..0c85dddbd77 100644 --- a/src/sage/coding/punctured_code.py +++ b/src/sage/coding/punctured_code.py @@ -92,7 +92,6 @@ def _insert_punctured_positions(l, punctured_points, value = None): return final - class PuncturedCode(AbstractLinearCode): r""" Representation of a punctured code. @@ -425,13 +424,6 @@ def generator_matrix(self): return M - - - - - - - class PuncturedCodeOriginalCodeDecoder(Decoder): r""" Decoder decoding through a decoder over the original code of its punctured code. @@ -580,7 +572,6 @@ def _repr_(self): """ return "Decoder of %s through %s" % (self.code(), self.original_decoder()) - def _latex_(self): r""" Returns a latex representation of ``self``. diff --git a/src/sage/coding/self_dual_codes.py b/src/sage/coding/self_dual_codes.py index 49125e8fb01..4dcdcdff82f 100644 --- a/src/sage/coding/self_dual_codes.py +++ b/src/sage/coding/self_dual_codes.py @@ -606,7 +606,6 @@ def self_dual_binary_codes(n): "6":self_dual_codes_18_6,"7":self_dual_codes_18_7,"8":self_dual_codes_18_8} return self_dual_codes - if n == 20: # all of these of these are Type I; 2 of these codes # are formally equivalent but with different automorphism groups; diff --git a/src/sage/combinat/designs/bibd.py b/src/sage/combinat/designs/bibd.py index 72be454ec63..2d93c5d3833 100644 --- a/src/sage/combinat/designs/bibd.py +++ b/src/sage/combinat/designs/bibd.py @@ -333,7 +333,6 @@ def balanced_incomplete_block_design(v, k, lambd=1, existence=False, use_LJCR=Fa else: return BIBD(B.ground_set(), B.blocks(), k=k, lambd=1, copy=False) - if ( (k+lambd)*(k+lambd-1) == lambd*(v+k+lambd-1) and balanced_incomplete_block_design(v+k+lambd, k+lambd, lambd, existence=True) is True): # By removing a block and all points of that block from the @@ -661,7 +660,6 @@ def BIBD_from_TD(v,k,existence=False): return BIBD - def BIBD_from_difference_family(G, D, lambd=None, check=True): r""" Return the BIBD associated to the difference family ``D`` on the group ``G``. diff --git a/src/sage/combinat/designs/database.py b/src/sage/combinat/designs/database.py index 564f1ea141a..d13823082ec 100644 --- a/src/sage/combinat/designs/database.py +++ b/src/sage/combinat/designs/database.py @@ -543,7 +543,6 @@ def OA_8_69(): for BB in OA_8_7: OA.append([B[i] for i in BB]) - # Adding the missing 0..0,1..1,... rows done = sum(O1,[])+sum(O2,[]) missing = [x for x in range(73) if x not in done and x not in oval] diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index ed9bb493616..277c27af950 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -923,7 +923,6 @@ def radical_difference_family(K, k, l=1, existence=False, check=True): elif existence: return True - if check and not is_difference_family(K, D, v, k, l): raise RuntimeError("radical_difference_family produced a wrong " "difference family with parameters v={}, " @@ -1807,7 +1806,6 @@ def supplementary_difference_set(q, existence=False, check=True): psi1 = ((1 + P.monomial((q-1)//2)) * theta1).mod(P.monomial(q-1) - 1) psi2 = (1 + (1 + P.monomial((q-1)//2)) * theta2).mod(P.monomial(q-1) - 1) - K1 = list(map(Integer, psi1.exponents())) K2 = list(map(Integer, psi2.exponents())) K3 = list(map(Integer, psi3.exponents())) @@ -1991,7 +1989,6 @@ def skew_supplementary_difference_set(n, existence=False, check=True): True """ - indices = { 67: [[0,3,5,6,9,10,13,14,17,18,20], [0,2,4,9,11,12,13,16,19,21], @@ -2061,7 +2058,6 @@ def generate_set(index_set, cosets): S += cosets[idx] return S - if existence: return n in indices diff --git a/src/sage/combinat/designs/ext_rep.py b/src/sage/combinat/designs/ext_rep.py index 2a463bc793e..6b02f95f2ac 100644 --- a/src/sage/combinat/designs/ext_rep.py +++ b/src/sage/combinat/designs/ext_rep.py @@ -660,7 +660,6 @@ def __init__(self, node): ('block', {}, [[6, 8, 10]])] """ - if isinstance(node, str): node = (node, {}, []) name, attributes, children = node diff --git a/src/sage/combinat/designs/incidence_structures.py b/src/sage/combinat/designs/incidence_structures.py index dfb6c90f652..8ed80d70171 100644 --- a/src/sage/combinat/designs/incidence_structures.py +++ b/src/sage/combinat/designs/incidence_structures.py @@ -2000,7 +2000,6 @@ def is_resolvable(self, certificate=False, solver=None, verbose=0, check=True, else: return True - def coloring(self, k=None, solver=None, verbose=0, *, integrality_tolerance=1e-3): r""" diff --git a/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py b/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py index 526487adb97..833136dbfe9 100644 --- a/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py +++ b/src/sage/combinat/designs/orthogonal_arrays_build_recursive.py @@ -1604,7 +1604,6 @@ def brouwer_separable_design(k,t,q,x,check=False,verbose=False,explain_construct # The set of size x OA.extend([N-xx-1 for xx in B] for B in orthogonal_array(k,x)) - # iv) elif (x == q**2+1 and orthogonal_array( k , x ,existence=True) and # d0 diff --git a/src/sage/combinat/designs/steiner_quadruple_systems.py b/src/sage/combinat/designs/steiner_quadruple_systems.py index 2a8713fe323..ee8d8102f28 100644 --- a/src/sage/combinat/designs/steiner_quadruple_systems.py +++ b/src/sage/combinat/designs/steiner_quadruple_systems.py @@ -190,7 +190,6 @@ def three_n_minus_eight(B): for i in range(3): Y.append([r(i,x) if x<= n-5 else x+2*(n-4) for x in s]) - # Line 3. for a in range(4): for aa in range(n-4): @@ -198,7 +197,6 @@ def three_n_minus_eight(B): aaaa = -(a+aa+aaa)%(n-4) Y.append([r(0,aa),r(1,aaa), r(2,aaaa),3*(n-4)+a]) - # Line 4. k = (n-14) // 12 for i in range(3): @@ -335,8 +333,6 @@ def four_n_minus_six(B): Y.append([r(h,0,2*c+eps) , r(h,1,2*cc-eps), r(h+1,0,rc), r(h+1,0,sc)]) Y.append([r(h,0,2*c-1+eps), r(h,1,2*cc-eps), r(h+1,1,rc), r(h+1,1,sc)]) - - # Line 8/9 for h in range(2): for eps in range(2): @@ -347,7 +343,6 @@ def four_n_minus_six(B): Y.append([r(h,0,2*c+eps) , r(h,1,2*cc-eps), r(h+1,1,rc), r(h+1,1,sc)]) Y.append([r(h,0,2*c-1+eps), r(h,1,2*cc-eps), r(h+1,0,rc), r(h+1,0,sc)]) - # Line 10 for h in range(2): for alpha in range(n-3): diff --git a/src/sage/combinat/k_tableau.py b/src/sage/combinat/k_tableau.py index 24f00e12926..5fb1d56b82c 100644 --- a/src/sage/combinat/k_tableau.py +++ b/src/sage/combinat/k_tableau.py @@ -1215,7 +1215,6 @@ def _height_of_restricted_subword(self, sw, r): return max(v[0] for v in L + R) - class WeakTableaux_core(WeakTableaux_abstract): r""" The class of (skew) weak `k`-tableaux in the core representation of shape ``shape`` diff --git a/src/sage/combinat/matrices/hadamard_matrix.py b/src/sage/combinat/matrices/hadamard_matrix.py index 91f73d29101..fa21194866b 100644 --- a/src/sage/combinat/matrices/hadamard_matrix.py +++ b/src/sage/combinat/matrices/hadamard_matrix.py @@ -937,7 +937,6 @@ def _get_baumert_hall_units(n, existence=False): """ assert n%4 == 0 and n > 0 - delta_codes_len = n//4 if not four_symbol_delta_code_smallcases(delta_codes_len, existence=True): if existence: @@ -1037,7 +1036,6 @@ def hadamard_matrix_turyn_type(a, b, c, d, e1, e2, e3, e4, check=True): for j in range(i+1, len(units)): assert units[i]*units[j].T + units[j]*units[i].T == 0*I(t4) - H = e1.tensor_product(A) + e2.tensor_product(B) + e3.tensor_product(C) + e4.tensor_product(D) if check: assert is_hadamard_matrix(H) diff --git a/src/sage/combinat/root_system/type_B.py b/src/sage/combinat/root_system/type_B.py index 9175d87bfa7..7a9b634b207 100644 --- a/src/sage/combinat/root_system/type_B.py +++ b/src/sage/combinat/root_system/type_B.py @@ -340,7 +340,6 @@ def _default_folded_cartan_type(self): [[i] for i in range(1, n)] + [[n, n + 1]]) - # For unpickling backward compatibility (Sage <= 4.1) from sage.misc.persist import register_unpickle_override register_unpickle_override('sage.combinat.root_system.type_B', diff --git a/src/sage/combinat/root_system/type_D.py b/src/sage/combinat/root_system/type_D.py index be106a845a7..d250a3643b6 100644 --- a/src/sage/combinat/root_system/type_D.py +++ b/src/sage/combinat/root_system/type_D.py @@ -116,7 +116,6 @@ def fundamental_weight(self, i): return self.sum(self.monomial(j) for j in range(i)) - from sage.misc.persist import register_unpickle_override register_unpickle_override('sage.combinat.root_system.type_A', 'ambient_space', AmbientSpace) diff --git a/src/sage/combinat/t_sequences.py b/src/sage/combinat/t_sequences.py index 883d55c87bd..73993267638 100644 --- a/src/sage/combinat/t_sequences.py +++ b/src/sage/combinat/t_sequences.py @@ -215,7 +215,6 @@ def is_T_sequences_set(sequences, verbose=False): print(f"T-Sequence should contain 4 sequences, found {len(sequences)} instead") return False - t = len(sequences[0]) for i in range(t): @@ -684,7 +683,6 @@ def is_base_sequences_tuple(base_sequences, verbose=False): print(f'Base sequences should only contiain -1, +1, found {el}') return False - for j in range(1, n+p): autocorr = _nonperiodic_autocorrelation(A, j) + _nonperiodic_autocorrelation(B, j) + _nonperiodic_autocorrelation(C, j) + _nonperiodic_autocorrelation(D, j) if autocorr != 0: diff --git a/src/sage/combinat/vector_partition.py b/src/sage/combinat/vector_partition.py index ba1a51c29d4..03a142c8034 100644 --- a/src/sage/combinat/vector_partition.py +++ b/src/sage/combinat/vector_partition.py @@ -102,7 +102,6 @@ def IntegerVectorsIterator(vect, min = None): yield [j] + vec - class VectorPartition(CombinatorialElement): r""" A vector partition is a multiset of integer vectors. diff --git a/src/sage/crypto/block_cipher/miniaes.py b/src/sage/crypto/block_cipher/miniaes.py index 49cb0564d2c..95fcf1a258c 100644 --- a/src/sage/crypto/block_cipher/miniaes.py +++ b/src/sage/crypto/block_cipher/miniaes.py @@ -1510,7 +1510,6 @@ def shift_row(self, block): [block[1][1], block[1][0]] ] ) return mat - ### conversion functions to convert between different data formats def GF_to_binary(self, G): diff --git a/src/sage/crypto/lwe.py b/src/sage/crypto/lwe.py index bc027e97362..4c6ef830987 100644 --- a/src/sage/crypto/lwe.py +++ b/src/sage/crypto/lwe.py @@ -345,7 +345,6 @@ def _repr_(self): else: return "LWE(%d, %d, %s, %s, %s)"%(self.n,self.K.order(),self.D,self.secret_dist, self.m) - def __call__(self): """ EXAMPLES:: @@ -581,7 +580,6 @@ def _repr_(self): else: return "RingLWE(%d, %d, %s, %s, %s, %s)"%(self.N, self.K.order(), self.D, self.poly, self.secret_dist, self.m) - def __call__(self): """ EXAMPLES:: diff --git a/src/sage/crypto/mq/sr.py b/src/sage/crypto/mq/sr.py index 81ae146e204..9f28d216923 100644 --- a/src/sage/crypto/mq/sr.py +++ b/src/sage/crypto/mq/sr.py @@ -963,7 +963,6 @@ def mix_columns(self, d): # AES uses the column major ordering return Matrix(k, d.ncols(), d.nrows(), ret).transpose() - def add_round_key(self, d, key): r""" Perform the ``AddRoundKey`` operation on @@ -1509,7 +1508,6 @@ def _insert_matrix_into_matrix(self, dst, src, row, col): dst[row+i, col+j] = src[i, j] return dst - def varformatstr(self, name, n=None, rc=None, e=None): r""" Return a format string which is understood by print et al. @@ -1799,7 +1797,6 @@ def ring(self, order=None, reverse_variables=None): else: names = self.varstrs("k", 0, r*c, e) - for _n in process(list(range(n))): names += self.varstrs("k", _n+1, r*c, e) names += self.varstrs("x", _n+1, r*c, e) @@ -1880,7 +1877,6 @@ def round_polynomials(self, i, plaintext=None, ciphertext=None): lin = (wj + ki + M * xj + rcon).list() - wi = Matrix(R, r*c*e, 1, _vars("w", i, r*c, e)) xi = Matrix(R, r*c*e, 1, _vars("x", i, r*c, e)) sbox = [] @@ -2713,8 +2709,6 @@ def mix_columns_matrix(self): k = self.k a = k.gen() - - if r == 1: M = Matrix(k, r, r, 1) @@ -2777,7 +2771,6 @@ def lin_matrix(self, length=None): 1, 0, 1, 1, \ 1, 1, 0, 1]) - Z = Z.transpose() # account for endianess mismatch lin = Matrix(GF(2), length*e, length*e) From c64c79505ac5cff165f805f3df87a0695910655a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 16 Feb 2023 21:42:54 -0800 Subject: [PATCH 504/751] src/sage/matrix/operation_table.py: Move plot imports into method --- src/sage/matrix/operation_table.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/sage/matrix/operation_table.py b/src/sage/matrix/operation_table.py index 9b59fa8dcee..08260e44ec6 100644 --- a/src/sage/matrix/operation_table.py +++ b/src/sage/matrix/operation_table.py @@ -14,12 +14,10 @@ # https://www.gnu.org/licenses/ # **************************************************************************** +from copy import copy + from sage.structure.sage_object import SageObject -from matplotlib.cm import gist_rainbow, Greys -from sage.plot.matrix_plot import matrix_plot from sage.matrix.constructor import Matrix -from sage.plot.text import text -from copy import copy class OperationTable(SageObject): @@ -985,6 +983,9 @@ def color_table(self, element_names=True, cmap=gist_rainbow_copy, **options): OTa = OperationTable(SymmetricGroup(3), operation=operator.mul) sphinx_plot(OTa.color_table(), figsize=(3.0,3.0)) """ + from matplotlib.cm import gist_rainbow, Greys + from sage.plot.matrix_plot import matrix_plot + from sage.plot.text import text # Base matrix plot object, without text plot = matrix_plot(Matrix(self._table), cmap=cmap, From 30858af9c5e3b16a1180fd70b24d990d03a62379 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 17 Feb 2023 11:07:51 -0800 Subject: [PATCH 505/751] src/sage/matrix/operation_table.py: Fix more modularization violations, add/update docstrings --- src/sage/matrix/operation_table.py | 51 +++++++++++++++++++----------- 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/src/sage/matrix/operation_table.py b/src/sage/matrix/operation_table.py index 08260e44ec6..a5ac1a03db5 100644 --- a/src/sage/matrix/operation_table.py +++ b/src/sage/matrix/operation_table.py @@ -948,45 +948,37 @@ def matrix_of_variables(self): for i in range(self._n) for j in range(self._n)] return MS(entries) - # documentation hack - # makes the cmap default argument look nice in the docs - # by copying the gist_rainbow object and overriding __repr__ - gist_rainbow_copy=copy(gist_rainbow) - class ReprOverrideLinearSegmentedColormap(gist_rainbow_copy.__class__): - def __repr__(self): - return "gist_rainbow" - gist_rainbow_copy.__class__=ReprOverrideLinearSegmentedColormap - - - def color_table(self, element_names=True, cmap=gist_rainbow_copy, **options): + def color_table(self, element_names=True, cmap=None, **options): r""" - Returns a graphic image as a square grid where entries are color coded. + Return a graphic image as a square grid where entries are color coded. INPUT: - ``element_names`` - (default : ``True``) Whether to display text with element names on the image - - ``cmap`` - (default : ``gist_rainbow``) colour map for plot, see matplotlib.cm + - ``cmap`` - (default: :obj:`matplotlib.cm.gist_rainbow`) color map for plot, see :mod:`matplotlib.cm` - - ``**options`` - passed on to matrix_plot call + - ``**options`` - passed on to :func:`~sage.plot.matrix_plot.matrix_plot` EXAMPLES:: sage: from sage.matrix.operation_table import OperationTable - sage: OTa = OperationTable(SymmetricGroup(3), operation=operator.mul) - sage: OTa.color_table() + sage: OTa = OperationTable(SymmetricGroup(3), operation=operator.mul) # optional - sage.plot, sage.groups + sage: OTa.color_table() # optional - sage.plot, sage.groups Graphics object consisting of 37 graphics primitives .. PLOT:: from sage.matrix.operation_table import OperationTable OTa = OperationTable(SymmetricGroup(3), operation=operator.mul) - sphinx_plot(OTa.color_table(), figsize=(3.0,3.0)) + sphinx_plot(OTa.color_table(), figsize=(3.0, 3.0)) """ - from matplotlib.cm import gist_rainbow, Greys from sage.plot.matrix_plot import matrix_plot from sage.plot.text import text + if cmap is None: + from matplotlib.cm import gist_rainbow as cmap + # Base matrix plot object, without text plot = matrix_plot(Matrix(self._table), cmap=cmap, frame=False, **options) @@ -1019,6 +1011,29 @@ def color_table(self, element_names=True, cmap=gist_rainbow_copy, **options): return plot def gray_table(self, **options): + r""" + Return a graphic image as a square grid where entries are displayed in grayscale. + + INPUT: + + - ``element_names`` - (default: ``True``) Whether to display text with element names on the image + + - ``**options`` - passed on to :func:`~sage.plot.matrix_plot.matrix_plot` + + EXAMPLES:: + + sage: from sage.matrix.operation_table import OperationTable + sage: OTa = OperationTable(SymmetricGroup(3), operation=operator.mul) # optional - sage.plot, sage.groups + sage: OTa.gray_table() # optional - sage.plot, sage.groups + Graphics object consisting of 37 graphics primitives + + .. PLOT:: + + from sage.matrix.operation_table import OperationTable + OTa = OperationTable(SymmetricGroup(3), operation=operator.mul) + sphinx_plot(OTa.gray_table(), figsize=(3.0, 3.0)) + """ + from matplotlib.cm import Greys return self.color_table(cmap=Greys, **options) def _ascii_table(self): From fb4f6abff964b5c9f72d096ecb91b06b21916770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20K=C3=B6ppe?= Date: Fri, 17 Feb 2023 23:22:43 -0800 Subject: [PATCH 506/751] Apply suggestions from code review Co-authored-by: Travis Scrimshaw --- src/sage/matrix/operation_table.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sage/matrix/operation_table.py b/src/sage/matrix/operation_table.py index a5ac1a03db5..79acaaf8390 100644 --- a/src/sage/matrix/operation_table.py +++ b/src/sage/matrix/operation_table.py @@ -956,9 +956,9 @@ def color_table(self, element_names=True, cmap=None, **options): - ``element_names`` - (default : ``True``) Whether to display text with element names on the image - - ``cmap`` - (default: :obj:`matplotlib.cm.gist_rainbow`) color map for plot, see :mod:`matplotlib.cm` + - ``cmap`` -- (default: :obj:`matplotlib.cm.gist_rainbow`) color map for plot, see :mod:`matplotlib.cm` - - ``**options`` - passed on to :func:`~sage.plot.matrix_plot.matrix_plot` + - ``**options`` -- passed on to :func:`~sage.plot.matrix_plot.matrix_plot` EXAMPLES:: @@ -1016,9 +1016,9 @@ def gray_table(self, **options): INPUT: - - ``element_names`` - (default: ``True``) Whether to display text with element names on the image + - ``element_names`` -- (default: ``True``) whether to display text with element names on the image - - ``**options`` - passed on to :func:`~sage.plot.matrix_plot.matrix_plot` + - ``**options`` -- passed on to :func:`~sage.plot.matrix_plot.matrix_plot` EXAMPLES:: From df50caa0a93d7297b0f1de27cd21b619355f1f68 Mon Sep 17 00:00:00 2001 From: Priyanshu Kumar Rai <58476539+prirai@users.noreply.github.com> Date: Sat, 18 Feb 2023 15:09:11 +0530 Subject: [PATCH 507/751] Update README.md Updated the logo to use the svg available at - https://raw.githubusercontent.com/sagemath/artwork/master/bare_logo_sagemath.svg. The original image seems broken while accessing from GitHub's web interface. Please tell me if this works. After careful consideration, I decided not to use the original black logo (at /src/doc/common/static/logo_sagemath_black.svg) due to potential disparities in its visibility when viewed by users with different display settings, such as light and dark modes. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1a0582d87c5..5b72cb4034f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - + # Sage: Open Source Mathematical Software From 730a34e5e3ad3b4609952266e464d6a8e8a097c8 Mon Sep 17 00:00:00 2001 From: sheerluck Date: Sat, 18 Feb 2023 15:51:47 +0300 Subject: [PATCH 508/751] Fix index out of range exception (#35031) Reported by: seblabbe --- src/sage/plot/arrow.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sage/plot/arrow.py b/src/sage/plot/arrow.py index 13b3b07d241..ce63c175d62 100644 --- a/src/sage/plot/arrow.py +++ b/src/sage/plot/arrow.py @@ -413,7 +413,10 @@ def get_paths(self, renderer): return paths def __call__(self, renderer, gc, tpath, affine, rgbFace): - path = self.get_paths(renderer)[self._n] + paths = self.get_paths(renderer) + if self._n >= len(paths): + return False + path = paths[self._n] vert1, code1 = path.vertices, path.codes import numpy as np From 8c2d31500007924e3bb54c4126f6bb7300c78a6f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 18 Feb 2023 11:08:44 -0800 Subject: [PATCH 509/751] src/sage/matroids/linear_matroid.pyx: Remove unused imports, sort imports --- src/sage/matroids/linear_matroid.pyx | 31 +++++++++++++--------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/src/sage/matroids/linear_matroid.pyx b/src/sage/matroids/linear_matroid.pyx index a0e41b0046c..5c697a696b4 100644 --- a/src/sage/matroids/linear_matroid.pyx +++ b/src/sage/matroids/linear_matroid.pyx @@ -111,30 +111,27 @@ Methods # https://www.gnu.org/licenses/ # **************************************************************************** +from copy import copy, deepcopy +from itertools import combinations, product + from cpython.object cimport Py_EQ, Py_NE from sage.data_structures.bitset_base cimport * -from sage.structure.richcmp cimport rich_to_bool -from sage.matroids.matroid cimport Matroid -from sage.matroids.basis_exchange_matroid cimport BasisExchangeMatroid -from .lean_matrix cimport (LeanMatrix, GenericMatrix, BinaryMatrix, - TernaryMatrix, QuaternaryMatrix, PlusMinusOneMatrix, - RationalMatrix, generic_identity) -from .set_system cimport SetSystem -from .utilities import newlabel, spanning_stars, spanning_forest, lift_cross_ratios -from sage.graphs.spanning_tree import kruskal from sage.graphs.graph import Graph - -from sage.matrix.matrix2 cimport Matrix -import sage.matrix.constructor +from sage.graphs.spanning_tree import kruskal from sage.matrix.constructor import matrix -from copy import copy, deepcopy +from sage.matrix.matrix2 cimport Matrix +from sage.matroids.basis_exchange_matroid cimport BasisExchangeMatroid +from sage.matroids.lean_matrix cimport (LeanMatrix, GenericMatrix, BinaryMatrix, + TernaryMatrix, QuaternaryMatrix, PlusMinusOneMatrix, + RationalMatrix, generic_identity) +from sage.matroids.matroid cimport Matroid +from sage.matroids.set_system cimport SetSystem +from sage.matroids.utilities import newlabel, spanning_stars, spanning_forest, lift_cross_ratios +from sage.rings.finite_rings.finite_field_constructor import FiniteField as GF from sage.rings.integer_ring import ZZ from sage.rings.rational_field import QQ -from sage.rings.finite_rings.finite_field_constructor import FiniteField -from sage.rings.finite_rings.finite_field_constructor import FiniteField as GF -import itertools -from itertools import combinations, product +from sage.structure.richcmp cimport rich_to_bool cdef bint GF2_not_defined = True cdef GF2, GF2_one, GF2_zero From 34be642131bd0624a880fec4d858028bfe4b2e65 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 18 Feb 2023 12:06:55 -0800 Subject: [PATCH 510/751] sage.rings.number_field.number_field_element_base: New --- src/sage/interfaces/maxima_lib.py | 4 +-- src/sage/rings/finite_rings/residue_field.pyx | 5 +-- src/sage/rings/integer_ring.pyx | 5 +-- .../number_field/number_field_element.pxd | 3 +- .../number_field/number_field_element.pyx | 2 +- .../number_field_element_base.pxd | 5 +++ .../number_field_element_base.pyx | 33 +++++++++++++++++++ src/sage/rings/universal_cyclotomic_field.py | 5 +-- src/sage/schemes/elliptic_curves/cm.py | 4 +-- src/sage/schemes/elliptic_curves/heegner.py | 4 +-- src/sage/structure/element.pxd | 3 -- src/sage/structure/element.pyx | 23 ------------- src/sage/symbolic/expression_conversions.py | 7 ++-- 13 files changed, 59 insertions(+), 44 deletions(-) create mode 100644 src/sage/rings/number_field/number_field_element_base.pxd create mode 100644 src/sage/rings/number_field/number_field_element_base.pyx diff --git a/src/sage/interfaces/maxima_lib.py b/src/sage/interfaces/maxima_lib.py index ac6610e7552..5c6ee6311de 100644 --- a/src/sage/interfaces/maxima_lib.py +++ b/src/sage/interfaces/maxima_lib.py @@ -1165,7 +1165,7 @@ def reduce_load_MaximaLib(): import sage.symbolic.expression import sage.symbolic.integration.integral -from sage.structure.element import NumberFieldElement +from sage.rings.number_field.number_field_element_base import NumberFieldElement_base from sage.symbolic.operators import FDerivativeOperator, add_vararg, mul_vararg car=EclObject("car") @@ -1525,7 +1525,7 @@ def pyobject_to_max(obj): """ if isinstance(obj,sage.rings.rational.Rational): return EclObject(obj) if (obj.denom().is_one()) else EclObject([[rat], obj.numer(),obj.denom()]) - elif isinstance(obj, NumberFieldElement): + elif isinstance(obj, NumberFieldElement_base): from sage.rings.number_field.number_field_element_quadratic import NumberFieldElement_quadratic if isinstance(obj, NumberFieldElement_quadratic) and obj.parent().defining_polynomial().list() == [1,0,1]: re, im = obj.list() diff --git a/src/sage/rings/finite_rings/residue_field.pyx b/src/sage/rings/finite_rings/residue_field.pyx index 2726848663b..60d343f17dc 100644 --- a/src/sage/rings/finite_rings/residue_field.pyx +++ b/src/sage/rings/finite_rings/residue_field.pyx @@ -160,7 +160,8 @@ from sage.rings.finite_rings.finite_field_ntl_gf2e import FiniteField_ntl_gf2e from sage.rings.finite_rings.finite_field_prime_modn import FiniteField_prime_modn from sage.rings.finite_rings.finite_field_pari_ffelt import FiniteField_pari_ffelt from sage.rings.ideal import is_Ideal -from sage.structure.element cimport Element, NumberFieldElement +from sage.rings.number_field.number_field_element_base import NumberFieldElement_base +from sage.structure.element cimport Element from sage.rings.number_field.number_field_ideal import is_NumberFieldIdeal @@ -294,7 +295,7 @@ class ResidueFieldFactory(UniqueFactory): if not is_Ideal(p): if isinstance(p, (int, Integer, Rational)): p = ZZ.ideal(p) - elif isinstance(p, NumberFieldElement): + elif isinstance(p, NumberFieldElement_base): if p.parent().is_field(): p = p.parent().ring_of_integers().ideal(p) else: diff --git a/src/sage/rings/integer_ring.pyx b/src/sage/rings/integer_ring.pyx index beb5714293b..09b239a7dea 100644 --- a/src/sage/rings/integer_ring.pyx +++ b/src/sage/rings/integer_ring.pyx @@ -58,8 +58,9 @@ import sage.libs.pari.all import sage.rings.ideal from sage.categories.basic import EuclideanDomains from sage.categories.infinite_enumerated_sets import InfiniteEnumeratedSets +from sage.rings.number_field.number_field_element_base import NumberFieldElement_base from sage.structure.coerce cimport is_numpy_type -from sage.structure.element cimport parent, NumberFieldElement +from sage.structure.element cimport parent from sage.structure.parent_gens import ParentWithGens from sage.structure.parent cimport Parent from sage.structure.richcmp cimport rich_to_bool @@ -414,7 +415,7 @@ cdef class IntegerRing_class(PrincipalIdealDomain): if x in self: return self - if isinstance(x, NumberFieldElement): + if isinstance(x, NumberFieldElement_base): K, from_K = parent(x).subfield(x) return K.order(K.gen()) diff --git a/src/sage/rings/number_field/number_field_element.pxd b/src/sage/rings/number_field/number_field_element.pxd index 62b3b0bd0f2..9b6917223a0 100644 --- a/src/sage/rings/number_field/number_field_element.pxd +++ b/src/sage/rings/number_field/number_field_element.pxd @@ -1,9 +1,8 @@ cimport sage.structure.element from sage.libs.gmp.types cimport mpz_t from sage.rings.integer cimport Integer +from sage.rings.number_field.number_field_element_base cimport NumberFieldElement_base from sage.rings.polynomial.polynomial_element cimport Polynomial -from sage.structure.element cimport FieldElement, RingElement, ModuleElement -from sage.structure.element cimport NumberFieldElement as NumberFieldElement_base from sage.structure.parent cimport Parent from sage.structure.parent_base cimport ParentWithBase from sage.libs.ntl.types cimport ZZ_c, ZZX_c diff --git a/src/sage/rings/number_field/number_field_element.pyx b/src/sage/rings/number_field/number_field_element.pyx index c908cda14d2..8dadb3d7ac6 100644 --- a/src/sage/rings/number_field/number_field_element.pyx +++ b/src/sage/rings/number_field/number_field_element.pyx @@ -5,7 +5,7 @@ # distutils: extra_link_args = NTL_LIBEXTRA # distutils: language = c++ """ -Number Field Elements +Number field elements (implementation using NTL) AUTHORS: diff --git a/src/sage/rings/number_field/number_field_element_base.pxd b/src/sage/rings/number_field/number_field_element_base.pxd new file mode 100644 index 00000000000..060f0c754c4 --- /dev/null +++ b/src/sage/rings/number_field/number_field_element_base.pxd @@ -0,0 +1,5 @@ +from sage.structure.element cimport FieldElement + + +cdef class NumberFieldElement_base(FieldElement): + pass diff --git a/src/sage/rings/number_field/number_field_element_base.pyx b/src/sage/rings/number_field/number_field_element_base.pyx new file mode 100644 index 00000000000..5385833f1d4 --- /dev/null +++ b/src/sage/rings/number_field/number_field_element_base.pyx @@ -0,0 +1,33 @@ +r""" +Number field elements (abstract base class) +""" + +# **************************************************************************** +# Copyright (C) 2023 Matthias Koeppe +# +# Distributed under the terms of the GNU General Public License (GPL) +# as published by the Free Software Foundation; either version 2 of +# the License, or (at your option) any later version. +# https://www.gnu.org/licenses/ +# **************************************************************************** + +cdef class NumberFieldElement_base(FieldElement): + r""" + Abstract base class for :class:`~sage.rings.number_field.number_field_element.NumberFieldElement` + + This class is defined for the purpose of :func:`isinstance` tests. It should not be + instantiated. + + EXAMPLES:: + + sage: k. = NumberField(x^3 + x + 1) + sage: isinstance(a, sage.rings.number_field.number_field_element_base.NumberFieldElement_base) + True + + By design, there is a unique direct subclass:: + + sage: len(sage.rings.number_field.number_field_element_base.NumberFieldElement_base.__subclasses__()) <= 1 + True + """ + + pass diff --git a/src/sage/rings/universal_cyclotomic_field.py b/src/sage/rings/universal_cyclotomic_field.py index f5d17093d21..5b51d7b9557 100644 --- a/src/sage/rings/universal_cyclotomic_field.py +++ b/src/sage/rings/universal_cyclotomic_field.py @@ -167,7 +167,7 @@ from sage.structure.richcmp import rich_to_bool from sage.structure.unique_representation import UniqueRepresentation -from sage.structure.element import FieldElement, parent, NumberFieldElement +from sage.structure.element import FieldElement, parent from sage.structure.coerce import py_scalar_to_element from sage.categories.morphism import Morphism @@ -177,6 +177,7 @@ from sage.rings.rational import Rational from sage.rings.integer_ring import ZZ +from sage.rings.number_field.number_field_element_base import NumberFieldElement_base from sage.rings.rational_field import QQ from sage.rings.infinity import Infinity from sage.rings.qqbar import AA, QQbar @@ -1538,7 +1539,7 @@ def _element_constructor_(self, elt): import sage.rings.abc P = parent(elt) if isinstance(P, sage.rings.abc.NumberField_cyclotomic): - if isinstance(elt, NumberFieldElement): + if isinstance(elt, NumberFieldElement_base): from sage.rings.number_field.number_field import CyclotomicField n = P.gen().multiplicative_order() elt = CyclotomicField(n)(elt) diff --git a/src/sage/schemes/elliptic_curves/cm.py b/src/sage/schemes/elliptic_curves/cm.py index 6c7a793adce..02a24908f1c 100644 --- a/src/sage/schemes/elliptic_curves/cm.py +++ b/src/sage/schemes/elliptic_curves/cm.py @@ -42,7 +42,7 @@ from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing from sage.misc.cachefunc import cached_function -from sage.structure.element import NumberFieldElement +from sage.rings.number_field.number_field_element_base import NumberFieldElement_base @cached_function @@ -626,7 +626,7 @@ def is_cm_j_invariant(j, method='new'): True """ # First we check that j is an algebraic number: - if not isinstance(j, NumberFieldElement) and j not in QQ: + if not isinstance(j, NumberFieldElement_base) and j not in QQ: raise NotImplementedError("is_cm_j_invariant() is only implemented for number field elements") # for j in ZZ we have a lookup-table: diff --git a/src/sage/schemes/elliptic_curves/heegner.py b/src/sage/schemes/elliptic_curves/heegner.py index 2ff01cb58d4..7b9894f0ae2 100644 --- a/src/sage/schemes/elliptic_curves/heegner.py +++ b/src/sage/schemes/elliptic_curves/heegner.py @@ -117,7 +117,7 @@ from sage.rings.real_mpfr import RealField from sage.quadratic_forms.all import (BinaryQF, BinaryQF_reduced_representatives) -from sage.structure.element import NumberFieldElement +from sage.rings.number_field.number_field_element_base import NumberFieldElement_base from sage.structure.sage_object import SageObject from sage.structure.richcmp import (richcmp_method, richcmp, richcmp_not_equal, rich_to_bool) @@ -2684,7 +2684,7 @@ def __init__(self, N, D, c=ZZ(1), f=None, check=True): elif isinstance(f, BinaryQF): # convert from BinaryQF f = tuple(f) - elif isinstance(f, NumberFieldElement): + elif isinstance(f, NumberFieldElement_base): # tau = number field element g = f.minpoly() if g.degree() != 2: diff --git a/src/sage/structure/element.pxd b/src/sage/structure/element.pxd index 4694dfcc72b..5c6e295a4b8 100644 --- a/src/sage/structure/element.pxd +++ b/src/sage/structure/element.pxd @@ -230,9 +230,6 @@ cdef class EuclideanDomainElement(PrincipalIdealDomainElement): cdef class FieldElement(CommutativeRingElement): cpdef _floordiv_(self, other) -cdef class NumberFieldElement(FieldElement): - pass - cdef class AlgebraElement(RingElement): pass diff --git a/src/sage/structure/element.pyx b/src/sage/structure/element.pyx index fd191a85ab4..c88ae348859 100644 --- a/src/sage/structure/element.pyx +++ b/src/sage/structure/element.pyx @@ -46,7 +46,6 @@ abstract base classes. PrincipalIdealDomainElement EuclideanDomainElement FieldElement - NumberFieldElement CommutativeAlgebraElement Expression AlgebraElement @@ -4265,28 +4264,6 @@ cdef class FieldElement(CommutativeRingElement): return bool(self) or other.is_zero() -cdef class NumberFieldElement(FieldElement): - r""" - Abstract base class for :class:`~sage.rings.number_field.number_field_element.NumberFieldElement` - - This class is defined for the purpose of :func:`isinstance` tests. It should not be - instantiated. - - EXAMPLES:: - - sage: k. = NumberField(x^3 + x + 1) - sage: isinstance(a, sage.structure.element.NumberFieldElement) - True - - By design, there is a unique direct subclass:: - - sage: len(sage.structure.element.NumberFieldElement.__subclasses__()) <= 1 - True - """ - - pass - - def is_AlgebraElement(x): """ Return ``True`` if x is of type AlgebraElement. diff --git a/src/sage/symbolic/expression_conversions.py b/src/sage/symbolic/expression_conversions.py index 37ca97168bf..9fc4b41e7f8 100644 --- a/src/sage/symbolic/expression_conversions.py +++ b/src/sage/symbolic/expression_conversions.py @@ -20,9 +20,10 @@ from sage.rings.rational_field import QQ from sage.symbolic.ring import SR -from sage.structure.element import Expression, NumberFieldElement +from sage.structure.element import Expression from sage.functions.all import exp from sage.symbolic.operators import arithmetic_operators, relation_operators, FDerivativeOperator, add_vararg, mul_vararg +from sage.rings.number_field.number_field_element_base import NumberFieldElement_base from sage.rings.universal_cyclotomic_field import UniversalCyclotomicField @@ -440,7 +441,7 @@ def pyobject(self, ex, obj): sage: ii.pyobject(pi, pi.pyobject()) 'Pi' """ - if (self.interface.name() in ['pari', 'gp'] and isinstance(obj, NumberFieldElement)): + if (self.interface.name() in ['pari', 'gp'] and isinstance(obj, NumberFieldElement_base)): from sage.rings.number_field.number_field_element_quadratic import NumberFieldElement_gaussian if isinstance(obj, NumberFieldElement_gaussian): return repr(obj) @@ -1023,7 +1024,7 @@ def pyobject(self, ex, obj): except AttributeError: result = repr(obj) else: - if isinstance(obj, NumberFieldElement): + if isinstance(obj, NumberFieldElement_base): from sage.rings.number_field.number_field_element_quadratic import NumberFieldElement_gaussian if isinstance(obj, NumberFieldElement_gaussian): return "((%s)::EXPR COMPLEX INT)" % result From c6fbaa1466c49a4b57fa980436dd55d9adfff5af Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Sat, 18 Feb 2023 23:13:44 +0000 Subject: [PATCH 511/751] update msolve to 0.4.9 --- build/pkgs/msolve/checksums.ini | 8 ++++---- build/pkgs/msolve/package-version.txt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/pkgs/msolve/checksums.ini b/build/pkgs/msolve/checksums.ini index 0b7558afd2b..9385392eec9 100644 --- a/build/pkgs/msolve/checksums.ini +++ b/build/pkgs/msolve/checksums.ini @@ -1,5 +1,5 @@ tarball=msolve-VERSION.tar.gz -sha1=5b227de8b222bfe8d143e1d7ea77ad71cd209dc8 -md5=2f34bd9ccb089688ae169201281108dc -cksum=941373315 -upstream_url=https://trac.sagemath.org/raw-attachment/ticket/31664/msolve-VERSION.tar.gz +sha1=4a33630bb5916e0947f8108cff85406c21040851 +md5=4847bf41a1f8e5656abefda2ba34549d +cksum=105445469 +upstream_url=/~https://github.com/dimpase/msolve/releases/download/VERSION/msolve-VERSION.tar.gz diff --git a/build/pkgs/msolve/package-version.txt b/build/pkgs/msolve/package-version.txt index fb78594e923..76914ddc02f 100644 --- a/build/pkgs/msolve/package-version.txt +++ b/build/pkgs/msolve/package-version.txt @@ -1 +1 @@ -0.4.4+sage-2022-09-11 +0.4.9 From 150b9bad9def778b8de0f255a546c2a9b17fa16c Mon Sep 17 00:00:00 2001 From: Sandstorm831 Date: Sun, 19 Feb 2023 11:36:19 +0530 Subject: [PATCH 512/751] reformatting function --- src/sage/combinat/posets/linear_extensions.py | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/sage/combinat/posets/linear_extensions.py b/src/sage/combinat/posets/linear_extensions.py index 23d2688bd72..2533ad61b58 100644 --- a/src/sage/combinat/posets/linear_extensions.py +++ b/src/sage/combinat/posets/linear_extensions.py @@ -253,7 +253,7 @@ def is_greedy(self): return True def is_supergreedy(self): - r"""" + r""" Return ``True`` if the linear extension is supergreedy. A linear extension `[x_1 Date: Sat, 18 Feb 2023 22:17:35 -0800 Subject: [PATCH 513/751] sage.all: Import from sage.all__sagemath_repl, move filterwarnings there --- src/sage/all.py | 79 +--------------------------------- src/sage/all__sagemath_repl.py | 75 +++++++++++++++++++++++++++++++- 2 files changed, 75 insertions(+), 79 deletions(-) diff --git a/src/sage/all.py b/src/sage/all.py index 93588df1b93..288039a72f4 100644 --- a/src/sage/all.py +++ b/src/sage/all.py @@ -54,87 +54,12 @@ # **************************************************************************** import os -import sys import operator import math -############ setup warning filters before importing Sage stuff #### -import warnings - -__with_pydebug = hasattr(sys, 'gettotalrefcount') # This is a Python debug build (--with-pydebug) -if __with_pydebug: - # a debug build does not install the default warning filters. Sadly, this breaks doctests so we - # have to re-add them: - warnings.filterwarnings('ignore', category=PendingDeprecationWarning) - warnings.filterwarnings('ignore', category=ImportWarning) - warnings.filterwarnings('ignore', category=ResourceWarning) -else: - deprecationWarning = ('ignore', None, DeprecationWarning, None, 0) - if deprecationWarning in warnings.filters: - warnings.filters.remove(deprecationWarning) - -# Ignore all deprecations from IPython etc. -warnings.filterwarnings('ignore', category=DeprecationWarning, - module='(IPython|ipykernel|jupyter_client|jupyter_core|nbformat|notebook|ipywidgets|storemagic|jedi)') - -# scipy 1.18 introduced reprecation warnings on a number of things they are moving to -# numpy, e.g. DeprecationWarning: scipy.array is deprecated -# and will be removed in SciPy 2.0.0, use numpy.array instead -# This affects networkx 2.2 up and including 2.4 (cf. :trac:29766) -warnings.filterwarnings('ignore', category=DeprecationWarning, - module='(scipy|networkx)') - -# However, be sure to keep OUR deprecation warnings -warnings.filterwarnings('default', category=DeprecationWarning, - message=r'[\s\S]*See https?://trac\.sagemath\.org/[0-9]* for details.') - -# Ignore Python 3.9 deprecation warnings -warnings.filterwarnings('ignore', category=DeprecationWarning, - module='ast') - -# Ignore packaging 20.5 deprecation warnings -warnings.filterwarnings('ignore', category=DeprecationWarning, - module='(.*[.]_vendor[.])?packaging') - -# Ignore numpy warnings triggered by pythran -warnings.filterwarnings('ignore', category=DeprecationWarning, - module='pythran') - -warnings.filterwarnings('ignore', category=DeprecationWarning, - message='The distutils(.sysconfig module| package) is deprecated', - module='Cython|distutils|numpy|sage.env|sage.features') - -# triggered by cython 0.29.32 -warnings.filterwarnings('ignore', category=DeprecationWarning, - message="'cgi' is deprecated and slated for removal in Python 3.13", - module='Cython') - -# triggered by pyparsing 2.4.7 -warnings.filterwarnings('ignore', category=DeprecationWarning, - message="module 'sre_constants' is deprecated", - module='pyparsing') - -# importlib.resources.path and ...read_binary are deprecated in python 3.11, -# but the replacement importlib.resources.files needs python 3.9 -warnings.filterwarnings('ignore', category=DeprecationWarning, - message=r'(path|read_binary) is deprecated\. Use files\(\) instead\.', - module='sage.repl.rich_output.output_(graphics|graphics3d|video)') - -# triggered by sphinx -warnings.filterwarnings('ignore', category=DeprecationWarning, - message="'imghdr' is deprecated and slated for removal in Python 3.13", - module='sphinx.util.images') - -# triggered by docutils 0.19 on Python 3.11 -warnings.filterwarnings('ignore', category=DeprecationWarning, - message=r"Use setlocale\(\), getencoding\(\) and getlocale\(\) instead", - module='docutils.io') - ################ end setup warnings ############################### - -from .all__sagemath_environment import * - +from .all__sagemath_repl import * # includes .all__sagemath_objects, .all__sagemath_environment ################################################################### @@ -149,13 +74,11 @@ from sage.misc.all import * # takes a while from sage.typeset.all import * -from sage.repl.all import * from sage.misc.sh import sh from sage.libs.all import * from sage.data_structures.all import * -from sage.doctest.all import * from sage.structure.all import * from sage.rings.all import * diff --git a/src/sage/all__sagemath_repl.py b/src/sage/all__sagemath_repl.py index c9508c15bbe..95dc2a15a80 100644 --- a/src/sage/all__sagemath_repl.py +++ b/src/sage/all__sagemath_repl.py @@ -1,7 +1,80 @@ +############ setup warning filters before importing Sage stuff #### +import sys +import warnings + +__with_pydebug = hasattr(sys, 'gettotalrefcount') # This is a Python debug build (--with-pydebug) +if __with_pydebug: + # a debug build does not install the default warning filters. Sadly, this breaks doctests so we + # have to re-add them: + warnings.filterwarnings('ignore', category=PendingDeprecationWarning) + warnings.filterwarnings('ignore', category=ImportWarning) + warnings.filterwarnings('ignore', category=ResourceWarning) +else: + deprecationWarning = ('ignore', None, DeprecationWarning, None, 0) + if deprecationWarning in warnings.filters: + warnings.filters.remove(deprecationWarning) + +# Ignore all deprecations from IPython etc. +warnings.filterwarnings('ignore', category=DeprecationWarning, + module='(IPython|ipykernel|jupyter_client|jupyter_core|nbformat|notebook|ipywidgets|storemagic|jedi)') + +# scipy 1.18 introduced reprecation warnings on a number of things they are moving to +# numpy, e.g. DeprecationWarning: scipy.array is deprecated +# and will be removed in SciPy 2.0.0, use numpy.array instead +# This affects networkx 2.2 up and including 2.4 (cf. :trac:29766) +warnings.filterwarnings('ignore', category=DeprecationWarning, + module='(scipy|networkx)') + +# However, be sure to keep OUR deprecation warnings +warnings.filterwarnings('default', category=DeprecationWarning, + message=r'[\s\S]*See https?://trac\.sagemath\.org/[0-9]* for details.') + +# Ignore Python 3.9 deprecation warnings +warnings.filterwarnings('ignore', category=DeprecationWarning, + module='ast') + +# Ignore packaging 20.5 deprecation warnings +warnings.filterwarnings('ignore', category=DeprecationWarning, + module='(.*[.]_vendor[.])?packaging') + +# Ignore numpy warnings triggered by pythran +warnings.filterwarnings('ignore', category=DeprecationWarning, + module='pythran') + +warnings.filterwarnings('ignore', category=DeprecationWarning, + message='The distutils(.sysconfig module| package) is deprecated', + module='Cython|distutils|numpy|sage.env|sage.features') + +# triggered by cython 0.29.32 +warnings.filterwarnings('ignore', category=DeprecationWarning, + message="'cgi' is deprecated and slated for removal in Python 3.13", + module='Cython') + +# triggered by pyparsing 2.4.7 +warnings.filterwarnings('ignore', category=DeprecationWarning, + message="module 'sre_constants' is deprecated", + module='pyparsing') + +# importlib.resources.path and ...read_binary are deprecated in python 3.11, +# but the replacement importlib.resources.files needs python 3.9 +warnings.filterwarnings('ignore', category=DeprecationWarning, + message=r'(path|read_binary) is deprecated\. Use files\(\) instead\.', + module='sage.repl.rich_output.output_(graphics|graphics3d|video)') + +# triggered by sphinx +warnings.filterwarnings('ignore', category=DeprecationWarning, + message="'imghdr' is deprecated and slated for removal in Python 3.13", + module='sphinx.util.images') + +# triggered by docutils 0.19 on Python 3.11 +warnings.filterwarnings('ignore', category=DeprecationWarning, + message=r"Use setlocale\(\), getencoding\(\) and getlocale\(\) instead", + module='docutils.io') + + from .all__sagemath_objects import * from .all__sagemath_environment import * -# FIXME: all.py should import from here and remove these imports. from sage.doctest.all import * from sage.repl.all import * from sage.misc.all__sagemath_repl import * From 8ccb84275b5bb35de086147913da8f35f28baa41 Mon Sep 17 00:00:00 2001 From: jnash10 Date: Sun, 19 Feb 2023 17:03:27 +0530 Subject: [PATCH 514/751] aesthetic changes to code --- src/sage/plot/misc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sage/plot/misc.py b/src/sage/plot/misc.py index 1b279b5bb5d..3dd79a8b56e 100644 --- a/src/sage/plot/misc.py +++ b/src/sage/plot/misc.py @@ -139,11 +139,11 @@ def setup_for_eval_on_grid(funcs, else: vars, free_vars = unify_arguments(funcs) - #check for invalid range entered by user - if (ranges[0][-2]>ranges[0][-1]): + # check for invalid range entered by user + if (ranges[0][-2] > ranges[0][-1]): raise ValueError("xrange not correctly defined: xmin(={}) > xmax(={})".format(ranges[0][-2], ranges[0][-1])) - if (ranges[1][-2]>ranges[1][-1]): + if (ranges[1][-2] > ranges[1][-1]): raise ValueError("xrange not correctly defined: ymin(={}) > ymax(={})".format(ranges[1][-2], ranges[1][-1])) # pad the variables if we don't have enough From 3689c193aec318de47157250080da27f689cf0cd Mon Sep 17 00:00:00 2001 From: Priyanshu Rai Date: Sun, 19 Feb 2023 20:20:16 +0530 Subject: [PATCH 515/751] Added dark and light theme logos --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5c05c4150f3..2b342f8dfe6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,9 @@ - + + + + + + # Sage: Open Source Mathematical Software From f5956436d5ea27434ab141af60c4aa8bd3db1ce9 Mon Sep 17 00:00:00 2001 From: Marc Mezzarobba Date: Sun, 19 Feb 2023 19:27:28 +0100 Subject: [PATCH 516/751] Minor changes suggested by Travis Scrimshaw Co-authored-by: Travis Scrimshaw --- src/sage/rings/polynomial/multi_polynomial_libsingular.pyx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx index 4a004bfb9ef..cf471bb576c 100644 --- a/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx +++ b/src/sage/rings/polynomial/multi_polynomial_libsingular.pyx @@ -2066,6 +2066,8 @@ cdef class MPolynomial_libsingular(MPolynomial): sage: f(y).parent() Multivariate Polynomial Ring in y over Finite Field in a of size 2^4 """ + cdef Element sage_res + if len(kwds) > 0: f = self.subs(**kwds) if len(x) > 0: @@ -2093,7 +2095,7 @@ cdef class MPolynomial_libsingular(MPolynomial): # give up, evaluate functional sage_res = parent.base_ring().zero() for (m,c) in self.dict().iteritems(): - sage_res += c*mul([ x[i]**m[i] for i in m.nonzero_positions()]) + sage_res += c * mul([x[i] ** m[i] for i in m.nonzero_positions()]) else: singular_polynomial_call(&res, self._poly, _ring, coerced_x, MPolynomial_libsingular_get_element) @@ -2105,7 +2107,7 @@ cdef class MPolynomial_libsingular(MPolynomial): else: sage_res = new_MP(parent, res) # pass on ownership of res to sage_res - if sage_res.parent() is not res_parent: + if sage_res._parent is not res_parent: sage_res = res_parent(sage_res) return sage_res From 632a5751d65c1bb8fa52bcae16ae35daf995d1a5 Mon Sep 17 00:00:00 2001 From: Marc Mezzarobba Date: Thu, 9 Feb 2023 19:26:37 +0100 Subject: [PATCH 517/751] fix code that relied on const_pol(x=a,y=b) landing in the wrong parent --- src/sage/modular/modform_hecketriangle/graded_ring_element.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sage/modular/modform_hecketriangle/graded_ring_element.py b/src/sage/modular/modform_hecketriangle/graded_ring_element.py index b6d01bf0c37..c244bc34f48 100644 --- a/src/sage/modular/modform_hecketriangle/graded_ring_element.py +++ b/src/sage/modular/modform_hecketriangle/graded_ring_element.py @@ -1566,7 +1566,9 @@ def _q_expansion_cached(self, prec, fix_d, subs_d, d_num_prec, fix_prec = False) Y = SC.f_i_ZZ().base_extend(formal_d.parent()) if (self.parent().is_modular()): - qexp = self._rat.subs(x=X, y=Y, d=formal_d) + # z does not appear in self._rat but we need to specialize it for + # the evaluation to land in the correct parent + qexp = self._rat.subs(x=X, y=Y, z=0, d=formal_d) else: Z = SC.E2_ZZ().base_extend(formal_d.parent()) qexp = self._rat.subs(x=X, y=Y, z=Z, d=formal_d) From 73fa44e0a682785ada92a844ff088b2a7096069d Mon Sep 17 00:00:00 2001 From: Marc Mezzarobba Date: Fri, 10 Feb 2023 11:11:40 +0100 Subject: [PATCH 518/751] =?UTF-8?q?fix=20more=20code=20that=20relied=20on?= =?UTF-8?q?=20pol(x,y...)=20=E2=88=88=20wrong=20parent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sage/schemes/riemann_surfaces/riemann_surface.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sage/schemes/riemann_surfaces/riemann_surface.py b/src/sage/schemes/riemann_surfaces/riemann_surface.py index b219cb975e2..e7c401cd07b 100644 --- a/src/sage/schemes/riemann_surfaces/riemann_surface.py +++ b/src/sage/schemes/riemann_surfaces/riemann_surface.py @@ -2128,6 +2128,7 @@ def rigorous_line_integral(self, upstairs_edge, differentials, bounding_data): # CCzg is required to be known as we need to know the ring which the minpolys # lie in. CCzg, bounding_data_list = bounding_data + CCz = CCzg.univariate_ring(CCzg.gen(1)).base_ring() d_edge = tuple(u[0] for u in upstairs_edge) # Using a try-catch here allows us to retain a certain amount of back @@ -2193,7 +2194,7 @@ def local_N(ct, rt): z_1 = a0lc.abs() * prod((cz - r).abs() - rho_z for r in a0roots) n = minpoly.degree(CCzg.gen(1)) ai_new = [ - (minpoly.coefficient({CCzg.gen(1): i}))(z=cz + self._CCz.gen(0)) + CCz(minpoly.coefficient({CCzg.gen(1): i}))(z=cz + self._CCz.gen(0)) for i in range(n) ] ai_pos = [self._RRz([c.abs() for c in h.list()]) for h in ai_new] From 042fdc510d974275660c85a3710bab9317b5ee39 Mon Sep 17 00:00:00 2001 From: Marc Mezzarobba Date: Fri, 10 Feb 2023 11:19:06 +0100 Subject: [PATCH 519/751] =?UTF-8?q?fix=20more=20code=20that=20relied=20on?= =?UTF-8?q?=20pol(x,y,...)=20=E2=88=88=20wrong=20parent=20(2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sage/schemes/toric/points.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/schemes/toric/points.py b/src/sage/schemes/toric/points.py index 5da8f26a9c5..4ebc076f0d7 100644 --- a/src/sage/schemes/toric/points.py +++ b/src/sage/schemes/toric/points.py @@ -849,7 +849,7 @@ def inhomogeneous_equations(self, ring, nonzero_coordinates, cokernel): z = [ring.zero()] * nrays for i, value in zip(nonzero_coordinates, z_nonzero): z[i] = value - return [poly(z) for poly in self.polynomials] + return [poly.change_ring(ring)(z) for poly in self.polynomials] def solutions_serial(self, inhomogeneous_equations, log_range): """ From f9a0d54099d758ccec731a38929902b2b9d0b988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sun, 19 Feb 2023 20:48:46 -0300 Subject: [PATCH 520/751] Fix a slow doctest in matrix_integer_dense_hnf.py The hnf for integer dense matrices is quite slow, reported in #35161. While that issue is resolved, it doesn't make sense to keep this very slow test, so tune it down to an acceptable time. --- src/sage/matrix/matrix_integer_dense_hnf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sage/matrix/matrix_integer_dense_hnf.py b/src/sage/matrix/matrix_integer_dense_hnf.py index acdb0f09cc4..5ff5a9a7935 100644 --- a/src/sage/matrix/matrix_integer_dense_hnf.py +++ b/src/sage/matrix/matrix_integer_dense_hnf.py @@ -1189,9 +1189,9 @@ def benchmark_hnf(nrange, bits=4): EXAMPLES:: sage: import sage.matrix.matrix_integer_dense_hnf as hnf - sage: hnf.benchmark_hnf([50,100],32) - ('sage', 50, 32, ...), - ('sage', 100, 32, ...), + sage: hnf.benchmark_hnf([10,25],32) + ('sage', 10, 32, ...), + ('sage', 25, 32, ...), """ b = 2**bits for n in nrange: From 9164993622d4f5fba988c50e32299995162f061f Mon Sep 17 00:00:00 2001 From: Travis Scrimshaw Date: Mon, 20 Feb 2023 11:51:46 +0900 Subject: [PATCH 521/751] Fixing the documentation for the so Lie algebra. --- .../lie_algebras/classical_lie_algebra.py | 64 +++++++++++++------ src/sage/algebras/lie_algebras/examples.py | 10 ++- 2 files changed, 53 insertions(+), 21 deletions(-) diff --git a/src/sage/algebras/lie_algebras/classical_lie_algebra.py b/src/sage/algebras/lie_algebras/classical_lie_algebra.py index 39f7be6c856..0134b5fdd96 100644 --- a/src/sage/algebras/lie_algebras/classical_lie_algebra.py +++ b/src/sage/algebras/lie_algebras/classical_lie_algebra.py @@ -629,9 +629,34 @@ class so(ClassicalMatrixLieAlgebra): r""" The matrix Lie algebra `\mathfrak{so}_n`. - The Lie algebra `\mathfrak{so}_n`, which consists of all real - anti-symmetric `n \times n` matrices. This is the Lie algebra of - type `B_{(n-1)/2}` or `D_{n/2}` if `n` is odd or even respectively. + The Lie algebra `\mathfrak{so}_n`, which is isomorphic to the + Lie algebra of all anti-symmetric `n \times n` matrices. + The implementation here uses a different bilinear form and follows + the description in Chapter 8 of [HK2002]_. More precisely, this + is the set of matrices: + + .. MATH:: + + \begin{pmatrix} + A & B \\ + C & D + \end{pmatrix} + + such that `A^t = -D`, `B^t = -B`, `C^t = -C` for `n` even and + + .. MATH:: + + \begin{pmatrix} + A & B & a \\ + C & D & b \\ + c & d & 0 + \end{pmatrix} + + such that `A^t = -D`, `B^t = -B`, `C^t = -C`, `a^t = -d`, + and `b^t = -c` for `n` odd. + + This is the Lie algebra of type `B_{(n-1)/2}` or `D_{n/2}` if `n` + is odd or even respectively. """ def __init__(self, R, n): """ @@ -647,25 +672,26 @@ def __init__(self, R, n): MS = MatrixSpace(R, n) one = R.one() self._n = n - if n % 2 == 0: # Even - m = n / 2 - 1 # -1 for indexing + if n % 2 == 0: # Even + m = n // 2 - 1 # -1 for indexing n -= 1 - e = [MS({(m-1,n):one, (m,n-1):-one})] - f = [MS({(n,m-1):one, (n-1,m):-one})] - h = [MS({(m-1,m-1):one, (m,m):one, (n-1,n-1):-one, (n,n):-one})] + e = [MS({(m-1, n): one, (m, n-1): -one})] + f = [MS({(n, m-1): one, (n-1, m): -one})] + h = [MS({(m-1, m-1): one, (m, m): one, (n-1, n-1): -one, (n, n): -one})] m += 1 ct = CartanType(['D', m]) - else: # Odd - m = (n-1) / 2 - 1 # -1 for indexing + else: # Odd + m = (n-1) // 2 - 1 # -1 for indexing n -= 1 - e = [MS({(m,n):2, (n,n-1):-2})] - f = [MS({(n,m):one, (n-1,n):-one})] - h = [MS({(m,m):2, (n-1,n-1):-2})] + e = [MS({(m, n): 2, (n, n-1): -2})] + f = [MS({(n, m): one, (n-1, n): -one})] + h = [MS({(m, m): 2, (n-1, n-1): -2})] m += 1 ct = CartanType(['B', m]) - e = [MS({(i,i+1):one, (m+i+1,m+i):-one}) for i in range(m-1)] + e - f = [MS({(i+1,i):one, (m+i,m+i+1):-one}) for i in range(m-1)] + f - h = [MS({(i,i):one, (i+1,i+1):-one, (m+i,m+i):-one, (m+i+1,m+i+1):one}) for i in range(m-1)] + h + e = [MS({(i, i+1): one, (m+i+1, m+i): -one}) for i in range(m-1)] + e + f = [MS({(i+1, i): one, (m+i, m+i+1): -one}) for i in range(m-1)] + f + h = [MS({(i, i): one, (i+1, i+1): -one, (m+i, m+i): -one, (m+i+1, m+i+1): one}) + for i in range(m-1)] + h ClassicalMatrixLieAlgebra.__init__(self, R, ct, e, f, h) def _repr_(self): @@ -735,10 +761,10 @@ def simple_root(self, i, h): i = self.index_set().index(i) if i == len(self.index_set()) - 1: if self._n % 2 == 0: - return h[i-1,i-1] + h[i,i] + return h[i-1, i-1] + h[i, i] # otherwise we are odd - return h[i,i] - return h[i,i] - h[i+1,i+1] + return h[i, i] + return h[i, i] - h[i+1, i+1] class sp(ClassicalMatrixLieAlgebra): r""" diff --git a/src/sage/algebras/lie_algebras/examples.py b/src/sage/algebras/lie_algebras/examples.py index 2017ad3c6d2..89ad4362e5e 100644 --- a/src/sage/algebras/lie_algebras/examples.py +++ b/src/sage/algebras/lie_algebras/examples.py @@ -522,8 +522,14 @@ def so(R, n, representation='bracket'): The Lie algebra `\mathfrak{so}_n` is the type `B_k` Lie algebra if `n = 2k - 1` or the type `D_k` Lie algebra if `n = 2k`, and in - either case is finite dimensional. As a matrix Lie algebra, it - is given by the set of all real anti-symmetric `n \times n` matrices. + either case is finite dimensional. + + A classical description of this as a matrix Lie algebra is + the set of all anti-symmetric `n \times n` matrices. However, + the implementation here uses a different bilinear form for the Lie + group and follows the description in Chapter 8 of [HK2002]_. + See :class:`sage.algebras.lie_algebras.classical_lie_algebra.so` + for a precise description. INPUT: From 8435f06c290e6eccb3c701ba6cb873b1ca91eb59 Mon Sep 17 00:00:00 2001 From: jnash10 Date: Mon, 20 Feb 2023 11:52:49 +0530 Subject: [PATCH 522/751] Switch range values in case of invalid range (min > max) by user. Update docstest to account for the same --- src/sage/plot/misc.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/sage/plot/misc.py b/src/sage/plot/misc.py index 3dd79a8b56e..4a804529079 100644 --- a/src/sage/plot/misc.py +++ b/src/sage/plot/misc.py @@ -96,7 +96,7 @@ def setup_for_eval_on_grid(funcs, ValueError: At least one variable range has more than 3 entries: each should either have 2 or 3 entries, with one of the forms (xmin, xmax) or (x, xmin, xmax) sage: sage.plot.misc.setup_for_eval_on_grid(x+y, [(y,1,-1),(x,-1,1)], plot_points=5) - (, [(1.0, -1.0, 0.5), (-1.0, 1.0, 0.5)]) + (, [(-1.0, 1.0, 0.5), (-1.0, 1.0, 0.5)]) sage: sage.plot.misc.setup_for_eval_on_grid(x+y, [(x,1,-1),(x,-1,1)], plot_points=5) Traceback (most recent call last): ... @@ -106,9 +106,9 @@ def setup_for_eval_on_grid(funcs, ... ValueError: plot start point and end point must be different sage: sage.plot.misc.setup_for_eval_on_grid(x+y, [(x,1,-1),(y,-1,1)], return_vars=True) - (, [(1.0, -1.0, 2.0), (-1.0, 1.0, 2.0)], [x, y]) + (, [(-1.0, 1.0, 2.0), (-1.0, 1.0, 2.0)], [x, y]) sage: sage.plot.misc.setup_for_eval_on_grid(x+y, [(y,1,-1),(x,-1,1)], return_vars=True) - (, [(1.0, -1.0, 2.0), (-1.0, 1.0, 2.0)], [y, x]) + (, [(-1.0, 1.0, 2.0), (-1.0, 1.0, 2.0)], [y, x]) TESTS: @@ -139,12 +139,14 @@ def setup_for_eval_on_grid(funcs, else: vars, free_vars = unify_arguments(funcs) - # check for invalid range entered by user - if (ranges[0][-2] > ranges[0][-1]): - raise ValueError("xrange not correctly defined: xmin(={}) > xmax(={})".format(ranges[0][-2], ranges[0][-1])) - - if (ranges[1][-2] > ranges[1][-1]): - raise ValueError("xrange not correctly defined: ymin(={}) > ymax(={})".format(ranges[1][-2], ranges[1][-1])) + # check for invalid range entered by user (xmin > xmax or ymin > ymax) and swap the values if True + if len(ranges) > 1: + for i in range(len(ranges)): + if ranges[i][-2] > ranges[i][-1]: + ranges[i] = list(ranges[i]) + ranges[i][-1], ranges[i][-2] = ranges[i][-2], ranges[i][-1] + ranges[i] = tuple(ranges[i]) + #raise ValueError("xrange not correctly defined: xmin(={}) > xmax(={})".format(ranges[0][-2], ranges[0][-1])) # pad the variables if we don't have enough nargs = len(ranges) From 2962a9a79f647f2011f36cb9d7542b0507cdd4a1 Mon Sep 17 00:00:00 2001 From: Agamdeep Singh <67156641+jnash10@users.noreply.github.com> Date: Mon, 20 Feb 2023 11:54:24 +0530 Subject: [PATCH 523/751] Update misc.py --- src/sage/plot/misc.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sage/plot/misc.py b/src/sage/plot/misc.py index 4a804529079..a667306cee1 100644 --- a/src/sage/plot/misc.py +++ b/src/sage/plot/misc.py @@ -146,7 +146,6 @@ def setup_for_eval_on_grid(funcs, ranges[i] = list(ranges[i]) ranges[i][-1], ranges[i][-2] = ranges[i][-2], ranges[i][-1] ranges[i] = tuple(ranges[i]) - #raise ValueError("xrange not correctly defined: xmin(={}) > xmax(={})".format(ranges[0][-2], ranges[0][-1])) # pad the variables if we don't have enough nargs = len(ranges) From 72485aec7de9bdf43380c30e1babd4b3db8e98d5 Mon Sep 17 00:00:00 2001 From: jnash10 Date: Mon, 13 Feb 2023 17:05:25 +0530 Subject: [PATCH 524/751] Added check for invalid range (xmin >xmax or ymin > ymax) and swap values if so --- src/sage/plot/misc.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/sage/plot/misc.py b/src/sage/plot/misc.py index 37a8000f9aa..a667306cee1 100644 --- a/src/sage/plot/misc.py +++ b/src/sage/plot/misc.py @@ -96,7 +96,7 @@ def setup_for_eval_on_grid(funcs, ValueError: At least one variable range has more than 3 entries: each should either have 2 or 3 entries, with one of the forms (xmin, xmax) or (x, xmin, xmax) sage: sage.plot.misc.setup_for_eval_on_grid(x+y, [(y,1,-1),(x,-1,1)], plot_points=5) - (, [(1.0, -1.0, 0.5), (-1.0, 1.0, 0.5)]) + (, [(-1.0, 1.0, 0.5), (-1.0, 1.0, 0.5)]) sage: sage.plot.misc.setup_for_eval_on_grid(x+y, [(x,1,-1),(x,-1,1)], plot_points=5) Traceback (most recent call last): ... @@ -106,9 +106,9 @@ def setup_for_eval_on_grid(funcs, ... ValueError: plot start point and end point must be different sage: sage.plot.misc.setup_for_eval_on_grid(x+y, [(x,1,-1),(y,-1,1)], return_vars=True) - (, [(1.0, -1.0, 2.0), (-1.0, 1.0, 2.0)], [x, y]) + (, [(-1.0, 1.0, 2.0), (-1.0, 1.0, 2.0)], [x, y]) sage: sage.plot.misc.setup_for_eval_on_grid(x+y, [(y,1,-1),(x,-1,1)], return_vars=True) - (, [(1.0, -1.0, 2.0), (-1.0, 1.0, 2.0)], [y, x]) + (, [(-1.0, 1.0, 2.0), (-1.0, 1.0, 2.0)], [y, x]) TESTS: @@ -139,6 +139,14 @@ def setup_for_eval_on_grid(funcs, else: vars, free_vars = unify_arguments(funcs) + # check for invalid range entered by user (xmin > xmax or ymin > ymax) and swap the values if True + if len(ranges) > 1: + for i in range(len(ranges)): + if ranges[i][-2] > ranges[i][-1]: + ranges[i] = list(ranges[i]) + ranges[i][-1], ranges[i][-2] = ranges[i][-2], ranges[i][-1] + ranges[i] = tuple(ranges[i]) + # pad the variables if we don't have enough nargs = len(ranges) if len(vars) < nargs: From b4fd94ccfd460f6951d38382bb7b6690e97f4e68 Mon Sep 17 00:00:00 2001 From: Lorenz Panny Date: Wed, 21 Dec 2022 12:24:26 +0800 Subject: [PATCH 525/751] compute the matrix of an isogeny on a given n-torsion subgroup --- src/sage/schemes/elliptic_curves/hom.py | 89 +++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/src/sage/schemes/elliptic_curves/hom.py b/src/sage/schemes/elliptic_curves/hom.py index e4de0f2cf42..e0f6e223e3b 100644 --- a/src/sage/schemes/elliptic_curves/hom.py +++ b/src/sage/schemes/elliptic_curves/hom.py @@ -21,6 +21,8 @@ - Lorenz Panny (2021): Refactor isogenies and isomorphisms into the common :class:`EllipticCurveHom` interface. + +- Lorenz Panny (2022): :meth:`~EllipticCurveHom.matrix_on_subgroup` """ from sage.misc.cachefunc import cached_method from sage.structure.richcmp import richcmp_not_equal, richcmp, op_EQ, op_NE @@ -722,6 +724,93 @@ def as_morphism(self): Y_affine = Curve(self.codomain()).affine_patch(2) return X_affine.hom(self.rational_maps(), Y_affine).homogenize(2) + def matrix_on_subgroup(self, domain_gens, codomain_gens=None): + r""" + Return the matrix as which this isogeny acts on the + `n`-torsion subgroup with respect to the given bases. + + (This is useful for tasks such as computing a set of + generators for the kernel subgroup.) + + INPUT: + + - ``domain_gens`` -- basis `(P,Q)` of some `n`-torsion + subgroup on the domain of this elliptic-curve morphism + + - ``codomain_gens`` -- basis `(R,S)` of the `n`-torsion + on the codomain of this morphism, or (default) ``None`` + if ``self`` is an endomorphism + + OUTPUT: + + A `2\times 2` matrix `M` over `\ZZ/n`, such that the + image of any point `[a]P + [b]Q` under this morphism + equals `[c]R + [d]S` where `(c\ d)^T = (a\ b) M`. + + EXAMPLES:: + + sage: F. = GF(419^2, modulus=[1,0,1]) + sage: E = EllipticCurve(F, [1,0]) + sage: P = E(3, 176*i) + sage: Q = E(i+7, 67*i+48) + sage: P.weil_pairing(Q, 420).multiplicative_order() + 420 + sage: iota = E.automorphisms()[2]; iota + Elliptic-curve endomorphism of Elliptic Curve defined by y^2 = x^3 + x over Finite Field in i of size 419^2 + Via: (u,r,s,t) = (i, 0, 0, 0) + sage: iota^2 == E.scalar_multiplication(-1) + True + sage: mat = iota.matrix_on_subgroup((P,Q)); mat + [301 386] + [ 83 119] + sage: mat.parent() + Full MatrixSpace of 2 by 2 dense matrices over Ring of integers modulo 420 + sage: iota(P) == 301*P + 386*Q + True + sage: iota(Q) == 83*P + 119*Q + True + sage: a,b = 123, 456 + sage: c,d = vector((a,b)) * mat; (c,d) + (111, 102) + sage: iota(a*P + b*Q) == c*P + d*Q + True + + .. SEEALSO:: + + To compute a basis of the `n`-torsion, you may use + :meth:`~sage.schemes.elliptic_curves.ell_finite_field.EllipticCurve_finite_field.torsion_basis`. + """ + if codomain_gens is None: + if not self.is_endomorphism(): + raise ValueError('basis of codomain subgroup is required for non-endomorphisms') + codomain_gens = domain_gens + + P,Q = domain_gens + R,S = codomain_gens + + ords = {P.order() for P in (P,Q,R,S)} + if len(ords) != 1: + #TODO: Is there some meaningful way to lift this restriction? + raise ValueError('generator points must all have the same order') + n, = ords + + if P.weil_pairing(Q, n).multiplicative_order() != n: + raise ValueError('generator points on domain are not independent') + if R.weil_pairing(S, n).multiplicative_order() != n: + raise ValueError('generator points on codomain are not independent') + + imP = self(P) + imQ = self(Q) + + from sage.groups.additive_abelian.additive_abelian_wrapper import AdditiveAbelianGroupWrapper + H = AdditiveAbelianGroupWrapper(self.codomain().point_homset(), [R,S], [n,n]) + vecP = H.discrete_log(imP) + vecQ = H.discrete_log(imQ) + + from sage.matrix.constructor import matrix + from sage.rings.finite_rings.integer_mod_ring import Zmod + return matrix(Zmod(n), [vecP, vecQ]) + def compare_via_evaluation(left, right): r""" From 10aff667b8cfb0177eedf5ef692b27122aceeacd Mon Sep 17 00:00:00 2001 From: Lorenz Panny Date: Mon, 20 Feb 2023 16:25:08 +0800 Subject: [PATCH 526/751] add another example --- src/sage/schemes/elliptic_curves/hom.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/sage/schemes/elliptic_curves/hom.py b/src/sage/schemes/elliptic_curves/hom.py index e0f6e223e3b..eeb2bdd530d 100644 --- a/src/sage/schemes/elliptic_curves/hom.py +++ b/src/sage/schemes/elliptic_curves/hom.py @@ -775,6 +775,21 @@ def matrix_on_subgroup(self, domain_gens, codomain_gens=None): sage: iota(a*P + b*Q) == c*P + d*Q True + We can compute the matrix of a Frobenius endomorphism + (:class:`~sage.schemes.elliptic_curves.hom_frobenius.EllipticCurveHom_frobenius`) + on a large enough subgroup to verify point-counting results:: + + sage: F. = GF((101, 36)) + sage: E = EllipticCurve(GF(101), [1,1]) + sage: EE = E.change_ring(F) + sage: P,Q = EE.torsion_basis(37) + sage: pi = EE.frobenius_isogeny() + sage: M = pi.matrix_on_subgroup((P,Q)) + sage: M.trace() + 34 + sage: E.trace_of_frobenius() + -3 + .. SEEALSO:: To compute a basis of the `n`-torsion, you may use From 8efdadea1e13d0af666103f78400775aaf64c1f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Chapoton?= Date: Mon, 20 Feb 2023 10:50:28 +0100 Subject: [PATCH 527/751] activate W293 and E714 in pyx files --- src/sage/graphs/graph_coloring.pyx | 6 +-- src/sage/matrix/matrix_polynomial_dense.pyx | 48 ++++++++++---------- src/sage/modular/hypergeometric_misc.pyx | 7 +-- src/sage/numerical/linear_tensor_element.pyx | 16 +++---- src/tox.ini | 3 +- 5 files changed, 41 insertions(+), 39 deletions(-) diff --git a/src/sage/graphs/graph_coloring.pyx b/src/sage/graphs/graph_coloring.pyx index f5e4ce2ab18..a154942b92c 100644 --- a/src/sage/graphs/graph_coloring.pyx +++ b/src/sage/graphs/graph_coloring.pyx @@ -1498,11 +1498,11 @@ def _vizing_edge_coloring(g): INPUT: - - ``g`` -- a graph. + - ``g`` -- a graph OUTPUT: - - Returns a partition of the edge set into at most `\Delta + 1` matchings. + a partition of the edge set into at most `\Delta + 1` matchings .. SEEALSO:: @@ -1512,7 +1512,7 @@ def _vizing_edge_coloring(g): ALGORITHM: This function's implementation is based on the algorithm described at [MG1992]_ - + EXAMPLES: Coloring the edges of the Petersen Graph:: diff --git a/src/sage/matrix/matrix_polynomial_dense.pyx b/src/sage/matrix/matrix_polynomial_dense.pyx index 92502d9632b..6fd142b0563 100644 --- a/src/sage/matrix/matrix_polynomial_dense.pyx +++ b/src/sage/matrix/matrix_polynomial_dense.pyx @@ -224,7 +224,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): return self.apply_map(lambda x: x.degree()) from sage.matrix.constructor import matrix zero_degree = min(shifts) - 1 - if row_wise: + if row_wise: return matrix( ZZ, [[ self[i,j].degree() + shifts[j] if self[i,j] != 0 else zero_degree for j in range(self.ncols()) ] for i in range(self.nrows())] ) @@ -1116,7 +1116,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): The row degrees of an empty matrix (`0\times n` or `m\times 0`) is not defined:: - + sage: M = Matrix( pR, 0, 3 ) sage: M.row_degrees() Traceback (most recent call last): @@ -1215,7 +1215,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): n}`. Working row-wise and without shifts, its leading matrix is the matrix in `\Bold{K}^{m \times n}` formed by the leading coefficients of the entries of `M` which reach the degree of the corresponding row. - + More precisely, if working row-wise, let `s_1,\ldots,s_n \in \ZZ` be a shift, and let `(d_1,\ldots,d_m)` denote the shifted row degrees of `M`. Then, the shifted leading matrix of `M` is the matrix in @@ -1239,7 +1239,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): OUTPUT: a matrix over the base field. REFERENCES: - + [Wol1974]_ (Section 2.5, without shifts) and [VBB1992]_ (Section 3). EXAMPLES:: @@ -1335,7 +1335,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): False .. SEEALSO:: - + :meth:`is_popov` . """ if include_zero_vectors: @@ -1385,7 +1385,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): OUTPUT: a boolean value. REFERENCES: - + [Wol1974]_ (Section 2.5, without shifts) and [VBB1992]_ (Section 3). EXAMPLES:: @@ -1441,7 +1441,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): this vector is the index `j` of the rightmost nonzero entry `p_j` such that `\deg(p_j) + s_j` is equal to the shifted row degree of the vector. Then the pivot degree of the vector is the degree `\deg(p_j)`. - + For the zero row, both the leading positions and degree are `-1`. For a `m \times n` polynomial matrix, the leading positions and pivot degrees are the two lists containing the leading positions and the @@ -1465,7 +1465,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): of integers otherwise. REFERENCES: - + [Kai1980]_ (Section 6.7.2, without shifts). EXAMPLES:: @@ -1541,7 +1541,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): self[i,pivot_index[i]].degree()) for i in range(self.nrows()) ] return (pivot_index,pivot_degree) if return_degree else pivot_index - + # now in the column-wise case column_degrees = self.column_degrees(shifts) if shifts is None: @@ -1595,7 +1595,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): OUTPUT: a boolean. REFERENCES: - + [Kai1980]_ (Section 6.7.2, square case without shifts), [MS2003]_ (without shifts), [BLV1999]_ . @@ -1646,7 +1646,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): sage: M = Matrix([ ....: [ 6*x+4, 0, 5*x+1, 0], ....: [ 2, 5*x + 1, 6*x^2+3*x+1, 0], - ....: [2*x^2+5*x+5, 1, 2*x^3+4*x^2+6*x+4, 0] + ....: [2*x^2+5*x+5, 1, 2*x^3+4*x^2+6*x+4, 0] ....: ]) sage: M.is_weak_popov(shifts=[2,1,0], row_wise=False, ordered=True) True @@ -1724,7 +1724,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): OUTPUT: a boolean. REFERENCES: - + For the square case, without shifts: [Pop1972]_ and [Kai1980]_ (Section 6.7.2). For the general case: [BLV2006]_ . @@ -1908,7 +1908,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): False .. SEEALSO:: - + :meth:`hermite_form` . """ # shift for lower echelon @@ -2564,7 +2564,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): - the Hermite normal form `H` of this matrix `A` . - (optional) transformation matrix `U` such that `UA = H` . - + EXAMPLES:: sage: M. = GF(7)[] @@ -2594,7 +2594,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): True .. SEEALSO:: - + :meth:`is_hermite` , :meth:`popov_form` . """ @@ -2923,7 +2923,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): return (self.parent().zero().__copy__(), self) # Step 1: reverse input matrices # Brev = B(1/x) diag(x^(cdeg[i])) - # Arev = A(1/x) diag(x^(d+cdeg[i]-1)) + # Arev = A(1/x) diag(x^(d+cdeg[i]-1)) Brev = B.reverse(degree=cdeg, row_wise=False) Arev = self.reverse(degree=[d+c-1 for c in cdeg], row_wise=False) # Step 2: compute quotient @@ -2953,7 +2953,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): and such a quotient and remainder is returned by the method. Or this matrix equation has no solution and this method fails: this raises ``ValueError``; however this is not a proof that there is no valid - division with remainder (see the last example below). + division with remainder (see the last example below). EXAMPLES:: @@ -3245,12 +3245,12 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): Return ``True`` if and only if this matrix is an approximant basis in ``shifts``-ordered weak Popov form for the polynomial matrix ``pmat`` at order ``order``. - + If ``normal_form`` is ``True``, then the polynomial matrix must furthermore be in ``shifts``-Popov form. An error is raised if the input dimensions are not sound. If a single integer is provided for ``order``, then it is interpreted as a list of repeated integers with - this value. (See :meth:`minimal_approximant_basis` for definitions and + this value. (See :meth:`minimal_approximant_basis` for definitions and more details.) INPUT: @@ -3327,14 +3327,14 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): sage: appbas.is_minimal_approximant_basis(pmat, [8,8], shifts) Traceback (most recent call last): ... - ValueError: order length should be the column dimension + ValueError: order length should be the column dimension of the input matrix sage: appbas.is_minimal_approximant_basis(pmat, \ order, shifts, row_wise=False) Traceback (most recent call last): ... - ValueError: shifts length should be the column dimension + ValueError: shifts length should be the column dimension of the input matrix sage: Matrix(pR, [x^8]).is_minimal_approximant_basis(pmat, 8) @@ -3612,7 +3612,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): def _approximant_basis_iterative(self, order, shifts): r""" Return a ``shifts``-ordered weak Popov approximant basis for this - polynomial matrix at order ``order`` + polynomial matrix at order ``order`` (see :meth:`minimal_approximant_basis` for definitions). The output basis is considered row-wise, that is, its rows are @@ -3974,7 +3974,7 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): P = self.minimal_approximant_basis(orders,shifts,True,normal_form) row_indices = [] for i in range(m): - if P[i,i].degree() + shifts[i] <= degree_bound: + if P[i, i].degree() + shifts[i] <= degree_bound: row_indices.append(i) return P[row_indices,:] @@ -4000,6 +4000,6 @@ cdef class Matrix_polynomial_dense(Matrix_generic_dense): P = self.minimal_approximant_basis(orders,shifts,False,normal_form) column_indices = [] for j in range(n): - if P[j,j].degree() + shifts[j] <= degree_bound: + if P[j, j].degree() + shifts[j] <= degree_bound: column_indices.append(j) return P[:,column_indices] diff --git a/src/sage/modular/hypergeometric_misc.pyx b/src/sage/modular/hypergeometric_misc.pyx index 7f3c8ee494d..4b68e85e618 100644 --- a/src/sage/modular/hypergeometric_misc.pyx +++ b/src/sage/modular/hypergeometric_misc.pyx @@ -5,6 +5,7 @@ significantly from Cythonization. from cpython cimport array from cysignals.signals cimport sig_check + cpdef hgm_coeffs(long long p, int f, int prec, gamma, m, int D, gtable, int gtable_prec, bint use_longs): r""" @@ -24,9 +25,9 @@ cpdef hgm_coeffs(long long p, int f, int prec, gamma, m, int D, sage: D = 1 sage: hgm_coeffs(7, 1, 2, gamma, [0]*6, D, gtable, prec, False) [7, 2*7, 6*7, 7, 6, 4*7] - + Check issue from :trac:`28404`:: - + sage: H = Hyp(cyclotomic=[[10,2],[1,1,1,1,1]]) sage: u = H.euler_factor(2,79) # indirect doctest sage: u.reverse().is_weil_polynomial() @@ -116,7 +117,7 @@ cpdef hgm_coeffs(long long p, int f, int prec, gamma, m, int D, if flip: gv = -gv if use_longs: - w2 = gtab2[r1] # cast to long long to avoid overflow + w2 = gtab2[r1] # cast to long long to avoid overflow if gv > 0: for j in range(gv): w = w * w2 % q2 diff --git a/src/sage/numerical/linear_tensor_element.pyx b/src/sage/numerical/linear_tensor_element.pyx index f04949d6c02..c77aa290e21 100644 --- a/src/sage/numerical/linear_tensor_element.pyx +++ b/src/sage/numerical/linear_tensor_element.pyx @@ -54,10 +54,10 @@ cdef class LinearTensor(ModuleElement): Constructor taking a dictionary as its argument. INPUT: - + - ``parent`` -- the parent :class:`~sage.numerical.linear_tensor.LinearTensorParent_class`. - + - ``f`` -- A linear function tensored by a free module is represented as a dictionary. The values are the coefficient (free module elements) of the variable represented by the @@ -70,7 +70,7 @@ cdef class LinearTensor(ModuleElement): sage: LT = MixedIntegerLinearProgram().linear_functions_parent().tensor(RDF^2) sage: LT({0: [1,2], 3: [-7,-8]}) (1.0, 2.0)*x_0 + (-7.0, -8.0)*x_3 - + sage: TestSuite(LT).run(skip=['_test_an_element', '_test_elements_eq_reflexive', ....: '_test_elements_eq_symmetric', '_test_elements_eq_transitive', ....: '_test_elements_neq', '_test_additive_associativity', @@ -191,7 +191,7 @@ cdef class LinearTensor(ModuleElement): OUTPUT: String. - + EXAMPLES:: sage: from sage.numerical.linear_functions import LinearFunctionsParent @@ -221,7 +221,7 @@ cdef class LinearTensor(ModuleElement): term = '{1}*x_{0}'.format(key, coeff) terms.append(term) return ' + '.join(terms) - + def _repr_matrix(self): """ Return a matrix-like string representation. @@ -266,7 +266,7 @@ cdef class LinearTensor(ModuleElement): Return sum. INPUT: - + - ``b`` -- a :class:`LinearTensor`. OUTPUT: @@ -310,7 +310,7 @@ cdef class LinearTensor(ModuleElement): Return difference. INPUT: - + - ``b`` -- a :class:`LinearTensor`. OUTPUT: @@ -402,7 +402,7 @@ cdef class LinearTensor(ModuleElement): Arithmetic performed after coercions. Result lives in Tensor product of Vector space of dimension 2 over Real Double Field and Linear functions over Real Double Field Tensor product of Vector space of dimension 2 over Real Double Field and Linear functions over Real Double Field - + sage: operator.le(10, lt) (10.0, 10.0) <= (1.0, 2.0)*x_0 sage: lt <= 1 diff --git a/src/tox.ini b/src/tox.ini index 81f82aef3c5..c3147f88a01 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -119,12 +119,13 @@ description = # E721: do not compare types, use isinstance() # E722: do not use bare except, specify exception instead # W291: trailing whitespace + # W293: blank line contains whitespace # W391: blank line at end of file # W605: invalid escape sequence ‘x’ # See https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes deps = pycodestyle commands = pycodestyle --select E111,E211,E306,E401,E701,E702,E703,W291,W391,W605,E711,E712,E713,E721,E722 {posargs:{toxinidir}/sage/} - pycodestyle --select E111,E306,E401,E703,W605,E712,E713,E721,E722 --filename *.pyx {posargs:{toxinidir}/sage/} + pycodestyle --select E111,E306,E401,E703,W293,W605,E712,E713,E714,E721,E722 --filename *.pyx {posargs:{toxinidir}/sage/} [pycodestyle] max-line-length = 160 From 687f7f49791e29370f48f356bde82a34f4a027f5 Mon Sep 17 00:00:00 2001 From: Dima Pasechnik Date: Mon, 20 Feb 2023 10:04:10 +0000 Subject: [PATCH 528/751] use proper upstream tarball --- build/pkgs/msolve/checksums.ini | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/msolve/checksums.ini b/build/pkgs/msolve/checksums.ini index 9385392eec9..a2ef7368790 100644 --- a/build/pkgs/msolve/checksums.ini +++ b/build/pkgs/msolve/checksums.ini @@ -1,5 +1,5 @@ tarball=msolve-VERSION.tar.gz -sha1=4a33630bb5916e0947f8108cff85406c21040851 -md5=4847bf41a1f8e5656abefda2ba34549d -cksum=105445469 -upstream_url=/~https://github.com/dimpase/msolve/releases/download/VERSION/msolve-VERSION.tar.gz +sha1=db99898afd03c2491d7d2190b89cea9ff0c41313 +md5=4ff5909d27f164aad9f7bdff633c037d +cksum=507678049 +upstream_url=/~https://github.com/algebraic-solving/msolve/releases/download/vVERSION/msolve-VERSION.tar.gz From ffb4647de92cd6d489fa47d3e013298b6e3fa50d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 20 Feb 2023 09:29:53 -0800 Subject: [PATCH 529/751] src/sage/rings/polynomial/polynomial_element.pyx: Update doctest output (trac->github) --- src/sage/rings/polynomial/polynomial_element.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/polynomial/polynomial_element.pyx b/src/sage/rings/polynomial/polynomial_element.pyx index 2aae21a315e..0ca80d0ea49 100644 --- a/src/sage/rings/polynomial/polynomial_element.pyx +++ b/src/sage/rings/polynomial/polynomial_element.pyx @@ -155,7 +155,7 @@ cpdef is_Polynomial(f): sage: R. = ZZ[] sage: is_Polynomial(x^3 + x + 1) doctest:...: DeprecationWarning: the function is_Polynomial is deprecated; use isinstance(x, sage.structure.element.Polynomial) instead - See https://trac.sagemath.org/32709 for details. + See /~https://github.com/sagemath/sage/issues/32709 for details. True sage: S. = R[] sage: f = y^3 + x*y -3*x; f From f36ea891c5e4459cb159ddb5357cbe8d201f101e Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 12 Dec 2022 11:48:04 -0800 Subject: [PATCH 530/751] build/pkgs/scipy: Update to 1.10.0rc1 --- build/pkgs/scipy/checksums.ini | 6 +++--- build/pkgs/scipy/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/scipy/checksums.ini b/build/pkgs/scipy/checksums.ini index 24c26b4981b..a4d960a4bc9 100644 --- a/build/pkgs/scipy/checksums.ini +++ b/build/pkgs/scipy/checksums.ini @@ -1,5 +1,5 @@ tarball=scipy-VERSION.tar.gz -sha1=55fb286ab1a0b66a7439c5cc76e3c80e9de409ec -md5=83b0d9eab2ce79b7fe5888f119adee64 -cksum=1605676871 +sha1=c99ccb269ed0e6902cf37b518e20fd2a3288da61 +md5=72ab64d1cd5413e3385c384ab48a94ab +cksum=787232229 upstream_url=https://pypi.io/packages/source/s/scipy/scipy-VERSION.tar.gz diff --git a/build/pkgs/scipy/package-version.txt b/build/pkgs/scipy/package-version.txt index 77fee73a8cf..6bd3f0760f3 100644 --- a/build/pkgs/scipy/package-version.txt +++ b/build/pkgs/scipy/package-version.txt @@ -1 +1 @@ -1.9.3 +1.10.0rc1 From 70596f7501a356969ceeb39b7a3607d335e1a976 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 12 Dec 2022 11:55:58 -0800 Subject: [PATCH 531/751] build/pkgs/meson: Update to 1.0.0rc1 --- build/pkgs/meson/checksums.ini | 6 +++--- build/pkgs/meson/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/meson/checksums.ini b/build/pkgs/meson/checksums.ini index 39f0a42c527..30ce675f6aa 100644 --- a/build/pkgs/meson/checksums.ini +++ b/build/pkgs/meson/checksums.ini @@ -1,5 +1,5 @@ tarball=meson-VERSION.tar.gz -sha1=3bce963302f547547c82fda35f84838ebc608e8a -md5=b2f2757b5dd84cc754b9df53ce37a175 -cksum=2257545181 +sha1=5dee241b964faf0a3f7fb4e35e3f23cee6666d96 +md5=f1fa2122b23e3da172aeb69b4b502185 +cksum=1815880671 upstream_url=https://pypi.io/packages/source/m/meson/meson-VERSION.tar.gz diff --git a/build/pkgs/meson/package-version.txt b/build/pkgs/meson/package-version.txt index 068337d8307..6a056a8b1d0 100644 --- a/build/pkgs/meson/package-version.txt +++ b/build/pkgs/meson/package-version.txt @@ -1 +1 @@ -0.63.3 +1.0.0rc1 From ba3bb90f6217339bf211aa6afb585c460645d1f0 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 12 Dec 2022 11:56:47 -0800 Subject: [PATCH 532/751] build/pkgs/meson/spkg-configure.m4: Require >= 0.64 --- build/pkgs/meson/spkg-configure.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/pkgs/meson/spkg-configure.m4 b/build/pkgs/meson/spkg-configure.m4 index 3fbcf288065..efe863664f7 100644 --- a/build/pkgs/meson/spkg-configure.m4 +++ b/build/pkgs/meson/spkg-configure.m4 @@ -1,10 +1,10 @@ SAGE_SPKG_CONFIGURE( [meson], [ - AC_CACHE_CHECK([for meson >= 0.63.3], [ac_cv_path_MESON], [ + AC_CACHE_CHECK([for meson >= 0.64], [ac_cv_path_MESON], [ AC_PATH_PROGS_FEATURE_CHECK([MESON], [meson], [ meson_version=`$ac_path_MESON --version 2>&1` AS_IF([test -n "$meson_version"], [ - AX_COMPARE_VERSION([$meson_version], [ge], [0.63.3], [ + AX_COMPARE_VERSION([$meson_version], [ge], [0.64], [ ac_cv_path_MESON="$ac_path_MESON" ac_path_MESON_found=: ]) From 2e62028206ba6f9ca2a9cbbc49aebe7e11789d20 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 23 Dec 2022 16:11:21 -0800 Subject: [PATCH 533/751] build/pkgs/meson: Update to 1.0.0 --- build/pkgs/meson/checksums.ini | 6 +++--- build/pkgs/meson/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/meson/checksums.ini b/build/pkgs/meson/checksums.ini index 30ce675f6aa..66d81529cba 100644 --- a/build/pkgs/meson/checksums.ini +++ b/build/pkgs/meson/checksums.ini @@ -1,5 +1,5 @@ tarball=meson-VERSION.tar.gz -sha1=5dee241b964faf0a3f7fb4e35e3f23cee6666d96 -md5=f1fa2122b23e3da172aeb69b4b502185 -cksum=1815880671 +sha1=0a4f243c0a760a6b08459b0626a581d5c4085667 +md5=009b78125467cd9ee4d467175a5c12e1 +cksum=3329863407 upstream_url=https://pypi.io/packages/source/m/meson/meson-VERSION.tar.gz diff --git a/build/pkgs/meson/package-version.txt b/build/pkgs/meson/package-version.txt index 6a056a8b1d0..3eefcb9dd5b 100644 --- a/build/pkgs/meson/package-version.txt +++ b/build/pkgs/meson/package-version.txt @@ -1 +1 @@ -1.0.0rc1 +1.0.0 From 2c3349e448ff6ed17f33d653d60ce4fa7e174a7d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 23 Dec 2022 16:11:36 -0800 Subject: [PATCH 534/751] build/pkgs/meson_python: Update to 0.12.0 --- build/pkgs/meson_python/checksums.ini | 6 +++--- build/pkgs/meson_python/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/meson_python/checksums.ini b/build/pkgs/meson_python/checksums.ini index fa69cec7dca..6deccf89e47 100644 --- a/build/pkgs/meson_python/checksums.ini +++ b/build/pkgs/meson_python/checksums.ini @@ -1,5 +1,5 @@ tarball=meson_python-VERSION.tar.gz -sha1=09035196e1576073a7e4acac1f010e5e07e55f89 -md5=60856897b63bc91e1f953bf29f410be4 -cksum=3201302061 +sha1=668e1058e55e55a797dd351335e88620f8542d5f +md5=1c9a037d78a8f35d8704b98d37b638c4 +cksum=691860574 upstream_url=https://pypi.io/packages/source/m/meson_python/meson_python-VERSION.tar.gz diff --git a/build/pkgs/meson_python/package-version.txt b/build/pkgs/meson_python/package-version.txt index d9df1bbc0c7..ac454c6a1fc 100644 --- a/build/pkgs/meson_python/package-version.txt +++ b/build/pkgs/meson_python/package-version.txt @@ -1 +1 @@ -0.11.0 +0.12.0 From 1dfebb3a063f473a33e7f5a7a8198ffc8d5acfa8 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 11 Feb 2023 20:51:20 -0800 Subject: [PATCH 535/751] build/pkgs/scipy: Update to 1.10.0 --- build/pkgs/scipy/checksums.ini | 6 +++--- build/pkgs/scipy/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/scipy/checksums.ini b/build/pkgs/scipy/checksums.ini index a4d960a4bc9..a314f505496 100644 --- a/build/pkgs/scipy/checksums.ini +++ b/build/pkgs/scipy/checksums.ini @@ -1,5 +1,5 @@ tarball=scipy-VERSION.tar.gz -sha1=c99ccb269ed0e6902cf37b518e20fd2a3288da61 -md5=72ab64d1cd5413e3385c384ab48a94ab -cksum=787232229 +sha1=8094557cc6c2d2ec32faf2a9b33ed41b3a8acecc +md5=1ead70deead972701d27b8e01ee9fbc9 +cksum=1819526474 upstream_url=https://pypi.io/packages/source/s/scipy/scipy-VERSION.tar.gz diff --git a/build/pkgs/scipy/package-version.txt b/build/pkgs/scipy/package-version.txt index 6bd3f0760f3..81c871de46b 100644 --- a/build/pkgs/scipy/package-version.txt +++ b/build/pkgs/scipy/package-version.txt @@ -1 +1 @@ -1.10.0rc1 +1.10.0 From 5641cd497126900734ea515480a588995b5747c2 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 20 Feb 2023 09:33:07 -0800 Subject: [PATCH 536/751] build/pkgs/scipy: Update to 1.10.1 --- build/pkgs/scipy/checksums.ini | 6 +++--- build/pkgs/scipy/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/scipy/checksums.ini b/build/pkgs/scipy/checksums.ini index a314f505496..e56c56745e3 100644 --- a/build/pkgs/scipy/checksums.ini +++ b/build/pkgs/scipy/checksums.ini @@ -1,5 +1,5 @@ tarball=scipy-VERSION.tar.gz -sha1=8094557cc6c2d2ec32faf2a9b33ed41b3a8acecc -md5=1ead70deead972701d27b8e01ee9fbc9 -cksum=1819526474 +sha1=ff83163396a70276c0441b541befc485b471b27b +md5=de3db61d840456634ba37f2b5816e049 +cksum=3826133895 upstream_url=https://pypi.io/packages/source/s/scipy/scipy-VERSION.tar.gz diff --git a/build/pkgs/scipy/package-version.txt b/build/pkgs/scipy/package-version.txt index 81c871de46b..4dae2985b58 100644 --- a/build/pkgs/scipy/package-version.txt +++ b/build/pkgs/scipy/package-version.txt @@ -1 +1 @@ -1.10.0 +1.10.1 From 7cfb96ad5679b8283e095a7287af26a50f6c4a80 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 20 Feb 2023 09:33:25 -0800 Subject: [PATCH 537/751] build/pkgs/pythran: Update to 0.12.1 --- build/pkgs/pythran/checksums.ini | 6 +++--- build/pkgs/pythran/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/pythran/checksums.ini b/build/pkgs/pythran/checksums.ini index 0789ef48f67..cb4704c4bc4 100644 --- a/build/pkgs/pythran/checksums.ini +++ b/build/pkgs/pythran/checksums.ini @@ -1,5 +1,5 @@ tarball=pythran-VERSION.tar.gz -sha1=ed5630b0879be9c59885d83c5a24fcd5dfbca5af -md5=d2961ece35b4b9f44a84ef31df1b21ff -cksum=399652957 +sha1=71bc7c868cf011d184a013211f4195d8f9c606a2 +md5=168c31e8d108f26440b663b44cd99379 +cksum=2086161839 upstream_url=https://pypi.io/packages/source/p/pythran/pythran-VERSION.tar.gz diff --git a/build/pkgs/pythran/package-version.txt b/build/pkgs/pythran/package-version.txt index ac454c6a1fc..34a83616bb5 100644 --- a/build/pkgs/pythran/package-version.txt +++ b/build/pkgs/pythran/package-version.txt @@ -1 +1 @@ -0.12.0 +0.12.1 From 64987b35da1d138dd3b34bd4693e5db9e7e2041c Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 20 Feb 2023 09:33:48 -0800 Subject: [PATCH 538/751] build/pkgs/meson_python: Update to 0.12.1 --- build/pkgs/meson_python/checksums.ini | 6 +++--- build/pkgs/meson_python/package-version.txt | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/pkgs/meson_python/checksums.ini b/build/pkgs/meson_python/checksums.ini index 6deccf89e47..0e1c77874b7 100644 --- a/build/pkgs/meson_python/checksums.ini +++ b/build/pkgs/meson_python/checksums.ini @@ -1,5 +1,5 @@ tarball=meson_python-VERSION.tar.gz -sha1=668e1058e55e55a797dd351335e88620f8542d5f -md5=1c9a037d78a8f35d8704b98d37b638c4 -cksum=691860574 +sha1=bdaf002dc1ef314c32e2be76f3b2872f1282c4cc +md5=39be4f0b7f036e1d5db4a76fdb031355 +cksum=2636510839 upstream_url=https://pypi.io/packages/source/m/meson_python/meson_python-VERSION.tar.gz diff --git a/build/pkgs/meson_python/package-version.txt b/build/pkgs/meson_python/package-version.txt index ac454c6a1fc..34a83616bb5 100644 --- a/build/pkgs/meson_python/package-version.txt +++ b/build/pkgs/meson_python/package-version.txt @@ -1 +1 @@ -0.12.0 +0.12.1 From 5e79f6a969133274fc30c709974ea48d20b7fe6f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 20 Feb 2023 10:56:39 -0800 Subject: [PATCH 539/751] build/pkgs/msolve/SPKG.rst: Update --- build/pkgs/msolve/SPKG.rst | 3 --- 1 file changed, 3 deletions(-) diff --git a/build/pkgs/msolve/SPKG.rst b/build/pkgs/msolve/SPKG.rst index 00c1c417208..17f4802b4b1 100644 --- a/build/pkgs/msolve/SPKG.rst +++ b/build/pkgs/msolve/SPKG.rst @@ -16,6 +16,3 @@ Upstream Contact ---------------- /~https://github.com/algebraic-solving/msolve - -Upstream does not make source tarballs. -We make tarballs from the fork /~https://github.com/mkoeppe/msolve (branch 0.4.4+sage) From 40a7d574bce11dcf62575c276a0aa8ac76c55e56 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 20 Feb 2023 18:37:07 -0800 Subject: [PATCH 540/751] src/sage/rings/finite_rings: Update doctest output (trac->github) --- src/sage/rings/finite_rings/element_base.pyx | 2 +- src/sage/rings/finite_rings/finite_field_base.pyx | 2 +- src/sage/rings/finite_rings/finite_field_constructor.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sage/rings/finite_rings/element_base.pyx b/src/sage/rings/finite_rings/element_base.pyx index 17ca80e9028..4f785ebf181 100755 --- a/src/sage/rings/finite_rings/element_base.pyx +++ b/src/sage/rings/finite_rings/element_base.pyx @@ -34,7 +34,7 @@ def is_FiniteFieldElement(x): sage: from sage.rings.finite_rings.element_base import is_FiniteFieldElement sage: is_FiniteFieldElement(1) doctest:...: DeprecationWarning: the function is_FiniteFieldElement is deprecated; use isinstance(x, sage.structure.element.FieldElement) and x.parent().is_finite() instead - See https://trac.sagemath.org/32664 for details. + See /~https://github.com/sagemath/sage/issues/32664 for details. False sage: is_FiniteFieldElement(IntegerRing()) False diff --git a/src/sage/rings/finite_rings/finite_field_base.pyx b/src/sage/rings/finite_rings/finite_field_base.pyx index 1ec0f276289..1bdb3f48bb1 100644 --- a/src/sage/rings/finite_rings/finite_field_base.pyx +++ b/src/sage/rings/finite_rings/finite_field_base.pyx @@ -2122,7 +2122,7 @@ def is_FiniteField(R): sage: from sage.rings.finite_rings.finite_field_base import is_FiniteField sage: is_FiniteField(GF(9,'a')) doctest:...: DeprecationWarning: the function is_FiniteField is deprecated; use isinstance(x, sage.rings.finite_rings.finite_field_base.FiniteField) instead - See https://trac.sagemath.org/32664 for details. + See /~https://github.com/sagemath/sage/issues/32664 for details. True sage: is_FiniteField(GF(next_prime(10^10))) True diff --git a/src/sage/rings/finite_rings/finite_field_constructor.py b/src/sage/rings/finite_rings/finite_field_constructor.py index 23ed63d8b30..9a3f55ab489 100644 --- a/src/sage/rings/finite_rings/finite_field_constructor.py +++ b/src/sage/rings/finite_rings/finite_field_constructor.py @@ -800,7 +800,7 @@ def is_PrimeFiniteField(x): sage: from sage.rings.finite_rings.finite_field_constructor import is_PrimeFiniteField sage: is_PrimeFiniteField(QQ) doctest:...: DeprecationWarning: the function is_PrimeFiniteField is deprecated; use isinstance(x, sage.rings.finite_rings.finite_field_base.FiniteField) and x.is_prime_field() instead - See https://trac.sagemath.org/32664 for details. + See /~https://github.com/sagemath/sage/issues/32664 for details. False sage: is_PrimeFiniteField(GF(7)) True From 0c894e0b675e410d7770dbb272c2afdd726a5cde Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Mon, 20 Feb 2023 18:40:10 -0800 Subject: [PATCH 541/751] src/sage/rings/number_field/number_field_element.pyx: Update doctest output (trac->github) --- src/sage/rings/number_field/number_field_element.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sage/rings/number_field/number_field_element.pyx b/src/sage/rings/number_field/number_field_element.pyx index 7955bf37d07..87fab32e2d8 100644 --- a/src/sage/rings/number_field/number_field_element.pyx +++ b/src/sage/rings/number_field/number_field_element.pyx @@ -111,7 +111,7 @@ def is_NumberFieldElement(x): doctest:warning... DeprecationWarning: is_NumberFieldElement is deprecated; use isinstance(..., sage.structure.element.NumberFieldElement) instead - See https://trac.sagemath.org/34931 for details. + See /~https://github.com/sagemath/sage/issues/34931 for details. False sage: k. = NumberField(x^7 + 17*x + 1) sage: is_NumberFieldElement(a+1) From b04edc8b613c5fe276d25b377b602c96be01af42 Mon Sep 17 00:00:00 2001 From: Lorenz Panny Date: Tue, 21 Feb 2023 10:50:25 +0800 Subject: [PATCH 542/751] tweak documentation following reviewer feedback --- src/sage/schemes/elliptic_curves/hom.py | 30 ++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/src/sage/schemes/elliptic_curves/hom.py b/src/sage/schemes/elliptic_curves/hom.py index eeb2bdd530d..e1c5ed25c84 100644 --- a/src/sage/schemes/elliptic_curves/hom.py +++ b/src/sage/schemes/elliptic_curves/hom.py @@ -726,12 +726,9 @@ def as_morphism(self): def matrix_on_subgroup(self, domain_gens, codomain_gens=None): r""" - Return the matrix as which this isogeny acts on the + Return the matrix by which this isogeny acts on the `n`-torsion subgroup with respect to the given bases. - (This is useful for tasks such as computing a set of - generators for the kernel subgroup.) - INPUT: - ``domain_gens`` -- basis `(P,Q)` of some `n`-torsion @@ -775,7 +772,28 @@ def matrix_on_subgroup(self, domain_gens, codomain_gens=None): sage: iota(a*P + b*Q) == c*P + d*Q True - We can compute the matrix of a Frobenius endomorphism + One important application of this is to compute generators of + the kernel subgroup of an isogeny, when the `n`-torsion subgroup + containing the kernel is accessible:: + + sage: K = E(83*i-16, 9*i-147) + sage: K.order() + 7 + sage: phi = E.isogeny(K) + sage: R,S = phi.codomain().gens() + sage: mat = phi.matrix_on_subgroup((P,Q), (R,S)) + sage: mat # random -- depends on R,S + [124 263] + [115 141] + sage: kermat = mat.left_kernel_matrix(); kermat + [300 60] + sage: ker = [ZZ(v[0])*P + ZZ(v[1])*Q for v in kermat] + sage: {phi(T) for T in ker} + {(0 : 1 : 0)} + sage: phi == E.isogeny(ker) + True + + We can also compute the matrix of a Frobenius endomorphism (:class:`~sage.schemes.elliptic_curves.hom_frobenius.EllipticCurveHom_frobenius`) on a large enough subgroup to verify point-counting results:: @@ -785,6 +803,8 @@ def matrix_on_subgroup(self, domain_gens, codomain_gens=None): sage: P,Q = EE.torsion_basis(37) sage: pi = EE.frobenius_isogeny() sage: M = pi.matrix_on_subgroup((P,Q)) + sage: M.parent() + Full MatrixSpace of 2 by 2 dense matrices over Ring of integers modulo 37 sage: M.trace() 34 sage: E.trace_of_frobenius() From 6ee79be1521d2da8d33352f73cbf64ee97a6878e Mon Sep 17 00:00:00 2001 From: MatteoCati <53347703+MatteoCati@users.noreply.github.com> Date: Tue, 21 Feb 2023 18:36:23 +0000 Subject: [PATCH 543/751] Merge updates from add_new_skew_hadamard_matrices (#2) * Improve camera positioning for threejs * Changes to sagedoc, stopgap and superseded; one mass replacement * Another mass replacement * Another mass replacement * Another replacement * Another replacement * Remove comment numbers * Fix a couple of strays * trac ticket -> github issue * Change checksums back, fix meta-ticket * Another mass replacement * Another mass replacement * Another mass replacement * Manual fixes * Small replacement * Small replacement * Fix typo * Add github role to tox * add explicit formulas to documentation of WeierstrassIsomorphism * lift documentation from .__init__() to class and tweak * add doctest for #20847 * add .torsion_basis() method to EllipticCurve_finite_field * Revert "Remove comment numbers" This reverts commit 27cdf3e9959fbbd8ee81c6b2abcd2af7b74d71bc. * Revert changes to git_trac.rst * Switch :github: to :issue: * Switch from sage-prod to sage in attachment links * Change trac_number to issue_number * cross linked matrix method * Add construction of strongly regular digraph * A few manual fixes * Another automatic change * Undo a bunch of changes in the doc directory * Another fix * Try to fix sphinx problem * Move comment tag inside * allowing iterables as input * Fix code style * generalized fix * converting iterables * added is_supergreedy() function * implemented diff algo, for borderline cases * correcting function for disjoint set of points * correcting function * documentation changes * minor chagnges * fixing_failing_tests * minor documentation correction * Update linear_extensions.py * corrected TeX maths in docstrings * further fixes to supergreedy docstring * Added Reference * adding reference * minor updates * correcting documentation errors * correct a wrong change to :trac: * remove spurrious blank line * another spurrious line removed * compute matrix kernels modulo composites * fix doctests * docstring style tweak * adding doctests * correct the import location (duh...) * adding colored permutation doctests * doctests fixes * replaced "Combining Caron"+c with one unicode character * Updated SageMath version to 10.0.beta1 --------- Co-authored-by: Kwankyu Lee Co-authored-by: David Roe Co-authored-by: Lorenz Panny Co-authored-by: Marc Mezzarobba Co-authored-by: Tobias Diez Co-authored-by: Sandstorm831 Co-authored-by: Rohan Garg <76916164+Sandstorm831@users.noreply.github.com> Co-authored-by: Dima Pasechnik Co-authored-by: Release Manager --- .devcontainer/portability-updateContent.sh | 4 +- .github/workflows/ci-macos.yml | 2 +- .github/workflows/ci-wsl.yml | 2 +- .gitignore | 2 +- .zenodo.json | 8 +- Makefile | 6 +- README.md | 2 +- VERSION.txt | 2 +- bootstrap | 6 +- build/bin/sage-bootstrap-python | 2 +- build/bin/sage-build-num-threads | 2 +- build/bin/sage-dist-helpers | 6 +- build/bin/sage-flock | 2 +- build/bin/sage-site | 2 +- build/bin/sage-spkg | 2 +- build/bin/sage-spkg-info | 4 +- build/bin/sage-venv | 2 +- build/make/Makefile.in | 2 +- build/pkgs/_prereq/distros/cygwin.txt | 4 +- build/pkgs/_prereq/distros/fedora.txt | 6 +- build/pkgs/cddlib/spkg-configure.m4 | 2 +- build/pkgs/cmake/spkg-check.in | 4 +- build/pkgs/configure/checksums.ini | 6 +- build/pkgs/configure/package-version.txt | 2 +- build/pkgs/curl/spkg-check.in | 4 +- build/pkgs/ecl/SPKG.rst | 2 +- build/pkgs/ecl/spkg-install.in | 2 +- build/pkgs/ecm/spkg-install.in | 4 +- build/pkgs/elliptic_curves/spkg-install.py | 2 +- build/pkgs/fflas_ffpack/spkg-install.in | 4 +- build/pkgs/gap/spkg-install.in | 4 +- build/pkgs/gc/spkg-install.in | 4 +- build/pkgs/gcc/dependencies | 2 +- build/pkgs/gcc/spkg-configure.m4 | 6 +- build/pkgs/gdb/distros/conda.txt | 2 +- .../patches/fix-int64-for-32bit-archs.patch | 2 +- build/pkgs/gfan/spkg-install.in | 2 +- build/pkgs/gfortran/spkg-configure.m4 | 2 +- build/pkgs/giac/patches/cygwin-icas.patch | 2 +- build/pkgs/giac/patches/isnan-conflict.patch | 2 +- build/pkgs/giac/patches/pari_2_11.patch | 2 +- build/pkgs/glpk/patches/error_recovery.patch | 2 +- build/pkgs/glpk/spkg-install.in | 4 +- build/pkgs/glucose/spkg-install.in | 2 +- build/pkgs/iconv/spkg-check.in | 2 +- build/pkgs/iconv/spkg-install.in | 12 +- build/pkgs/jupyterlab/requirements.txt | 2 +- build/pkgs/libgd/spkg-install.in | 2 +- build/pkgs/linbox/spkg-install.in | 6 +- build/pkgs/matplotlib/make-setup-config.py | 2 +- build/pkgs/maxima/spkg-install.in | 2 +- build/pkgs/meataxe/spkg-install.in | 2 +- .../pkgs/notebook/jupyter_notebook_config.py | 2 +- .../don-t-rely-on-pandoc-for-the-readme.patch | 2 +- build/pkgs/numpy/spkg-install.in | 2 +- build/pkgs/openblas/spkg-install.in | 4 +- build/pkgs/pcre/patches/8.39-cygwin-jit.patch | 2 +- build/pkgs/pcre/spkg-install.in | 2 +- .../ppl/patches/cygwin-weak-symbols.patch | 2 +- build/pkgs/ppl/spkg-install.in | 2 +- .../pkgs/prompt_toolkit/install-requires.txt | 2 +- build/pkgs/ptyprocess/install-requires.txt | 2 +- build/pkgs/python3/spkg-build.in | 6 +- build/pkgs/python3/spkg-configure.m4 | 4 +- build/pkgs/python3/spkg-install.in | 2 +- .../patches/0002-WIP-Don-t-add-lrt.patch | 2 +- build/pkgs/qepcad/spkg-install.in | 6 +- build/pkgs/sage_conf/install-requires.txt | 2 +- build/pkgs/sage_docbuild/install-requires.txt | 2 +- build/pkgs/sage_setup/install-requires.txt | 2 +- build/pkgs/sage_sws2rst/install-requires.txt | 2 +- build/pkgs/sagelib/install-requires.txt | 2 +- build/pkgs/sagelib/spkg-install | 2 +- .../sagemath_categories/install-requires.txt | 2 +- .../sagemath_environment/install-requires.txt | 2 +- .../sagemath_objects/install-requires.txt | 2 +- build/pkgs/sagemath_repl/install-requires.txt | 2 +- build/pkgs/setuptools/distros/conda.txt | 2 +- build/pkgs/snappy/dependencies | 2 +- build/pkgs/snappy/requirements.txt | 4 +- build/pkgs/sympow/SPKG.rst | 4 +- build/pkgs/wheel/install-requires.txt | 2 +- build/sage_bootstrap/flock.py | 2 +- build/sage_bootstrap/uncompress/action.py | 4 +- build/sage_bootstrap/uncompress/tar_file.py | 4 +- build/sage_bootstrap/uninstall.py | 2 +- docker/Dockerfile | 2 +- docker/README.md | 2 +- m4/sage_spkg_collect.m4 | 2 +- pkgs/sage-conf/README.rst | 4 +- pkgs/sage-conf/VERSION.txt | 2 +- pkgs/sage-conf_pypi/VERSION.txt | 2 +- pkgs/sage-docbuild/VERSION.txt | 2 +- pkgs/sage-setup/VERSION.txt | 2 +- pkgs/sage-sws2rst/README.rst | 2 +- pkgs/sage-sws2rst/VERSION.txt | 2 +- pkgs/sagemath-categories/MANIFEST.in.m4 | 2 +- pkgs/sagemath-categories/VERSION.txt | 2 +- pkgs/sagemath-environment/VERSION.txt | 2 +- pkgs/sagemath-objects/VERSION.txt | 2 +- pkgs/sagemath-repl/VERSION.txt | 2 +- pkgs/sagemath-standard/README.rst | 2 +- src/.relint.yml | 2 +- src/VERSION.txt | 2 +- src/bin/sage | 12 +- src/bin/sage-cleaner | 2 +- src/bin/sage-coverage | 2 +- src/bin/sage-cython | 2 +- src/bin/sage-env | 16 +-- src/bin/sage-num-threads.py | 2 +- src/bin/sage-runtests | 10 +- src/bin/sage-version.sh | 6 +- src/conftest.py | 2 +- src/doc/bootstrap | 4 +- src/doc/en/constructions/contributions.rst | 2 +- src/doc/en/prep/Advanced-2DPlotting.rst | 2 +- src/doc/en/reference/references/index.rst | 13 +- .../nf_galois_groups.rst | 2 +- src/sage/algebras/free_algebra_element.py | 2 +- src/sage/algebras/fusion_rings/fusion_ring.py | 2 +- .../free_algebra_element_letterplace.pyx | 2 +- .../algebras/lie_algebras/free_lie_algebra.py | 2 +- src/sage/algebras/lie_algebras/lie_algebra.py | 2 +- .../lie_algebras/lie_algebra_element.pyx | 2 +- src/sage/algebras/lie_algebras/morphism.py | 2 +- .../algebras/quatalg/quaternion_algebra.py | 4 +- src/sage/arith/constants.pxd | 2 +- src/sage/arith/long.pxd | 2 +- src/sage/calculus/wester.py | 2 +- src/sage/categories/category_with_axiom.py | 2 +- .../finite_complex_reflection_groups.py | 2 +- src/sage/categories/homset.py | 4 +- src/sage/categories/magmas.py | 2 +- src/sage/categories/modules.py | 2 +- src/sage/categories/morphism.pyx | 2 +- src/sage/categories/primer.py | 4 +- src/sage/categories/pushout.py | 4 +- src/sage/categories/unital_algebras.py | 4 +- src/sage/coding/gabidulin_code.py | 2 +- src/sage/combinat/colored_permutations.py | 114 +++++++++------- src/sage/combinat/combinat.py | 2 +- .../combinat/designs/difference_family.py | 2 +- src/sage/combinat/finite_state_machine.py | 2 +- src/sage/combinat/free_module.py | 2 +- src/sage/combinat/k_regular_sequence.py | 2 +- src/sage/combinat/permutation.py | 6 +- src/sage/combinat/posets/hasse_diagram.py | 4 +- src/sage/combinat/posets/lattices.py | 2 +- src/sage/combinat/posets/linear_extensions.py | 70 ++++++++++ src/sage/combinat/posets/posets.py | 4 +- src/sage/combinat/recognizable_series.py | 4 +- src/sage/combinat/root_system/type_relabel.py | 2 +- src/sage/combinat/set_partition.py | 4 +- src/sage/combinat/sf/dual.py | 2 +- src/sage/combinat/sf/hall_littlewood.py | 2 +- src/sage/combinat/tiling.py | 2 +- src/sage/combinat/words/finite_word.py | 10 +- src/sage/combinat/words/morphic.py | 2 +- src/sage/combinat/words/morphism.py | 10 +- src/sage/cpython/__init__.py | 8 +- src/sage/cpython/atexit.pyx | 2 +- src/sage/crypto/boolean_function.pyx | 2 +- src/sage/databases/findstat.py | 2 +- src/sage/databases/oeis.py | 4 +- src/sage/doctest/forker.py | 16 +-- .../dynamics/surface_dynamics_deprecation.py | 2 +- src/sage/ext/memory_allocator.pxd | 4 +- src/sage/ext/memory_allocator.pyx | 4 +- src/sage/ext/mod_int.h | 2 +- .../ext_data/threejs/threejs_template.html | 14 +- src/sage/features/__init__.py | 2 +- src/sage/features/join_feature.py | 2 +- src/sage/functions/exp_integral.py | 2 +- src/sage/functions/other.py | 2 +- src/sage/game_theory/normal_form_game.py | 4 +- src/sage/game_theory/parser.py | 2 +- src/sage/geometry/cone.py | 6 +- .../hyperplane_arrangement/arrangement.py | 2 +- src/sage/geometry/lattice_polytope.py | 2 +- src/sage/geometry/polyhedron/base3.py | 2 +- .../combinatorial_polyhedron/base.pyx | 4 +- src/sage/geometry/polyhedron/parent.py | 2 +- .../polyhedron/ppl_lattice_polytope.py | 6 +- src/sage/graphs/base/c_graph.pyx | 2 +- .../graphs/base/static_sparse_backend.pyx | 2 +- src/sage/graphs/bipartite_graph.py | 4 +- src/sage/graphs/connectivity.pyx | 4 +- src/sage/graphs/digraph.py | 2 +- src/sage/graphs/digraph_generators.py | 47 +++++++ src/sage/graphs/generic_graph.py | 16 +-- src/sage/graphs/graph.py | 4 +- src/sage/graphs/graph_coloring.pyx | 4 +- src/sage/graphs/graph_latex.py | 2 +- src/sage/graphs/graph_plot.py | 4 +- src/sage/graphs/spanning_tree.pyx | 8 +- src/sage/groups/abelian_gps/abelian_group.py | 2 +- .../additive_abelian_wrapper.py | 2 +- src/sage/groups/braid.py | 2 +- src/sage/groups/class_function.py | 2 +- src/sage/groups/galois_group.py | 2 +- .../groups/matrix_gps/finitely_generated.py | 2 +- src/sage/groups/matrix_gps/homset.py | 2 +- src/sage/groups/matrix_gps/morphism.py | 2 +- src/sage/groups/perm_gps/permgroup.py | 8 +- src/sage/homology/chain_complex.py | 4 +- src/sage/homology/tests.py | 8 +- src/sage/interacts/library.py | 2 +- src/sage/interfaces/axiom.py | 2 +- src/sage/interfaces/chomp.py | 18 +-- src/sage/interfaces/expect.py | 8 +- src/sage/interfaces/fricas.py | 2 +- src/sage/interfaces/gap.py | 2 +- src/sage/interfaces/gfan.py | 2 +- src/sage/interfaces/gp.py | 2 +- src/sage/interfaces/interface.py | 2 +- src/sage/interfaces/kash.py | 2 +- src/sage/interfaces/lie.py | 2 +- src/sage/interfaces/lisp.py | 2 +- src/sage/interfaces/macaulay2.py | 4 +- src/sage/interfaces/magma.py | 2 +- src/sage/interfaces/maxima.py | 4 +- src/sage/interfaces/maxima_lib.py | 4 +- src/sage/interfaces/qepcad.py | 2 +- src/sage/interfaces/r.py | 2 +- src/sage/interfaces/sagespawn.pyx | 2 +- src/sage/interfaces/singular.py | 4 +- src/sage/interfaces/tachyon.py | 2 +- src/sage/interfaces/tides.py | 4 +- src/sage/libs/coxeter3/coxeter_group.py | 2 +- src/sage/libs/linbox/fflas.pxd | 2 +- src/sage/libs/ntl/ntl_lzz_pContext.pyx | 2 +- src/sage/libs/singular/function.pyx | 2 +- src/sage/libs/singular/groebner_strategy.pyx | 2 +- src/sage/libs/singular/singular.pyx | 9 +- src/sage/manifolds/chart.py | 4 +- src/sage/manifolds/chart_func.py | 2 +- .../differentiable/examples/euclidean.py | 2 +- .../manifolds/differentiable/mixed_form.py | 2 +- .../differentiable/vectorfield_module.py | 2 +- src/sage/manifolds/scalarfield.py | 2 +- src/sage/matrix/matrix0.pyx | 4 +- src/sage/matrix/matrix1.pyx | 4 +- src/sage/matrix/matrix2.pyx | 90 ++++++++++--- src/sage/matrix/matrix_complex_ball_dense.pyx | 6 +- src/sage/matrix/matrix_double_dense.pyx | 4 +- src/sage/matrix/matrix_double_sparse.pyx | 4 +- src/sage/matrix/matrix_gfpn_dense.pyx | 2 +- .../matrix/matrix_modn_dense_template.pxi | 11 +- src/sage/matrix/matrix_modn_sparse.pyx | 2 +- src/sage/matrix/matrix_space.py | 2 +- src/sage/media/wav.py | 2 +- src/sage/misc/cachefunc.pyx | 4 +- src/sage/misc/compat.py | 2 +- src/sage/misc/cython.py | 8 +- src/sage/misc/decorators.py | 12 +- src/sage/misc/dev_tools.py | 6 +- src/sage/misc/dist.py | 2 +- src/sage/misc/functional.py | 6 +- src/sage/misc/latex_standalone.py | 12 +- src/sage/misc/lazy_import.pyx | 22 +-- src/sage/misc/misc.py | 12 +- src/sage/misc/package.py | 4 +- src/sage/misc/persist.pyx | 2 +- src/sage/misc/rest_index_of_methods.py | 2 +- src/sage/misc/sagedoc.py | 17 +-- src/sage/misc/sagedoc_conf.py | 2 +- src/sage/misc/sageinspect.py | 2 +- src/sage/misc/stopgap.pyx | 14 +- src/sage/misc/superseded.py | 127 +++++++++--------- src/sage/misc/weak_dict.pyx | 4 +- src/sage/modular/dirichlet.py | 2 +- src/sage/modular/modform/find_generators.py | 8 +- src/sage/modular/modsym/p1list.pyx | 2 +- src/sage/modules/matrix_morphism.py | 2 +- src/sage/modules/vector_mod2_dense.pyx | 2 +- .../modules/with_basis/indexed_element.pyx | 2 +- .../numerical/backends/generic_backend.pyx | 2 +- .../numerical/interactive_simplex_method.py | 4 +- src/sage/numerical/optimize.py | 2 +- src/sage/parallel/map_reduce.py | 6 +- src/sage/plot/graphics.py | 2 +- src/sage/plot/histogram.py | 2 +- src/sage/plot/matrix_plot.py | 2 +- src/sage/plot/plot.py | 4 +- src/sage/plot/plot3d/implicit_surface.pyx | 2 +- src/sage/plot/plot3d/list_plot3d.py | 2 +- src/sage/plot/plot3d/texture.py | 2 +- ...uadratic_form__local_density_congruence.py | 2 +- src/sage/quivers/representation.py | 2 +- src/sage/repl/configuration.py | 6 +- src/sage/repl/load.py | 2 +- src/sage/repl/preparse.py | 2 +- src/sage/rings/all.py | 6 +- .../asymptotic_expansion_generators.py | 4 +- src/sage/rings/asymptotic/asymptotic_ring.py | 2 +- ...otics_multivariate_generating_functions.py | 2 +- src/sage/rings/asymptotic/term_monoid.py | 6 +- src/sage/rings/bernmm/README.txt | 2 +- src/sage/rings/complex_double.pyx | 2 +- src/sage/rings/complex_field.py | 2 +- src/sage/rings/complex_interval_field.py | 2 +- src/sage/rings/complex_mpfr.pyx | 2 +- src/sage/rings/complex_number.pyx | 2 +- .../rings/finite_rings/integer_mod_ring.py | 2 +- src/sage/rings/fraction_field_FpT.pyx | 2 +- src/sage/rings/function_field/order.py | 2 +- src/sage/rings/ideal.py | 2 +- src/sage/rings/integer.pyx | 2 +- .../rings/laurent_series_ring_element.pyx | 2 +- src/sage/rings/lazy_series.py | 6 +- src/sage/rings/morphism.pyx | 6 +- src/sage/rings/number_field/galois_group.py | 22 +-- src/sage/rings/number_field/number_field.py | 16 +-- .../number_field/number_field_element.pyx | 8 +- .../number_field_element_quadratic.pyx | 2 +- src/sage/rings/padics/factory.py | 2 +- src/sage/rings/padics/generic_nodes.py | 6 +- src/sage/rings/padics/lattice_precision.py | 2 +- src/sage/rings/padics/local_generic.py | 2 +- .../rings/padics/local_generic_element.pyx | 2 +- src/sage/rings/padics/padic_base_generic.py | 2 +- src/sage/rings/padics/padic_base_leaves.py | 4 +- src/sage/rings/padics/padic_generic.py | 10 +- .../rings/padics/padic_generic_element.pyx | 2 +- .../rings/padics/padic_lattice_element.py | 2 +- .../polynomial/infinite_polynomial_element.py | 2 +- .../rings/polynomial/laurent_polynomial.pyx | 4 +- .../multi_polynomial_libsingular.pyx | 6 +- .../polynomial/ore_polynomial_element.pyx | 2 +- .../polynomial_padic_capped_relative_dense.py | 2 +- src/sage/rings/polynomial/pbori/pbori.pyx | 4 +- .../rings/polynomial/polynomial_element.pyx | 6 +- .../polynomial/polynomial_element_generic.py | 4 +- .../polynomial/polynomial_rational_flint.pyx | 2 +- src/sage/rings/polynomial/polynomial_ring.py | 6 +- .../polynomial/skew_polynomial_element.pyx | 4 +- .../rings/polynomial/skew_polynomial_ring.py | 2 +- src/sage/rings/polynomial/term_order.py | 2 +- src/sage/rings/power_series_poly.pyx | 9 +- src/sage/rings/power_series_ring.py | 2 +- src/sage/rings/qqbar.py | 24 ++-- src/sage/rings/rational.pyx | 6 +- src/sage/rings/real_double.pyx | 2 +- src/sage/rings/real_interval_field.py | 2 +- src/sage/rings/real_mpfi.pyx | 8 +- src/sage/rings/real_mpfr.pyx | 16 +-- src/sage/rings/ring_extension.pyx | 4 +- src/sage/sat/solvers/satsolver.pyx | 2 +- src/sage/schemes/elliptic_curves/ell_field.py | 10 +- .../elliptic_curves/ell_finite_field.py | 61 +++++++++ .../schemes/elliptic_curves/ell_local_data.py | 2 +- .../elliptic_curves/ell_number_field.py | 5 + .../schemes/elliptic_curves/ell_torsion.py | 2 +- .../schemes/elliptic_curves/formal_group.py | 2 +- src/sage/schemes/elliptic_curves/hom.py | 4 +- src/sage/schemes/elliptic_curves/padics.py | 2 +- .../elliptic_curves/weierstrass_morphism.py | 95 +++++++------ src/sage/schemes/generic/algebraic_scheme.py | 4 +- src/sage/schemes/hyperelliptic_curves/all.py | 8 +- .../hyperelliptic_finite_field.py | 10 +- .../hyperelliptic_curves/monsky_washnitzer.py | 6 +- .../schemes/projective/proj_bdd_height.py | 2 +- .../schemes/projective/projective_morphism.py | 6 +- .../schemes/projective/projective_point.py | 2 +- src/sage/schemes/toric/variety.py | 6 +- src/sage/sets/recursively_enumerated_set.pyx | 2 +- src/sage/sets/set.py | 2 +- src/sage/stats/basic_stats.py | 16 +-- src/sage/stats/time_series.pyx | 2 +- src/sage/structure/coerce_actions.pyx | 2 +- src/sage/structure/coerce_maps.pyx | 2 +- src/sage/structure/dynamic_class.py | 2 +- src/sage/structure/element.pyx | 2 +- src/sage/structure/global_options.py | 2 +- src/sage/structure/graphics_file.py | 2 +- src/sage/structure/list_clone.pxd | 2 +- src/sage/structure/parent.pyx | 2 +- src/sage/structure/support_view.py | 4 +- src/sage/symbolic/callable.py | 4 +- src/sage/symbolic/expression.pyx | 12 +- src/sage/symbolic/expression_conversions.py | 2 +- src/sage/symbolic/function.pyx | 2 +- src/sage/symbolic/ginac/README.md | 2 +- src/sage/symbolic/ginac/templates.cpp | 2 +- src/sage/symbolic/pynac_impl.pxi | 2 +- src/sage/symbolic/ring.pyx | 2 +- src/sage/tensor/modules/comp.py | 2 +- .../tensor/modules/ext_pow_free_module.py | 4 +- .../tensor/modules/finite_rank_free_module.py | 4 +- src/sage/tensor/modules/reflexive_module.py | 4 +- .../tensor/modules/tensor_free_submodule.py | 2 +- .../graphique_doctest.py | 6 +- src/sage/tests/lazy_imports.py | 4 +- src/sage/tests/test_deprecation.py | 4 +- src/sage/topology/cubical_complex.py | 2 +- src/sage/topology/simplicial_complex.py | 2 +- .../topology/simplicial_complex_examples.py | 2 +- src/sage/typeset/character_art.py | 2 +- src/sage/version.py | 6 +- src/sage_docbuild/__main__.py | 4 +- src/sage_docbuild/builders.py | 2 +- src/sage_docbuild/conf.py | 4 +- src/sage_docbuild/ext/sage_autodoc.py | 16 +-- src/sage_docbuild/sphinxbuild.py | 2 +- src/sage_setup/command/sage_build_cython.py | 2 +- src/sage_setup/run_parallel.py | 2 +- src/sage_setup/setenv.py | 2 +- src/tox.ini | 1 + 408 files changed, 1212 insertions(+), 889 deletions(-) diff --git a/.devcontainer/portability-updateContent.sh b/.devcontainer/portability-updateContent.sh index a923fc0d106..41033933911 100755 --- a/.devcontainer/portability-updateContent.sh +++ b/.devcontainer/portability-updateContent.sh @@ -5,14 +5,14 @@ # The script assumes that it is run from SAGE_ROOT. # # If "config.log" or "logs" are symlinks (for example, created by 'tox -e local-...', -# or after https://trac.sagemath.org/ticket/33262), they might point outside of +# or after /~https://github.com/sagemath/sage/issues/33262), they might point outside of # the dev container, so remove them. Likewise for upstream. for f in config.log logs upstream; do if [ -L $f ]; then rm -f $f fi done -# If possible (ensured after https://trac.sagemath.org/ticket/33262), keep the +# If possible (ensured after /~https://github.com/sagemath/sage/issues/33262), keep the # logs in the container. if [ ! -d logs ]; then ln -s /sage/logs logs diff --git a/.github/workflows/ci-macos.yml b/.github/workflows/ci-macos.yml index 015f1c8fb4f..c07c6968095 100644 --- a/.github/workflows/ci-macos.yml +++ b/.github/workflows/ci-macos.yml @@ -38,7 +38,7 @@ jobs: matrix: stage: ["1", "2", "2-optional-0-o", "2-optional-p-z", "2-experimental-0-o", "2-experimental-p-z"] # python3_xcode is only accepted if enough packages are available from the system - # --> to test "minimal", we would need https://trac.sagemath.org/ticket/30949 + # --> to test "minimal", we would need /~https://github.com/sagemath/sage/issues/30949 tox_env: [homebrew-macos-usrlocal-minimal, homebrew-macos-usrlocal-standard, homebrew-macos-usrlocal-maximal, homebrew-macos-usrlocal-python3_xcode-standard, conda-forge-macos-minimal, conda-forge-macos-standard, conda-forge-macos-maximal] xcode_version_factor: [default] os: [ macos-11, macos-12 ] diff --git a/.github/workflows/ci-wsl.yml b/.github/workflows/ci-wsl.yml index 4093af802b0..e6d4d30cfc3 100644 --- a/.github/workflows/ci-wsl.yml +++ b/.github/workflows/ci-wsl.yml @@ -13,7 +13,7 @@ jobs: windows: runs-on: windows-latest name: Ubuntu 20.04 - # Following https://trac.sagemath.org/ticket/25206#comment:63 + # Following /~https://github.com/sagemath/sage/issues/25206#comment:63 steps: - name: Configure git run: git config --global core.symlinks true diff --git a/.gitignore b/.gitignore index b93c5dbd12b..2faf325a44c 100644 --- a/.gitignore +++ b/.gitignore @@ -187,7 +187,7 @@ build/bin/sage-build-env-config /pkgs/sagemath-repl/requirements.txt /pkgs/sagemath-categories/MANIFEST.in -# same for old locations - before Trac #31577 +# same for old locations - before Issue #31577 /build/pkgs/*/src/build /build/pkgs/*/src/dist /build/pkgs/*/src/MANIFEST diff --git a/.zenodo.json b/.zenodo.json index da76244bfa7..45c935970a7 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,10 +1,10 @@ { "description": "Mirror of the Sage https://sagemath.org/ source tree", "license": "other-open", - "title": "sagemath/sage: 10.0.beta0", - "version": "10.0.beta0", + "title": "sagemath/sage: 10.0.beta1", + "version": "10.0.beta1", "upload_type": "software", - "publication_date": "2023-02-12", + "publication_date": "2023-02-19", "creators": [ { "affiliation": "SageMath.org", @@ -15,7 +15,7 @@ "related_identifiers": [ { "scheme": "url", - "identifier": "/~https://github.com/sagemath/sage/tree/10.0.beta0", + "identifier": "/~https://github.com/sagemath/sage/tree/10.0.beta1", "relation": "isSupplementTo" }, { diff --git a/Makefile b/Makefile index 414398ddf0d..008d6ff2221 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ SAGE_ROOT_LOGS = logs # The --stop flag below is just a random flag to induce graceful # breakage with non-GNU versions of make. -# See https://trac.sagemath.org/ticket/24617 +# See /~https://github.com/sagemath/sage/issues/24617 # Defer unknown targets to build/make/Makefile %:: @@ -259,8 +259,8 @@ TEST_FILES = --all TEST_FLAGS = # When the documentation is installed, "optional" also includes all tests marked 'sagemath_doc_html', -# see https://trac.sagemath.org/ticket/25345, https://trac.sagemath.org/ticket/26110, and -# https://trac.sagemath.org/ticket/32759 +# see /~https://github.com/sagemath/sage/issues/25345, /~https://github.com/sagemath/sage/issues/26110, and +# /~https://github.com/sagemath/sage/issues/32759 TEST_OPTIONAL = sage,optional # Keep track of the top-level *test* Makefile target for logging. diff --git a/README.md b/README.md index 1a0582d87c5..1233f17de73 100644 --- a/README.md +++ b/README.md @@ -329,7 +329,7 @@ in the Installation Guide. manager. For a large [list of Sage - packages](https://trac.sagemath.org/ticket/27330), Sage is able to + packages](/~https://github.com/sagemath/sage/issues/27330), Sage is able to detect whether an installed system package is suitable for use with Sage; in that case, Sage will not build another copy from source. diff --git a/VERSION.txt b/VERSION.txt index ec675a255a2..8b731a891fa 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -SageMath version 10.0.beta0, Release Date: 2023-02-12 +SageMath version 10.0.beta1, Release Date: 2023-02-19 diff --git a/bootstrap b/bootstrap index 75bd9c78b9d..48c4801d4b5 100755 --- a/bootstrap +++ b/bootstrap @@ -47,17 +47,17 @@ AS_VAR_SET_IF([SAGE_ENABLE_$pkgname], [], [AS_VAR_SET([SAGE_ENABLE_$pkgname], [y done # --enable-SPKG options for pkgname in $(sage-package list :optional: :experimental: | sort); do - # Trac #29629: Temporary solution for Sage 9.1: Do not provide + # Issue #29629: Temporary solution for Sage 9.1: Do not provide # --enable-SPKG options for installing pip packages if [ ! -f build/pkgs/$pkgname/requirements.txt ]; then pkgtype="$(cat build/pkgs/$pkgname/type)" - # Trac #29124: Do not provide --enable-_recommended and similar + # Issue #29124: Do not provide --enable-_recommended and similar case "$pkgname" in _*) ;; *) spkg_configures="$spkg_configures AC_SUBST(SAGE_ENABLE_$pkgname, [if_installed])" if [ -f build/pkgs/$pkgname/spkg-install -o -f build/pkgs/$pkgname/spkg-install.in ]; then - # Trac #31163: Not just an optional dummy package + # Issue #31163: Not just an optional dummy package spkg_configures="$spkg_configures SAGE_SPKG_ENABLE([$pkgname], [$pkgtype], [$(grep -v ^= build/pkgs/$pkgname/SPKG.rst | head -n1 2>/dev/null || echo $pkgname)])" fi diff --git a/build/bin/sage-bootstrap-python b/build/bin/sage-bootstrap-python index db4cea35dfd..1fa3ea565b1 100755 --- a/build/bin/sage-bootstrap-python +++ b/build/bin/sage-bootstrap-python @@ -30,7 +30,7 @@ SAGE_ORIG_PATH=${NEW_PATH%%':'} # Also, Trac #20023 removed the vendored argparse library from sage_bootstrap, # so we test that python is new enough (>= 2.7) to run it. # -# See https://trac.sagemath.org/ticket/29090 +# See /~https://github.com/sagemath/sage/issues/29090 # Trac #29890: Our first choice is "python", not "python3". This is to avoid # a defect of sage_bootstrap on macOS regarding SSL URLs. diff --git a/build/bin/sage-build-num-threads b/build/bin/sage-build-num-threads index 5dbdc5d5029..1ba165b1a21 100755 --- a/build/bin/sage-build-num-threads +++ b/build/bin/sage-build-num-threads @@ -10,7 +10,7 @@ # 3) The number of CPU cores in the system, as determined by # multiprocessing.cpu_count() # -# AUTHOR: Jeroen Demeyer (2011-12-08): Trac ticket #12016 +# AUTHOR: Jeroen Demeyer (2011-12-08): Github issue #12016 # from __future__ import print_function diff --git a/build/bin/sage-dist-helpers b/build/bin/sage-dist-helpers index 24769ebfffc..4eac9626ffa 100644 --- a/build/bin/sage-dist-helpers +++ b/build/bin/sage-dist-helpers @@ -98,7 +98,7 @@ # (Linux only--no-op on other platforms.) Check shared libraries loaded by # EXECUTABLE (may be a program or another library) for a library starting # with SONAME, and if found appends SONAME to the LD_PRELOAD environment -# variable. See https://trac.sagemath.org/24885. +# variable. See /~https://github.com/sagemath/sage/issues/24885. set -o allexport @@ -166,7 +166,7 @@ sdh_configure() { echo "Configuring $PKG_NAME" # Run all configure scripts with bash to work around bugs with # non-portable scripts. - # See https://trac.sagemath.org/ticket/24491 + # See /~https://github.com/sagemath/sage/issues/24491 if [ -z "$CONFIG_SHELL" ]; then export CONFIG_SHELL=`command -v bash` fi @@ -290,7 +290,7 @@ sdh_pip_install() { sdh_pip_editable_install() { echo "Installing $PKG_NAME (editable mode)" - # Until https://trac.sagemath.org/ticket/34209 switches us to PEP 660 editable wheels + # Until /~https://github.com/sagemath/sage/issues/34209 switches us to PEP 660 editable wheels export SETUPTOOLS_ENABLE_FEATURES=legacy-editable python3 -m pip install --verbose --no-deps --no-index --no-build-isolation --isolated --editable "$@" || \ sdh_die "Error installing $PKG_NAME" diff --git a/build/bin/sage-flock b/build/bin/sage-flock index d10eaf55091..9611cfde80b 100755 --- a/build/bin/sage-flock +++ b/build/bin/sage-flock @@ -11,7 +11,7 @@ # This is originally motivated by pip, but has since been generalized. We # should avoid running pip while uninstalling a package because that is prone # to race conditions. This script can be used to run pip under a lock. For -# details, see https://trac.sagemath.org/ticket/21672 +# details, see /~https://github.com/sagemath/sage/issues/21672 try: import sage_bootstrap diff --git a/build/bin/sage-site b/build/bin/sage-site index f9d13d53047..f36eb4d415d 100755 --- a/build/bin/sage-site +++ b/build/bin/sage-site @@ -184,7 +184,7 @@ if [ "$1" = '-i' ]; then for PKG in $PACKAGES; do echo # Check that $PKG is actually a Makefile target - # See https://trac.sagemath.org/ticket/25078 + # See /~https://github.com/sagemath/sage/issues/25078 if ! echo "$ALL_TARGETS" | grep "^${PKG}$" >/dev/null; then echo >&2 "Error: package '$PKG' not found" echo >&2 "Note: if it is an old-style package, installing these is no longer supported" diff --git a/build/bin/sage-spkg b/build/bin/sage-spkg index 53835babf27..9b38ed6afc7 100755 --- a/build/bin/sage-spkg +++ b/build/bin/sage-spkg @@ -686,7 +686,7 @@ echo "Copying package files from temporary location $SAGE_DESTDIR to $SAGE_INST_ if [ -d "$SAGE_DESTDIR" ]; then # Some `find` implementations will put superfluous slashes in the # output if we give them a directory name with a slash; so make sure - # any trailing slash is removed; https://trac.sagemath.org/ticket/26013 + # any trailing slash is removed; /~https://github.com/sagemath/sage/issues/26013 PREFIX="${SAGE_DESTDIR_LOCAL%/}" rm -f "$PREFIX"/lib/*.la diff --git a/build/bin/sage-spkg-info b/build/bin/sage-spkg-info index ffc864320ed..4e53139fa7e 100755 --- a/build/bin/sage-spkg-info +++ b/build/bin/sage-spkg-info @@ -116,10 +116,10 @@ else echo "However, these system packages will not be used for building Sage" if [ -f "$PKG_SCRIPTS"/install-requires.txt ]; then echo "because using Python site-packages is not supported by the Sage distribution;" - echo "see https://trac.sagemath.org/ticket/29023" + echo "see /~https://github.com/sagemath/sage/issues/29023" else echo "because spkg-configure.m4 has not been written for this package;" - echo "see https://trac.sagemath.org/ticket/27330" + echo "see /~https://github.com/sagemath/sage/issues/27330" fi fi fi diff --git a/build/bin/sage-venv b/build/bin/sage-venv index 9ee9fc794be..c2728ba1143 100755 --- a/build/bin/sage-venv +++ b/build/bin/sage-venv @@ -38,7 +38,7 @@ if options.upgrade and options.clear: raise ValueError('you cannot supply --upgrade and --clear together.') if sys.platform == 'cygwin': - # default for Cygwin; see https://trac.sagemath.org/ticket/30149 + # default for Cygwin; see /~https://github.com/sagemath/sage/issues/30149 use_symlinks = False else: # default for posix diff --git a/build/make/Makefile.in b/build/make/Makefile.in index e971def2416..84f6f877e3d 100644 --- a/build/make/Makefile.in +++ b/build/make/Makefile.in @@ -78,7 +78,7 @@ DUMMY_PACKAGES = @SAGE_DUMMY_PACKAGES@ # Set to the path to Sage's GCC (if GCC is installed) to force rebuilds # of packages if GCC changed. -# See m4/sage_spkg_collect.m4 and https://trac.sagemath.org/ticket/24703 +# See m4/sage_spkg_collect.m4 and /~https://github.com/sagemath/sage/issues/24703 GCC_DEP = @SAGE_GCC_DEP@ # Versions of all the packages, in the format diff --git a/build/pkgs/_prereq/distros/cygwin.txt b/build/pkgs/_prereq/distros/cygwin.txt index 115d2555745..2bf3164005b 100644 --- a/build/pkgs/_prereq/distros/cygwin.txt +++ b/build/pkgs/_prereq/distros/cygwin.txt @@ -12,14 +12,14 @@ binutils make m4 -# a system python is needed for downloading the sage packages, https://trac.sagemath.org/ticket/29090 +# a system python is needed for downloading the sage packages, /~https://github.com/sagemath/sage/issues/29090 python39-urllib3 python39 perl perl-ExtUtils-MakeMaker tar gcc-core gcc-g++ -# Needed according to embray at https://trac.sagemath.org/ticket/26964: +# Needed according to embray at /~https://github.com/sagemath/sage/issues/26964: # The need for which comes [...] from MPIR's configure script findutils which diff --git a/build/pkgs/_prereq/distros/fedora.txt b/build/pkgs/_prereq/distros/fedora.txt index a82e29abc30..79919eef51b 100644 --- a/build/pkgs/_prereq/distros/fedora.txt +++ b/build/pkgs/_prereq/distros/fedora.txt @@ -15,7 +15,7 @@ binutils make m4 -# a system python is needed for downloading the sage packages, https://trac.sagemath.org/ticket/29090 +# a system python is needed for downloading the sage packages, /~https://github.com/sagemath/sage/issues/29090 python3 perl perl-ExtUtils-MakeMaker @@ -26,11 +26,11 @@ gcc # configure: error: in `/sage': # configure: error: C++ preprocessor "/lib/cpp" fails sanity check gcc-c++ -# Needed according to embray at https://trac.sagemath.org/ticket/26964: +# Needed according to embray at /~https://github.com/sagemath/sage/issues/26964: # The need for which comes [...] from MPIR's configure script findutils which -# Needed for pcre configure, see https://trac.sagemath.org/ticket/29129: +# Needed for pcre configure, see /~https://github.com/sagemath/sage/issues/29129: diffutils # Needed for openssl 3.0 perl-IPC-Cmd diff --git a/build/pkgs/cddlib/spkg-configure.m4 b/build/pkgs/cddlib/spkg-configure.m4 index 8508f28512d..b18cd879b00 100644 --- a/build/pkgs/cddlib/spkg-configure.m4 +++ b/build/pkgs/cddlib/spkg-configure.m4 @@ -16,7 +16,7 @@ SAGE_SPKG_CONFIGURE([cddlib], [ AC_CHECK_PROGS(SCDD, [scdd_gmp scdd]) AS_IF([test x$SCDD = x], [sage_spkg_install_cddlib=yes]) - dnl https://trac.sagemath.org/ticket/30319 + dnl /~https://github.com/sagemath/sage/issues/30319 AS_IF([test -n "$CDDEXEC"], [ AC_MSG_CHECKING([whether $CDDEXEC --redcheck works correctly for real input]) cat > conftest.ine <&2 "Warning: Disabling debug symbols on MacOS X 10.5" \ "PowerPC because of a linker (?) bug." - echo >&2 "See http://trac.sagemath.org/sage_trac/ticket/5847#comment:35" \ + echo >&2 "See /~https://github.com/sagemath/sage/issues/5847#comment:35" \ "ff. for details." echo >&2 CFLAGS="-O3 $ORIGINAL_CFLAGS" diff --git a/build/pkgs/elliptic_curves/spkg-install.py b/build/pkgs/elliptic_curves/spkg-install.py index 79b6c423446..c6e9bbcffa9 100644 --- a/build/pkgs/elliptic_curves/spkg-install.py +++ b/build/pkgs/elliptic_curves/spkg-install.py @@ -60,7 +60,7 @@ def install_ellcurves(): ellcurves_root = os.path.join(SAGE_SHARE, 'ellcurves') # Remove previous installs (possibly with bad permissions, see - # https://trac.sagemath.org/ticket/21641) + # /~https://github.com/sagemath/sage/issues/21641) import shutil try: shutil.rmtree(ellcurves_root) diff --git a/build/pkgs/fflas_ffpack/spkg-install.in b/build/pkgs/fflas_ffpack/spkg-install.in index 55684dd8a5f..b9dd851875f 100644 --- a/build/pkgs/fflas_ffpack/spkg-install.in +++ b/build/pkgs/fflas_ffpack/spkg-install.in @@ -24,13 +24,13 @@ if [ "$SAGE_FAT_BINARY" = yes ]; then fi # Need to use 'bash' for configure, see -# https://trac.sagemath.org/ticket/23451 +# /~https://github.com/sagemath/sage/issues/23451 if [ -z "$CONFIG_SHELL" ]; then export CONFIG_SHELL=`command -v bash` fi # We disable openmp because of build failures, see -# http://trac.sagemath.org/ticket/17635#comment:67 +# /~https://github.com/sagemath/sage/issues/17635#comment:67 sdh_configure --with-default="$SAGE_LOCAL" --with-blas-libs="$LINBOX_BLAS" \ "$LINBOX_BLAS_CFLAGS" --disable-static \ --enable-precompilation $FFLAS_FFPACK_CONFIGURE diff --git a/build/pkgs/gap/spkg-install.in b/build/pkgs/gap/spkg-install.in index 2ceadf99db4..30320027274 100644 --- a/build/pkgs/gap/spkg-install.in +++ b/build/pkgs/gap/spkg-install.in @@ -53,7 +53,7 @@ sdh_install pkg/GAPDoc-* pkg/primgrp-* pkg/SmallGrp-* pkg/transgrp "$GAP_ROOT"/p # typically "expected" to be loaded: These are the default packages that are # autoloaded at GAP startup (via the PackagesToLoad UserPreference) with an # out-of-the-box GAP installation; see -# https://trac.sagemath.org/ticket/22626#comment:393 for discussion on this +# /~https://github.com/sagemath/sage/issues/22626#comment:393 for discussion on this # # Also include atlasrep which is a dependency of tomlib sdh_install \ @@ -96,7 +96,7 @@ done # be going away. This breaks the build toolchain for some compiled GAP # packages. We need to replace these paths with the final GAP_ROOT path. The # below will work so long as neither of these paths contain '|', and if they do -# then god help you. https://trac.sagemath.org/ticket/27218 +# then god help you. /~https://github.com/sagemath/sage/issues/27218 sed -i -e "s|$GAP_BUILD_ROOT|$GAP_ROOT|g" \ "$SAGE_DESTDIR$SAGE_BIN/gac" "$DESTDIR_GAP_ROOT/sysinfo.gap" \ "$DESTDIR_GAP_ROOT/bin/gap.sh" "$DESTDIR_GAP_ROOT/doc/make_doc" || \ diff --git a/build/pkgs/gc/spkg-install.in b/build/pkgs/gc/spkg-install.in index e5d254c86fe..4acf5cf8b19 100644 --- a/build/pkgs/gc/spkg-install.in +++ b/build/pkgs/gc/spkg-install.in @@ -3,9 +3,9 @@ cd src GC_CONFIGURE="--enable-large-config" if [ "$UNAME" = "CYGWIN" ]; then - # See https://trac.sagemath.org/ticket/22694 + # See /~https://github.com/sagemath/sage/issues/22694 GC_CONFIGURE="$GC_CONFIGURE --enable-threads=posix --enable-handle-fork --enable-shared --disable-static" - # Force use of mmap on Cygwin https://trac.sagemath.org/ticket/23973 + # Force use of mmap on Cygwin /~https://github.com/sagemath/sage/issues/23973 export CFLAGS="$CFLAGS -DUSE_MMAP -DUSE_MUNMAP" fi diff --git a/build/pkgs/gcc/dependencies b/build/pkgs/gcc/dependencies index 9af2c9534bb..34a0cdf783d 100644 --- a/build/pkgs/gcc/dependencies +++ b/build/pkgs/gcc/dependencies @@ -5,5 +5,5 @@ NOTE: all dependencies of GCC must be order-only dependencies (appearing after the | symbol). This is to prevent rebuilds of GCC even if the dependencies are updated. There is logic in the top-level configure file to ensure that GCC is rebuilt anyway if required. See -https://trac.sagemath.org/ticket/24907 +/~https://github.com/sagemath/sage/issues/24907 ------------------------------------------------------------------------ diff --git a/build/pkgs/gcc/spkg-configure.m4 b/build/pkgs/gcc/spkg-configure.m4 index 63335eb7357..fe4d220a189 100644 --- a/build/pkgs/gcc/spkg-configure.m4 +++ b/build/pkgs/gcc/spkg-configure.m4 @@ -78,7 +78,7 @@ SAGE_SPKG_CONFIGURE_BASE([gcc], [ SAGE_MUST_INSTALL_GCC([gcc is already installed in SAGE_LOCAL]) # Check whether it actually works... - # See https://trac.sagemath.org/ticket/24599 + # See /~https://github.com/sagemath/sage/issues/24599 SAGE_CHECK_BROKEN_GCC() if test x$SAGE_BROKEN_GCC = xyes; then # Prentend that GCC is not installed. @@ -167,7 +167,7 @@ SAGE_SPKG_CONFIGURE_BASE([gcc], [ ], [1[[3-9]].*], [ # Install our own GCC if the system-provided one is newer than 12.x. - # See https://trac.sagemath.org/ticket/29456 + # See /~https://github.com/sagemath/sage/issues/29456 SAGE_SHOULD_INSTALL_GCC([$CXX is g++ version $GXX_VERSION, which is too recent for this version of Sage]) ]) fi @@ -181,7 +181,7 @@ SAGE_SPKG_CONFIGURE_BASE([gcc], [ fi # Check that the assembler and linker used by $CXX match $AS and $LD. - # See http://trac.sagemath.org/sage_trac/ticket/14296 + # See /~https://github.com/sagemath/sage/issues/14296 if test -n "$AS"; then CXX_as=`$CXX -print-prog-name=as 2>/dev/null` CXX_as=`command -v $CXX_as 2>/dev/null` diff --git a/build/pkgs/gdb/distros/conda.txt b/build/pkgs/gdb/distros/conda.txt index 5d13af10681..b7a56f9afb3 100644 --- a/build/pkgs/gdb/distros/conda.txt +++ b/build/pkgs/gdb/distros/conda.txt @@ -1,2 +1,2 @@ -# Disabled for now because of https://trac.sagemath.org/ticket/30845#comment:269 +# Disabled for now because of /~https://github.com/sagemath/sage/issues/30845#comment:269 # gdb diff --git a/build/pkgs/gfan/patches/fix-int64-for-32bit-archs.patch b/build/pkgs/gfan/patches/fix-int64-for-32bit-archs.patch index 0d1baf45cec..773b71d08c0 100644 --- a/build/pkgs/gfan/patches/fix-int64-for-32bit-archs.patch +++ b/build/pkgs/gfan/patches/fix-int64-for-32bit-archs.patch @@ -3,7 +3,7 @@ On 32-bit architectures, longs are only 32 bits. The resulting overflow was causing an infinite loop in the 0602ResultantFanProjection test. References: -https://trac.sagemath.org/ticket/32088 +/~https://github.com/sagemath/sage/issues/32088 https://salsa.debian.org/math-team/gfan/-/commit/acaaa70 /~https://github.com/void-linux/void-packages/pull/34182 diff --git a/build/pkgs/gfan/spkg-install.in b/build/pkgs/gfan/spkg-install.in index f3224735e4f..5c31e18ec54 100644 --- a/build/pkgs/gfan/spkg-install.in +++ b/build/pkgs/gfan/spkg-install.in @@ -8,7 +8,7 @@ cd src find src -type f -print0 | xargs -0 sed -i.bak "s/log2/logger2/g" # To let testsuite/0009RenderStairCase pass on 32bit machines -# See https://trac.sagemath.org/ticket/32088 +# See /~https://github.com/sagemath/sage/issues/32088 case "$($CC -dumpmachine)" in i[3456]86*) CXXFLAGS+=" -ffloat-store" diff --git a/build/pkgs/gfortran/spkg-configure.m4 b/build/pkgs/gfortran/spkg-configure.m4 index db7c4e7bc14..1a2d6ba767c 100644 --- a/build/pkgs/gfortran/spkg-configure.m4 +++ b/build/pkgs/gfortran/spkg-configure.m4 @@ -88,7 +88,7 @@ SAGE_SPKG_CONFIGURE([gfortran], [ ], [1[[3-9]].*], [ # Install our own gfortran if the system-provided one is newer than 12.x. - # See https://trac.sagemath.org/ticket/29456, https://trac.sagemath.org/ticket/31838 + # See /~https://github.com/sagemath/sage/issues/29456, /~https://github.com/sagemath/sage/issues/31838 SAGE_MUST_INSTALL_GFORTRAN([$FC is version $GFORTRAN_VERSION, which is too recent for this version of Sage]) ]) ]) diff --git a/build/pkgs/giac/patches/cygwin-icas.patch b/build/pkgs/giac/patches/cygwin-icas.patch index 88669806647..56321e78b26 100644 --- a/build/pkgs/giac/patches/cygwin-icas.patch +++ b/build/pkgs/giac/patches/cygwin-icas.patch @@ -1,6 +1,6 @@ Disable threaded eval function on Cygwin since it's currently buggy, and not strictly needed in the first place since we don't -build giac with FLTK support; see https://trac.sagemath.org/ticket/27385 +build giac with FLTK support; see /~https://github.com/sagemath/sage/issues/27385 --- a/src/icas.cc 2018-12-22 17:08:24.000000000 +0100 +++ b/src/icas.cc 2019-03-06 14:38:19.814030200 +0100 @@ -160,7 +160,7 @@ diff --git a/build/pkgs/giac/patches/isnan-conflict.patch b/build/pkgs/giac/patches/isnan-conflict.patch index 88ca5f715a6..20af63aa806 100644 --- a/build/pkgs/giac/patches/isnan-conflict.patch +++ b/build/pkgs/giac/patches/isnan-conflict.patch @@ -1,7 +1,7 @@ Just always use std::isnan and std::isinf so there is no risk of conflicting with the libc math.h equivalents thereof. -See https://trac.sagemath.org/ticket/27263 +See /~https://github.com/sagemath/sage/issues/27263 --- a/src/global.cc 2019-02-12 15:49:03.082594000 +0000 +++ b/src/global.cc 2019-02-12 15:49:43.438594000 +0000 @@ -4139,11 +4139,7 @@ diff --git a/build/pkgs/giac/patches/pari_2_11.patch b/build/pkgs/giac/patches/pari_2_11.patch index 24142257a34..27de3f12fac 100644 --- a/build/pkgs/giac/patches/pari_2_11.patch +++ b/build/pkgs/giac/patches/pari_2_11.patch @@ -1,6 +1,6 @@ Change test output for PARI 2.11 -See https://trac.sagemath.org/ticket/25567 +See /~https://github.com/sagemath/sage/issues/25567 and https://xcas.univ-grenoble-alpes.fr/forum/viewtopic.php?f=4&t=2102 diff -ru a/check/TP11-sol.cas.out1 b/check/TP11-sol.cas.out1 diff --git a/build/pkgs/glpk/patches/error_recovery.patch b/build/pkgs/glpk/patches/error_recovery.patch index f040f4b4a19..a383e25769b 100644 --- a/build/pkgs/glpk/patches/error_recovery.patch +++ b/build/pkgs/glpk/patches/error_recovery.patch @@ -1,6 +1,6 @@ From: Jeroen Demeyer Allow error recovery. See discussion at -http://trac.sagemath.org/ticket/20710#comment:18 +/~https://github.com/sagemath/sage/issues/20710#comment:18 diff --git a/src/env/error.c b/src/env/error.c index a898b76..154de0f 100644 diff --git a/build/pkgs/glpk/spkg-install.in b/build/pkgs/glpk/spkg-install.in index cdb4b4a168e..a911c46f024 100644 --- a/build/pkgs/glpk/spkg-install.in +++ b/build/pkgs/glpk/spkg-install.in @@ -1,6 +1,6 @@ cd src/ -# Use newer version of config.guess and config.sub (see Trac #19713) +# Use newer version of config.guess and config.sub (see Github issue #19713) cp "$SAGE_ROOT"/config/config.* . # Note: The following doesn't work with spaces in `$SAGE_LOCAL`, but we don't @@ -26,7 +26,7 @@ sdh_configure --with-gmp --disable-static sdh_make # Remove old libraries to make sure we can downgrade it if needed. -# See https://trac.sagemath.org/ticket/23596#comment:4 and later. +# See /~https://github.com/sagemath/sage/issues/23596#comment:4 and later. rm -f "$SAGE_LOCAL"/lib/libglpk.* sdh_make_install diff --git a/build/pkgs/glucose/spkg-install.in b/build/pkgs/glucose/spkg-install.in index 8dabc6458fb..f99cca1ae18 100644 --- a/build/pkgs/glucose/spkg-install.in +++ b/build/pkgs/glucose/spkg-install.in @@ -8,7 +8,7 @@ sdh_make sdh_install glucose ${SAGE_LOCAL}/bin/ cd .. -# Possible license issue, see warning below and discussion on https://trac.sagemath.org/ticket/26361 +# Possible license issue, see warning below and discussion on /~https://github.com/sagemath/sage/issues/26361 cd parallel sdh_make sdh_install glucose-syrup ${SAGE_LOCAL}/bin/ diff --git a/build/pkgs/iconv/spkg-check.in b/build/pkgs/iconv/spkg-check.in index 4ae5a6c622d..c0e91eff164 100644 --- a/build/pkgs/iconv/spkg-check.in +++ b/build/pkgs/iconv/spkg-check.in @@ -7,7 +7,7 @@ SunOS) # We must test iconv, but on Solaris some tests will always fail. echo "If you see 3 core dumps, don't be too alarmed." echo "This is a known Solaris bug and can safely be ignored. See" - echo " http://trac.sagemath.org/sage_trac/ticket/8270" + echo " /~https://github.com/sagemath/sage/issues/8270" echo "It will probably be fixed in later releases of Solaris 10," echo "and was fixed in build 66 of OpenSolaris:" echo " http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6550204" diff --git a/build/pkgs/iconv/spkg-install.in b/build/pkgs/iconv/spkg-install.in index 9dc19c7bdab..89b401c70e9 100644 --- a/build/pkgs/iconv/spkg-install.in +++ b/build/pkgs/iconv/spkg-install.in @@ -1,6 +1,6 @@ # Only build iconv on Solaris, HP-UX and Cygwin. See -# http://trac.sagemath.org/sage_trac/ticket/8567 and -# http://trac.sagemath.org/sage_trac/ticket/9603 +# /~https://github.com/sagemath/sage/issues/8567 and +# /~https://github.com/sagemath/sage/issues/9603 # for details. case "$UNAME" in @@ -8,8 +8,8 @@ CYGWIN|HP-UX|SunOS) echo "iconv will be installed as the operating system is Cygwin, HP-UX or Solaris." echo "These systems either lack iconv, or do not have a sufficiently capable" echo "version of iconv. See:" - echo " http://trac.sagemath.org/sage_trac/ticket/8567" - echo " http://trac.sagemath.org/sage_trac/ticket/9603" + echo " /~https://github.com/sagemath/sage/issues/8567" + echo " /~https://github.com/sagemath/sage/issues/9603" # Disable NLS on Cygwin to be able to build libiconv without the Cygwin # libiconv package. @@ -29,8 +29,8 @@ CYGWIN|HP-UX|SunOS) echo "Solaris, HP-UX and Cygwin, as the system's iconv will be used" echo "on other platforms, rather than the one shipped with Sage." echo "See:" - echo " http://trac.sagemath.org/sage_trac/ticket/8567" - echo " http://trac.sagemath.org/sage_trac/ticket/9603" + echo " /~https://github.com/sagemath/sage/issues/8567" + echo " /~https://github.com/sagemath/sage/issues/9603" exit 0 esac diff --git a/build/pkgs/jupyterlab/requirements.txt b/build/pkgs/jupyterlab/requirements.txt index 802d33d22f1..f03a26674fd 100644 --- a/build/pkgs/jupyterlab/requirements.txt +++ b/build/pkgs/jupyterlab/requirements.txt @@ -1,3 +1,3 @@ jupyterlab ~= 3.3 -# See https://trac.sagemath.org/ticket/33607 +# See /~https://github.com/sagemath/sage/issues/33607 jupyterlab-server < 2.11 diff --git a/build/pkgs/libgd/spkg-install.in b/build/pkgs/libgd/spkg-install.in index dc73d868fa5..d291869a923 100644 --- a/build/pkgs/libgd/spkg-install.in +++ b/build/pkgs/libgd/spkg-install.in @@ -6,7 +6,7 @@ if [ "$UNAME" = "CYGWIN" ]; then # Compiling with vpx support creates a broken library in some cases # because the vpx package itself is broken on some older Cygwin versions; # we don't need this feature so safer to just disable - # https://trac.sagemath.org/ticket/27970 + # /~https://github.com/sagemath/sage/issues/27970 LIBGD_CONFIGURE="--without-vpx $LIBGD_CONFIGURE" fi if [ -n "$SAGE_FREETYPE_PREFIX" ]; then diff --git a/build/pkgs/linbox/spkg-install.in b/build/pkgs/linbox/spkg-install.in index a2ad194837a..8d415e81fd8 100644 --- a/build/pkgs/linbox/spkg-install.in +++ b/build/pkgs/linbox/spkg-install.in @@ -20,13 +20,13 @@ fi # Disable fplll as version 5.x is not supported by linbox <= 1.5.0. # This is harmless as no functionality using fplll is exposed in Sage. -# See trac ticket #21221. +# See github issue #21221. LINBOX_CONFIGURE="--without-fplll $LINBOX_CONFIGURE" # We disable openmp because of build failures, see -# http://trac.sagemath.org/ticket/17635#comment:67 +# /~https://github.com/sagemath/sage/issues/17635#comment:67 # We disable ocl because of build failures, see -# https://trac.sagemath.org/ticket/32076 +# /~https://github.com/sagemath/sage/issues/32076 sdh_configure --with-default="$SAGE_LOCAL" \ --disable-static --disable-openmp --without-ocl \ $LINBOX_CONFIGURE diff --git a/build/pkgs/matplotlib/make-setup-config.py b/build/pkgs/matplotlib/make-setup-config.py index 4f9acf1f04c..61f61806810 100644 --- a/build/pkgs/matplotlib/make-setup-config.py +++ b/build/pkgs/matplotlib/make-setup-config.py @@ -11,7 +11,7 @@ config.set('libs', 'system_qhull', 'True') # lto is problematic if we mix libraries from the OS with our own libraries, # which are not necessarily compiled with the same gcc version -# https://trac.sagemath.org/ticket/27754 +# /~https://github.com/sagemath/sage/issues/27754 config.set('libs', 'enable_lto', 'False') ##################################################################### diff --git a/build/pkgs/maxima/spkg-install.in b/build/pkgs/maxima/spkg-install.in index 3516e1b3146..3ae6382f9ba 100644 --- a/build/pkgs/maxima/spkg-install.in +++ b/build/pkgs/maxima/spkg-install.in @@ -1,6 +1,6 @@ # Sometimes, ECL gives interactive prompts when something goes wrong # during the build. Avoid this by redirecting stdin from /dev/null. -# See http://trac.sagemath.org/sage_trac/ticket/11884#comment:34 +# See /~https://github.com/sagemath/sage/issues/11884#comment:34 exec Date: Tue, 6 Mar 2018 00:18:41 +0100 Don't rely on pandoc for the readme -See https://trac.sagemath.org/ticket/24901 +See /~https://github.com/sagemath/sage/issues/24901 and /~https://github.com/aaren/notedown/issues/76 diff --git a/setup.py b/setup.py diff --git a/build/pkgs/numpy/spkg-install.in b/build/pkgs/numpy/spkg-install.in index 2b555d8b871..e28660f393f 100644 --- a/build/pkgs/numpy/spkg-install.in +++ b/build/pkgs/numpy/spkg-install.in @@ -7,7 +7,7 @@ if [ `uname` = "Darwin" ]; then unset ATLAS unset BLAS unset LAPACK - # https://trac.sagemath.org/ticket/34110#comment:35 + # /~https://github.com/sagemath/sage/issues/34110#comment:35 # The fix for "reciprocal" (affected by a clang compiler bug) in # /~https://github.com/numpy/numpy/pull/19926 relies on -ftrapping-math # being used when Apple clang v12+ is used. diff --git a/build/pkgs/openblas/spkg-install.in b/build/pkgs/openblas/spkg-install.in index f6ac7753838..00413ca517d 100644 --- a/build/pkgs/openblas/spkg-install.in +++ b/build/pkgs/openblas/spkg-install.in @@ -34,7 +34,7 @@ fi echo "Building OpenBLAS: $MAKE $OPENBLAS_CONFIGURE" -# Ensure USE_TLS=1 ; see https://trac.sagemath.org/ticket/27256 +# Ensure USE_TLS=1 ; see /~https://github.com/sagemath/sage/issues/27256 OPENBLAS_CONFIGURE="$OPENBLAS_CONFIGURE USE_TLS=1" if ! (sdh_make libs netlib shared $OPENBLAS_CONFIGURE); then @@ -51,7 +51,7 @@ if ! (sdh_make libs netlib shared $OPENBLAS_CONFIGURE); then fi fi -# See https://trac.sagemath.org/ticket/30335 +# See /~https://github.com/sagemath/sage/issues/30335 rm -f "$SAGE_LOCAL/lib/pkgconfig/cblas.pc" "$SAGE_LOCAL/lib/pkgconfig/blas.pc" "$SAGE_LOCAL/lib/pkgconfig/lapack.pc" sdh_make_install PREFIX="$SAGE_LOCAL" NO_STATIC=1 $OPENBLAS_CONFIGURE diff --git a/build/pkgs/pcre/patches/8.39-cygwin-jit.patch b/build/pkgs/pcre/patches/8.39-cygwin-jit.patch index e581623b0c5..ca1ea43c435 100644 --- a/build/pkgs/pcre/patches/8.39-cygwin-jit.patch +++ b/build/pkgs/pcre/patches/8.39-cygwin-jit.patch @@ -1,5 +1,5 @@ Patch from Cygwin to fix segfault when using the JIT compiler; see -https://trac.sagemath.org/ticket/23291 +/~https://github.com/sagemath/sage/issues/23291 --- a/sljit/sljitConfigInternal.h 2016-04-06 03:05:43.000000000 -0500 +++ b/sljit/sljitConfigInternal.h 2016-08-11 14:33:58.201820000 -0500 @@ -564,7 +564,7 @@ SLJIT_API_FUNC_ATTRIBUTE void sljit_free diff --git a/build/pkgs/pcre/spkg-install.in b/build/pkgs/pcre/spkg-install.in index 892e1aa84f7..fb0c49272fe 100644 --- a/build/pkgs/pcre/spkg-install.in +++ b/build/pkgs/pcre/spkg-install.in @@ -8,7 +8,7 @@ sdh_make # The JIT feature of pcre is known to be broken on some systems, in # particular on Solaris. We run the testsuite of pcre (this takes only # a few seconds). It the testsuite fails, we rebuild pcre without JIT -# support. See https://trac.sagemath.org/ticket/24628 +# support. See /~https://github.com/sagemath/sage/issues/24628 if ! $MAKE check; then echo >&2 "*** Rebuilding pcre without JIT support ***" $MAKE clean diff --git a/build/pkgs/ppl/patches/cygwin-weak-symbols.patch b/build/pkgs/ppl/patches/cygwin-weak-symbols.patch index 81215ea432c..535a009f82d 100644 --- a/build/pkgs/ppl/patches/cygwin-weak-symbols.patch +++ b/build/pkgs/ppl/patches/cygwin-weak-symbols.patch @@ -1,6 +1,6 @@ weak symbols don't work properly in 64-bit Cygwin and should not be used (even though it will compile with __attribute__((weak)), -it will not linke; see https://trac.sagemath.org/ticket/16152 +it will not linke; see /~https://github.com/sagemath/sage/issues/16152 --- a/src/assertions.hh 2016-07-26 16:21:22.591434100 +0200 +++ b/src/assertions.hh 2016-07-26 16:35:09.500888200 +0200 @@ -98,7 +98,7 @@ diff --git a/build/pkgs/ppl/spkg-install.in b/build/pkgs/ppl/spkg-install.in index bc570b95cfc..1f3162a6269 100644 --- a/build/pkgs/ppl/spkg-install.in +++ b/build/pkgs/ppl/spkg-install.in @@ -19,7 +19,7 @@ fi # Workaround to disable PPL's "watchdog timer", preventing it from clobbering # Cysignals' SIGALRM handler on Cygwin; see -# https://trac.sagemath.org/ticket/21190 +# /~https://github.com/sagemath/sage/issues/21190 if [ "$UNAME" = "CYGWIN" ]; then sed -i 's/#define HAVE_DECL_SETITIMER 1/#define HAVE_DECL_SETITIMER 0/' config.h fi diff --git a/build/pkgs/prompt_toolkit/install-requires.txt b/build/pkgs/prompt_toolkit/install-requires.txt index fe90872577d..30d49fc8454 100644 --- a/build/pkgs/prompt_toolkit/install-requires.txt +++ b/build/pkgs/prompt_toolkit/install-requires.txt @@ -1,2 +1,2 @@ -# https://trac.sagemath.org/ticket/33428 - prompt_toolkit 3.0.25+ breaks Ctrl-C +# /~https://github.com/sagemath/sage/issues/33428 - prompt_toolkit 3.0.25+ breaks Ctrl-C prompt_toolkit >=3.0.5, <3.0.25 diff --git a/build/pkgs/ptyprocess/install-requires.txt b/build/pkgs/ptyprocess/install-requires.txt index de89260872b..a89be777b4a 100644 --- a/build/pkgs/ptyprocess/install-requires.txt +++ b/build/pkgs/ptyprocess/install-requires.txt @@ -1,3 +1,3 @@ ptyprocess ==0.5.1 -# https://trac.sagemath.org/ticket/31280#comment:42 and following +# /~https://github.com/sagemath/sage/issues/31280#comment:42 and following # sagelib is not compatible with ptyprocess 0.5.2, 0.6, and 0.7 diff --git a/build/pkgs/python3/spkg-build.in b/build/pkgs/python3/spkg-build.in index 3cb837b3be6..0c08814a242 100644 --- a/build/pkgs/python3/spkg-build.in +++ b/build/pkgs/python3/spkg-build.in @@ -52,7 +52,7 @@ elif [ "$UNAME" = SunOS ]; then # Enable some C99 features on Solaris. This in particular enables # the isinf() and isfinite() functions. It works both for C and # C++ code (which is not true for -std=c99). See - # http://trac.sagemath.org/sage_trac/ticket/14265 + # /~https://github.com/sagemath/sage/issues/14265 export CFLAGS="-D__C99FEATURES__ $CFLAGS" fi @@ -69,14 +69,14 @@ rm -f "$SAGE_LOCAL/lib/python" # Remove old libraries. We really need to do this before building Python # since Python tries to import some modules (e.g. ctypes) at build-time. # We need to make sure that the old installed libraries in local/lib are -# not used for that. See https://trac.sagemath.org/ticket/24605 +# not used for that. See /~https://github.com/sagemath/sage/issues/24605 rm -f "$SAGE_LOCAL"/lib/lib"$PKG_BASE"* # Note: --without-ensurepip ensures that setuptools+pip are *not* installed # automatically when installing python3. They will be installed instead by # the separate setuptools and pip packages; see - # https://trac.sagemath.org/ticket/23398 + # /~https://github.com/sagemath/sage/issues/23398 PYTHON_CONFIGURE="$PYTHON_CONFIGURE --without-ensurepip" sdh_configure --enable-shared $PYTHON_CONFIGURE diff --git a/build/pkgs/python3/spkg-configure.m4 b/build/pkgs/python3/spkg-configure.m4 index 19642b59dd9..d8ece39683a 100644 --- a/build/pkgs/python3/spkg-configure.m4 +++ b/build/pkgs/python3/spkg-configure.m4 @@ -33,7 +33,7 @@ SAGE_SPKG_CONFIGURE([python3], [ MIN_VERSION, LT_VERSION, $check_modules, [ AS_IF([[conftest_venv/bin/python3 -m sysconfig | grep '^\sw*\(C\|LD\)FLAGS *=.*[" ]-[IL] *[^.]' ]] [>& AS_MESSAGE_LOG_FD 2>&1 ], [ - AC_MSG_WARN([this is a misconfigured Python whose sysconfig compiler/linker flags contain -I or -L options, which may cause wrong versions of libraries to leak into the build of Python packages - see https://trac.sagemath.org/ticket/31132]) + AC_MSG_WARN([this is a misconfigured Python whose sysconfig compiler/linker flags contain -I or -L options, which may cause wrong versions of libraries to leak into the build of Python packages - see /~https://github.com/sagemath/sage/issues/31132]) ]) dnl It is good ac_cv_path_PYTHON3="$ac_path_PYTHON3" @@ -52,7 +52,7 @@ SAGE_SPKG_CONFIGURE([python3], [ MIN_VERSION, LT_VERSION, $check_modules, [ AS_IF([[conftest_venv/bin/python3 -m sysconfig | grep '^\sw*\(C\|LD\)FLAGS *=.*[" ]-[IL] *[^.]' ]] [>& AS_MESSAGE_LOG_FD 2>&1 ], [ - AC_MSG_RESULT([no, this is a misconfigured Python whose sysconfig compiler/linker flags contain -I or -L options, which may cause wrong versions of libraries to leak into the build of Python packages - see https://trac.sagemath.org/ticket/31132; to use it anyway, use ./configure --with-python=$ac_path_PYTHON3]) + AC_MSG_RESULT([no, this is a misconfigured Python whose sysconfig compiler/linker flags contain -I or -L options, which may cause wrong versions of libraries to leak into the build of Python packages - see /~https://github.com/sagemath/sage/issues/31132; to use it anyway, use ./configure --with-python=$ac_path_PYTHON3]) ], [ dnl It is good ac_cv_path_PYTHON3="$ac_path_PYTHON3" diff --git a/build/pkgs/python3/spkg-install.in b/build/pkgs/python3/spkg-install.in index 20c039cc81a..eae0f39647a 100644 --- a/build/pkgs/python3/spkg-install.in +++ b/build/pkgs/python3/spkg-install.in @@ -60,7 +60,7 @@ if [ "$UNAME" = "Darwin" ] && \ [ `uname -r | cut '-d.' -f1` -gt 9 ]; then rm -f "${SAGE_DESTDIR}${PYTHON_CONFIG_DIR}/libpython${PYTHON_LDVERSION}.a" elif [ "$UNAME" = "CYGWIN" ]; then - # See http://trac.sagemath.org/ticket/20437 + # See /~https://github.com/sagemath/sage/issues/20437 ln -sf "${PYTHON_CONFIG_DIR}/libpython${PYTHON_LDVERSION}.dll.a" \ "${SAGE_DESTDIR_LOCAL}/lib/libpython${PYTHON_LDVERSION}.dll.a" fi diff --git a/build/pkgs/qepcad/patches/0002-WIP-Don-t-add-lrt.patch b/build/pkgs/qepcad/patches/0002-WIP-Don-t-add-lrt.patch index 54282fbf8f0..08e2d8644df 100644 --- a/build/pkgs/qepcad/patches/0002-WIP-Don-t-add-lrt.patch +++ b/build/pkgs/qepcad/patches/0002-WIP-Don-t-add-lrt.patch @@ -18,7 +18,7 @@ index d184650..f13113b 100644 +LIBS = -lreadline + +# On macOS, librt is not available, -+# see https://trac.sagemath.org/ticket/28388 ++# see /~https://github.com/sagemath/sage/issues/28388 +#ifeq ($(findstring darwin,${OSTYPE}),) +#LIBS += -lrt +#endif diff --git a/build/pkgs/qepcad/spkg-install.in b/build/pkgs/qepcad/spkg-install.in index 11fbea86b16..4287c3e4f1a 100644 --- a/build/pkgs/qepcad/spkg-install.in +++ b/build/pkgs/qepcad/spkg-install.in @@ -5,11 +5,11 @@ export saclib="$SAGE_LOCAL/lib/saclib" export qe=$(pwd -P) # * Override SHELL: use /bin/sh instead of /bin/csh, see -# https://trac.sagemath.org/ticket/10224 +# /~https://github.com/sagemath/sage/issues/10224 # * Add rpath to compiler flags, see -# https://trac.sagemath.org/ticket/22653 +# /~https://github.com/sagemath/sage/issues/22653 # * Use ARFLAGS that also work on macOS, avoiding the U option, see -# https://trac.sagemath.org/ticket/28388 +# /~https://github.com/sagemath/sage/issues/28388 LIBS=-lreadline if [ "$UNAME" = "Linux" ]; then LIBS="$LIBS -lrt" diff --git a/build/pkgs/sage_conf/install-requires.txt b/build/pkgs/sage_conf/install-requires.txt index 819432d90ff..87a8f39f3f0 100644 --- a/build/pkgs/sage_conf/install-requires.txt +++ b/build/pkgs/sage_conf/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-conf ~= 10.0b0 +sage-conf ~= 10.0b1 diff --git a/build/pkgs/sage_docbuild/install-requires.txt b/build/pkgs/sage_docbuild/install-requires.txt index 73f499affef..dc1652133a1 100644 --- a/build/pkgs/sage_docbuild/install-requires.txt +++ b/build/pkgs/sage_docbuild/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-docbuild ~= 10.0b0 +sage-docbuild ~= 10.0b1 diff --git a/build/pkgs/sage_setup/install-requires.txt b/build/pkgs/sage_setup/install-requires.txt index 169a4c5d9cc..f418d8648ec 100644 --- a/build/pkgs/sage_setup/install-requires.txt +++ b/build/pkgs/sage_setup/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-setup ~= 10.0b0 +sage-setup ~= 10.0b1 diff --git a/build/pkgs/sage_sws2rst/install-requires.txt b/build/pkgs/sage_sws2rst/install-requires.txt index e2b85444aca..d62c0ef4662 100644 --- a/build/pkgs/sage_sws2rst/install-requires.txt +++ b/build/pkgs/sage_sws2rst/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sage-sws2rst ~= 10.0b0 +sage-sws2rst ~= 10.0b1 diff --git a/build/pkgs/sagelib/install-requires.txt b/build/pkgs/sagelib/install-requires.txt index 565dfde8395..c231384faae 100644 --- a/build/pkgs/sagelib/install-requires.txt +++ b/build/pkgs/sagelib/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagelib ~= 10.0b0 +sagelib ~= 10.0b1 diff --git a/build/pkgs/sagelib/spkg-install b/build/pkgs/sagelib/spkg-install index ad8b2ed43fc..ed6bb969f31 100755 --- a/build/pkgs/sagelib/spkg-install +++ b/build/pkgs/sagelib/spkg-install @@ -29,7 +29,7 @@ fi ## Building takes places in the build/ subdirectory. ## ## As a special exception, we feed SAGE_PKGS. -## They are needed by src/sage/misc/package.py. See meta-ticket #28815 for planned changes to this. +## They are needed by src/sage/misc/package.py. See github issue #28815 for planned changes to this. export SAGE_PKGS="$SAGE_ROOT"/build/pkgs export SAGE_ROOT=/doesnotexist diff --git a/build/pkgs/sagemath_categories/install-requires.txt b/build/pkgs/sagemath_categories/install-requires.txt index 15c1dfbcc42..1ddff9fc8f8 100644 --- a/build/pkgs/sagemath_categories/install-requires.txt +++ b/build/pkgs/sagemath_categories/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-categories ~= 10.0b0 +sagemath-categories ~= 10.0b1 diff --git a/build/pkgs/sagemath_environment/install-requires.txt b/build/pkgs/sagemath_environment/install-requires.txt index 73ef51c4e92..760c1dcf2e9 100644 --- a/build/pkgs/sagemath_environment/install-requires.txt +++ b/build/pkgs/sagemath_environment/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-environment ~= 10.0b0 +sagemath-environment ~= 10.0b1 diff --git a/build/pkgs/sagemath_objects/install-requires.txt b/build/pkgs/sagemath_objects/install-requires.txt index a03b35802fe..51e5c5a346d 100644 --- a/build/pkgs/sagemath_objects/install-requires.txt +++ b/build/pkgs/sagemath_objects/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-objects ~= 10.0b0 +sagemath-objects ~= 10.0b1 diff --git a/build/pkgs/sagemath_repl/install-requires.txt b/build/pkgs/sagemath_repl/install-requires.txt index 306890d9db9..ca64cd6b39f 100644 --- a/build/pkgs/sagemath_repl/install-requires.txt +++ b/build/pkgs/sagemath_repl/install-requires.txt @@ -1,2 +1,2 @@ # This file is updated on every release by the sage-update-version script -sagemath-repl ~= 10.0b0 +sagemath-repl ~= 10.0b1 diff --git a/build/pkgs/setuptools/distros/conda.txt b/build/pkgs/setuptools/distros/conda.txt index 0a486bd850f..2602d0f6344 100644 --- a/build/pkgs/setuptools/distros/conda.txt +++ b/build/pkgs/setuptools/distros/conda.txt @@ -1,4 +1,4 @@ -# Set this bound until https://trac.sagemath.org/ticket/34209 adds support for PEP660 editable builds +# Set this bound until /~https://github.com/sagemath/sage/issues/34209 adds support for PEP660 editable builds # By setting this version bound, we avoid having to include the following in our installation instructions. # export SETUPTOOLS_ENABLE_FEATURES=legacy-editable "setuptools<64" diff --git a/build/pkgs/snappy/dependencies b/build/pkgs/snappy/dependencies index 8e4fca87caa..db96ccc42e0 100644 --- a/build/pkgs/snappy/dependencies +++ b/build/pkgs/snappy/dependencies @@ -7,4 +7,4 @@ The dependency cypari above is actually cypari2. An installed sagelib is needed when snappy is installed from source (instead of a wheel) because snappy's setup.py tests its presence to adjust dependencies. -https://trac.sagemath.org/ticket/31180 +/~https://github.com/sagemath/sage/issues/31180 diff --git a/build/pkgs/snappy/requirements.txt b/build/pkgs/snappy/requirements.txt index 33e93e66a1a..0799f0eac11 100644 --- a/build/pkgs/snappy/requirements.txt +++ b/build/pkgs/snappy/requirements.txt @@ -2,9 +2,9 @@ # if installed as a wheel but will actually use Sage's cypari2. # cypari contains a statically linked copy of pari and other libraries # and will remain completely unused (wastes 30M). Snappy is about 165M. -# See https://trac.sagemath.org/ticket/31180 +# See /~https://github.com/sagemath/sage/issues/31180 snappy -# cypari 2.4.0 has a broken sdist, https://trac.sagemath.org/ticket/31180 +# cypari 2.4.0 has a broken sdist, /~https://github.com/sagemath/sage/issues/31180 cypari !=2.4.0 # An optional database (110M uncompressed) snappy_15_knots diff --git a/build/pkgs/sympow/SPKG.rst b/build/pkgs/sympow/SPKG.rst index c1f33b6a00c..1a436e3b7ba 100644 --- a/build/pkgs/sympow/SPKG.rst +++ b/build/pkgs/sympow/SPKG.rst @@ -43,7 +43,7 @@ Special Update/Build Instructions that might show up. I (David Kirkby) would personally not trust this code much at all. -- This is a difficult package to maintain. A trac ticket (#9758) has +- This is a difficult package to maintain. A github issue (#9758) has been opened to implement Watkins-Delaunay's algorithm for computing modular @@ -58,7 +58,7 @@ Special Update/Build Instructions This has been fixed in the Gentoo Linux distribution. Some information from Christopher can be seen on - http://trac.sagemath.org/sage_trac/ticket/9703 + /~https://github.com/sagemath/sage/issues/9703 This package will generate binary versions of all shipped datafiles, so these will work. However, creating totally new datafiles from scratch diff --git a/build/pkgs/wheel/install-requires.txt b/build/pkgs/wheel/install-requires.txt index fb07166d42c..43f74ab0144 100644 --- a/build/pkgs/wheel/install-requires.txt +++ b/build/pkgs/wheel/install-requires.txt @@ -1,2 +1,2 @@ -# https://trac.sagemath.org/ticket/31050 - version constraint for macOS Big Sur support +# /~https://github.com/sagemath/sage/issues/31050 - version constraint for macOS Big Sur support wheel >=0.36.2 diff --git a/build/sage_bootstrap/flock.py b/build/sage_bootstrap/flock.py index ee723113b5e..483482a6edf 100644 --- a/build/sage_bootstrap/flock.py +++ b/build/sage_bootstrap/flock.py @@ -8,7 +8,7 @@ # This is originally motivated by pip, but has since been generalized. We # should avoid running pip while uninstalling a package because that is prone # to race conditions. This script runs pip under a lock. For details, see -# https://trac.sagemath.org/ticket/21672 +# /~https://github.com/sagemath/sage/issues/21672 import fcntl import os diff --git a/build/sage_bootstrap/uncompress/action.py b/build/sage_bootstrap/uncompress/action.py index 9655f76860c..8d8af71da5e 100644 --- a/build/sage_bootstrap/uncompress/action.py +++ b/build/sage_bootstrap/uncompress/action.py @@ -74,8 +74,8 @@ def unpack_archive(archive, dirname=None): retry(rename, OSError, tries=len(archive.names)) # Apply typical umask to the top-level directory in case it wasn't - # already; see https://trac.sagemath.org/ticket/24567 - # and later https://trac.sagemath.org/ticket/28596 + # already; see /~https://github.com/sagemath/sage/issues/24567 + # and later /~https://github.com/sagemath/sage/issues/28596 os.chmod(dirname, os.stat(dirname).st_mode & ~0o022) finally: os.chdir(prev_cwd) diff --git a/build/sage_bootstrap/uncompress/tar_file.py b/build/sage_bootstrap/uncompress/tar_file.py index 9777d265b4d..fdfa8d240e8 100644 --- a/build/sage_bootstrap/uncompress/tar_file.py +++ b/build/sage_bootstrap/uncompress/tar_file.py @@ -41,8 +41,8 @@ class SageBaseTarFile(tarfile.TarFile): time (the current time), not the timestamps stored in the tarball. This is meant to work around https://bugs.python.org/issue32773 - See http://trac.sagemath.org/ticket/20218#comment:16 and - https://trac.sagemath.org/ticket/24567 for more background. + See /~https://github.com/sagemath/sage/issues/20218#comment:16 and + /~https://github.com/sagemath/sage/issues/24567 for more background. """ umask = 0o022 diff --git a/build/sage_bootstrap/uninstall.py b/build/sage_bootstrap/uninstall.py index 1ce039921fc..7cd808d0fe7 100644 --- a/build/sage_bootstrap/uninstall.py +++ b/build/sage_bootstrap/uninstall.py @@ -186,7 +186,7 @@ def rmdir(dirname): # from it, remove the directory too. for filename in files: # Just in case: use lstrip to remove leading "/" from - # filename. See https://trac.sagemath.org/ticket/26013. + # filename. See /~https://github.com/sagemath/sage/issues/26013. filename = pth.join(sage_local, filename.lstrip(os.sep)) dirname = pth.dirname(filename) if pth.lexists(filename): diff --git a/docker/Dockerfile b/docker/Dockerfile index bf14547cd38..9d56b10b9c5 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -196,7 +196,7 @@ ENV MAKEFLAGS $MAKEFLAGS ARG SAGE_NUM_THREADS="2" ENV SAGE_NUM_THREADS $SAGE_NUM_THREADS RUN make configure -# Old default before https://trac.sagemath.org/ticket/32406 +# Old default before /~https://github.com/sagemath/sage/issues/32406 RUN ./configure --disable-editable RUN make build diff --git a/docker/README.md b/docker/README.md index eb0f1ba344d..14c49b5d4fe 100644 --- a/docker/README.md +++ b/docker/README.md @@ -26,7 +26,7 @@ There are several flavours of this image. ``` docker run -p8888:8888 sagemath/sagemath:latest sage-jupyter ``` -* [`sagemath/sagemath-dev`![image size](https://img.shields.io/microbadger/image-size/sagemath/sagemath-dev.svg)](https://hub.docker.com/r/sagemath/sagemath-dev) contains all the build artifacts to rebuild Sage quickly (currently, this is broken, see [#34241](https://trac.sagemath.org/ticket/34241).) This version is probably only relevant for Sage developers. Run this image with: +* [`sagemath/sagemath-dev`![image size](https://img.shields.io/microbadger/image-size/sagemath/sagemath-dev.svg)](https://hub.docker.com/r/sagemath/sagemath-dev) contains all the build artifacts to rebuild Sage quickly (currently, this is broken, see [#34241](/~https://github.com/sagemath/sage/issues/34241).) This version is probably only relevant for Sage developers. Run this image with: ``` docker run -it sagemath/sagemath-dev:develop ``` diff --git a/m4/sage_spkg_collect.m4 b/m4/sage_spkg_collect.m4 index 75903603c49..d52dc6205ee 100644 --- a/m4/sage_spkg_collect.m4 +++ b/m4/sage_spkg_collect.m4 @@ -81,7 +81,7 @@ AC_DEFUN([SAGE_SPKG_COLLECT_INIT], [ dnl Intialize the collection variables. # To deal with ABI incompatibilities when gcc is upgraded, every package # (except gcc) should depend on gcc if gcc is already installed. -# See https://trac.sagemath.org/ticket/24703 +# See /~https://github.com/sagemath/sage/issues/24703 if test x$SAGE_INSTALL_GCC = xexists; then SAGE_GCC_DEP='$(SAGE_LOCAL)/bin/gcc' else diff --git a/pkgs/sage-conf/README.rst b/pkgs/sage-conf/README.rst index ec4ba0dd631..c968612aef2 100644 --- a/pkgs/sage-conf/README.rst +++ b/pkgs/sage-conf/README.rst @@ -22,7 +22,7 @@ sage_conf sdist on PyPI ----------------------- This implementation of the ``sage_conf`` distribution package comes from -https://trac.sagemath.org/ticket/29039, which added the directory +/~https://github.com/sagemath/sage/issues/29039, which added the directory `pkgs/sage-conf_pypi `_. To install, use ``pip install -v sage_conf``. Using ``-v`` ensures that diagnostic @@ -48,7 +48,7 @@ sage_conf wheels Prebuilt binary wheels of the ``sage_conf`` distribution package are available at /~https://github.com/sagemath/sage-wheels/releases/ -This implementation of ``sage_conf`` comes from https://trac.sagemath.org/ticket/31396, +This implementation of ``sage_conf`` comes from /~https://github.com/sagemath/sage/issues/31396, which adds the directory ``pkgs/sage-conf_relocatable/``. On building a wheel, it invokes ``sage_bootstrap`` to establish a diff --git a/pkgs/sage-conf/VERSION.txt b/pkgs/sage-conf/VERSION.txt index 39516ebfda0..4ab501a9912 100644 --- a/pkgs/sage-conf/VERSION.txt +++ b/pkgs/sage-conf/VERSION.txt @@ -1 +1 @@ -10.0.beta0 +10.0.beta1 diff --git a/pkgs/sage-conf_pypi/VERSION.txt b/pkgs/sage-conf_pypi/VERSION.txt index 39516ebfda0..4ab501a9912 100644 --- a/pkgs/sage-conf_pypi/VERSION.txt +++ b/pkgs/sage-conf_pypi/VERSION.txt @@ -1 +1 @@ -10.0.beta0 +10.0.beta1 diff --git a/pkgs/sage-docbuild/VERSION.txt b/pkgs/sage-docbuild/VERSION.txt index 39516ebfda0..4ab501a9912 100644 --- a/pkgs/sage-docbuild/VERSION.txt +++ b/pkgs/sage-docbuild/VERSION.txt @@ -1 +1 @@ -10.0.beta0 +10.0.beta1 diff --git a/pkgs/sage-setup/VERSION.txt b/pkgs/sage-setup/VERSION.txt index 39516ebfda0..4ab501a9912 100644 --- a/pkgs/sage-setup/VERSION.txt +++ b/pkgs/sage-setup/VERSION.txt @@ -1 +1 @@ -10.0.beta0 +10.0.beta1 diff --git a/pkgs/sage-sws2rst/README.rst b/pkgs/sage-sws2rst/README.rst index 8098507fff4..f20d3e636cf 100644 --- a/pkgs/sage-sws2rst/README.rst +++ b/pkgs/sage-sws2rst/README.rst @@ -8,4 +8,4 @@ Provides a script `sage-sws2rst`, which translates a Sage worksheet file (.sws) Sage worksheet files (.sws) are a file format that was used by the now-obsolete Sage notebook (/~https://github.com/sagemath/sagenb), superseded by the Jupyter notebook. SageNB was dropped in the course of the transition of SageMath to Python 3. -This package was extracted from the SageNB sources in https://trac.sagemath.org/ticket/28838 to provide a way to convert pedagogical material written available in Sage worksheet format. +This package was extracted from the SageNB sources in /~https://github.com/sagemath/sage/issues/28838 to provide a way to convert pedagogical material written available in Sage worksheet format. diff --git a/pkgs/sage-sws2rst/VERSION.txt b/pkgs/sage-sws2rst/VERSION.txt index 39516ebfda0..4ab501a9912 100644 --- a/pkgs/sage-sws2rst/VERSION.txt +++ b/pkgs/sage-sws2rst/VERSION.txt @@ -1 +1 @@ -10.0.beta0 +10.0.beta1 diff --git a/pkgs/sagemath-categories/MANIFEST.in.m4 b/pkgs/sagemath-categories/MANIFEST.in.m4 index 98d10a91fef..361132e0cfa 100644 --- a/pkgs/sagemath-categories/MANIFEST.in.m4 +++ b/pkgs/sagemath-categories/MANIFEST.in.m4 @@ -35,7 +35,7 @@ exclude sage/categories/__init__.py include sage/rings/ideal.* include sage/rings/ring.* graft sage/typeset # dep of sage.categories.tensor -# include sage/rings/integer*.* # depends on cypari, flint - https://trac.sagemath.org/ticket/30022 +# include sage/rings/integer*.* # depends on cypari, flint - /~https://github.com/sagemath/sage/issues/30022 # include sage/rings/rational*.* # include sage/rings/infinity.* diff --git a/pkgs/sagemath-categories/VERSION.txt b/pkgs/sagemath-categories/VERSION.txt index 39516ebfda0..4ab501a9912 100644 --- a/pkgs/sagemath-categories/VERSION.txt +++ b/pkgs/sagemath-categories/VERSION.txt @@ -1 +1 @@ -10.0.beta0 +10.0.beta1 diff --git a/pkgs/sagemath-environment/VERSION.txt b/pkgs/sagemath-environment/VERSION.txt index 39516ebfda0..4ab501a9912 100644 --- a/pkgs/sagemath-environment/VERSION.txt +++ b/pkgs/sagemath-environment/VERSION.txt @@ -1 +1 @@ -10.0.beta0 +10.0.beta1 diff --git a/pkgs/sagemath-objects/VERSION.txt b/pkgs/sagemath-objects/VERSION.txt index 39516ebfda0..4ab501a9912 100644 --- a/pkgs/sagemath-objects/VERSION.txt +++ b/pkgs/sagemath-objects/VERSION.txt @@ -1 +1 @@ -10.0.beta0 +10.0.beta1 diff --git a/pkgs/sagemath-repl/VERSION.txt b/pkgs/sagemath-repl/VERSION.txt index 39516ebfda0..4ab501a9912 100644 --- a/pkgs/sagemath-repl/VERSION.txt +++ b/pkgs/sagemath-repl/VERSION.txt @@ -1 +1 @@ -10.0.beta0 +10.0.beta1 diff --git a/pkgs/sagemath-standard/README.rst b/pkgs/sagemath-standard/README.rst index 5709c22249b..f624d1414a7 100644 --- a/pkgs/sagemath-standard/README.rst +++ b/pkgs/sagemath-standard/README.rst @@ -28,4 +28,4 @@ for partial lists for various systems. The connection to the system environment is facilitated through the https://pypi.org/project/sage-conf/ distribution package. -A modularization effort is in progress with the goal of making it possible to install parts of the Sage Library with fewer prerequisites. https://trac.sagemath.org/ticket/29705 +A modularization effort is in progress with the goal of making it possible to install parts of the Sage Library with fewer prerequisites. /~https://github.com/sagemath/sage/issues/29705 diff --git a/src/.relint.yml b/src/.relint.yml index 2b49c758dc0..86684ad1040 100644 --- a/src/.relint.yml +++ b/src/.relint.yml @@ -35,7 +35,7 @@ # From various typo tickets -# https://trac.sagemath.org/ticket/30585 +# /~https://github.com/sagemath/sage/issues/30585 - name: 'typo "homogenous" detected' hint: | in mathematics it should be "homogeneous" diff --git a/src/VERSION.txt b/src/VERSION.txt index 39516ebfda0..4ab501a9912 100644 --- a/src/VERSION.txt +++ b/src/VERSION.txt @@ -1 +1 @@ -10.0.beta0 +10.0.beta1 diff --git a/src/bin/sage b/src/bin/sage index 03aec9cfbfc..97f6b2d540b 100755 --- a/src/bin/sage +++ b/src/bin/sage @@ -77,7 +77,7 @@ resolvelinks() { } # Resolve the links in $0 so that local/bin/sage can be executed from -# a symlink (Trac #30888). +# a symlink (Issue #30888). SELF=$(resolvelinks "${0}") # Display the current version of Sage @@ -173,7 +173,7 @@ if [ -z "$SAGE_VENV" -a -x "${SELF}-venv-config" ]; then export SAGE_VENV=$("${SELF}-venv-config" SAGE_VENV) fi if [ -f "${SELF}-env-config" ]; then - # As of Trac #22731, sage-env-config is optional. + # As of Issue #22731, sage-env-config is optional. . "${SELF}-env-config" >&2 fi @@ -577,7 +577,7 @@ fi if [ "$1" = '-c' ]; then shift sage_setup - unset TERM # See Trac #12263 + unset TERM # See Issue #12263 exec sage-eval "$@" fi @@ -1028,7 +1028,7 @@ fi if [ "$1" = "-docbuild" -o "$1" = "--docbuild" ]; then shift - # Trac #30002: ensure an English locale so that it is possible to + # Issue #30002: ensure an English locale so that it is possible to # scrape out warnings by pattern matching. export LANG=C export LANGUAGE=C @@ -1039,7 +1039,7 @@ if [ "$1" = "-docbuild" -o "$1" = "--docbuild" ]; then export OMP_NUM_THREADS=1 fi - # Trac #33650: Make sure that user configuration of Jupyter does not + # Issue #33650: Make sure that user configuration of Jupyter does not # shadow our sagemath kernel when jupyter-sphinx is invoked export JUPYTER_CONFIG_DIR=/doesnotexist export JUPYTER_CONFIG_PATH=/doesnotexist @@ -1153,7 +1153,7 @@ if [ $# -ge 1 ]; then exit 1 fi sage_setup - unset TERM # See Trac #12263 + unset TERM # See Issue #12263 # sage-run rejects all command line options as the first argument. exec sage-run "$@" fi diff --git a/src/bin/sage-cleaner b/src/bin/sage-cleaner index 7fe6784ee26..e2e578eec60 100755 --- a/src/bin/sage-cleaner +++ b/src/bin/sage-cleaner @@ -169,7 +169,7 @@ def fix_old_mistakes(): """ Experience is simply the name we give our mistakes. """ - # inconsistently escaped hyphens with underscores (http://trac.sagemath.org/14055) + # inconsistently escaped hyphens with underscores (/~https://github.com/sagemath/sage/issues/14055) wrong_hostname = HOSTNAME.replace('-','_').replace('/','_').replace('\\','_') wrong_sage_tmp_root = os.path.join(DOT_SAGE, 'temp', wrong_hostname) if wrong_sage_tmp_root != SAGE_TMP_ROOT and os.path.exists(wrong_sage_tmp_root): diff --git a/src/bin/sage-coverage b/src/bin/sage-coverage index 45c4073a18c..f4920600528 100755 --- a/src/bin/sage-coverage +++ b/src/bin/sage-coverage @@ -37,7 +37,7 @@ def coverage_all(directory): print(''.join(s)) - # Trac #5859: Don't crash if there isn't anything to test. + # Issue #5859: Don't crash if there isn't anything to test. score = 100.0 if total != 0: score = (float(scr) / total) diff --git a/src/bin/sage-cython b/src/bin/sage-cython index 157cf76a23f..a52a729dd02 100755 --- a/src/bin/sage-cython +++ b/src/bin/sage-cython @@ -1,7 +1,7 @@ #!/usr/bin/env sage-python # This script is a deprecated wrapper around the "cython" program. -# It is deprecated since Trac #27041 (Sage 8.7) because one should +# It is deprecated since Issue #27041 (Sage 8.7) because one should # simply use "cython" directly. We display deprecation messages whenever # "sage-cython" does something different from plain "cython". # diff --git a/src/bin/sage-env b/src/bin/sage-env index 3a02640bc97..28f86bc52ef 100644 --- a/src/bin/sage-env +++ b/src/bin/sage-env @@ -31,7 +31,7 @@ # absolute path (a relative path remains relative), nor does it treat # "." or ".." specially. # -# AUTHOR: Jeroen Demeyer (2011-08-23): Trac tickets #5852 and #11704 +# AUTHOR: Jeroen Demeyer (2011-08-23): Github issues #5852 and #11704 # resolvelinks() { # $in is what still needs to be converted (normally has no starting slash) @@ -278,7 +278,7 @@ if [ "$UNAME" = "Darwin" ]; then export MACOSX_VERSION=`uname -r | awk -F. '{print $1}'` # Work around problems on recent OS X crashing with an error message # "... may have been in progress in another thread when fork() was called" - # when objective-C functions are called after fork(). See Trac #25921. + # when objective-C functions are called after fork(). See Issue #25921. # Most likely, these errors are false positives, so we disable them: export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES fi @@ -355,12 +355,12 @@ if [ "$PYTHON_EGG_CACHE" = "" ]; then fi # Set PYTHONUSERBASE to avoid picking up non-Sage versions of -# Matplotlib, numpy, etc. See http://trac.sagemath.org/ticket/19612. +# Matplotlib, numpy, etc. See /~https://github.com/sagemath/sage/issues/19612. # # For more history (it used to be PYTHONNOUSERSITE=yes which killed # the ability to do "sage -pip install PACKAGE --user"), see -# http://trac.sagemath.org/ticket/14243 and -# http://trac.sagemath.org/ticket/18955. +# /~https://github.com/sagemath/sage/issues/14243 and +# /~https://github.com/sagemath/sage/issues/18955. if [ "$PYTHONUSERBASE" = "" ]; then PYTHONUSERBASE="$DOT_SAGE/local" @@ -449,7 +449,7 @@ if [ -n "$SAGE_LOCAL" ]; then PERL5LIB="$SAGE_LOCAL/lib/perl5:$PERL5LIB" && export PERL5LIB fi -# Allow SAGE_BROWSER to override BROWSER (Trac #22449) +# Allow SAGE_BROWSER to override BROWSER (Issue #22449) if [ -n "$SAGE_BROWSER" ]; then export BROWSER="$SAGE_BROWSER" fi @@ -558,7 +558,7 @@ case "$SAGE_NUM_THREADS,$SAGE_NUM_THREADS_PARALLEL" in # sage-num-threads.py would just recompute them ;; *) - # See Trac Ticket #12016 + # See Issue Ticket #12016 # First, figure out the right values for SAGE_NUM_THREADS (default # number of threads) and SAGE_NUM_THREADS_PARALLEL (default number of # threads when parallel execution is asked explicitly). @@ -615,7 +615,7 @@ fi if [ -n "$SAGE_LOCAL" ]; then # If we move the Sage tree then ncurses cannot find terminfo, hence, we - # tell it where to find it. See Trac Ticket #15091 + # tell it where to find it. See Issue Ticket #15091 export TERMINFO="$SAGE_LOCAL/share/terminfo" # If nodejs is installed, activate the nodeenv containing it. diff --git a/src/bin/sage-num-threads.py b/src/bin/sage-num-threads.py index 1b920182690..7c70a3cbe3a 100755 --- a/src/bin/sage-num-threads.py +++ b/src/bin/sage-num-threads.py @@ -11,7 +11,7 @@ # 3) The number of CPU cores in the system, as determined by # multiprocessing.cpu_count() # -# AUTHOR: Jeroen Demeyer (2011-12-08): Trac ticket #12016 +# AUTHOR: Jeroen Demeyer (2011-12-08): Github issue #12016 # import os import multiprocessing diff --git a/src/bin/sage-runtests b/src/bin/sage-runtests index 81dff8d5bf3..ed1e56953ff 100755 --- a/src/bin/sage-runtests +++ b/src/bin/sage-runtests @@ -8,7 +8,7 @@ import sys DOT_SAGE = os.environ.get('DOT_SAGE', os.path.join(os.environ.get('HOME'), '.sage')) -# Override to not pick up user configuration, see Trac #20270 +# Override to not pick up user configuration, see Issue #20270 os.environ['SAGE_STARTUP_FILE'] = os.path.join(DOT_SAGE, 'init-doctests.sage') @@ -41,8 +41,8 @@ if __name__ == "__main__": type=float, default=-1.0, const=1.0, metavar="SECONDS", help="warn if tests take more time than SECONDS") # By default, include all tests marked 'sagemath_doc_html' -- see - # https://trac.sagemath.org/ticket/25345 and - # https://trac.sagemath.org/ticket/26110: + # /~https://github.com/sagemath/sage/issues/25345 and + # /~https://github.com/sagemath/sage/issues/26110: parser.add_argument("--optional", metavar="FEATURES", default=_get_optional_defaults(), help='only run tests including one of the "# optional" tags listed in FEATURES (separated by commas); ' 'if "sage" is listed, will also run the standard doctests; ' @@ -141,7 +141,7 @@ if __name__ == "__main__": sys.exit(2) # Limit the number of threads to 2 to save system resources. - # See Trac #23713, #23892, #30351 + # See Issue #23713, #23892, #30351 if sys.platform == 'darwin': os.environ["OMP_NUM_THREADS"] = "1" else: @@ -153,7 +153,7 @@ if __name__ == "__main__": DC = DocTestController(args, args.filenames) err = DC.run() - # Trac #33521: Do not run pytest if the pytest configuration is not available. + # Issue #33521: Do not run pytest if the pytest configuration is not available. # This happens when the source tree is not available and SAGE_SRC falls back # to SAGE_LIB. from sage.env import SAGE_SRC diff --git a/src/bin/sage-version.sh b/src/bin/sage-version.sh index 127b827342d..d8c6b161134 100644 --- a/src/bin/sage-version.sh +++ b/src/bin/sage-version.sh @@ -4,6 +4,6 @@ # which stops "setup.py develop" from rewriting it as a Python file. : # This file is auto-generated by the sage-update-version script, do not edit! -SAGE_VERSION='10.0.beta0' -SAGE_RELEASE_DATE='2023-02-12' -SAGE_VERSION_BANNER='SageMath version 10.0.beta0, Release Date: 2023-02-12' +SAGE_VERSION='10.0.beta1' +SAGE_RELEASE_DATE='2023-02-19' +SAGE_VERSION_BANNER='SageMath version 10.0.beta1, Release Date: 2023-02-19' diff --git a/src/conftest.py b/src/conftest.py index f12f0aa0cbc..9448087cc7a 100644 --- a/src/conftest.py +++ b/src/conftest.py @@ -25,7 +25,7 @@ from _pytest.pathlib import import_path, ImportMode # Import sage.all is necessary to: -# - avoid cyclic import errors, see Trac #33580 +# - avoid cyclic import errors, see Issue #33580 # - inject it into globals namespace for doctests import sage.all from sage.doctest.parsing import SageDocTestParser, SageOutputChecker diff --git a/src/doc/bootstrap b/src/doc/bootstrap index 6b44bc828d8..6dd50fd5cec 100755 --- a/src/doc/bootstrap +++ b/src/doc/bootstrap @@ -155,8 +155,8 @@ for PKG_BASE in $(sage-package list --has-file SPKG.rst | sort); do PKG_SCRIPTS=build/pkgs/$PKG_BASE # Instead of just copying, we may want to call # a version of sage-spkg-info to format extra information. - # for sphinx 4.4 we need to replace all direct links by some "extlink" (ticket 33272) + # for sphinx 4.4 we need to replace all direct links by some "extlink" (issue 33272) - (echo ".. _spkg_$PKG_BASE:" && echo && OUTPUT_RST=1 sage-spkg-info $PKG_BASE) | sed -e "s|https://trac.sagemath.org/ticket/\([0-9]*\)|:trac:\`\1\`|g" -e "s|https://arxiv.org/abs/cs/\([0-9]*\)|:arxiv:\`cs/\1\`|g" > "$OUTPUT_DIR"/$PKG_BASE.rst + (echo ".. _spkg_$PKG_BASE:" && echo && OUTPUT_RST=1 sage-spkg-info $PKG_BASE) | sed -e "s|/~https://github.com/sagemath/sage/issues/\([0-9]*\)|:issue:\`\1\`|g" -e "s|https://arxiv.org/abs/cs/\([0-9]*\)|:arxiv:\`cs/\1\`|g" > "$OUTPUT_DIR"/$PKG_BASE.rst echo >> "$OUTPUT_INDEX" " $PKG_BASE" done diff --git a/src/doc/en/constructions/contributions.rst b/src/doc/en/constructions/contributions.rst index 66bff2b74f5..c6324e3459e 100644 --- a/src/doc/en/constructions/contributions.rst +++ b/src/doc/en/constructions/contributions.rst @@ -36,4 +36,4 @@ documentation were made by Gary Zablackis. [SAGE] {SJ} William Stein, David Joyner, SAGE: System for Algebra and Geometry Experimentation, Comm. Computer Algebra 39(2005)61-64. (SIGSAM Bull. June 2005) https://sagemath.org/ - https://trac.sagemath.org/ + /~https://github.com/sagemath/sage/issues/ diff --git a/src/doc/en/prep/Advanced-2DPlotting.rst b/src/doc/en/prep/Advanced-2DPlotting.rst index 633e33d68b3..4ac7465ccf7 100644 --- a/src/doc/en/prep/Advanced-2DPlotting.rst +++ b/src/doc/en/prep/Advanced-2DPlotting.rst @@ -239,7 +239,7 @@ to put together. ....: graph += arrow( [0,0], [360, 0], color = "#000" ) ....: # let's set tics ....: # or http://aghitza.org/posts/tweak_labels_and_ticks_in_2d_plots_using_matplotlib/ - ....: # or wayt for http://trac.sagemath.org/sage_trac/ticket/1431 + ....: # or wayt for /~https://github.com/sagemath/sage/issues/1431 ....: # ['$-\pi/3$', '$2\pi/3$', '$5\pi/3$'] ....: for x in range(0, 361, 30): ....: graph += point( [x, 0] ) diff --git a/src/doc/en/reference/references/index.rst b/src/doc/en/reference/references/index.rst index 70dda6c3940..04b7919bc80 100644 --- a/src/doc/en/reference/references/index.rst +++ b/src/doc/en/reference/references/index.rst @@ -624,7 +624,7 @@ REFERENCES: and variants*. :arxiv:`1810.00789` -.. [BDKR2013] \D. Best, D.Z. Dokovic, H. Kharaghani and H. Ramp. +.. [BDKR2013] \D. Best, D.Ž. Đoković, H. Kharaghani and H. Ramp. *Turyn-Type Sequences: Classification, Enumeration, and Construction*, Journal of Combinatorial Designs 21(1) (2013): 24-35. :doi:`10.1002/jcd.21318` @@ -2058,7 +2058,7 @@ REFERENCES: .. [Djo1992c] \D. Đoković. *Ten New Orders for Hadamard Matrices of Skew Type*, - Publikacije Elektrotehničkog fakulteta. Serija Matematika 2 (1992): 47-59. + Publikacije Elektrotehničkog fakulteta. Serija Matematika 2 (1992): 47-59. .. [Djo1994a] \D. Đoković. *Five New Orders for Hadamard Matrices of Skew Type*, @@ -2223,6 +2223,11 @@ REFERENCES: .. [Duv1983] J.-P. Duval, Factorizing words over an ordered alphabet, J. Algorithms 4 (1983) 363--381. +.. [Duv1988] \A. Duval. + *A directed graph version of strongly regular graphs*, + Journal of Combinatorial Theory, Series A 47(1) (1988): 71-100. + :doi:`10.1016/0097-3165(88)90043-X` + .. [DW1995] Andreas W.M. Dress and Walter Wenzel, *A Simple Proof of an Identity Concerning Pfaffians of Skew Symmetric Matrices*, Advances in Mathematics, volume 112, Issue 1, @@ -3866,6 +3871,10 @@ REFERENCES: *Bethe ansatz and inverse scattering transform in a periodic box-ball system*, Nuclear Phys. B **747**, no. 3 (2006), 354--397. +.. [KTZ1987] Kierstead, H.A., Trotter, W.T. & Zhou, B. Representing an ordered + set as the intersection of super greedy linear extensions. Order 4, + 293-311 (1987). + :doi:`10.1007/BF00337892` .. [Kuh1987] \W. Kühnel, "Minimal triangulations of Kummer varieties", Abh. Math. Sem. Univ. Hamburg 57 (1987), 7-20. diff --git a/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/nf_galois_groups.rst b/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/nf_galois_groups.rst index 4832272f1cb..fb7697587c5 100644 --- a/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/nf_galois_groups.rst +++ b/src/doc/en/thematic_tutorials/explicit_methods_in_number_theory/nf_galois_groups.rst @@ -41,7 +41,7 @@ Some more advanced number-theoretical tools are available via G: sage: P = K.primes_above(2)[0] sage: G.inertia_group(P) Subgroup generated by [(1,4,6)(2,5,3)] of (Galois group 6T2 ([3]2) with order 6 of x^6 + 40*x^3 + 1372) - sage: sorted([G.artin_symbol(Q) for Q in K.primes_above(5)]) # random order, see Trac #18308 + sage: sorted([G.artin_symbol(Q) for Q in K.primes_above(5)]) # random order, see Issue #18308 [(1,3)(2,6)(4,5), (1,2)(3,4)(5,6), (1,5)(2,4)(3,6)] If the number field is not Galois over `\QQ`, then the ``galois_group`` diff --git a/src/sage/algebras/free_algebra_element.py b/src/sage/algebras/free_algebra_element.py index 378f06479db..559df673fbf 100644 --- a/src/sage/algebras/free_algebra_element.py +++ b/src/sage/algebras/free_algebra_element.py @@ -92,7 +92,7 @@ def _repr_(self): sage: repr(-x+3*y*z) # indirect doctest '-x + 3*y*z' - Trac ticket :trac:`11068` enables the use of local variable names:: + Github issue :trac:`11068` enables the use of local variable names:: sage: from sage.structure.parent_gens import localvars sage: with localvars(A, ['a','b','c']): diff --git a/src/sage/algebras/fusion_rings/fusion_ring.py b/src/sage/algebras/fusion_rings/fusion_ring.py index d36faae2b34..915ca62e73b 100644 --- a/src/sage/algebras/fusion_rings/fusion_ring.py +++ b/src/sage/algebras/fusion_rings/fusion_ring.py @@ -1349,7 +1349,7 @@ def get_braid_generators(self, set_start_method('fork') except RuntimeError: pass - # Turn off multiprocessing when field is QQbar due to pickling issues introduced by PARI upgrade in trac ticket #30537 + # Turn off multiprocessing when field is QQbar due to pickling issues introduced by PARI upgrade in github issue #30537 pool = Pool() if use_mp and self.fvars_field() != QQbar else None # Set up computational basis and compute generators one at a time diff --git a/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx b/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx index 41444812c49..80ac48b202c 100644 --- a/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx +++ b/src/sage/algebras/letterplace/free_algebra_element_letterplace.pyx @@ -3,7 +3,7 @@ Weighted homogeneous elements of free algebras, in letterplace implementation AUTHOR: -- Simon King (2011-03-23): Trac ticket :trac:`7797` +- Simon King (2011-03-23): Github issue :trac:`7797` """ diff --git a/src/sage/algebras/lie_algebras/free_lie_algebra.py b/src/sage/algebras/lie_algebras/free_lie_algebra.py index 8a02e5265c6..af001d0fa57 100644 --- a/src/sage/algebras/lie_algebras/free_lie_algebra.py +++ b/src/sage/algebras/lie_algebras/free_lie_algebra.py @@ -59,7 +59,7 @@ def __init__(self, lie, basis_name): doctest:warning ... FutureWarning: The Hall basis has not been fully proven correct, but currently no bugs are known - See http://trac.sagemath.org/16823 for details. + See /~https://github.com/sagemath/sage/issues/16823 for details. Free Lie algebra generated by (x, y) over Rational Field in the Hall basis """ self._basis_name = basis_name diff --git a/src/sage/algebras/lie_algebras/lie_algebra.py b/src/sage/algebras/lie_algebras/lie_algebra.py index 0aa08d2a823..87b1a8cee37 100644 --- a/src/sage/algebras/lie_algebras/lie_algebra.py +++ b/src/sage/algebras/lie_algebras/lie_algebra.py @@ -273,7 +273,7 @@ class LieAlgebra(Parent, UniqueRepresentation): # IndexedGenerators): sage: H = L.Hall() doctest:warning...: FutureWarning: The Hall basis has not been fully proven correct, but currently no bugs are known - See http://trac.sagemath.org/16823 for details. + See /~https://github.com/sagemath/sage/issues/16823 for details. sage: H Free Lie algebra generated by (x, y, z) over Rational Field in the Hall basis sage: Lyn = L.Lyndon() diff --git a/src/sage/algebras/lie_algebras/lie_algebra_element.pyx b/src/sage/algebras/lie_algebras/lie_algebra_element.pyx index ffe27c69797..d0a1f70510a 100644 --- a/src/sage/algebras/lie_algebras/lie_algebra_element.pyx +++ b/src/sage/algebras/lie_algebras/lie_algebra_element.pyx @@ -95,7 +95,7 @@ cdef class LieAlgebraElement(IndexedFreeModuleElement): sage: H = L.Hall() doctest:warning...: FutureWarning: The Hall basis has not been fully proven correct, but currently no bugs are known - See http://trac.sagemath.org/16823 for details. + See /~https://github.com/sagemath/sage/issues/16823 for details. sage: elt = Lyn.an_element() sage: elt._im_gens_(H, H.gens()) x + y + z diff --git a/src/sage/algebras/lie_algebras/morphism.py b/src/sage/algebras/lie_algebras/morphism.py index ca65bb162aa..f71001ce98f 100644 --- a/src/sage/algebras/lie_algebras/morphism.py +++ b/src/sage/algebras/lie_algebras/morphism.py @@ -54,7 +54,7 @@ class LieAlgebraHomomorphism_im_gens(Morphism): sage: H = L.Hall() doctest:warning...: FutureWarning: The Hall basis has not been fully proven correct, but currently no bugs are known - See http://trac.sagemath.org/16823 for details. + See /~https://github.com/sagemath/sage/issues/16823 for details. sage: phi = Lyn.coerce_map_from(H); phi Lie algebra morphism: From: Free Lie algebra generated by (x, y, z) over Rational Field in the Hall basis diff --git a/src/sage/algebras/quatalg/quaternion_algebra.py b/src/sage/algebras/quatalg/quaternion_algebra.py index 45a4d512c0a..4b7af26d31c 100644 --- a/src/sage/algebras/quatalg/quaternion_algebra.py +++ b/src/sage/algebras/quatalg/quaternion_algebra.py @@ -2197,7 +2197,7 @@ def quaternion_order(self): sage: R = QuaternionAlgebra(-11,-1).maximal_order() sage: R.unit_ideal().quaternion_order() is R doctest:...: DeprecationWarning: quaternion_order() is deprecated, please use left_order() or right_order() - See https://trac.sagemath.org/31583 for details. + See /~https://github.com/sagemath/sage/issues/31583 for details. True """ from sage.misc.superseded import deprecation @@ -2229,7 +2229,7 @@ def ring(self): sage: R = QuaternionAlgebra(-11,-1).maximal_order() sage: R.unit_ideal().ring() is R doctest:...: DeprecationWarning: ring() will return the quaternion algebra in the future, please use left_order() or right_order() - See https://trac.sagemath.org/31583 for details. + See /~https://github.com/sagemath/sage/issues/31583 for details. True """ from sage.misc.superseded import deprecation diff --git a/src/sage/arith/constants.pxd b/src/sage/arith/constants.pxd index ec6f59074ce..6e5e713707f 100644 --- a/src/sage/arith/constants.pxd +++ b/src/sage/arith/constants.pxd @@ -3,7 +3,7 @@ # float. We use these instead of decimal constants like 3.1415... # because the hex floats are exactly representable as "double", so there # shouldn't be any rounding issues in the compiler. -# See https://trac.sagemath.org/ticket/23919#comment:15 +# See /~https://github.com/sagemath/sage/issues/23919#comment:15 # # Hex floats are standardized in C99, but GCC accepts them # unconditionally, also for C++ code. diff --git a/src/sage/arith/long.pxd b/src/sage/arith/long.pxd index 1c9a53387a0..4addc8cfc89 100644 --- a/src/sage/arith/long.pxd +++ b/src/sage/arith/long.pxd @@ -296,7 +296,7 @@ cdef inline bint integer_check_long_py(x, long* value, int* err): # - BITS_IN_LONG = 63, PyLong_SHIFT = 30 # - BITS_IN_LONG = 31, PyLong_SHIFT = 15 (python <= 3.10) # - BITS_IN_LONG = 31, PyLong_SHIFT = 30 (new in python 3.11) - # cf. https://trac.sagemath.org/ticket/33842#comment:130 + # cf. /~https://github.com/sagemath/sage/issues/33842#comment:130 # # This way, we know that 1 digit certainly fits in a C long # and 4 or more digits never fit. diff --git a/src/sage/calculus/wester.py b/src/sage/calculus/wester.py index 10a64d25471..0a2a374cd5f 100644 --- a/src/sage/calculus/wester.py +++ b/src/sage/calculus/wester.py @@ -390,7 +390,7 @@ sage: # domain. sage: # To stick with the behaviour of previous versions, the domain is set sage: # to 'real' in the following. - sage: # See Trac #10682 for further details. + sage: # See Issue #10682 for further details. sage: n = var('n') sage: f = x^(1/n)*y^(1/n)-(x*y)^(1/n) sage: assume(real(x) > 0, real(y) > 0) diff --git a/src/sage/categories/category_with_axiom.py b/src/sage/categories/category_with_axiom.py index e8811e9f25e..9850f4d4c85 100644 --- a/src/sage/categories/category_with_axiom.py +++ b/src/sage/categories/category_with_axiom.py @@ -927,7 +927,7 @@ def _(): return LazyImport('sage.categories.rngs', 'Rngs', at_startup=True) Supporting similar deduction rules will be an important feature in the future, with quite a few occurrences already implemented in - upcoming tickets. For the time being though there is a single + upcoming issues. For the time being though there is a single occurrence of this idiom outside of the tests. So this would be an easy thing to refactor after :trac:`10963` if a better idiom is found. diff --git a/src/sage/categories/finite_complex_reflection_groups.py b/src/sage/categories/finite_complex_reflection_groups.py index bb3df827890..9c91c2af549 100644 --- a/src/sage/categories/finite_complex_reflection_groups.py +++ b/src/sage/categories/finite_complex_reflection_groups.py @@ -795,7 +795,7 @@ def elements_below_coxeter_element(self, c=None): sage: W = CoxeterGroup(['A', 3]) sage: len(list(W.elements_below_coxeter_element())) doctest:...: DeprecationWarning: The method elements_below_coxeter_element is deprecated. Please use absolute_order_ideal instead. - See https://trac.sagemath.org/27924 for details. + See /~https://github.com/sagemath/sage/issues/27924 for details. 14 """ from sage.misc.superseded import deprecation diff --git a/src/sage/categories/homset.py b/src/sage/categories/homset.py index 1b488a03b69..88b162c5845 100644 --- a/src/sage/categories/homset.py +++ b/src/sage/categories/homset.py @@ -74,9 +74,9 @@ ################################### # Use the weak "triple" dictionary -# introduced in trac ticket #715 +# introduced in github issue #715 # with weak values, as introduced in -# trac ticket #14159 +# github issue #14159 from sage.structure.coerce_dict import TripleDict _cache = TripleDict(weak_values=True) diff --git a/src/sage/categories/magmas.py b/src/sage/categories/magmas.py index 975ea0491b3..ff1a7f955c5 100644 --- a/src/sage/categories/magmas.py +++ b/src/sage/categories/magmas.py @@ -785,7 +785,7 @@ def __init_extra__(self): # This should instead register the multiplication to the coercion model # But this is not yet implemented in the coercion model # - # Trac ticket #11900: The following used to test whether + # Github issue #11900: The following used to test whether # self.product != self.product_from_element_class_mul. But # that is, of course, a bug. Namely otherwise, if the parent # has an optimized `product` then its elements will *always* use diff --git a/src/sage/categories/modules.py b/src/sage/categories/modules.py index 2e3eb65dc3d..cb878f1c6f2 100644 --- a/src/sage/categories/modules.py +++ b/src/sage/categories/modules.py @@ -973,6 +973,6 @@ def tensor_factors(self): sage: M.construction() doctest:warning... DeprecationWarning: implementations of Modules().TensorProducts() now must define the method tensor_factors - See https://trac.sagemath.org/34393 for details. + See /~https://github.com/sagemath/sage/issues/34393 for details. (VectorFunctor, Integer Ring) """ diff --git a/src/sage/categories/morphism.pyx b/src/sage/categories/morphism.pyx index 121dc3bbd15..59a73a43c62 100644 --- a/src/sage/categories/morphism.pyx +++ b/src/sage/categories/morphism.pyx @@ -393,7 +393,7 @@ cdef class Morphism(Map): # multiplying it with the gens of the scalar ring. # # It is known that this way of comparing morphisms may give - # a mathematically wrong answer. See Trac #28617 and #31783. + # a mathematically wrong answer. See Issue #28617 and #31783. if e is not None and isinstance(e, ModuleElement): B = (e)._parent._base gens = [e * B.coerce(x) for x in gens] diff --git a/src/sage/categories/primer.py b/src/sage/categories/primer.py index b3624ad4dc1..96dff8e2631 100644 --- a/src/sage/categories/primer.py +++ b/src/sage/categories/primer.py @@ -440,12 +440,12 @@ class implements: For plain Python methods, one can also just ask in which module they are implemented:: - sage: i._pow_.__module__ # not tested (Trac #24275) + sage: i._pow_.__module__ # not tested (Issue #24275) 'sage.categories.semigroups' sage: pQ._mul_.__module__ 'sage.rings.polynomial.polynomial_element_generic' - sage: pQ._pow_.__module__ # not tested (Trac #24275) + sage: pQ._pow_.__module__ # not tested (Issue #24275) 'sage.categories.semigroups' We see that integers and polynomials have each their own diff --git a/src/sage/categories/pushout.py b/src/sage/categories/pushout.py index 86e33e45b1e..6c5b08e003a 100644 --- a/src/sage/categories/pushout.py +++ b/src/sage/categories/pushout.py @@ -2878,8 +2878,8 @@ def _apply_functor(self, R): Quotient of Multivariate Polynomial Ring in x, y over Rational Field by the ideal (x^2 + 2, y^2 + 3*x) Note that the ``quo()`` method of a field used to return the - integer zero. That strange behaviour was removed in trac - ticket :trac:`9138`. It now returns a trivial quotient ring + integer zero. That strange behaviour was removed in github + issue :trac:`9138`. It now returns a trivial quotient ring when applied to a field:: sage: F = ZZ.quo([5]*ZZ).construction()[0] diff --git a/src/sage/categories/unital_algebras.py b/src/sage/categories/unital_algebras.py index 43ffa76d47c..d245b4de8c1 100644 --- a/src/sage/categories/unital_algebras.py +++ b/src/sage/categories/unital_algebras.py @@ -109,7 +109,7 @@ def __init_extra__(self): sage: Bar(category=Algebras(QQ)) doctest:warning...: DeprecationWarning: the attribute _no_generic_basering_coercion is deprecated, implement _coerce_map_from_base_ring() instead - See http://trac.sagemath.org/19225 for details. + See /~https://github.com/sagemath/sage/issues/19225 for details. <__main__.Bar_with_category object at 0x...> """ if getattr(self, '_no_generic_basering_coercion', False): @@ -227,7 +227,7 @@ def _coerce_map_from_base_ring(self): elif isinstance(generic_from_base_ring, lazy_attribute): # If the category implements from_base_ring() as lazy # attribute, then we always use it. - # This is for backwards compatibility, see Trac #25181 + # This is for backwards compatibility, see Issue #25181 use_from_base_ring = True else: try: diff --git a/src/sage/coding/gabidulin_code.py b/src/sage/coding/gabidulin_code.py index b29b85d6359..b6d2e2bac4d 100644 --- a/src/sage/coding/gabidulin_code.py +++ b/src/sage/coding/gabidulin_code.py @@ -544,7 +544,7 @@ class GabidulinPolynomialEvaluationEncoder(Encoder): sage: p = (z9^6 + z9^2 + z9 + 1)*x + z9^7 + z9^5 + z9^4 + z9^2 sage: vector(p.multi_point_evaluation(C.evaluation_points())) doctest:...: FutureWarning: This class/method/function is marked as experimental. It, its functionality or its interface might change without a formal deprecation. - See http://trac.sagemath.org/13215 for details. + See /~https://github.com/sagemath/sage/issues/13215 for details. (z9^7 + z9^6 + z9^5 + z9^4 + z9 + 1, z9^6 + z9^5 + z9^3 + z9) EXAMPLES:: diff --git a/src/sage/combinat/colored_permutations.py b/src/sage/combinat/colored_permutations.py index 4ace496fbdb..28b20e502af 100644 --- a/src/sage/combinat/colored_permutations.py +++ b/src/sage/combinat/colored_permutations.py @@ -436,7 +436,7 @@ class ColoredPermutations(Parent, UniqueRepresentation): [[0, 1, 0], [1, 2, 3]] We can also create a colored permutation by passing - either a list of tuples consisting of ``(color, element)``:: + an iterable consisting of tuples consisting of ``(color, element)``:: sage: x = C([(2,1), (3,3), (3,2)]); x [[2, 3, 3], [1, 3, 2]] @@ -445,6 +445,8 @@ class ColoredPermutations(Parent, UniqueRepresentation): sage: C([[3,3,1], [1,3,2]]) [[3, 3, 1], [1, 3, 2]] + sage: C(([3,3,1], [1,3,2])) + [[3, 3, 1], [1, 3, 2]] There is also the natural lift from permutations:: @@ -452,6 +454,12 @@ class ColoredPermutations(Parent, UniqueRepresentation): sage: C(P.an_element()) [[0, 0, 0], [3, 1, 2]] + + A colored permutation:: + + sage: C(C.an_element()) == C.an_element() + True + REFERENCES: - :wikipedia:`Generalized_symmetric_group` @@ -688,20 +696,22 @@ def _element_constructor_(self, x): sage: x == C([[2,3,3], [1,3,2]]) True """ - if isinstance(x, list): - if isinstance(x[0], tuple): - c = [] - p = [] - for k in x: - if len(k) != 2: - raise ValueError("input must be pairs (color, element)") - c.append(self._C(k[0])) - p.append(k[1]) - return self.element_class(self, c, self._P(p)) - - if len(x) != 2: - raise ValueError("input must be a pair of a list of colors and a permutation") - return self.element_class(self, [self._C(v) for v in x[0]], self._P(x[1])) + if isinstance(x, self.element_class) and x.parent() is self: + return self + x = list(x) + if isinstance(x[0], tuple): + c = [] + p = [] + for k in x: + if len(k) != 2: + raise ValueError("input must be pairs (color, element)") + c.append(self._C(k[0])) + p.append(k[1]) + return self.element_class(self, c, self._P(p)) + + if len(x) != 2: + raise ValueError("input must be a pair of a list of colors and a permutation") + return self.element_class(self, [self._C(v) for v in x[0]], self._P(x[1])) def _coerce_map_from_(self, C): """ @@ -989,6 +999,11 @@ def __classcall_private__(cls, pi): sage: SignedPermutation([2, 1, -3]) [2, 1, -3] + sage: SignedPermutation((2,1,-3)) + [2, 1, -3] + + sage: SignedPermutation(range(1,4)) + [1, 2, 3] """ return SignedPermutations(len(list(pi)))(pi) @@ -1360,38 +1375,43 @@ def _element_constructor_(self, x): sage: S([]) == list(S)[0] True - """ - if isinstance(x, list): - if x and isinstance(x[0], tuple): - c = [] - p = [] - for k in x: - if len(k) != 2: - raise ValueError("input must be pairs (sign, element)") - if k[0] != 1 and k[0] != -1: - raise ValueError("the sign must be +1 or -1") - c.append(ZZ(k[0])) - p.append(k[1]) - return self.element_class(self, c, self._P(p)) - - if len(x) == self._n: - c = [] - p = [] - one = ZZ.one() - for v in x: - if v > 0: - c.append(one) - p.append(v) - else: - c.append(-one) - p.append(-v) - return self.element_class(self, c, self._P(p)) - - if len(x) != 2: - raise ValueError("input must be a pair of a list of signs and a permutation") - if any(s != 1 and s != -1 for s in x[0]): - raise ValueError("the sign must be +1 or -1") - return self.element_class(self, [ZZ(v) for v in x[0]], self._P(x[1])) + sage: T = SignedPermutation(range(1,4)) + sage: SignedPermutations(3)(T) + [1, 2, 3] + """ + if isinstance(x, self.element_class) and x.parent() is self: + return self + x = list(x) + if x and isinstance(x[0], tuple): + c = [] + p = [] + for k in x: + if len(k) != 2: + raise ValueError("input must be pairs (sign, element)") + if k[0] != 1 and k[0] != -1: + raise ValueError("the sign must be +1 or -1") + c.append(ZZ(k[0])) + p.append(k[1]) + return self.element_class(self, c, self._P(p)) + + if len(x) == self._n: + c = [] + p = [] + one = ZZ.one() + for v in x: + if v > 0: + c.append(one) + p.append(v) + else: + c.append(-one) + p.append(-v) + return self.element_class(self, c, self._P(p)) + + if len(x) != 2: + raise ValueError("input must be a pair of a list of signs and a permutation") + if any(s != 1 and s != -1 for s in x[0]): + raise ValueError("the sign must be +1 or -1") + return self.element_class(self, [ZZ(v) for v in x[0]], self._P(x[1])) def __iter__(self): """ diff --git a/src/sage/combinat/combinat.py b/src/sage/combinat/combinat.py index af2bc0da8c8..a4ad56b0170 100644 --- a/src/sage/combinat/combinat.py +++ b/src/sage/combinat/combinat.py @@ -2528,7 +2528,7 @@ def cardinality(self) -> Integer | infinity: sage: R = InfiniteAbstractCombinatorialClass() doctest:warning... DeprecationWarning: this class is deprecated, do not use - See https://trac.sagemath.org/31545 for details. + See /~https://github.com/sagemath/sage/issues/31545 for details. sage: R.cardinality() +Infinity diff --git a/src/sage/combinat/designs/difference_family.py b/src/sage/combinat/designs/difference_family.py index 90df86e3e41..95c9104e4b3 100644 --- a/src/sage/combinat/designs/difference_family.py +++ b/src/sage/combinat/designs/difference_family.py @@ -1050,7 +1050,7 @@ def are_mcfarland_1973_parameters(v, k, lmbda, return_parameters=False): # NOTE: below we compute the value of s so that qs = q^s. If the method # is_power_of of integers would be able to return the exponent, we could use # that... but currently this is not the case - # see trac ticket #19792 + # see github issue #19792 p1,a1 = qs.is_prime_power(get_data=True) p2,a2 = q.is_prime_power(get_data=True) diff --git a/src/sage/combinat/finite_state_machine.py b/src/sage/combinat/finite_state_machine.py index 6be4e0e2683..29671fb28ed 100644 --- a/src/sage/combinat/finite_state_machine.py +++ b/src/sage/combinat/finite_state_machine.py @@ -4887,7 +4887,7 @@ def key_function(s): return (s.from_state, s.to_state) # We use an OrderedDict instead of a dict in order to have a # defined ordering of the transitions in the output. See - # http://trac.sagemath.org/ticket/16580#comment:3 . As the + # /~https://github.com/sagemath/sage/issues/16580#comment:3 . As the # transitions have to be sorted anyway, the performance # penalty should be bearable; nevertheless, this is only # required for doctests. diff --git a/src/sage/combinat/free_module.py b/src/sage/combinat/free_module.py index 3432e18b27d..c8269e5f96f 100644 --- a/src/sage/combinat/free_module.py +++ b/src/sage/combinat/free_module.py @@ -256,7 +256,7 @@ class CombinatorialFreeModule(UniqueRepresentation, Module, IndexedGenerators): sage: XQ == XQ True - We check that ticket :trac:`28681` is fixed:: + We check that issue :trac:`28681` is fixed:: sage: F = CombinatorialFreeModule(ZZ, ZZ); F.rename("F") sage: FF = tensor((F,F)) diff --git a/src/sage/combinat/k_regular_sequence.py b/src/sage/combinat/k_regular_sequence.py index 95a9283f7f0..50ae558aaad 100644 --- a/src/sage/combinat/k_regular_sequence.py +++ b/src/sage/combinat/k_regular_sequence.py @@ -18,7 +18,7 @@ doctest:...: FutureWarning: This class/method/function is marked as experimental. It, its functionality or its interface might change without a formal deprecation. - See http://trac.sagemath.org/21202 for details. + See /~https://github.com/sagemath/sage/issues/21202 for details. Examples diff --git a/src/sage/combinat/permutation.py b/src/sage/combinat/permutation.py index a237f2398a9..ec1958ee313 100644 --- a/src/sage/combinat/permutation.py +++ b/src/sage/combinat/permutation.py @@ -7248,7 +7248,7 @@ def has_left_descent(self, i, mult=None): doctest:warning ... DeprecationWarning: The mult option is deprecated and ignored. - See https://trac.sagemath.org/27467 for details. + See /~https://github.com/sagemath/sage/issues/27467 for details. True sage: x.has_left_descent(2, mult='r2l') True @@ -7302,7 +7302,7 @@ def has_right_descent(self, i, mult=None): doctest:warning ... DeprecationWarning: The mult option is deprecated and ignored. - See https://trac.sagemath.org/27467 for details. + See /~https://github.com/sagemath/sage/issues/27467 for details. True sage: x.has_right_descent(3, mult='r2l') True @@ -9063,7 +9063,7 @@ def a(self): sage: P = Permutations(3, avoiding=[[2,1,3],[1,2,3]]) sage: P.a doctest:...: DeprecationWarning: The attribute a for the list of patterns to avoid is deprecated, use the method patterns instead. - See https://trac.sagemath.org/26810 for details. + See /~https://github.com/sagemath/sage/issues/26810 for details. ([2, 1, 3], [1, 2, 3]) """ from sage.misc.superseded import deprecation diff --git a/src/sage/combinat/posets/hasse_diagram.py b/src/sage/combinat/posets/hasse_diagram.py index d857092f9c7..f59f4fd951f 100644 --- a/src/sage/combinat/posets/hasse_diagram.py +++ b/src/sage/combinat/posets/hasse_diagram.py @@ -745,7 +745,7 @@ def rank_function(self): sage: Q.rank_function() is None True - test for ticket :trac:`14006`:: + test for issue :trac:`14006`:: sage: H = Poset()._hasse_diagram sage: s = dumps(H) @@ -2051,7 +2051,7 @@ def orthocomplementations_iterator(self): mt = self.meet_matrix() jn = self.join_matrix() for e in range(n): - # Fix following after ticket #20727 + # Fix following after issue #20727 comps[e] = [x for x in range(n) if mt[e, x] == 0 and jn[e, x] == n - 1 and x in orbits[orbit_number[dual_isomorphism[e]]]] diff --git a/src/sage/combinat/posets/lattices.py b/src/sage/combinat/posets/lattices.py index 43bd9f83fdc..985b61cd6ca 100644 --- a/src/sage/combinat/posets/lattices.py +++ b/src/sage/combinat/posets/lattices.py @@ -3010,7 +3010,7 @@ def vertical_composition(self, other, labels='pairs'): # Todo: This and ordinal_sum() of posets could keep # distinguished linear extension, if it is defined # for both posets/lattices. That can be done after - # trac ticket #21607. + # github issue #21607. if labels not in ['integers', 'pairs']: raise ValueError("labels must be either 'pairs' or 'integers'") diff --git a/src/sage/combinat/posets/linear_extensions.py b/src/sage/combinat/posets/linear_extensions.py index 5d9aae755d8..48ca0af51d5 100644 --- a/src/sage/combinat/posets/linear_extensions.py +++ b/src/sage/combinat/posets/linear_extensions.py @@ -252,6 +252,73 @@ def is_greedy(self): return False return True + def is_supergreedy(self): + r""" + Return ``True`` if the linear extension is supergreedy. + + A linear extension `[x_1 @@ -793,7 +793,7 @@ def __call__(self, w, order=1, datatype=None): doctest:warning ... DeprecationWarning: the "datatype" argument is deprecated - See https://trac.sagemath.org/26307 for details. + See /~https://github.com/sagemath/sage/issues/26307 for details. sage: type(w) sage: w = m([0],4,datatype='str') @@ -1907,7 +1907,7 @@ def fixed_points(self): sage: for w in f.fixed_points(): print(w) abcabbccabcabcabbccbccabcabbccabcabbccab... - This shows that ticket :trac:`13668` has been resolved:: + This shows that issue :trac:`13668` has been resolved:: sage: d = {1:[1,2],2:[2,3],3:[4],4:[5],5:[6],6:[7],7:[8],8:[9],9:[10],10:[1]} sage: s = WordMorphism(d) @@ -1918,7 +1918,7 @@ def fixed_points(self): sage: s7r.periodic_point(2) word: 2,1,1,10,9,8,7,6,5,4,3,2,1,10,9,8,7,6,5,4,3,2,10,9,8,7,6,5,4,3,2,9,8,7,6,5,4,3,2,8,... - This shows that ticket :trac:`13668` has been resolved:: + This shows that issue :trac:`13668` has been resolved:: sage: s = "1->321331332133133,2->133321331332133133,3->2133133133321331332133133" sage: s = WordMorphism(s) @@ -1994,7 +1994,7 @@ def periodic_points(self): sage: f.fixed_points() [] - This shows that ticket :trac:`13668` has been resolved:: + This shows that issue :trac:`13668` has been resolved:: sage: d = {1:[1,2],2:[2,3],3:[4],4:[5],5:[6],6:[7],7:[8],8:[9],9:[10],10:[1]} sage: s = WordMorphism(d) diff --git a/src/sage/cpython/__init__.py b/src/sage/cpython/__init__.py index 19c8d87a3be..51974f1e438 100644 --- a/src/sage/cpython/__init__.py +++ b/src/sage/cpython/__init__.py @@ -5,18 +5,18 @@ # Make sure that the correct zlib library is loaded. This is needed # to prevent the system zlib to be loaded instead of the Sage one. -# See https://trac.sagemath.org/ticket/23122 +# See /~https://github.com/sagemath/sage/issues/23122 import zlib as _zlib del _zlib # Monkey-patch ExtensionFileLoader to allow IPython to find the sources -# of Cython files. See https://trac.sagemath.org/ticket/24681 +# of Cython files. See /~https://github.com/sagemath/sage/issues/24681 from importlib.machinery import ExtensionFileLoader as _ExtensionFileLoader del _ExtensionFileLoader.get_source del _ExtensionFileLoader # Work around a Cygwin-specific bug caused by sqlite3; see -# https://trac.sagemath.org/ticket/30157 and the docstring for +# /~https://github.com/sagemath/sage/issues/30157 and the docstring for # fix_for_ticket_30157 # Here we monkey-patch the sqlite3 module to ensure the fix is # applied the very first time a connection is made to a sqlite3 @@ -39,7 +39,7 @@ def _patch_sqlite3(): def connect(*args, **kwargs): if fix_for_ticket_30157(): raise RuntimeError( - 'patch for Trac ticket #30157 failed; please report this ' + 'patch for Github issue #30157 failed; please report this ' 'bug to https://trac.sagemath.org') # Undo the monkey-patch diff --git a/src/sage/cpython/atexit.pyx b/src/sage/cpython/atexit.pyx index 3ba391b4cdd..baa3d7a2c0e 100644 --- a/src/sage/cpython/atexit.pyx +++ b/src/sage/cpython/atexit.pyx @@ -51,7 +51,7 @@ cdef class restore_atexit: sage: import atexit sage: from sage.cpython.atexit import restore_atexit sage: def handler(*args, **kwargs): - ....: import sys # see https://trac.sagemath.org/ticket/25270#comment:56 + ....: import sys # see /~https://github.com/sagemath/sage/issues/25270#comment:56 ....: sys.stdout.write(str((args, kwargs))) ....: sys.stdout.write('\n') sage: atexit.register(handler, 1, 2, c=3) diff --git a/src/sage/crypto/boolean_function.pyx b/src/sage/crypto/boolean_function.pyx index a9ea665475c..d10c0c11546 100644 --- a/src/sage/crypto/boolean_function.pyx +++ b/src/sage/crypto/boolean_function.pyx @@ -942,7 +942,7 @@ cdef class BooleanFunction(SageObject): doctest:warning ... DeprecationWarning: absolut_indicator is deprecated. Please use absolute_indicator instead. - See https://trac.sagemath.org/28001 for details. + See /~https://github.com/sagemath/sage/issues/28001 for details. 32 """ cdef long a diff --git a/src/sage/databases/findstat.py b/src/sage/databases/findstat.py index 218a2dff3ff..452abbcce8e 100644 --- a/src/sage/databases/findstat.py +++ b/src/sage/databases/findstat.py @@ -4733,7 +4733,7 @@ def __init__(self): print(" %s: %s" % (id, data["NamePlural"])) print("To use it with this interface, it has to be added to the dictionary") print(" _SupportedFindStatCollections in src/sage/databases/findstat.py") - print("of the SageMath distribution. Please open a ticket on trac!") + print("of the SageMath distribution. Please open an issue on github!") # print("Very likely, the following code would work:") # fields = "SageCodeElementToString,SageCodeElementsOnLevel,SageCodeStringToElement" # url = FINDSTAT_API_COLLECTIONS + id + "?fields=" + fields diff --git a/src/sage/databases/oeis.py b/src/sage/databases/oeis.py index a800db53df2..509f0c10d46 100644 --- a/src/sage/databases/oeis.py +++ b/src/sage/databases/oeis.py @@ -592,7 +592,7 @@ def _imaginary_entry(self, ident='A999999', keywords=''): '%D ' + ident + ' Lewis Carroll, The Hunting of the Snark.\n' '%D ' + ident + ' Deep Thought, The Answer to the Ultimate Question of Life, The Universe, and Everything.\n' '%H ' + ident + ' Wikipedia, 42 (number)\n' - '%H ' + ident + ' See. also trac ticket #42\n' + '%H ' + ident + ' See. also github issue #42\n' '%H ' + ident + ' Do not confuse with the sequence A000042 or the sequence A000024\n' '%H ' + ident + ' The string http://42.com is not a link.\n' '%F ' + ident + ' For n big enough, s(n+1) - s(n) = 0.\n' @@ -1556,7 +1556,7 @@ def links(self, browse=None, format='guess'): sage: HTML = s.links(format="html"); HTML 0: Wikipedia, 42 (number) - 1: See. also trac ticket #42 + 1: See. also github issue #42 ... sage: type(HTML) diff --git a/src/sage/doctest/forker.py b/src/sage/doctest/forker.py index adbf012ab2e..fe58e2bde3e 100644 --- a/src/sage/doctest/forker.py +++ b/src/sage/doctest/forker.py @@ -152,10 +152,10 @@ def init_sage(controller=None): """ try: # We need to ensure that the Matplotlib font cache is built to - # avoid spurious warnings (see Trac #20222). + # avoid spurious warnings (see Issue #20222). import matplotlib.font_manager except ImportError: - # Do not require matplotlib for running doctests (Trac #25106). + # Do not require matplotlib for running doctests (Issue #25106). pass else: # Make sure that the agg backend is selected during doctesting. @@ -170,7 +170,7 @@ def init_sage(controller=None): # Set the Python PRNG class to the Python 2 implementation for consistency # of 'random' test results that use it; see - # https://trac.sagemath.org/ticket/24508 + # /~https://github.com/sagemath/sage/issues/24508 # We use the baked in copy of the random module for both Python 2 and 3 # since, although the upstream copy is unlikely to change, this further # ensures consistency of test results @@ -214,17 +214,17 @@ def init_sage(controller=None): debug.refine_category_hash_check = True # We import readline before forking, otherwise Pdb doesn't work - # on OS X: http://trac.sagemath.org/14289 + # on OS X: /~https://github.com/sagemath/sage/issues/14289 try: import readline except ModuleNotFoundError: - # Do not require readline for running doctests (Trac #31160). + # Do not require readline for running doctests (Issue #31160). pass try: import sympy except ImportError: - # Do not require sympy for running doctests (Trac #25106). + # Do not require sympy for running doctests (Issue #25106). pass else: # Disable SymPy terminal width detection @@ -731,7 +731,7 @@ def compiler(example): # exceptions), whereas on Python 2 does not, so we # normalize Python 3 exceptions to match tests written to # Python 2 - # See https://trac.sagemath.org/ticket/24271 + # See /~https://github.com/sagemath/sage/issues/24271 exc_cls = exception[0] exc_name = exc_cls.__name__ if exc_cls.__module__: @@ -2144,7 +2144,7 @@ def run(self): sys.stdin = os.fdopen(0, "r") except OSError: # We failed to open stdin for reading, this might happen - # for example when running under "nohup" (Trac #14307). + # for example when running under "nohup" (Issue #14307). # Simply redirect stdin from /dev/null and try again. with open(os.devnull) as f: os.dup2(f.fileno(), 0) diff --git a/src/sage/dynamics/surface_dynamics_deprecation.py b/src/sage/dynamics/surface_dynamics_deprecation.py index 9a2a1b4312c..9da8f1d0be3 100644 --- a/src/sage/dynamics/surface_dynamics_deprecation.py +++ b/src/sage/dynamics/surface_dynamics_deprecation.py @@ -25,7 +25,7 @@ def surface_dynamics_deprecation(name): computation that are currently available in Sage. See more information at http://www.labri.fr/perso/vdelecro/surface-dynamics/latest/ - See http://trac.sagemath.org/20695 for details. + See /~https://github.com/sagemath/sage/issues/20695 for details. """ from sage.misc.superseded import deprecation deprecation(20695, deprecation_msg.format(name)) diff --git a/src/sage/ext/memory_allocator.pxd b/src/sage/ext/memory_allocator.pxd index b612df2110c..5ada54f9535 100644 --- a/src/sage/ext/memory_allocator.pxd +++ b/src/sage/ext/memory_allocator.pxd @@ -65,7 +65,7 @@ cdef class MemoryAllocator: ....: assert ptr == ( ptr) & ~(2**i-1) ....: ''') doctest:...: DeprecationWarning: this class is deprecated; use the class from the python package `memory_allocator` - See https://trac.sagemath.org/31591 for details. + See /~https://github.com/sagemath/sage/issues/31591 for details. """ cdef size_t extra = alignment - 1 return align(self.malloc(size + extra), alignment) @@ -96,7 +96,7 @@ cdef class MemoryAllocator: ....: ''') sage: foo() doctest:...: DeprecationWarning: this class is deprecated; use the class from the python package `memory_allocator` - See https://trac.sagemath.org/31591 for details. + See /~https://github.com/sagemath/sage/issues/31591 for details. """ # Find extra such that (nmemb + extra) * size >= nmemb * size + alignment - 1 # ⇔ extra * size >= alignment - 1 diff --git a/src/sage/ext/memory_allocator.pyx b/src/sage/ext/memory_allocator.pyx index cae760c9752..1f271a3e82e 100644 --- a/src/sage/ext/memory_allocator.pyx +++ b/src/sage/ext/memory_allocator.pyx @@ -27,7 +27,7 @@ cdef class MemoryAllocator: ....: mem.aligned_allocarray(8, n, 8) ....: ''') doctest:...: DeprecationWarning: this class is deprecated; use the class from the python package `memory_allocator` - See https://trac.sagemath.org/31591 for details. + See /~https://github.com/sagemath/sage/issues/31591 for details. """ def __cinit__(self): """ @@ -44,7 +44,7 @@ cdef class MemoryAllocator: ....: ''') sage: foo() doctest:...: DeprecationWarning: this class is deprecated; use the class from the python package `memory_allocator` - See https://trac.sagemath.org/31591 for details. + See /~https://github.com/sagemath/sage/issues/31591 for details. 1 16 """ diff --git a/src/sage/ext/mod_int.h b/src/sage/ext/mod_int.h index bb18adf3c11..9bb5043ec71 100644 --- a/src/sage/ext/mod_int.h +++ b/src/sage/ext/mod_int.h @@ -14,7 +14,7 @@ * Hence, we use signed 64-bit ints. This gives us fast conversion * to/from Python on 64-bit Linux and OSX, and a large number of * available (but not quite as fast) primes on 64-bit Windows and all - * 32-bit platforms (see Trac #10281) + * 32-bit platforms (see Issue #10281) */ typedef int64_t mod_int; diff --git a/src/sage/ext_data/threejs/threejs_template.html b/src/sage/ext_data/threejs/threejs_template.html index 38800560c47..172d0cec4aa 100644 --- a/src/sage/ext_data/threejs/threejs_template.html +++ b/src/sage/ext_data/threejs/threejs_template.html @@ -214,7 +214,17 @@ camera.up.set( 0, 0, 1 ); camera.position.set( a[0]*xMid, a[1]*yMid, a[2]*zMid ); - var offset = new THREE.Vector3( a[0]*xRange, a[1]*yRange, a[2]*zRange ); + // camera is positioned so that the line from the camera to the center + // of the bounding sphere of the objects makes an angle of 60 degrees with x-axis + // and an angle of 30 degrees with z-axis and the field of view of the camera looking + // at the center has an angle of 45 degrees. + const sin8 = Math.sin(Math.PI / 8); + const sin5 = Math.sin(Math.PI / 5); + const cos5 = Math.cos(Math.PI / 5); + const sin3 = Math.sin(Math.PI / 3); + const cos3 = Math.cos(Math.PI / 3); + var r = midToCorner / sin8; + var offset = new THREE.Vector3( r * sin3 * cos5, r * sin3 * sin5, r * cos3 ); if ( options.viewpoint ) { @@ -569,7 +579,7 @@ setTimeout( function() { m.style.display = 'none'; }, 2000 ); } - +